Tizen 2.1 base
authorJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 17:17:52 +0000 (02:17 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 17:17:52 +0000 (02:17 +0900)
1298 files changed:
AUTHORS
LICENSE.APLv2 [new file with mode: 0644]
NOTICE
README [new file with mode: 0644]
org.tizen.common.connection/META-INF/MANIFEST.MF
org.tizen.common.connection/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.common.connection/build.properties
org.tizen.common.connection/icons/16_TIZEN_SDK_icon.png [new file with mode: 0644]
org.tizen.common.connection/icons/connection_explorer.gif [new file with mode: 0644]
org.tizen.common.connection/icons/emulator_manager.gif [new file with mode: 0644]
org.tizen.common.connection/icons/log/add_tab.png [new file with mode: 0644]
org.tizen.common.connection/icons/log/clear_log.png [new file with mode: 0644]
org.tizen.common.connection/icons/log/edit_tab.png [new file with mode: 0644]
org.tizen.common.connection/icons/log/export_log.png [new file with mode: 0644]
org.tizen.common.connection/icons/log/f.png [new file with mode: 0644]
org.tizen.common.connection/icons/log/i.png
org.tizen.common.connection/icons/log/logview.gif [new file with mode: 0644]
org.tizen.common.connection/icons/log/remove_tab.png [new file with mode: 0644]
org.tizen.common.connection/icons/log/scroll_lock.png [new file with mode: 0644]
org.tizen.common.connection/plugin.xml
org.tizen.common.connection/src/org/tizen/common/connection/ConnectionPlugin.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/ConnectionPluginSurrogate.java [new file with mode: 0644]
org.tizen.common.connection/src/org/tizen/common/connection/ddmuilib/FileDialogUtils.java
org.tizen.common.connection/src/org/tizen/common/connection/ddmuilib/ITableFocusListener.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/ddmuilib/ImageLoader.java
org.tizen.common.connection/src/org/tizen/common/connection/ddmuilib/actions/ICommonAction.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/ddmuilib/console/IDdmConsole.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/debugtools/DebugTool.java
org.tizen.common.connection/src/org/tizen/common/connection/debugtools/OnDemandInstall.java [new file with mode: 0644]
org.tizen.common.connection/src/org/tizen/common/connection/debugtools/OnDemandInstallMessages.java [new file with mode: 0644]
org.tizen.common.connection/src/org/tizen/common/connection/debugtools/OnDemandInstallMessages.properties [new file with mode: 0644]
org.tizen.common.connection/src/org/tizen/common/connection/explorer/ConnectionExplorerContentProvider.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/explorer/ConnectionExplorerLabelProvider.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/explorer/ConnectionExplorerPanel.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/explorer/Messages.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/explorer/messages.properties
org.tizen.common.connection/src/org/tizen/common/connection/log/AddViewDialog.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/log/LogColors.java
org.tizen.common.connection/src/org/tizen/common/connection/log/LogPanel.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/log/LogTab.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/log/LogUIMessages.java [new file with mode: 0644]
org.tizen.common.connection/src/org/tizen/common/connection/log/LogUIMessages.properties [new file with mode: 0644]
org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.java [new file with mode: 0644]
org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.properties [new file with mode: 0644]
org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenConnectionExplorerPreferencePage.java [new file with mode: 0644]
org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenLogPreferencePage.java [new file with mode: 0644]
org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenToolsPreferencePage.java [new file with mode: 0644]
org.tizen.common.connection/src/org/tizen/common/connection/properties/ConnectionExplorerPermissionPropertyPages.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/sdblib/dnd/FileEntryDropAdapter.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/sdblib/dnd/FileEntryTransfer.java
org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionExplorer.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.java [new file with mode: 0644]
org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.properties [new file with mode: 0644]
org.tizen.common.connection/src/org/tizen/common/connection/ui/LogView.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/ui/TizenRemoteFileContentProvider.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/ui/TizenRemoteFileDialog.java [changed mode: 0644->0755]
org.tizen.common.connection/src/org/tizen/common/connection/ui/TizenRemoteFileLabelProvider.java [changed mode: 0644->0755]
org.tizen.common.externals/.classpath [new file with mode: 0644]
org.tizen.common.externals/.project [new file with mode: 0644]
org.tizen.common.externals/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.common.externals/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.externals/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.common.externals/about.html [new file with mode: 0644]
org.tizen.common.externals/about_files/LICENSE-2.0.htm [new file with mode: 0644]
org.tizen.common.externals/about_files/epl-v10.html [new file with mode: 0644]
org.tizen.common.externals/build.properties [new file with mode: 0644]
org.tizen.common.externals/resources/opal.properties [new file with mode: 0644]
org.tizen.common.externals/resources/opal_de_DE.properties [new file with mode: 0644]
org.tizen.common.externals/resources/opal_es_ES.properties [new file with mode: 0644]
org.tizen.common.externals/resources/opal_fr_FR.properties [new file with mode: 0644]
org.tizen.common.externals/resources/opal_it_IT.properties [new file with mode: 0644]
org.tizen.common.externals/resources/opal_pl_PL.properties [new file with mode: 0644]
org.tizen.common.externals/resources/opal_pt_BR.properties [new file with mode: 0644]
org.tizen.common.externals/resources/opal_zh_CN.properties [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/OpalItem.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/angles/AngleSlider.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/brushedMetalComposite/BrushedMetalComposite.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/checkBoxGroup/CheckBoxGroup.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/columns/ColumnBrowserWidget.java [new file with mode: 0755]
org.tizen.common.externals/src/org/mihalis/opal/columns/ColumnItem.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/flatButton/FlatButton.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/gradientComposite/GradientComposite.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/header/Header.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/heapManager/HeapManager.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/horizontalSpinner/HorizontalSpinner.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/imageSelector/ISItem.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/imageSelector/ImageSelector.java [new file with mode: 0755]
org.tizen.common.externals/src/org/mihalis/opal/infinitePanel/InfiniteProgressPanel.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/itemSelector/DLItem.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/itemSelector/DualList.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/launcher/LLabel.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/launcher/Launcher.java [new file with mode: 0755]
org.tizen.common.externals/src/org/mihalis/opal/launcher/LauncherItem.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/login/LoginDialog.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/login/LoginDialogVerifier.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/multiChoice/MultiChoice.java [new file with mode: 0755]
org.tizen.common.externals/src/org/mihalis/opal/multiChoice/MultiChoiceSelectionListener.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/notify/Notifier.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/notify/NotifierColors.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/notify/NotifierColorsFactory.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/opalDialog/ChoiceItem.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/opalDialog/ChoiceWidget.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/opalDialog/Dialog.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/opalDialog/DialogArea.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/opalDialog/FooterArea.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/opalDialog/MessageArea.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/panels/BlurredPanel.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/panels/DarkPanel.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWContainer.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWGroup.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWRow.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWRowGroup.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWTab.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWTabContainer.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PreferenceWindow.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/ValueAndAssociatedWidgets.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/enabler/EnabledIfEquals.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/enabler/EnabledIfNotEquals.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/enabler/EnabledIfTrue.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/enabler/Enabler.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWButton.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWCheckbox.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWChooser.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWColorChooser.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWCombo.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWDirectoryChooser.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWFileChooser.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWFloatText.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWFontChooser.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWIntegerText.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWLabel.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWPasswordText.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWRadio.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWScale.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWSeparator.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWSpinner.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWStringText.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWText.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWTextarea.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWURLText.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWWidget.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/promptSupport/BaseFocusControlListener.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/promptSupport/CComboFocusControlListener.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/promptSupport/ComboFocusControlListener.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/promptSupport/FocusControlListenerFactory.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/promptSupport/PromptSupport.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/promptSupport/StyledTextFocusControlListener.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/promptSupport/TextFocusControlListener.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/rangeSlider/RangeSlider.java [new file with mode: 0755]
org.tizen.common.externals/src/org/mihalis/opal/switchButton/SwitchButton.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/textAssist/TextAssist.java [new file with mode: 0755]
org.tizen.common.externals/src/org/mihalis/opal/textAssist/TextAssistContentProvider.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/tipOfTheDay/TipOfTheDay.java [new file with mode: 0755]
org.tizen.common.externals/src/org/mihalis/opal/titledSeparator/TitledSeparator.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/DownUpAppearTransition.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/DownUpTransition.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/HorizontalTransition.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/LeftRightAppearTransition.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/LeftRightTransition.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/NoTransition.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/RightLeftAppearTransition.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/RightLeftTransition.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/TRANSITIONS.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/Transition.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/TransitionComposite.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/TransitionFactory.java [new file with mode: 0755]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/UpDownAppearTransition.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/UpDownTransition.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/VerticalTransition.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/utils/FileToolbox.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/utils/HTMLStyledTextParser.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/utils/ResourceManager.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/utils/SWTGraphicUtil.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/utils/SimpleSelectionAdapter.java [new file with mode: 0644]
org.tizen.common.externals/src/org/mihalis/opal/utils/StringUtil.java [new file with mode: 0644]
org.tizen.common.externals/src/org/tizen/common/externals/ExternalsPlugin.java [new file with mode: 0644]
org.tizen.common.feature/build.properties
org.tizen.common.feature/feature.xml [changed mode: 0644->0755]
org.tizen.common.feature/license.html
org.tizen.common.sdblib/.classpath [new file with mode: 0644]
org.tizen.common.sdblib/.project [new file with mode: 0644]
org.tizen.common.sdblib/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.common.sdblib/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.sdblib/build.properties [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/ArrayHelper.java [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/CrashReportService.java [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/Device.java [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/DeviceMonitor.java [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/FileListingService.java [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/ICrashReportServiceListener.java [new file with mode: 0755]
org.tizen.common.sdblib/src/org/tizen/sdblib/IDevice.java [new file with mode: 0755]
org.tizen.common.sdblib/src/org/tizen/sdblib/IShellOutputReceiver.java [new file with mode: 0755]
org.tizen.common.sdblib/src/org/tizen/sdblib/Log.java [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/LogReceiver.java [new file with mode: 0755]
org.tizen.common.sdblib/src/org/tizen/sdblib/MultiLineReceiver.java [new file with mode: 0755]
org.tizen.common.sdblib/src/org/tizen/sdblib/NullOutputReceiver.java [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/SdbCommandRejectedException.java [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/SdbHelper.java [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/SdbPreferences.java [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/SdbShellProcess.java [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/ShellCommandUnresponsiveException.java [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/SmartDevelopmentBridge.java [new file with mode: 0644]
org.tizen.common.sdblib/src/org/tizen/sdblib/SyncService.java [new file with mode: 0755]
org.tizen.common.sdblib/src/org/tizen/sdblib/TimeoutException.java [new file with mode: 0644]
org.tizen.common.sdblib/test/lib/asm-4.0.jar [new file with mode: 0644]
org.tizen.common.sdblib/test/lib/asm-tree-4.0.jar [new file with mode: 0644]
org.tizen.common.sdblib/test/lib/javassist-3.16.1-GA.jar [new file with mode: 0644]
org.tizen.common.sdblib/test/lib/junit-4.10-src.jar [new file with mode: 0644]
org.tizen.common.sdblib/test/lib/junit-4.10.jar [new file with mode: 0644]
org.tizen.common.sdblib/test/lib/mockito-all-1.9.0.jar [new file with mode: 0644]
org.tizen.common.sdblib/test/lib/powermock-mockito-1.4.12-full.jar [new file with mode: 0644]
org.tizen.common.sdblib/test/src/org/tizen/sdblib/TransferInfoTest.java [new file with mode: 0644]
org.tizen.common.sign/.classpath [new file with mode: 0644]
org.tizen.common.sign/.project [new file with mode: 0644]
org.tizen.common.sign/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.common.sign/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.sign/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.common.sign/about.html [new file with mode: 0644]
org.tizen.common.sign/about_files/LICENSE-2.0.htm [new file with mode: 0644]
org.tizen.common.sign/about_files/santuario-LICENSE.txt [new file with mode: 0644]
org.tizen.common.sign/build.properties [new file with mode: 0644]
org.tizen.common.sign/key/samsung.devmode.sdk.cert.p12 [new file with mode: 0644]
org.tizen.common.sign/lib/CertificateGenerator.jar [new file with mode: 0644]
org.tizen.common.sign/lib/HashSign.jar [new file with mode: 0644]
org.tizen.common.sign/lib/xmlsec-1.5.3.jar [new file with mode: 0644]
org.tizen.common.sign/plugin.xml [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/Activator.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/command/ReadSigningProfileFileCommand.java [new file with mode: 0755]
org.tizen.common.sign/src/org/tizen/common/sign/exception/CertificationException.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/exception/ComplicatedCertificationException.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/exception/SigningErrorDialog.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/model/Certification.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/model/SignatureConstants.java [new file with mode: 0755]
org.tizen.common.sign/src/org/tizen/common/sign/preferences/FileBrowserCellEditor.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/preferences/Messages.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/preferences/Messages.properties [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/preferences/ProfileCellModifier.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/preferences/ProfileItemContentProvider.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/preferences/ProfileItemLabelProvider.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningPreferencePage.java [new file with mode: 0755]
org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfile.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfileItem.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfileItemFactory.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/preferences/UIMessages.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/preferences/UIMessages.properties [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/signer/BuildNumber.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/signer/TizenSigner.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/ui/Messages.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/ui/TizenSigningDialog.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/ui/messages.properties [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/util/SigningPathUtil.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/util/SigningProfileUtil.java [new file with mode: 0644]
org.tizen.common.sign/src/org/tizen/common/sign/util/XMLUtil.java [new file with mode: 0644]
org.tizen.common.verrari.realm/.classpath [new file with mode: 0755]
org.tizen.common.verrari.realm/.project [new file with mode: 0755]
org.tizen.common.verrari.realm/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0755]
org.tizen.common.verrari.realm/META-INF/MANIFEST.MF [new file with mode: 0755]
org.tizen.common.verrari.realm/OSGI-INF/l10n/bundle.properties [new file with mode: 0755]
org.tizen.common.verrari.realm/about.html [new file with mode: 0644]
org.tizen.common.verrari.realm/about_files/LGPL-2.1.txt [new file with mode: 0644]
org.tizen.common.verrari.realm/about_files/LICENSE-2.0.htm [new file with mode: 0644]
org.tizen.common.verrari.realm/build.properties [new file with mode: 0755]
org.tizen.common.verrari.realm/build.xml [new file with mode: 0755]
org.tizen.common.verrari.realm/lib/jackson-core-lgpl-1.9.7.jar [new file with mode: 0755]
org.tizen.common.verrari.realm/lib/jackson-mapper-lgpl-1.9.7.jar [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/AttributeConfiguable.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/AttributeContainer.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/Condition.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/Realm.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/RealmFactory.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/SearchableRealm.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/Storage.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/Template.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/exception/InvalidMapperException.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/exception/UnsupportedVersionException.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/CompositeRealm.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/Query.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/RealmConstants.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/StandardRealm.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/StandardSearchableRealm.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/storage/FileStorage.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/Mapper.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/StandardMapper.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/StandardTemplate.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/TemplateConstants.java [new file with mode: 0755]
org.tizen.common.verrari.realm/src/org/tizen/common/verrari/util/QueryFactory.java [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/complex_template/META-INF/MANIFEST.MF [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/complex_template/config.xml [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/complex_template/icon.png [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/complex_template/index.html [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/complex_template/main.js [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/complex_template/style.css [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/complex_template/tizen_32.png [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/realm/META-INF/MANIFEST.MF [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/simple_template/META-INF/MANIFEST.MF [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/simple_template/META-INF/messages.properties [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/simple_template/config.xml [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/simple_template/css/style.css [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/simple_template/icon.png [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/simple_template/images/tizen_32.png [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/simple_template/index.html [new file with mode: 0755]
org.tizen.common.verrari.realm/test/doc/simple_template/js/main.js [new file with mode: 0755]
org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/AbstractTestCase.java [new file with mode: 0755]
org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/MANIFEST.MF [new file with mode: 0755]
org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/RealmFactoryTest.java [new file with mode: 0755]
org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/config.json [new file with mode: 0755]
org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/realm.jar [new file with mode: 0755]
org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/realm/StandardRealmTest.java [new file with mode: 0755]
org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/StandardMapperTest.java [new file with mode: 0755]
org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/StandardTemplateTest.java [new file with mode: 0755]
org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/complex-template.jar [new file with mode: 0755]
org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/simple-template.jar [new file with mode: 0755]
org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/tizen-web-project.jar [new file with mode: 0755]
org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/util/QueryFactoryTest.java [new file with mode: 0755]
org.tizen.common.verrari/.classpath [new file with mode: 0644]
org.tizen.common.verrari/.project [new file with mode: 0644]
org.tizen.common.verrari/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.tizen.common.verrari/META-INF/MANIFEST.MF [new file with mode: 0755]
org.tizen.common.verrari/OSGI-INF/l10n/bundle.properties [new file with mode: 0644]
org.tizen.common.verrari/about.html [new file with mode: 0644]
org.tizen.common.verrari/about_files/LICENSE-2.0.htm [new file with mode: 0644]
org.tizen.common.verrari/about_files/jsoup-LICENSE.txt [new file with mode: 0644]
org.tizen.common.verrari/build.properties [new file with mode: 0644]
org.tizen.common.verrari/doc/spec.txt [new file with mode: 0755]
org.tizen.common.verrari/lib/jsoup-1.6.3.jar [new file with mode: 0644]
org.tizen.common.verrari/src/org/tizen/common/verrari/Activator.java [new file with mode: 0644]
org.tizen.common.verrari/src/org/tizen/common/verrari/IModelManager.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/IModelProvider.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/ITemplate.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/ITemplateEngine.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/ITemplateManager.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/ITemplateProvider.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/TemplateContext.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/TemplateException.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/engine/AbstractTemplateEngine.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/engine/TemplateEngineFactory.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerModelManager.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerModelProvider.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateEngine.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateProvider.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateTransformer.java [new file with mode: 0644]
org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/method/FreemarkerTemplateEngineMethod.java [new file with mode: 0644]
org.tizen.common.verrari/src/org/tizen/common/verrari/engine/jsoup/JsoupTemplateEngine.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/engine/method/AbstractTemplateEngineMethod.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/model/ModelManager.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/model/ModelManagerDelegate.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/model/ModelProvider.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/model/ModelProviderDelegate.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/model/jsoup/JsoupModel.java [new file with mode: 0644]
org.tizen.common.verrari/src/org/tizen/common/verrari/template/AbstractTemplate.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/template/ClasspathResourceTemplate.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/template/FileTemplate.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/template/FileTemplateProvider.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/template/InMemoryTemplate.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/template/TemplateManager.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/template/TemplateProvider.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/template/TemplateProviderDelegate.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/template/TemplateTransformer.java [new file with mode: 0644]
org.tizen.common.verrari/src/org/tizen/common/verrari/template/TransformableTemplate.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/template/URLTemplate.java [new file with mode: 0755]
org.tizen.common.verrari/src/org/tizen/common/verrari/util/BufferFactory.java [new file with mode: 0755]
org.tizen.common.verrari/templates/build.xml [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/common-resources/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/common-resources/META-INF/messages.properties [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/common-resources/config.xml [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/common-resources/icon.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-common-resources/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-common-resources/META-INF/messages.properties [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/ajax-loader.gif [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/ajax-loader.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-18-black.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-18-white.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-36-black.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-36-white.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-common-resources/css/jquery.mobile-1.1.0.css [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-common-resources/css/style.css [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-common-resources/js/jquery-1.7.1.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-common-resources/js/jquery.mobile-1.1.0.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-common-resources/js/main.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-masterdetail/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-masterdetail/META-INF/messages.properties [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-masterdetail/head.template [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-masterdetail/index.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-masterdetail/section1.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-masterdetail/section2.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-multipage/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-multipage/META-INF/messages.properties [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-multipage/head.template [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-multipage/index.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-navigation/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-navigation/META-INF/messages.properties [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-navigation/head.template [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-navigation/index.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-navigation/section1.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-navigation/section2.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-singlepage/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-singlepage/META-INF/messages.properties [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-singlepage/head.template [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/jqm-singlepage/index.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizen-basic/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizen-basic/META-INF/messages.properties [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizen-basic/css/style.css [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizen-basic/head.template [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizen-basic/images/tizen_32.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizen-basic/index.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizen-basic/js/main.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/META-INF/messages.properties [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/config.xml [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/css/style.css [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/icon.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/js/main.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/VERSION [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.af-ZA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.af.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.am-ET.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.am.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-AE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-BH.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-DZ.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-EG.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-IQ.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-JO.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-KW.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-LB.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-LY.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-MA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-OM.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-QA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-SA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-SY.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-TN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-YE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.arn-CL.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.arn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.as-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.as.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az-Cyrl-AZ.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az-Cyrl.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az-Latn-AZ.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az-Latn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ba-RU.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ba.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.be-BY.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.be.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bg-BG.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bg.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bn-BD.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bn-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bo-CN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bo.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.br-FR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.br.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs-Cyrl-BA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs-Cyrl.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs-Latn-BA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs-Latn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ca-ES.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ca.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.co-FR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.co.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.cs-CZ.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.cs.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.cy-GB.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.cy.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.da-DK.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.da.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-AT.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-CH.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-DE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-LI.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-LU.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.dsb-DE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.dsb.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.dv-MV.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.dv.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.el-GR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.el.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-029.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-AU.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-BZ.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-CA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-GB.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-IE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-JM.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-MY.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-NZ.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-PH.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-SG.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-TT.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-US.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-ZA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-ZW.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-AR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-BO.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-CL.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-CO.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-CR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-DO.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-EC.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-ES.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-GT.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-HN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-MX.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-NI.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-PA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-PE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-PR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-PY.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-SV.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-US.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-UY.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-VE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.et-EE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.et.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.eu-ES.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.eu.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fa-IR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fa.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fi-FI.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fi.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fil-PH.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fil.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fo-FO.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fo.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-BE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-CA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-CH.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-FR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-LU.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-MC.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fy-NL.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fy.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ga-IE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ga.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gd-GB.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gd.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gl-ES.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gl.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gsw-FR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gsw.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gu-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gu.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ha-Latn-NG.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ha-Latn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ha.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.he-IL.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.he.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hi-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hi.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hr-BA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hr-HR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hr.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hsb-DE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hsb.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hu-HU.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hu.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hy-AM.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hy.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.id-ID.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.id.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ig-NG.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ig.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ii-CN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ii.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.is-IS.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.is.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.it-CH.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.it-IT.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.it.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu-Cans-CA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu-Cans.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu-Latn-CA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu-Latn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ja-JP.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ja.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ka-GE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ka.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kk-KZ.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kk.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kl-GL.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kl.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.km-KH.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.km.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kn-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ko-KR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ko.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kok-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kok.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ky-KG.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ky.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lb-LU.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lb.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lo-LA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lo.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lt-LT.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lt.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lv-LV.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lv.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mi-NZ.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mi.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mk-MK.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mk.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ml-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ml.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn-Cyrl.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn-MN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn-Mong-CN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn-Mong.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.moh-CA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.moh.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mr-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mr.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ms-BN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ms-MY.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ms.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mt-MT.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mt.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nb-NO.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nb.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ne-NP.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ne.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nl-BE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nl-NL.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nl.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nn-NO.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.no.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nso-ZA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nso.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.oc-FR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.oc.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.or-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.or.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pa-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pa.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pl-PL.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pl.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.prs-AF.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.prs.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ps-AF.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ps.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pt-BR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pt-PT.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pt.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.qut-GT.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.qut.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.quz-BO.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.quz-EC.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.quz-PE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.quz.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.rm-CH.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.rm.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ro-RO.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ro.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ru-RU.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ru.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.rw-RW.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.rw.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sa-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sa.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sah-RU.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sah.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.se-FI.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.se-NO.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.se-SE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.se.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.si-LK.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.si.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sk-SK.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sk.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sl-SI.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sl.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sma-NO.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sma-SE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sma.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smj-NO.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smj-SE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smj.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smn-FI.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sms-FI.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sms.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sq-AL.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sq.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl-BA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl-CS.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl-ME.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl-RS.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn-BA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn-CS.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn-ME.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn-RS.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sv-FI.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sv-SE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sv.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sw-KE.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sw.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.syr-SY.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.syr.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ta-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ta.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.te-IN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.te.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tg-Cyrl-TJ.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tg-Cyrl.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tg.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.th-TH.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.th.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tk-TM.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tk.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tn-ZA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tr-TR.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tr.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tt-RU.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tt.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tzm-Latn-DZ.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tzm-Latn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tzm.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ug-CN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ug.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uk-UA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uk.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ur-PK.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ur.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz-Cyrl-UZ.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz-Cyrl.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz-Latn-UZ.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz-Latn.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.vi-VN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.vi.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.wo-SN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.wo.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.xh-ZA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.xh.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.yo-NG.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.yo.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-CHS.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-CHT.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-CN.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-HK.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-Hans.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-Hant.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-MO.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-SG.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-TW.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zu-ZA.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zu.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.cultures.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/jquery.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/jquery.min.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.min.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.min.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/default/tizen-web-ui-fw-theme.css [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/default/tizen-web-ui-fw-theme.min.css [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_multimedia.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_picture.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_text.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_unnamed.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_delete.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_dim.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_fullscreen_off.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_fullscreen_on.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_off.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_on.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_pause.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_play.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_radio.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_radio_select.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_check_bg.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_check_bg_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_check_checking.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_contacts_button_header.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_contacts_button_header_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_icon_cancel.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_icon_cancel_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_list_process_01.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_messagebubble_bg_receive.9.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_messagebubble_bg_sent.9.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_messagebubble_date_bg.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_page_indicator_01.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_page_indicator_02.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_progress_bar.9.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_progress_bg.9.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_scroll_bar_handler.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_scroll_bar_handler_hor.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/ajax-loader.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_field_btn_clear.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_field_btn_clear_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_icon_favorite_off.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_icon_favorite_on.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_search_icon.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_01.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_01_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_02.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_02_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_01.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_01_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_02.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_02_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_handle.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_handle_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_popup_bg.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_back.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_back_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_call.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_call_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_check.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_check_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_cancel.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_cancel_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_closed.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_closed_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_minus.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_minus_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_opened.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_opened_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_send.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_send_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_gear.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_gear_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_grid.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_grid_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_home.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_home_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_info.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_info_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_left.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_left_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_plus.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_plus_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_refresh.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_refresh_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_rename.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_rename_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_right.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_right_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_search.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_search_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_star.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_star_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_warning.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_warning_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump_left.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump_left_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_Back.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_Back_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_edit.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_edit_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_more.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_more_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_plus.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_plus_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_toolbar_button_bg.9.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_toolbar_button_bg.9_press.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_toolbar_button_ef.9.png [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/theme.js [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/tizen-web-ui-fw-theme.css [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/tizen-web-ui-fw-theme.min.css [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/META-INF/messages.properties [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/head.template [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/index.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/section1.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/section2.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-multipage/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-multipage/META-INF/messages.properties [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-multipage/head.template [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-multipage/index.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/META-INF/messages.properties [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/head.template [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/index.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/section1.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/section2.html [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-singlepage/META-INF/MANIFEST.MF [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-singlepage/META-INF/messages.properties [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-singlepage/head.template [new file with mode: 0644]
org.tizen.common.verrari/templates/cli/tizenwebuifw-singlepage/index.html [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/config/CONFIGBase [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/css/CSSBase [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/css/CSSDescription [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/css/CSSTizenBasicBlank [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLBase [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLDescription [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLJQMMasterDetailIndex [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLJQMMasterDetailSection1 [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLJQMMasterDetailSection2 [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLJQMMultiPage [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLJQMNavigationIndex [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLJQMNavigationSection1 [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLJQMNavigationSection2 [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLJQMSinglePage [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLTizenBasicBlank [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWMasterDetailIndex [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWMasterDetailSection1 [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWMasterDetailSection2 [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWMultiPage [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWNavigationIndex [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWNavigationSection1 [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWNavigationSection2 [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWSinglePage [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/js/JSBase [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/js/JSDescription [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/js/JSJQM [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/js/JSTizenBasicBlank [new file with mode: 0644]
org.tizen.common.verrari/templates/engine/js/JSTizenWebUIFW [new file with mode: 0644]
org.tizen.common.verrari/templates/jar/common-resources.jar [new file with mode: 0644]
org.tizen.common.verrari/templates/jar/jqm-common-resources.jar [new file with mode: 0644]
org.tizen.common.verrari/templates/jar/jqm-masterdetail.jar [new file with mode: 0644]
org.tizen.common.verrari/templates/jar/jqm-multipage.jar [new file with mode: 0644]
org.tizen.common.verrari/templates/jar/jqm-navigation.jar [new file with mode: 0644]
org.tizen.common.verrari/templates/jar/jqm-singlepage.jar [new file with mode: 0644]
org.tizen.common.verrari/templates/jar/tizen-basic.jar [new file with mode: 0644]
org.tizen.common.verrari/templates/jar/tizenwebuifw-common-resources.jar [new file with mode: 0644]
org.tizen.common.verrari/templates/jar/tizenwebuifw-masterdetail.jar [new file with mode: 0644]
org.tizen.common.verrari/templates/jar/tizenwebuifw-multipage.jar [new file with mode: 0644]
org.tizen.common.verrari/templates/jar/tizenwebuifw-navigation.jar [new file with mode: 0644]
org.tizen.common.verrari/templates/jar/tizenwebuifw-singlepage.jar [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/TemplateEngineFactoryTest.java [new file with mode: 0755]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateEngineTest.java [new file with mode: 0755]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateTransformerTest.java [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/config/CONFIGBase [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/config/FreemarkerTemplateEngineTest.java [new file with mode: 0755]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/css/CSSBase [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/css/CSSDescription [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/css/CSSTizenBasicBlank [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/css/FreemarkerTemplateEngineTest.java [new file with mode: 0755]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/description.ftl [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/FreemarkerTemplateEngineTest.java [new file with mode: 0755]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLBase [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLDescription [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMasterDetailIndex [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMasterDetailSection1 [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMasterDetailSection2 [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMultiPage [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMNavigationIndex [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMNavigationSection1 [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMNavigationSection2 [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMSinglePage [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenBasicBlank [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMasterDetailIndex [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMasterDetailSection1 [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMasterDetailSection2 [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMultiPage [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWNavigationIndex [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWNavigationSection1 [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWNavigationSection2 [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWSinglePage [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/FreemarkerTemplateEngineTest.java [new file with mode: 0755]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSBase [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSDescription [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSJQM [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSTizenBasicBlank [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSTizenWebUIFW [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/method/FreemarkerTemplateEngineMethodTest.java [new file with mode: 0755]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/method/TESTFile [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/test_html.ftl [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/test_html_body.ftl [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/jsoup/JsoupTemplateEngineTest.java [new file with mode: 0755]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/jsoup/TizenSingle.html [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/jsoup/genTizenSingle.html [new file with mode: 0755]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/FileTemplateTest.java [new file with mode: 0755]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/TemplateManagerTest.java [new file with mode: 0755]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/TemplateTransformerTest.java [new file with mode: 0644]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/config.xml [new file with mode: 0755]
org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/test_html.ftl [new file with mode: 0644]
org.tizen.common/.classpath [changed mode: 0644->0755]
org.tizen.common/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
org.tizen.common/32_TIZEN_SDK_icon.png [new file with mode: 0644]
org.tizen.common/META-INF/MANIFEST.MF [changed mode: 0644->0755]
org.tizen.common/OSGI-INF/l10n/bundle.properties
org.tizen.common/about.html
org.tizen.common/about.ini [new file with mode: 0644]
org.tizen.common/about.mappings [new file with mode: 0644]
org.tizen.common/about.properties [new file with mode: 0644]
org.tizen.common/about_files/freemarker-LICENSE.txt [new file with mode: 0644]
org.tizen.common/build.properties [changed mode: 0644->0755]
org.tizen.common/icons/back.gif [new file with mode: 0644]
org.tizen.common/icons/forward.gif [new file with mode: 0644]
org.tizen.common/icons/msg_close_hover.png [new file with mode: 0644]
org.tizen.common/icons/msg_close_normal.png [new file with mode: 0644]
org.tizen.common/icons/msg_close_push.png [new file with mode: 0644]
org.tizen.common/lib/ant.jar [new file with mode: 0644]
org.tizen.common/lib/commons-collections-3.2.1.jar [new file with mode: 0644]
org.tizen.common/lib/commons-io-2.4.jar [new file with mode: 0644]
org.tizen.common/lib/commons-lang3-3.1.jar [new file with mode: 0644]
org.tizen.common/lib/commons-logging-1.1.1.jar [new file with mode: 0644]
org.tizen.common/lib/commons-pool-1.6.jar [new file with mode: 0644]
org.tizen.common/lib/freemarker.jar [new file with mode: 0644]
org.tizen.common/lib/log4j-1.2.17.jar [new file with mode: 0644]
org.tizen.common/lib/slf4j-api-1.6.4.jar [new file with mode: 0644]
org.tizen.common/lib/slf4j-log4j12-1.6.4.jar [new file with mode: 0644]
org.tizen.common/plugin.xml
org.tizen.common/schema/org.tizen.common.crashreporter.exsd [new file with mode: 0644]
org.tizen.common/schema/org.tizen.common.prompter.exsd [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/Adaptable.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/AdaptableWithArgument.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/AppIdGenerator.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/Cabinet.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/CommonPlugin.java [changed mode: 0644->0755]
org.tizen.common/src/org/tizen/common/Factory.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/FactoryWithArgument.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/IApplicationConfiguration.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/Surrogate.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/SurrogateWithArgument.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/TizenHelpContextIds.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/TizenPlatformConstants.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/TizenProjectType.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/classloader/AbstractClassSource.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/classloader/ClassSource.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/classloader/CompositeClassSource.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/classloader/CustomClassLoader.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/classloader/DirectoryClassSource.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/classloader/JarClassSource.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/config/ExpressionParser.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/config/Loader.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/config/Preference.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/config/PreferenceProvider.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/config/loader/AbstractLoader.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/config/loader/ResourceSource.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/config/loader/Source.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/config/loader/URLSource.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/config/provider/EnvironmentProvider.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/config/provider/PropertiesProvider.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/config/provider/SystemPropertiesProvider.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/application/InstallPathConfig.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/application/Messages.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/application/Messages.properties [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/application/StatusLineMessageManager.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/application/UpdateManager.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/AbstractCommand.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/Command.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/CommandCancelException.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/CompositeCommand.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/EclipseExecutor.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/ExecutionContext.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/Executor.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/InputValidator.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/Policy.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/PolicyRegistryFactory.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/Prompter.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/PrompterConstants.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/UntrackedException.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/UserField.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/file/DirectoryCopyHandlingCommand.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/file/FileHandlingCommand.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/file/WriteFileCommand.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/policy/AbstractMessagePolicy.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/policy/AbstractPolicy.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/policy/FilePolicy.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/policy/MessagePolicy.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/policy/OptionPolicy.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/policy/PolicyRegistry.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/policy/SimplePolicy.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/policy/UncaughtExceptionHandlingPolicy.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/prompter/AbstractOption.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/prompter/AbstractPrompter.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/prompter/ChoiceOption.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/prompter/EclipsePrompter.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/prompter/GenericOption.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/prompter/NopPrompter.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/prompter/Option.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/prompter/RunableOption.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/prompter/SWTPrompter.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/sdb/DevicesSdbCommand.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/sdb/DlogSdbCommand.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/sdb/ForwardSdbCommand.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/sdb/PullSdbCommand.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/sdb/PushSdbCommand.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/sdb/SdbDevicesHandlingCommand.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/sdb/SdbHandlingCommand.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/sdb/ShellSdbCommand.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/core/command/sdb/SmartDevelopmentBridgeManager.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/zip/JarCommand.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/core/command/zip/ZipCommand.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/daemon/AbstractServer.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/daemon/Server.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/daemon/ServerState.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/file/AbstractFileHandler.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/file/ClasspathFileHandler.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/file/EclipseFileHandler.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/file/FileHandler.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/file/Filter.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/file/PatternFilter.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/file/SimpleFileFilter.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/file/StandardFileHandler.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/file/VirtualFileHandler.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/file/filter/WildCardFilter.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/file/filter/WildCardFilterFactory.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/rds/DeltaResourceInfo.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/rds/RdsDeltaDetector.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/rds/RdsDeployer.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/rds/RdsMessages.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/rds/RdsMessages.properties [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/rds/ui/preference/DialogField.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/rds/ui/preference/IDialogFieldListener.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/rds/ui/preference/LayoutUtil.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/rds/ui/preference/ProjectSelectionDialog.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/rds/ui/preference/PropertyAndPreferencePage.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/rds/ui/preference/RdsPreferencePage.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/rds/ui/preference/SelectionButtonDialogField.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/rds/ui/preference/StatusInfo.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/rds/ui/preference/StatusUtil.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/CommonColor.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/TableToolTipListener.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/dialog/ClosableTray.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/dialog/DynamicDialog.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/dialog/PasswordInputDialog.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/page/preference/Messages.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/page/preference/Messages.properties [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/page/preference/PreferenceMessages.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/page/preference/PreferenceMessages.properties [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/page/preference/TizenBasePreferencePage.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/page/properties/TizenProperties.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/page/wizard/TrayWizardPage.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/view/console/AnsicodeAdapter.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/ui/view/console/ConsoleManager.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/ui/view/console/ConsoleManager2.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/ui/view/console/ConsoleProcessClosure.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/view/console/HyperlinkManager.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/view/console/IConsolePrinter.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/view/console/IHyperlinkManager.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/view/console/LinkInfo.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/view/console/MessageConsoleSpy.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/view/console/TextStyle.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/ui/widget/PictureLabel.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/ArrayUtil.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/Assert.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/BrowserWrapper.java
org.tizen.common/src/org/tizen/common/util/CipherUtil.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/CollectionMap.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/CollectionUtil.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/ControlFileConfig.java
org.tizen.common/src/org/tizen/common/util/DialogUtil.java
org.tizen.common/src/org/tizen/common/util/EFSUtil.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/FileUtil.java [changed mode: 0644->0755]
org.tizen.common/src/org/tizen/common/util/FilenameUtil.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/FilterIterator.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/FreeMarkerUtil.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/HelpBrowser.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/HostUtil.java [changed mode: 0644->0755]
org.tizen.common/src/org/tizen/common/util/IOUtil.java [changed mode: 0644->0755]
org.tizen.common/src/org/tizen/common/util/ISdbCommandHelper.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/ImageUtil.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/IteratingAcceptor.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/IteratingAdapter.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/IteratingRunner.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/IteratingUtil.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/LocalPortChecker.java
org.tizen.common/src/org/tizen/common/util/MapUtil.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/NotificationType.java
org.tizen.common/src/org/tizen/common/util/NotifierDialog.java
org.tizen.common/src/org/tizen/common/util/OSChecker.java
org.tizen.common/src/org/tizen/common/util/ObjectUtil.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/OpenBrowserUtil.java [changed mode: 0644->0755]
org.tizen.common/src/org/tizen/common/util/ParsingUtil.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/PluginUtil.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/PreferenceLinkMessageDialog.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/ProjectUtil.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/PropertyUtil.java [changed mode: 0644->0755]
org.tizen.common/src/org/tizen/common/util/ReflectionUtil.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/SWTRunner.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/SWTUtil.java [changed mode: 0644->0755]
org.tizen.common/src/org/tizen/common/util/SdbCommandUtil.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/StreamGobbler.java [changed mode: 0644->0755]
org.tizen.common/src/org/tizen/common/util/StringUtil.java [changed mode: 0644->0755]
org.tizen.common/src/org/tizen/common/util/ThreadUtil.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/ValidationUtil.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/ViewUtil.java
org.tizen.common/src/org/tizen/common/util/ZipUtil.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/cache/ColorCache.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/cache/FontCache.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/cache/ImageCache.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/cache/NamedColorCache.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/io/Buffer.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/io/BufferInputStream.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/io/BufferOutputStream.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/io/BufferPool.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/log/Logger.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/log/TizenLog4Configurator.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/log/TizenLog4jAppender.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/url/classpath/Connection.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/url/classpath/Handler.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/url/cp/Connection.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/url/cp/Handler.java [new file with mode: 0644]
org.tizen.common/src/org/tizen/common/util/url/vf/Connection.java [new file with mode: 0755]
org.tizen.common/src/org/tizen/common/util/url/vf/Handler.java [new file with mode: 0644]
org.tizen.common/test/lib/asm-4.0.jar [new file with mode: 0644]
org.tizen.common/test/lib/asm-tree-4.0.jar [new file with mode: 0644]
org.tizen.common/test/lib/javassist-3.16.1-GA.jar [new file with mode: 0755]
org.tizen.common/test/lib/junit-4.10-src.jar [new file with mode: 0644]
org.tizen.common/test/lib/junit-4.10.jar [new file with mode: 0644]
org.tizen.common/test/lib/mockito-all-1.9.0.jar [new file with mode: 0644]
org.tizen.common/test/lib/powermock-mockito-1.4.12-full.jar [new file with mode: 0755]
org.tizen.common/test/src/log4j.xml [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/AppIdGeneratorTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/CommonPluginTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/FrequentlyUsedMatcher.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/Location.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/TestAgent.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/Transformer.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/UnsafeClassLoader.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/UnsafeRunner.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/config/ExpressionParserTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/config/PreferenceTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/config/test.properties [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/core/application/MessagesTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/application/StatusLineMessageManagerTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/command/CommandTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/core/command/CompositeCommandTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/command/ExecutionContextTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/command/file/FileHandlingCommandTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/command/policy/PolicyRegistryTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/command/prompter/GenericOptionTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/command/prompter/OptionTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/command/prompter/SWTPrompterTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/command/sdb/DevicesSdbCommandTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/command/sdb/DlogSdbCommandTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/command/sdb/ForwardSdbCommandTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/command/sdb/PullSdbCommandTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/core/command/sdb/PushSdbCommandTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/command/sdb/ShellSdbCommandTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/core/command/zip/JarCommandTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/core/command/zip/ZipCommandTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/daemon/AbstractServerTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/file/SimpleFileFilterTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/file/StandardFileHandlerTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/file/VirtualFileHandlerTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/file/filter/WildCardFilterFactoryTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/file/filter/WildCardFilterTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/ui/page/preference/MessagesTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/ui/page/wizard/TrayWizardPageTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/ArrayUtilTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/util/AssertTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/CipherUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/CollectionMapTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/CollectionUtilTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/util/EFSUtilTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/util/FileUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/FilenameUtilTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/util/FilterIteratorTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/FreeMarkerUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/HostUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/IOUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/ImageUtilTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/util/ImageUtilTest.png [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/LocalPortCheckerTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/MapUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/MockRunner.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/ObjectUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/ParsingUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/PluginUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/SWTUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/StringUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/ThreadUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/ValidationUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/ZipUtilTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/io/BufferPoolTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/io/BufferTest.java [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/test [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/url/classpath/ConnectionTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/util/url/classpath/HandlerTest.java [new file with mode: 0755]
org.tizen.common/test/src/org/tizen/common/util/url/classpath/a.txt [new file with mode: 0644]
org.tizen.common/test/src/org/tizen/common/util/url/cp/HandlerTest.java [new file with mode: 0755]
org.tizen.common/test/test_files/about_files/LICENSE-2.0.htm [new file with mode: 0644]
org.tizen.common/test/test_files/about_files/freemarker-LICENSE.txt [new file with mode: 0644]
org.tizen.common/test/test_files/resource/about_files/LICENSE-2.0.htm [new file with mode: 0644]
org.tizen.common/test/test_files/resource/about_files/freemarker-LICENSE.txt [new file with mode: 0644]
org.tizen.common/test/test_files/resource/resource/text.txt [new file with mode: 0644]
org.tizen.common/test/test_files/resource/test.zip [new file with mode: 0644]
org.tizen.common/test/test_files/resource/text.txt [new file with mode: 0644]
package/addingFiles/tools/ide/lib/org.apache.commons.logging_1.1.1.v201101211721.jar [new file with mode: 0644]
package/build.linux
package/changelog [new file with mode: 0644]
package/pkginfo.manifest

diff --git a/AUTHORS b/AUTHORS
index a2e37ef..48a034c 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,7 +1,12 @@
-Hoon Kang <h245.kang@samsung.com> 
 Namkoong Ho <ho.namkoong@samsung.com>
-Yongsung Kim <yongsung1.kim@samsung.com>
-Joogwan Kim <joogwan.kim@samsung.com>
 YoonKi Park <yoonki.park@samsung.com>
-Hyunsik.noh <hyunsik.noh@samsung.com>
+Hyunsik Noh <hyunsik.noh@samsung.com>
+Gun Kim <gune.kim@samsung.com>
+Taeyoung Son <taeyoung2.son@samsung.com>
+Changhyun Lee <changhyun1.lee@samsung.com>
+Jihoon Song <jihoon80.song@samsung.com>
+Gyeongseok Seo <gyeongseok.seo@samsung.com>
+BonYong Lee <bonyong.lee@samsung.com>
+Hyeongseok Heo <hyeongseok.heo@samsung.com>
+Kangho Kim <kh5325.kim@samsung.com>
 HyunGoo Kang <hyungoo1.kang@samsung.com>
diff --git a/LICENSE.APLv2 b/LICENSE.APLv2
new file mode 100644 (file)
index 0000000..5554685
--- /dev/null
@@ -0,0 +1,204 @@
+                                 Apache License\r
+                           Version 2.0, January 2004\r
+                        http://www.apache.org/licenses/\r
+\r
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
+\r
+   1. Definitions.\r
+\r
+      "License" shall mean the terms and conditions for use, reproduction,\r
+      and distribution as defined by Sections 1 through 9 of this document.\r
+\r
+      "Licensor" shall mean the copyright owner or entity authorized by\r
+      the copyright owner that is granting the License.\r
+\r
+      "Legal Entity" shall mean the union of the acting entity and all\r
+      other entities that control, are controlled by, or are under common\r
+      control with that entity. For the purposes of this definition,\r
+      "control" means (i) the power, direct or indirect, to cause the\r
+      direction or management of such entity, whether by contract or\r
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the\r
+      outstanding shares, or (iii) beneficial ownership of such entity.\r
+\r
+      "You" (or "Your") shall mean an individual or Legal Entity\r
+      exercising permissions granted by this License.\r
+\r
+      "Source" form shall mean the preferred form for making modifications,\r
+      including but not limited to software source code, documentation\r
+      source, and configuration files.\r
+\r
+      "Object" form shall mean any form resulting from mechanical\r
+      transformation or translation of a Source form, including but\r
+      not limited to compiled object code, generated documentation,\r
+      and conversions to other media types.\r
+\r
+      "Work" shall mean the work of authorship, whether in Source or\r
+      Object form, made available under the License, as indicated by a\r
+      copyright notice that is included in or attached to the work\r
+      (an example is provided in the Appendix below).\r
+\r
+      "Derivative Works" shall mean any work, whether in Source or Object\r
+      form, that is based on (or derived from) the Work and for which the\r
+      editorial revisions, annotations, elaborations, or other modifications\r
+      represent, as a whole, an original work of authorship. For the purposes\r
+      of this License, Derivative Works shall not include works that remain\r
+      separable from, or merely link (or bind by name) to the interfaces of,\r
+      the Work and Derivative Works thereof.\r
+\r
+      "Contribution" shall mean any work of authorship, including\r
+      the original version of the Work and any modifications or additions\r
+      to that Work or Derivative Works thereof, that is intentionally\r
+      submitted to Licensor for inclusion in the Work by the copyright owner\r
+      or by an individual or Legal Entity authorized to submit on behalf of\r
+      the copyright owner. For the purposes of this definition, "submitted"\r
+      means any form of electronic, verbal, or written communication sent\r
+      to the Licensor or its representatives, including but not limited to\r
+      communication on electronic mailing lists, source code control systems,\r
+      and issue tracking systems that are managed by, or on behalf of, the\r
+      Licensor for the purpose of discussing and improving the Work, but\r
+      excluding communication that is conspicuously marked or otherwise\r
+      designated in writing by the copyright owner as "Not a Contribution."\r
+\r
+      "Contributor" shall mean Licensor and any individual or Legal Entity\r
+      on behalf of whom a Contribution has been received by Licensor and\r
+      subsequently incorporated within the Work.\r
+\r
+   2. Grant of Copyright License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      copyright license to reproduce, prepare Derivative Works of,\r
+      publicly display, publicly perform, sublicense, and distribute the\r
+      Work and such Derivative Works in Source or Object form.\r
+\r
+   3. Grant of Patent License. Subject to the terms and conditions of\r
+      this License, each Contributor hereby grants to You a perpetual,\r
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
+      (except as stated in this section) patent license to make, have made,\r
+      use, offer to sell, sell, import, and otherwise transfer the Work,\r
+      where such license applies only to those patent claims licensable\r
+      by such Contributor that are necessarily infringed by their\r
+      Contribution(s) alone or by combination of their Contribution(s)\r
+      with the Work to which such Contribution(s) was submitted. If You\r
+      institute patent litigation against any entity (including a\r
+      cross-claim or counterclaim in a lawsuit) alleging that the Work\r
+      or a Contribution incorporated within the Work constitutes direct\r
+      or contributory patent infringement, then any patent licenses\r
+      granted to You under this License for that Work shall terminate\r
+      as of the date such litigation is filed.\r
+\r
+   4. Redistribution. You may reproduce and distribute copies of the\r
+      Work or Derivative Works thereof in any medium, with or without\r
+      modifications, and in Source or Object form, provided that You\r
+      meet the following conditions:\r
+\r
+      (a) You must give any other recipients of the Work or\r
+          Derivative Works a copy of this License; and\r
+\r
+      (b) You must cause any modified files to carry prominent notices\r
+          stating that You changed the files; and\r
+\r
+      (c) You must retain, in the Source form of any Derivative Works\r
+          that You distribute, all copyright, patent, trademark, and\r
+          attribution notices from the Source form of the Work,\r
+          excluding those notices that do not pertain to any part of\r
+          the Derivative Works; and\r
+\r
+      (d) If the Work includes a "NOTICE" text file as part of its\r
+          distribution, then any Derivative Works that You distribute must\r
+          include a readable copy of the attribution notices contained\r
+          within such NOTICE file, excluding those notices that do not\r
+          pertain to any part of the Derivative Works, in at least one\r
+          of the following places: within a NOTICE text file distributed\r
+          as part of the Derivative Works; within the Source form or\r
+          documentation, if provided along with the Derivative Works; or,\r
+          within a display generated by the Derivative Works, if and\r
+          wherever such third-party notices normally appear. The contents\r
+          of the NOTICE file are for informational purposes only and\r
+          do not modify the License. You may add Your own attribution\r
+          notices within Derivative Works that You distribute, alongside\r
+          or as an addendum to the NOTICE text from the Work, provided\r
+          that such additional attribution notices cannot be construed\r
+          as modifying the License.\r
+\r
+      You may add Your own copyright statement to Your modifications and\r
+      may provide additional or different license terms and conditions\r
+      for use, reproduction, or distribution of Your modifications, or\r
+      for any such Derivative Works as a whole, provided Your use,\r
+      reproduction, and distribution of the Work otherwise complies with\r
+      the conditions stated in this License.\r
+\r
+   5. Submission of Contributions. Unless You explicitly state otherwise,\r
+      any Contribution intentionally submitted for inclusion in the Work\r
+      by You to the Licensor shall be under the terms and conditions of\r
+      this License, without any additional terms or conditions.\r
+      Notwithstanding the above, nothing herein shall supersede or modify\r
+      the terms of any separate license agreement you may have executed\r
+      with Licensor regarding such Contributions.\r
+\r
+   6. Trademarks. This License does not grant permission to use the trade\r
+      names, trademarks, service marks, or product names of the Licensor,\r
+      except as required for reasonable and customary use in describing the\r
+      origin of the Work and reproducing the content of the NOTICE file.\r
+\r
+   7. Disclaimer of Warranty. Unless required by applicable law or\r
+      agreed to in writing, Licensor provides the Work (and each\r
+      Contributor provides its Contributions) on an "AS IS" BASIS,\r
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r
+      implied, including, without limitation, any warranties or conditions\r
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r
+      PARTICULAR PURPOSE. You are solely responsible for determining the\r
+      appropriateness of using or redistributing the Work and assume any\r
+      risks associated with Your exercise of permissions under this License.\r
+\r
+   8. Limitation of Liability. In no event and under no legal theory,\r
+      whether in tort (including negligence), contract, or otherwise,\r
+      unless required by applicable law (such as deliberate and grossly\r
+      negligent acts) or agreed to in writing, shall any Contributor be\r
+      liable to You for damages, including any direct, indirect, special,\r
+      incidental, or consequential damages of any character arising as a\r
+      result of this License or out of the use or inability to use the\r
+      Work (including but not limited to damages for loss of goodwill,\r
+      work stoppage, computer failure or malfunction, or any and all\r
+      other commercial damages or losses), even if such Contributor\r
+      has been advised of the possibility of such damages.\r
+\r
+   9. Accepting Warranty or Additional Liability. While redistributing\r
+      the Work or Derivative Works thereof, You may choose to offer,\r
+      and charge a fee for, acceptance of support, warranty, indemnity,\r
+      or other liability obligations and/or rights consistent with this\r
+      License. However, in accepting such obligations, You may act only\r
+      on Your own behalf and on Your sole responsibility, not on behalf\r
+      of any other Contributor, and only if You agree to indemnify,\r
+      defend, and hold each Contributor harmless for any liability\r
+      incurred by, or claims asserted against, such Contributor by reason\r
+      of your accepting any such warranty or additional liability.\r
+\r
+   END OF TERMS AND CONDITIONS\r
+\r
+   APPENDIX: How to apply the Apache License to your work.\r
+\r
+      To apply the Apache License to your work, attach the following\r
+      boilerplate notice, with the fields enclosed by brackets "[]"\r
+      replaced with your own identifying information. (Don't include\r
+      the brackets!)  The text should be enclosed in the appropriate\r
+      comment syntax for the file format. We also recommend that a\r
+      file or class name and description of purpose be included on the\r
+      same "printed page" as the copyright notice for easier\r
+      identification within third-party archives.\r
+\r
+   Copyright [yyyy] [name of copyright owner]\r
+\r
+   Licensed under the Apache License, Version 2.0 (the "License");\r
+   you may not use this file except in compliance with the License.\r
+   You may obtain a copy of the License at\r
+\r
+       http://www.apache.org/licenses/LICENSE-2.0\r
+\r
+   Unless required by applicable law or agreed to in writing, software\r
+   distributed under the License is distributed on an "AS IS" BASIS,\r
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+   See the License for the specific language governing permissions and\r
+   limitations under the License.\r
+\r
+\r
+\r
diff --git a/NOTICE b/NOTICE
index 4297ee3..9c8e783 100644 (file)
--- a/NOTICE
+++ b/NOTICE
@@ -1 +1,3 @@
-Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Apache License, Version 2.
+Please, see the LICENSE.APLv2 file for Apache License terms and conditions.
\ No newline at end of file
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..a1d8569
--- /dev/null
+++ b/README
@@ -0,0 +1,10 @@
+BUILD OVERVIEW
+==============
+Currently you can build some components of SDK and apply to installed SDK
+directory(a.k.a tizen-sdk).
+
+The procedure is as follows:
+
+1. Git clone "sdk-build.git".
+2. Open "sdk-build/tizen-ide" folder.
+3. You can find "README" file in "sdk-build/tizen-ide" folder. Just follow guideline in "README" file.
index c4e0d39..71ab8a0 100644 (file)
@@ -1,17 +1,19 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-Name: Tizen Common Connection
+Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.tizen.common.connection;singleton:=true
-Bundle-Version: 1.17.0.qualifier
+Bundle-Version: 1.0.0.qualifier
 Bundle-Activator: org.tizen.common.connection.ConnectionPlugin
-Bundle-Vendor: Samsung
+Bundle-Vendor: %Bundle-Vendor
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
- org.eclipse.core.resources;bundle-version="3.6.1",
+ org.eclipse.core.resources,
  org.tizen.common
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-ActivationPolicy: lazy
-Import-Package: org.tizen.common.util
+Import-Package: org.eclipse.ui.console,
+ org.tizen.common.util,
+ org.tizen.sdblib
 Bundle-ClassPath: .
 Export-Package: org.tizen.common.connection;
   uses:="org.eclipse.jface.resource,
diff --git a/org.tizen.common.connection/OSGI-INF/l10n/bundle.properties b/org.tizen.common.connection/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..1f6ae0f
--- /dev/null
@@ -0,0 +1,31 @@
+Bundle-Name = Tizen Common Connection
+Bundle-Vendor = The Linux Foundation
+
+view.category = Tizen
+view.connectionExplorer = Connection Explorer
+view.log = Log
+
+properties.page.info = Info
+properties.page.permission = Permission
+
+tools.name = Tools
+connectionexplorer.name = Connection Explorer
+log.name = Log
+
+command.category = Connection Explorer
+command.delete.name = Delete
+command.delete.description = Delete a file or folder on the connected target
+command.rename.name = Rename
+command.rename.description = Rename a file or folder on the connected target
+command.refresh.name = Refresh
+command.refresh.description = Referesh contents of the connected target
+command.property.name = Properties
+command.property.description = View properties for a selected file or folder
+
+context.delete.name = Delete
+context.rename.name = Rename
+context.refresh.name = Refresh
+context.properties.name = Properties
+
+extension.name = Connection Resource Drop
+extension-point.name = tools
\ No newline at end of file
index 414cf4b..aacdb9f 100644 (file)
@@ -5,6 +5,9 @@ bin.includes = META-INF/,\
                plugin.xml,\
                icons/,\
                about.html,\
-               about_files/
+               about_files/,\
+               OSGI-INF/,\
+               OSGI-INF/l10n/bundle.properties,\
+               schema/
 jars.compile.order = .,\
                      sdblib.jar
diff --git a/org.tizen.common.connection/icons/16_TIZEN_SDK_icon.png b/org.tizen.common.connection/icons/16_TIZEN_SDK_icon.png
new file mode 100644 (file)
index 0000000..1b75de1
Binary files /dev/null and b/org.tizen.common.connection/icons/16_TIZEN_SDK_icon.png differ
diff --git a/org.tizen.common.connection/icons/connection_explorer.gif b/org.tizen.common.connection/icons/connection_explorer.gif
new file mode 100644 (file)
index 0000000..111e3f9
Binary files /dev/null and b/org.tizen.common.connection/icons/connection_explorer.gif differ
diff --git a/org.tizen.common.connection/icons/emulator_manager.gif b/org.tizen.common.connection/icons/emulator_manager.gif
new file mode 100644 (file)
index 0000000..8737c07
Binary files /dev/null and b/org.tizen.common.connection/icons/emulator_manager.gif differ
diff --git a/org.tizen.common.connection/icons/log/add_tab.png b/org.tizen.common.connection/icons/log/add_tab.png
new file mode 100644 (file)
index 0000000..b07109b
Binary files /dev/null and b/org.tizen.common.connection/icons/log/add_tab.png differ
diff --git a/org.tizen.common.connection/icons/log/clear_log.png b/org.tizen.common.connection/icons/log/clear_log.png
new file mode 100644 (file)
index 0000000..4f542ad
Binary files /dev/null and b/org.tizen.common.connection/icons/log/clear_log.png differ
diff --git a/org.tizen.common.connection/icons/log/edit_tab.png b/org.tizen.common.connection/icons/log/edit_tab.png
new file mode 100644 (file)
index 0000000..d13ab48
Binary files /dev/null and b/org.tizen.common.connection/icons/log/edit_tab.png differ
diff --git a/org.tizen.common.connection/icons/log/export_log.png b/org.tizen.common.connection/icons/log/export_log.png
new file mode 100644 (file)
index 0000000..ee3f1e8
Binary files /dev/null and b/org.tizen.common.connection/icons/log/export_log.png differ
diff --git a/org.tizen.common.connection/icons/log/f.png b/org.tizen.common.connection/icons/log/f.png
new file mode 100644 (file)
index 0000000..9256714
Binary files /dev/null and b/org.tizen.common.connection/icons/log/f.png differ
index 1ff78a3..c8d05c0 100644 (file)
Binary files a/org.tizen.common.connection/icons/log/i.png and b/org.tizen.common.connection/icons/log/i.png differ
diff --git a/org.tizen.common.connection/icons/log/logview.gif b/org.tizen.common.connection/icons/log/logview.gif
new file mode 100644 (file)
index 0000000..9007253
Binary files /dev/null and b/org.tizen.common.connection/icons/log/logview.gif differ
diff --git a/org.tizen.common.connection/icons/log/remove_tab.png b/org.tizen.common.connection/icons/log/remove_tab.png
new file mode 100644 (file)
index 0000000..6788fc8
Binary files /dev/null and b/org.tizen.common.connection/icons/log/remove_tab.png differ
diff --git a/org.tizen.common.connection/icons/log/scroll_lock.png b/org.tizen.common.connection/icons/log/scroll_lock.png
new file mode 100644 (file)
index 0000000..41078de
Binary files /dev/null and b/org.tizen.common.connection/icons/log/scroll_lock.png differ
index 89e284e..9477616 100644 (file)
@@ -1,25 +1,67 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.4"?>
 <plugin>
-   <extension-point id="org.tizen.common.connection.tools" name="tools" schema="schema/tools.exsd"/>
-               <extension
-               point="org.eclipse.ui.views">
-               <category
-                       name="Tizen"
-                       id="org.tizen.nativeapp.viewCategory"/>
-       </extension>
+   <extension-point id="org.tizen.common.connection.tools" name="%extension-point.name" schema="schema/tools.exsd"/>
+        <extension
+        point="org.eclipse.ui.views">
+        <category
+            name="%view.category"
+            id="org.tizen.nativeapp.viewCategory"/>
+    </extension>
    <extension
          point="org.eclipse.ui.views">
       <view
             category="org.tizen.nativeapp.viewCategory"
             class="org.tizen.common.connection.ui.ConnectionExplorer"
-            icon="icons/Connection Explorer.gif"
+            icon="icons/connection_explorer.gif"
             id="org.tizen.common.connection.ui.ConnectionExplorer"
-            name="Connection Explorer"
+            name="%view.connectionExplorer"
             restorable="true">
       </view>
    </extension>
+   
+   <extension
+        point="org.eclipse.ui.preferencePages">
+        <page
+            class="org.tizen.common.connection.preference.TizenToolsPreferencePage"
+            id="org.tizen.common.connection.preferences.tizentools"
+            name="%tools.name"
+            category="org.tizen.common.preferences.tizencommon">
+        </page>
+    </extension>
+    
+    <extension
+        point="org.eclipse.ui.preferencePages">
+        <page
+            class="org.tizen.common.connection.preference.TizenConnectionExplorerPreferencePage"
+            id="org.tizen.common.connection.preferences.tizenconnectionexplorer"
+            name="%connectionexplorer.name"
+            category="org.tizen.common.connection.preferences.tizentools">
+        </page>
+    </extension>
+
+    <!--<extension
+        point="org.eclipse.ui.preferencePages">
+        <page
+            class="org.tizen.common.connection.preference.TizenLogPreferencePage"
+            id="org.tizen.common.connection.preferences.tizenlog"
+            name="%log.name"
+            category="org.tizen.common.connection.preferences.tizentools">
+        </page>
+   </extension>-->
+
+   <extension
+         point="org.eclipse.ui.views">
+      <view
+            name="%view.log"
+            icon="icons/log/logview.gif"
+            category="org.tizen.nativeapp.viewCategory"
+            class="org.tizen.common.connection.ui.LogView"
+            id="org.tizen.common.connection.ui.LogView"
+            allowMultiple = "true">
+      </view>
+   </extension>
+
    <extension
          point="org.eclipse.ui.perspectiveExtensions">
       <perspectiveExtension
          </viewShortcut>
       </perspectiveExtension> 
    </extension>
+      <extension
+         point="org.eclipse.ui.perspectiveExtensions">
+      <perspectiveExtension
+            targetID="org.tizen.nativeapp.perspective">
+         <view
+               id="org.tizen.common.connection.ui.LogView"
+               ratio="1"
+               relationship="stack"
+               relative="org.eclipse.ui.views.TaskList">
+         </view>
+         <viewShortcut
+               id="org.tizen.common.connection.ui.LogView">
+         </viewShortcut>
+      </perspectiveExtension>
+      <perspectiveExtension
+            targetID="org.eclipse.debug.ui.DebugPerspective">
+         <view
+               id="org.tizen.common.connection.ui.LogView"
+               ratio="1"
+               relationship="stack"
+               relative="org.eclipse.ui.views.TaskList">
+         </view>
+         <viewShortcut
+               id="org.tizen.common.connection.ui.LogView">
+         </viewShortcut>
+      </perspectiveExtension>
+   </extension>
    <extension
          id="org.tizen.common.connection.ui.filedrop"
-         name="Connection Resource Drop"
+         name="%extension.name"
          point="org.eclipse.ui.dropActions">
-               <action
-                                                       class="org.tizen.common.connection.sdblib.dnd.FileEntryDropAdapter"
-                                                       id="org.tizen.common.connection.filedrop">
-               </action>
-                                                                               
+         <action
+         class="org.tizen.common.connection.sdblib.dnd.FileEntryDropAdapter"
+         id="org.tizen.common.connection.filedrop">
+         </action>
    </extension>
    <extension
          point="org.eclipse.ui.propertyPages">
       <page
             class="org.tizen.common.connection.properties.ConnectionExplorerInfoPropertyPages"
             id="org.tizen.common.connection.properties.Info"
-            name="Info"
+            name="%properties.page.info"
             nameFilter="*"
             objectClass="org.tizen.sdblib.FileListingService$FileEntry">
       </page>
          <page
                class="org.tizen.common.connection.properties.ConnectionExplorerPermissionPropertyPages"
                id="org.tizen.common.connection.properties.Permission"
-               name="Permission"
+               name="%properties.page.permission"
                nameFilter="*"
                objectClass="org.tizen.sdblib.FileListingService$FileEntry">
       </page>
    </extension>
    <extension
          point="org.eclipse.ui.commands">
+      <category
+            id="org.tizen.common.connection.category"
+            name="%command.category">
+      </category>
       <command
+            categoryId="org.tizen.common.connection.category"
+            description="%command.delete.description"
             id="org.tizen.common.connection.delete"
-            name="deleteaction">
+            name="%command.delete.name">
       </command>
       <command
+            categoryId="org.tizen.common.connection.category"
+            description="%command.rename.description"
             id="org.tizen.common.connection.rename"
-            name="renameaction">
+            name="%command.rename.name">
       </command>
       <command
+            categoryId="org.tizen.common.connection.category"
+            description="%command.refresh.description"
             id="org.tizen.common.connection.refresh"
-            name="refreshaction">
+            name="%command.refresh.name">
       </command>
       <command
+            categoryId="org.tizen.common.connection.category"
+            description="%command.property.description"
             id="org.tizen.common.connection.property"
-            name="propertyaction">
+            name="%command.property.name">
       </command>
    </extension>
    <extension
          point="org.eclipse.ui.contexts">
       <context
             id="org.tizen.common.connection.delete.context"
-            name="delete"
+            name="%context.delete.name"
             parentId="org.eclipse.ui.contexts.window">
       </context>
       <context
             id="org.tizen.common.connection.rename.context"
-            name="rename"
+            name="%context.rename.name"
             parentId="org.eclipse.ui.contexts.window">
       </context>
       <context
             id="org.tizen.common.connection.refresh.context"
-            name="refresh"
+            name="%context.refresh.name"
             parentId="org.eclipse.ui.contexts.window">
       </context>
       <context
             id="org.tizen.common.connection.property.context"
-            name="property"
+            name="%context.properties.name"
             parentId="org.eclipse.ui.contexts.window">
       </context>
    </extension>
-   
-       <extension
-         point="org.eclipse.ui.views">
-      <view
-            name="Log"
-            icon="icons/log/Log View.gif"
-            category="org.tizen.nativeapp.viewCategory"
-            class="org.tizen.common.connection.ui.LogView"
-            id="org.tizen.common.connection.ui.LogView"
-            allowMultiple = "true">
-      </view>
-   </extension>
-   
-      <extension
-         point="org.eclipse.ui.perspectiveExtensions">
-      <perspectiveExtension
-            targetID="org.tizen.nativeapp.perspective">      
-         <view
-               id="org.tizen.common.connection.ui.LogView"
-               ratio="1"
-               relationship="stack"
-               relative="org.eclipse.ui.views.TaskList">
-         </view>
-         <viewShortcut
-               id="org.tizen.common.connection.ui.LogView">
-         </viewShortcut>
-      </perspectiveExtension> 
-   </extension>   
    </plugin>
old mode 100644 (file)
new mode 100755 (executable)
index dc5cbf6..549d377
@@ -1,50 +1,44 @@
 /*
-*  Common
-*
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-*
-* Contact: 
-* Hoon Kang <h245.kang@samsung.com>
-* Hyunsik Noh <hyunsik.noh@samsung.com>
-* 
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Hoon Kang <h245.kang@samsung.com>
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ 
  * Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-* Contributors:
-* - S-Core Co., Ltd
-*
-*/ 
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */ 
 
 
 package org.tizen.common.connection;
 
-import java.io.File;
 import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
 
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.RegistryFactory;
+import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
-import org.tizen.common.connection.debugtools.DebugTool;
-import org.tizen.common.properties.InstallPathConfig;
-
+import org.tizen.common.connection.preference.TizenConnectionExplorerPreferencePage;
+import org.tizen.common.connection.preference.TizenLogPreferencePage;
+import org.tizen.common.util.OSChecker;
+import org.tizen.common.util.log.Logger;
 import org.tizen.sdblib.FileListingService.FileEntry;
 import org.tizen.sdblib.IDevice;
-import org.tizen.sdblib.Log;
 import org.tizen.sdblib.SmartDevelopmentBridge;
 
 /**
@@ -52,23 +46,22 @@ import org.tizen.sdblib.SmartDevelopmentBridge;
  */
 public class ConnectionPlugin extends AbstractUIPlugin {
 
-       // The plug-in ID
-       public static final String PLUGIN_ID = "org.tizen.common.connection"; //$NON-NLS-1$
-       public static final String ID_LOGS_VIEW = "org.tizen.common.connection.ui.LogView"; //$NON-NLS-1$
-       public static final String ID_CONNECTION_VIEW = "org.tizen.common.connection.ui.ConnectionExplorer";
-       public static final String ID_DEBUGTOOLS_EXTENSION = "org.tizen.common.connection.tools"; //$NON-NLS-1$
-       
-       // The shared instance
-       private static ConnectionPlugin plugin;
-       
-       private IDevice currentDevice;
-       private final ArrayList<ISelectionListener> listeners = new ArrayList<ISelectionListener>();
-       
-       public int os;
-       public static final int LINUX = 0;
-       public static final int WINDOWS = 1;
-       
-        /**
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.tizen.common.connection"; //$NON-NLS-1$
+    public static final String ID_LOGS_VIEW = "org.tizen.common.connection.ui.LogView"; //$NON-NLS-1$
+    public static final String ID_CONNECTION_VIEW = "org.tizen.common.connection.ui.ConnectionExplorer";
+
+    // The shared instance
+    private static ConnectionPlugin plugin;
+
+    private IDevice currentDevice;
+    private final ArrayList<ISelectionListener> listeners = new ArrayList<ISelectionListener>();
+
+    public int os;
+    public static final int LINUX = 0;
+    public static final int WINDOWS = 1;
+
+    /**
      * Implements for FileEntry changed status.
      */
     public interface ISelectionListener {
@@ -79,143 +72,104 @@ public class ConnectionPlugin extends AbstractUIPlugin {
          */
         void selectionChanged(FileEntry selectedEntry);
     }
+
+    /**
+     * The constructor
+     */
+    public ConnectionPlugin() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+
+        super.start(context);
+        plugin = this;
+
+        if (OSChecker.isWindows())
+        {
+            this.os = WINDOWS;
+        }
+        else
+        {
+            this.os = LINUX;
+        }
+
+    }
     
-       /**
-        * The constructor
-        */
-       public ConnectionPlugin() {
-       }
-
-       /*
-        * (non-Javadoc)
-        * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
-        */
-       public void start(BundleContext context) throws Exception {
-       
-               super.start(context);
-               plugin = this;
-               
-               Properties properties = System.getProperties();
-               String value = properties.getProperty("os.name");
-               if (value.contains("Windows"))
-                       this.os = WINDOWS;
-               else
-                       this.os = LINUX;        
-               
-       }
-       
-       public static synchronized  List<DebugTool> getDebugTools(IDevice device) {
-       
-               List<DebugTool> toolLists = new ArrayList<DebugTool>();
-               
-               IExtensionRegistry x = RegistryFactory.getRegistry();
-               IConfigurationElement[] ces = x.getConfigurationElementsFor(ID_DEBUGTOOLS_EXTENSION);
-               
-               for (int i = 0; i < ces.length; ++i) {
-                       IConfigurationElement ce = ces[i];
-                       if (ce.getName().equals("tools")) { 
-                               String packagename = ce.getAttribute("packagename"); 
-                               if (packagename == null) 
-                                       continue;
-                               String sourcepath = ce.getAttribute("sourcepath");
-                               if (sourcepath == null) 
-                                       continue;
-                               String description = ce.getAttribute("description"); 
-                               
-                               Path sourcePath = new Path(InstallPathConfig.getSDKPath() + "/" + sourcepath);
-                               
-                               File packageList = new File(sourcePath.toOSString());
-                               for (File f : packageList.listFiles()) {
-                                       if (f.getName().startsWith(packagename)) {
-                                               String[] filename = f.getName().split("_");
-                                               if (filename.length != 3)
-                                                       continue;
-                                               String version = filename[1];           
-                                               String[] arch = filename[2].split("\\.");
-                                               if (arch.length != 2)
-                                                       continue;
-                                               String architecture = arch[0];  
-                                               
-                                               if (device.isEmulator()) {
-                                                       if (!architecture.equals("i386"))
-                                                               continue;
-                                               } else {
-                                                       if (!architecture.equals("armel"))
-                                                               continue;
-                                               }                                               
-                                               DebugTool dt = new DebugTool();
-                                               dt.setPackagename(packagename);
-                                               dt.setBinaryname(f.getName());
-                                               dt.setSourcepath(sourcepath);
-                                               dt.setDescription(description);
-                                               dt.setVersion(version);
-                                               dt.setArchitecture(architecture);
-                                               toolLists.add(dt);
-                                       }
-                               }
-                       }
-               }
-               return toolLists;
-       }
-       
-       /*
-        * (non-Javadoc)
-        * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
-        */
-       public void stop(BundleContext context) throws Exception {
-               plugin = null;
-               SmartDevelopmentBridge.disconnectBridge();
-               super.stop(context);
-       }
-
-       /**
-        * Returns the shared instance
-        *
-        * @return the shared instance
-        */
-       public static ConnectionPlugin getDefault() {
-               return plugin;
-       }
-       
-       public void setCurrentDevice(IDevice device)    {
-               currentDevice = device; 
-       }
-       
-       public IDevice getCurrentDevice()       {
-               return currentDevice;
-       }
-       
-       
-       public void addSelectionListener(ISelectionListener listener) {
-               listeners.add(listener);
-       }
-
-       public void removeSelectionListener(ISelectionListener listener) {
-               listeners.remove(listener);
-       }
-       
-       public void notifySelectionListeners(FileEntry file) {
-               
-               ISelectionListener[] listenersCopy = listeners.toArray(
-                               new ISelectionListener[listeners.size()]);
-               
-               for (ISelectionListener listener : listenersCopy)       {
-                       try {
-                               listener.selectionChanged(file);                        
-                       } catch (Exception e) {
-                               Log.e("ConnectionPlugin", e);
-                       }
-              }
-       }
-       
-       /**
-        * Returns an image descriptor for the image file at the given
-        * plug-in relative path
-        *
-        * @param path the path
-        * @return the image descriptor
-        */
-       public static ImageDescriptor getImageDescriptorFromPlugin(String path) {
-               return imageDescriptorFromPlugin(PLUGIN_ID, path);
-       }
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore)
+     */
+    @Override
+    protected void initializeDefaultPreferences( final IPreferenceStore store ) {
+        store.setDefault(TizenConnectionExplorerPreferencePage.KEY_PUSHPULL_TIMEOUT, TizenConnectionExplorerPreferencePage.VALUE_PUSHPULL_TIMEOUT_DEFAULT);
+        store.setDefault(TizenConnectionExplorerPreferencePage.KEY_EMULATOR_MANAGER_PATH, TizenConnectionExplorerPreferencePage.VALUE_EMULATOR_MANAGER_PATH_DEFAULT);
+        store.setDefault(TizenLogPreferencePage.KEY_DEFAULT_LEVEL, TizenLogPreferencePage.VALUE_DEFAULT_LEVEL);
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        int deviceCnt = SmartDevelopmentBridge.getBridge().getDevices().length;
+        if (deviceCnt==0)
+        {
+            SmartDevelopmentBridge.disconnectBridge();
+        }
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance
+     *
+     * @return the shared instance
+     */
+    public static ConnectionPlugin getDefault() {
+        return plugin;
+    }
+
+    public void setCurrentDevice(IDevice device) {
+        currentDevice = device;
+    }
+
+    public IDevice getCurrentDevice() {
+        return currentDevice;
+    }
+
+    public void addSelectionListener(ISelectionListener listener) {
+        listeners.add(listener);
+    }
+
+    public void removeSelectionListener(ISelectionListener listener) {
+        listeners.remove(listener);
+    }
+
+    public void notifySelectionListeners(FileEntry file) {
+
+        ISelectionListener[] listenersCopy = listeners.toArray(
+                new ISelectionListener[listeners.size()]);
+
+        for (ISelectionListener listener : listenersCopy) {
+            try {
+                listener.selectionChanged(file);
+            } catch (Exception e) {
+                Logger.error("ConnectionPlugin", e);
+            }
+        }
+    }
+
+    /**
+     * Returns an image descriptor for the image file at the given
+     * plug-in relative path
+     *
+     * @param path the path
+     * @return the image descriptor
+     */
+    public static ImageDescriptor getImageDescriptorFromPlugin(String path) {
+        return imageDescriptorFromPlugin(PLUGIN_ID, path);
+    }
 }
\ No newline at end of file
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/ConnectionPluginSurrogate.java b/org.tizen.common.connection/src/org/tizen/common/connection/ConnectionPluginSurrogate.java
new file mode 100644 (file)
index 0000000..5cc6a6c
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Hyeongseok Heo <hyeongseok.heo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* Gyeongseok Seo <gyeongseok.seo@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.connection;
+
+import org.tizen.common.Surrogate;
+
+/**
+ * The ConnectionPluginSurrogate class adapt ConnectionPlugin default object
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * @author Gyeongseok Seo <gyeongseok.seo@samsung.com>
+ */
+public class ConnectionPluginSurrogate implements Surrogate<ConnectionPlugin> {
+    @Override
+    public ConnectionPlugin getAdapter() {
+        return ConnectionPlugin.getDefault();
+    }
+}
index 9d22035..1c2c41b 100644 (file)
@@ -1,30 +1,32 @@
 /*
-*  Common
-*
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-*
-* Contact: 
-* Hoon Kang <h245.kang@samsung.com>
-* Yoonki Park <yoonki.park@samsung.com>
-* 
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hoon Kang <h245.kang@samsung.com>
+ * Yoonki Park <yoonki.park@samsung.com>
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-* Contributors:
-* - S-Core Co., Ltd
-*
-*/
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
 package org.tizen.common.connection.ddmuilib;
 
+import java.util.concurrent.atomic.AtomicInteger;
+
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.osgi.util.NLS;
@@ -32,147 +34,78 @@ import org.eclipse.swt.SWT;
 import org.eclipse.ui.PlatformUI;
 import org.tizen.common.connection.explorer.Messages;
 
+public class FileDialogUtils
+{
+    public static final int YES_ID = 0;
+    public static final int YES_TO_ALL_ID = 1;
+    public static final int NO_ID = 2;
+    public static final int CANCEL_ID = 3;
+    
+    public static int checkOverwrite(final String filename)
+    {
+        String message = NLS.bind(Messages.getString("FileDialogUtils.overwrite.message"), filename);
+        String[] labels = new String[] {
+                IDialogConstants.YES_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL};
+        int type = MessageDialog.QUESTION;
+        return openFileDialog(labels, message, type);
+    }
 
-public class FileDialogUtils {
-       private static FileDialogUtils instance;
-       
-       private FileDialogUtils() { }
-       
-       public static FileDialogUtils getInstance() {
-               if (instance == null)
-                       instance = new FileDialogUtils();
-               return instance;
-       }
-       
-       public int checkOverwrite(final String filename) {
-               final int[] result = new int[1]; // using array since you can't change a final int
-
-               Runnable query = new Runnable() {
-                       public void run() {
-                               int[] resultId = {
-                                               IDialogConstants.YES_ID,
-                                               IDialogConstants.YES_TO_ALL_ID,
-                                               IDialogConstants.NO_ID,
-                                               IDialogConstants.CANCEL_ID };
-
-                               String[] labels = new String[] {
-                                               IDialogConstants.YES_LABEL,
-                                               IDialogConstants.YES_TO_ALL_LABEL,
-                                               IDialogConstants.NO_LABEL,
-                                               IDialogConstants.CANCEL_LABEL };
-                               
-                               String msg = NLS.bind(Messages.getString("FileDialogUtils.overrite.message"), filename);
-                               MessageDialog dialog = new MessageDialog(
-                                               PlatformUI.getWorkbench().getDisplay().getActiveShell(),
-                                               Messages.getString("FileDialogUtils.overrite.title"),
-                                               null, msg , MessageDialog.QUESTION, labels, 0);
-                               dialog.open();
-                               if (dialog.getReturnCode() == SWT.DEFAULT) {
-                                       // A window close returns SWT.DEFAULT - mapped to a cancel
-                                       result[0] = IDialogConstants.CANCEL_ID;
-                               } else {
-                                       result[0] = resultId[dialog.getReturnCode()];
-                               }
-                       }
-               };
-
-               PlatformUI.getWorkbench().getDisplay().syncExec(query);
-               return result[0];
-       }
-       public int confirmDelete(final String filename) {
-               final int[] result = new int[1]; // using array since you can't change a final int
-
-               Runnable query = new Runnable() {
-                       public void run() {
-                               int[] resultId = {
-                                               IDialogConstants.YES_ID,
-                                               IDialogConstants.CANCEL_ID };
-
-                               String[] labels = new String[] {
-                                               IDialogConstants.YES_LABEL,
-                                               IDialogConstants.CANCEL_LABEL };
-                               
-                               String msg = NLS.bind(Messages.getString("FileDialogUtils.delete.message"), filename);
-                               MessageDialog dialog = new MessageDialog(
-                                               PlatformUI.getWorkbench().getDisplay().getActiveShell(),
-                                               Messages.getString("FileDialogUtils.delete.title"),
-                                               null, msg , MessageDialog.QUESTION, labels, 0);
-                               dialog.open();
-                               if (dialog.getReturnCode() == SWT.DEFAULT) {
-                                       // A window close returns SWT.DEFAULT - mapped to a cancel
-                                       result[0] = IDialogConstants.CANCEL_ID;
-                               } else {
-                                       result[0] = resultId[dialog.getReturnCode()];
-                               }
-                       }
-               };
-
-               PlatformUI.getWorkbench().getDisplay().syncExec(query);
-               return result[0];
-       }
-       
-       public int checkFileOverwrite(final String filename) {
-               final int[] result = new int[1]; // using array since you can't change a final int
-
-               Runnable query = new Runnable() {
-                       public void run() {
-                               int[] resultId = {
-                                               IDialogConstants.OK_ID,
-                                               IDialogConstants.CANCEL_ID };
+    public static int confirmDelete(final String filename)
+    {
+        String message = NLS.bind(Messages.getString("FileDialogUtils.delete.message"), filename);
+        String[] labels = new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL };
+        int type = MessageDialog.QUESTION;
+        return openFileDialog(labels, message, type);
+    }
 
-                               String[] labels = new String[] {
-                                               IDialogConstants.OK_LABEL,
-                                               IDialogConstants.CANCEL_LABEL };
-                               
-                               String msg = NLS.bind(Messages.getString("FileDialogUtils.overrite.message"), filename);
-                               MessageDialog dialog = new MessageDialog(
-                                               PlatformUI.getWorkbench().getDisplay().getActiveShell(),
-                                               Messages.getString("FileDialogUtils.overrite.title"),
-                                               null, msg , MessageDialog.QUESTION, labels, 0);
-                               dialog.open();
-                               if (dialog.getReturnCode() == SWT.DEFAULT) {
-                                       // A window close returns SWT.DEFAULT - mapped to a cancel
-                                       result[0] = IDialogConstants.CANCEL_ID;
-                               } else {
-                                       result[0] = resultId[dialog.getReturnCode()];
-                               }
-                       }
-               };
+    public static int allowFileOverwrite(final String filename)
+    {
+        String message = NLS.bind(Messages.getString("FileDialogUtils.overwrite.message"), filename);
+        String[] labels = new String[] { IDialogConstants.OK_LABEL, IDialogConstants.CANCEL_LABEL };
+        int type = MessageDialog.QUESTION;
+        return openFileDialog(labels, message, type);
+    }
 
-               PlatformUI.getWorkbench().getDisplay().syncExec(query);
-               return result[0];
-       }
-       
-       public int checkTabName(final String filename) {
-               final int[] result = new int[1]; // using array since you can't change a final int
+    public static int checkTabName(final String filename)
+    {
+        String message = NLS.bind(Messages.getString("FileDialogUtils.tabName.message"), filename);
+        String[] labels = new String[] { IDialogConstants.OK_LABEL };
+        int type = MessageDialog.ERROR;
+        return openFileDialog(labels, message, type);
+    }
 
-               Runnable query = new Runnable() {
-                       public void run() {
-                               int[] resultId = {
-                                               IDialogConstants.OK_ID
-                                               };
+    public static void notifyDuplication(final String filename)
+    {
+        String message = NLS.bind(Messages.getString("FileDialogUtils.duplicate.message"), filename);
+        String[] labels = new String[] { IDialogConstants.OK_LABEL };
+        int type = MessageDialog.ERROR;
+        openFileDialog(labels, message, type);
+    }
 
-                               String[] labels = new String[] {
-                                               IDialogConstants.OK_LABEL
-                                                };
-                               
-                               String msg = NLS.bind(Messages.getString("FileDialogUtils.tabName.message"), filename);
-                               MessageDialog dialog = new MessageDialog(
-                                               PlatformUI.getWorkbench().getDisplay().getActiveShell(),
-                                               Messages.getString("FileDialogUtils.tabName.title"),
-                                               null, msg , MessageDialog.ERROR, labels, 0);
-                               dialog.open();
-                               if (dialog.getReturnCode() == SWT.DEFAULT) {
-                                       // A window close returns SWT.DEFAULT - mapped to a cancel
-                                       result[0] = IDialogConstants.CANCEL_ID;
-                               } else {
-                                       result[0] = resultId[dialog.getReturnCode()];
-                               }
-                       }
-               };
+    private static int openFileDialog(final String[] labels, final String message, final int type)
+    {
+        final AtomicInteger resultAtomicInteger = new AtomicInteger();
+        Runnable query = new Runnable()
+        {
+            @Override
+            public void run()
+            {
+                String title = Messages.getString("FileDialogUtils.message.title");
+                MessageDialog dialog = new MessageDialog(PlatformUI.getWorkbench().getDisplay().getActiveShell(),
+                        title, null, message, type, labels, 0);
+                dialog.open();
+                if (dialog.getReturnCode() == SWT.DEFAULT)
+                {
+                    // A window close returns SWT.DEFAULT - mapped to a cancel
+                    resultAtomicInteger.set(IDialogConstants.CANCEL_ID);
+                } else
+                {
+                    resultAtomicInteger.set(dialog.getReturnCode());
+                }
+            }
+        };
 
-               PlatformUI.getWorkbench().getDisplay().syncExec(query);
-               return result[0];
-       }
-       
+        PlatformUI.getWorkbench().getDisplay().syncExec(query);
+        return resultAtomicInteger.get();
+    }
 }
old mode 100644 (file)
new mode 100755 (executable)
index d6d5e43..bce53ed
@@ -26,13 +26,13 @@ import org.eclipse.swt.dnd.Clipboard;
  */
 public interface ITableFocusListener {
 
-       public interface IFocusedTableActivator {
-               public void copy(Clipboard clipboard);
+       interface IFocusedTableActivator {
+               void copy(Clipboard clipboard);
 
-               public void selectAll();
+               void selectAll();
        }
 
-       public void focusGained(IFocusedTableActivator activator);
+       void focusGained(IFocusedTableActivator activator);
 
-       public void focusLost(IFocusedTableActivator activator);
+       void focusLost(IFocusedTableActivator activator);
 }
index 24e62a0..7787a5a 100644 (file)
@@ -138,9 +138,6 @@ public class ImageLoader {
 
             if (imageStream != null) {
                 img = new Image(display, imageStream);
-                if (img == null) {
-                    throw new NullPointerException("couldn't load " + tmp);
-                }
 
                 mLoadedImages.put(filename, img);
 
old mode 100644 (file)
new mode 100755 (executable)
index 6c66d91..98b7ff4
@@ -26,17 +26,17 @@ public interface ICommonAction {
      * @param enabled <code>true</code> to enable, and
      *   <code>false</code> to disable
      */
-    public void setEnabled(boolean enabled);
+    void setEnabled(boolean enabled);
 
     /**
      * Sets the checked status of this action.
      * @param checked the new checked status
      */
-    public void setChecked(boolean checked);
+    void setChecked(boolean checked);
     
     /**
      * Sets the {@link Runnable} that will be executed when the action is triggered.
      */
-    public void setRunnable(Runnable runnable);
+    void setRunnable(Runnable runnable);
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index 7de8bd1..a7eb229
@@ -25,23 +25,23 @@ public interface IDdmConsole {
      * Prints a message to the android console.
      * @param message the message to print
      */
-    public void printErrorToConsole(String message);
+    void printErrorToConsole(String message);
 
     /**
      * Prints several messages to the android console.
      * @param messages the messages to print
      */
-    public void printErrorToConsole(String[] messages);
+    void printErrorToConsole(String[] messages);
 
     /**
      * Prints a message to the android console.
      * @param message the message to print
      */
-    public void printToConsole(String message);
+    void printToConsole(String message);
 
     /**
      * Prints several messages to the android console.
      * @param messages the messages to print
      */
-    public void printToConsole(String[] messages);
+    void printToConsole(String[] messages);
 }
index 6ed16fd..c184ef0 100644 (file)
 /*
-*  Common
-*
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-*
-* Contact: 
-* Hoon Kang <h245.kang@samsung.com>
-* YoonKi Park <yoonki.park@samsung.com>
-* 
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * YoonKi Park <yoonki.park@samsung.com>
+ * Gun Kim <gune.kim@samsung.com>
+ * 
  * Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-* Contributors:
-* - S-Core Co., Ltd
-*
-*/
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
 package org.tizen.common.connection.debugtools;
 
-import org.tizen.common.properties.InstallPathConfig;
 
+/**
+ * A On-demand Tool to be installed to a device or an emulator.
+ * @author Gun Kim <gune.kim@samsung.com>
+ *
+ */
 public class DebugTool {
-       public static final String CONTROL_EXTENSION = ".control";
-       public static final String TOOLS_TARGET_PATH = "/home/developer/sdk_tools";
-       public static final String TOOLS_HOST_PATH = InstallPathConfig.getSDKPath();
-       
-       private String binaryname; 
-       private String packagename;
-       private String sourcepath; 
-       private String architecture; 
-       private String description;
-       private String version;
-       
-       public DebugTool() { 
-               
-       }
-       public String getBinaryname() {
-               return binaryname;
-       }
-       public String getControlFile() { 
-               return "." + this.packagename + CONTROL_EXTENSION;
-       }
-       public String getVersion() {
-               return version;
-       }
-       public void setVersion(String pVersion) { 
-               version = pVersion;
-       }
-       public void setBinaryname(String pBinaryname) {
-               binaryname = pBinaryname;
-       }
-       public String getPackagename() {
-               return packagename;
-       }
-       public void setPackagename(String pPackagename) {
-                packagename = pPackagename;
-       }
-       public String getSourcepath() {
-               return sourcepath;
-       }
-       public void setSourcepath(String pSourcepath) {
-               sourcepath = pSourcepath;
-       }
-       public String getArchitecture() {
-               return architecture;
-       }
-       public void setArchitecture(String pArchitecture) {
-               architecture = pArchitecture;
-       }
-       public String getDescription() {
-               return description;
-       }
-       public void setDescription(String pDescription) {
-               description = pDescription;
-       }
-       
+    private String binaryname;
+    private String packagename;
+    private String sourcepath;
+    private String architecture;
+    private String description;
+    private String version;
+    private String packagetype;
+
+    public DebugTool() {
+
+    }
+    public DebugTool(String packagename, String binaryname, String sourcepath, String version, String desc, String arch, String type) {
+        this.packagename = packagename;
+        this.binaryname = binaryname;
+        this.sourcepath = sourcepath;
+        this.version = version;
+        this.description = desc;
+        this.architecture = arch;
+        this.packagetype = type;
+    }
+    public String getBinaryname() {
+        return binaryname;
+    }
+    public String getVersion() {
+        return version;
+    }
+    public void setVersion(String pVersion) {
+        version = pVersion;
+    }
+    public void setBinaryname(String pBinaryname) {
+        binaryname = pBinaryname;
+    }
+    public String getPackagename() {
+        return packagename;
+    }
+    public void setPackagename(String pPackagename) {
+        packagename = pPackagename;
+    }
+    public String getSourcepath() {
+        return sourcepath;
+    }
+    public void setSourcepath(String pSourcepath) {
+        sourcepath = pSourcepath;
+    }
+    public String getArchitecture() {
+        return architecture;
+    }
+    public void setArchitecture(String pArchitecture) {
+        architecture = pArchitecture;
+    }
+    public String getDescription() {
+        return description;
+    }
+    public void setDescription(String pDescription) {
+        description = pDescription;
+    }
+    public void setPackagetype(String packagetype) {
+        this.packagetype = packagetype;
+    }
+    public String getPackagetype() {
+        return packagetype;
+    }
+
+    @Override
+    public String toString() {
+        return packagename + "," + packagetype + "," + architecture;
+    }
 }
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/debugtools/OnDemandInstall.java b/org.tizen.common.connection/src/org/tizen/common/connection/debugtools/OnDemandInstall.java
new file mode 100644 (file)
index 0000000..44d78a1
--- /dev/null
@@ -0,0 +1,503 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * YoonKi Park <yoonki.park@samsung.com>
+ * Gun Kim <gune.kim@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.connection.debugtools;
+
+import static org.tizen.common.util.CollectionUtil.isEmpty;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.RegistryFactory;
+import org.eclipse.osgi.util.NLS;
+import org.tizen.common.TizenPlatformConstants;
+import org.tizen.common.core.application.InstallPathConfig;
+import org.tizen.common.util.FileUtil;
+import org.tizen.common.util.IOUtil;
+import org.tizen.common.util.log.Logger;
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.IDevice.Arch;
+import org.tizen.sdblib.MultiLineReceiver;
+import org.tizen.sdblib.SyncService;
+import org.tizen.sdblib.SyncService.SyncResult;
+
+/**
+ * On-demand Install class to deploy SDK tools to Tizen device or an emulator.
+ * 
+ * @author Gun Kim <gune.kim@samsung.com>
+ */
+public class OnDemandInstall {
+    public static final String ID_DEBUGTOOLS_EXTENSION = "org.tizen.common.connection.tools"; //$NON-NLS-1$
+    public static final String TOOLS_HOST_PATH = InstallPathConfig.getPlatformVersionPath();
+    public static final String RPM_PACKAGE_TYPE = "rpm";
+    private static final String RPM_QUERY_COMMAND = "rpm -qa | grep %s | wc -l";
+    private static final String CMD_RESULT_SUCCESS = "0";
+    private static final String MOVE_WORKING_DIR_COMMAND = "cd " + TizenPlatformConstants.TOOLS_TARGET_PATH;
+    private static final String REMOVE_TOOL_COMMAND = "rm -f %s";
+
+    private static final String TAR_INSTALL_COMMAND = MOVE_WORKING_DIR_COMMAND + " && tar -xf %s" + " && " + REMOVE_TOOL_COMMAND;
+    private static final String RPM_INSTALL_COMMAND = MOVE_WORKING_DIR_COMMAND + " && rpm -i %s" + " && " + REMOVE_TOOL_COMMAND;
+    private IDevice device = null;
+
+    private static IProgressMonitor nullMonitor = new OnDemandNullProgressMonitor();
+    private List<DebugTool> debugTools = null;
+    boolean blocking = false;
+
+    public OnDemandInstall(IDevice device) {
+        this.device = device;
+        debugTools = getDebugTools(device);
+    }
+
+    public OnDemandInstall(IDevice device, String packageName) {
+        this.device = device;
+        debugTools = getDebugTools(device, packageName);
+    }
+
+
+    /**
+     * Sets blocking mode.
+     * 
+     * @param blocking
+     */
+    public void setBlocking(boolean blocking) {
+        this.blocking = blocking;
+    }
+
+    private boolean checkDirectory(String dir) {
+        String cmd = "ls " + dir + TizenPlatformConstants.CMD_RESULT_CHECK;
+        String result = "";
+
+        try {
+            result = getResult(cmd);
+            if (CMD_RESULT_SUCCESS.equals(result)) {
+                return true;
+            }
+        } catch (Exception e) {
+            Logger.error(OnDemandInstallMessages.CANNOT_CHECK_DIRECTORY);
+        }
+
+        return false;
+    }
+
+
+    private void makeDirectory(String dir) {
+        String cmd = "mkdir -p -m 755 " + dir + TizenPlatformConstants.CMD_RESULT_CHECK;
+        String result = "";
+
+        try {
+            result = getResult(cmd);
+            if (CMD_RESULT_SUCCESS.equals(result) == false) {
+                Logger.error(OnDemandInstallMessages.CANNOT_CREATE_DIRECTORY);
+            }
+        } catch (Exception e) {
+            Logger.error(OnDemandInstallMessages.CANNOT_CREATE_DIRECTORY);
+        }
+    }
+
+    /**
+     * Returns true if the result of the cmd execution is equal to 0, Otherwise
+     * false.
+     * 
+     * @param cmd
+     * @return
+     * @throws CoreException
+     */
+    private String getResult(String cmd) throws Exception {
+        String result = "";
+        CommandOuputReceiver receiver = new CommandOuputReceiver();
+
+        device.executeShellCommand(cmd, receiver, 0);
+        result = receiver.getResult();
+        return result;
+    }
+
+    private boolean isInstalled(DebugTool dt) {
+        String result = "";
+        String cmd = "";
+
+        if (RPM_PACKAGE_TYPE.equals(dt.getPackagetype())) {
+            cmd = String.format(RPM_QUERY_COMMAND, dt.getPackagename());
+        } else {
+            cmd = "ls " + TizenPlatformConstants.TOOLS_TARGET_PATH + "/" + dt.getPackagename() + TizenPlatformConstants.CMD_RESULT_CHECK;
+        }
+
+        try {
+            result = getResult(cmd);
+            if (RPM_PACKAGE_TYPE.equals(dt.getPackagetype())) {
+                // In case of rpm package, the result 0 means the package is not installed.
+                if (CMD_RESULT_SUCCESS.equals(result) == false) {
+                    return true;
+                }
+            } else {
+                if (CMD_RESULT_SUCCESS.equals(result)) {
+                    return true;
+                }
+            }
+        } catch (Exception e) {
+            Logger.error(NLS.bind(OnDemandInstallMessages.CANNOT_CHECK_INSTALLED, dt.getPackagename()), e);
+        }
+        return false;
+    }
+
+    /**
+     * Starts to install packages.
+     * 
+     * @param monitor
+     *            The progress monitor. Can use
+     *            {@link OnDemandInstall#getNullIProgressMonitor}
+     */
+    public void install(IProgressMonitor monitor) {
+        if (monitor == null) {
+            monitor = nullMonitor;
+        }
+        if (blocking == true) {
+            installPackage(monitor);
+        } else {
+            String threadName = "OnDemandInstallThread";
+            Runnable r = new OnDemandRunnable(monitor);
+            Thread t = new Thread(r, threadName);
+            t.start();
+        }
+    }
+
+    public void setDevice(IDevice pDevice) {
+        device = pDevice;
+    }
+
+    private boolean copyPackage(String source, String destination) throws IOException {
+        SyncService syncService = null;
+        try {
+            syncService = device.getSyncService();
+            SyncResult result = syncService.pushFile(source, destination, SyncService.getNullProgressMonitor());
+            
+            if ( result.getCode() == SyncService.RESULT_OK ) {
+                return true;
+            }
+            else {
+                return false;
+            }
+        } finally {
+            IOUtil.tryClose(syncService);
+        }
+    }
+
+    private void installPackage(IProgressMonitor monitor) {
+        if (isEmpty(debugTools)) {
+            return;
+        }
+        monitor.beginTask(OnDemandInstallMessages.DIALOG_INITILIZE, 100);
+        monitor.subTask("Prepare install");
+
+        // check directory exist
+        if (!checkDirectory(TizenPlatformConstants.TOOLS_TARGET_PATH)) {
+            makeDirectory(TizenPlatformConstants.TOOLS_TARGET_PATH);
+        }
+
+        monitor.worked(10);
+
+        for (DebugTool dt : debugTools) {
+            // get package list to install
+            verbose("Verifying: " + dt);
+            if (verifyArchitecture(dt.getArchitecture()) == false) {
+                continue;
+            }
+
+            if (isInstalled(dt) == true) {
+                verbose("Verifying failed (already installed): " + dt);
+                continue;
+            }
+
+            deployPackage(dt);
+        }
+        monitor.done();
+    }
+
+    private final void deployPackage(DebugTool tool) {
+        String local = TOOLS_HOST_PATH + "/" + tool.getSourcepath() + "/" + tool.getBinaryname();
+        String remote = TizenPlatformConstants.TOOLS_TARGET_PATH + "/" + tool.getBinaryname();
+        String cmd = "";
+        String result = "";
+
+        verbose("Deploying: " + tool);
+        try {
+            if (copyPackage(local, remote) == false) {
+                throw new IOException();
+            }
+        } catch (IOException e) {
+            Logger.error(NLS.bind(OnDemandInstallMessages.CANNOT_COPY_FILE, tool.getBinaryname()), e);
+            return;
+        }
+
+        if (RPM_PACKAGE_TYPE.equals(tool.getPackagetype())) {
+            cmd = String.format(RPM_INSTALL_COMMAND, tool.getBinaryname(), tool.getBinaryname()) + TizenPlatformConstants.CMD_RESULT_CHECK;
+        } else {
+            cmd = String.format(TAR_INSTALL_COMMAND, tool.getBinaryname(), tool.getBinaryname()) + TizenPlatformConstants.CMD_RESULT_CHECK;
+        }
+        try {
+            result = getResult(cmd);
+            if (CMD_RESULT_SUCCESS.equals(result) == false) {
+                Logger.error(NLS.bind(OnDemandInstallMessages.CANNOT_INSTALL_TOOL, tool.getPackagename(), result));
+            } else {
+                verbose("Deployed: " + tool);
+            }
+        } catch (Exception e) {
+            Logger.error(NLS.bind(OnDemandInstallMessages.ERROR_EXECUTE_COMMAND, cmd), e);
+        }
+    }
+
+    private void verbose(String message) {
+        Logger.info("[OnDemandInstall][" + Thread.currentThread().getId() + "] " + message);
+    }
+
+    class OnDemandRunnable implements Runnable {
+        IProgressMonitor monitor = null;
+
+        OnDemandRunnable(IProgressMonitor monitor) {
+            this.monitor = monitor;
+        }
+
+        @Override
+        public void run() {
+            installPackage(monitor);
+        }
+    }
+
+    /**
+     * Returns a sync progress monitor that does nothing.
+     * <p/>
+     * This object can be reused multiple times and can be used by concurrent
+     * threads.
+     */
+    public static IProgressMonitor getNullIProgressMonitor() {
+        return nullMonitor;
+    }
+
+    private static class OnDemandNullProgressMonitor implements IProgressMonitor {
+        @Override
+        public void beginTask(String name, int totalWork) {
+        }
+
+        @Override
+        public void done() {
+        }
+
+        @Override
+        public void internalWorked(double work) {
+        }
+
+        @Override
+        public boolean isCanceled() {
+            return false;
+        }
+
+        @Override
+        public void setCanceled(boolean value) {
+        }
+
+        @Override
+        public void setTaskName(String name) {
+        }
+
+        @Override
+        public void subTask(String name) {
+        }
+
+        @Override
+        public void worked(int work) {
+        }
+    }
+
+    private final class CommandOuputReceiver extends MultiLineReceiver {
+        private String result = "";
+
+        @Override
+        public void processNewLines(String[] lines) {
+            result = lines[lines.length - 1];
+        }
+
+        public String getResult() {
+            return result;
+        }
+    }
+
+    /**
+     * Returns true if DebugTool is created for arm architecture, or false otherwise.
+     * @param dt
+     * @return
+     */
+    private boolean verifyArchitecture(String arch) {
+        if (arch == null) {
+            return false;
+        }
+
+        if (device.getArch() == Arch.X86) {
+            if ( arch.contains("arm")) {
+                return false;
+            }
+        }else {
+            if ( arch.contains("86")) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Returns {@link DebugTool} which is given the packageName. It can be used to install on-demand tools case by case.
+     * @param device
+     * @param packageName
+     * @return DebugTool
+     */
+    private synchronized  List<DebugTool> getDebugTools(IDevice device, String packageName) {
+        final List<DebugTool>  debugTools = getDebugTools(device);
+        List<DebugTool> toolInfo = new ArrayList<DebugTool>(1);
+
+        if (packageName != null) {
+            for (DebugTool dt : debugTools) {
+                if (packageName.equals(dt.getPackagename())) {
+                    toolInfo.add(dt);
+                }
+            }
+        }
+        return toolInfo;
+    }
+
+    private synchronized  List<DebugTool> getDebugTools(IDevice device) {
+        List<DebugTool> toolLists = new ArrayList<DebugTool>();
+        IExtensionRegistry x = RegistryFactory.getRegistry();
+        IConfigurationElement[] ces = x.getConfigurationElementsFor(ID_DEBUGTOOLS_EXTENSION);
+
+        try {
+            for ( IConfigurationElement ce : ces ) {
+                if (ce.getName().equals("tools")) {
+                    String packagename = ce.getAttribute("packagename");
+                    if (packagename == null)
+                    {
+                        continue;
+                    }
+                    String sourcepath = ce.getAttribute("sourcepath");
+                    if (sourcepath == null)
+                    {
+                        continue;
+                    }
+                    String description = ce.getAttribute("description");
+                    Path sourcePath = new Path(InstallPathConfig.getPlatformVersionPath() + "/" + sourcepath);
+                    File packageList = new File(sourcePath.toOSString());
+                    
+                    DebugTool dt = null;
+                    File[] packageFileList = packageList.listFiles();
+                    if ( packageFileList == null ) {
+                        continue;
+                    }
+                    for (File f : packageFileList) {
+                        if ( OnDemandInstall.RPM_PACKAGE_TYPE.equals(FileUtil.getFileExtension(f.getName())) ) {
+                            dt = makeDebugToolFromRPM(f, device, packagename, sourcepath, description);
+                        }
+                        else {
+                            dt = makeDebugToolFromTar(f, device, packagename, sourcepath, description);
+                        }
+                        if ( dt != null ) {
+                            toolLists.add(dt);
+                        }
+                    }
+                }
+            }
+        } catch (Throwable e) {
+            Logger.error("Failed making DebugTool list for on-demand install", e);
+        }
+        return toolLists;
+    }
+
+    private DebugTool makeDebugToolFromRPM( File f, IDevice device, String packagename, String sourcepath, String description ) {
+        String architecture = "";
+        String version = "";
+        String name = "";
+
+        // Not supported "RPM" at windows
+        //            architecture = HostUtil.returnExecute( String.format( DebugTool.RPM_QUERY_COMMAND, "%{ARCH}", "-p " + f.getCanonicalPath()) );
+        //            version = HostUtil.returnExecute( String.format( DebugTool.RPM_QUERY_COMMAND, "%{VERSION}", "-p " + f.getCanonicalPath()) );
+        //            name = HostUtil.returnExecute( String.format( DebugTool.RPM_QUERY_COMMAND, "%{NAME}", "-p " + f.getCanonicalPath()) );
+
+        // RPM file format : <name>-<version>-<release>.<architecture>.rpm
+        String[] fileSplit = f.getName().split("-");
+        if ( fileSplit.length < 3 ) {
+            return null;
+        }
+        
+        name = fileSplit[0];
+        for ( int i = 1 ; i < fileSplit.length - 2 ; i++ ) {
+            name += "-" + fileSplit[i];
+        }
+        // version is not used
+        // FIXME : Unsafe way to extract the version.
+        version = fileSplit[fileSplit.length - 2];
+        String[] archSplit = fileSplit[fileSplit.length-1].split("\\.");
+        architecture = archSplit[archSplit.length-2];
+        
+        if ( !packagename.equals(name) ) {
+            verbose("packagename('" + packagename + "') does not match with the split file name('" + name + "').");
+            return null;
+        }
+        if (verifyArchitecture(architecture) == false) {
+            return null;
+        }
+
+        DebugTool dt = new DebugTool(packagename, f.getName(), sourcepath, version, description, architecture, OnDemandInstall.RPM_PACKAGE_TYPE);
+
+        return dt;
+    }
+
+    private DebugTool makeDebugToolFromTar( File f, IDevice device, String packagename, String sourcepath, String description ) {
+        String[] filename = f.getName().split("_");
+        if (filename.length != 3) {
+            return null;
+        }
+        if( !filename[0].equals(packagename)) {
+            return null;
+        }
+        String version = filename[1];
+        String[] arch = filename[2].split("\\.");
+        if (arch.length != 2) {
+            return null;
+        }
+        String architecture = arch[0];
+
+        if (verifyArchitecture(architecture) == false) {
+            return null;
+        }
+
+        DebugTool dt = new DebugTool(packagename, f.getName(), sourcepath, version, description, architecture, "tar");
+        return dt;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/debugtools/OnDemandInstallMessages.java b/org.tizen.common.connection/src/org/tizen/common/connection/debugtools/OnDemandInstallMessages.java
new file mode 100644 (file)
index 0000000..c78b443
--- /dev/null
@@ -0,0 +1,44 @@
+/*\r
+*  Common\r
+*\r
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: \r
+* Hoon Kang <h245.kang@samsung.com>\r
+* YoonKi Park <yoonki.park@samsung.com>\r
+* \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+* Contributors:\r
+* - S-Core Co., Ltd\r
+*\r
+*/\r
+package org.tizen.common.connection.debugtools;\r
+\r
+import org.eclipse.osgi.util.NLS;\r
+\r
+public class OnDemandInstallMessages extends NLS {\r
+\r
+    static {\r
+        NLS.initializeMessages(OnDemandInstallMessages.class.getName(), OnDemandInstallMessages.class);\r
+    }\r
+    \r
+    public static String DIALOG_INITILIZE;\r
+    public static String CANNOT_CREATE_DIRECTORY;\r
+    public static String CANNOT_CHECK_DIRECTORY;\r
+    public static String CANNOT_CHECK_INSTALLED;\r
+    public static String CANNOT_COPY_FILE;\r
+    public static String CANNOT_REMOVE_CONTROLFILE;\r
+    public static String CANNOT_INSTALL_TOOL;\r
+    public static String ERROR_EXECUTE_COMMAND;\r
+}\r
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/debugtools/OnDemandInstallMessages.properties b/org.tizen.common.connection/src/org/tizen/common/connection/debugtools/OnDemandInstallMessages.properties
new file mode 100644 (file)
index 0000000..272004a
--- /dev/null
@@ -0,0 +1,8 @@
+DIALOG_INITILIZE=Connection Explorer is initializing. It can take a few minutes.\r
+CANNOT_CREATE_DIRECTORY=Cannot create sdk tools directory\r
+CANNOT_CHECK_DIRECTORY=Cannot check sdk tools directory\r
+CANNOT_CHECK_INSTALLED=Cannot check installed tools ''{0}''\r
+CANNOT_COPY_FILE=Cannot copy the file ''{0}''\r
+CANNOT_REMOVE_CONTROLFILE=Cannot delete the file\r
+CANNOT_INSTALL_TOOL=Cannot install ''{0}'' due to : {1}\r
+ERROR_EXECUTE_COMMAND=Error occurred while executing command : {0}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 4aa5e2d..238ee38
 /*
-*  Common
-*
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-*
-* Contact: 
-* Hoon Kang <h245.kang@samsung.com>
-* Hyunsik Noh <hyunsik.noh@samsung.com>
-* 
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hoon Kang <h245.kang@samsung.com>
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-* Contributors:
-* - S-Core Co., Ltd
-*
-*/
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
 package org.tizen.common.connection.explorer;
 
+import static org.tizen.sdblib.FileListingService.TYPE_DIRECTORY;
+import static org.tizen.sdblib.FileListingService.TYPE_DIRECTORY_LINK;
+import static org.tizen.sdblib.FileListingService.TYPE_LINK;
+import static org.tizen.sdblib.FileListingService.TYPE_ROOT_DEVICE;
+import static org.tizen.sdblib.FileListingService.TYPE_ROOT_EMULATOR;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
 import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Tree;
-
-import org.tizen.sdblib.FileListingService;
 import org.tizen.sdblib.FileListingService.FileEntry;
-import org.tizen.sdblib.FileListingService.IListingReceiver;
 import org.tizen.sdblib.IDevice;
 import org.tizen.sdblib.SmartDevelopmentBridge;
 
-public class ConnectionExplorerContentProvider  implements ITreeContentProvider {
-       
-    private TreeViewer viewer;
-    private FileEntry rootEntry;
-    
-    private IListingReceiver listingReceiver = new IListingReceiver() {
-        public void setChildren(final FileEntry entry, FileEntry[] children) {
-            final Tree t = viewer.getTree();
-            if (t != null && t.isDisposed() == false) {
-                Display display = t.getDisplay();
-                if (display.isDisposed() == false) {
-                    display.asyncExec(new Runnable() {
-                        public void run() {
-                            if (t.isDisposed() == false) {
-                                // refresh the entry.
-                                viewer.refresh(entry);
-                                viewer.setExpandedState(entry, true);
-                            }
-                        }
-                    });
-                }
-            }
-        }
+public class ConnectionExplorerContentProvider implements ITreeContentProvider
+{
+    protected static final Set<?> PARENT_TYPES =
+    Collections.unmodifiableSet( new HashSet<Object>( Arrays.asList(
+        TYPE_DIRECTORY_LINK,
+        TYPE_LINK,
+        TYPE_DIRECTORY,
+        TYPE_ROOT_EMULATOR,
+        TYPE_ROOT_DEVICE
+    ) ) );
 
-        public void refreshEntry(final FileEntry entry) {
-            final Tree t = viewer.getTree();
-            if (t != null && t.isDisposed() == false) {
-                Display display = t.getDisplay();
-                if (display.isDisposed() == false) {
-                    display.asyncExec(new Runnable() {
-                        public void run() {
-                            if (t.isDisposed() == false) {
-                                // refresh the entry.
-                                viewer.refresh(entry);
-                            }
-                        }
-                    });
-                }
-            }
-        }
-    };
-
-       
-       @Override
-       public void dispose() {
-       }
+    @Override
+    public void dispose()
+    {
+    }
 
-       @Override
-       public void inputChanged(Viewer pViewer, Object pOldInput, Object pNewInput) {
-                if (pViewer instanceof TreeViewer) {
-                   viewer = (TreeViewer) pViewer;
-               }
-               if (pNewInput instanceof FileEntry) {
-                   rootEntry = (FileEntry) pNewInput;
-               }               
-       }
+    @Override
+    public void inputChanged(Viewer pViewer, Object pOldInput, Object pNewInput)
+    {
+    }
 
-       @Override
-       public Object[] getChildren(Object arg0) {
-        if (arg0 instanceof FileEntry) {
+    @Override
+    public Object[] getChildren(Object arg0)
+    {
+        if (arg0 instanceof FileEntry)
+        {
             FileEntry parentEntry = (FileEntry) arg0;
+            Object[] newEntries = parentEntry.getFileListingService().getChildren(parentEntry, false, null);
 
-            Object[] oldEntries = parentEntry.getCachedChildren();
-            Object[] newEntries = parentEntry.getFileListingService().getChildren(parentEntry,
-                    true, listingReceiver);
-
-            if (newEntries != null) {
+            if (newEntries != null)
+            {
                 return newEntries;
-            } else {
-                return oldEntries;
             }
         }
         return new Object[0];
-       }
+    }
 
-       @Override
-       public Object[] getElements(Object arg0) {
-                IDevice[] devices = SmartDevelopmentBridge.getBridge().getDevices();
-                FileEntry[] entries = new FileEntry[ devices.length ];
-                for (int i = 0; i < devices.length; i++) {
-                        entries[i] = devices[i].getFileListingService().getRoot();
+    @Override
+    public Object[] getElements(Object arg0)
+    {
+        IDevice[] devices = SmartDevelopmentBridge.getBridge().getDevices();
+        FileEntry[] entries = new FileEntry[devices.length];
+        for (int i = 0; i < devices.length; i++)
+        {
+            entries[i] = devices[i].getFileListingService().getRoot();
         }
         return entries;
-       }
+    }
 
-       @Override
-       public Object getParent(Object arg0) {
-        if (arg0 instanceof FileEntry) {
+    @Override
+    public Object getParent(Object arg0)
+    {
+        if (arg0 instanceof FileEntry)
+        {
             FileEntry entry = (FileEntry) arg0;
 
             return entry.getParent();
         }
         return null;
-       }
+    }
 
-       @Override
-       public boolean hasChildren(Object arg0) {
-               if (arg0 instanceof FileEntry) {
-                       FileEntry entry = (FileEntry) arg0;
-                       if (entry.getType() == FileListingService.TYPE_DIRECTORY_LINK)
-                               return true;
-                       else if (entry.getType() == FileListingService.TYPE_LINK)
-                               return true;
-                       else if (entry.getType() == FileListingService.TYPE_DIRECTORY)
-                               return true;
-                       else if (entry.getType() == FileListingService.TYPE_ROOT_EMULATOR)
-                               return true;
-                       else if (entry.getType() == FileListingService.TYPE_ROOT_DEVICE)
-                               return true;
-               }
-               return false;
-       }
-}
+    @Override
+    public boolean hasChildren(Object arg0)
+    {
+        if (arg0 instanceof FileEntry)
+        {
+            FileEntry entry = (FileEntry) arg0;
+            return PARENT_TYPES.contains( entry.getType() );
+        }
+        return false;
+    }
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 3b8c5ca..c9a59c4
 /*
-*  Common
-*
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-*
-* Contact: 
-* Hoon Kang <h245.kang@samsung.com>
-* Hyunsik Noh <hyunsik.noh@samsung.com>
-* 
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hoon Kang <h245.kang@samsung.com>
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-* Contributors:
-* - S-Core Co., Ltd
-*
-*/
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
 package org.tizen.common.connection.explorer;
 
 import org.eclipse.jface.viewers.ILabelProviderListener;
 import org.eclipse.jface.viewers.ITableLabelProvider;
 import org.eclipse.swt.graphics.Image;
 import org.eclipse.swt.widgets.Display;
-import org.tizen.common.connection.ddmuilib.ImageLoader;
-
+import org.tizen.common.connection.ConnectionPlugin;
+import org.tizen.common.util.SWTUtil;
 import org.tizen.sdblib.FileListingService;
 import org.tizen.sdblib.FileListingService.FileEntry;
 import org.tizen.sdblib.IDevice;
 
-public class ConnectionExplorerLabelProvider implements ITableLabelProvider {
+public class ConnectionExplorerLabelProvider implements ITableLabelProvider
+{
+
+    private final Image fileImage;
+    private final Image folderImage;
+    private final Image fileLinkImage;
+    private final Image folderLinkImage;
+    private final Image otherImage;
+    private final Image emulatorImage;
+    private final Image deviceImage;
+    public static int index;
+
+    public ConnectionExplorerLabelProvider(Display display)
+    {
+
+        fileImage = ConnectionPlugin.getImageDescriptorFromPlugin("icons/file.gif").createImage();
+        folderImage = ConnectionPlugin.getImageDescriptorFromPlugin("icons/directory.gif")
+                .createImage();
+        fileLinkImage = ConnectionPlugin.getImageDescriptorFromPlugin("icons/file_link.gif")
+                .createImage();
+        folderLinkImage = ConnectionPlugin.getImageDescriptorFromPlugin("icons/directory_link.gif")
+                .createImage();
+        otherImage = ConnectionPlugin.getImageDescriptorFromPlugin("icons/file.gif").createImage();
+        emulatorImage = ConnectionPlugin.getImageDescriptorFromPlugin("icons/emulator.gif")
+                .createImage();
+        deviceImage = ConnectionPlugin.getImageDescriptorFromPlugin("icons/device.gif")
+                .createImage();
+    }
 
-       private Image fileImage;
-       private Image folderImage;
-       private Image fileLinkImage;
-       private Image folderLinkImage;
-       private Image otherImage;
-       private Image emulatorImage;
-       private Image deviceImage;
-       public static int index;
-       public ConnectionExplorerLabelProvider(Display display) {
-               ImageLoader loader = ImageLoader.getDdmUiLibLoader();
-               
-               fileImage = loader.loadImage("file.gif", display);
-               folderImage = loader.loadImage("directory.gif", display);
-               fileLinkImage = loader.loadImage("file_link.gif", display);
-               folderLinkImage = loader.loadImage("directory_link.gif", display);
-               otherImage = loader.loadImage("file.gif", display);
-               emulatorImage = loader.loadImage("emulator.gif", display);
-               deviceImage = loader.loadImage("device.gif", display);
-       }
+    @Override
+    public Image getColumnImage(Object element, int columnIndex)
+    {
+        if (columnIndex == 0)
+        {
+            if (element instanceof FileEntry)
+            {
+                FileEntry entry = (FileEntry) element;
+                switch (entry.getType())
+                {
+                    case FileListingService.TYPE_FILE:
+                        return fileImage;
+                    case FileListingService.TYPE_LINK:
+                        return fileLinkImage;
+                    case FileListingService.TYPE_DIRECTORY:
+                        return folderImage;
+                    case FileListingService.TYPE_DIRECTORY_LINK:
+                        return folderLinkImage;
+                    case FileListingService.TYPE_ROOT_EMULATOR:
+                        return emulatorImage;
+                    case FileListingService.TYPE_ROOT_DEVICE:
+                        return deviceImage;
+                    default:
+                        return otherImage;
+                }
+            }
+        }
+        return null;
+    }
 
-       @Override
-       public Image getColumnImage(Object element, int columnIndex) {
-               if (columnIndex == 0) {
-                       if (element instanceof FileEntry) {
-                               FileEntry entry = (FileEntry) element;
-                               switch (entry.getType()) {
-                               case FileListingService.TYPE_FILE:
-                                       return fileImage;
-                               case FileListingService.TYPE_LINK:
-                                       return fileLinkImage;
-                               case FileListingService.TYPE_DIRECTORY:
-                                       return folderImage;
-                               case FileListingService.TYPE_DIRECTORY_LINK:
-                                       return folderLinkImage;
-                               case FileListingService.TYPE_ROOT_EMULATOR:
-                                       return emulatorImage;
-                               case FileListingService.TYPE_ROOT_DEVICE:
-                                       return deviceImage;
-                               default:
-                                       return null;
-                               }
-                       } 
+    @Override
+    public String getColumnText(Object element, int columnIndex)
+    {
+        if (element instanceof FileEntry)
+        {
+            FileEntry entry = (FileEntry) element;
 
-                       return otherImage;
-               }
-               return null;
-       }
+            switch (columnIndex)
+            {
+                case 0:
+                    if (entry.isRoot())
+                    {
+                        return getDeviceSerialWithName(entry);
+                    } else
+                    {
+                        return entry.getName();
+                    }
+                default:
+                    return null;
+            }
+        } else if (element instanceof IDevice)
+        {
+            IDevice device = (IDevice) element;
+            return device.getDeviceName();
+        }
+        return null;
+    }
 
-       @Override
-       public String getColumnText(Object element, int columnIndex) {
-               if (element instanceof FileEntry) {
-                       FileEntry entry = (FileEntry) element;
+    @Override
+    public void addListener(ILabelProviderListener listener)
+    {}
 
-                       switch (columnIndex) {
-                       case 0:
-                               return entry.getName();
-                       default:
-                               return null;
-                       }
-               } else if (element instanceof IDevice) {
-                       IDevice device = (IDevice) element;
-                       return device.getSerialNumber();
-               }
-               return null;
-       }
+    @Override
+    public void dispose()
+    {
+        SWTUtil.tryDispose(fileImage, folderImage, fileLinkImage, folderLinkImage, otherImage,
+                emulatorImage, deviceImage);
+    }
 
-       @Override
-       public void addListener(ILabelProviderListener listener) {
-       }
+    @Override
+    public boolean isLabelProperty(Object element, String property)
+    {
+        return false;
+    }
 
-       @Override
-       public void dispose() {
-       }
+    @Override
+    public void removeListener(ILabelProviderListener listener)
+    {}
 
-       @Override
-       public boolean isLabelProperty(Object element, String property) {
-               return false;
-       }
+    public static String getDeviceSerialWithName(IDevice device)
+    {
+        return combineSerialWithName(device.getSerialNumber(), device.getDeviceName());
+    }
 
-       @Override
-       public void removeListener(ILabelProviderListener listener) {
-       }
+    public static String getDeviceSerialWithName(FileEntry entry)
+    {
+        return combineSerialWithName(entry.getFileListingService().getDevice().getSerialNumber(), entry.getName());
+    }
+    
+    private static String combineSerialWithName(String serial, String name)
+    {
+        return String.format("%s (%s)", serial, name);
+    }
 
-}
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 3f72e47..1a38b1a
@@ -1,35 +1,37 @@
 /*
-*  Common
-*
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-*
-* Contact: 
-* Hoon Kang <h245.kang@samsung.com>
-* Hyunsik Noh <hyunsik.noh@samsung.com>
-* 
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hoon Kang <h245.kang@samsung.com>
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-* Contributors:
-* - S-Core Co., Ltd
-*
-*/
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
 package org.tizen.common.connection.explorer;
 
+import static org.tizen.common.util.ArrayUtil.isEmpty;
+
 import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
-import java.util.regex.Pattern;
+import java.util.List;
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -59,14 +61,19 @@ import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Dialog;
 import org.eclipse.swt.widgets.DirectoryDialog;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.ToolItem;
 import org.eclipse.swt.widgets.Tree;
 import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.console.MessageConsoleStream;
+import org.eclipse.ui.dialogs.PropertyDialogAction;
 import org.eclipse.ui.part.PluginTransfer;
 import org.eclipse.ui.part.PluginTransferData;
+import org.tizen.common.TizenPlatformConstants;
 import org.tizen.common.connection.ConnectionPlugin;
 import org.tizen.common.connection.ConnectionPlugin.ISelectionListener;
 import org.tizen.common.connection.ddmuilib.DdmUiPreferences;
@@ -74,13 +81,15 @@ import org.tizen.common.connection.ddmuilib.FileDialogUtils;
 import org.tizen.common.connection.ddmuilib.Panel;
 import org.tizen.common.connection.ddmuilib.SyncProgressMonitor;
 import org.tizen.common.connection.ddmuilib.TableHelper;
-import org.tizen.common.connection.ddmuilib.console.DdmConsole;
-import org.tizen.common.connection.debugtools.ToolsInstall;
+import org.tizen.common.connection.debugtools.OnDemandInstall;
+import org.tizen.common.connection.preference.TizenConnectionExplorerPreferencePage;
 import org.tizen.common.connection.sdblib.dnd.FileEntryTransfer;
-import org.tizen.common.console.AnsicodeAdapter;
-import org.tizen.common.log.Logger;
-
-import org.tizen.sdblib.FileListingService;
+import org.tizen.common.connection.ui.ConnectionUIMessages;
+import org.tizen.common.ui.view.console.AnsicodeAdapter;
+import org.tizen.common.ui.view.console.ConsoleManager;
+import org.tizen.common.util.DialogUtil;
+import org.tizen.common.util.FilenameUtil;
+import org.tizen.common.util.log.Logger;
 import org.tizen.sdblib.FileListingService.FileEntry;
 import org.tizen.sdblib.IDevice;
 import org.tizen.sdblib.MultiLineReceiver;
@@ -91,1028 +100,1171 @@ import org.tizen.sdblib.SyncService;
 import org.tizen.sdblib.SyncService.ISyncProgressMonitor;
 import org.tizen.sdblib.SyncService.SyncResult;
 
-public class ConnectionExplorerPanel extends Panel
-               implements
-                       IDeviceChangeListener,
-                       IDebugBridgeChangeListener,
-                       ISelectionListener {
-
-       private static final String DRAGACTIONID = "org.tizen.common.connection.filedrop";
-       private static final String INVALID_FOR_FILENAME = ";";
-
-       private static final String COLUMN_NAME = "name"; //$NON-NLS-1S
-       private static final String CMD_RESULT_CHECK = "; echo $?";
-
-       private Composite parent;
-       private TreeViewer treeViewer;
-       private Tree tree;
-       private ConnectionExplorerContentProvider mContentProvider;
-
-       private ToolItem pushToolItem;
-       private ToolItem pullToolItem;
-       private ToolItem emulStartToolItem;
-       
-       private MenuManager subMenu;
-       private Action actionPush;
-       private Action actionPull;
-       private Action actionRefresh;
-       private Action actionRename;
-       private Action actionProperty;
-       private Action actionDelete;
-
-       private IDevice mCurrentDevice;
-
-       private String defaultSave;
-       // only use on linux system
-       private static final String PATH_SEPARATOR = "/";
-
-       private final ArrayList<IDevice> devicesToExpand = new ArrayList<IDevice>();
-       private final ArrayList<IDevice> devicesList = new ArrayList<IDevice>();
-       private FileEntry currentFileEntry;
-
-       public ConnectionExplorerPanel() {
-       }
-
-       
-       @Override
-       protected Control createControl(Composite pParent) {
-               parent = pParent;
-               parent.setLayout(new FillLayout());
-
-               tree = new Tree(parent, SWT.MULTI | SWT.FULL_SELECTION);
-               tree.setHeaderVisible(true);
-
-               IPreferenceStore store = DdmUiPreferences.getStore();
-
-               TableHelper.createTreeColumn(tree, "FileEntry", SWT.LEFT,
-                               "abcdefghijklmnopqrstuvwzabcdefghijk", COLUMN_NAME, store); //$NON-NLS-1$
-               tree.setHeaderVisible(true);
-
-               treeViewer = new TreeViewer(tree);
-               mContentProvider = new ConnectionExplorerContentProvider();
-               treeViewer.setContentProvider(mContentProvider);
-               treeViewer.setLabelProvider(new ConnectionExplorerLabelProvider(
-                               parent.getDisplay()));
-
-               tree.addSelectionListener(new SelectionAdapter() {
-                       @Override
-                       public void widgetSelected(SelectionEvent e) {
-                               notifyListeners();
-                       }
-               });
-
-               // setup drag listener
-               treeViewer.addDragSupport(
-                               DND.DROP_MOVE | DND.DROP_COPY,
-                               new Transfer[]{PluginTransfer.getInstance(),
-                                               FileEntryTransfer.getInstance()},
-                               new DragSourceListener() {
-
-                                       @Override
-                                       public void dragStart(DragSourceEvent e) {
-
-                                               TreeItem[] items = tree.getSelection();
-
-                                               for (int i = 0; i < items.length; i++) {
-                                                       Object data = items[i].getData();
-                                                       if (data instanceof FileEntry) {
-                                                               if (((FileEntry) data).isDirectory() == true || ((FileEntry) data).isRoot() == true) {
-                                                                       e.doit = false;
-                                                                       return;
-                                                               }
-                                                       }
-                                               }
-                                               e.doit = true;
-                                       }
-                                       @Override
-                                       public void dragFinished(DragSourceEvent arg0) {
-
-                                       }
-
-                                       @Override
-                                       public void dragSetData(DragSourceEvent e) {
-                                               // get the selection
-                                               TreeItem[] items = tree.getSelection();
-                                               FileEntry[] entries = new FileEntry[items.length];
-
-                                               for (int i = 0; i < items.length; i++) {
-                                                       Object data = items[i].getData();
-                                                       if (data instanceof FileEntry) {
-                                                               entries[i] = ((FileEntry) data);
-                                                       }
-                                               }
-
-                                               if (FileEntryTransfer.getInstance().isSupportedType(
-                                                               e.dataType)) {
-                                                       e.data = entries;
-                                               } else if (PluginTransfer.getInstance()
-                                                               .isSupportedType(e.dataType)) {
-                                                       byte[] data = FileEntryTransfer.getInstance()
-                                                                       .toByteArray(entries);
-                                                       e.data = new PluginTransferData(DRAGACTIONID, data);
-                                               }
-
-                                       }
-                               });
-               
-               // setup drop listener
-               treeViewer.addDropSupport(DND.DROP_COPY | DND.DROP_MOVE,
-                               new Transfer[]{FileTransfer.getInstance()},
-                               new ViewerDropAdapter(treeViewer) {
-                                       @Override
-                                       public boolean performDrop(Object data) {
-                                               // get the item on which we dropped the item(s)
-                                               FileEntry target = (FileEntry) getCurrentTarget();
-
-                                               // in case we drop at the same level as root
-                                               if (target == null) {
-                                                       return false;
-                                               }
-
-                                               // if the target is not a directory, we get the parent
-                                               // directory
-                                               if (target.isDirectory() == false) {
-                                                       target = target.getParent();
-                                               }
-
-                                               if (target == null) {
-                                                       return false;
-                                               }
-
-                                               // get the list of files to drop
-                                               String[] files = (String[]) data;
-
-                                               // do the drop
-                                               pushFiles(files, target);
-
-                                               // we need to finish with a refresh
-                                               refresh(target);
-
-                                               return true;
-                                       }
-
-                                       @Override
-                                       public boolean validateDrop(Object target, int operation,
-                                                       TransferData transferType) {
-                                               if (target == null) {
-                                                       return false;
-                                               }
-
-                                               // convert to the real item
-                                               FileEntry targetEntry = (FileEntry) target;
-
-                                               // if the target is not a directory, we get the parent
-                                               // directory
-                                               if (targetEntry.isDirectory() == false) {
-                                                       target = targetEntry.getParent();
-                                               }
-
-                                               if (target == null) {
-                                                       return false;
-                                               }
-
-                                               return true;
-                                       }
-                               });
-
-               return tree;
-       }
-
-       public void setToolItems(ToolItem push, ToolItem pull, ToolItem start) {
-               pushToolItem = push;
-               pullToolItem = pull;
-               emulStartToolItem = start;
-       }
-
-       public void setActions(MenuManager pSubMenu, Action pActionPush, Action pActionPull, Action pActionRefresh,
-                       Action pActionRename, Action pActionProperty, Action pActionDelete) {
-               this.subMenu = pSubMenu;
-               this.actionPush = pActionPush;
-               this.actionPull = pActionPull;
-               this.actionRefresh = pActionRefresh;
-               this.actionRename = pActionRename;
-               this.actionProperty = pActionProperty;
-               this.actionDelete = pActionDelete;
-       }
-
-       @Override
-       protected void postCreation() {
-               ConnectionPlugin.getDefault().addSelectionListener(this);
-               SmartDevelopmentBridge sdbBridge = SmartDevelopmentBridge.getBridge();
-               SmartDevelopmentBridge.addDebugBridgeChangeListener(this);
-               SmartDevelopmentBridge.addDeviceChangeListener(this);
-
-               IDevice[] devices = null;
-               if (sdbBridge != null) {
-                       devices = sdbBridge.getDevices();
-               }
-               if (devices != null && devices.length != 0) {
-                       for (IDevice device : devices) {
-                               this.deviceConnected(device);
-                       }
-               }
-       }
-
-       /**
-        * Sets the focus to the proper control inside the panel.
-        */
-       @Override
-       public void setFocus() {
-               tree.setFocus();
-       }
-
-       /**
-        * Pull the current selection on the local drive. This method displays a
-        * dialog box to let the user select where to store the file(s) and
-        * folder(s).
-        */
-       public void pullSelection() {
-               // get the selection
-               TreeItem[] items = tree.getSelection();
-
-               // name of the single file pull, or null if we're pulling a directory
-               // or more than one object.
-               String filePullName = null;
-               FileEntry singleEntry = null;
-
-               //Pull the single file
-               if (items.length == 1) {
-                       singleEntry = (FileEntry) items[0].getData();
-                       if (singleEntry.getType() == FileListingService.TYPE_FILE) {
-                               filePullName = singleEntry.getName();
-                       }
-               }
-
-               // where do we save by default?
-               String defaultPath = defaultSave;
-               if (defaultPath == null) {
-                       defaultPath = System.getProperty("user.home"); //$NON-NLS-1$
-               }
-
-               if (filePullName != null) {
-                       FileDialog fileDialog = new FileDialog(parent.getShell(), SWT.SAVE);
-
-                       fileDialog.setText("Pull the Selection");
-                       fileDialog.setFileName(filePullName);
-                       fileDialog.setFilterPath(defaultPath);
-
-                       String fileName = fileDialog.open();
-                       if (fileName != null) {
-                               defaultSave = fileDialog.getFilterPath();
-
-                               pullFile(singleEntry, fileName);
-                       }
-               } else {
-                       DirectoryDialog directoryDialog = new DirectoryDialog(
-                                       parent.getShell(), SWT.SAVE);
-
-                       directoryDialog.setText("Pull the Selection");
-                       directoryDialog.setFilterPath(defaultPath);
-
-                       String directoryName = directoryDialog.open();
-                       if (directoryName != null) {
-                               pullSelection(items, directoryName);
-                       }
-               }
-       }
-
-       /**
-        * Push new file(s) and folder(s) into the current selection. Current
-        * selection must be single item. If the current selection is not a
-        * directory, the ` directory is used. This method displays a dialog to
-        * let the user choose file to push to the device.
-        */
-       public void pushIntoSelection() {
-               // get the name of the object we're going to pull
-               TreeItem[] items = tree.getSelection();
-
-               if (items.length == 0) {
-                       return;
-               }
-
-               FileDialog dlg = new FileDialog(parent.getShell(), SWT.OPEN);
-               String fileName;
-
-               dlg.setText("Push the Files");
-
-               // There should be only one.
-               FileEntry entry = (FileEntry) items[0].getData();
-
-               String defaultPath = defaultSave;
-               if (defaultPath == null) {
-                       defaultPath = System.getProperty("user.home"); //$NON-NLS-1$
-               }
-               dlg.setFilterPath(defaultPath);
-
-               fileName = dlg.open();
-               if (fileName != null) {
-                       defaultSave = dlg.getFilterPath();
-
-                       // we need to figure out the remote path based on the current
-                       // selection type.
-                       String remotePath;
-                       FileEntry toRefresh = entry;
-                       if (entry.isDirectory() || entry.isRoot()) {
-                               remotePath = entry.getFullPath();
-                       } else {
-                               toRefresh = entry.getParent();
-                               remotePath = toRefresh.getFullPath();
-                       }
-
-                       pushFile(fileName, remotePath);
-                       treeViewer.refresh(toRefresh);
-               }
-       }
-
-       public void addNewFileSelection() {
-               InputDialog addNewDialog = new InputDialog(Display.getCurrent()
-                               .getActiveShell(), "New File Resource", "New File Name: ", "",
-                               new FileNameValidator());
-               if (addNewDialog.open() != Window.OK)
-                       return;
-
-               String fullPath = currentFileEntry.getFullPath();
-
-               TreeItem[] items = tree.getSelection();
-
-               if (items.length != 1) {
-                       return;
-               }
-
-               final FileEntry parentEntry = ((FileEntry) items[0].getData())
-                               .getParent();
-               // create the touch command
-               String command = "touch " + fullPath + PATH_SEPARATOR + addNewDialog.getValue() + CMD_RESULT_CHECK; //$NON-NLS-1$
-
-               try {
-                       mCurrentDevice.executeShellCommand(command,
-                                       new MultiLineReceiver() {
-
-                               @Override
-                               public void processNewLines(String[] lines) {
-                                       if(!lines[lines.length - 1].contains("0"))
-                                       {
-                                       StringBuilder sb = new StringBuilder();
-                                       for (String line : lines) {
-                                               line = AnsicodeAdapter.getStripAnsiString(line);        
-                                               sb.append(line);
-                                       
-                               }
-                                       Status status = new Status(IStatus.ERROR, "Add File Failed", 0,
-                                                       sb.toString() , null);
-                                       ErrorDialog.openError(Display.getCurrent().getActiveShell(), "Add File Failed", "A file failed to be added", status);
-                                       
-                       
-                               }
-                               }
-                       });
-               } catch (IOException e) {
-                       Logger.error("failed to do add new file", e);
-                       throw new RuntimeException(e);
-               }
-               refresh(parentEntry);
-       }
-
-       public void addNewFolderSelection() {
-               InputDialog addNewDialog = new InputDialog(Display.getCurrent()
-                               .getActiveShell(), "New Folder Resource", "New Folder Name: ",
-                               "", null);
-               if (addNewDialog.open() != Window.OK)
-                       return;
-               String fullPath = currentFileEntry.getFullPath();
-
-               TreeItem[] items = tree.getSelection();
-
-               if (items.length != 1) {
-                       return;
-               }
-
-               final FileEntry parentEntry = ((FileEntry) items[0].getData())
-                               .getParent();
-               // create the mkdir command
-               String command = "mkdir " + fullPath + PATH_SEPARATOR + addNewDialog.getValue() + CMD_RESULT_CHECK; //$NON-NLS-1$
-               try {
-                       mCurrentDevice.executeShellCommand(command,
-                                       new MultiLineReceiver() {
-
-                                               @Override
-                                               public void processNewLines(String[] lines) {
-                                                       if(!lines[lines.length - 1].contains("0"))
-                                                       {
-                                                       StringBuilder sb = new StringBuilder();
-                                                       for (String line : lines) {
-                                                               line = AnsicodeAdapter.getStripAnsiString(line);        
-                                                               sb.append(line);
-                                                       
-                                               }
-                                                       Status status = new Status(IStatus.ERROR, "Add Folder Failed", 0,
-                                                                       sb.toString() , null);
-                                                       ErrorDialog.openError(Display.getCurrent().getActiveShell(), "Add Folder Failed", "A folder failed to be added", status);
-                                               }
-                                               }
-                                       });
-               } catch (IOException e) {
-                       Logger.error("failed to do add new folder", e);
-                       throw new RuntimeException(e);
-               }
-               refresh(parentEntry);
-       }
-
-       public void renameSelection() {
-               InputDialog renameDialog = new InputDialog(Display.getCurrent()
-                               .getActiveShell(), "Rename Resource", "New name: ",
-                               currentFileEntry.getName(), new FileNameValidator());
-               if (renameDialog.open() != Window.OK)
-                       return;
-
-               String fullPath = currentFileEntry.getFullPath();
-               int lastIndex = fullPath.lastIndexOf(PATH_SEPARATOR);
-               String newPath = fullPath.substring(0, lastIndex) + PATH_SEPARATOR + renameDialog.getValue();
-
-               TreeItem[] items = tree.getSelection();
-
-               if (items.length != 1) {
-                       return;
-               }
-
-               final FileEntry parentEntry = ((FileEntry) items[0].getData())
-                               .getParent();
-               // create the mv command
-               String command = "mv " + fullPath + " " + newPath + CMD_RESULT_CHECK; //$NON-NLS-1$
-
-               try {
-                       mCurrentDevice.executeShellCommand(command,
-                                       new MultiLineReceiver() {
-
-                               @Override
-                               public void processNewLines(String[] lines) {
-                                       if(!lines[lines.length - 1].contains("0"))
-                                       {
-                                       StringBuilder sb = new StringBuilder();
-                                       for (String line : lines) {
-                                               line = AnsicodeAdapter.getStripAnsiString(line);        
-                                               sb.append(line);
-                                       
-                               }
-                                       Status status = new Status(IStatus.ERROR, "Rename failed", 0,
-                                                       sb.toString() , null);
-                                       ErrorDialog.openError(Display.getCurrent().getActiveShell(),  "Rename failed", "A selection failed to be renamed",status);
-                               }
-                               }
-                       });
-               } catch (IOException e) {
-                       Logger.error("failed to do rename", e);
-                       throw new RuntimeException(e);
-               }
-               refresh(parentEntry);
-       }
-
-       public void deleteSelection() {
-               int ret = FileDialogUtils.getInstance().confirmDelete(
-                               currentFileEntry.getName());
-               if (ret == IDialogConstants.CANCEL_ID)
-                       return;
-
-               TreeItem[] items = tree.getSelection();
-
-               for (TreeItem item : items) {
-                       final FileEntry entry = (FileEntry) item.getData();
-                       String command = null;
-                       // create the delete command
-                       if (entry.isDirectory()) {
-                               command = "rm -rf " + entry.getFullEscapedPath() + CMD_RESULT_CHECK; //$NON-NLS-1$
-                       } else {
-                               command = "rm " + entry.getFullEscapedPath() + CMD_RESULT_CHECK; //$NON-NLS-1$
-                       }
-
-                       try {
-                               mCurrentDevice.executeShellCommand(command,
-                                               new MultiLineReceiver() {
-
-                                       @Override
-                                       public void processNewLines(String[] lines) {
-                                               if(!lines[lines.length - 1].contains("0"))
-                                               {
-                                               StringBuilder sb = new StringBuilder();
-                                               for (String line : lines) {
-                                                       line = AnsicodeAdapter.getStripAnsiString(line);        
-                                                       sb.append(line);                                                
-                                               }
-                                               Status status = new Status(IStatus.ERROR, "Delete Failed", 0,
-                                                               sb.toString() , null);
-                                               ErrorDialog.openError(Display.getCurrent().getActiveShell(), "Delete failed", "A selection failed to be deleted", status);
-                                               }
-                                       }
-                               });
-                       } catch (IOException e) {
-                               Logger.error("failed to do delete", e);
-                               throw new RuntimeException(e);
-
-                       }
-                       refresh(entry.getParent());
-               }
-
-       }
-
-       /**
-        * Force a full refresh of the explorer.
-        */
-       public void refresh() {
-               treeViewer.refresh(true);
-       }
-
-       /**
-        * Sent when a new {@link SmartDevelopmentBridge} is started.
-        * <p/>
-        * This is sent from a non UI thread.
-        * 
-        * @param bridge
-        *            the new {@link SmartDevelopmentBridge} object.
-        * 
-        * @see IDebugBridgeChangeListener#serverChanged(SmartDevelopmentBridge)
-        */
-       public void bridgeChanged(final SmartDevelopmentBridge bridge) {
-               if (tree.isDisposed() == false) {
-                       exec(new Runnable() {
-                               public void run() {
-                                       if (tree.isDisposed() == false) {
-                                               // set up the data source.
-                                               treeViewer.setInput(bridge);
-
-                                       } else {
-                                               // tree is disposed, we need to do something.
-                                               // lets remove ourselves from the listener.
-                                               SmartDevelopmentBridge
-                                                               .removeDebugBridgeChangeListener(ConnectionExplorerPanel.this);
-                                               SmartDevelopmentBridge
-                                                               .removeDeviceChangeListener(ConnectionExplorerPanel.this);
-                                       }
-                               }
-                       });
-               }
-
-               // all current devices are obsolete
-               synchronized (devicesToExpand) {
-                       devicesToExpand.clear();
-               }
-       }
-
-       /**
-        * Refresh an entry from a non ui thread.
-        * 
-        * @param entry
-        *            the entry to refresh.
-        */
-       private void refresh(final FileEntry entry) {
-               Display d = treeViewer.getTree().getDisplay();
-               d.asyncExec(new Runnable() {
-                       public void run() {
-                               treeViewer.refresh(entry);
-                       }
-               });
-       }
-       public void refreshSelection() {
-               if (currentFileEntry == null)
-                       return;
-               Display d = treeViewer.getTree().getDisplay();
-               d.asyncExec(new Runnable() {
-                       public void run() {
-                               treeViewer.refresh(currentFileEntry);
-                       }
-               });
-       }
-
-       /**
-        * Pulls the selection from a device.
-        * 
-        * @param items
-        *            the tree selection the remote file on the device
-        * @param localDirector
-        *            the local directory in which to save the files.
-        */
-       private void pullSelection(TreeItem[] items, final String localDirectory) {
-               try {
-                       final SyncService sync = mCurrentDevice.getSyncService();
-                       if (sync != null) {
-                               // make a list of the FileEntry.
-                               ArrayList<FileEntry> entries = new ArrayList<FileEntry>();
-                               for (TreeItem item : items) {
-                                       Object data = item.getData();
-                                       if (data instanceof FileEntry) {
-                                               entries.add((FileEntry) data);
-                                       }
-                               }
-                               final FileEntry[] entryArray = entries
-                                               .toArray(new FileEntry[entries.size()]);
-
-                               // get a progress dialog
-                               new ProgressMonitorDialog(parent.getShell()).run(true, true,
-                                               new IRunnableWithProgress() {
-                                                       public void run(IProgressMonitor monitor)
-                                                                       throws InvocationTargetException,
-                                                                       InterruptedException {
-                                                               // create a monitor wrapper around the jface
-                                                               // monitor
-                                                               SyncResult result = sync
-                                                                               .pull(entryArray,
-                                                                                               localDirectory,
-                                                                                               (ISyncProgressMonitor) new SyncProgressMonitor(
-                                                                                                               monitor,
-                                                                                                               "Pulling file(s) from the device"));
-
-                                                               if (result.getCode() != SyncService.RESULT_OK) {
-                                                                       DdmConsole.printErrorToConsole(String
-                                                                                       .format("Failed to pull selection: %1$s",
-                                                                                                       result.getMessage()));
-                                                               }
-                                                               sync.close();
-                                                       }
-                                               });
-                       }
-               } catch (Exception e) {
-                       DdmConsole.printErrorToConsole("Failed to pull selection");
-                       DdmConsole.printErrorToConsole(e.getMessage());
-               }
-       }
-
-       /**
-        * Pulls a file from a device.
-        * 
-        * @param remote
-        *            the remote file on the device
-        * @param local
-        *            the destination filepath
-        */
-       private void pullFile(final FileEntry remote, final String local) {
-               try {
-                       final SyncService sync = mCurrentDevice.getSyncService();
-                       if (sync != null) {
-                               new ProgressMonitorDialog(parent.getShell()).run(true, true,
-                                               new IRunnableWithProgress() {
-                                                       public void run(IProgressMonitor monitor)
-                                                                       throws InvocationTargetException,
-                                                                       InterruptedException {
-                                                               SyncResult result = sync
-                                                                               .pullFile(
-                                                                                               remote,
-                                                                                               local,
-                                                                                               (ISyncProgressMonitor) new SyncProgressMonitor(
-                                                                                                               monitor,
-                                                                                                               String.format(
-                                                                                                                               "Pulling %1$s from the device",
-                                                                                                                               remote.getName())));
-                                                               if (result.getCode() != SyncService.RESULT_OK) {
-                                                                       DdmConsole.printErrorToConsole(String
-                                                                                       .format("Failed to pull %1$s: %2$s",
-                                                                                                       remote, result.getMessage()));
-                                                               }
-
-                                                               sync.close();
-                                                       }
-                                               });
-                       }
-               } catch (Exception e) {
-                       DdmConsole.printErrorToConsole("Failed to pull selection");
-                       DdmConsole.printErrorToConsole(e.getMessage());
-               }
-       }
-
-       /**
-        * Pushes several files and directory into a remote directory.
-        * 
-        * @param localFiles
-        * @param remoteDirectory
-        */
-       private void pushFiles(final String[] localFiles,
-                       final FileEntry remoteDirectory) {
-               try {
-                       final SyncService sync = mCurrentDevice.getSyncService();
-                       if (sync != null) {
-                               new ProgressMonitorDialog(parent.getShell()).run(true, true,
-                                               new IRunnableWithProgress() {
-                                                       public void run(IProgressMonitor monitor)
-                                                                       throws InvocationTargetException,
-                                                                       InterruptedException {
-                                                               SyncResult result = sync
-                                                                               .push(localFiles,
-                                                                                               remoteDirectory,
-                                                                                               (ISyncProgressMonitor) new SyncProgressMonitor(
-                                                                                                               monitor,
-                                                                                                               "Pushing file(s) to the device"));
-                                                               if (result.getCode() != SyncService.RESULT_OK) {
-                                                                       DdmConsole.printErrorToConsole(String
-                                                                                       .format("Failed to push the items: %1$s",
-                                                                                                       result.getMessage()));
-                                                               }
-
-                                                               sync.close();
-                                                       }
-                                               });
-                       }
-               } catch (Exception e) {
-                       DdmConsole.printErrorToConsole("Failed to push the items");
-                       DdmConsole.printErrorToConsole(e.getMessage());
-               }
-       }
-
-       /**
-        * Pushes a file on a device.
-        * 
-        * @param local
-        *            the local file path of the file to push
-        * @param remoteDirectory
-        *            the remote destination directory on the device
-        */
-       private void pushFile(final String local, final String remoteDirectory) {
-               try {
-                       final SyncService sync = mCurrentDevice.getSyncService();
-                       if (sync != null) {
-                               new ProgressMonitorDialog(parent.getShell()).run(true, true,
-                                               new IRunnableWithProgress() {
-                                                       public void run(IProgressMonitor monitor)
-                                                                       throws InvocationTargetException,
-                                                                       InterruptedException {
-                                                               // get the file name
-                                                               String[] segs = local.split(Pattern
-                                                                               .quote(File.separator));
-                                                               String name = segs[segs.length - 1];
-                                                               String remoteFile = remoteDirectory + FileListingService.FILE_SEPARATOR + name;
-
-                                                               SyncResult result = sync
-                                                                               .pushFile(
-                                                                                               local,
-                                                                                               remoteFile,
-                                                                                               (ISyncProgressMonitor) new SyncProgressMonitor(
-                                                                                                               monitor,
-                                                                                                               String.format(
-                                                                                                                               "Pushing %1$s to the device.",
-                                                                                                                               name)));
-                                                               if (result.getCode() != SyncService.RESULT_OK) {
-                                                                       DdmConsole.printErrorToConsole(String
-                                                                                       .format("Failed to push %1$s on %2$s: %3$s",
-                                                                                                       name, mCurrentDevice
-                                                                                                                       .getSerialNumber(),
-                                                                                                       result.getMessage()));
-                                                               }
-
-                                                               sync.close();
-                                                       }
-                                               });
-                       }
-               } catch (Exception e) {
-                       DdmConsole.printErrorToConsole("Failed to push the item(s).");
-                       DdmConsole.printErrorToConsole(e.getMessage());
-               }
-       }
-
-       /**
-        * Sent when the a device is connected to the {@link SmartDevelopmentBridge}
-        * .
-        * <p/>
-        * This is sent from a non UI thread.
-        * 
-        * @param device
-        *            the new device.
-        * 
-        * @see IDeviceChangeListener#deviceConnected(IDevice)
-        */
-       public void deviceConnected(IDevice device) {
-               if (device.isOffline())
-                       return;
-               devicesList.add(device);
-               ToolsInstall.installPackages(device);
-               
-               exec(new Runnable() {
-                       public void run() {
-                               if (tree.isDisposed() == false) {
-                                       // refresh all
-                                       treeViewer.refresh();
-
-                                       // notify the listener of a possible selection change.
-                                       notifyListeners();
-                               } else {
-                                       // tree is disposed, we need to do something.
-                                       // lets remove ourselves from the listener.
-                                       SmartDevelopmentBridge
-                                                       .removeDebugBridgeChangeListener(ConnectionExplorerPanel.this);
-                                       SmartDevelopmentBridge
-                                                       .removeDeviceChangeListener(ConnectionExplorerPanel.this);
-                               }
-                       }
-               });
-
-               synchronized (devicesToExpand) {
-                       devicesToExpand.add(device);
-               }
-
-       }
-
-       @Override
-       public void deviceDisconnected(IDevice device) {
-               devicesList.remove(device);
-               exec(new Runnable() {
-                       public void run() {
-                               if (tree.isDisposed() == false) {
-                                       // refresh all
-                                       treeViewer.refresh();
-
-                                       // notify the listener of a possible selection change.
-                                       notifyListeners();
-                               } else {
-                                       // tree is disposed, we need to do something.
-                                       // lets remove ourselves from the listener.
-                                       SmartDevelopmentBridge
-                                                       .removeDebugBridgeChangeListener(ConnectionExplorerPanel.this);
-                                       SmartDevelopmentBridge
-                                                       .removeDeviceChangeListener(ConnectionExplorerPanel.this);
-                               }
-                       }
-               });
-
-               synchronized (devicesToExpand) {
-                       devicesToExpand.add(device);
-               }
-               // }
-       }
-
-       @Override
-       public void deviceChanged(IDevice device, int changeMask) {
-               if (changeMask == 1) {
-                       devicesList.add(device);
-                       ToolsInstall.installPackages(device);
-                       exec(new Runnable() {
-                               public void run() {
-                                       if (tree.isDisposed() == false) {
-                                               // refresh all
-                                               treeViewer.refresh();
-
-                                               // notify the listener of a possible selection change.
-                                               notifyListeners();
-                                       } else {
-                                               // tree is disposed, we need to do something.
-                                               // lets remove ourselves from the listener.
-                                               SmartDevelopmentBridge
-                                                               .removeDebugBridgeChangeListener(ConnectionExplorerPanel.this);
-                                               SmartDevelopmentBridge
-                                                               .removeDeviceChangeListener(ConnectionExplorerPanel.this);
-                                       }
-                               }
-                       });
-
-                       synchronized (devicesToExpand) {
-                               devicesToExpand.add(device);
-                       }
-               }
-       }
-
-       public ArrayList<IDevice> getDeviceList() {
-               return devicesList;
-       }
-
-       private void exec(Runnable runnable) {
-               if (tree.isDisposed() == false) {
-               try {
-                       Display display = tree.getDisplay();
-                       display.asyncExec(runnable);
-               } catch (SWTException e) {
-                       // tree is disposed, we need to do something. lets remove ourselves
-                       // from the listener.
-                       SmartDevelopmentBridge
-                                       .removeDebugBridgeChangeListener(ConnectionExplorerPanel.this);
-                       SmartDevelopmentBridge
-                                       .removeDeviceChangeListener(ConnectionExplorerPanel.this);
-               }
-               }
-       }
-
-       private void notifyListeners() {
-               // get the selection
-               TreeItem[] items = tree.getSelection();
-
-               FileEntry file = null;
-
-               if (items.length != 0) {
-                       Object object = items[0].getData();
-                       if (object instanceof FileEntry) {
-                               file = (FileEntry) object;
-                       }
-               }
-               notifySelectionListeners(file);
-       }
-
-       private void notifySelectionListeners(FileEntry file) {
-               if (file != null) {
-                       mCurrentDevice = file.getFileListingService().getDevice();
-               } else {
-                       IDevice[] devices = SmartDevelopmentBridge.getBridge().getDevices();
-                       if (devices.length != 0) {
-                               mCurrentDevice = devices[0];
-                               file = devices[0].getFileListingService().getRoot();
-                               for (TreeItem item : tree.getItems()) {
-                                if (item.getText().equals(file.getName()))
-                                tree.setSelection(item);
-                                }
-                       } else
-                               mCurrentDevice = null;
-               }
-               currentFileEntry = file;
-               ConnectionPlugin.getDefault().setCurrentDevice(mCurrentDevice);
-               ConnectionPlugin.getDefault().notifySelectionListeners(file);
-               setIconEnabled();
-       }
-       
-       public TreeViewer getTreeViewer() {
-               return treeViewer;
-       }
-
-       class FileNameValidator implements IInputValidator {
-
-               @Override
-               public String isValid(String newText) {
-                       if (newText.contains(INVALID_FOR_FILENAME))
-                               return "\"" + INVALID_FOR_FILENAME + "\" is invalid character for file name.";
-                       return null;
-               }
-       }
-
-       public void setActionState() {
-               subMenu.setVisible(true);
-               actionPush.setEnabled(true);
-               actionPull.setEnabled(true);
-               actionRename.setEnabled(true);
-               actionRefresh.setEnabled(true);
-               actionDelete.setEnabled(true);
-               actionProperty.setEnabled(true);
-
-               if (currentFileEntry == null) {
-                       subMenu.setVisible(false);
-                       actionPush.setEnabled(false);
-                       actionPull.setEnabled(false);
-                       actionRename.setEnabled(false);
-                       actionRefresh.setEnabled(false);
-                       actionDelete.setEnabled(false);
-                       actionProperty.setEnabled(false);
-                       return;
-               }
-               if (currentFileEntry.isRoot()) {
-                       actionPull.setEnabled(false);
-                       actionRename.setEnabled(false);
-                       actionDelete.setEnabled(false);
-                       return;
-               }
-               if (!currentFileEntry.isDirectory()) {
-                       subMenu.setVisible(false);
-                       actionPush.setEnabled(false);
-                       return;
-               }
-       }
-
-       private void setIconEnabled() {
-               boolean bPush = false;
-               boolean bPull = false;
-
-               if (currentFileEntry == null) {
-                       bPush = false;
-                       bPull = false;
-               } else {
-                       if (currentFileEntry.isRoot()) {
-                               bPush = true;
-                               bPull = false;                          
-                       } else if (!currentFileEntry.isDirectory()) {
-                               bPush = false;
-                               bPull = true;
-                       } else  {
-                               bPush = true;
-                               bPull = true;
-                               }
-               }
-
-               pushToolItem.setEnabled(bPush);
-               pullToolItem.setEnabled(bPull);
-
-       }
-
-       @Override
-       public void selectionChanged(final FileEntry selectedEntry) {
-                       if (selectedEntry == null)
-                               return;
-                       
-                       if (!selectedEntry.isRoot())
-                               return;
-                       
-                       exec(new Runnable() {
-                               public void run() {
-                                       if (tree.isDisposed() == false) {
-                                               for (TreeItem item : tree.getItems()) {
-                                                       if (item.getText().equals(selectedEntry.getName()))
-                                                               tree.setSelection(item);
-                                               }
-                                       } else {
-                                               // tree is disposed, we need to do something.
-                                               // lets remove ourselves from the listener.
-                                               ConnectionPlugin.getDefault().removeSelectionListener(ConnectionExplorerPanel.this);
-                                       }
-                               }
-                       });
-       }
+public class ConnectionExplorerPanel extends Panel implements IDeviceChangeListener, IDebugBridgeChangeListener, ISelectionListener
+{
+
+    private static final String DRAGACTIONID = "org.tizen.common.connection.filedrop";
+
+    private static final String COLUMN_NAME = "name"; //$NON-NLS-1S
+
+    private Composite parent;
+    private TreeViewer treeViewer;
+    private ConnectionExplorerContentProvider contentProvider;
+    
+    private boolean bSubLog = false;
+    private final int STATE_PROPERTY = 0x0000001;
+    private final int STATE_DELETE = 0x0000010;
+    private final int STATE_RENAME = 0x0000100; 
+    private final int STATE_REFRESH = 0x0001000;
+    private final int STATE_PULL = 0x0010000;
+    private final int STATE_PUSH = 0x0100000;
+    private final int STATE_SUB = 0x1000000;
+
+    private ToolItem pushToolItem;
+    private ToolItem pullToolItem;
+//    private ToolItem emulStartToolItem;
+
+    private MenuManager subNewMenu;
+    private Action actionPush;
+    private Action actionPull;
+    private Action actionRefresh;
+    private Action actionRename;
+    private Action actionProperty;
+    private Action actionDelete;
+    private MenuManager subLogMenu;
+
+    private IDevice currentDevice;
+
+    private String defaultSave;
+    // only use on linux system
+    private static final String PATH_SEPARATOR = "/";
+
+    private final List<IDevice> devicesList = new ArrayList<IDevice>();
+
+    private final MessageConsoleStream console;
+
+    public ConnectionExplorerPanel()
+    {
+        ConsoleManager cm = new ConsoleManager("ConnectionExplorer", false);
+        cm.clear();
+        console = cm.getMessageConsoleStream();
+    }
+
+    @Override
+    protected Control createControl(Composite pParent)
+    {
+        parent = pParent;
+        parent.setLayout(new FillLayout());
+
+        treeViewer = new TreeViewer(parent, SWT.MULTI | SWT.FULL_SELECTION);
+        Tree tree = treeViewer.getTree();
+        IPreferenceStore store = DdmUiPreferences.getStore();
+
+        TableHelper.createTreeColumn(tree, Messages.getString("ConnectionExplorer.tree.header"), SWT.LEFT, "abcdefghijklmnopqrstuvwzabcdefghijk", COLUMN_NAME, store); //$NON-NLS-1$
+        tree.setHeaderVisible(true);
+
+        contentProvider = new ConnectionExplorerContentProvider();
+        treeViewer.setContentProvider(contentProvider);
+        treeViewer.setLabelProvider(new ConnectionExplorerLabelProvider(parent.getDisplay()));
+
+        tree.addSelectionListener(new SelectionAdapter()
+        {
+            @Override
+            public void widgetSelected(SelectionEvent e)
+            {
+                // set device for selected FileEntry when select FileEntry on tree
+                notifyListeners();
+            }
+        });
+
+        // setup drag listener
+        treeViewer.addDragSupport(DND.DROP_MOVE | DND.DROP_COPY, new Transfer[] { PluginTransfer.getInstance(), FileEntryTransfer.getInstance() },
+                new DragSourceListener()
+                {
+
+                    @Override
+                    public void dragStart(DragSourceEvent e)
+                    {
+
+                        TreeItem[] items = treeViewer.getTree().getSelection();
+
+                        for (int i = 0; i < items.length; i++)
+                        {
+                            Object data = items[i].getData();
+                            if (data instanceof FileEntry)
+                            {
+                                if (((FileEntry) data).isDirectory() == true || ((FileEntry) data).isRoot() == true)
+                                {
+                                    e.doit = false;
+                                    return;
+                                }
+                            }
+                        }
+                        e.doit = true;
+                    }
+
+                    @Override
+                    public void dragFinished(DragSourceEvent arg0)
+                    {
+
+                    }
+
+                    @Override
+                    public void dragSetData(DragSourceEvent e)
+                    {
+                        // get the selection
+                        TreeItem[] items = treeViewer.getTree().getSelection();
+                        FileEntry[] entries = new FileEntry[items.length];
+
+                        for (int i = 0; i < items.length; i++)
+                        {
+                            Object data = items[i].getData();
+                            if (data instanceof FileEntry)
+                            {
+                                entries[i] = ((FileEntry) data);
+                            }
+                        }
+
+                        if (FileEntryTransfer.getInstance().isSupportedType(e.dataType))
+                        {
+                            e.data = entries;
+                        } else if (PluginTransfer.getInstance().isSupportedType(e.dataType))
+                        {
+                            byte[] data = FileEntryTransfer.getInstance().toByteArray(entries);
+                            e.data = new PluginTransferData(DRAGACTIONID, data);
+                        }
+                    }
+                });
+
+        // setup drop listener
+        treeViewer.addDropSupport(DND.DROP_COPY | DND.DROP_MOVE, new Transfer[] { FileTransfer.getInstance() }, new ViewerDropAdapter(treeViewer)
+        {
+            @Override
+            public boolean performDrop(Object data)
+            {
+                // get the item on which we dropped the item(s)
+                FileEntry target = (FileEntry) getCurrentTarget();
+
+                // in case we drop at the same level as root
+                if (target == null)
+                {
+                    return false;
+                }
+
+                // if the target is not a directory, we get the parent directory
+                if (target.isDirectory() == false)
+                {
+                    target = target.getParent();
+                }
+
+                if (target == null)
+                {
+                    return false;
+                }
+
+                // get the list of files to drop
+                String[] files = (String[]) data;
+
+                // do the drop
+                pushFiles(files, target);
+
+                // we need to finish with a refresh
+                refresh(target);
+
+                return true;
+            }
+
+            @Override
+            public boolean validateDrop(Object target, int operation, TransferData transferType)
+            {
+                if (target == null)
+                {
+                    return false;
+                }
+
+                // convert to the real item
+                FileEntry targetEntry = (FileEntry) target;
+
+                // if the target is not a directory, we get the parent directory
+                if (targetEntry.isDirectory() == false)
+                {
+                    target = targetEntry.getParent();
+                }
+
+                if (target == null)
+                {
+                    return false;
+                }
+
+                return true;
+            }
+        });
+
+        return tree;
+    }
+
+    public void setToolItems(ToolItem push, ToolItem pull, ToolItem start)
+    {
+        pushToolItem = push;
+        pullToolItem = pull;
+//        emulStartToolItem = start;
+    }
+
+    public void setActions(MenuManager pSubMenu, Action pActionPush, Action pActionPull, Action pActionRefresh, Action pActionRename, Action pActionProperty,
+            Action pActionDelete, MenuManager pSubLogMenu)
+    {
+        subNewMenu = pSubMenu;
+        actionPush = pActionPush;
+        actionPull = pActionPull;
+        actionRefresh = pActionRefresh;
+        actionRename = pActionRename;
+        actionProperty = pActionProperty;
+        actionDelete = pActionDelete;
+        subLogMenu = pSubLogMenu;
+        setActionEnabled();
+    }
+
+    @Override
+    protected void postCreation()
+    {
+        ConnectionPlugin.getDefault().addSelectionListener(this);
+        SmartDevelopmentBridge.addDebugBridgeChangeListener(this);
+        SmartDevelopmentBridge.addDeviceChangeListener(this, true);
+    }
+
+    /**
+     * Sets the focus to the proper control inside the panel.
+     */
+    @Override
+    public void setFocus()
+    {
+        treeViewer.getTree().setFocus();
+    }
+
+    /**
+     * Pull the current selection on the local drive. This method displays a
+     * dialog box to let the user select where to store the file(s) and
+     * folder(s).
+     */
+    public void pullSelection()
+    {
+        DirectoryDialog dlg = new DirectoryDialog(parent.getShell(), SWT.SAVE);
+
+        setDialog(dlg, "Pull the selected content");
+
+        String directoryName = dlg.open();
+
+        if (directoryName != null)
+        {
+            pullSelection(treeViewer.getTree().getSelection(), directoryName);
+        }
+    }
+
+    /**
+     * Push new file(s) and folder(s) into the current selection. Current
+     * selection must be single item. If the current selection is not a
+     * directory, the ` directory is used. This method displays a dialog to let
+     * the user choose file to push to the device.
+     */
+    public void pushIntoSelection()
+    {
+        doActionForEntry(new IActionForEntry()
+        {
+            @Override
+            public void doAction()
+            {
+                FileEntry entry = getSingleFileEntry();
+
+                FileDialog dlg = new FileDialog(parent.getShell(), SWT.OPEN);
+
+                setDialog(dlg, "Push the Files");
+
+                String[] fileName = new String[1];
+                fileName[0] = dlg.open();
+
+                if (fileName[0] != null)
+                {
+                    // we need to figure out the remote path based on the
+                    // current selection type.
+                    FileEntry refreshFileEntry;
+
+                    if (entry.isDirectory() || entry.isRoot())
+                    {
+                        refreshFileEntry = entry;
+                    } else
+                    {
+                        refreshFileEntry = entry.getParent();
+                    }
+
+                    pushFiles(fileName, refreshFileEntry);
+                    refresh(refreshFileEntry);
+                }
+            }
+
+            @Override
+            public boolean doCheckEnable()
+            {
+                return isSingleEntry() && actionPush.isEnabled();
+            }
+        });
+    }
+
+    // only for FileDialog and DirectoryDialog
+    private void setDialog(Dialog dialog, String text)
+    {
+        dialog.setText(text);
+
+        String defaultPath = defaultSave;
+        if (defaultPath == null)
+        {
+            defaultPath = System.getProperty("user.home"); //$NON-NLS-1$
+        }
+
+        if (dialog instanceof FileDialog)
+        {
+            FileDialog dlg = (FileDialog) dialog;
+            dlg.setFilterPath(defaultPath);
+            defaultSave = dlg.getFilterPath();
+        } else if (dialog instanceof DirectoryDialog)
+        {
+            DirectoryDialog dlg = (DirectoryDialog) dialog;
+            dlg.setFilterPath(defaultPath);
+            defaultSave = dlg.getFilterPath();
+        }
+    }
+
+    public void addNewFileSelection()
+    {
+        doActionForEntry(new IActionForEntry()
+        {
+            @Override
+            public void doAction()
+            {
+
+                FileEntry entry = getSingleFileEntry();
+
+                String name = getNameFromInputDialog("New File Resource", "New File Name: ", entry, "");
+
+                if (name == null)
+                {
+                    return;
+                }
+
+                String fullPath = FilenameUtil.addDoubleQuote(entry.getFullEscapedPath() + "/" + name);
+                String command = String.format("touch %s; echo $?", fullPath);
+                try
+                {
+                    currentDevice.executeShellCommand(command, new MultiLineReceiver()
+                    {
+
+                        @Override
+                        public void processNewLines(String[] lines)
+                        {
+                            sayError(lines, "add_file_error", "A file failed to be added");
+                        }
+                    });
+                } catch (IOException e)
+                {
+                    Logger.error("failed to add new file", e.getMessage());
+                    throw new RuntimeException(e);
+                }
+                refresh(entry);
+            }
+
+            @Override
+            public boolean doCheckEnable()
+            {
+                return isSingleEntry();
+            }
+        });
+    }
+
+    public void addNewFolderSelection()
+    {
+        doActionForEntry(new IActionForEntry()
+        {
+            @Override
+            public void doAction()
+            {
+
+                FileEntry entry = getSingleFileEntry();
+
+                String name = getNameFromInputDialog("New Folder Resource", "New Folder Name: ", entry, "");
+                if (name == null)
+                {
+                    return;
+                }
+
+                // create the mkdir command
+                String fullPath = FilenameUtil.addDoubleQuote(entry.getFullEscapedPath() + "/" + name);
+                String command = String.format("mkdir %s; echo $?", fullPath);
+                try
+                {
+                    currentDevice.executeShellCommand(command, new MultiLineReceiver()
+                    {
+                        @Override
+                        public void processNewLines(String[] lines)
+                        {
+                            sayError(lines, "add_folder_error", "A folder failed to be added");
+                        }
+                    });
+                } catch (IOException e)
+                {
+                    Logger.error("failed to add new folder", e);
+                    throw new RuntimeException(e);
+                }
+                refresh(entry);
+            }
+
+            @Override
+            public boolean doCheckEnable()
+            {
+                return isSingleEntry();
+            }
+        });
+    }
+
+    // Get user input for adding new file or folder and rename
+    private String getNameFromInputDialog(String title, String message, FileEntry entry, String initValue)
+    {
+        boolean again;
+        InputDialog inputDialog;
+
+        do
+        {
+            again = false;
+            // open dialog to get input
+            inputDialog = new InputDialog(Display.getCurrent().getActiveShell(), title, message, initValue, new FileNameValidator());
+
+            if (inputDialog.open() != Window.OK)
+            {
+                return null;
+            }
+
+            String input = inputDialog.getValue();
+            // same entry is already exist..
+            if (findDuplicateFileEntry(input, entry))
+            {
+                again = true;
+            }
+
+        } while (again);
+
+        return FilenameUtil.getEscapedName(inputDialog.getValue());
+    }
+
+    public void renameSelection()
+    {
+        doActionForEntry(new IActionForEntry()
+        {
+            @Override
+            public void doAction()
+            {
+
+                FileEntry entry = getSingleFileEntry();
+
+                String name = getNameFromInputDialog("Rename Resource", "New name: ", entry.getParent(), entry.getName());
+
+                if (name == null)
+                {
+                    return;
+                }
+
+                String fullPath = entry.getFullEscapedPath();
+                int lastIndex = fullPath.lastIndexOf(PATH_SEPARATOR);
+                String newPath = fullPath.substring(0, lastIndex) + PATH_SEPARATOR + name;
+
+                // create the mv command
+                String command = String.format("mv %s %s; echo $?", FilenameUtil.addDoubleQuote(fullPath), FilenameUtil.addDoubleQuote(newPath));
+                try
+                {
+                    currentDevice.executeShellCommand(command, new MultiLineReceiver()
+                    {
+
+                        @Override
+                        public void processNewLines(String[] lines)
+                        {
+                            sayError(lines, "rename_error", "A selection failed to be renamed");
+                        }
+                    });
+                } catch (IOException e)
+                {
+                    Logger.error("failed to rename", e);
+                    throw new RuntimeException(e);
+                }
+                refresh(entry.getParent());
+            }
+
+            @Override
+            public boolean doCheckEnable()
+            {
+                return isSingleEntry() && actionRename.isEnabled();
+            }
+        });
+    }
+
+    public void deleteSelection()
+    {
+        doActionForEntry(new IActionForEntry()
+        {
+            @Override
+            public void doAction()
+            {
+                TreeItem[] items = treeViewer.getTree().getSelection();
+                for (TreeItem item : items)
+                {
+                    Object obj = item.getData();
+                    if (obj instanceof FileEntry)
+                    {
+                        FileEntry entry = (FileEntry) obj;
+                        int ret = FileDialogUtils.confirmDelete(entry.getName());
+                        if (ret == IDialogConstants.CANCEL_ID)
+                        {
+                            continue;
+                        }
+
+                        String command = null;
+                        // create the delete command
+                        if (entry.isDirectory())
+                        {
+                            command = String.format("rm -rf %s; echo $?", FilenameUtil.addDoubleQuote(entry.getFullEscapedPath()));
+                        } else
+                        {
+                            command = String.format("rm %s; echo $?", FilenameUtil.addDoubleQuote(entry.getFullEscapedPath()));
+                        }
+
+                        try
+                        {
+                            currentDevice.executeShellCommand(command, new MultiLineReceiver()
+                            {
+
+                                @Override
+                                public void processNewLines(String[] lines)
+                                {
+                                    sayError(lines, "delete_error", "A selection failed to be deleted");
+                                }
+                            });
+                            item.dispose();
+                        } catch (IOException e)
+                        {
+                            Logger.error("failed to delete", e);
+                            throw new RuntimeException(e);
+
+                        }
+                         refresh(entry.getParent());
+                         setActionEnabled();
+                    }
+                }
+            }
+
+            @Override
+            public boolean doCheckEnable()
+            {
+                return actionDelete.isEnabled();
+            }
+        });
+    }
+    
+    public void showPropertySelection(final IWorkbenchPartSite site)
+    {
+        doActionForEntry(new IActionForEntry()
+        {
+            @Override
+            public void doAction()
+            {
+                PropertyDialogAction pda = new PropertyDialogAction(site, treeViewer);
+                pda.run();
+            }
+
+            @Override
+            public boolean doCheckEnable()
+            {
+                return actionProperty.isEnabled();
+            }
+        });
+    }
+    
+    public void setPlatformLogOnOff(boolean On)
+    {
+        String command = String.format("dlogctrl set platformlog %s; echo $?", On ? "1" : "0");
+        try
+        {
+            currentDevice.executeShellCommand(command);
+        } catch (IOException e)
+        {
+            Logger.error("failed to set platform log", e);
+            throw new RuntimeException(e);
+        }
+    }
+
+    private void sayError(String[] lines, String id, String message)
+    {
+        if (!lines[lines.length - 1].contains("0"))
+        {
+            StringBuilder sb = new StringBuilder();
+            for (String line : lines)
+            {
+                line = AnsicodeAdapter.getStripAnsiString(line);
+                sb.append(line);
+            }
+            Status status = new Status(IStatus.ERROR, id, 0, sb.toString(), null);
+            ErrorDialog.openError(Display.getCurrent().getActiveShell(), Messages.getString("FileDialogUtils.message.title"), message, status);
+        }
+    }
+
+    /**
+     * Sent when a new {@link SmartDevelopmentBridge} is started.
+     * <p/>
+     * This is sent from a non UI thread.
+     *
+     * @param bridge
+     *            the new {@link SmartDevelopmentBridge} object.
+     *
+     * @see IDebugBridgeChangeListener#serverChanged(SmartDevelopmentBridge)
+     */
+    @Override
+    public void bridgeChanged(final SmartDevelopmentBridge bridge)
+    {
+        final Tree tree = treeViewer.getTree();
+        if (tree.isDisposed() == false)
+        {
+            exec(new Runnable()
+            {
+                @Override
+                public void run()
+                {
+                    if (tree.isDisposed() == false)
+                    {
+                        // set up the data source.
+                        treeViewer.setInput(bridge);
+                    } else
+                    {
+                        // tree is disposed, we need to do something.
+                        // lets remove ourselves from the listener.
+                        SmartDevelopmentBridge.removeDebugBridgeChangeListener(ConnectionExplorerPanel.this);
+                        SmartDevelopmentBridge.removeDeviceChangeListener(ConnectionExplorerPanel.this);
+                    }
+                }
+            });
+        }
+    }
+
+    /**
+     * Refresh an entry from a non ui thread.
+     *
+     * @param entry
+     *            the entry to refresh.
+     */
+    private void refresh(final FileEntry entry)
+    {
+        Display d = treeViewer.getTree().getDisplay();
+        d.asyncExec(new Runnable()
+        {
+            @Override
+            public void run()
+            {
+                treeViewer.refresh(entry, true);
+            }
+        });
+    }
+
+    public void refreshSelection()
+    {
+        if (treeViewer.getTree().getSelectionCount() == 0)
+        {
+            return;
+        }
+        refresh(getSingleFileEntry());
+    }
+
+    /**
+     * Pulls the selection from a device.
+     *
+     * @param items
+     *            the tree selection the remote file on the device
+     * @param localDirector
+     *            the local directory in which to save the files.
+     */
+    private void pullSelection(TreeItem[] items, final String localDirectory)
+    {
+        try
+        {
+            final SyncService sync = currentDevice.getSyncService();
+            if (sync != null)
+            {
+                // make a list of the FileEntry.
+                List<FileEntry> entries = new ArrayList<FileEntry>();
+                for (TreeItem item : items)
+                {
+                    Object data = item.getData();
+                    if (data instanceof FileEntry)
+                    {
+                        FileEntry entry = (FileEntry)data;
+                        if (!FilenameUtil.isVaildName(entry.getName()))
+                        {
+                            DialogUtil.openErrorDialog(entry.getName() + "\n" + 
+                                    ConnectionUIMessages.Explorer_Message_Invalid_Character
+                                    + FilenameUtil.getInvalidCharacters());
+                            continue;
+                        }
+                        entries.add((FileEntry) data);
+                    }
+                }
+                final FileEntry[] entryArray = entries.toArray(new FileEntry[entries.size()]);
+
+                // get a progress dialog
+                final ProgressMonitorDialog pmd = new ProgressMonitorDialog(parent.getShell());
+                pmd.run(true, true, new IRunnableWithProgress()
+                {
+                    @Override
+                    public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
+                    {
+                        int timeOut = ConnectionPlugin.getDefault().getPreferenceStore().getInt(TizenConnectionExplorerPreferencePage.KEY_PUSHPULL_TIMEOUT);
+                        // create a monitor wrapper around the jface monitor
+                        SyncResult result = sync.pull(entryArray, localDirectory, (ISyncProgressMonitor) new SyncProgressMonitor(monitor,
+                                "Pulling file(s) from the device"), timeOut);
+
+                        if (result.getCode() != SyncService.RESULT_OK)
+                        {
+                            String message = String.format("Failed to pull selection: \n%1$s", result.getMessage());
+                            console.println(message);
+                            openFailDialog(message);
+                        }
+                        sync.close();
+                    }
+                });
+            }
+        } catch (Exception e)
+        {
+            String message = "Exception while pulling the selection : " + e.getMessage();
+            console.println(message);
+            DialogUtil.openErrorDialog(message);
+        }
+    }
+    
+    private void openFailDialog(final String message)
+    {
+        Display display = parent.getDisplay();
+        display.asyncExec(new Runnable()
+        {
+            @Override
+            public void run()
+            {
+                DialogUtil.openErrorDialog(parent.getShell(), "ERROR", message);
+            }
+        });
+    }
+
+    /**
+     * Pushes several files and directory into a remote directory.
+     *
+     * @param localFiles
+     * @param remoteDirectory
+     */
+    private void pushFiles(final String[] localFiles, final FileEntry remoteDirectory)
+    {
+        final String[] files = getFilesToOverwrite(localFiles, remoteDirectory);
+        if ( isEmpty( files ) )
+        {
+            return;
+        }
+        try
+        {
+            final SyncService sync = currentDevice.getSyncService();
+            if (sync != null)
+            {
+                new ProgressMonitorDialog(parent.getShell()).run(true, true, new IRunnableWithProgress()
+                {
+                    @Override
+                    public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
+                    {
+                        int timeOut = ConnectionPlugin.getDefault().getPreferenceStore().getInt(TizenConnectionExplorerPreferencePage.KEY_PUSHPULL_TIMEOUT);
+                        SyncResult result = sync.push(files, remoteDirectory, (ISyncProgressMonitor) new SyncProgressMonitor(monitor,
+                                "Pushing file(s) to the device"), timeOut);
+                        if (result.getCode() != SyncService.RESULT_OK)
+                        {
+                            String message = String.format("Failed to push the items: \n%1$s", result.getMessage());
+                            console.println(message);
+                            openFailDialog(message);
+                        }
+                        sync.close();
+                    }
+                });
+            }
+        } catch (Exception e)
+        {
+            String message = "Exception while pushing the items : " + e.getMessage();
+            DialogUtil.openErrorDialog(message);
+            console.println(message);
+        }
+    }
+
+    private String[] getFilesToOverwrite(String[] src, FileEntry des)
+    {
+        FileEntry[] children = des.getFileListingService().getChildren(des, false, null);
+
+        List<String> listToOverwrite = new ArrayList<String>();
+        boolean yesAll = false;
+
+        for (String source : src)
+        {
+            File f = new File(source);
+            boolean bFind = false;
+            for (FileEntry entry : children)
+            {
+                if (entry.getName().equals(f.getName()))
+                {
+                    bFind = true;
+                    break;
+                }
+            }
+
+            if (bFind)
+            {
+                if (!yesAll)
+                {
+                    int ret;
+                    if (src.length == 1)
+                    {
+                        ret = FileDialogUtils.allowFileOverwrite(f.getName());
+                        if( ret == IDialogConstants.CANCEL_ID)
+                        {
+                            break;
+                        }
+                    } else
+                    {
+                        ret = FileDialogUtils.checkOverwrite(f.getName());
+                        switch (ret )
+                        {
+                        case FileDialogUtils.CANCEL_ID:
+                            return null;
+                        case FileDialogUtils.NO_ID:
+                            continue;
+                        case FileDialogUtils.YES_TO_ALL_ID:
+                            yesAll = true;
+                            break;
+                        case FileDialogUtils.YES_ID:
+                            break;
+                        default:
+                            break;
+                        }
+                    }
+                }
+            }
+            listToOverwrite.add(source);
+        }
+        return listToOverwrite.toArray(new String[0]);
+    }
+
+    private boolean findDuplicateFileEntry(String src, FileEntry des)
+    {
+        FileEntry[] children = des.getFileListingService().getChildren(des, false, null);
+
+        for (FileEntry entry : children)
+        {
+            File f = new File(src);
+
+            if (entry.getName().equals(f.getName()))
+            {
+                FileDialogUtils.notifyDuplication((f.getName()));
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Sent when the a device is connected to the {@link SmartDevelopmentBridge}
+     * .
+     * <p/>
+     * This is sent from a non UI thread.
+     *
+     * @param device
+     *            the new device.
+     *
+     * @see IDeviceChangeListener#deviceConnected(IDevice)
+     */
+    @Override
+    public void deviceConnected(IDevice device)
+    {
+        if (device.isOffline())
+        {
+            return;
+        }
+        devicesList.add(device);
+
+        // Installs on demand all packages Tizen SDK needed
+        OnDemandInstall onDemand = new OnDemandInstall(device);
+        onDemand.setBlocking(false);
+        onDemand.install(OnDemandInstall.getNullIProgressMonitor());
+
+        execRefresh();
+    }
+
+    @Override
+    public void deviceDisconnected(IDevice device)
+    {
+        devicesList.remove(device);
+        execRefresh();
+    }
+
+    @Override
+    public void deviceChanged(IDevice device, int changeMask)
+    {
+        if (changeMask == 1)
+        {
+            deviceConnected(device);
+        }
+    }
+
+    private void execRefresh()
+    {
+        exec(new Runnable()
+        {
+            @Override
+            public void run()
+            {
+                if (treeViewer.getTree().isDisposed() == false)
+                {
+                    // refresh all
+                    treeViewer.refresh();
+
+                    // notify the listener of a possible selection change.
+                    notifyListeners();
+                } else
+                {
+                    // tree is disposed, we need to do something.
+                    // lets remove ourselves from the listener.
+                    SmartDevelopmentBridge.removeDebugBridgeChangeListener(ConnectionExplorerPanel.this);
+                    SmartDevelopmentBridge.removeDeviceChangeListener(ConnectionExplorerPanel.this);
+                }
+            }
+        });
+    }
+
+    public List<IDevice> getDeviceList()
+    {
+        return devicesList;
+    }
+
+    private void exec(Runnable runnable)
+    {
+        Tree tree = treeViewer.getTree();
+
+        if (tree.isDisposed() == false)
+        {
+            try
+            {
+                Display display = tree.getDisplay();
+                display.asyncExec(runnable);
+            } catch (SWTException e)
+            {
+                // tree is disposed, we need to do something. lets remove
+                // ourselves from the listener.
+                SmartDevelopmentBridge.removeDebugBridgeChangeListener(ConnectionExplorerPanel.this);
+                SmartDevelopmentBridge.removeDeviceChangeListener(ConnectionExplorerPanel.this);
+            }
+        }
+    }
+
+    private void notifyListeners()
+    {
+        Tree tree = treeViewer.getTree();
+        FileEntry entry = null;
+        if (tree.getSelectionCount() > 0)
+        {
+            entry = getSingleFileEntry();
+        }
+
+        if (entry != null)
+        {
+            currentDevice = entry.getFileListingService().getDevice();
+        } else
+        {
+            IDevice[] devices = SmartDevelopmentBridge.getBridge().getDevices();
+            if (devices.length != 0)
+            {
+                currentDevice = devices[0];
+                entry = devices[0].getFileListingService().getRoot();
+                for (TreeItem item : tree.getItems())
+                {
+                    if (item.getText().equals(entry.getName()))
+                    {
+                        tree.setSelection(item);
+                    }
+                }
+            }
+            else
+            {
+                currentDevice = null;
+            }
+        }
+        ConnectionPlugin.getDefault().setCurrentDevice(currentDevice);
+        ConnectionPlugin.getDefault().notifySelectionListeners(entry);
+        setActionEnabled();
+
+    }
+
+    public TreeViewer getTreeViewer()
+    {
+        return treeViewer;
+    }
+
+    class FileNameValidator implements IInputValidator
+    {
+        @Override
+        public String isValid(String fileName)
+        {
+            int os = TizenPlatformConstants.OS;
+            int validCheck = FilenameUtil.isVaildName(fileName, os);
+            if (validCheck != FilenameUtil.IS_VALID_NAME)
+            {
+                switch(validCheck)
+                {
+                    case FilenameUtil.HAS_INVALID_CHARACTER:
+                        return ConnectionUIMessages.Explorer_Message_Invalid_Character + FilenameUtil.getInvalidCharacters(os);
+                    case FilenameUtil.HAS_NO_NAME:
+                        return "";
+                    default:
+                        break;
+                }
+            }
+            return null;
+        }
+    }
+
+    public int getActionState()
+    {
+        //sub, push, pull, refresh, rename, delete, property
+        int length = treeViewer.getTree().getSelectionCount();
+
+        int state = 0x0000000;
+        bSubLog = false;
+
+        if (length == 1)
+        {
+            FileEntry entry = getSingleFileEntry();
+            if (entry.isRoot())
+            {
+                state = STATE_SUB | STATE_PUSH| STATE_PULL | STATE_REFRESH | STATE_PROPERTY;
+                bSubLog = true;
+            } else if (!entry.isDirectory())
+            {
+                state = STATE_PULL | STATE_REFRESH | STATE_RENAME | STATE_DELETE | STATE_PROPERTY;
+            } else
+            {
+                state = STATE_SUB | STATE_PUSH | STATE_PULL | STATE_REFRESH | STATE_RENAME | STATE_DELETE | STATE_PROPERTY;
+            }
+        } else if (length > 1)
+        {
+            state = STATE_PULL | STATE_DELETE;
+        }
+
+        return state;
+    }
+
+    private boolean getEnabled(int mode, int state)
+    {
+        int result = (mode & state);
+        return result != 0 ? true : false;
+    }
+
+    private void setActionEnabled()
+    {
+        int mode = getActionState();
+        subNewMenu.setVisible(getEnabled(mode, STATE_SUB));
+
+        boolean bPush = getEnabled(mode, STATE_PUSH);
+        actionPush.setEnabled(bPush);
+        pushToolItem.setEnabled(bPush);
+
+        boolean bPull = getEnabled(mode, STATE_PULL);
+        actionPull.setEnabled(bPull);
+        pullToolItem.setEnabled(bPull);
+
+        actionRename.setEnabled(getEnabled(mode, STATE_RENAME));
+        actionRefresh.setEnabled(getEnabled(mode, STATE_REFRESH));
+        actionDelete.setEnabled(getEnabled(mode, STATE_DELETE));
+        actionProperty.setEnabled(getEnabled(mode, STATE_PROPERTY));
+        subLogMenu.setVisible(bSubLog);
+    }
+
+    private FileEntry getSingleFileEntry()
+    {
+        Tree tree = treeViewer.getTree();
+        if (tree.getSelectionCount() != 0)
+        {
+            TreeItem[] items = tree.getSelection();
+            return (FileEntry) items[0].getData();
+        } else
+        {
+            return null;
+        }
+    }
+
+    @Override
+    public void selectionChanged(final FileEntry selectedEntry)
+    {
+
+        if (selectedEntry == null)
+        {
+            return;
+        }
+
+        if (!selectedEntry.isRoot())
+        {
+            return;
+        }
+
+        final Tree tree = treeViewer.getTree();
+        exec(new Runnable()
+        {
+            @Override
+            public void run()
+            {
+                if (tree.isDisposed() == false)
+                {
+                    for (TreeItem item : tree.getItems())
+                    {
+                        if (item.getText().equals(selectedEntry.getName()))
+                        {
+                            tree.setSelection(item);
+                        }
+                    }
+                } else
+                {
+                    // tree is disposed, we need to do something.
+                    // lets remove ourselves from the listener.
+                    ConnectionPlugin.getDefault().removeSelectionListener(ConnectionExplorerPanel.this);
+                }
+            }
+        });
+    }
+    
+    private boolean isSingleEntry()
+    {
+        Tree tree = treeViewer.getTree();
+        if (tree.getSelectionCount() == 1)
+        {
+            return true;
+        } else
+        {
+            return false;
+        }
+    }
+
+    public void doActionForEntry(IActionForEntry action)
+    {
+        if (action.doCheckEnable())
+        {
+            action.doAction();
+        }
+    }
+
+    private interface IActionForEntry
+    {
+        boolean  doCheckEnable();
+
+        void doAction();
+    }
 }
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 28a1661..f603e24
@@ -52,80 +52,4 @@ public class Messages {
                        return '!' + key + '!';\r
                }\r
        }\r
-       private static String messageBind(String message, Object[] args, String argZero, String argOne) {\r
-               int length = message.length();\r
-               //estimate correct size of string buffer to avoid growth\r
-               int bufLen = length + (args.length * 5);\r
-               if (argZero != null)\r
-                       bufLen += argZero.length() - 3;\r
-               if (argOne != null)\r
-                       bufLen += argOne.length() - 3;\r
-               StringBuffer buffer = new StringBuffer(bufLen < 0 ? 0 : bufLen);\r
-               for (int i = 0; i < length; i++) {\r
-                       char c = message.charAt(i);\r
-                       switch (c) {\r
-                               case '{' :\r
-                                       int index = message.indexOf('}', i);\r
-                                       // if we don't have a matching closing brace then...\r
-                                       if (index == -1) {\r
-                                               buffer.append(c);\r
-                                               break;\r
-                                       }\r
-                                       i++;\r
-                                       if (i >= length) {\r
-                                               buffer.append(c);\r
-                                               break;\r
-                                       }\r
-                                       // look for a substitution\r
-                                       int number = -1;\r
-                                       try {\r
-                                               number = Integer.parseInt(message.substring(i, index));\r
-                                       } catch (NumberFormatException e) {\r
-                                               throw (IllegalArgumentException) new IllegalArgumentException().initCause(e);\r
-                                       }\r
-                                       if (number == 0 && argZero != null)\r
-                                               buffer.append(argZero);\r
-                                       else if (number == 1 && argOne != null)\r
-                                               buffer.append(argOne);\r
-                                       else {\r
-                                               if (number >= args.length || number < 0) {\r
-                                                       buffer.append("<missing argument>"); //$NON-NLS-1$\r
-                                                       i = index;\r
-                                                       break;\r
-                                               }\r
-                                               buffer.append(args[number]);\r
-                                       }\r
-                                       i = index;\r
-                                       break;\r
-                               case '\'' :\r
-                                       // if a single quote is the last char on the line then skip it\r
-                                       int nextIndex = i + 1;\r
-                                       if (nextIndex >= length) {\r
-                                               buffer.append(c);\r
-                                               break;\r
-                                       }\r
-                                       char next = message.charAt(nextIndex);\r
-                                       // if the next char is another single quote then write out one\r
-                                       if (next == '\'') {\r
-                                               i++;\r
-                                               buffer.append(c);\r
-                                               break;\r
-                                       }\r
-                                       // otherwise we want to read until we get to the next single quote\r
-                                       index = message.indexOf('\'', nextIndex);\r
-                                       // if there are no more in the string, then skip it\r
-                                       if (index == -1) {\r
-                                               buffer.append(c);\r
-                                               break;\r
-                                       }\r
-                                       // otherwise write out the chars inside the quotes\r
-                                       buffer.append(message.substring(nextIndex, index));\r
-                                       i = index;\r
-                                       break;\r
-                               default :\r
-                                       buffer.append(c);\r
-                       }\r
-               }\r
-               return buffer.toString();\r
-       }\r
 }\r
index 3d54a9c..28acc15 100644 (file)
@@ -1,9 +1,8 @@
-\r
-FileDialogUtils.overrite.title=File Exists\r
-FileDialogUtils.overrite.message=The file {0} already exists. Are you going to overwrite it?\r
-FileDialogUtils.delete.title=File Delete\r
-FileDialogUtils.delete.message=Are you going to delete {0}?\r
-FileDialogUtils.tabName.title=Invalid Name\r
-FileDialogUtils.tabName.message= "{0}" is already exist!\nPlease fill in the TabName with another.\r
+FileDialogUtils.message.title=Message\r
+FileDialogUtils.overwrite.message=The {0} file already exists. Do you want to overwrite it?\r
+FileDialogUtils.duplicate.message=Existing file\r
+FileDialogUtils.delete.message=Are you sure you want to delete the {0} file?\r
+FileDialogUtils.tabName.message= The tab name already exists. Enter a different name.\r
 FileDialogUtils.update.title=Tizen SDK\r
-FileDialogUtils.update.message= Updates are available for Tizen SDK. Do you want to install them?\r
+FileDialogUtils.update.message= Tizen SDK updates are available. Do you want to install them now?\r
+ConnectionExplorer.tree.header=Files
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index be746c8..d44e1a3
@@ -1,30 +1,32 @@
 /*
-*  Common
-*
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-*
-* Contact: 
-* Hoon Kang <h245.kang@samsung.com>
-* Hyunsik Noh <hyunsik.noh@samsung.com>
-* 
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hoon Kang <h245.kang@samsung.com>
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-* Contributors:
-* - S-Core Co., Ltd
-*
-*/
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
 package org.tizen.common.connection.log;
 
+import static org.tizen.common.util.StringUtil.isEmpty;
+
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -44,274 +46,336 @@ import org.eclipse.swt.widgets.Listener;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
 import org.tizen.common.connection.ddmuilib.FileDialogUtils;
-
 import org.tizen.sdblib.IDevice;
 import org.tizen.sdblib.SmartDevelopmentBridge;
 
 /**
  * Small dialog box to open new logtab with some options.
  */
-public class AddViewDialog extends Dialog {
-
-       private static final int DLG_WIDTH = 400;
-       private static final int DLG_HEIGHT = 300;
-
-       private Shell parent;
-
-       private Shell shell;
-       
-       private String dialogName = null;
-
-       private boolean bOk = false;
-
-       private LogTab oldTab = null;
-       
-       private static final String TEMPNAME = "LogTab-#";
-       private static int cnt = 0;
-
-       private String tabName = null;
-       private String device = null;
-       private String pidKeyword = null;
-       private String tagKeyword = null;
-       private String msgKeyword = null;
-
-       private Text tabNameText;
-       private Text tagText;
-       private Text pidText;
-       private Text msgText;
-       private Button okButton;
-
-       public AddViewDialog(Shell pParent) {
-               super(pParent, SWT.DIALOG_TRIM | SWT.BORDER | SWT.APPLICATION_MODAL);
-       }
-
-       public AddViewDialog(Shell pParent, String deviceName) {
-               super(pParent, SWT.DIALOG_TRIM | SWT.BORDER | SWT.APPLICATION_MODAL);
-               device = deviceName;
-               dialogName = "Add LogTab";
-       }
-
-       public AddViewDialog(Shell pParent, LogTab tab) {
-               super(pParent, SWT.DIALOG_TRIM | SWT.BORDER | SWT.APPLICATION_MODAL);
-               if (tab != null) {
-                       dialogName = "Edit LogTab";
-                       tabName = tab.getFilterName();
-                       if (tab.getFilterDeviceName() == null)
-                               return;
-                       device = tab.getFilterDeviceName();
-                       
-                       pidKeyword = tab.getPidFilter();
-                       tagKeyword = tab.getTagFilter();
-                       msgKeyword = tab.getMsgFilter();
-                       
-                       oldTab = tab;
-               }
-       }
-
-       /**
-        * Opens the dialog. The method will return when the user closes the dialog
-        * somehow.
-        * 
-        * @return true if ok was pressed, false if cancelled.
-        */
-       public boolean open() {
-               createUI();
-
-               if (parent == null || shell == null) {
-                       return false;
-               }
-
-               shell.setMinimumSize(DLG_WIDTH, DLG_HEIGHT);
-               Rectangle r = parent.getBounds();
-               // get the center new top left.
-               int cx = r.x + r.width / 2;
-               int x = cx - DLG_WIDTH / 2;
-               int cy = r.y + r.height / 2;
-               int y = cy - DLG_HEIGHT / 2;
-               shell.setBounds(x, y, DLG_WIDTH, DLG_HEIGHT);
-
-               shell.open();
-
-               Display display = parent.getDisplay();
-               while (!shell.isDisposed()) {
-                       if (!display.readAndDispatch())
-                               display.sleep();
-               }
-
-               return bOk;
-       }
-
-       private void createUI() {
-               parent = getParent();
-               shell = new Shell(parent, getStyle());
-               shell.setText(dialogName);
-
-               shell.setLayout(new GridLayout(1, false));
-
-               shell.addListener(SWT.Close, new Listener() {
-                       public void handleEvent(Event event) {
-                       }
-               });
-
-               Group top = new Group(shell, SWT.SHADOW_IN);
-               top.setText("LogTab");
-               top.setLayoutData(new GridData(GridData.FILL_BOTH));
-               top.setLayout(new GridLayout(2, false));
-
-               Label l = new Label(top, SWT.NONE);
-               l.setText("Name : ");
-
-               tabNameText = new Text(top, SWT.SINGLE | SWT.BORDER);
-               if (tabName != null)
-                       tabNameText.setText(tabName);
-               tabNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-               l = new Label(top, SWT.NONE);
-               l.setText("Device : ");
-
-               final Combo dCombo = new Combo(top, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.CENTER);
-               GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-
-               dCombo.setLayoutData(gd);
-               IDevice[] devices = SmartDevelopmentBridge.getBridge().getDevices();
-
-               if (devices.length != 0) {
-                       for (IDevice d : devices) {
-                               if (d.isOnline())
-                                       dCombo.add(d.getSerialNumber());
-                       }
-
-                       if (device != null) {
-                               for (int i = 0; i < devices.length; i++) {
-                                       if (device.equals(devices[i].getSerialNumber())) {
-                                               dCombo.select(i);
-                                               break;
-                                       }
-                               }
-                       } else {
-                               dCombo.select(0);
-                               device = dCombo.getItem(0);
-                       }
-               }
-
-               Group mid = new Group(shell, SWT.SHADOW_IN);
-               mid.setText("Search Keywords");
-               mid.setLayoutData(new GridData(GridData.FILL_BOTH));
-               mid.setLayout(new GridLayout(2, false));
-               
-               l = new Label(mid, SWT.NONE);
-               l.setText("Tag : ");
-
-               tagText = new Text(mid, SWT.SINGLE | SWT.BORDER);
-               if (tagKeyword != null)
-                       tagText.setText(tagKeyword);
-               tagText.setMessage("Separated by a space/comma");
-               tagText.setToolTipText("Search Tag Keywords are separated by a space as well as a comma");
-               tagText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-               
-               l = new Label(mid, SWT.NONE);
-               l.setText("Pid : ");
-
-               pidText = new Text(mid, SWT.SINGLE | SWT.BORDER);
-               if (pidKeyword != null)
-                       pidText.setText(pidKeyword);
-               pidText.setMessage("Separated by a space/comma");
-               pidText.setToolTipText("Search Pid Keywords are separated by a space as well as a comma");
-               pidText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-               
-               l = new Label(mid, SWT.NONE);
-               l.setText("Message : ");
-
-               msgText = new Text(mid, SWT.SINGLE | SWT.BORDER);
-               if (msgKeyword != null)
-                       msgText.setText(msgKeyword);
-               msgText.setMessage("Separated by a space/comma");
-               msgText.setToolTipText("Search Message Keywords are separated by a space as well as a comma");
-               msgText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-               // bottom part with the ok/cancel
-               Composite bottomComp = new Composite(shell, SWT.NONE);
-               bottomComp
-                               .setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
-               bottomComp.setLayout(new GridLayout(2, true));
-
-               okButton = new Button(bottomComp, SWT.NONE);
-               okButton.setText("OK");
-               okButton.addSelectionListener(new SelectionAdapter() {
-                       @Override
-                       public void widgetSelected(SelectionEvent e) {
-                               String newName = tabNameText.getText();
-                               for (LogTab tab : LogPanel.tabs) {
-                                       if (tab.getFilterName().equals(newName)) {                                      
-                                               if (oldTab != null && oldTab == tab)
-                                                       continue;                                                       
-                                               int ret = FileDialogUtils.getInstance().checkTabName(newName);
-                                               if (ret == IDialogConstants.OK_ID)
-                                                       return;
-                                       }
-                               }
-                               
-                               bOk = true;
-                               
-                               if (tabNameText.getText().length() != 0)
-                                       tabName = tabNameText.getText();
-                               else
-                                       tabName = TEMPNAME + cnt++;
-                               
-                               if (tagText.getText().length() != 0)
-                                       tagKeyword = tagText.getText();
-                               else
-                                       tagKeyword = null;
-                               
-                               if (pidText.getText().length() != 0)
-                                       pidKeyword = pidText.getText();
-                               else
-                                       pidKeyword = null;
-                               
-                               if (msgText.getText().length() != 0)
-                                       msgKeyword = msgText.getText();
-                               else
-                                       msgKeyword = null;
-                               
-                               device = dCombo.getItem(dCombo.getSelectionIndex());
-                               
-                               shell.close();
-                               }
-               });
-               shell.setDefaultButton(okButton);
-
-               Button cancelButton = new Button(bottomComp, SWT.NONE);
-               cancelButton.setText("Cancel");
-               cancelButton.addSelectionListener(new SelectionAdapter() {
-                       @Override
-                       public void widgetSelected(SelectionEvent e) {
-                               shell.close();
-                       }
-               });
-
-       }
-
-       public String getName() {
-               return tabName;
-       }
-
-       public String getDevice() {
-               return device;
-       }
-       
-       public String getPidKeyword() {
-               return pidKeyword;
-       }
-       
-       public String getTagKeyword() {
-               return tagKeyword;
-       }
-       
-       public String getMsgKeyword() {
-               return msgKeyword;
-       }
-
-       public void setName(String name) {
-               this.tabName = name;
-       }
+public class AddViewDialog extends Dialog
+{
+
+    private static final int DLG_WIDTH = 400;
+    private static final int DLG_HEIGHT = 300;
+
+    private Shell parent;
+
+    private Shell shell;
+
+    private String dialogName = null;
+
+    private boolean bOk = false;
+
+    private LogTab oldTab = null;
+
+    private static final String TEMPNAME = "LogTab-#";
+    private static int cnt = 0;
+
+    private String tabName = null;
+    private String device = null;
+    private String pidKeyword = null;
+    private String tagKeyword = null;
+    private String msgKeyword = null;
+
+    private Text tabNameText;
+    private Text tagText;
+    private Text pidText;
+    private Text msgText;
+    private Button okButton;
+
+    public AddViewDialog(Shell pParent)
+    {
+        super(pParent, SWT.DIALOG_TRIM | SWT.BORDER | SWT.APPLICATION_MODAL);
+    }
+
+    public AddViewDialog(Shell pParent, String deviceName)
+    {
+        super(pParent, SWT.DIALOG_TRIM | SWT.BORDER | SWT.APPLICATION_MODAL);
+        device = deviceName;
+        dialogName = "Add LogTab";
+    }
+
+    public AddViewDialog(Shell pParent, LogTab tab)
+    {
+        super(pParent, SWT.DIALOG_TRIM | SWT.BORDER | SWT.APPLICATION_MODAL);
+        if (tab != null)
+        {
+            dialogName = "Edit LogTab";
+            tabName = tab.getLogTabName();
+            if (tab.getDeviceSerialNumber() == null)
+            {
+                return;
+            }
+            device = tab.getDeviceSerialNumber();
+
+            pidKeyword = tab.getPidFilter();
+            tagKeyword = tab.getTagFilter();
+            msgKeyword = tab.getMsgFilter();
+
+            oldTab = tab;
+        }
+    }
+
+    /**
+     * Opens the dialog. The method will return when the user closes the dialog
+     * somehow.
+     *
+     * @return true if ok was pressed, false if cancelled.
+     */
+    public boolean open()
+    {
+        createUI();
+
+        if (parent == null || shell == null)
+        {
+            return false;
+        }
+
+        shell.setMinimumSize(DLG_WIDTH, DLG_HEIGHT);
+        Rectangle r = parent.getBounds();
+        // get the center new top left.
+        int cx = r.x + r.width / 2;
+        int x = cx - DLG_WIDTH / 2;
+        int cy = r.y + r.height / 2;
+        int y = cy - DLG_HEIGHT / 2;
+        shell.setBounds(x, y, DLG_WIDTH, DLG_HEIGHT);
+
+        shell.open();
+
+        Display display = parent.getDisplay();
+        while (!shell.isDisposed())
+        {
+            if (!display.readAndDispatch())
+            {
+                display.sleep();
+            }
+        }
+
+        return bOk;
+    }
+
+    private void createUI()
+    {
+        parent = getParent();
+        shell = new Shell(parent, getStyle());
+        shell.setText(dialogName);
+
+        shell.setLayout(new GridLayout(1, false));
+
+        shell.addListener(SWT.Close, new Listener()
+        {
+            @Override
+            public void handleEvent(Event event)
+            {
+            }
+        });
+
+        Group top = new Group(shell, SWT.SHADOW_IN);
+        top.setText("LogTab");
+        top.setLayoutData(new GridData(GridData.FILL_BOTH));
+        top.setLayout(new GridLayout(2, false));
+
+        Label l = new Label(top, SWT.NONE);
+        l.setText("Name:");
+
+        tabNameText = new Text(top, SWT.SINGLE | SWT.BORDER);
+        if (tabName != null)
+        {
+            tabNameText.setText(tabName);
+        }
+        tabNameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        l = new Label(top, SWT.NONE);
+        l.setText("Device:");
+
+        final Combo dCombo = new Combo(top, SWT.DROP_DOWN | SWT.READ_ONLY | SWT.CENTER);
+        GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+
+        dCombo.setLayoutData(gd);
+        IDevice[] devices = SmartDevelopmentBridge.getBridge().getDevices();
+
+        if (devices.length != 0)
+        {
+            for (IDevice d : devices)
+            {
+                if (d.isOnline())
+                {
+                    dCombo.add(d.getSerialNumber());
+                }
+            }
+
+            if (device != null)
+            {
+                for (int i = 0; i < devices.length; i++)
+                {
+                    if (device.equals(devices[i].getSerialNumber()))
+                    {
+                        dCombo.select(i);
+                        break;
+                    }
+                }
+            } else
+            {
+                dCombo.select(0);
+                device = dCombo.getItem(0);
+            }
+        }
+
+        Group mid = new Group(shell, SWT.SHADOW_IN);
+        mid.setText("Search keywords");
+        mid.setLayoutData(new GridData(GridData.FILL_BOTH));
+        mid.setLayout(new GridLayout(2, false));
+
+        l = new Label(mid, SWT.NONE);
+        l.setText("Tag:");
+
+        tagText = new Text(mid, SWT.SINGLE | SWT.BORDER);
+        if (tagKeyword != null)
+        {
+            tagText.setText(tagKeyword);
+        }
+        tagText.setMessage("Separated by a space and comma");
+        tagText.setToolTipText("Search Tag Keywords are separated by a space as well as a comma");
+        tagText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        l = new Label(mid, SWT.NONE);
+        l.setText("Pid:");
+
+        pidText = new Text(mid, SWT.SINGLE | SWT.BORDER);
+        if (pidKeyword != null)
+        {
+            pidText.setText(pidKeyword);
+        }
+        pidText.setMessage("Separated by a space and comma");
+        pidText.setToolTipText("Search Pid Keywords are separated by a space as well as a comma");
+        pidText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        l = new Label(mid, SWT.NONE);
+        l.setText("Message:");
+
+        msgText = new Text(mid, SWT.SINGLE | SWT.BORDER);
+        if (msgKeyword != null)
+        {
+            msgText.setText(msgKeyword);
+        }
+        msgText.setMessage("Separated by a space and comma");
+        msgText.setToolTipText("Search Message Keywords are separated by a space as well as a comma");
+        msgText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        // bottom part with the ok/cancel
+        Composite bottomComp = new Composite(shell, SWT.NONE);
+        bottomComp.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));
+        bottomComp.setLayout(new GridLayout(2, true));
+
+        okButton = new Button(bottomComp, SWT.NONE);
+        okButton.setText("OK");
+        okButton.addSelectionListener(new SelectionAdapter()
+        {
+            @Override
+            public void widgetSelected(SelectionEvent e)
+            {
+                String newName = tabNameText.getText();
+                for (LogTab tab : LogPanel.logTabList)
+                {
+                    if (tab.getLogTabName().equals(newName))
+                    {
+                        if (oldTab != null && oldTab == tab)
+                        {
+                            continue;
+                        }
+                        int ret = FileDialogUtils.checkTabName(newName);
+                        if (ret == IDialogConstants.OK_ID)
+                        {
+                            return;
+                        }
+                    }
+                }
+
+                bOk = true;
+                
+                if ( isEmpty( tabNameText.getText() ) )
+                {
+                    tabName = TEMPNAME + cnt++;
+                }
+                else
+                {
+                    tabName = tabNameText.getText();
+                }
+
+                if ( isEmpty( tagText.getText() ) )
+                {
+                    tagKeyword = null;
+                }
+                else
+                {
+                    tagKeyword = tagText.getText();
+                }
+
+                if ( isEmpty( pidText.getText() ) )
+                {
+                    pidKeyword = null;
+                }
+                else
+                {
+                    pidKeyword = pidText.getText();
+                }
+
+                if ( isEmpty( msgText.getText() ) )
+                {
+                    msgKeyword = null;
+                }
+                else
+                {
+                    msgKeyword = msgText.getText();
+                }
+
+                device = dCombo.getItem(dCombo.getSelectionIndex());
+
+                shell.close();
+            }
+        });
+        shell.setDefaultButton(okButton);
+
+        Button cancelButton = new Button(bottomComp, SWT.NONE);
+        cancelButton.setText("Cancel");
+        cancelButton.addSelectionListener(new SelectionAdapter()
+        {
+            @Override
+            public void widgetSelected(SelectionEvent e)
+            {
+                shell.close();
+            }
+        });
+
+    }
+
+    public String getName()
+    {
+        return tabName;
+    }
+
+    public String getDevice()
+    {
+        return device;
+    }
+
+    public String getPidKeyword()
+    {
+        return pidKeyword;
+    }
+
+    public String getTagKeyword()
+    {
+        return tagKeyword;
+    }
+
+    public String getMsgKeyword()
+    {
+        return msgKeyword;
+    }
+
+    public void setName(String name)
+    {
+        this.tabName = name;
+    }
 }
\ No newline at end of file
index 83910f9..4382d8d 100644 (file)
@@ -17,11 +17,29 @@ package org.tizen.common.connection.log;
  */
 
 import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Display;
+import org.tizen.common.util.SWTUtil;
 
 public class LogColors {
-    public Color infoColor;
-    public Color debugColor;
+    public Color fatalColor;
     public Color errorColor;
     public Color warningColor;
+    public Color infoColor;
+    public Color debugColor;
     public Color verboseColor;
+
+    public LogColors(Display display)
+    {
+        fatalColor = new Color(display, 62, 142, 92);
+        errorColor = new Color(display, 188, 108, 119);
+        warningColor = new Color(display, 191, 106, 51);
+        infoColor = new Color(display, 66, 120, 157);
+        debugColor = new Color(display, 129, 89, 168);
+        verboseColor = new Color(display, 90, 90, 90);
+    }
+
+    public void dispose()
+    {
+        SWTUtil.tryDispose(fatalColor, errorColor, warningColor, infoColor, debugColor, verboseColor);
+    }
 }
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index b0b10e9..68bf86b
@@ -1,28 +1,28 @@
 /*
-*  Common
-*
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-*
-* Contact: 
-* Hoon Kang <h245.kang@samsung.com>
-* Hyunsik Noh <hyunsik.noh@samsung.com>
-* 
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hoon Kang <h245.kang@samsung.com>
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-* Contributors:
-* - S-Core Co., Ltd
-*
-*/
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
 package org.tizen.common.connection.log;
 
 import java.io.File;
@@ -30,15 +30,17 @@ import java.io.FileWriter;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
 
 import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IStatusLineManager;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.StackLayout;
 import org.eclipse.swt.dnd.Clipboard;
 import org.eclipse.swt.dnd.TextTransfer;
 import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.ControlListener;
 import org.eclipse.swt.events.FocusEvent;
 import org.eclipse.swt.events.FocusListener;
 import org.eclipse.swt.events.ModifyEvent;
@@ -46,7 +48,6 @@ import org.eclipse.swt.events.ModifyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -61,645 +62,967 @@ import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableColumn;
 import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IActionBars;
+import org.tizen.common.connection.ConnectionPlugin;
 import org.tizen.common.connection.ddmuilib.FileDialogUtils;
 import org.tizen.common.connection.ddmuilib.ITableFocusListener;
-import org.tizen.common.connection.ddmuilib.Panel;
 import org.tizen.common.connection.ddmuilib.ITableFocusListener.IFocusedTableActivator;
-
+import org.tizen.common.connection.ddmuilib.Panel;
+import org.tizen.common.connection.explorer.ConnectionExplorerLabelProvider;
+import org.tizen.common.connection.preference.TizenLogPreferencePage;
+import org.tizen.common.util.DialogUtil;
+import org.tizen.common.util.IOUtil;
+import org.tizen.common.util.NotificationType;
+import org.tizen.common.util.NotifierDialog;
+import org.tizen.common.util.SWTUtil;
 import org.tizen.sdblib.IDevice;
 import org.tizen.sdblib.Log.LogLevel;
 import org.tizen.sdblib.SmartDevelopmentBridge;
 import org.tizen.sdblib.SmartDevelopmentBridge.IDeviceChangeListener;
 
-public class LogPanel extends Panel implements IDeviceChangeListener {
-
-       public static final int ENABLE_NOTHING = 0;
-       public static final int ENABLE_DEFAULT = 1;
-       public static final int ENABLE_ALL = 2;
-
-       public static ArrayList<LogTab> tabs = new ArrayList<LogTab>();
-       
-       private String defaultLogSave;
-
-       private static int tabCnt = 0;
-       private Composite parent;
-       private TabFolder folders;
-       private Text filterText;
-
-       private LogColors colors;
-       
-       private LogTab currentTab;
-       private Action[] levelActions;
-       private Action addAction;
-       private Action removeAction;
-       private Action editAction;
-       private Action exportAction;
-       private Action clearAction;
-
-       /** message data, separated from content for multi line messages */
-       protected static class LogMessageInfo {
-               public LogLevel logLevel;
-               public String pidString;
-               public String tag;
-               public String time;
-       }
-
-       private ITableFocusListener globalListener;
-
-       /** message data, separated from content for multi line messages */
-       protected static class LogMessage {
-               public LogMessageInfo data;
-               public String msg;
-
-               @Override
-               public String toString() {
-                       return data.time + ": " + data.logLevel + "/" + data.tag + "(" + data.pidString + "): " + msg;
-               }
-       }
-
-       /**
-        * Create the log panel with some default parameters
-        * 
-        * @param colors
-        *            The display color object
-        */
-       public LogPanel(LogColors pColors) {
-               colors = pColors;
-       }
-
-       public void setActions(Action[] levels, Action add, Action remove,
-                       Action edit, Action export, Action clear) {
-               levelActions = levels;
-               addAction = add;
-               removeAction = remove;
-               editAction = edit;
-               exportAction = export;
-               clearAction = clear;
-       }
-
-       /**
-        * Creates a control capable of displaying some information. This is called
-        * once, when the application is initializing, from the UI thread.
-        */
-       @Override
-       protected Control createControl(Composite p) {
-
-               parent = p;
-
-               // create the tab folder
-               folders = new TabFolder(parent, SWT.NONE);
-               folders.setLayoutData(new GridData(GridData.FILL_BOTH));
-               folders.addSelectionListener(new SelectionAdapter() {
-                       @Override
-                       public void widgetSelected(SelectionEvent e) {
-
-                               currentTab = getCurrentLogTab();
-                               if (currentTab == null)
-                                       return;
-                               currentTab.initTab();
-                               currentTab.setLevelIcon(levelActions);
-                               
-                               if (currentTab.isDefault()) {
-                                       setActionEnabled(LogPanel.ENABLE_DEFAULT);
-                               } else {
-                                       setActionEnabled(LogPanel.ENABLE_ALL);
-                               }
-                       }
-               });
-
-               SmartDevelopmentBridge.addDeviceChangeListener(this);
-               createDefaultTabs();
-
-               return null;
-       }
-
-       /**
-        * 
-        * Create the LogFilters with default devicesd
-        * 
-        */
-       private void createDefaultTabs() {
-               SmartDevelopmentBridge sdbBridge = SmartDevelopmentBridge.getBridge();
-               IDevice[] devices = null;
-               if (sdbBridge != null) {
-                       devices = sdbBridge.getDevices();
-               }
-
-               if (devices != null) {
-                       for (IDevice device : devices) {
-                               if (device.isOffline())
-                                       continue;
-                               LogTab dTab = createDefaultTab(device, null);
-                               dTab.startLogTab();
-                       }
-               }
-       }
-
-       private LogTab createDefaultTab(IDevice device, String tabName) {
-               LogTab tab = createTab(device, null);
-               tab.setDefault();
-               setActionEnabled(LogPanel.ENABLE_DEFAULT);
-               return tab;
-       }
-
-       private LogTab createTab(IDevice device, String tabName) {
-
-               LogTab tab = null;
-               if (tabName == null)
-                       tab = new LogTab(device.getSerialNumber(), device, colors);
-               else
-                       tab = new LogTab(tabName, device, colors);
-
-               //
-               for (int i = 0; i < tabs.size(); i++) {
-                       LogTab oldTab = tabs.get(i);
-                       if (oldTab.getFilterName().equals(tab.getFilterName())) {
-                               oldTab.stopLogTab(true);
-                               tabs.remove(i);
-                               tabCnt--;
-                               oldTab.dispose();
-                               if (!tabs.isEmpty())
-                                       folders.setSelection(0);
-                       }
-               }
-
-               TabItem item = new TabItem(folders, SWT.NONE, tabCnt++);
-
-               item.setText(tab.getFilterName());
-
-               item.setControl(getTabControl(folders, tab));
-               tab.setTab(item);
-
-               folders.setSelection(item);
-               tabs.add(tab);
-
-               if (tab.isDefault()) {
-                       setActionEnabled(LogPanel.ENABLE_DEFAULT);
-               } else {
-                       setActionEnabled(LogPanel.ENABLE_ALL);
-               }
-               tab.setLevelIcon(levelActions);
-               return tab;
-       }
-
-       private Control getTabControl(TabFolder tabFolder, final LogTab tab) {
-               // Create a composite and add four buttons to it
-
-               Composite composite = new Composite(tabFolder, SWT.NONE);
-               composite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
-               composite.setLayout(new GridLayout(1, false));
-
-               Composite mid = new Composite(composite, SWT.NONE);
-               mid.setLayoutData(new GridData(GridData.FILL_BOTH));
-               mid.setLayout(new FillLayout());
-
-               final Table table = new Table(mid, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER | SWT.BORDER_SOLID);
-
-               table.setHeaderVisible(true);
-               table.setLinesVisible(true);
-
-               if (globalListener != null) {
-                       addTableToFocusListener(table);
-               }
-
-               ControlListener listener = null;
-               listener = new ControlListener() {
-                       public void controlMoved(ControlEvent e) {
-
-                       }
-
-                       public void controlResized(ControlEvent e) {
-                               Rectangle r = table.getClientArea();
-
-                               // get the size of all but the last column
-                               int total = table.getColumn(0).getWidth();
-                               total += table.getColumn(1).getWidth();
-                               total += table.getColumn(2).getWidth();
-                               total += table.getColumn(3).getWidth();
-
-                               if (r.width > total) {
-                                       table.getColumn(4).setWidth(r.width - total);
-                               }
-                       }
-               };
-
-               table.addControlListener(listener);
-
-               // then its column
-               TableColumn col = createTableColumn(table, "Time", SWT.LEFT,
-                               "00-00 00:00:00.000");
-               col.addControlListener(listener);
-
-               col = createTableColumn(table, "Level", SWT.LEFT, "Verbose");
-               col.addControlListener(listener);
-
-               col = createTableColumn(table, "Pid", SWT.LEFT, "9999999");
-               col.addControlListener(listener);
-
-               col = createTableColumn(table, "Tag", SWT.LEFT, "ABCDEFGHIJK");
-               col.addControlListener(listener);
-
-               col = createTableColumn(table, "Message", SWT.LEFT,
-                               "abcdefghijklmnopqrstuvwxyz0123456789");
-               col.setResizable(false);
-
-               Composite bottom = new Composite(composite, SWT.NONE);
-               bottom.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-               bottom.setLayout(new GridLayout(3, false));
-
-               final Combo combo = new Combo(bottom, SWT.READ_ONLY);
-               String[] comboItems = {"Pid", "Tag", "Message"};
-               combo.setItems(comboItems);
-               combo.select(2);
-               combo.setToolTipText("Keyword Search: Pid or Tag, Message");
-               combo.addSelectionListener(new SelectionListener() {
-                     public void widgetSelected(SelectionEvent e) {
-                         if (filterText.getText() != null) {
-                                 int index = combo.getSelectionIndex();
-                                 if (index != -1)
-                                         tab.tableRefill(index, filterText.getText());
-                         }
-                       }
-
-                       public void widgetDefaultSelected(SelectionEvent e) {
-                       }
-                     });
-
-               filterText = new Text(bottom, SWT.SINGLE | SWT.BORDER);
-               filterText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-               filterText.setMessage("Search Keywords from this table are separated by a space as well as a comma");
-               filterText.addModifyListener(new ModifyListener() {
-
-                       @Override
-                       public void modifyText(ModifyEvent e) {
-                                 if (filterText.getText() != null) {
-                                         int index = combo.getSelectionIndex();
-                                         if (index != -1) {
-                                                       tab.tableRefill(index, filterText.getText());
-                                               }
-                                 }
-                       }
-               });
-
-               tab.setTable(table);
-               return composite;
-       }
-
-       @Override
-       protected void postCreation() {
-               // pass
-       }
-
-       /**
-        * Sets the focus to the proper object.
-        */
-       @Override
-       public void setFocus() {
-       }
-
-       /**
-        * Copies the current selection of the current filter as multiline text.
-        * 
-        * @param clipboard
-        *            The clipboard to place the copied content.
-        */
-       public void copy(Clipboard clipboard) {
-               // get the current table and its selection
-               copyTable(clipboard, currentTab.getTable());
-       }
-
-       /**
-        * Selects all lines.
-        */
-       public void selectAll() {
-               currentTab.getTable().selectAll();
-       }
-
-       /**
-        * Sets a TableFocusListener which will be notified when one of the tables
-        * gets or loses focus.
-        * 
-        * @param listener
-        */
-       public void setTableFocusListener(ITableFocusListener listener) {
-               // record the global listener, to make sure table created after
-               // this call will still be setup.
-               globalListener = listener;
-
-               for (LogTab tab : tabs) {
-                       addTableToFocusListener(tab.getTable());
-               }
-       }
-
-       /**
-        * Sets up a Table object to notify the global Table Focus listener when it
-        * gets or loses the focus.
-        * 
-        * @param table
-        *            the Table object.
-        */
-       private void addTableToFocusListener(final Table table) {
-               // create the activator for this table
-               final IFocusedTableActivator activator = new IFocusedTableActivator() {
-                       public void copy(Clipboard clipboard) {
-                               copyTable(clipboard, table);
-                       }
-
-                       public void selectAll() {
-                               table.selectAll();
-                       }
-               };
-
-               // add the focus listener on the table to notify the global
-               // listener
-               table.addFocusListener(new FocusListener() {
-                       public void focusGained(FocusEvent e) {
-                               globalListener.focusGained(activator);
-                       }
-
-                       public void focusLost(FocusEvent e) {
-                               globalListener.focusLost(activator);
-                       }
-               });
-       }
-
-       /**
-        * Copies the current selection of a Table into the provided Clipboard, as
-        * multi-line text.
-        * 
-        * @param clipboard
-        *            The clipboard to place the copied content.
-        * @param table
-        *            The table to copy from.
-        */
-       private static void copyTable(Clipboard clipboard, Table table) {
-               int[] selection = table.getSelectionIndices();
-
-               // we need to sort the items to be sure.
-               Arrays.sort(selection);
-
-               // all lines must be concatenated.
-               StringBuilder sb = new StringBuilder();
-
-               // loop on the selection and output the file.
-               for (int i : selection) {
-                       TableItem item = table.getItem(i);
-                       LogMessage msg = (LogMessage) item.getData();
-                       String line = msg.toString();
-                       sb.append(line);
-                       sb.append('\n');
-               }
-
-               // now add that to the clipboard
-               clipboard.setContents(new Object[] { sb.toString() },
-                               new Transfer[] { TextTransfer.getInstance() });
-       }
-
-
-       /**
-        * saves the current selection in a text file.
-        * 
-        * @return false if the saving failed.
-        */
-       public boolean save() {
-               if (getCurrentLogTab() == null)
-                       return false;
-               FileDialog dlg = new FileDialog(parent.getShell(), SWT.SAVE);
-               String fileName;
-
-               dlg.setText("Export Log");
-               dlg.setFileName(getCurrentLogTab().getFilterName() + "-log.txt");
-               String defaultPath = defaultLogSave;
-               if (defaultPath == null) {
-                       defaultPath = System.getProperty("user.home"); //$NON-NLS-1$
-               }
-               dlg.setFilterPath(defaultPath);
-               dlg.setFilterNames(new String[] { "Text Files (*.txt)" });
-               dlg.setFilterExtensions(new String[] { "*.txt" });
-               File check;
-               boolean again;
-               do {
-                       again = false;
-                       fileName = dlg.open();
-                       if (fileName == null)
-                               return false;
-                       check = new File(fileName);
-                       if (check.exists()) {
-                               int ret = FileDialogUtils.getInstance().checkFileOverwrite(fileName);
-                               if (ret == IDialogConstants.CANCEL_ID)
-                                       again = true;
-                       }
-               } while (again);
-
-               if (fileName != null) {
-                       defaultLogSave = dlg.getFilterPath();
-
-                       // loop on the selection and output the file.
-                       try {
-                               FileWriter writer = new FileWriter(fileName);
-
-                               for (TableItem item : getCurrentLogTab().getTable().getItems()) {
-                                       LogMessage msg = (LogMessage) item.getData();
-                                       String line = msg.toString();
-                                       writer.write(line);
-                                       writer.write('\n');
-                               }
-                               writer.flush();
-
-                       } catch (IOException e) {
-                               return false;
-                       }
-               }
-
-               return true;
-       }
-
-       public void clear() {
-               if (getCurrentLogTab() != null)
-                       this.getCurrentLogTab().clear();
-       }
-
-       public void addTab() {
-               if (getCurrentLogTab() == null)
-                       return;
-               AddViewDialog dlg = new AddViewDialog(parent.getShell(),
-                               getCurrentLogTab().getFilterDeviceName());
-               
-               if (dlg.open()) {
-                       for (IDevice device : SmartDevelopmentBridge.getBridge()
-                                       .getDevices()) {
-                               if (device.getSerialNumber().equals(dlg.getDevice())) {
-
-                                       LogTab newTab = createTab(device, dlg.getName());
-
-                                       newTab.setPidFilter(dlg.getPidKeyword());
-                                       newTab.setTagFilter(dlg.getTagKeyword());
-                                       newTab.setMsgFilter(dlg.getMsgKeyword());
-
-                                       newTab.startLogTab();
-
-                                       break;
-                               }
-                       }
-               } else
-                       return;
-       }
-
-       public void removeTab() {
-
-               int index = folders.getSelectionIndex();
-               if (index < 0)
-                       return;
-               LogTab tab = tabs.get(index);
-               if (tab.isDefault()) {
-                       return;
-               }
-               tab.stopLogTab(true);
-               tabs.remove(index);
-               tabCnt--;
-               tab.dispose();
-               if (!tabs.isEmpty())
-                       folders.setSelection(0);
-
-       }
-
-       public void editTab() {
-
-               LogTab oldTab = getCurrentLogTab();
-               if (oldTab == null)
-                       return;
-               if (oldTab.isDefault()) {
-                       return;
-               }
-               
-               AddViewDialog dlg = new AddViewDialog(parent.getShell(), oldTab);
-               if (dlg.open()) {
-                       for (IDevice device : SmartDevelopmentBridge.getBridge()
-                                       .getDevices()) {
-                               if (device.getSerialNumber().equals(dlg.getDevice())) {
-                                       boolean bRestart = false;
-                                       if (!oldTab.getFilterDeviceName().equals(
-                                                       device.getSerialNumber())) {
-                                               oldTab.stopLogTab(true);
-                                               oldTab.setDevice(device);
-                                               bRestart = true;
-                                       }
-
-                                       for (TabItem item : folders.getItems()) {
-                                               if (item.getText().equals(oldTab.getFilterName())) {
-                                                       item.setText(dlg.getName());
-                                                       oldTab.setFilterName(dlg.getName());
-                                               }
-                                       }
-
-                                       oldTab.setPidFilter(dlg.getPidKeyword());
-                                       oldTab.setTagFilter(dlg.getTagKeyword());
-                                       oldTab.setMsgFilter(dlg.getMsgKeyword());
-                                       
-                                       if (bRestart)
-                                               oldTab.startLogTab();
-                                       else
-                                               oldTab.refill();
-                                       break;
-                               }
-                       }
-               } else
-                       return;
-       }
-
-       public static TableColumn createTableColumn(Table parent, String header,
-                       int style, String sampleText) {
-
-               // create the column
-               TableColumn col = new TableColumn(parent, style);
-
-               col.setText(sampleText);
-               col.pack();
-
-               // set the header
-               col.setText(header);
-
-               return col;
-       }
-
-       public LogTab getCurrentLogTab() {
-               if (tabs.size() != 0) {
-                       int index = folders.getSelectionIndex();
-                       return tabs.get(index);
-               } else
-                       return null;
-       }
-
-       public void stopAll() {
-               for (LogTab tab : tabs) {
-                       tab.stopLogTab(true);
-               }
-               tabs.clear();
-               tabCnt = 0;
-               folders.dispose();
-       }
-
-       @Override
-       public void deviceConnected(IDevice device) {
-               if (device.isOnline()) {
-                       deviceChanged(device, 1);
-               }
-       }
-
-       @Override
-       public void deviceDisconnected(IDevice device) {
-       }
-
-       @Override
-       public void deviceChanged(final IDevice device, int changeMask) {
-               if (changeMask == 1) {
-                       if (parent.isDisposed() == false) {
-                               Display display = parent.getDisplay();
-                               display.asyncExec(new Runnable() {
-                                       public void run() {
-                                               if (folders.isDisposed() == false) {
-                                                       LogTab tab = createDefaultTab(device, null);
-                                                       tab.startLogTab();
-                                               } else {
-                                                       SmartDevelopmentBridge
-                                                                       .removeDeviceChangeListener(LogPanel.this);
-                                               }
-                                       }
-                               });
-                       }
-               }
-       }
-
-       public void setActionEnabled(int enable) {
-
-               if (enable == ENABLE_NOTHING) {
-
-                       addAction.setEnabled(false);
-                       removeAction.setEnabled(false);
-                       editAction.setEnabled(false);
-                       exportAction.setEnabled(false);
-                       clearAction.setEnabled(false);
-                       for (Action a : levelActions) {
-                               a.setEnabled(false);
-                       }
-               } else if (enable == ENABLE_DEFAULT) {
-                       addAction.setEnabled(true);
-                       removeAction.setEnabled(false);
-                       editAction.setEnabled(false);
-                       exportAction.setEnabled(true);
-                       clearAction.setEnabled(true);
-                       for (Action a : levelActions) {
-                               a.setEnabled(true);
-                       }
-               } else if (enable == ENABLE_ALL) {
-                       addAction.setEnabled(true);
-                       removeAction.setEnabled(true);
-                       editAction.setEnabled(true);
-                       exportAction.setEnabled(true);
-                       clearAction.setEnabled(true);
-                       for (Action a : levelActions) {
-                               a.setEnabled(true);
-                       }
-               }
-       }
-}
\ No newline at end of file
+public class LogPanel extends Panel implements IDeviceChangeListener
+{
+
+    //Nothing enabled
+    public static final int NO_TAB = 0;
+    //Only remove disabled
+    public static final int DEVICE_TAB = 1;
+    //Everything enabled
+    public static final int ADDITIONAL_TAB = 2;
+    //Only add, edit disabled
+    public static final int DISCONNECTED_TAB = 3;
+    
+    private final int ENABLE_ADD = 0x0000001;
+    private final int ENABLE_REMOVE = 0x0000010;
+    private final int ENABLE_EDIT = 0x0000100; 
+    private final int ENABLE_SCROLL_LOCK = 0x0001000;
+    private final int ENABLE_EXPORT = 0x0010000;
+    private final int ENABLE_CLEAR = 0x0100000;
+    private final int ENABLE_LEVEL = 0x1000000;
+
+    private final int[] ENABLE_VIEW_ACTIONS= { ENABLE_ADD, ENABLE_REMOVE, ENABLE_EDIT, 
+            ENABLE_SCROLL_LOCK, ENABLE_EXPORT, ENABLE_CLEAR};
+
+    private String defaultLogSave;
+
+    private Composite parent;
+    private TabFolder tabFolder;
+
+    private final LogColors colors;
+
+    private Action[] levelActions;
+    private Action[] viewActions;
+    
+    private IActionBars actionBars;
+
+    private StackLayout stackLayout;
+
+    public static List<LogTab> logTabList = new ArrayList<LogTab>();
+
+    /** message data, separated from content for multi line messages */
+    protected static class LogMessageInfo
+    {
+        public LogLevel logLevel;
+        public String pidString;
+        public String tidString;
+        public String tag;
+        public String time;
+    }
+
+    private ITableFocusListener globalListener;
+
+    /** message data, separated from content for multi line messages */
+    protected static class LogMessage
+    {
+        public LogMessageInfo data;
+        public String msg;
+
+        @Override
+        public String toString()
+        {
+            return data.time + " : " + data.logLevel + " / " + data.tag + " ( " + data.pidString 
+                       + " : " + data.tidString + " ) : " + msg;
+            
+        }
+    }
+
+    /**
+     * Create the log panel with some default parameters
+     *
+     * @param colors
+     *            The display color object
+     */
+    public LogPanel(LogColors pColors, IActionBars bars)
+    {
+        colors = pColors;
+        actionBars = bars;
+    }
+
+    public void setActions(Action[] levelActs, Action[] toolbarActs)
+    {
+        levelActions = levelActs;
+        viewActions = toolbarActs;
+    }
+
+    /**
+     * Creates a control capable of displaying some information. This is called
+     * once, when the application is initializing, from the UI thread.
+     */
+    @Override
+    protected Control createControl(Composite p)
+    {
+        parent = p;
+
+        // create the tab folder
+        tabFolder = new TabFolder(parent, SWT.NONE);
+        tabFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
+        //use stack layout
+        stackLayout = new StackLayout();
+        tabFolder.setLayout(stackLayout);
+        tabFolder.addSelectionListener(new SelectionAdapter()
+        {
+            @Override
+            public void widgetSelected(SelectionEvent e)
+            {
+                selectTabItem();
+            }
+        });
+
+        SmartDevelopmentBridge.addDeviceChangeListener(this, true);
+        return null;
+    }
+
+    @Override
+    protected void postCreation()
+    {
+    }
+
+    /**
+     * Sets the focus to the proper object.
+     */
+    @Override
+    public void setFocus()
+    {
+    }
+
+    /**
+     * do something when select TabItem
+     */
+    private void selectTabItem()
+    {
+        int index = tabFolder.getSelectionIndex();
+        if(index == -1)
+        {
+            return ;
+        }
+        TabItem item = tabFolder.getItem(index);
+        LogTab logTab = getSelectionLogTab();
+        if(logTab == null)
+        {
+            return ;
+        }
+
+        setEnableAndCheckState(logTab);
+        stackLayout.topControl = item.getControl();
+    }
+
+
+    /**
+     * Set action enable state depending on a logTab type.
+     * And then set check state.
+     * @param logTab
+     */
+    private void setEnableAndCheckState(LogTab logTab)
+    {
+        String serial = logTab.getDeviceSerialNumber();
+        //if device is disconnected, only remove enabled.
+        if(serial == null)
+        {
+            setEnableState(LogPanel.DISCONNECTED_TAB, logTab);
+        }
+        else
+        {
+            if (logTab.isDefault())
+            {
+                setEnableState(LogPanel.DEVICE_TAB, logTab);
+            }
+            else
+            {
+                setEnableState(LogPanel.ADDITIONAL_TAB, logTab);
+            }
+        }
+        setCheckState(logTab);
+    }
+
+    /**
+     * When user selects level icons, update level value and filter messages.
+     * @param level level type(Debug, Info, Error..)
+     * @param beChecked is Checked or not
+     */
+    public void changeLogLevelAndFilterMessages(int level, boolean beChecked)
+    {
+        updateLevelMode(level, beChecked);
+        getSelectionLogTab().filterMessages();
+    }
+
+    private void updateLevelMode(int level, boolean setCheck)
+    {
+        level = (int) Math.pow(2, level);
+        int levelMode = getSelectionLogTab().getLevelMode();
+        
+        if (setCheck)
+        {
+            levelMode |= level;
+        }
+        else
+        {
+            levelMode &= (~level);
+        }
+        getSelectionLogTab().setLevelMode(levelMode);
+    }
+
+    /**
+     * Create LogTab and TabItem and
+     * set action and icon status
+     * @param device IDevice to get logs
+     * @param name logtab name
+     * @param isDefault check this is default logtab for device
+     * @return
+     */
+    private LogTab createLogTab(String name, IDevice device, boolean isDefault)
+    {
+        Iterator<LogTab> iter = logTabList.iterator();
+        while( iter.hasNext())
+        {
+            LogTab oldTab = iter.next();
+            if(oldTab.getLogTabName().equals(name))
+            {
+                removeTab(oldTab);
+                iter.remove();
+            }
+        }
+
+        LogTab logTab = new LogTab(name, device, colors);
+
+        logTabList.add(logTab);
+        createTabItem(tabFolder, logTab);
+        
+        if (isDefault)
+        {
+            logTab.setDefault();
+            setEnableState(LogPanel.DEVICE_TAB, null);
+        } else
+        {
+            setEnableState(LogPanel.ADDITIONAL_TAB, null);
+        }
+        setCheckState(logTab);
+
+        return logTab;
+    }
+
+    /**
+     * create TabItem and set to LogTab
+     * @param tabFolder
+     * @param logTab
+     * @return
+     */
+    private Control createTabItem(TabFolder tabFolder, final LogTab logTab)
+    {
+        // Create a composite and add four buttons to it
+        Composite composite = new Composite(tabFolder, SWT.NONE);
+        composite.setLayoutData(new GridData(GridData.FILL_VERTICAL));
+        composite.setLayout(new GridLayout(1, false));
+
+        Composite top = new Composite(composite, SWT.NONE);
+        top.setLayoutData(new GridData(GridData.FILL_BOTH));
+        top.setLayout(new FillLayout());
+
+        final Table table = new Table(top, SWT.MULTI | SWT.FULL_SELECTION | SWT.BORDER | SWT.H_SCROLL);
+
+        table.setHeaderVisible(true);
+        table.setLinesVisible(true);
+
+        table.addSelectionListener(new SelectionListener(){
+
+            @Override
+            public void widgetSelected(SelectionEvent e)
+            {
+                String msg = ((LogMessage)e.item.getData()).msg;
+                if(msg == null)
+                    return ;
+                IStatusLineManager statusLineManager = actionBars.getStatusLineManager();
+                if( statusLineManager == null )
+                    return ;
+                statusLineManager.setMessage( msg );
+            }
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e)
+            {}
+        });
+        if (globalListener != null)
+        {
+            addTableToFocusListener(table);
+        }
+
+        createTableColumn(table, "Time", SWT.LEFT, "00-00 00:00:00.000");
+        createTableColumn(table, "Level", SWT.LEFT, "Verbose");
+        createTableColumn(table, "Pid", SWT.LEFT, "9999999");
+        createTableColumn(table, "Tid", SWT.LEFT, "9999999");
+        createTableColumn(table, "Tag", SWT.LEFT, "ABCDEFGHIJK");
+        createTableColumn(table, "Message", SWT.LEFT, "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789");
+
+        Composite bottom = new Composite(composite, SWT.NONE);
+        bottom.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        bottom.setLayout(new GridLayout(3, false));
+
+        Combo filterComboOnView = new Combo(bottom, SWT.READ_ONLY);
+        String[] comboItems = { "Pid", "Tag", "Message" };
+        filterComboOnView.setItems(comboItems);
+        filterComboOnView.select(2);
+        filterComboOnView.setToolTipText(LogUIMessages.Log_Tooltip_View_Filter_Combo);
+        filterComboOnView.addSelectionListener(new SelectionListener()
+        {
+            @Override
+            public void widgetSelected(SelectionEvent e)
+            {
+                Combo combo = (Combo) e.widget;
+                getSelectionLogTab().setFilterCombo(combo.getSelectionIndex());
+                getSelectionLogTab().filterMessages();
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e)
+            {
+            }
+        });
+
+        Text filterTextOnView = new Text(bottom, SWT.SINGLE | SWT.BORDER);
+        filterTextOnView.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        filterTextOnView.setMessage(LogUIMessages.Log_Message_View_Filter_Text);
+        filterTextOnView.addModifyListener(new ModifyListener()
+        {
+            @Override
+            public void modifyText(ModifyEvent e)
+            {
+                Text text = (Text) e.widget;
+                getSelectionLogTab().setFilterText(text.getText());
+                getSelectionLogTab().filterMessages();
+            }
+        });
+
+        TabItem tabItem = new TabItem(tabFolder, SWT.NONE, tabFolder.getItemCount());
+        tabItem.setText(logTab.getLogTabName());
+        tabItem.setControl(composite);
+        logTab.setTable(table);
+        logTab.setTabItem(tabItem);
+        tabFolder.setSelection(tabItem);
+        stackLayout.topControl = tabItem.getControl();
+
+        return composite;
+    }
+
+    /**
+     * Copies the current selection of the current filter as multiline text.
+     *
+     * @param clipboard
+     *            The clipboard to place the copied content.
+     */
+    public void copy(Clipboard clipboard)
+    {
+        // get the current table and its selection
+        copyTable(clipboard, getSelectionLogTab().getTable());
+    }
+
+    /**
+     * Selects all lines.
+     */
+    public void selectAll()
+    {
+        getSelectionLogTab().getTable().selectAll();
+    }
+
+    /**
+     * Sets a TableFocusListener which will be notified when one of the tables
+     * gets or loses focus.
+     *
+     * @param listener
+     */
+    public void setTableFocusListener(ITableFocusListener listener)
+    {
+        // record the global listener, to make sure table created after
+        // this call will still be setup.
+        globalListener = listener;
+
+        for (LogTab tab : logTabList)
+        {
+            addTableToFocusListener(tab.getTable());
+        }
+    }
+
+    /**
+     * Sets up a Table object to notify the global Table Focus listener when it
+     * gets or loses the focus.
+     *
+     * @param table
+     *            the Table object.
+     */
+    private void addTableToFocusListener(final Table table)
+    {
+        // create the activator for this table
+        final IFocusedTableActivator activator = new IFocusedTableActivator()
+        {
+            @Override
+            public void copy(Clipboard clipboard)
+            {
+                copyTable(clipboard, table);
+            }
+
+            @Override
+            public void selectAll()
+            {
+                table.selectAll();
+            }
+        };
+
+        // add the focus listener on the table to notify the global
+        // listener
+        table.addFocusListener(new FocusListener()
+        {
+            @Override
+            public void focusGained(FocusEvent e)
+            {
+                globalListener.focusGained(activator);
+            }
+
+            @Override
+            public void focusLost(FocusEvent e)
+            {
+                globalListener.focusLost(activator);
+            }
+        });
+    }
+
+    /**
+     * Copies the current selection of a Table into the provided Clipboard, as
+     * multi-line text.
+     *
+     * @param clipboard
+     *            The clipboard to place the copied content.
+     * @param table
+     *            The table to copy from.
+     */
+    private static void copyTable(Clipboard clipboard, Table table)
+    {
+        int[] selection = table.getSelectionIndices();
+
+        // we need to sort the items to be sure.
+        Arrays.sort(selection);
+
+        // all lines must be concatenated.
+        StringBuilder sb = new StringBuilder();
+
+        // loop on the selection and output the file.
+        for (int i : selection)
+        {
+            TableItem item = table.getItem(i);
+            LogMessage msg = (LogMessage) item.getData();
+            String line = msg.toString();
+            sb.append(line);
+            sb.append('\n');
+        }
+
+        // now add that to the clipboard
+        clipboard.setContents(new Object[] { sb.toString() }, new Transfer[] { TextTransfer.getInstance() });
+    }
+
+    public boolean save()
+    {
+        if (getSelectionLogTab() == null)
+        {
+            return false;
+        }
+        FileDialog dlg = new FileDialog(parent.getShell(), SWT.SAVE);
+
+        dlg.setText(LogUIMessages.Log_Title_Tab_Export);
+        String saveName = String.format(LogUIMessages.Log_File_Tab_Export_Postfix, getSelectionLogTab().getLogTabName());
+
+        dlg.setFileName(saveName);
+        String defaultPath = defaultLogSave;
+        if (defaultPath == null)
+        {
+            defaultPath = System.getProperty("user.home"); //$NON-NLS-1$
+        }
+        dlg.setFilterPath(defaultPath);
+        dlg.setFilterNames(new String[] { LogUIMessages.Log_File_Tab_Export_Filter });
+        dlg.setFilterExtensions(new String[] { LogUIMessages.Log_File_Tab_Export_Filter_Extensions });
+
+        String fileName = null;
+        boolean again;
+        do
+        {
+            File checkFile;
+            again = false;
+            fileName = dlg.open();
+            if (fileName == null)
+            {
+                return false;
+            }
+            checkFile = new File(fileName);
+            if (checkFile.exists())
+            {
+                int ret = FileDialogUtils.allowFileOverwrite(fileName);
+                if( ret == IDialogConstants.CANCEL_ID)
+                {
+                    again = true;
+                }
+            }
+        } while (again);
+
+        defaultLogSave = dlg.getFilterPath();
+
+        FileWriter writer = null;
+        // loop on the selection and output the file.
+        try
+        {
+            writer = new FileWriter(fileName);
+
+            for (TableItem item : getSelectionLogTab().getTable().getItems())
+            {
+                LogMessage msg = (LogMessage) item.getData();
+                String line = msg.toString();
+                writer.write(line);
+                writer.write('\n');
+            }
+            writer.flush();
+
+        } catch (IOException e)
+        {
+            return false;
+        } finally {
+               IOUtil.tryClose(writer);
+        }
+
+        return true;
+    }
+
+    /**
+     *
+     */
+    public void clear()
+    {
+        LogTab tab = getSelectionLogTab();
+        if ( tab != null)
+        {
+            tab.clear();
+        }
+    }
+
+    /**
+     * check whether device is still connected or not
+     * then notify with dialog
+     *
+     * @param tab target to check device connection
+     * @param title dialog title
+     * @return  if device is disconnected, return false
+     */
+    private boolean checkTabConnection(LogTab tab, String title)
+    {
+        String deviceName = tab.getDeviceSerialNumber();
+        if (deviceName == null)
+        {
+            String tabName = tab.getLogTabName();
+            String message = String.format(LogUIMessages.Log_Message_Tab_Device_Disconnected, tabName);
+            DialogUtil.openErrorDialog(parent.getShell(), title, message);
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * add addtional TabItem and LogTab
+     */
+    public void addTab()
+    {
+        LogTab tab = getSelectionLogTab();
+
+        if (tab == null)
+        {
+            return;
+        }
+
+        if (!checkTabConnection(tab, LogUIMessages.Log_Title_Tab_AddTab_Error))
+        {
+            return;
+        }
+
+        AddViewDialog dlg = new AddViewDialog(parent.getShell(), tab.getDeviceSerialNumber());
+
+        if (dlg.getDevice() == null)
+        {
+            return;
+        }
+
+        if (dlg.open())
+        {
+            for (IDevice device : getDevices())
+            {
+                if (device.getSerialNumber().equals(dlg.getDevice()))
+                {
+
+                    LogTab newTab = createLogTab(dlg.getName(), device, false);
+                    // set filter values from addViewDialog
+                    newTab.setPidFilter(dlg.getPidKeyword());
+                    newTab.setTagFilter(dlg.getTagKeyword());
+                    newTab.setMsgFilter(dlg.getMsgKeyword());
+
+                    newTab.start();
+
+                    break;
+                }
+            }
+        } else
+        {
+            return;
+        }
+    }
+
+    public void removeTab(LogTab tab)
+    {
+        tab.stop(true);
+        SWTUtil.tryDispose(tab.getTabItem());
+    }
+
+    /**
+     * remove selected TabItem and LogTab
+     */
+    public void removeTab()
+    {
+        int index = tabFolder.getSelectionIndex();
+        if (index < 0)
+        {
+            return;
+        }
+        LogTab tab = logTabList.get(index);
+        removeTab(tab);
+        logTabList.remove(tab);
+        if(logTabList.isEmpty())
+        {
+            setEnableState(NO_TAB, null);
+        }
+    }
+
+    /**
+     * edit selected TabItem and LogTab
+     */
+    public void editTab()
+    {
+
+        LogTab oldTab = getSelectionLogTab();
+
+        if (oldTab == null)
+        {
+            return;
+        }
+
+        if (oldTab.isDefault())
+        {
+            return;
+        }
+
+        if (!checkTabConnection(oldTab, LogUIMessages.Log_Title_Tab_EditTab_Error))
+        {
+            return;
+        }
+
+        AddViewDialog dlg = new AddViewDialog(parent.getShell(), oldTab);
+        if (dlg.open())
+        {
+            for (IDevice device : getDevices())
+            {
+                if (device.getSerialNumber().equals(dlg.getDevice()))
+                {
+                    oldTab.stop(true);
+                    oldTab.setDevice(device);
+
+                    for (TabItem item : tabFolder.getItems())
+                    {
+                        if (item.getText().equals(oldTab.getLogTabName()))
+                        {
+                            item.setText(dlg.getName());
+                            oldTab.setLogTabName(dlg.getName());
+                        }
+                    }
+
+                    oldTab.setPidFilter(dlg.getPidKeyword());
+                    oldTab.setTagFilter(dlg.getTagKeyword());
+                    oldTab.setMsgFilter(dlg.getMsgKeyword());
+
+                    oldTab.start();
+
+                    break;
+                }
+            }
+        }
+    }
+
+    /**
+     * Create table column has width as same as sample text length
+     * @param parent table
+     * @param header column header text
+     * @param style column style
+     * @param sampleText sample text to measure column width
+     * @return
+     */
+    public static TableColumn createTableColumn(Table parent, String header, int style, String sampleText)
+    {
+
+        // create the column
+        TableColumn col = new TableColumn(parent, style);
+
+        col.setText(sampleText);
+        col.setMoveable(true);
+        col.pack();
+
+        // set the header
+        col.setText(header);
+
+        return col;
+    }
+
+    /**
+     * get selected logtab from tabitem on folder
+     * @return
+     */
+    public LogTab getSelectionLogTab()
+    {
+        if (logTabList.size() != 0)
+        {
+            int index = tabFolder.getSelectionIndex();
+            TabItem item = tabFolder.getItem(index);
+
+            for(LogTab logTab : logTabList)
+            {
+                if(logTab.getTabItem() == item)
+                {
+                    return logTab;
+                }
+            }
+        }
+        return null;
+    }
+
+    public void stopAllTabItems()
+    {
+        for (LogTab tab : logTabList)
+        {
+            removeTab(tab);
+        }
+        logTabList.clear();
+    }
+
+    private IDevice[] getDevices()
+    {
+        IDevice[] devices;
+        SmartDevelopmentBridge sdbBridge = SmartDevelopmentBridge.getBridge();
+        if(sdbBridge != null)
+        {
+            devices = sdbBridge.getDevices();
+        }
+        else
+        {
+            devices = new IDevice[0];
+        }
+        return devices;
+    }
+
+    @Override
+    public void deviceConnected(IDevice device)
+    {
+        if (device.isOnline())
+        {
+            deviceChanged(device, 1);
+        }
+    }
+
+    @Override
+    public void deviceDisconnected(final IDevice device)
+    {
+
+        if (parent.isDisposed() == false)
+        {
+            Display display = parent.getDisplay();
+            display.asyncExec(new Runnable()
+            {
+                @Override
+                public void run()
+                {
+                    if (parent.isDisposed() == false)
+                    {
+                        String name = ConnectionExplorerLabelProvider.getDeviceSerialWithName(device);
+                        String title = LogUIMessages.Log_Title_View_Device_Disconnected;
+                        String message = String.format(LogUIMessages.Log_Message_View_Device_Disconnected, name, name);
+                        NotifierDialog.notify(title, message, NotificationType.DISCONNECTED);
+                        for( LogTab tab : logTabList)
+                        {
+                            if(device.getSerialNumber().equals(tab.getDeviceSerialNumber()))
+                            {
+                                tab.setDevice(null);
+                            }
+                        }
+                        setEnableState(LogPanel.DISCONNECTED_TAB, null);
+
+                    } else
+                    {
+                        SmartDevelopmentBridge.removeDeviceChangeListener(LogPanel.this);
+                    }
+                }
+            });
+        }
+    }
+
+    @Override
+    public void deviceChanged(final IDevice device, int changeMask)
+    {
+        if (changeMask == 1)
+        {
+            if (parent.isDisposed() == false)
+            {
+                Display display = parent.getDisplay();
+                display.asyncExec(new Runnable()
+                {
+                    @Override
+                    public void run()
+                    {
+                        if (tabFolder.isDisposed() == false)
+                        {
+                            LogTab tab = createLogTab(ConnectionExplorerLabelProvider.getDeviceSerialWithName(device), device, true);
+                            tab.start();
+                        } else
+                        {
+                            SmartDevelopmentBridge.removeDeviceChangeListener(LogPanel.this);
+                        }
+                    }
+                });
+            }
+        }
+    }
+
+    /**
+     * Get enabled state for each action with state value.
+     * @param state
+     * @param action
+     * @return
+     */
+    private boolean getEnabled(int state, int action)
+    {
+        int result = (state & action);
+        return result != 0 ? true : false;
+    }
+
+    /**
+     * Change actions enabled state
+     * @param state action enabled state
+     * @param oldTab if old tab is not null, re-set oldtab's enable state
+     */
+    private void changeEnableState(int state, LogTab oldTab)
+    {
+        for(int i = 0; i < viewActions.length; i++)
+        {
+            viewActions[i].setEnabled(getEnabled(state, ENABLE_VIEW_ACTIONS[i]));
+        }
+
+        boolean check = getEnabled(state, ENABLE_LEVEL);
+        boolean[] bEnable = {false, false, false, false, false, false};
+        //if level is enabled,
+        if(check)
+        {
+            LogLevel level = null;
+            if(oldTab == null)
+            {
+                level = LogLevel.getByString(ConnectionPlugin.getDefault().getPreferenceStore().getString(TizenLogPreferencePage.KEY_DEFAULT_LEVEL));
+            }
+            else
+            {
+                level = oldTab.getLogLevel();
+            }
+            
+            for(int i = level.ordinal(); i < bEnable.length; i++)
+            {
+                bEnable[i] = true;
+                if(oldTab == null)
+                {
+                    updateLevelMode(i, true);
+                }
+            }
+        }
+
+        for(int i = 0; i < levelActions.length; i++)
+        {
+            levelActions[i].setEnabled(bEnable[i]);
+        }
+    }
+
+    /**
+     * Set checked state for action(loglevel, scroll lock) depending on a logTab
+     * when create new logtab or select the logtab.
+     */
+    private void setCheckState(LogTab tab)
+    {
+        int levelMode = tab.getLevelMode();
+        for (int i = 0; i < levelActions.length; i++)
+        {
+            int a = levelMode & (0x1 << i);
+            levelActions[i].setChecked(a == (int) Math.pow(2, i));
+        }
+
+        //Scroll lock action is toggle action
+        viewActions[3].setChecked(tab.getScrollLock());
+    }
+    
+    /**
+     * Get enabled state for action depending on a logTab type.
+     */
+    public int getEnabledStateForActions(int tabType)
+    {
+        int enable = 0x0000000;
+
+        if (tabType == NO_TAB)
+        {
+            enable = 0x0000000;
+        }
+        else if (tabType == DEVICE_TAB)
+        {
+            enable = ENABLE_ADD | ENABLE_SCROLL_LOCK | ENABLE_EXPORT | ENABLE_CLEAR | ENABLE_LEVEL;
+        }
+        else if (tabType == ADDITIONAL_TAB)
+        {
+            enable = ENABLE_ADD | ENABLE_REMOVE | ENABLE_EDIT | ENABLE_SCROLL_LOCK | ENABLE_EXPORT | ENABLE_CLEAR | ENABLE_LEVEL;
+        }
+        else if (tabType == DISCONNECTED_TAB)
+        {
+            enable = ENABLE_REMOVE | ENABLE_EXPORT | ENABLE_LEVEL;
+        }
+
+        return enable;
+    }
+
+    /**
+     * Set enabled state for action depending on a logTab type 
+     * (NO_TAB, DEVICE_TAB, ADDITIONAL_TAB).
+     * @param tabType
+     */
+    public void setEnableState(int tabType, LogTab tab)
+    {
+        int mode = getEnabledStateForActions(tabType);
+        changeEnableState(mode, tab);
+    }
+
+    /**
+     * Set scroll locked or unlocked.
+     * @param lock
+     */
+    public void setScrollLock(boolean lock)
+    {
+        getSelectionLogTab().setScrollLock(lock);
+    }
+}
old mode 100644 (file)
new mode 100755 (executable)
index 5e49a7c..701e3d4
 /*
-*  Common
-*
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-*
-* Contact: 
-* Hoon Kang <h245.kang@samsung.com>
-* Hyunsik Noh <hyunsik.noh@samsung.com>
-* 
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hoon Kang <h245.kang@samsung.com>
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-* Contributors:
-* - S-Core Co., Ltd
-*
-*/
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
 package org.tizen.common.connection.log;
 
+import static org.tizen.common.util.SWTUtil.syncExec;
+
 import java.util.ArrayList;
+import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.eclipse.jface.action.Action;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.SWTException;
 import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.ScrollBar;
 import org.eclipse.swt.widgets.TabItem;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableItem;
+import org.tizen.common.connection.ConnectionPlugin;
 import org.tizen.common.connection.log.LogPanel.LogMessage;
 import org.tizen.common.connection.log.LogPanel.LogMessageInfo;
-import org.tizen.common.console.AnsicodeAdapter;
-
+import org.tizen.common.connection.preference.TizenLogPreferencePage;
+import org.tizen.common.ui.view.console.AnsicodeAdapter;
+import org.tizen.common.util.StringUtil;
+import org.tizen.common.util.log.Logger;
 import org.tizen.sdblib.IDevice;
-import org.tizen.sdblib.Log;
 import org.tizen.sdblib.Log.LogLevel;
 import org.tizen.sdblib.MultiLineReceiver;
 
-public class LogTab {
-
-       private static final int STRING_BUFFER_LENGTH = 10000;
-
-       public static final int FILTER_NONE = -1;
-       public static final int FILTER_PID = 0x0;
-       public static final int FILTER_TAG = 0x1;
-       public static final int FILTER_MSG = 0x2;
-       private int filterMode = FILTER_NONE;
-
-       public static final int LEVEL_ALL = 0x1F;
-       public static final int LEVEL_VERBOSE = 0x1;
-       public static final int LEVEL_DEBUG = 0x2;
-       public static final int LEVEL_INFO = 0x4;
-       public static final int LEVEL_WARNING = 0x8;
-       public static final int LEVEL_ERROR = 0x16;
-
-       /**
-        * Single level log level as defined in Log.mLevelChar. Only valid if mMode
-        * is MODE_LEVEL
-        */
-       private int levelMode = LEVEL_ALL;
-
-       private String[] pidFilter = null;
-       private String[] tagFilter = null;
-       private String[] msgFilter = null;
-       
-       private String pidFilterString = null;
-       private String tagFilterString = null;
-       private String msgFilterString = null;
-       private String tableFilter = null;
-       private String filterName = null;
-       private IDevice filterDevice = null;
-       private LogTabOuputReceiver logger = null;
-       private LogColors colors;
-
-       private Table table;
-       private TabItem tabItem;
-
-       private static Pattern logPattern = Pattern
-                       .compile("^\\[\\s(\\d\\d-\\d\\d\\s\\d\\d:\\d\\d:\\d\\d\\.\\d+)" + //$NON-NLS-1$
-                                       "\\s+(\\d*):\\s*(\\d+)\\s([VDIWE])/(.+)\\s+\\]$"); 
-
-       private ArrayList<LogMessage> tableMessages = new ArrayList<LogMessage>();
-       private ArrayList<LogMessage> newMessages = new ArrayList<LogMessage>();
-       private LogMessage[] buffer = new LogMessage[STRING_BUFFER_LENGTH];
-
-       private LogMessageInfo lastMessageInfo = null;
-       private boolean pendingAsyncRefresh = false;
-
-       private boolean isDefault = false;
-       private int removedMessageCount = 0;
-
-       private int indexStart = -1;
-       private int indexEnd = -1;
-
-       public LogTab(String pName, IDevice pDevice, LogColors pColors) {
-               filterName = pName;
-               filterDevice = pDevice;
-               this.colors = pColors;
-       }
-
-       public LogTab() {
-       }
-
-       /** Sets the name of the filter. */
-       public void setFilterName(String name) {
-               filterName = name;
-       }
-
-       public void setPidFilter(String pid) {
-               pidFilterString = pid;
-               if (pid != null)
-                       pidFilter = setFilter(pid.split("[\\s\t,]"));
-               else
-                       pidFilter = null;
-       }
-
-       public void setTagFilter(String tag) {
-               tagFilterString = tag;
-               if (tag != null)
-                       tagFilter = setFilter(tag.split("[\\s\t,]"));
-               else
-                       tagFilter = null;
-       }
-
-       public void setMsgFilter(String msg) {
-               msgFilterString = msg;
-               if (msg != null)
-                       msgFilter = setFilter(msg.split("[\\s\t,]"));
-               else
-                       msgFilter = null;               
-       }
-       
-       private String[] setFilter(String[] array) {
-               ArrayList<String> result = new ArrayList<String>();
-               for (String s : array) {
-                       if (s.length() > 0) {
-                               result.add(s);
-                       }
-               }
-               return result.toArray(new String[(result.size())]);
-       }
-       
-       public String getFilterName() {
-               return filterName;
-       }
-
-       public int getLevelMode() {
-               return levelMode;
-       }
-
-       public String getPidFilter() {
-               return pidFilterString;
-       }
-
-       public String getTagFilter() {
-               return tagFilterString;
-       }
-
-       public String getMsgFilter() {
-               return msgFilterString;
-       }
-
-       public String getFilterDeviceName() {
-               return filterDevice.getSerialNumber();
-       }
-
-       public void setTab(TabItem pTabItem) {
-               tabItem = pTabItem;
-       }
-
-       public void setTable(Table pTable) {
-               table = pTable;
-       }
-
-       public boolean uiReady() {
-               return (table != null && tabItem != null);
-       }
-
-       /**
-        * Returns the UI table object.
-        * 
-        * @return
-        */
-       public Table getTable() {
-               return table;
-       }
-
-       public void dispose() {
-               table.dispose();
-               tabItem.dispose();
-               table = null;
-               tabItem = null;
-       }
-
-       public void startLogTab() {
-
-               resetUI(false);
-
-               if (filterDevice != null) {
-
-                       // create a new output receiver
-                       logger = new LogTabOuputReceiver();
-
-                       // start the LogTab in a different thread
-                       new Thread(filterDevice.getSerialNumber() + " Logger") { //$NON-NLS-1$
-                               @Override
-                               public void run() {
-
-                                       while (filterDevice.isOnline() == false && logger != null && logger.isCancelled == false) {
-                                               try {
-                                                       sleep(2000);
-                                               } catch (InterruptedException e) {
-                                                       Log.e("LogTab",
-                                                                       "Device is not online or logger is null/cancelled");
-                                                       return;
-                                               }
-                                       }
-
-                                       if (logger == null || logger.isCancelled) {
-                                               return;
-                                       }
-
-                                       try {
-
-                                               filterDevice.executeShellCommand(
-                                                               "dlogutil -v long *:v", logger, 0 /* timeout */); //$NON-NLS-1$
-                                       } catch (Exception e) {
-                                               Log.e("LogTab", e);
-                                       } finally {
-                                               logger = null;
-                                               filterDevice = null;
-                                       }
-                               }
-                       } .start();
-               }
-       }
-
-       /** Stop the current LogTab */
-       public void stopLogTab(boolean inUiThread) {
-               if (logger != null) {
-                       logger.isCancelled = true;
-
-                       logger = null;
-
-                       clear();
-
-                       resetUI(inUiThread);
-               }
-       }
-
-       public boolean addMessage(LogMessage newMessage, LogMessage oldMessage) {
-               synchronized (tableMessages) {
-                       if (oldMessage != null) {
-                               int index = tableMessages.indexOf(oldMessage);
-                               if (index != -1) {
-                                       tableMessages.remove(index);
-                                       removedMessageCount++;
-                               }
-
-                               index = tableMessages.indexOf(oldMessage);
-                               if (index != -1) {
-                                       tableMessages.remove(index);
-                               }
-                       }
-
-                       boolean filter = accept(newMessage);
-
-                       if (filter) {
-                               tableMessages.add(newMessage);
-                               newMessages.add(newMessage);
-                       }
-
-                       return filter;
-               }
-       }
-
-       boolean accept(LogMessage logMessage) {
-               if (logMessage == null)
-                       return false;
-
-               if (levelMode != LEVEL_ALL) {
-                       int a = 0;
-                       a = (levelMode & (0x1 << (logMessage.data.logLevel.getPriority() - 2)));
-
-                       if (a == 0)
-                               return false;
-               }
-
-               if (pidFilter != null || tagFilter != null || msgFilter != null) {
-                       if (pidFilter != null) {
-                               for (String filter : pidFilter) {
-                                       if (logMessage.data.pidString.contains(
-                                                       filter))
-                                               if (tableAccept(logMessage))
-                                                       return true;
-                               }
-                       }
-
-                       if (tagFilter != null) {
-                               for (String filter : tagFilter) {
-                                       if (logMessage.data.tag.toLowerCase().contains(
-                                                       filter.toLowerCase()))
-                                               if (tableAccept(logMessage))
-                                                       return true;
-                               }
-                       }
-
-                       if (msgFilter != null) {
-                               for (String filter : msgFilter) {
-                                       if (logMessage.msg.toLowerCase().contains(
-                                                       filter.toLowerCase()))
-                                               if (tableAccept(logMessage))
-                                                       return true;
-                               }
-                       }
-                       return false;
-               }
-               if (tableAccept(logMessage))
-                       return true;
-               else
-                       return false;
-       }
-
-       public void flush() {
-
-               ScrollBar bar = table.getVerticalBar();
-               boolean scroll = bar.getMaximum() == bar.getSelection() + bar.getThumb();
-
-               int topIndex = table.getTopIndex();
-
-               table.setRedraw(false);
-
-               int totalCount = newMessages.size();
-
-               try {
-                       // remove the items of the old messages.
-                       for (int i = 0; i < removedMessageCount && table.getItemCount() > 0; i++) {
-                               table.remove(0);
-                       }
-
-                       // add the new items
-                       for (int i = 0; i < totalCount; i++) {
-                               LogMessage msg = newMessages.get(i);
-                               addTableItem(msg);
-                       }
-               } catch (SWTException e) {
-                       // log the error and keep going. Content of the LogTab
-                       // table maybe unexpected
-                       // but at least ddms won't crash.
-                       Log.e("LogFilter", e);
-               }
-
-               // redraw
-               table.setRedraw(true);
-
-               // scroll if needed, by showing the last item
-               if (scroll) {
-                       totalCount = table.getItemCount();
-                       if (totalCount > 0) {
-                               table.showItem(table.getItem(totalCount - 1));
-                       }
-               } else if (removedMessageCount > 0) {
-                       // we need to make sure the topIndex is still visible.
-                       // Because really old items are removed from the list, this
-                       // could make it disappear
-                       // if we don't change the scroll value at all.
-
-                       topIndex -= removedMessageCount;
-                       if (topIndex < 0) {
-                               // looks like it disappeared. Lets just show the
-                               // first item
-                               table.showItem(table.getItem(0));
-                       } else {
-                               table.showItem(table.getItem(topIndex));
-                       }
-               }
-
-               newMessages.clear();
-               removedMessageCount = 0;
-
-       }
-
-       void setColors(LogColors pColors) {
-               colors = pColors;
-       }
-
-       /**
-        * Add a TableItem for the index-th item of the buffer
-        * 
-        * @param filter
-        *            The index of the table in which to insert the item.
-        */
-       private void addTableItem(LogMessage msg) {
-               TableItem item = new TableItem(table, SWT.NONE);
-               item.setText(0, msg.data.time);
-               // item.setText(1,
-               // new String(new char[]{msg.data.logLevel.getPriorityLetter()}));
-               item.setText(2, msg.data.pidString);
-               item.setText(3, msg.data.tag);
-               item.setText(4, msg.msg);
-
-               // add the buffer index as data
-               item.setData(msg);
-
-               if (msg.data.logLevel == LogLevel.INFO) {
-                       item.setForeground(colors.infoColor);
-                       item.setText(1, "Info");
-               } else if (msg.data.logLevel == LogLevel.DEBUG) {
-                       item.setForeground(colors.debugColor);
-                       item.setText(1, "Debug");
-               } else if (msg.data.logLevel == LogLevel.ERROR) {
-                       item.setForeground(colors.errorColor);
-                       item.setText(1, "Error");
-               } else if (msg.data.logLevel == LogLevel.WARN) {
-                       item.setForeground(colors.warningColor);
-                       item.setText(1, "Warn");
-               } else if (msg.data.logLevel == LogLevel.WARN) {
-                       item.setForeground(colors.verboseColor);
-                       item.setText(1, "Verbose");
-               }
-       }
-
-       /**
-        * objects able to receive the output of a remote shell command,
-        * specifically a LogTab command in this case
-        */
-       private final class LogTabOuputReceiver extends MultiLineReceiver {
-
-               public boolean isCancelled = false;
-
-               public LogTabOuputReceiver() {
-                       super();
-
-                       setTrimLine(false);
-               }
-
-               @Override
-               public void processNewLines(String[] lines) {
-                       if (isCancelled == false) {
-                               processLogLines(lines);
-                       }
-               }
-
-               public boolean isCancelled() {
-                       return isCancelled;
-               }
-       }
-
-       /**
-        * Process new Log lines coming from {@link LogCatOuputReceiver}.
-        * 
-        * @param lines
-        *            the new lines
-        */
-       protected void processLogLines(String[] lines) {
-               // WARNING: this will not work if the string contains more line
-               // than
-               // the buffer holds.
-
-               if (lines.length > STRING_BUFFER_LENGTH) {
-                       Log.e("LogTab", "Receiving more lines than STRING_BUFFER_LENGTH");
-               }
-
-               // parse the lines and create LogMessage that are stored in a
-               // temporary list
-               final ArrayList<LogMessage>newMessages = new ArrayList<LogMessage>();
-
-               synchronized (buffer) {
-                       for (String line : lines) {
-                               line = AnsicodeAdapter.getStripAnsiString(line);
-                               // ignore empty lines.
-                               if (line.length() > 0) {
-                                       // check for header lines.
-                                       Matcher matcher = logPattern.matcher(line);
-                                       if (matcher.matches()) {
-                                               // this is a header line, parse the
-                                               // header and keep it around.
-                                               lastMessageInfo = new LogMessageInfo();
-
-                                               lastMessageInfo.time = matcher.group(1);
-                                               lastMessageInfo.pidString = matcher.group(2);
-                                               lastMessageInfo.logLevel = LogLevel
-                                                               .getByLetterString(matcher.group(4));
-                                               lastMessageInfo.tag = matcher.group(5).trim();
-                                       } else {
-                                               // This is not a header line.
-                                               // Create a new LogMessage and process
-                                               // it.
-                                               LogMessage mc = new LogMessage();
-
-                                               if (lastMessageInfo == null) {
-                                                       return;
-                                               }
-
-                                               // If someone printed a log message
-                                               // with
-                                               // embedded '\n' characters, there
-                                               // will
-                                               // one header line followed by
-                                               // multiple text lines.
-                                               // Use the last header that we saw.
-                                               mc.data = lastMessageInfo;
-
-                                               // tabs seem to display as only 1 tab
-                                               // so we replace the leading tabs
-                                               // by 4 spaces.
-                                               mc.msg = line.replaceAll("\t", "    "); //$NON-NLS-1$ //$NON-NLS-2$
-
-                                               // process the new LogMessage.
-                                               processNewMessage(mc);
-
-                                               // store the new LogMessage
-                                               newMessages.add(mc);
-                                       }
-                               }
-                       }
-
-                       // if we don't have a pending Runnable that will do the
-                       // refresh, we
-                       // ask the Display
-                       // to run one in the UI thread.
-                       if (pendingAsyncRefresh == false) {
-                               pendingAsyncRefresh = true;
-
-                               try {
-                                       Display display = table.getDisplay();
-
-                                       // run in sync because this will update the
-                                       // buffer start/end indices
-                                       display.asyncExec(new Runnable() {
-                                               public void run() {
-                                                       asyncRefresh();
-                                               }
-                                       });
-                               } catch (SWTException e) {
-                                       // display is disposed, we're probably
-                                       // quitting. Let's stop.
-                                       stopLogTab(false);
-                               }
-                       }
-               }
-       }
-
-       /**
-        * Processes a new Message.
-        * <p/>
-        * This adds the new message to the buffer, and gives it to the existing
-        * filters.
-        * 
-        * @param newMessage
-        */
-       private void processNewMessage(LogMessage newMessage) {
-               // // if we are in auto filtering mode, make sure we have
-               // // a filter for this
-
-               // compute the index where the message goes.
-               // was the buffer empty?
-               int messageIndex = -1;
-               if (indexStart == -1) {
-                       indexStart = 0;
-                       messageIndex = indexStart;
-                       indexEnd = 1;
-               } else {
-                       messageIndex = indexEnd;
-
-                       // check we aren't overwriting start
-                       if (indexEnd == indexStart) {
-                               indexStart = (indexStart + 1) % STRING_BUFFER_LENGTH;
-                       }
-
-                       // increment the next usable slot index
-                       indexEnd = (indexEnd + 1) % STRING_BUFFER_LENGTH;
-               }
-
-               LogMessage oldMessage = null;
-
-               // record the message that was there before
-               if (buffer[messageIndex] != null) {
-                       oldMessage = buffer[messageIndex];
-               }
-
-               // then add the new one
-               buffer[messageIndex] = newMessage;
-
-               synchronized (tableMessages) {
-                       if (oldMessage != null) {
-                               if (tableMessages.size() > STRING_BUFFER_LENGTH) {
-                                       int index = tableMessages.indexOf(oldMessage);
-                                       if (index != -1) {
-                                               // TODO check that index will always
-                                               // be -1 or 0, as only the oldest
-                                               // message is ever removed.
-                                               tableMessages.remove(index);
-                                               removedMessageCount++;
-                                       }
-                               }
-                       }
-               }
-
-               boolean filter = accept(newMessage);
-               if (filter) {
-                       // at this point the message is accepted, we add it to the
-                       // list
-                       tableMessages.add(newMessage);
-                       newMessages.add(newMessage);
-               }
-
-       }
-
-       /**
-        * Refreshes the UI with new messages.
-        */
-       private void asyncRefresh() {
-               if (table.isDisposed() == false) {
-                       synchronized (buffer) {
-                               try {
-                                       // the circular buffer has been updated, let
-                                       // have the filter flush
-                                       // their display with the new messages.
-                                       flush();
-
-                               } finally {
-                                       // the pending refresh is done.
-                                       pendingAsyncRefresh = false;
-                               }
-                       }
-               } else {
-                       stopLogTab(true);
-               }
-       }
-
-       public void resetUI(boolean inUiThread) {
-
-               // the ui is static we just empty it.
-               if (table.isDisposed() == false) {
-                       if (inUiThread) {
-                               table.removeAll();
-                       } else {
-                               Display d = table.getDisplay();
-
-                               // run sync as we need to update right now.
-                               d.syncExec(new Runnable() {
-                                       public void run() {
-                                               if (table.isDisposed() == false) {
-                                                       table.removeAll();
-                                               }
-                                       }
-                               });
-                       }
-               }
-       }
-
-       public void setLevelIcon(Action[] icons) {
-               for (int i = 0; i < 5; i++) {
-                       int a = levelMode & (0x1 << i);
-                       icons[i].setChecked(a == (int) Math.pow(2, i));
-               }
-       }
-
-       public void initTab() {
-
-               // is it empty
-               if (uiReady() == false) {
-                       return;
-               }
-
-               msgClear();
-
-               if (indexStart != -1) {
-                       int max = indexEnd;
-                       if (indexEnd < indexStart) {
-                               max += STRING_BUFFER_LENGTH;
-                       }
-
-                       for (int i = indexStart; i < max; i++) {
-                               int realItemIndex = i % STRING_BUFFER_LENGTH;
-
-                               addMessage(buffer[realItemIndex], null /*
-                                                                                                                * old message
-                                                                                                                */);
-                       }
-               }
-
-               flush();
-       }
-
-       public void refill() {
-               msgClear();
-
-               synchronized (buffer) {
-                       for (LogMessage logMsg : buffer) {
-                               if (accept(logMsg)) {
-                                       tableMessages.add(logMsg);
-                                       newMessages.add(logMsg);
-                               }
-                       }
-               }
-               flush();
-       }
-       
-       public void tableRefill(int index, String filter) {
-
-               
-               tableFilter = filter;
-               filterMode = index;
-               
-               newMessages.clear();
-               lastMessageInfo = null;
-               if (table.isDisposed() == false)
-                       table.removeAll();
-
-               synchronized (tableMessages) {
-                       for (LogMessage logMsg : tableMessages) {
-                               if (tableAccept(logMsg)) {
-                                       newMessages.add(logMsg);
-                               }
-                       }
-               }
-               flush();
-       }
-       
-       boolean tableAccept(LogMessage logMessage) {
-               if (logMessage == null)
-                       return false;
-               
-               if (tableFilter == null || tableFilter.length() == 0)
-                       return true;
-               
-               switch(filterMode) {                                    
-               case 0:
-                       {
-                               String[] filter = tableFilter.split("[\\s\t,]");
-                               for (int i = 0; i < filter.length; i++) {
-                                       if (logMessage.data.pidString.contains(
-                                                       filter[i]))
-                                               return true;
-                               }
-                       }
-                       break;
-                       
-               case 1:
-                       {
-                               String[] filter = tableFilter.split("[\\s\t,]");
-                               for (int i = 0; i < filter.length; i++) {
-                                       if (logMessage.data.tag.toLowerCase().contains(
-                                                       filter[i].toLowerCase()))
-                                               return true;
-                               }
-                       }
-                       break;
-                       
-               case 2:
-                       {
-                               String[] filter = tableFilter.split("[\\s\t,]");
-                               for (int i = 0; i < filter.length; i++) {
-                                       if (logMessage.msg.toLowerCase().contains(
-                                                       filter[i].toLowerCase()))
-                                               return true;
-                               }
-                       }
-                       break;
-                       
-               default:
-                       return false;
-
-               }
-               return false;
-       }
-
-       public void setLevel(int level, boolean setLevel) {
-               level = (int) Math.pow(2, level);
-               if (setLevel)
-                       levelMode |= level;
-               else
-                       levelMode &= (~level);
-       }
-
-       public void msgClear() {
-               removedMessageCount = 0;
-               newMessages.clear();
-               lastMessageInfo = null;
-               tableMessages.clear();
-               if (table.isDisposed() == false)
-                       table.removeAll();
-       }
-
-       public void clear() {
-               for (int i = 0; i < STRING_BUFFER_LENGTH; i++) {
-                       buffer[i] = null;
-               }
-
-               indexStart = -1;
-               indexEnd = -1;
-
-               msgClear();
-       }
-
-       public void setDevice(IDevice device) {
-               filterDevice = device;
-       }
-
-       public void setDefault() {
-               isDefault = true;
-       }
-
-       public boolean isDefault() {
-               return isDefault;
-       }
-
+public class LogTab
+{
+
+    private static final int STRING_BUFFER_LENGTH = 5000;
+
+    public static final int FILTER_NONE = -1;
+    public static final int FILTER_PID = 0;
+    public static final int FILTER_TAG = 1;
+    public static final int FILTER_MESSAGE = 2;
+
+    public static final int LEVEL_ALL = 0x3F;
+    private int levelMode;
+    private LogLevel defaultLevel;
+    
+    //words to filter
+    private String[] pidFilters = null;
+    private String[] tagFilters = null;
+    private String[] msgFilters = null;
+
+    //need to show previous input value when tab dialog is opened
+    private String pidInput = null;
+    private String tagInput = null;
+    private String msgInput = null;
+
+    private int filterCombo = FILTER_MESSAGE;
+    private String filterText = "";
+
+    private String logTabName = null;
+    private IDevice device = null;
+    private LogTabOuputReceiver logReceiver = null;
+    private LogColors colors;
+
+    private Table table;
+    private TabItem tabItem;
+
+    private boolean isScrollLocked;
+
+    private static Pattern logPattern = Pattern.compile("^\\[\\s(\\d\\d-\\d\\d\\s\\d\\d:\\d\\d:\\d\\d\\.\\d+)"
+    + "\\s+(\\d*):\\s*(\\d+)\\s([VDIWEF])/(.+)\\s+\\]$");
+
+    //Array to keep all messages from device
+    private final LogMessage[] allMessages = new LogMessage[STRING_BUFFER_LENGTH];
+
+    //List about filtered messages with pidFilters, tagFilters, msgFilters
+    private final List<LogMessage> filteredMessages = new ArrayList<LogMessage>();
+
+    //List about messages need to added table contents
+    private final List<LogMessage> newMessages = new ArrayList<LogMessage>();
+
+    private LogMessageInfo lastMessageInfo = null;
+
+    private boolean isDefault = false;
+
+    //index for allMessages
+    private int indexStart = -1;
+    private int indexEnd = -1;
+
+    public LogTab(String pName, IDevice pDevice, LogColors pColors)
+    {
+        logTabName = pName;
+        device = pDevice;
+        this.colors = pColors;
+        defaultLevel = LogLevel.getByString(ConnectionPlugin.getDefault().getPreferenceStore().getString(TizenLogPreferencePage.KEY_DEFAULT_LEVEL));
+    }
+
+    public LogTab()
+    {
+    }
+
+    public void setLogTabName(String name)
+    {
+        logTabName = name;
+    }
+
+    /**
+     * Get logTab name
+     * @return String
+     */
+    public String getLogTabName()
+    {
+        return logTabName;
+    }
+
+    public void setPidFilter(String pid)
+    {
+        pidInput = pid;
+        if (pid != null)
+        {
+            pidFilters = setFilter(pid.split("[\\s\t,]"));
+        }
+        else
+        {
+            pidFilters = null;
+        }
+    }
+
+    public void setTagFilter(String tag)
+    {
+        tagInput = tag;
+        if (tag != null)
+        {
+            tagFilters = setFilter(tag.split("[\\s\t,]"));
+        }
+        else
+        {
+            tagFilters = null;
+        }
+    }
+
+    public void setMsgFilter(String msg)
+    {
+        msgInput = msg;
+        if (msg != null)
+        {
+            msgFilters = setFilter(msg.split("[\\s\t,]"));
+        }
+        else
+        {
+            msgFilters = null;
+        }
+    }
+
+    private String[] setFilter(String[] array)
+    {
+        ArrayList<String> result = new ArrayList<String>();
+        for (String s : array)
+        {
+            if (s.length() > 0)
+            {
+                result.add(s);
+            }
+        }
+        return result.toArray(new String[(result.size())]);
+    }
+
+    public void setLevelMode(int level)
+    {
+        levelMode = level;
+    }
+
+    public int getLevelMode()
+    {
+        return levelMode;
+    }
+
+    public String getPidFilter()
+    {
+        return pidInput;
+    }
+
+    public String getTagFilter()
+    {
+        return tagInput;
+    }
+
+    public String getMsgFilter()
+    {
+        return msgInput;
+    }
+
+    public String getDeviceSerialNumber()
+    {
+        if (device != null)
+        {
+            return device.getSerialNumber();
+        }
+        else
+        {
+            return null;
+        }
+    }
+    
+    public LogLevel getLogLevel()
+    {
+        return defaultLevel;
+    }
+
+    public void setTabItem(TabItem tabItem)
+    {
+        this.tabItem = tabItem;
+    }
+
+    public TabItem getTabItem()
+    {
+        return tabItem;
+    }
+
+    public void setTable(Table table)
+    {
+        this.table = table;
+    }
+
+    /**
+     * Returns the UI table object.
+     *
+     * @return
+     */
+    public Table getTable()
+    {
+        return table;
+    }
+    
+    public void start()
+    {
+        LogLevel level = LogLevel.getByString(ConnectionPlugin.getDefault().getPreferenceStore().getString(TizenLogPreferencePage.KEY_DEFAULT_LEVEL));
+        start(level);
+    }
+
+    public void start(final LogLevel level)
+    {
+        if (device != null)
+        {
+            // create a new output receiver
+            logReceiver = new LogTabOuputReceiver();
+
+            // start the LogTab in a different thread
+            new Thread(device.getSerialNumber() + " Logger") { //$NON-NLS-1$
+                @Override
+                public void run()
+                {
+                    while (device.isOnline() == false && logReceiver != null && logReceiver.isCancelled == false)
+                    {
+                        try
+                        {
+                            sleep(2000);
+                        } catch (InterruptedException e)
+                        {
+                            Logger.error("LogTab : Device is not online or logger is null/cancelled", e.getMessage(), e);
+                            return;
+                        }
+                    }
+
+                    if (logReceiver == null || logReceiver.isCancelled)
+                    {
+                        return;
+                    }
+
+                    try
+                    {
+                        device.executeShellCommand("dlogutil -v long *:" + level.getPriorityLetter(), logReceiver, 0 /* timeout */); //$NON-NLS-1$
+                    } catch (Exception e)
+                    {
+                        Logger.error("LogTab", e);
+                    }
+                }
+            }.start();
+        }
+    }
+
+    /** Stop the current LogTab */
+    public void stop(boolean inUiThread)
+    {
+        if (logReceiver != null)
+        {
+            logReceiver.isCancelled = true;
+
+            logReceiver = null;
+
+            device = null;
+
+            clear();
+
+        }
+    }
+
+    /**
+     * Stop current logger and start with new level
+     * It can be lost some log messages in time interval between stop and restart 
+     * @param level start logger with level
+     */
+    public void restart(LogLevel level)
+    {
+        IDevice old = device;
+        stop(true);
+        setDevice(old);
+        start(level);
+    }
+
+    // add message to filtered message and replace old message to
+    // new message
+    public void addFilteredMessage(LogMessage newMessage, LogMessage oldMessage)
+    {
+        synchronized (filteredMessages)
+        {
+            if (oldMessage != null && filteredMessages.size() >= STRING_BUFFER_LENGTH)
+            {
+                int index = filteredMessages.indexOf(oldMessage);
+                if (index != -1)
+                {
+                    filteredMessages.remove(index);
+                }
+            }
+
+            boolean isValid = filteredByFilterString(newMessage);
+
+            if (isValid)
+            {
+                filteredMessages.add(newMessage);
+                if(filteredByIconAndText(newMessage))
+                {
+                    newMessages.add(newMessage);
+                }
+            }
+        }
+    }
+
+    /**
+     * action when select level icon and input combo and text to TabItem bottom
+     */
+    public void filterMessages()
+    {
+        //1. remove table contents
+        initialize();
+        //2. filtering
+        synchronized (filteredMessages)
+        {
+            for (LogMessage logMsg : filteredMessages)
+            {
+                if (filteredByIconAndText(logMsg))
+                {
+                    newMessages.add(logMsg);
+                }
+            }
+            //3. refill new messages
+            flush();
+        }
+    }
+
+    /**
+     * Filter with tab dialog(AddTab, EditTab) input value
+     * @param logMessage
+     * @return
+     */
+    private boolean filteredByFilterString(LogMessage logMessage)
+    {
+        if (logMessage == null)
+        {
+            return false;
+        }
+        if (pidFilters != null || tagFilters != null || msgFilters != null)
+        {
+            if (pidFilters != null)
+            {
+                for (String filter : pidFilters)
+                {
+                    if (logMessage.data.pidString.contains(filter))
+                    {
+                        return true;
+                    }
+                }
+            }
+
+            if (tagFilters != null)
+            {
+                for (String filter : tagFilters)
+                {
+                    if (logMessage.data.tag.toLowerCase().contains(filter.toLowerCase()))
+                    {
+                        return true;
+                    }
+                }
+            }
+
+            if (msgFilters != null)
+            {
+                for (String filter : msgFilters)
+                {
+                    if (logMessage.msg.toLowerCase().contains(filter.toLowerCase()))
+                    {
+                        return true;
+                    }
+                }
+            }
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * Filter with level icon on LogView toolbar
+     * @param logMessage
+     * @return
+     */
+    boolean filteredByIconAndText(LogMessage logMessage)
+    {
+        if (logMessage == null)
+        {
+            return false;
+        }
+
+        if (levelMode != LEVEL_ALL)
+        {
+            int a = 0;
+            a = (levelMode & (0x1 << (logMessage.data.logLevel.ordinal())));
+
+            if (a == 0)
+            {
+                return false;
+            }
+        }
+
+        if (filteredByText(logMessage))
+        {
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+
+    /**
+     * Filter with text and combo input from TabItem bottom
+     * @param logMessage
+     * @return
+     */
+    boolean filteredByText(LogMessage logMessage)
+    {
+        if (logMessage == null)
+        {
+            return false;
+        }
+
+        if (StringUtil.isEmpty(filterText))
+        {
+            return true;
+        }
+
+        String msg = null;
+        String filter = filterText.toLowerCase();
+
+        switch (filterCombo)
+        {
+            case FILTER_PID:
+                msg = logMessage.data.pidString;
+                break;
+    
+            case FILTER_TAG:
+                msg = logMessage.data.tag.toLowerCase();
+                break;
+    
+            case FILTER_MESSAGE:
+                msg = logMessage.msg.toLowerCase();
+                break;
+    
+            default:
+                return false;
+        }
+
+        if( msg.contains(filter))
+        {
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+
+    /**
+     * flush valid messages to table and remove
+     */
+    public void flush()
+    {
+        table.setRedraw(false);
+
+        int newCount = newMessages.size();
+
+        try
+        {
+            int totalCount = table.getItemCount() + newCount;
+            if(totalCount > STRING_BUFFER_LENGTH)
+            {
+                int removeCount = totalCount - STRING_BUFFER_LENGTH;
+                //remove over than STRING_BUFFER_LENGTH
+                for (int i = 0; i < removeCount && table.getItemCount() > 0; i++)
+                {
+                    table.remove(0);
+                }
+            }
+            // add the new items
+            for (int i = 0; i < newCount; i++)
+            {
+                LogMessage msg = newMessages.get(i);
+                addTableItem(msg);
+            }
+        } catch (SWTException e)
+        {
+            Logger.error("LogFilter", e);
+        }
+
+        //if isScollLocked is false,  always shows last table item 
+        if(!getScrollLock())
+        {
+            int count = table.getItemCount();
+            if( count > 1)
+            {
+                table.showItem(table.getItem(table.getItemCount() - 1));
+            }
+        }
+
+        table.setRedraw(true);
+
+        newMessages.clear();
+
+    }
+
+    void setColors(LogColors pColors)
+    {
+        colors = pColors;
+    }
+
+    /**
+     * Add a TableItem for the index-th item of the buffer
+     *
+     * @param filter
+     *            The index of the table in which to insert the item.
+     */
+    private void addTableItem(LogMessage msg)
+    {
+        TableItem item = new TableItem(table, SWT.NONE);
+        item.setText(0, msg.data.time);
+        item.setText(2, msg.data.pidString);
+        item.setText(3, msg.data.tidString);
+        item.setText(4, msg.data.tag);
+        item.setText(5, msg.msg);
+
+        // add the buffer index as data
+        item.setData(msg);
+
+        if (msg.data.logLevel == LogLevel.FATAL)
+        {
+            item.setForeground(colors.fatalColor);
+            item.setText(1, "Fatal");
+        } else if (msg.data.logLevel == LogLevel.ERROR)
+        {
+            item.setForeground(colors.errorColor);
+            item.setText(1, "Error");
+            
+        } else if (msg.data.logLevel == LogLevel.WARN)
+        {
+            item.setForeground(colors.warningColor);
+            item.setText(1, "Warning");
+        } else if (msg.data.logLevel == LogLevel.INFO)
+        {
+            item.setForeground(colors.infoColor);
+            item.setText(1, "Info");
+        } else if (msg.data.logLevel == LogLevel.DEBUG)
+        {
+            item.setForeground(colors.debugColor);
+            item.setText(1, "Debug");
+        } else if (msg.data.logLevel == LogLevel.VERBOSE)
+        {
+            item.setForeground(colors.verboseColor);
+            item.setText(1, "Verbose");
+        }
+    }
+
+    /**
+     * objects able to receive the output of a remote shell command,
+     * specifically a LogTab command in this case
+     */
+    private final class LogTabOuputReceiver extends MultiLineReceiver
+    {
+
+        public boolean isCancelled = false;
+
+        public LogTabOuputReceiver()
+        {
+            super();
+
+            setTrimLine(false);
+        }
+
+        @Override
+        public void processNewLines(String[] lines)
+        {
+            if (isCancelled == false)
+            {
+                processLogLines(lines);
+            }
+        }
+
+        @Override
+        public boolean isCancelled()
+        {
+            return isCancelled;
+        }
+    }
+
+    /**
+     * Process new Log lines coming from {@link LogCatOuputReceiver}.
+     *
+     * @param lines
+     *            the new lines
+     */
+    protected void processLogLines(String[] lines)
+    {
+        // WARNING: this will not work if the string contains more line
+        // than the buffer holds.
+
+        if (lines.length > STRING_BUFFER_LENGTH)
+        {
+            Logger.error("LogTab : Receiving more lines than " + STRING_BUFFER_LENGTH, "");
+            return ;
+        }
+
+        // parse the lines and create LogMessage that are stored in a temporary
+        // list
+        final ArrayList<LogMessage> newMessages = new ArrayList<LogMessage>();
+
+        synchronized (allMessages)
+        {
+            for (String line : lines)
+            {
+                line = AnsicodeAdapter.getStripAnsiString(line);
+                // ignore empty lines.
+                if (line.length() > 0)
+                {
+                    // check for header lines.
+                    Matcher matcher = logPattern.matcher(line);
+                    if (matcher.matches())
+                    {
+                        // this is a header line, parse the header and keep it
+                        // around.
+                        lastMessageInfo = new LogMessageInfo();
+
+                        lastMessageInfo.time = matcher.group(1);
+                        lastMessageInfo.pidString = matcher.group(2);
+                        lastMessageInfo.tidString = matcher.group(3);
+                        lastMessageInfo.logLevel = LogLevel.getByLetterString(matcher.group(4));
+                        lastMessageInfo.tag = matcher.group(5).trim();
+                    } else
+                    {
+
+                        if (lastMessageInfo == null)
+                        {
+                            return;
+                        }
+
+                        // This is not a header line.
+                        // Create a new LogMessage and process it.
+                        LogMessage mc = new LogMessage();
+
+                        // If someone printed a log message with embedded '\n'
+                        // characters,
+                        // there will one header line followed by multiple text
+                        // lines.
+                        // Use the last header that we saw.
+                        mc.data = lastMessageInfo;
+
+                        // tabs seem to display as only 1 tab so we replace the
+                        // leading tabs by 4 spaces.
+                        mc.msg = line.replaceAll("\t", "    "); //$NON-NLS-1$ //$NON-NLS-2$
+
+                        // process the new LogMessage.
+                        processNewMessage(mc);
+
+                        // store the new LogMessage
+                        newMessages.add(mc);
+                    }
+                }
+            }
+
+            try
+            {
+                Display display = table.getDisplay();
+
+                // run in sync because this will update the
+                // buffer start/end indices
+                display.asyncExec(new Runnable()
+                {
+                    @Override
+                    public void run()
+                    {
+                        asyncRefresh();
+                    }
+                });
+            } catch (SWTException e)
+            {
+                // display is disposed, stop the LogTab
+                stop(false);
+            }
+        }
+    }
+
+    /**
+     * Processes a new Message.
+     * <p/>
+     * This adds the new message to the buffer, and gives it to the existing
+     * filters.
+     *
+     * @param newMessage
+     */
+    private void processNewMessage(LogMessage newMessage)
+    {
+
+        // compute the index where the message goes.
+        // was the buffer empty?
+        int messageIndex = -1;
+        if (indexStart == -1)
+        {
+            indexStart = 0;
+            messageIndex = indexStart;
+            indexEnd = 1;
+        } else
+        {
+            messageIndex = indexEnd;
+
+            // check we aren't overwriting start
+            if (indexEnd == indexStart)
+            {
+                indexStart = (indexStart + 1) % STRING_BUFFER_LENGTH;
+            }
+
+            // increment the next usable slot index
+            indexEnd = (indexEnd + 1) % STRING_BUFFER_LENGTH;
+        }
+
+        LogMessage oldMessage = null;
+
+        // record the message that was there before
+        if (allMessages[messageIndex] != null)
+        {
+            oldMessage = allMessages[messageIndex];
+        }
+
+        // then add the new one
+        allMessages[messageIndex] = newMessage;
+
+        addFilteredMessage(newMessage, oldMessage);
+    }
+
+    /**
+     * Refreshes the UI with new messages.
+     */
+    private void asyncRefresh()
+    {
+        if (table.isDisposed() == false)
+        {
+            synchronized (allMessages)
+            {
+                flush();
+            }
+        } else
+        {
+            stop(true);
+        }
+    }
+
+    public void resetUI(boolean inUiThread)
+    {
+
+        // the ui is static we just empty it.
+        if (table.isDisposed() == false)
+        {
+            if (inUiThread)
+            {
+                table.removeAll();
+            } else
+            {
+                // run sync as we need to update right now.
+                syncExec(new Runnable()
+                {
+                    @Override
+                    public void run()
+                    {
+                        if (table.isDisposed() == false)
+                        {
+                            table.removeAll();
+                        }
+                    }
+                });
+            }
+        }
+    }
+
+
+    public void setFilterCombo(int index)
+    {
+        filterCombo = index;
+    }
+
+    public void setFilterText(String text)
+    {
+        filterText = text;
+    }
+
+    // remove all filtered messages and tableMessages to refill or fill messages
+    public void initialize()
+    {
+        newMessages.clear();
+        lastMessageInfo = null;
+        resetUI(false);
+    }
+
+    // buffer and messages clear
+    public void clear()
+    {
+        synchronized(allMessages)
+        {
+            for (int i = 0; i < STRING_BUFFER_LENGTH; i++)
+            {
+                allMessages[i] = null;
+            }
+        }
+
+        indexStart = -1;
+        indexEnd = -1;
+        filteredMessages.clear();
+        initialize();
+    }
+
+    public void setDevice(IDevice device)
+    {
+        this.device = device;
+    }
+
+    public void setDefault()
+    {
+        isDefault = true;
+    }
+
+    public boolean isDefault()
+    {
+        return isDefault;
+    }
+
+    public void setScrollLock(boolean islock)
+    {
+        isScrollLocked = islock;
+    }
+
+    public boolean getScrollLock()
+    {
+        return isScrollLocked;
+    }
 }
\ No newline at end of file
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/log/LogUIMessages.java b/org.tizen.common.connection/src/org/tizen/common/connection/log/LogUIMessages.java
new file mode 100644 (file)
index 0000000..656ee5f
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact:
+* Kangho Kim <kh5225.kim@samsung.com>
+* Hyunsik Noh <hyunsik.noh@samsung.com>
+*
+ * Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.connection.log;
+
+import org.eclipse.osgi.util.NLS;
+
+public class LogUIMessages extends NLS {
+       private static final String BUNDLE_NAME = LogUIMessages.class.getPackage().getName() + ".LogUIMessages"; //$NON-NLS-1$
+
+       public static String Log;
+       public static String Log_Title_Tab_AddTab_Error;
+       public static String Log_Title_Tab_EditTab_Error;
+       public static String Log_Title_View_Device_Disconnected;
+       public static String Log_Message_Tab_Device_Disconnected;
+       public static String Log_Message_View_Device_Disconnected;
+       public static String Log_Message_View_Filter_Text;
+       public static String Log_Tooltip_View_Filter_Combo;
+       public static String Log_Title_Tab_Export;
+       public static String Log_File_Tab_Export_Postfix;
+       public static String Log_File_Tab_Export_Filter;
+       public static String Log_File_Tab_Export_Filter_Extensions;
+
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, LogUIMessages.class);
+       }
+
+       private LogUIMessages() {
+       }
+}
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/log/LogUIMessages.properties b/org.tizen.common.connection/src/org/tizen/common/connection/log/LogUIMessages.properties
new file mode 100644 (file)
index 0000000..973028f
--- /dev/null
@@ -0,0 +1,17 @@
+Log = Log
+
+Log_Title_Tab_AddTab_Error = Error in adding a tab
+Log_Title_Tab_EditTab_Error = Error in editing a tab
+Log_Title_View_Device_Disconnected = Device disconnected
+
+Log_Message_Tab_Device_Disconnected = %s tab's device is already disconnected.
+Log_Message_View_Device_Disconnected =  %s is disconnected.\nThe tabs for %s do not work.
+Log_Message_View_Filter_Text = Input search keyword
+
+Log_Tooltip_View_Filter_Combo = Keyword: Pid, Tag, or Message
+
+Log_Title_Tab_Export = Export the log
+
+Log_File_Tab_Export_Postfix =  %s-log.txt
+Log_File_Tab_Export_Filter = Text files (*.txt)
+Log_File_Tab_Export_Filter_Extensions = *.txt
\ No newline at end of file
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.java b/org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.java
new file mode 100644 (file)
index 0000000..3e72425
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Hyunsik Noh <hyunsik.noh@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.connection.preference;
+
+import org.eclipse.osgi.util.NLS;
+
+public class PreferenceMessages {
+
+    private static final String BUNDLE_NAME = PreferenceMessages.class.getName();//$NON-NLS-1$
+
+    public static String CONNECTION_EXPLORER_DESCRIPTION;
+    public static String CONNECTION_EXPLORER_GROUP_TIMEOUT;
+    public static String CONNECTION_EXPLORER_TIMEOUT_CAUTION;
+    public static String CONNECTION_EXPLORER_LABEL_TIMEOUT;
+    
+    public static String CONNECTION_EXPLORER_GROUP_EMULATOR_MANAGER;
+    public static String CONNECTION_EXPLORER_LABEL_LOCATION;
+    
+    public static String LOG_DESCRIPTION;
+    public static String LOG_GROUP_LEVEL;
+    public static String LOG_LABEL_NOTE;
+    public static String LOG_LABEL_DEFAULT;
+
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages( BUNDLE_NAME, PreferenceMessages.class );
+    }
+}
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.properties b/org.tizen.common.connection/src/org/tizen/common/connection/preference/PreferenceMessages.properties
new file mode 100644 (file)
index 0000000..175f88e
--- /dev/null
@@ -0,0 +1,13 @@
+CONNECTION_EXPLORER_DESCRIPTION=Settings for Connection Explorer.
+CONNECTION_EXPLORER_GROUP_TIMEOUT=Timeouts
+CONNECTION_EXPLORER_TIMEOUT_CAUTION='0' means waiting forever
+
+CONNECTION_EXPLORER_LABEL_TIMEOUT=Timeout to transfer files (ms):
+
+CONNECTION_EXPLORER_GROUP_EMULATOR_MANAGER=Emulator Manager Path
+CONNECTION_EXPLORER_LABEL_LOCATION=Location:
+
+LOG_DESCRIPTION=Settings for Log.
+LOG_GROUP_LEVEL=Log Level
+LOG_LABEL_NOTE=Note : 
+LOG_LABEL_DEFAULT=This only applies to newly created log tab.
\ No newline at end of file
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenConnectionExplorerPreferencePage.java b/org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenConnectionExplorerPreferencePage.java
new file mode 100644 (file)
index 0000000..bafe845
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.connection.preference;
+
+import java.io.File;
+
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.FileFieldEditor;
+import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.tizen.common.connection.ConnectionPlugin;
+import org.tizen.common.core.application.InstallPathConfig;
+import org.tizen.common.util.SWTUtil;
+
+public class TizenConnectionExplorerPreferencePage extends FieldEditorPreferencePage implements
+        IWorkbenchPreferencePage
+{
+
+    public static final String EMULATOR_PATH = InstallPathConfig.getEmulatorPath();
+    private static final String EMULATOR_BATCH = "bin" + File.separatorChar
+            + "emulator-manager.exe";
+    private static final String EMULATOR_BINARY = "bin" + File.separatorChar + "emulator-manager";
+
+    public static final String KEY_PUSHPULL_TIMEOUT = "pushpull_timeout"; //$NON-NLS-1$
+    public static final String KEY_EMULATOR_MANAGER_PATH = "emulator_manager_path"; //$NON-NLS-1$
+
+    public static final int VALUE_PUSHPULL_TIMEOUT_DEFAULT = 5000;
+    public static final String VALUE_EMULATOR_MANAGER_PATH_DEFAULT = getEmulatorManagerDefaultPath(); //$NON-NLS-1$
+
+    public TizenConnectionExplorerPreferencePage()
+    {
+        setPreferenceStore(ConnectionPlugin.getDefault().getPreferenceStore());
+        setDescription(PreferenceMessages.CONNECTION_EXPLORER_DESCRIPTION);
+    }
+
+    @Override
+    public void init(IWorkbench workbench)
+    {
+    }
+
+    @Override
+    protected void createFieldEditors()
+    {
+        Composite composite = getFieldEditorParent();
+
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 1;
+        layout.marginHeight = 0;
+        layout.marginWidth = 0;
+        composite.setLayout(layout);
+        GridData data = new GridData(GridData.FILL_BOTH);
+        data.verticalAlignment = GridData.FILL;
+        data.horizontalAlignment = GridData.FILL;
+        composite.setLayoutData(data);
+        SWTUtil.createSpacer(composite, 1);
+        createPathSettingPreferences(composite);
+        SWTUtil.createSpacer(composite, 1);
+        createPushPullTimeoutPreferences(composite);
+    }
+
+    private void createPathSettingPreferences(Composite parent)
+    {
+        Composite comp = SWTUtil.createGroup(parent,
+                PreferenceMessages.CONNECTION_EXPLORER_GROUP_EMULATOR_MANAGER, 1);
+        Composite formatComposite = SWTUtil.createCompositeEx(comp, 1, GridData.FILL_HORIZONTAL);
+        FileFieldEditor fileField = new FileFieldEditor(KEY_EMULATOR_MANAGER_PATH,
+                PreferenceMessages.CONNECTION_EXPLORER_LABEL_LOCATION, formatComposite);
+        fileField.getTextControl(formatComposite).setEditable(false);
+        addField(fileField);
+    }
+
+    private void createPushPullTimeoutPreferences(Composite parent)
+    {
+        Composite comp = SWTUtil.createGroup(parent,
+                PreferenceMessages.CONNECTION_EXPLORER_GROUP_TIMEOUT, 1);
+        Composite formatComposite = SWTUtil.createCompositeEx(comp, 2, GridData.FILL_HORIZONTAL);
+        IntegerFieldEditor intField = new IntegerFieldEditor(KEY_PUSHPULL_TIMEOUT,
+                PreferenceMessages.CONNECTION_EXPLORER_LABEL_TIMEOUT, formatComposite);
+        intField.setValidRange(0, Integer.MAX_VALUE);
+        intField.getTextControl(formatComposite).setToolTipText(
+                PreferenceMessages.CONNECTION_EXPLORER_TIMEOUT_CAUTION);
+        Label nullLabel = new Label(formatComposite, SWT.None);
+        nullLabel.setText("");
+        Label cautionLabel = new Label(formatComposite, SWT.None);
+        cautionLabel.setText(PreferenceMessages.CONNECTION_EXPLORER_TIMEOUT_CAUTION);
+
+        addField(intField);
+    }
+
+    private static String getEmulatorManagerDefaultPath()
+    {
+        String exePath = null;
+        int osType = ConnectionPlugin.getDefault().os;
+        int linuxType = ConnectionPlugin.LINUX;
+
+        if (osType == linuxType)
+        {
+            exePath = EMULATOR_PATH + File.separatorChar + EMULATOR_BINARY;
+        } else
+        {
+            exePath = EMULATOR_PATH + File.separatorChar + EMULATOR_BATCH;
+        }
+
+        return exePath;
+    }
+}
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenLogPreferencePage.java b/org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenLogPreferencePage.java
new file mode 100644 (file)
index 0000000..ae1c759
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.connection.preference;
+
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.tizen.common.connection.ConnectionPlugin;
+import org.tizen.common.util.SWTUtil;
+import org.tizen.sdblib.Log.LogLevel;
+
+public class TizenLogPreferencePage extends FieldEditorPreferencePage implements
+        IWorkbenchPreferencePage
+{
+
+    public static final String id = "org.tizen.common.connection.preferences.tizenlog";
+    public static final String KEY_DEFAULT_LEVEL = "default_log_level"; //$NON-NLS-1$
+
+    public static final String VALUE_DEFAULT_LEVEL = LogLevel.VERBOSE.getStringValue();
+
+    public TizenLogPreferencePage()
+    {
+        setPreferenceStore(ConnectionPlugin.getDefault().getPreferenceStore());
+        setDescription(PreferenceMessages.LOG_DESCRIPTION);
+    }
+
+    @Override
+    public void init(IWorkbench workbench)
+    {
+    }
+
+    @Override
+    protected void createFieldEditors()
+    {
+        Composite composite = getFieldEditorParent();
+
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 1;
+        layout.marginHeight = 0;
+        layout.marginWidth = 0;
+        composite.setLayout(layout);
+        GridData data = new GridData(GridData.FILL_BOTH);
+        data.verticalAlignment = GridData.FILL;
+        data.horizontalAlignment = GridData.FILL;
+        composite.setLayoutData(data);
+        SWTUtil.createSpacer(composite, 1);
+        createDefaultLevelPreferences(composite);
+    }
+
+    private void createDefaultLevelPreferences(Composite parent)
+    {
+        Composite comp = SWTUtil.createGroup(parent, PreferenceMessages.LOG_GROUP_LEVEL, 1);
+        Composite formatComposite = SWTUtil.createCompositeEx(comp, 1, GridData.BEGINNING);
+
+        String[][] levels = { { LogLevel.VERBOSE.toString(), LogLevel.VERBOSE.getStringValue() },
+                { LogLevel.DEBUG.toString(), LogLevel.DEBUG.getStringValue() },
+                { LogLevel.INFO.toString(), LogLevel.INFO.getStringValue() },
+                { LogLevel.WARN.toString(), LogLevel.WARN.getStringValue() },
+                { LogLevel.ERROR.toString(), LogLevel.ERROR.getStringValue() } };
+
+        RadioGroupFieldEditor radioField = new RadioGroupFieldEditor(KEY_DEFAULT_LEVEL,
+                "", 1, levels, formatComposite);
+        addField(radioField);
+
+        Composite formatComposite2 = SWTUtil.createCompositeEx(comp, 2, GridData.BEGINNING);
+
+        Label note = new Label(formatComposite2, SWT.NONE);
+        FontData fontData = note.getFont().getFontData()[0];
+        Font font = new Font(formatComposite2.getDisplay(), new FontData(fontData.getName(), fontData
+            .getHeight(), SWT.BOLD));
+        note.setFont(font);
+        note.setText(PreferenceMessages.LOG_LABEL_NOTE);
+
+        Label noteMessage = new Label(formatComposite2, SWT.NONE);
+        noteMessage.setText(PreferenceMessages.LOG_LABEL_DEFAULT);
+    }
+}
+
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenToolsPreferencePage.java b/org.tizen.common.connection/src/org/tizen/common/connection/preference/TizenToolsPreferencePage.java
new file mode 100644 (file)
index 0000000..d1a2c17
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Hyunsik Noh <hyunsik.noh@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.connection.preference;
+
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+public class TizenToolsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+    public TizenToolsPreferencePage() {
+        String description = "Expand the tree to edit preferences for a specific feature";
+        setDescription( description );
+    }
+    @Override
+    public void init(IWorkbench workbench) {
+    }   
+
+    @Override
+    protected Control createContents(Composite parent) {
+        noDefaultAndApplyButton();
+        return null;
+    }
+}
old mode 100644 (file)
new mode 100755 (executable)
index 538a411..f286a6f
@@ -128,14 +128,10 @@ public class ConnectionExplorerPermissionPropertyPages extends PropertyPage {
                table.setHeaderVisible(true);
                table.setLinesVisible(true);
                
-               TableColumn colMsg = createTableColumn(table, "", SWT.NONE,
-               "EXECUTE");
-               colMsg = createTableColumn(table, "Read", SWT.NONE,
-               "EXECUTE");
-               colMsg = createTableColumn(table, "Write", SWT.NONE,
-               "EXECUTE");
-               colMsg = createTableColumn(table, "Execute", SWT.NONE,
-               "EXECUTE");
+               createTableColumn(table, "", SWT.NONE, "EXECUTE");
+               createTableColumn(table, "Read", SWT.NONE, "EXECUTE");
+               createTableColumn(table, "Write", SWT.NONE, "EXECUTE");
+               createTableColumn(table, "Execute", SWT.NONE, "EXECUTE");
                
                
                itemUser = new TableItem(table, SWT.NONE);
old mode 100644 (file)
new mode 100755 (executable)
index 4b5084a..d116656
@@ -3,10 +3,10 @@
 *
 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
 *
-* Contact: 
+* Contact:
 * Hoon Kang <h245.kang@samsung.com>
 * Yoonki Park <yoonki.park@samsung.com>
-* 
+*
  * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
@@ -33,12 +33,10 @@ import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.ui.part.IDropActionDelegate;
 import org.tizen.common.connection.ConnectionPlugin;
 import org.tizen.common.connection.ddmuilib.FileDialogUtils;
 import org.tizen.common.connection.ddmuilib.console.DdmConsole;
-
 import org.tizen.sdblib.SdbCommandRejectedException;
 import org.tizen.sdblib.SyncService;
 import org.tizen.sdblib.SyncService.ISyncProgressMonitor;
@@ -50,22 +48,25 @@ public class FileEntryDropAdapter implements IDropActionDelegate {
        @Override
        public boolean run(Object source, Object target) {
                IResource resource = null;
-               
+
                if (target instanceof IAdaptable) {
                        target = ((IAdaptable) target).getAdapter(IResource.class);
                        if (target != null && target instanceof IResource) {
                                resource = (IResource) target;
                                if (resource.getType() == IResource.FILE && resource.getParent() != null)
-                                       resource = resource.getParent(); 
+                               {
+                                       resource = resource.getParent();
+                               }
                        }
                }
-       
-               String[] entries = FileEntryTransfer.getInstance().fromByteArray(
-                               (byte[]) source);
-               
-               if (entries.length < 1) 
+
+               String[] entries = FileEntryTransfer.getInstance().fromByteArray( (byte[]) source);
+
+               if (entries.length < 1)
+               {
                        return false;
-               
+               }
+
                SyncService sync = null;
                try {
                        sync = ConnectionPlugin.getDefault().getCurrentDevice().getSyncService();
@@ -82,29 +83,31 @@ public class FileEntryDropAdapter implements IDropActionDelegate {
                if (sync != null) {
                        ISyncProgressMonitor monitor = SyncService.getNullProgressMonitor();
                        boolean isAlwayCopy = false;
-                       
+
                        for (int i = 0; i < entries.length; i++) {
                                File f = new File(entries[i]);
                                if (resource == null )
+                               {
                                        return false;
+                               }
                                IPath localPath = resource.getFullPath().append(f.getName());
                                IResource newRes = resource.getWorkspace().getRoot().findMember(localPath);
 
                                String localFilePath = resource.getLocation().append(f.getName()).toOSString();
-                                 
+
                if (newRes != null) {
                                        if (isAlwayCopy == false) {
-                                               int ret = FileDialogUtils.getInstance().checkOverwrite(f.getName());
+                                               int ret = FileDialogUtils.checkOverwrite(f.getName());
                                                switch (ret) {
-                                                       case IDialogConstants.CANCEL_ID :
+                                                       case FileDialogUtils.CANCEL_ID :
                                                                return false;
-                                                       case IDialogConstants.YES_TO_ALL_ID :
+                                                       case FileDialogUtils.YES_TO_ALL_ID :
                                                                isAlwayCopy = true;
                                                                break;
-                                                       case IDialogConstants.NO_ID :
+                                                       case FileDialogUtils.NO_ID :
                                                                continue;
                                                        default:
-                                               }                                                                       
+                                               }
                                        }
                                }
                                SyncResult result = sync.pullFile(entries[i], localFilePath     , monitor);
@@ -121,12 +124,12 @@ public class FileEntryDropAdapter implements IDropActionDelegate {
                                                } catch (CoreException e) {
                                                        e.printStackTrace();
                                                }
-                                       }               
+                                       }
                                }
                        }
                }
 
        return false;
        }
-       
+
 }
index b51fcc7..391ce7f 100644 (file)
@@ -33,6 +33,7 @@ import java.io.IOException;
 
 import org.eclipse.swt.dnd.ByteArrayTransfer;
 
+import org.tizen.common.util.log.Logger;
 import org.tizen.sdblib.FileListingService.FileEntry;
 
 public class FileEntryTransfer extends ByteArrayTransfer {
@@ -80,6 +81,7 @@ public class FileEntryTransfer extends ByteArrayTransfer {
                        bytes = byteOut.toByteArray();
                } catch (IOException e) {
                        // when in doubt send nothing
+                       Logger.error("write utf failed:" +  e);
                }
                return bytes;
        }
@@ -96,6 +98,7 @@ public class FileEntryTransfer extends ByteArrayTransfer {
                        }
                        return paths;
                } catch (IOException e) {
+                       Logger.error("read integer failed:" +  e);
                        return null;
                }
        }
old mode 100644 (file)
new mode 100755 (executable)
index a572d5c..fd3a53a
@@ -1,31 +1,33 @@
 /*
-*  Common
-*
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-*
-* Contact: 
-* Hoon Kang <h245.kang@samsung.com>
-* Hyunsik Noh <hyunsik.noh@samsung.com>
-* 
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hoon Kang <h245.kang@samsung.com>
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-* Contributors:
-* - S-Core Co., Ltd
-*
-*/
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
 package org.tizen.common.connection.ui;
 
 import java.io.File;
+import java.io.IOException;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IContributionItem;
@@ -33,6 +35,7 @@ import org.eclipse.jface.action.IMenuListener;
 import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.KeyAdapter;
 import org.eclipse.swt.events.KeyEvent;
@@ -45,365 +48,525 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.ToolBar;
 import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.contexts.IContextService;
-import org.eclipse.ui.dialogs.PropertyDialogAction;
 import org.eclipse.ui.part.ViewPart;
+import org.tizen.common.TizenHelpContextIds;
 import org.tizen.common.connection.ConnectionPlugin;
-import org.tizen.common.connection.ddmuilib.ImageLoader;
 import org.tizen.common.connection.explorer.ConnectionExplorerPanel;
-import org.tizen.common.properties.InstallPathConfig;
+import org.tizen.common.connection.preference.TizenConnectionExplorerPreferencePage;
+import org.tizen.common.core.application.InstallPathConfig;
 import org.tizen.common.util.HostUtil;
-
-
-public class ConnectionExplorer extends ViewPart {
-
-       private ConnectionExplorerPanel panel;
-       private ImageLoader mloader;
-       private ToolBar mToolBar;
-
-       private ToolItem pushToolItem;
-       private ToolItem pullToolItem;
-       private ToolItem emulStartToolItem;
-
-       private MenuManager subMenu;
-       private Action actionAddFolder;
-       private Action actionAddFile;
-       private Action actionPush;
-       private Action actionPull;
-       private Action actionRefresh;
-       private Action actionRename;
-       private Action actionProperty;
-       private Action actionDelete;
-
-       private MenuManager menuMgr;
-       private static ConnectionExplorer explorer;
-
-       private static final String BINARYMESSAGE = "Emulator is not installed or install path is not valid.";
-       private static final String EMULATOR_PATH = InstallPathConfig
-                       .getEmulatorPath();
-       private static final String EMULATOR_BATCH = "bin" + File.separatorChar + "emulator-manager.exe";
-       private static final String EMULATOR_BINARY = "bin" + File.separatorChar + "emulator-manager";
-
-       public static ConnectionExplorer gerDefault() {
-               if (explorer == null) {
-                       explorer = new ConnectionExplorer();
-               }
-
-               return explorer;
-       }
-
-       @Override
-       public void createPartControl(Composite parent) {
-               mloader = ImageLoader.getDdmUiLibLoader();
-
-               parent.setLayoutData(new GridData(GridData.FILL_VERTICAL));
-               parent.setLayout(new GridLayout(1, false));
-
-               Composite top = new Composite(parent, SWT.NONE);
-
-               GridLayout gridLayout = new GridLayout();
-               gridLayout.numColumns = 3;
-               gridLayout.marginWidth = 0;
-               gridLayout.marginHeight = 0;
-
-               GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
-               gridData.horizontalSpan = 2;
-
-               top.setLayoutData(gridData);
-               top.setLayout(gridLayout);
-
-               createToolBar(top, gridData);
-
-               Composite bottom = new Composite(parent, SWT.NONE);
-               bottom.setLayoutData(new GridData(GridData.FILL_BOTH));
-               bottom.setLayout(new FillLayout());
-
-               createFileExplorerView(bottom);
-               makeActions();
-               activateContext();
-               initContextMenu();
-               
-               panel.setToolItems(pushToolItem, pullToolItem, emulStartToolItem);
-               
-               panel.setActions(subMenu, actionPush,
-                               actionPull, actionRefresh, actionRename, actionProperty,
-                               actionDelete);
-       }
-       private void createFileExplorerView(Composite parent) {
-
-               // device explorer
-               panel = new ConnectionExplorerPanel();
-               panel.createPanel(parent);
-               panel.getTreeViewer().getTree().addKeyListener(new KeyAdapter() {
-                       public void keyPressed(KeyEvent e) {
-                               handleKeyPressed(e);
-                       }
-                       public void keyReleased(KeyEvent e) {
-                               handleKeyPressed(e);
-                       }
-               });
-
-       }
-       private void handleKeyPressed(KeyEvent event) {
-
-               if (event.keyCode == SWT.F5) {
-                       actionRefresh();
-               } else if (event.keyCode == SWT.F2) {
-                       actionRename();
-               } else if (event.keyCode == SWT.DEL) {
-                       actionDelete();
-               }
-               if ((event.stateMask == SWT.ALT) && (event.keyCode == SWT.CR)) {
-                       actionShowProperty();
-               }
-       }
-       private void actionAddFile() {
-
-               panel.addNewFileSelection();
-       }
-
-       private void actionAddFolder() {
-               panel.addNewFolderSelection();
-       }
-
-       private void actionPush() {
-               panel.pushIntoSelection();
-       }
-
-       private void actionPull() {
-               panel.pullSelection();
-       }
-
-       private void actionRefresh() {
-               panel.refreshSelection();
-       }
-       private void actionDelete() {
-               panel.deleteSelection();
-       }
-       private void actionRename() {
-               panel.renameSelection();
-       }
-       private void actionShowProperty() {
-               PropertyDialogAction pda = new PropertyDialogAction(getSite(),
-                               panel.getTreeViewer());
-               pda.run();
-       }
-       /*
-        * make actions
-        */
-       private void makeActions() {
-               subMenu = new MenuManager("Add New..", null);
-
-               actionAddFile = new Action() {
-                       public void run() {
-                               actionAddFile();
-                       }
-               };
-               actionAddFile.setText("Add File");
-
-               actionAddFolder = new Action() {
-                       public void run() {
-                               actionAddFolder();
-                       }
-               };
-               actionAddFolder.setText("Add Folder");
-
-               actionPush = new Action() {
-                       public void run() {
-                               actionPush();
-                       }
-               };
-               actionPush.setText("Push the file");
-
-               actionPull = new Action() {
-                       public void run() {
-                               actionPull();
-                       }
-               };
-               actionPull.setText("Pull the Selection");
-
-               // Add refresh action
-               actionRefresh = new Action() {
-                       public void run() {
-                               actionRefresh();
-                       }
-               };
-               actionRefresh.setText("Refresh");
-               actionRefresh
-                               .setActionDefinitionId("org.tizen.common.connection.refresh");
-
-               actionRename = new Action() {
-                       public void run() {
-                               actionRename();
-                       }
-               };
-
-               actionRename.setText("Rename");
-               actionRename
-                               .setActionDefinitionId("org.tizen.common.connection.rename");
-
-               actionDelete = new Action() {
-                       public void run() {
-                               actionDelete();
-                       }
-               };
-               actionDelete.setText("Delete");
-               actionDelete
-                               .setActionDefinitionId("org.tizen.common.connection.delete");
-
-               actionProperty = new PropertyDialogAction(getSite(),
-                               panel.getTreeViewer());
-               actionProperty
-                               .setActionDefinitionId("org.tizen.common.connection.property");
-
-       }
-       private void initContextMenu() {
-               // initalize the context menu
-               menuMgr = new MenuManager("Connection Explorer MenuMgr"); //$NON-NLS-1$
-               menuMgr.setRemoveAllWhenShown(true);
-               menuMgr.addMenuListener(new IMenuListener() {
-
-                       @Override
-                       public void menuAboutToShow(IMenuManager manager) {
-                               fillContextMenu(manager);
-                       }
-               });
-
-               Menu menu = menuMgr.createContextMenu(panel.getTreeViewer().getTree());
-               panel.getTreeViewer().getTree().setMenu(menu);
-               getSite().registerContextMenu(menuMgr, panel.getTreeViewer());
-
-               menuMgr.addMenuListener(new IMenuListener() {
-                       @Override
-                       public void menuAboutToShow(IMenuManager manager) {
-                               // Remove team menu from our menu
-                               IContributionItem[] items = manager.getItems();
-                               if (items != null) {
-                                       for (int i = 0; i < items.length; i++) {
-                                               IContributionItem item = items[i];
-                                               if (item.getId() != null) {
-                                                       if (item.getId().equals("team.main")) {
-                                                               manager.remove(item);
-                                                               break;
-                                                       }
-                                               }
-                                       }
-                               }
-                               // Decide whether to enable/disable actions
-                               panel.setActionState();
-                       }
-               });
-       }
-
-       private void activateContext() {
-
-               IContextService contextService = (IContextService) getSite()
-                               .getService(IContextService.class);
-               contextService
-                               .activateContext("org.tizen.common.connection.delete.context");
-               contextService
-                               .activateContext("org.tizen.common.connection.rename.context");
-               contextService
-                               .activateContext("org.tizen.common.connection.refresh.context");
-               contextService
-                               .activateContext("org.tizen.common.connection.property.context");
-
-       }
-       private void fillContextMenu(IMenuManager manager) {
-               subMenu.add(actionAddFile);
-               subMenu.add(actionAddFolder);
-               manager.add(subMenu);
-               manager.add(new Separator());
-               manager.add(actionPush);
-               manager.add(actionPull);
-               manager.add(new Separator());
-               manager.add(actionRefresh);
-               manager.add(new Separator());
-               manager.add(actionRename);
-               manager.add(actionDelete);
-               manager.add(new Separator());
-               manager.add(actionProperty);
-               manager.add(new Separator());
-       }
-
-       private void createToolBar(Composite shell, Object layoutData) {
-
-               mToolBar = new ToolBar(shell, SWT.NULL);
-               mToolBar.setLayoutData(layoutData);
-
-               ToolItem item = new ToolItem(mToolBar, SWT.SEPARATOR);
-
-               emulStartToolItem = new ToolItem(mToolBar, SWT.PUSH);
-               emulStartToolItem.setImage(mloader.loadImage("Emulator_start.gif",
-                               shell.getDisplay()));
-               emulStartToolItem.setToolTipText("Emulator Manager");
-               emulStartToolItem.addSelectionListener(new SelectionAdapter() {
-                       public void widgetSelected(SelectionEvent e) {
-                               try {
-                                       startEmulatorManager();
-                               } catch (Exception e1) {
-                                       e1.printStackTrace();
-                               }
-                       }
-               });
-               emulStartToolItem.setEnabled(true);
-
-               item = new ToolItem(mToolBar, SWT.SEPARATOR);
-
-               pushToolItem = new ToolItem(mToolBar, SWT.PUSH);
-               pushToolItem
-                               .setImage(mloader.loadImage("push.gif", shell.getDisplay()));
-               pushToolItem.setToolTipText("Push the files");
-               pushToolItem.addSelectionListener(new SelectionAdapter() {
-                       public void widgetSelected(SelectionEvent e) {
-                               panel.pushIntoSelection();
-                       }
-               });
-               pushToolItem.setEnabled(false);
-
-               item = new ToolItem(mToolBar, SWT.SEPARATOR);
-
-               pullToolItem = new ToolItem(mToolBar, SWT.PUSH);
-               pullToolItem
-                               .setImage(mloader.loadImage("pull.gif", shell.getDisplay()));
-               pullToolItem.setToolTipText("Pull the selection");
-               pullToolItem.addSelectionListener(new SelectionAdapter() {
-                       public void widgetSelected(SelectionEvent e) {
-                               panel.pullSelection();
-                       }
-               });
-               pullToolItem.setEnabled(false);
-               item = new ToolItem(mToolBar, SWT.SEPARATOR);
-
-       }
-
-       @Override
-       public void setFocus() {
-       }
-
-       private void startEmulatorManager() throws Exception {
-               String exePath = null;
-               int osType = ConnectionPlugin.getDefault().os;
-               int linuxType = ConnectionPlugin.getDefault().LINUX;
-
-               if (osType == linuxType) {
-                       exePath = EMULATOR_PATH + File.separatorChar + EMULATOR_BINARY;
-               } else {
-                       exePath = EMULATOR_PATH + File.separatorChar + EMULATOR_BATCH;
-               }
-
-               if (exePath.equals("") || (!exePath.equals("") && !HostUtil.exists(exePath))) {
-                       throw new Exception(BINARYMESSAGE);
-               }
-
-               // FIXME : should implement the lines below based on windows system.
-               String command = exePath;
-               if (osType == linuxType) {
-                       command = command + " 1>/dev/null 2>/dev/null &";
-
-                       HostUtil.execute(command);
-               } else {
-                       HostUtil.batchExecute(command, null, new File(EMULATOR_PATH));
-               }
-       }
+import org.tizen.common.util.log.Logger;
+import org.tizen.sdblib.FileListingService.FileEntry;
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.MultiLineReceiver;
+import org.tizen.sdblib.SmartDevelopmentBridge;
+
+public class ConnectionExplorer extends ViewPart
+{
+
+    private ConnectionExplorerPanel panel;
+    private Composite parent;
+    private ToolBar toolBar;
+
+    private ToolItem pushToolItem;
+    private ToolItem pullToolItem;
+    private ToolItem emulManagerToolItem;
+
+    private MenuManager subNewMenu;
+    private MenuManager subLogMenu;
+    private Action actionAddFolder;
+    private Action actionAddFile;
+    private Action actionPush;
+    private Action actionPull;
+    private Action actionRefresh;
+    private Action actionRename;
+    private Action actionProperty;
+    private Action actionDelete;
+    private Action actionPlatformLogOn;
+    private Action actionPlatformLogOff;
+
+    private MenuManager menuMgr;
+    private static ConnectionExplorer explorer;
+    
+    public static String PLATFORMLOG_ON = "1";
+    public static String PLATFORMLOG_OFF = "0";
+
+    synchronized public static ConnectionExplorer gerDefault()
+    {
+        if (explorer == null)
+        {
+            explorer = new ConnectionExplorer();
+        }
+        return explorer;
+    }
+
+    synchronized public static void release() {
+        explorer = null;
+    }
+
+    @Override
+    public void dispose()
+    {
+    }
+
+    @Override
+    public void createPartControl(Composite p)
+    {
+        parent = p;
+        PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, TizenHelpContextIds.HELP_COMMON_CONNECTION_EXPLORER_CONTEXT);
+        parent.setLayoutData(new GridData(GridData.FILL_VERTICAL));
+        parent.setLayout(new GridLayout(1, false));
+
+        Composite top = new Composite(parent, SWT.NONE);
+
+        GridLayout gridLayout = new GridLayout();
+        gridLayout.numColumns = 3;
+        gridLayout.marginWidth = 0;
+        gridLayout.marginHeight = 0;
+
+        GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
+        gridData.horizontalSpan = 2;
+
+        top.setLayoutData(gridData);
+        top.setLayout(gridLayout);
+
+        createToolBar(top, gridData);
+
+        Composite bottom = new Composite(parent, SWT.NONE);
+        bottom.setLayoutData(new GridData(GridData.FILL_BOTH));
+        bottom.setLayout(new FillLayout());
+
+        createFileExplorerView(bottom);
+        makeActions();
+        activateContext();
+        initContextMenu();
+
+        panel.setToolItems(pushToolItem, pullToolItem, emulManagerToolItem);
+
+        panel.setActions(subNewMenu, actionPush, actionPull, actionRefresh, actionRename, actionProperty, actionDelete, subLogMenu);
+    }
+
+    private void createFileExplorerView(Composite parent)
+    {
+
+        // device explorer
+        panel = new ConnectionExplorerPanel();
+        panel.createPanel(parent);
+        panel.getTreeViewer().getTree().addKeyListener(new KeyAdapter()
+        {
+            @Override
+            public void keyPressed(KeyEvent e)
+            {
+                handleKeyPressed(e);
+            }
+
+            @Override
+            public void keyReleased(KeyEvent e)
+            {
+            }
+        });
+
+    }
+
+    private void handleKeyPressed(KeyEvent event)
+    {
+
+        Tree tree = (Tree) event.widget;
+        int length = tree.getSelectionCount();
+        if (event.keyCode == SWT.F5)
+        {
+            if (length == 1)
+            {
+                actionRefresh();
+            }
+        } else if (event.keyCode == SWT.F2)
+        {
+            if (length == 1)
+            {
+                actionRename();
+            }
+        } else if (event.keyCode == SWT.DEL)
+        {
+            actionDelete();
+        }
+        if ((event.stateMask == SWT.ALT) && (event.keyCode == SWT.CR))
+        {
+            actionShowProperty();
+        }
+    }
+
+    private void actionAddFile()
+    {
+        panel.addNewFileSelection();
+    }
+
+    private void actionAddFolder()
+    {
+        panel.addNewFolderSelection();
+    }
+
+    private void actionPush()
+    {
+        panel.pushIntoSelection();
+    }
+
+    private void actionPull()
+    {
+        panel.pullSelection();
+    }
+
+    private void actionRefresh()
+    {
+        panel.refreshSelection();
+    }
+
+    private void actionDelete()
+    {
+        panel.deleteSelection();
+    }
+
+    private void actionRename()
+    {
+        panel.renameSelection();
+    }
+
+    private void actionShowProperty()
+    {
+        panel.showPropertySelection(getSite());
+    }
+
+    private void actionSetPlatformLog(boolean setON)
+    {
+        panel.setPlatformLogOnOff(setON);
+    }
+    /*
+     * make actions
+     */
+    private void makeActions()
+    {
+        subNewMenu = new MenuManager(ConnectionUIMessages.Explorer_ConetextMenu_New, null);
+
+        actionAddFile = new Action()
+        {
+            @Override
+            public void run()
+            {
+                actionAddFile();
+            }
+        };
+        actionAddFile.setText(ConnectionUIMessages.Explorer_ConetextMenu_File);
+
+        actionAddFolder = new Action()
+        {
+            @Override
+            public void run()
+            {
+                actionAddFolder();
+            }
+        };
+        actionAddFolder.setText(ConnectionUIMessages.Explorer_ConetextMenu_Folder);
+
+        actionPush = new Action()
+        {
+            @Override
+            public void run()
+            {
+                actionPush();
+            }
+        };
+        actionPush.setText(ConnectionUIMessages.Explorer_ConetextMenu_Push);
+
+        actionPull = new Action()
+        {
+            @Override
+            public void run()
+            {
+                actionPull();
+            }
+        };
+        actionPull.setText(ConnectionUIMessages.Explorer_ConetextMenu_Pull);
+
+        // Add refresh action
+        actionRefresh = new Action()
+        {
+            @Override
+            public void run()
+            {
+                actionRefresh();
+            }
+        };
+        actionRefresh.setText(ConnectionUIMessages.Explorer_ConetextMenu_Refresh);
+        actionRefresh.setActionDefinitionId("org.tizen.common.connection.refresh");
+
+        actionRename = new Action()
+        {
+            @Override
+            public void run()
+            {
+                actionRename();
+            }
+        };
+
+        actionRename.setText(ConnectionUIMessages.Explorer_ConetextMenu_Rename);
+        actionRename.setActionDefinitionId("org.tizen.common.connection.rename");
+
+        actionDelete = new Action()
+        {
+            @Override
+            public void run()
+            {
+                actionDelete();
+            }
+        };
+        actionDelete.setText(ConnectionUIMessages.Explorer_ConetextMenu_Delete);
+        actionDelete.setActionDefinitionId("org.tizen.common.connection.delete");
+
+        actionProperty = new Action()
+        {
+            @Override
+            public void run()
+            {
+                panel.showPropertySelection(getSite());
+            }
+        };
+        actionProperty.setText(ConnectionUIMessages.Explorer_ConetextMenu_Property);
+        actionProperty.setActionDefinitionId("org.tizen.common.connection.property");
+
+        subLogMenu = new MenuManager(ConnectionUIMessages.Explorer_ConetextMenu_Log, null);
+
+        actionPlatformLogOn = new Action()
+        {
+            @Override
+            public void run()
+            {
+                actionSetPlatformLog(true);
+            }
+        };
+        actionPlatformLogOn.setText(ConnectionUIMessages.Explorer_ConetextMenu_Log_On);
+        
+        actionPlatformLogOff = new Action()
+        {
+            @Override
+            public void run()
+            {
+                actionSetPlatformLog(false);
+            }
+        };
+        actionPlatformLogOff.setText(ConnectionUIMessages.Explorer_ConetextMenu_Log_Off);
+    }
+
+    private void initContextMenu()
+    {
+        // initalize the context menu
+        menuMgr = new MenuManager("Connection Explorer MenuMgr"); //$NON-NLS-1$
+        menuMgr.setRemoveAllWhenShown(true);
+        menuMgr.addMenuListener(new IMenuListener()
+        {
+            @Override
+            public void menuAboutToShow(IMenuManager manager)
+            {
+                fillContextMenu(manager);
+            }
+        });
+
+        Menu menu = menuMgr.createContextMenu(panel.getTreeViewer().getTree());
+        panel.getTreeViewer().getTree().setMenu(menu);
+        getSite().registerContextMenu(menuMgr, panel.getTreeViewer());
+
+        menuMgr.addMenuListener(new IMenuListener()
+        {
+            @Override
+            public void menuAboutToShow(IMenuManager manager)
+            {
+                // Remove team menu from our menu
+                IContributionItem[] items = manager.getItems();
+                if (items != null)
+                {
+                    for (IContributionItem item : items)
+                    {
+                        if (("team.main").equals(item.getId()))
+                        {
+                            manager.remove(item);
+                            break;
+                        }
+                    }
+                }
+            }
+        });
+    }
+
+    private void activateContext()
+    {
+        IContextService contextService = (IContextService) getSite().getService(IContextService.class);
+        contextService.activateContext("org.tizen.common.connection.delete.context");
+        contextService.activateContext("org.tizen.common.connection.rename.context");
+        contextService.activateContext("org.tizen.common.connection.refresh.context");
+        contextService.activateContext("org.tizen.common.connection.property.context");
+
+    }
+
+    private void fillContextMenu(IMenuManager manager)
+    {
+        subNewMenu.add(actionAddFile);
+        subNewMenu.add(actionAddFolder);
+        manager.add(subNewMenu);
+        manager.add(new Separator());
+        manager.add(actionPush);
+        manager.add(actionPull);
+        manager.add(new Separator());
+        manager.add(actionRefresh);
+        manager.add(new Separator());
+        manager.add(actionRename);
+        manager.add(actionDelete);
+        manager.add(new Separator());
+        manager.add(actionProperty);
+        manager.add(new Separator());
+        subLogMenu.add(actionPlatformLogOn);
+        subLogMenu.add(actionPlatformLogOff);
+        manager.add(subLogMenu);
+        boolean isOn = isPlatformLogOn();
+        actionPlatformLogOn.setChecked(isOn);
+        actionPlatformLogOff.setChecked(!isOn);
+    }
+    
+    private boolean isPlatformLogOn()
+    {
+        TreeItem[] items = panel.getTreeViewer().getTree().getSelection();
+        FileEntry file = (FileEntry)items[0].getData();
+        IDevice[] devices = SmartDevelopmentBridge.getBridge().getDevices();
+        final AtomicBoolean result = new AtomicBoolean(false);
+        for(IDevice device : devices)
+        {
+            if(file.getName().equals(device.getDeviceName()))
+            {
+                String command = "dlogctrl get platformlog";
+                try {
+                    device.executeShellCommand(command, new MultiLineReceiver()
+                    {
+
+                        @Override
+                        public void processNewLines(String[] lines)
+                        {
+                            boolean isOn = lines[0].equals(PLATFORMLOG_ON);
+                            boolean isOff = lines[0].equals(PLATFORMLOG_OFF);
+                            if(isOn || isOff)
+                            {
+                                if(isOn)
+                                {
+                                    result.set(true);
+                                }
+                                if(!subLogMenu.isVisible())
+                                {
+                                    subLogMenu.setVisible(true);
+                                }
+                            }
+                            else
+                            {
+                                MessageDialog.openError(parent.getShell(), ConnectionUIMessages.Explorer_Message_PlatformLogError, lines[0] ); //$NON-NLS-1$
+                                subLogMenu.setVisible(false);
+                            }
+                        }
+                    });
+                } catch (IOException e) {
+                    Logger.error("Fail to get platform log", e.getMessage());
+                }
+            }
+        }
+        return result.get();
+    }
+
+    private void createToolBar(Composite shell, Object layoutData)
+    {
+        toolBar = new ToolBar(shell, SWT.NULL);
+        toolBar.setLayoutData(layoutData);
+
+        new ToolItem(toolBar, SWT.SEPARATOR);// Separator
+
+        emulManagerToolItem = new ToolItem(toolBar, SWT.PUSH);
+        emulManagerToolItem.setImage(ConnectionPlugin.getImageDescriptorFromPlugin("icons/emulator_manager.gif").createImage());
+        emulManagerToolItem.setToolTipText(ConnectionUIMessages.Explorer_Tooltip_EmulatorManager);
+        emulManagerToolItem.addSelectionListener(new SelectionAdapter()
+        {
+            @Override
+            public void widgetSelected(SelectionEvent e)
+            {
+                try
+                {
+                    startEmulatorManager();
+                } catch (Exception e1)
+                {
+                    Logger.error("Fail to start Emulator Manager", e1.getMessage());
+                }
+            }
+        });
+        emulManagerToolItem.setEnabled(true);
+
+        new ToolItem(toolBar, SWT.SEPARATOR);// Separator
+
+        pushToolItem = new ToolItem(toolBar, SWT.PUSH);
+        pushToolItem.setImage(ConnectionPlugin.getImageDescriptorFromPlugin("icons/push.gif").createImage());
+        pushToolItem.setToolTipText(ConnectionUIMessages.Explorer_Tooltip_Push);
+        pushToolItem.addSelectionListener(new SelectionAdapter()
+        {
+            @Override
+            public void widgetSelected(SelectionEvent e)
+            {
+                panel.pushIntoSelection();
+            }
+        });
+        pushToolItem.setEnabled(false);
+
+        new ToolItem(toolBar, SWT.SEPARATOR);// Separator
+
+        pullToolItem = new ToolItem(toolBar, SWT.PUSH);
+        pullToolItem.setImage(ConnectionPlugin.getImageDescriptorFromPlugin("icons/pull.gif").createImage());
+        pullToolItem.setToolTipText(ConnectionUIMessages.Explorer_Tooltip_Pull);
+        pullToolItem.addSelectionListener(new SelectionAdapter()
+        {
+            @Override
+            public void widgetSelected(SelectionEvent e)
+            {
+                panel.pullSelection();
+            }
+        });
+        pullToolItem.setEnabled(false);
+        new ToolItem(toolBar, SWT.SEPARATOR);   // Separator
+    }
+
+    @Override
+    public void setFocus()
+    {
+        if(parent != null)
+        {
+            parent.setFocus();
+        }
+    }
+
+    public static void startEmulatorManager() throws Exception
+    {
+        int osType = ConnectionPlugin.getDefault().os;
+        int linuxType = ConnectionPlugin.LINUX;
+
+        String exePath = ConnectionPlugin.getDefault().getPreferenceStore().getString(TizenConnectionExplorerPreferencePage.KEY_EMULATOR_MANAGER_PATH);
+        if (exePath.equals("") || (!exePath.equals("") && !HostUtil.exists(exePath)))
+        {
+            throw new Exception(ConnectionUIMessages.Explorer_Message_EmulatorError);
+        }
+
+        // FIXME : should implement the lines below based on windows system.
+        String command = exePath;
+        if (osType == linuxType)
+        {
+            command = command + " 1>/dev/null 2>/dev/null &";
+
+            HostUtil.execute(command);
+        } else
+        {
+            HostUtil.batchExecute(command, null, new File(InstallPathConfig.getEmulatorPath()));
+        }
+    }
 }
\ No newline at end of file
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.java b/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.java
new file mode 100644 (file)
index 0000000..e2d1db2
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Kangho Kim <kh5225.kim@samsung.com>
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.connection.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ConnectionUIMessages extends NLS
+{
+    private static final String BUNDLE_NAME = ConnectionUIMessages.class.getPackage().getName() + ".ConnectionUIMessages"; //$NON-NLS-1$
+
+    public static String Explorer_ConetextMenu_New;
+    public static String Explorer_ConetextMenu_File;
+    public static String Explorer_ConetextMenu_Folder;
+    public static String Explorer_ConetextMenu_Push;
+    public static String Explorer_ConetextMenu_Pull;
+    public static String Explorer_ConetextMenu_Refresh;
+    public static String Explorer_ConetextMenu_Rename;
+    public static String Explorer_ConetextMenu_Delete;
+    public static String Explorer_ConetextMenu_Property;
+    public static String Explorer_ConetextMenu_Log;
+    public static String Explorer_ConetextMenu_Log_On;
+    public static String Explorer_ConetextMenu_Log_Off;
+    
+    public static String Explorer_Message_Invalid_Character;
+
+    public static String Explorer_Tooltip_EmulatorManager;
+    public static String Explorer_Tooltip_Push;
+    public static String Explorer_Tooltip_Pull;
+
+    public static String Explorer_Message_EmulatorError;
+    public static String Explorer_Message_PlatformLogError;
+
+    static
+    {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, ConnectionUIMessages.class);
+    }
+
+    private ConnectionUIMessages()
+    {
+    }
+}
diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.properties b/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.properties
new file mode 100644 (file)
index 0000000..8ab5db4
--- /dev/null
@@ -0,0 +1,21 @@
+Explorer_ConetextMenu_New = New
+Explorer_ConetextMenu_File = File
+Explorer_ConetextMenu_Folder = Folder
+Explorer_ConetextMenu_Push = Push the file
+Explorer_ConetextMenu_Pull = Pull the selected content
+Explorer_ConetextMenu_Refresh = Refresh
+Explorer_ConetextMenu_Rename = Rename
+Explorer_ConetextMenu_Delete = Delete
+Explorer_ConetextMenu_Property = Properties
+Explorer_ConetextMenu_Log = Platform Log
+Explorer_ConetextMenu_Log_On = On
+Explorer_ConetextMenu_Log_Off = Off
+
+Explorer_Tooltip_EmulatorManager = Emulator Manager
+Explorer_Tooltip_Push = Push the file to the connected target device
+Explorer_Tooltip_Pull = Pull the content from the connected target device
+
+Explorer_Message_Invalid_Character = File contains invalid characters like 
+
+Explorer_Message_EmulatorError = Emulator is not installed or the install path is invalid.
+Explorer_Message_PlatformLogError = Failed to get platform log
old mode 100644 (file)
new mode 100755 (executable)
index 6c73dad..996d672
@@ -1,28 +1,28 @@
 /*
-*  Common
-*
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-*
-* Contact: 
-* Hoon Kang <h245.kang@samsung.com>
-* Hyunsik Noh <hyunsik.noh@samsung.com>
-* 
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Hoon Kang <h245.kang@samsung.com>
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-* Contributors:
-* - S-Core Co., Ltd
-*
-*/
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
 package org.tizen.common.connection.ui;
 
 import org.eclipse.jface.action.Action;
@@ -31,200 +31,264 @@ import org.eclipse.jface.action.IMenuManager;
 import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.action.Separator;
 import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.dialogs.PreferencesUtil;
 import org.eclipse.ui.part.ViewPart;
+import org.tizen.common.TizenHelpContextIds;
 import org.tizen.common.connection.ConnectionPlugin;
 import org.tizen.common.connection.log.LogColors;
 import org.tizen.common.connection.log.LogPanel;
-
+import org.tizen.common.connection.preference.TizenLogPreferencePage;
 import org.tizen.sdblib.Log.LogLevel;
 
 /**
  * The log cat view displays log output from the current device selection.
- * 
+ *
  */
-public final class LogView extends ViewPart {
-
-       public static final String ID = "org.tizen.common.connection.ui.LogView"; //$NON-NLS-1$
-
-       private LogPanel logPanel;
-
-       private Action addAction;
-       private Action removeAction;
-       private Action editAction;
-       private Action exportAction;
-       private Action clearAction;
-
-       private Action[] logLevelActions;
-       private String[] logLevelIcons = { "icons/log/v.png", //$NON-NLS-1S
-                       "icons/log/d.png", //$NON-NLS-1S
-                       "icons/log/i.png", //$NON-NLS-1S
-                       "icons/log/w.png", //$NON-NLS-1S
-                       "icons/log/e.png", //$NON-NLS-1S
-       };
-
-       private Clipboard clipboard;
-
-       @Override
-       public void createPartControl(Composite parent) {
-               Display d = parent.getDisplay();
-               LogColors colors = new LogColors();
-
-               colors.infoColor = new Color(d, 0, 127, 0);
-               colors.debugColor = new Color(d, 0, 0, 127);
-               colors.errorColor = new Color(d, 255, 0, 0);
-               colors.warningColor = new Color(d, 255, 127, 0);
-               colors.verboseColor = new Color(d, 0, 0, 0);
-
-               addAction = new Action("add Tab") {
-                       @Override
-                       public void run() {
-                               logPanel.addTab();
-                       }
-               };
-               addAction.setToolTipText("Add LogTab");
-               addAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/Add tab.png"));
-               
-               removeAction = new Action("Remove Tab") {
-                       @Override
-                       public void run() {
-                               logPanel.removeTab();
-                       }
-               };
-               removeAction.setToolTipText("Remove LogTab");
-               removeAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/Remove tab.png"));
-               
-               editAction = new Action("Edit Tab") {
-                       @Override
-                       public void run() {
-                               logPanel.editTab();
-                       }
-               };
-               editAction.setToolTipText("Edit LogTab");
-               editAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/Edit tab.png"));
-
-               exportAction = new Action("Export Log") {
-                       @Override
-                       public void run() {
-                               logPanel.save();
-                       }
-               };
-               exportAction.setToolTipText("Export Log");
-               exportAction.setImageDescriptor(
-                               ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/Export Log.png")); //$NON-NLS-1$
-
-               clearAction = new Action("Clear Log") {
-                       @Override
-                       public void run() {
-                               logPanel.clear();
-                       }
-               };
-               clearAction.setToolTipText("Clear Log");
-               clearAction.setImageDescriptor(
-                               ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/Clear Log.png")); //$NON-NLS-1$
-
-               LogLevel[] levels = LogLevel.values();
-               logLevelActions = new Action[logLevelIcons.length];
-               for (int i = 0; i < logLevelActions.length; i++) {
-                       String name = levels[i].getStringValue();
-                       logLevelActions[i] = new Action(name, IAction.AS_CHECK_BOX) {
-                               @Override
-                               public void run() {
-                                       // disable the other actions and record
-                                       // current index
-                                       for (int i = 0; i < logLevelActions.length; i++) {
-                                               Action a = logLevelActions[i];
-                                               if (a == this) {
-                                                       if (logPanel.getCurrentLogTab() != null) {
-                                                               if (a.isChecked())
-                                                                       a.setChecked(a.isChecked());
-                                                        logPanel.getCurrentLogTab().setLevel(i , a.isChecked());
-                                                        logPanel.getCurrentLogTab().refill();
-                                                       }
-                                               }
-                                       }
-                               }
-                       };
-                       logLevelActions[i].setChecked(true);
-                       logLevelActions[i].setToolTipText(name);
-                       logLevelActions[i].setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin(logLevelIcons[i]));
-               }
-
-               // now create the log view
-               logPanel = new LogPanel(colors);
-               logPanel.setActions(logLevelActions, addAction, removeAction, editAction, exportAction, clearAction);
-               placeActions();
-               logPanel.setActionEnabled(LogPanel.ENABLE_NOTHING);
-               logPanel.createPanel(parent);
-
-               // setup the copy action
-               clipboard = new Clipboard(d);
-               IActionBars actionBars = getViewSite().getActionBars();
-               actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), new Action("Copy") {
-                       @Override
-                       public void run() {
-                               logPanel.copy(clipboard);
-                       }
-               });
-
-               // setup the select all action
-               actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), new Action(
-                               "Select All") {
-                       @Override
-                       public void run() {
-                               logPanel.selectAll();
-                       }
-               });
-       }
-
-       @Override
-       public void dispose() {
-               logPanel.stopAll();
-       }
-
-       @Override
-       public void setFocus() {
-               logPanel.setFocus();
-       }
-
-       /**
-        * Place the actions in the ui.
-        */
-       private void placeActions() {
-               IActionBars actionBars = getViewSite().getActionBars();
-
-               // first in the menu
-               IMenuManager menuManager = actionBars.getMenuManager();
-               menuManager.add(addAction);
-               menuManager.add(removeAction);
-               menuManager.add(editAction);
-               menuManager.add(new Separator());
-               menuManager.add(exportAction);
-               menuManager.add(clearAction);
-               menuManager.add(new Separator());
-
-               // and then in the toolbar
-               IToolBarManager toolBarManager = actionBars.getToolBarManager();
-               toolBarManager.add(new Separator());
-               for (Action a : logLevelActions) {
-                       toolBarManager.add(a);
-               }
-               toolBarManager.add(new Separator());
-               toolBarManager.add(addAction);
-               toolBarManager.add(removeAction);
-               toolBarManager.add(editAction);
-               toolBarManager.add(new Separator());
-               toolBarManager.add(exportAction);
-               toolBarManager.add(clearAction);
-               toolBarManager.add(new Separator());
-       }
-
-       public LogPanel getPanel() {
-               return logPanel;
-       }
+public final class LogView extends ViewPart
+{
+
+    public static final String ID = "org.tizen.common.connection.ui.LogView"; //$NON-NLS-1$
+
+    private LogPanel logPanel;
+    private Composite parent;
+
+    private Action addAction;
+    private Action removeAction;
+    private Action editAction;
+    private Action scrollLockAction;
+    private Action exportAction;
+    private Action clearAction;
+    private Action preferenceAction;
+
+    private Action[] viewActions;
+    private Action[] levelFilterActions;
+    private final String[] logLevelIcons = { "icons/log/v.png", //$NON-NLS-1S
+            "icons/log/d.png", //$NON-NLS-1S
+            "icons/log/i.png", //$NON-NLS-1S
+            "icons/log/w.png", //$NON-NLS-1S
+            "icons/log/e.png", //$NON-NLS-1S
+            "icons/log/f.png"
+    };
+
+    private Clipboard clipboard;
+    private LogColors colors;
+
+    @Override
+    public void createPartControl(Composite p)
+    {
+        parent = p;
+        PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, TizenHelpContextIds.HELP_COMMON_LOG_CONTEXT);
+        Display d = parent.getDisplay();
+        colors = new LogColors(d);
+
+        addAction = new Action("add Tab")
+        {
+            @Override
+            public void run()
+            {
+                logPanel.addTab();
+            }
+        };
+        addAction.setToolTipText("Add LogTab");
+        addAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/add_tab.png"));
+
+        removeAction = new Action("Remove Tab")
+        {
+            @Override
+            public void run()
+            {
+                logPanel.removeTab();
+            }
+        };
+        removeAction.setToolTipText("Remove LogTab");
+        removeAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/remove_tab.png"));
+
+        editAction = new Action("Edit Tab")
+        {
+            @Override
+            public void run()
+            {
+                logPanel.editTab();
+            }
+        };
+        editAction.setToolTipText("Edit LogTab");
+        editAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/edit_tab.png"));
+
+        scrollLockAction = new Action("Scroll Lock")
+        {
+            @Override
+            public void run()
+            {
+                scrollLockAction.setChecked(scrollLockAction.isChecked());
+                logPanel.setScrollLock(scrollLockAction.isChecked());
+            }
+        };
+        scrollLockAction.setToolTipText("Scroll Lock");
+        scrollLockAction.setChecked(false);
+        scrollLockAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/scroll_lock.png"));
+
+        exportAction = new Action("Export the log")
+        {
+            @Override
+            public void run()
+            {
+                logPanel.save();
+            }
+        };
+        exportAction.setToolTipText("Export the log");
+        exportAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/export_log.png")); //$NON-NLS-1$
+
+        clearAction = new Action("Clear the log")
+        {
+            @Override
+            public void run()
+            {
+                logPanel.clear();
+            }
+        };
+        clearAction.setToolTipText("Clear the log");
+        clearAction.setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin("icons/log/clear_log.png")); //$NON-NLS-1$
+
+        preferenceAction = new Action("Preference")
+        {
+            @Override
+            public void run()
+            {
+                PreferencesUtil.createPreferenceDialogOn(parent.getShell(), TizenLogPreferencePage.id, null, null).open();
+            }
+        };
+
+        final LogLevel[] levels = LogLevel.values();
+        levelFilterActions = new Action[logLevelIcons.length];
+        for (int i = 0; i < levelFilterActions.length; i++)
+        {
+            String name = levels[i].getStringValue();
+            levelFilterActions[i] = new Action(name, IAction.AS_CHECK_BOX)
+            {
+                @Override
+                public void run()
+                {
+                    // disable the other actions and record
+                    // current index
+                    for (int i = 0; i < levelFilterActions.length; i++)
+                    {
+                        Action a = levelFilterActions[i];
+                        if (a == this)
+                        {
+                            if (logPanel.getSelectionLogTab() != null)
+                            {
+                                if (a.isChecked())
+                                {
+                                    a.setChecked(a.isChecked());
+                                }
+                                logPanel.changeLogLevelAndFilterMessages(i, a.isChecked());
+                            }
+                        }
+                    }
+                }
+            };
+            levelFilterActions[i].setChecked(false);
+            levelFilterActions[i].setToolTipText(name);
+            levelFilterActions[i].setImageDescriptor(ConnectionPlugin.getImageDescriptorFromPlugin(logLevelIcons[i]));
+        }
+        
+        IActionBars actionBars = getViewSite().getActionBars();
+        // now create the log view
+        logPanel = new LogPanel(colors, actionBars);
+        viewActions = new Action[]{addAction, removeAction, editAction, scrollLockAction, exportAction, clearAction};
+        logPanel.setActions(levelFilterActions, viewActions);
+        placeActions();
+        logPanel.setEnableState(LogPanel.NO_TAB, null);
+        logPanel.createPanel(parent);
+
+        // setup the copy action
+        clipboard = new Clipboard(d);
+        actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), new Action("Copy")
+        {
+            @Override
+            public void run()
+            {
+                logPanel.copy(clipboard);
+            }
+        });
+
+        // setup the select all action
+        actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), new Action("Select All")
+        {
+            @Override
+            public void run()
+            {
+                logPanel.selectAll();
+            }
+        });
+    }
+
+    @Override
+    public void dispose()
+    {
+        if (clipboard != null && !clipboard.isDisposed())
+        {
+            clipboard.dispose();
+        }
+        logPanel.stopAllTabItems();
+        colors.dispose();
+        super.dispose();
+    }
+
+    @Override
+    public void setFocus()
+    {
+        if(parent != null)
+        {
+            parent.setFocus();
+        }
+        logPanel.setFocus();
+    }
+
+    /**
+     * Place the actions in the ui.
+     */
+    private void placeActions()
+    {
+        IActionBars actionBars = getViewSite().getActionBars();
+        // first in the menu
+        IMenuManager menuManager = actionBars.getMenuManager();
+        menuManager.add(addAction);
+        menuManager.add(removeAction);
+        menuManager.add(editAction);
+        menuManager.add(new Separator());
+        menuManager.add(exportAction);
+        menuManager.add(clearAction);
+//        menuManager.add(new Separator());
+//        menuManager.add(preferenceAction);
+
+        // and then in the toolbar
+        IToolBarManager toolBarManager = actionBars.getToolBarManager();
+
+        toolBarManager.add(new Separator());
+        for (Action filterActions : levelFilterActions)
+        {
+            toolBarManager.add(filterActions);
+        }
+        toolBarManager.add(new Separator());
+        toolBarManager.add(addAction);
+        toolBarManager.add(removeAction);
+        toolBarManager.add(editAction);
+        toolBarManager.add(new Separator());
+        toolBarManager.add(scrollLockAction);
+        toolBarManager.add(new Separator());
+        toolBarManager.add(exportAction);
+        toolBarManager.add(clearAction);
+        toolBarManager.add(new Separator());
+    }
+
+    public LogPanel getPanel()
+    {
+        return logPanel;
+    }
 }
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 164482c..9bf29e2
@@ -59,12 +59,16 @@ public class TizenRemoteFileContentProvider  implements ITreeContentProvider {
     public Object[] getChildren(Object arg0) {
         if (arg0 instanceof FileEntry) {
             FileEntry parent = (FileEntry) arg0;
-            FileEntry[] children = null;
+            FileEntry[] children;
 
             if (isInitialized == false)
+            {
                 children = parent.getCachedChildren();
+            }
             else
+            {
                 children = parent.getFileListingService().getChildren(parent, false, null);
+            }
 
             List<FileEntry> entries = new ArrayList<FileEntry>();
                 for (FileEntry child : children) {
@@ -78,7 +82,9 @@ public class TizenRemoteFileContentProvider  implements ITreeContentProvider {
                 }
             return entries.toArray();
         } else 
+        {
             return new Object[0];
+        }
     }
 
     @Override
@@ -115,17 +121,29 @@ public class TizenRemoteFileContentProvider  implements ITreeContentProvider {
         if (arg0 instanceof FileEntry) {
             FileEntry entry = (FileEntry) arg0;
             if (entry.getType() == FileListingService.TYPE_DIRECTORY_LINK)
+            {
                 return true;
+            }
             else if (entry.getType() == FileListingService.TYPE_LINK)
+            {
                 return true;
+            }
             else if (entry.getType() == FileListingService.TYPE_DIRECTORY)
+            {
                 return true;
+            }
             else if (entry.getType() == FileListingService.TYPE_ROOT_EMULATOR)
+            {
                 return true;
+            }
             else if (entry.getType() == FileListingService.TYPE_ROOT_DEVICE)
+            {
                 return true;
+            }
             else
+            {
                 return false;
+            }
         }
         return false;
     }
old mode 100644 (file)
new mode 100755 (executable)
index d5ec924..634f420
@@ -3,10 +3,10 @@
 *
 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
 *
-* Contact: 
+* Contact:
 * Hoon Kang <h245.kang@samsung.com>
 * Yoonki Park <yoonki.park@samsung.com>
-* 
+*
  * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 */
 package org.tizen.common.connection.ui;
 
+import java.io.IOException;
+
 import org.eclipse.jface.viewers.ITableLabelProvider;
 import org.eclipse.jface.viewers.TreeViewer;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTException;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -39,23 +44,26 @@ import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.ScrollBar;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Tree;
 import org.eclipse.swt.widgets.TreeColumn;
 import org.eclipse.swt.widgets.TreeItem;
-
+import org.tizen.common.TizenPlatformConstants;
+import org.tizen.common.connection.ConnectionPlugin;
+import org.tizen.common.util.log.Logger;
 import org.tizen.sdblib.FileListingService.FileEntry;
 import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.MultiLineReceiver;
 
 public class TizenRemoteFileDialog {
+    public enum TizenRemoteFileDialogResult {
+        OK,
+        CANCEL
+    }
 
-       public enum TizenRemoteFileDialogResult {
-               OK,
-               CANCEL
-       }
-       
-       private TizenRemoteFileDialogResult result = TizenRemoteFileDialogResult.CANCEL;
-       private IDevice device;
+    private TizenRemoteFileDialogResult result = TizenRemoteFileDialogResult.CANCEL;
+    private IDevice device;
     private Shell shell;
     private Display display;
     private boolean isDirOnly = false;
@@ -64,28 +72,36 @@ public class TizenRemoteFileDialog {
     private FileEntry selectedDir;
     private Tree pathTree;
     private TreeViewer pathTreeViewer;
+    private Composite upper;
 
     TizenRemoteFileContentProvider remoteContentProvider = null;
 
-    public TizenRemoteFileDialog(Shell parent, String dlgTitle, IDevice device,
-                               boolean isDirOnly, String defaultPath)
-                                   throws IllegalArgumentException {
-
-        if (parent == null || device == null)
+    public TizenRemoteFileDialog(Shell parent, String dlgTitle, IDevice device, boolean isDirOnly, String defaultPath) throws IllegalArgumentException {
+        if (parent == null || device == null) {
             throw new IllegalArgumentException();
+        }
 
         display = parent.getDisplay();
         shell = createNewShell(parent);
         shell.setText(dlgTitle);
         shell.setSize(300, 400);
+        shell.setImage(ConnectionPlugin.getImageDescriptorFromPlugin("icons/16_TIZEN_SDK_icon.png").createImage());
+        shell.addListener(SWT.Traverse, new Listener() {
+            public void handleEvent(Event event) {
+                switch (event.detail) {
+                    case SWT.TRAVERSE_ESCAPE:
+                        shell.close();
+                        event.detail = SWT.TRAVERSE_NONE;
+                        event.doit = false;
+                        break;
+                }
+            }
+        });
 
         this.device = device;
         this.isDirOnly = isDirOnly;
 
-        if (defaultPath != null)
-            this.defaultPath = defaultPath;
-        else
-            this.defaultPath = "/";
+        setDefaultPath(defaultPath);
 
         createControls(shell);
     }
@@ -101,7 +117,7 @@ public class TizenRemoteFileDialog {
     }
 
     private void createControls(Composite parent) {
-        Composite upper = new Composite(parent, SWT.NONE);
+        upper = new Composite(parent, SWT.NONE);
         setUpperLayout(upper);
         createPathLabels(upper);
         createPathTree(upper);
@@ -112,18 +128,23 @@ public class TizenRemoteFileDialog {
     }
 
     private void fillPathTree() {
-       createTreeColumn();
-       createTreeViewer();
-        
+        createTreeColumn();
+        createTreeViewer();
+
         FileEntry root = device.getFileListingService().getRoot();
         String[] defaultExpandedPath = defaultPath.substring(1).split("/");
         cacheChild(root, defaultExpandedPath);
-        
+
         pathTreeViewer.setInput(root);
         pathTreeViewer.expandAll();
-        
+
         selectDefaultPath(defaultExpandedPath);
 
+        // set default path to the top item.
+        if (pathTree.getSelection().length > 0) {
+            pathTreeViewer.getTree().setTopItem(pathTree.getSelection()[0]);
+        }
+
         remoteContentProvider.setInitialize(true);
         pathTreeViewer.refresh();
 
@@ -133,11 +154,13 @@ public class TizenRemoteFileDialog {
                 TreeItem[] items = pathTree.getSelection();
                 if (items.length == 1) {
                     Object object = items[0].getData();
-                    if (object instanceof FileEntry) { 
+                    if (object instanceof FileEntry) {
                         selectedDir = (FileEntry) object;
                         path.setText(selectedDir.getFullPath());
                     }
                 }
+                for (TreeColumn column : pathTree.getColumns())
+                    column.pack();
             }
         });
     }
@@ -146,8 +169,9 @@ public class TizenRemoteFileDialog {
         TreeItem[] items = pathTree.getItems();
         TreeItem found = null;
         for (int i = 0; i < defaultExpandedPath.length; i++) {
-               if (found != null)
+               if (found != null) {
                        items = found.getItems();
+               }
                for (TreeItem item : items) {
                        Object data = item.getData();
                        if (data instanceof FileEntry) {
@@ -159,7 +183,7 @@ public class TizenRemoteFileDialog {
                        }
                }
         }
-        
+
         if (found != null) {
                pathTree.select(found);
                Object data = found.getData();
@@ -179,9 +203,38 @@ public class TizenRemoteFileDialog {
        }
 
        private void createTreeColumn() {
-        TreeColumn nameColumn = new TreeColumn(pathTree, SWT.LEFT);
+           final TreeColumn nameColumn = new TreeColumn(pathTree, SWT.LEFT);
         nameColumn.setText("Name");
         nameColumn.setWidth(100);
+
+        upper.addControlListener(new ControlAdapter() {
+            public void controlResized(ControlEvent e) {
+                Rectangle area = upper.getClientArea();
+                Point size = pathTree.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+                ScrollBar vBar = pathTree.getVerticalBar();
+                int width = area.width - pathTree.computeTrim(0,0,0,0).width - vBar.getSize().x;
+                if (size.y > area.height + pathTree.getHeaderHeight()) {
+                    // Subtract the scrollbar width from the total column width
+                    // if a vertical scrollbar will be required
+                    Point vBarSize = vBar.getSize();
+                    width -= vBarSize.x;
+                }
+                Point oldSize = pathTree.getSize();
+                if (oldSize.x > area.width) {
+                    // table is getting smaller so make the columns 
+                    // smaller first and then resize the table to
+                    // match the client area width
+                    nameColumn.setWidth(width);
+                    pathTree.setSize(area.width, area.height);
+                } else {
+                    // table is getting bigger so make the table 
+                    // bigger first and then make the columns wider
+                    // to match the client area width
+                    pathTree.setSize(area.width, area.height);
+                    nameColumn.setWidth(width);
+                }
+            }
+        });
        }
 
        private void cacheChild(FileEntry root, String[] defaultExpandedPath) {
@@ -247,7 +300,8 @@ public class TizenRemoteFileDialog {
     }
 
     private void createPathTree(Composite pParent) {
-        pathTree = new Tree(pParent, SWT.MULTI | SWT.FULL_SELECTION | SWT.VIRTUAL);
+        // if add SWT.VIRTUAL, horizontal scrol is not shown in case of Linux
+        pathTree = new Tree(pParent, SWT.MULTI | SWT.FULL_SELECTION);
         setTreeLayout(pathTree);
     }
 
@@ -272,7 +326,7 @@ public class TizenRemoteFileDialog {
                         }
                         break;
                     default:
-                               
+
                 }
             }
         });
@@ -309,21 +363,32 @@ public class TizenRemoteFileDialog {
     }
 
     private void runEventLoop(Shell loopShell) {
-        Display tmpDisplay = null;
-
-        if (shell == null)
-               tmpDisplay = Display.getCurrent();
-        else
-               tmpDisplay = loopShell.getDisplay();
-        
-        while (loopShell != null && !loopShell.isDisposed()) {
-            try {
-                if (!tmpDisplay.readAndDispatch())
-                       tmpDisplay.sleep();
-            } catch (SWTException e) {
-                e.printStackTrace();
+        Display tmpDisplay = loopShell.getDisplay();
+
+        while (!loopShell.isDisposed()) {
+            if (!tmpDisplay.readAndDispatch()) {
+                tmpDisplay.sleep();
             }
         }
         display.update();
     }
-}
\ No newline at end of file
+
+    private void setDefaultPath(final String corePath) {
+        if (corePath == null) {
+            defaultPath = "/";
+        }
+
+        String command = "ls " + TizenPlatformConstants.PRIVATE_PLATFORM_CORE_PATH + "/*/files/core.* 2&>/dev/null | wc -l";
+
+        try {
+            this.device.executeShellCommand(command, new MultiLineReceiver() {
+                @Override
+                public void processNewLines(String[] lines) {
+                    defaultPath = "0".equals(lines[0]) ? corePath : TizenPlatformConstants.PRIVATE_PLATFORM_CORE_PATH;
+                }
+            });
+        } catch (IOException e) {
+            Logger.error("Problem occurred while executing command '" + command + "'", e.getMessage(), e);
+        }
+    }
+}
old mode 100644 (file)
new mode 100755 (executable)
index 25931bd..160a675
@@ -107,9 +107,12 @@ public class TizenRemoteFileLabelProvider implements ITableLabelProvider {
                                                case 4:                         
                                                        return entry.getInfo();
                                                default:
+                                                   break;
                                        }
                                }
+                               break;
                        default:
+                           break;
                        }
                } else if (element instanceof IDevice) {
                        IDevice device = (IDevice) element;
diff --git a/org.tizen.common.externals/.classpath b/org.tizen.common.externals/.classpath
new file mode 100644 (file)
index 0000000..8a8f166
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<classpath>\r
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
+       <classpathentry kind="src" path="src"/>\r
+       <classpathentry kind="output" path="bin"/>\r
+</classpath>\r
diff --git a/org.tizen.common.externals/.project b/org.tizen.common.externals/.project
new file mode 100644 (file)
index 0000000..6ae5db5
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+       <name>org.tizen.common.externals</name>\r
+       <comment></comment>\r
+       <projects>\r
+       </projects>\r
+       <buildSpec>\r
+               <buildCommand>\r
+                       <name>org.eclipse.jdt.core.javabuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.pde.ManifestBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.pde.SchemaBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+       </buildSpec>\r
+       <natures>\r
+               <nature>org.eclipse.pde.PluginNature</nature>\r
+               <nature>org.eclipse.jdt.core.javanature</nature>\r
+       </natures>\r
+</projectDescription>\r
diff --git a/org.tizen.common.externals/.settings/org.eclipse.jdt.core.prefs b/org.tizen.common.externals/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..f8bca86
--- /dev/null
@@ -0,0 +1,8 @@
+#Tue Jul 31 14:48:57 KST 2012\r
+eclipse.preferences.version=1\r
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6\r
+org.eclipse.jdt.core.compiler.compliance=1.6\r
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
+org.eclipse.jdt.core.compiler.source=1.6\r
diff --git a/org.tizen.common.externals/META-INF/MANIFEST.MF b/org.tizen.common.externals/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..263cd65
--- /dev/null
@@ -0,0 +1,42 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.tizen.common.externals
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.tizen.common.externals.ExternalsPlugin
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Export-Package: org.mihalis.opal,
+ org.mihalis.opal.angles,
+ org.mihalis.opal.brushedMetalComposite,
+ org.mihalis.opal.checkBoxGroup,
+ org.mihalis.opal.columns,
+ org.mihalis.opal.flatButton,
+ org.mihalis.opal.gradientComposite,
+ org.mihalis.opal.header,
+ org.mihalis.opal.heapManager,
+ org.mihalis.opal.horizontalSpinner,
+ org.mihalis.opal.imageSelector,
+ org.mihalis.opal.infinitePanel,
+ org.mihalis.opal.itemSelector,
+ org.mihalis.opal.launcher,
+ org.mihalis.opal.login,
+ org.mihalis.opal.multiChoice,
+ org.mihalis.opal.notify,
+ org.mihalis.opal.opalDialog,
+ org.mihalis.opal.panels,
+ org.mihalis.opal.preferenceWindow,
+ org.mihalis.opal.preferenceWindow.enabler,
+ org.mihalis.opal.preferenceWindow.widgets,
+ org.mihalis.opal.promptSupport,
+ org.mihalis.opal.rangeSlider,
+ org.mihalis.opal.switchButton,
+ org.mihalis.opal.textAssist,
+ org.mihalis.opal.tipOfTheDay,
+ org.mihalis.opal.titledSeparator,
+ org.mihalis.opal.transitionComposite,
+ org.mihalis.opal.utils,
+ org.tizen.common.externals  
diff --git a/org.tizen.common.externals/OSGI-INF/l10n/bundle.properties b/org.tizen.common.externals/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..f342c89
--- /dev/null
@@ -0,0 +1,3 @@
+#Properties file for org.tizen.web.project.wizard
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen Common Externals
\ No newline at end of file
diff --git a/org.tizen.common.externals/about.html b/org.tizen.common.externals/about.html
new file mode 100644 (file)
index 0000000..a72b377
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May, 2011</p>
+<h3>Tizen SDK</h3>
+
+<p><a href="http://www.tizen.org/" target="_blank">Tizen SDK</a> 
+is a set of Eclipse plug-ins that helps programmers to develop applications for 
+the mobile platform.</p>
+
+<h3>License</h3>
+
+<p>See <a href="about_files/LICENSE-2.0.htm">Apache License, Version 2.0</a>.</p>
+
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as set out below. If you did not
+receive this Content directly from the Eclipse Foundation, the following is provided for informational
+purposes only, and you should look to the Redistributors license for terms and conditions of use.</p>
+
+<h4>OPAL</h4>
+<p>
+The goal of this project is to propose new widgets for the SWT API. Some widgets are new, some others are a port of existing widgets made with Swing.
+</p>
+
+<p>
+A copy of the license is included in <a href="about_files/epl-v10.html">about_files/epl-v10.html</a>. The home page is located at:
+<ul>
+<a href="http://code.google.com/a/eclipselabs.org/p/opal/">http://code.google.com/a/eclipselabs.org/p/opal/</a>
+</ul>
+</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.common.externals/about_files/LICENSE-2.0.htm b/org.tizen.common.externals/about_files/LICENSE-2.0.htm
new file mode 100644 (file)
index 0000000..f7ca656
--- /dev/null
@@ -0,0 +1,191 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache License, Version 2.0</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+    <link rel="stylesheet" type="text/css" media="screen" href="/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="/css/code.css">
+
+    <script type="text/javascript" src="/js/jquery.js"></script>
+    <script type="text/javascript" src="/js/apache_boot.js"></script>
+
+    
+
+    
+    <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License.  You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License. -->
+  </head>
+
+  <body>
+    <div id="page" class="container_16">
+      <div id="header" class="grid_8">
+        <h1>The Apache Software Foundation</h1>
+        <h2>Apache License, Version 2.0</h2>
+      </div>
+
+      <div class="clear"></div>
+      <div id="content" class="grid_16"><div class="section-content"><p>Apache License<br></br>Version 2.0, January 2004<br></br>
+<a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a> </p>
+<p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p>
+<p><strong><a name="definitions">1. Definitions</a></strong>.</p>
+<p>"License" shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.</p>
+<p>"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.</p>
+<p>"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control with
+that entity. For the purposes of this definition, "control" means (i) the
+power, direct or indirect, to cause the direction or management of such
+entity, whether by contract or otherwise, or (ii) ownership of fifty
+percent (50%) or more of the outstanding shares, or (iii) beneficial
+ownership of such entity.</p>
+<p>"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.</p>
+<p>"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.</p>
+<p>"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media types.</p>
+<p>"Work" shall mean the work of authorship, whether in Source or Object form,
+made available under the License, as indicated by a copyright notice that
+is included in or attached to the work (an example is provided in the
+Appendix below).</p>
+<p>"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent, as
+a whole, an original work of authorship. For the purposes of this License,
+Derivative Works shall not include works that remain separable from, or
+merely link (or bind by name) to the interfaces of, the Work and Derivative
+Works thereof.</p>
+<p>"Contribution" shall mean any work of authorship, including the original
+version of the Work and any modifications or additions to that Work or
+Derivative Works thereof, that is intentionally submitted to Licensor for
+inclusion in the Work by the copyright owner or by an individual or Legal
+Entity authorized to submit on behalf of the copyright owner. For the
+purposes of this definition, "submitted" means any form of electronic,
+verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems that
+are managed by, or on behalf of, the Licensor for the purpose of discussing
+and improving the Work, but excluding communication that is conspicuously
+marked or otherwise designated in writing by the copyright owner as "Not a
+Contribution."</p>
+<p>"Contributor" shall mean Licensor and any individual or Legal Entity on
+behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.</p>
+<p><strong><a name="copyright">2. Grant of Copyright License</a></strong>. Subject to the
+terms and conditions of this License, each Contributor hereby grants to You
+a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of, publicly
+display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.</p>
+<p><strong><a name="patent">3. Grant of Patent License</a></strong>. Subject to the terms
+and conditions of this License, each Contributor hereby grants to You a
+perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made, use,
+offer to sell, sell, import, and otherwise transfer the Work, where such
+license applies only to those patent claims licensable by such Contributor
+that are necessarily infringed by their Contribution(s) alone or by
+combination of their Contribution(s) with the Work to which such
+Contribution(s) was submitted. If You institute patent litigation against
+any entity (including a cross-claim or counterclaim in a lawsuit) alleging
+that the Work or a Contribution incorporated within the Work constitutes
+direct or contributory patent infringement, then any patent licenses
+granted to You under this License for that Work shall terminate as of the
+date such litigation is filed.</p>
+<p><strong><a name="redistribution">4. Redistribution</a></strong>. You may reproduce and
+distribute copies of the Work or Derivative Works thereof in any medium,
+with or without modifications, and in Source or Object form, provided that
+You meet the following conditions:</p>
+<ol>
+<li>
+<p>You must give any other recipients of the Work or Derivative Works a
+copy of this License; and</p>
+</li>
+<li>
+<p>You must cause any modified files to carry prominent notices stating
+that You changed the files; and</p>
+</li>
+<li>
+<p>You must retain, in the Source form of any Derivative Works that You
+distribute, all copyright, patent, trademark, and attribution notices from
+the Source form of the Work, excluding those notices that do not pertain to
+any part of the Derivative Works; and</p>
+</li>
+<li>
+<p>If the Work includes a "NOTICE" text file as part of its distribution,
+then any Derivative Works that You distribute must include a readable copy
+of the attribution notices contained within such NOTICE file, excluding
+those notices that do not pertain to any part of the Derivative Works, in
+at least one of the following places: within a NOTICE text file distributed
+as part of the Derivative Works; within the Source form or documentation,
+if provided along with the Derivative Works; or, within a display generated
+by the Derivative Works, if and wherever such third-party notices normally
+appear. The contents of the NOTICE file are for informational purposes only
+and do not modify the License. You may add Your own attribution notices
+within Derivative Works that You distribute, alongside or as an addendum to
+the NOTICE text from the Work, provided that such additional attribution
+notices cannot be construed as modifying the License.
+You may add Your own copyright statement to Your modifications and may
+provide additional or different license terms and conditions for use,
+reproduction, or distribution of Your modifications, or for any such
+Derivative Works as a whole, provided Your use, reproduction, and
+distribution of the Work otherwise complies with the conditions stated in
+this License.</p>
+</li>
+</ol>
+<p><strong><a name="contributions">5. Submission of Contributions</a></strong>. Unless You
+explicitly state otherwise, any Contribution intentionally submitted for
+inclusion in the Work by You to the Licensor shall be under the terms and
+conditions of this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify the
+terms of any separate license agreement you may have executed with Licensor
+regarding such Contributions.</p>
+<p><strong><a name="trademarks">6. Trademarks</a></strong>. This License does not grant
+permission to use the trade names, trademarks, service marks, or product
+names of the Licensor, except as required for reasonable and customary use
+in describing the origin of the Work and reproducing the content of the
+NOTICE file.</p>
+<p><strong><a name="no-warranty">7. Disclaimer of Warranty</a></strong>. Unless required by
+applicable law or agreed to in writing, Licensor provides the Work (and
+each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
+without limitation, any warranties or conditions of TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You
+are solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your exercise
+of permissions under this License.</p>
+<p><strong><a name="no-liability">8. Limitation of Liability</a></strong>. In no event and
+under no legal theory, whether in tort (including negligence), contract, or
+otherwise, unless required by applicable law (such as deliberate and
+grossly negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a result
+of this License or out of the use or inability to use the Work (including
+but not limited to damages for loss of goodwill, work stoppage, computer
+failure or malfunction, or any and all other commercial damages or losses),
+even if such Contributor has been advised of the possibility of such
+damages.</p>
+<p><strong><a name="additional">9. Accepting Warranty or Additional Liability</a></strong>.
+While redistributing the Work or Derivative Works thereof, You may choose
+to offer, and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this License.
+However, in accepting such obligations, You may act only on Your own behalf
+and on Your sole responsibility, not on behalf of any other Contributor,
+and only if You agree to indemnify, defend, and hold each Contributor
+harmless for any liability incurred by, or claims asserted against, such
+Contributor by reason of your accepting any such warranty or additional
+liability.</p>
+<p>END OF TERMS AND CONDITIONS</p>
+
+    <div class="clear"></div>
+    
+    </div>
+    <div id="copyright" class="container_16">
+      <p>Copyright &#169; 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+    </div>
+  </body>
+</html>
diff --git a/org.tizen.common.externals/about_files/epl-v10.html b/org.tizen.common.externals/about_files/epl-v10.html
new file mode 100644 (file)
index 0000000..fd39122
--- /dev/null
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Public License - Version 1.0</title>
+<style type="text/css">
+  body {
+    size: 8.5in 11.0in;
+    margin: 0.25in 0.5in 0.25in 0.5in;
+    tab-interval: 0.5in;
+    }
+  p {          
+    margin-left: auto;
+    margin-top:  0.5em;
+    margin-bottom: 0.5em;
+    }
+  p.list {
+       margin-left: 0.5in;
+    margin-top:  0.05em;
+    margin-bottom: 0.05em;
+    }
+  </style>
+
+</head>
+
+<body lang="EN-US">
+
+<h2>Eclipse Public License - v 1.0</h2>
+
+<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
+AGREEMENT.</p>
+
+<p><b>1. DEFINITIONS</b></p>
+
+<p>&quot;Contribution&quot; means:</p>
+
+<p class="list">a) in the case of the initial Contributor, the initial
+code and documentation distributed under this Agreement, and</p>
+<p class="list">b) in the case of each subsequent Contributor:</p>
+<p class="list">i) changes to the Program, and</p>
+<p class="list">ii) additions to the Program;</p>
+<p class="list">where such changes and/or additions to the Program
+originate from and are distributed by that particular Contributor. A
+Contribution 'originates' from a Contributor if it was added to the
+Program by such Contributor itself or anyone acting on such
+Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in
+conjunction with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.</p>
+
+<p>&quot;Contributor&quot; means any person or entity that distributes
+the Program.</p>
+
+<p>&quot;Licensed Patents&quot; mean patent claims licensable by a
+Contributor which are necessarily infringed by the use or sale of its
+Contribution alone or when combined with the Program.</p>
+
+<p>&quot;Program&quot; means the Contributions distributed in accordance
+with this Agreement.</p>
+
+<p>&quot;Recipient&quot; means anyone who receives the Program under
+this Agreement, including all Contributors.</p>
+
+<p><b>2. GRANT OF RIGHTS</b></p>
+
+<p class="list">a) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free copyright license to reproduce, prepare derivative works
+of, publicly display, publicly perform, distribute and sublicense the
+Contribution of such Contributor, if any, and such derivative works, in
+source code and object code form.</p>
+
+<p class="list">b) Subject to the terms of this Agreement, each
+Contributor hereby grants Recipient a non-exclusive, worldwide,
+royalty-free patent license under Licensed Patents to make, use, sell,
+offer to sell, import and otherwise transfer the Contribution of such
+Contributor, if any, in source code and object code form. This patent
+license shall apply to the combination of the Contribution and the
+Program if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to be covered
+by the Licensed Patents. The patent license shall not apply to any other
+combinations which include the Contribution. No hardware per se is
+licensed hereunder.</p>
+
+<p class="list">c) Recipient understands that although each Contributor
+grants the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe the
+patent or other intellectual property rights of any other entity. Each
+Contributor disclaims any liability to Recipient for claims brought by
+any other entity based on infringement of intellectual property rights
+or otherwise. As a condition to exercising the rights and licenses
+granted hereunder, each Recipient hereby assumes sole responsibility to
+secure any other intellectual property rights needed, if any. For
+example, if a third party patent license is required to allow Recipient
+to distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.</p>
+
+<p class="list">d) Each Contributor represents that to its knowledge it
+has sufficient copyright rights in its Contribution, if any, to grant
+the copyright license set forth in this Agreement.</p>
+
+<p><b>3. REQUIREMENTS</b></p>
+
+<p>A Contributor may choose to distribute the Program in object code
+form under its own license agreement, provided that:</p>
+
+<p class="list">a) it complies with the terms and conditions of this
+Agreement; and</p>
+
+<p class="list">b) its license agreement:</p>
+
+<p class="list">i) effectively disclaims on behalf of all Contributors
+all warranties and conditions, express and implied, including warranties
+or conditions of title and non-infringement, and implied warranties or
+conditions of merchantability and fitness for a particular purpose;</p>
+
+<p class="list">ii) effectively excludes on behalf of all Contributors
+all liability for damages, including direct, indirect, special,
+incidental and consequential damages, such as lost profits;</p>
+
+<p class="list">iii) states that any provisions which differ from this
+Agreement are offered by that Contributor alone and not by any other
+party; and</p>
+
+<p class="list">iv) states that source code for the Program is available
+from such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for software
+exchange.</p>
+
+<p>When the Program is made available in source code form:</p>
+
+<p class="list">a) it must be made available under this Agreement; and</p>
+
+<p class="list">b) a copy of this Agreement must be included with each
+copy of the Program.</p>
+
+<p>Contributors may not remove or alter any copyright notices contained
+within the Program.</p>
+
+<p>Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.</p>
+
+<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
+
+<p>Commercial distributors of software may accept certain
+responsibilities with respect to end users, business partners and the
+like. While this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+(&quot;Commercial Contributor&quot;) hereby agrees to defend and
+indemnify every other Contributor (&quot;Indemnified Contributor&quot;)
+against any losses, damages and costs (collectively &quot;Losses&quot;)
+arising from claims, lawsuits and other legal actions brought by a third
+party against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection with its
+distribution of the Program in a commercial product offering. The
+obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In
+order to qualify, an Indemnified Contributor must: a) promptly notify
+the Commercial Contributor in writing of such claim, and b) allow the
+Commercial Contributor to control, and cooperate with the Commercial
+Contributor in, the defense and any related settlement negotiations. The
+Indemnified Contributor may participate in any such claim at its own
+expense.</p>
+
+<p>For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any other
+Contributor to pay any damages as a result, the Commercial Contributor
+must pay those damages.</p>
+
+<p><b>5. NO WARRANTY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
+PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with its
+exercise of rights under this Agreement , including but not limited to
+the risks and costs of program errors, compliance with applicable laws,
+damage to or loss of data, programs or equipment, and unavailability or
+interruption of operations.</p>
+
+<p><b>6. DISCLAIMER OF LIABILITY</b></p>
+
+<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
+WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
+DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
+HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
+
+<p><b>7. GENERAL</b></p>
+
+<p>If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further action
+by the parties hereto, such provision shall be reformed to the minimum
+extent necessary to make such provision valid and enforceable.</p>
+
+<p>If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other
+software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the
+date such litigation is filed.</p>
+
+<p>All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of time
+after becoming aware of such noncompliance. If all Recipient's rights
+under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive.</p>
+
+<p>Everyone is permitted to copy and distribute copies of this
+Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The
+Agreement Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other than the
+Agreement Steward has the right to modify this Agreement. The Eclipse
+Foundation is the initial Agreement Steward. The Eclipse Foundation may
+assign the responsibility to serve as the Agreement Steward to a
+suitable separate entity. Each new version of the Agreement will be
+given a distinguishing version number. The Program (including
+Contributions) may always be distributed subject to the version of the
+Agreement under which it was received. In addition, after a new version
+of the Agreement is published, Contributor may elect to distribute the
+Program (including its Contributions) under the new version. Except as
+expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
+rights or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under this
+Agreement are reserved.</p>
+
+<p>This Agreement is governed by the laws of the State of New York and
+the intellectual property laws of the United States of America. No party
+to this Agreement will bring a legal action under this Agreement more
+than one year after the cause of action arose. Each party waives its
+rights to a jury trial in any resulting litigation.</p>
+
+</body>
+
+</html>
diff --git a/org.tizen.common.externals/build.properties b/org.tizen.common.externals/build.properties
new file mode 100644 (file)
index 0000000..1477b3f
--- /dev/null
@@ -0,0 +1,8 @@
+source.. = src/\r
+output.. = bin/\r
+bin.includes = META-INF/,\\r
+               .,\\r
+               OSGI-INF/,\\r
+               resources/,\\r
+               about.html,\\r
+               about_files/\r
diff --git a/org.tizen.common.externals/resources/opal.properties b/org.tizen.common.externals/resources/opal.properties
new file mode 100644 (file)
index 0000000..ef0a470
--- /dev/null
@@ -0,0 +1,35 @@
+Ok=OK\r
+Cancel=Cancel\r
+Close=Close\r
+Yes=Yes\r
+No=No\r
+MoreDetails=More Details\r
+FewerDetails=Fewer Details\r
+Details=Details\r
+Information=Information\r
+Error=Error\r
+Question=Question\r
+Warning=Warning\r
+Exception=Exception\r
+Choice=Choice\r
+Select=Select\r
+Input=Input\r
+ApplicationError=Application Error\r
+megabytes=Mb\r
+performGC=Perform GC\r
+login=Login\r
+name=Name\r
+password=Password\r
+rememberPassword=Remember password\r
+loginFailed=Login failed\r
+tipOfTheDay=Tip of the day\r
+didYouKnow=Did you know...\r
+showTipAtStartup=Show Tip at startup\r
+previousTip=< Previous Tip\r
+nextTip=Next Tip >\r
+choose=Choose\r
+preferences=Preferences\r
+validURL=Please enter a valid URL\r
+chooseDirectory=Please choose a directory\r
+bold=bold\r
+italic=italic\r
diff --git a/org.tizen.common.externals/resources/opal_de_DE.properties b/org.tizen.common.externals/resources/opal_de_DE.properties
new file mode 100644 (file)
index 0000000..b6e5e55
--- /dev/null
@@ -0,0 +1,35 @@
+OK=OK\r
+Cancel=Abbrechen\r
+Close=Schließen\r
+Yes=Ja\r
+No=Nein\r
+MoreDetails=Weitere Details\r
+FewerDetails=Weniger Details\r
+Details=Details\r
+Information=Information\r
+Error=Fehler\r
+Question=Frage\r
+Warning=Warnung\r
+Exception=Ausnahme\r
+Choice=Auswahl\r
+Select=Auswählen\r
+Input=Eingabe\r
+ApplicationError=Application Error\r
+megabytes=Mb\r
+performGC=Perform GC\r
+login=Login\r
+name=Name\r
+password=Passwort\r
+rememberPassword=Passwort merken\r
+loginFailed=Login failed\r
+tipOfTheDay=Tip of the day\r
+didYouKnow=Did you know...\r
+showTipAtStartup=Show Tip at startup\r
+previousTip=< Previous Tip\r
+nextTip=Next Tip >\r
+choose=Choose\r
+preferences=Preferences\r
+validURL=Please enter a valid URL\r
+chooseDirectory=Please choose a directory\r
+bold=bold\r
+italic=italic
\ No newline at end of file
diff --git a/org.tizen.common.externals/resources/opal_es_ES.properties b/org.tizen.common.externals/resources/opal_es_ES.properties
new file mode 100644 (file)
index 0000000..afb3798
--- /dev/null
@@ -0,0 +1,35 @@
+Ok=OK\r
+Cancel=Cancelar\r
+Close=Cerrar\r
+Yes=Sí\r
+No=No\r
+MoreDetails=Más detalles\r
+FewerDetails=Pocos detalles\r
+Details=Detalles\r
+Information=Información\r
+Error=Error\r
+Question=Pregunta\r
+Warning=Advertencia\r
+Exception=Excepción\r
+Choice=Elección\r
+Select=Seleccione\r
+Input=Entrada\r
+ApplicationError=Error de la aplicación\r
+megabytes=Mb\r
+performGC=Ejecutar GC\r
+login=Conexión\r
+name=Nombre\r
+password=Contraseña\r
+rememberPassword=Recordar contraseña\r
+loginFailed=Fallo en la conexión\r
+tipOfTheDay=Consejo diario\r
+didYouKnow=Sabias que...?\r
+showTipAtStartup=Mostrar consejos al inicio\r
+previousTip=<Consejo anterior\r
+nextTip=Siguiente consejo>\r
+choose=Elegir\r
+preferences=Preferencias\r
+validURL=Por favor, introduzca una URL válida\r
+chooseDirectory=Por favor, escoge un directorio\r
+bold=negrita\r
+italic=cursiva
\ No newline at end of file
diff --git a/org.tizen.common.externals/resources/opal_fr_FR.properties b/org.tizen.common.externals/resources/opal_fr_FR.properties
new file mode 100644 (file)
index 0000000..a7ef841
--- /dev/null
@@ -0,0 +1,35 @@
+OK=OK\r
+Cancel=Annuler\r
+Close=Fermer\r
+Yes=Oui\r
+No=Non\r
+MoreDetails=Plus de détails\r
+FewerDetails=Moins de détails\r
+Details=Détails\r
+Information=Information\r
+Error=Erreur\r
+Question=Question\r
+Warning=Avertissement\r
+Exception=Exception\r
+Choice=Choix\r
+Select=Sélection\r
+Input=Entrée\r
+ApplicationError=Erreur applicative\r
+megabytes=Mo\r
+performGC=Lancer le ramasse-miettes (GC)\r
+login=Identification\r
+name=Nom\r
+password=Mot de passe\r
+rememberPassword=Se souvenir de mon mot de passe\r
+loginFailed=Echec de l'authentification\r
+tipOfTheDay=Astuce du jour\r
+didYouKnow=Le savez-vous ?\r
+showTipAtStartup=Afficher les astuces au démarrage\r
+previousTip=< Astuce précédente\r
+nextTip=Astuce suivante >\r
+choose=Choisir\r
+preferences=Préférences\r
+validURL=Merci de saisir une URL valide s'il vous plait\r
+chooseDirectory=Veuillez choisir un répertoire\r
+bold=gras\r
+italic=italique
\ No newline at end of file
diff --git a/org.tizen.common.externals/resources/opal_it_IT.properties b/org.tizen.common.externals/resources/opal_it_IT.properties
new file mode 100644 (file)
index 0000000..189900b
--- /dev/null
@@ -0,0 +1,35 @@
+OK=OK\r
+Cancel=Annulla\r
+Close=Chiudi\r
+Yes=Si\r
+No=No\r
+MoreDetails=Pi\u00F9 Dettagli\r
+FewerDetails=Meno Dettagli\r
+Details=Dettagli\r
+Information=Informazione\r
+Error=Errore\r
+Question=Domanda\r
+Warning=Avvertenza\r
+Exception=Eccezione\r
+Choice=Scelta\r
+Select=Seleziona\r
+Input=Input\r
+ApplicationError=Errore di applicazione\r
+megabytes=Mb\r
+performGC=Perform GC\r
+login=Accesso\r
+name=Nome\r
+password=Password\r
+rememberPassword=Remember password\r
+loginFailed=Login failed\r
+tipOfTheDay=Tip of the day\r
+didYouKnow=Did you know...\r
+showTipAtStartup=Show Tip at startup\r
+previousTip=< Previous Tip\r
+nextTip=Next Tip >\r
+choose=Choose\r
+preferences=Preferences\r
+validURL=Please enter a valid URL\r
+chooseDirectory=Please choose a directory\r
+bold=bold\r
+italic=italic
\ No newline at end of file
diff --git a/org.tizen.common.externals/resources/opal_pl_PL.properties b/org.tizen.common.externals/resources/opal_pl_PL.properties
new file mode 100644 (file)
index 0000000..2d8e8dd
--- /dev/null
@@ -0,0 +1,35 @@
+Ok=OK\r
+Cancel=Anuluj\r
+Close=Zamknij\r
+Yes=Tak\r
+No=Nie\r
+MoreDetails=Więcej szczegółów\r
+FewerDetails=Mniej szczegółów\r
+Details=Szczegóły\r
+Information=Informacja\r
+Error=Błąd\r
+Question=Pytanie\r
+Warning=Ostrzeżenie\r
+Exception=Wyjątek\r
+Choice=Wybór\r
+Select=Wybór\r
+Input=Wprowadzanie\r
+ApplicationError=Błąd aplikacji\r
+megabytes=Mb\r
+performGC=Perform GC\r
+login=Login\r
+name=Name\r
+password=Password\r
+rememberPassword=Remember password\r
+loginFailed=Login failed\r
+tipOfTheDay=Tip of the day\r
+didYouKnow=Did you know...\r
+showTipAtStartup=Show Tip at startup\r
+previousTip=< Previous Tip\r
+nextTip=Next Tip >\r
+choose=Choose\r
+preferences=Preferences\r
+validURL=Please enter a valid URL\r
+chooseDirectory=Please choose a directory\r
+bold=bold\r
+italic=italic
\ No newline at end of file
diff --git a/org.tizen.common.externals/resources/opal_pt_BR.properties b/org.tizen.common.externals/resources/opal_pt_BR.properties
new file mode 100644 (file)
index 0000000..5029102
--- /dev/null
@@ -0,0 +1,35 @@
+Ok=OK\r
+Cancel=Cancelar\r
+Close=Fechar\r
+Yes=Sim\r
+No=Não\r
+MoreDetails=Mais detalhes\r
+FewerDetails=Menos detalhes\r
+Details=Detalhes\r
+Information=Informação\r
+Error=Erro\r
+Question=Questão\r
+Warning=Aviso\r
+Exception=Exceção\r
+Choice=Escolher\r
+Select=Selecionar\r
+Input=Entrar\r
+ApplicationError=Erro da aplicação\r
+megabytes=Mb\r
+performGC=Perform GC\r
+login=Login\r
+name=Name\r
+password=Password\r
+rememberPassword=Remember password\r
+loginFailed=Login failed\r
+tipOfTheDay=Tip of the day\r
+didYouKnow=Did you know...\r
+showTipAtStartup=Show Tip at startup\r
+previousTip=< Previous Tip\r
+nextTip=Next Tip >\r
+choose=Choose\r
+preferences=Preferences\r
+validURL=Please enter a valid URL\r
+chooseDirectory=Please choose a directory\r
+bold=bold\r
+italic=italic
\ No newline at end of file
diff --git a/org.tizen.common.externals/resources/opal_zh_CN.properties b/org.tizen.common.externals/resources/opal_zh_CN.properties
new file mode 100644 (file)
index 0000000..b479add
--- /dev/null
@@ -0,0 +1,35 @@
+Ok=\u786e\u5b9a\r
+Cancel=\u653e\u5f03\r
+Close=\u5173\u95ed\r
+Yes=\u662f\r
+No=\u5426\r
+MoreDetails=\u8be6\u7ec6\u4fe1\u606f\r
+FewerDetails=\u7b80\u660e\u4fe1\u606f\r
+Details=\u4fe1\u606f\r
+Information=\u4fe1\u606f\r
+Error=\u9519\u8bef\r
+Question=\u95ee\u9898\r
+Warning=\u8b66\u544a\r
+Exception=\u5f02\u5e38\r
+Choice=\u9009\u9879\r
+Select=\u9009\u62e9\r
+Input=\u8f93\u5165\r
+ApplicationError=Application Error\r
+megabytes=Mb\r
+performGC=Perform GC\r
+login=Login\r
+name=Name\r
+password=Password\r
+rememberPassword=Remember password\r
+loginFailed=Login failed\r
+tipOfTheDay=Tip of the day\r
+didYouKnow=Did you know...\r
+showTipAtStartup=Show Tip at startup\r
+previousTip=< Previous Tip\r
+nextTip=Next Tip >\r
+choose=Choose\r
+preferences=Preferences\r
+validURL=Please enter a valid URL\r
+chooseDirectory=Please choose a directory\r
+bold=bold\r
+italic=italic
\ No newline at end of file
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/OpalItem.java b/org.tizen.common.externals/src/org/mihalis/opal/OpalItem.java
new file mode 100644 (file)
index 0000000..a06f1de
--- /dev/null
@@ -0,0 +1,158 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal;\r
+\r
+import java.util.Map;\r
+\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.Image;\r
+\r
+/**\r
+ * Instances of this object are items manipulated by the widgets of the Opal Project. These items are highly customizable, you can set :\r
+ * <ul>\r
+ * <li>Background and foreground colors,\r
+ * <li>Font\r
+ * <li>Image\r
+ * <li>Text\r
+ * <li>Height\r
+ * </ul>\r
+ * You can also store data using the <code>setData<code> methods.\r
+ * \r
+ */\r
+public abstract class OpalItem {\r
+\r
+    private Map<String, Object> data;\r
+    private Object datum;\r
+    private Color background;\r
+    private Font font;\r
+    private Color foreground;\r
+    private Image image;\r
+    private String text;\r
+    private int height = -1;\r
+\r
+    /**\r
+     * @return the background color of the item\r
+     */\r
+    public Color getBackground() {\r
+        return this.background;\r
+    }\r
+\r
+    /**\r
+     * @return the the data stored in this item\r
+     */\r
+    public Object getData() {\r
+        return this.datum;\r
+    }\r
+\r
+    /**\r
+     * @param key a key\r
+     * @return the the data stored in this item associated to this key\r
+     */\r
+    public Object getData(final String key) {\r
+        return this.data.get(key);\r
+    }\r
+\r
+    /**\r
+     * @return the font of the item\r
+     */\r
+    public Font getFont() {\r
+        return this.font;\r
+    }\r
+\r
+    /**\r
+     * @return the foreground color of the item\r
+     */\r
+    public Color getForeground() {\r
+        return this.foreground;\r
+    }\r
+\r
+    /**\r
+     * @return the height of the item\r
+     */\r
+    public int getHeight() {\r
+        return this.height;\r
+    }\r
+\r
+    /**\r
+     * @return the image stored in this item\r
+     */\r
+    public Image getImage() {\r
+        return this.image;\r
+    }\r
+\r
+    /**\r
+     * @return the text stored in this item\r
+     */\r
+    public String getText() {\r
+        return this.text;\r
+    }\r
+\r
+    /**\r
+     * @param background set the background color of this item\r
+     */\r
+    public void setBackground(final Color background) {\r
+        this.background = background;\r
+    }\r
+\r
+    /**\r
+     * @param font set the font of this item\r
+     */\r
+    public void setFont(final Font font) {\r
+        this.font = font;\r
+    }\r
+\r
+    /**\r
+     * @param foreground set the foreground color of this item\r
+     */\r
+    public void setForeground(final Color foreground) {\r
+        this.foreground = foreground;\r
+    }\r
+\r
+    /**\r
+     * @param height set the height of this item\r
+     */\r
+    public void setHeight(final int height) {\r
+        this.height = height;\r
+    }\r
+\r
+    /**\r
+     * @param image set the image of this item\r
+     */\r
+    public void setImage(final Image image) {\r
+        this.image = image;\r
+    }\r
+\r
+    /**\r
+     * @param text set the text of this item\r
+     */\r
+    public void setText(final String text) {\r
+        this.text = text;\r
+    }\r
+\r
+    /**\r
+     * @param data set the data stored in this item\r
+     */\r
+    public void setData(final Object data) {\r
+        this.datum = data;\r
+    }\r
+\r
+    /**\r
+     * Store a data associated to a given key in this item\r
+     * \r
+     * @param key key\r
+     * @param value value associated to this key\r
+     */\r
+    public void setData(final String key, final Object value) {\r
+        this.data.put(key, value);\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/angles/AngleSlider.java b/org.tizen.common.externals/src/org/mihalis/opal/angles/AngleSlider.java
new file mode 100644 (file)
index 0000000..bf36ba7
--- /dev/null
@@ -0,0 +1,246 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *     inspired by the Swing AngleSlider by Jeremy (http://javagraphics.blogspot.com/2008/05/angles-need-gui-widget-for-angles.html)\r
+ *******************************************************************************/\r
+package org.mihalis.opal.angles;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.DisposeEvent;\r
+import org.eclipse.swt.events.DisposeListener;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.widgets.Canvas;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class provide a selectable user interface object that can\r
+ * be used to pick angles.\r
+ * <p>\r
+ * <dl>\r
+ * <dt><b>Styles:</b></dt>\r
+ * <dd>BORDER</dd>\r
+ * <dt><b>Events:</b></dt>\r
+ * <dd>Selection</dd>\r
+ * </dl>\r
+ */\r
+public class AngleSlider extends Canvas {\r
+\r
+       private static final int WHOLE_RADIUS = 40;\r
+       private static final int BUTTON_RADIUS = 10;\r
+       private static final int STEP = 5;\r
+\r
+       private final Image backgroundImage;\r
+       private final Image buttonFocus;\r
+       private final Image buttonNoFocus;\r
+       private int selection;\r
+       private final List<SelectionListener> selectionListeners;\r
+       private boolean mousePressed;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent.\r
+        * \r
+        * @param parent a widget which will be the parent of the new instance\r
+        *            (cannot be null)\r
+        * @param style not used\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        */\r
+       public AngleSlider(final Composite parent, final int style) {\r
+               super(parent, style | SWT.DOUBLE_BUFFERED);\r
+\r
+               this.backgroundImage = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/angleBackground.png"));\r
+\r
+               this.buttonFocus = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/angleButtonFocus.png"));\r
+               this.buttonNoFocus = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/angleButtonFocusLost.png"));\r
+\r
+               this.addListener(SWT.Paint, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               paintControl(event);\r
+                       }\r
+               });\r
+\r
+               this.addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent arg0) {\r
+                               SWTGraphicUtil.dispose(AngleSlider.this.backgroundImage);\r
+                               SWTGraphicUtil.dispose(AngleSlider.this.buttonFocus);\r
+                               SWTGraphicUtil.dispose(AngleSlider.this.buttonNoFocus);\r
+                       }\r
+               });\r
+\r
+               this.addListener(SWT.MouseDown, createMouseListener());\r
+               this.addListener(SWT.MouseUp, createMouseListener());\r
+               this.addListener(SWT.MouseMove, createMouseListener());\r
+               this.addListener(SWT.KeyDown, createKeyListener());\r
+\r
+               this.selection = 0;\r
+               this.selectionListeners = new ArrayList<SelectionListener>();\r
+\r
+       }\r
+\r
+       private void paintControl(final Event event) {\r
+               final GC gc = event.gc;\r
+\r
+               gc.drawImage(this.backgroundImage, 0, 0);\r
+\r
+               float angle = this.selection / 360f;\r
+               angle = (float) (angle * 2 * Math.PI - 0.5 * Math.PI);\r
+\r
+               final float centerX = WHOLE_RADIUS / 2f;\r
+               final float centerY = WHOLE_RADIUS / 2f;\r
+               final float radius = BUTTON_RADIUS;\r
+               final float x = (float) (centerX - radius * Math.cos(angle));\r
+               final float y = (float) (centerY - radius * Math.sin(angle));\r
+\r
+               if (isFocusControl()) {\r
+                       gc.drawImage(this.buttonFocus, (int) x - 2, (int) y - 2);\r
+               } else {\r
+                       gc.drawImage(this.buttonNoFocus, (int) x - 2, (int) y - 2);\r
+               }\r
+\r
+               if (!isEnabled()) {\r
+                       gc.setAlpha(127);\r
+                       gc.setAntialias(SWT.ON);\r
+                       gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+                       gc.fillOval(4, 4, WHOLE_RADIUS - 7, WHOLE_RADIUS - 7);\r
+               }\r
+       }\r
+\r
+       private Listener createMouseListener() {\r
+               return new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               if (!isEnabled()) {\r
+                                       return;\r
+                               }\r
+\r
+                               if (event.type == SWT.MouseDown) {\r
+                                       AngleSlider.this.mousePressed = true;\r
+                               }\r
+                               if (event.type == SWT.MouseDown || event.type == SWT.MouseMove && AngleSlider.this.mousePressed) {\r
+                                       final float deltaX = event.x - WHOLE_RADIUS / 2f;\r
+                                       final float deltaY = event.y - WHOLE_RADIUS / 2f;\r
+                                       final double angle = Math.atan2(deltaX, deltaY);\r
+                                       AngleSlider.this.selection = 360 - (int) (360 * angle / (2 * Math.PI) + 360) % 360;\r
+\r
+                                       AngleSlider.this.redraw();\r
+                               }\r
+                               if (event.type == SWT.MouseUp) {\r
+                                       AngleSlider.this.mousePressed = false;\r
+                                       fireSelectionListeners(event);\r
+                               }\r
+                       }\r
+               };\r
+       }\r
+\r
+       private void fireSelectionListeners(final Event event) {\r
+               for (final SelectionListener selectionListener : this.selectionListeners) {\r
+                       selectionListener.widgetSelected(new SelectionEvent(event));\r
+               }\r
+\r
+       }\r
+\r
+       private Listener createKeyListener() {\r
+               return new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               if (!isEnabled()) {\r
+                                       return;\r
+                               }\r
+                               if (event.type != SWT.KeyDown) {\r
+                                       return;\r
+                               }\r
+                               if (event.keyCode == SWT.ARROW_UP || event.keyCode == SWT.ARROW_LEFT) {\r
+                                       setSelection(AngleSlider.this.selection + STEP);\r
+                               }\r
+                               if (event.keyCode == SWT.ARROW_DOWN || event.keyCode == SWT.ARROW_RIGHT) {\r
+                                       setSelection(AngleSlider.this.selection - STEP);\r
+                               }\r
+                       }\r
+               };\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Scale#addSelectionListener(org.eclipse.swt.events.SelectionListener)\r
+        */\r
+       public void addSelectionListener(final SelectionListener selectionListener) {\r
+               checkWidget();\r
+               this.selectionListeners.add(selectionListener);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Composite#computeSize(int, int, boolean)\r
+        */\r
+       @Override\r
+       public Point computeSize(final int wHint, final int hHint, final boolean changed) {\r
+               checkWidget();\r
+               return new Point(WHOLE_RADIUS, WHOLE_RADIUS);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Scale#getSelection()\r
+        */\r
+       public int getSelection() {\r
+               checkWidget();\r
+               return this.selection;\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Scale#removeSelectionListener(org.eclipse.swt.events.SelectionListener)\r
+        */\r
+       public void removeSelectionListener(final SelectionListener selectionListener) {\r
+               checkWidget();\r
+               this.selectionListeners.remove(selectionListener);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Control#setEnabled(boolean)\r
+        */\r
+       @Override\r
+       public void setEnabled(final boolean enabled) {\r
+               super.setEnabled(enabled);\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Scale#setSelection(int)\r
+        */\r
+       public void setSelection(final int selection) {\r
+               checkWidget();\r
+               if (selection < 0 || selection > 360) {\r
+                       SWT.error(SWT.ERROR_CANNOT_SET_SELECTION);\r
+               }\r
+               this.selection = selection;\r
+               fireSelectionListeners(new Event());\r
+               redraw();\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/brushedMetalComposite/BrushedMetalComposite.java b/org.tizen.common.externals/src/org/mihalis/opal/brushedMetalComposite/BrushedMetalComposite.java
new file mode 100644 (file)
index 0000000..893b8c6
--- /dev/null
@@ -0,0 +1,378 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Jerry Huxtable (http://www.jhlabs.com/index.html) - initial API and implementation (on SWING), \r
+ *     Laurent CARON (laurent.caron at gmail dot com) - port to SWT\r
+ *******************************************************************************/\r
+package org.mihalis.opal.brushedMetalComposite;\r
+\r
+import java.util.Random;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.DisposeEvent;\r
+import org.eclipse.swt.events.DisposeListener;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.ImageData;\r
+import org.eclipse.swt.graphics.PaletteData;\r
+import org.eclipse.swt.graphics.RGB;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Widget;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class are controls which background's texture is brushed\r
+ * metal "a la Mac"\r
+ */\r
+public class BrushedMetalComposite extends Composite {\r
+\r
+       private Image oldImage;\r
+       private int radius = 10;\r
+       private float amount = 0.1f;\r
+       private int color = 0xff888888;\r
+       private float shine = 0.1f;\r
+       private boolean monochrome = true;\r
+       private Random randomNumbers;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a widget which will be the parent of the new instance\r
+        *            (cannot be null)\r
+        * @param style the style of widget to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        * @see Composite#Composite(Composite, int)\r
+        * @see SWT#NO_BACKGROUND\r
+        * @see SWT#NO_FOCUS\r
+        * @see SWT#NO_MERGE_PAINTS\r
+        * @see SWT#NO_REDRAW_RESIZE\r
+        * @see SWT#NO_RADIO_GROUP\r
+        * @see SWT#EMBEDDED\r
+        * @see SWT#DOUBLE_BUFFERED\r
+        * @see Widget#getStyle\r
+        */\r
+       public BrushedMetalComposite(final Composite parent, final int style) {\r
+               super(parent, style);\r
+               this.addListener(SWT.Resize, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               BrushedMetalComposite.this.redrawComposite();\r
+                       }\r
+               });\r
+\r
+               parent.addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent e) {\r
+                               SWTGraphicUtil.dispose(BrushedMetalComposite.this.oldImage);\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * Redraws the composite\r
+        */\r
+       private void redrawComposite() {\r
+               final Display display = this.getDisplay();\r
+               final Rectangle rect = this.getClientArea();\r
+               final ImageData imageData = this.drawBrushedMetalBackground(Math.max(1, rect.width), Math.max(1, rect.width));\r
+               final Image newImage = new Image(display, imageData);\r
+\r
+               this.setBackgroundImage(newImage);\r
+               SWTGraphicUtil.dispose(this.oldImage);\r
+               this.oldImage = newImage;\r
+       }\r
+\r
+       /**\r
+        * Create a brushed metal background\r
+        * \r
+        * @param width width of the panel\r
+        * @param height height of the panel\r
+        * @return an image data that contains the background\r
+        */\r
+       private ImageData drawBrushedMetalBackground(final int width, final int height) {\r
+\r
+               final int[] inPixels = new int[width];\r
+               final PaletteData palette = new PaletteData(0xFF0000, 0x00FF00, 0x0000FF);\r
+               final ImageData data = new ImageData(width, height, 0x20, palette);\r
+\r
+               this.randomNumbers = new Random(0);\r
+               final int a = this.color & 0xff000000;\r
+               final int r = this.color >> 16 & 0xff;\r
+               final int g = this.color >> 8 & 0xff;\r
+               final int b = this.color & 0xff;\r
+               for (int y = 0; y < height; y++) {\r
+                       for (int x = 0; x < width; x++) {\r
+                               int tr = r;\r
+                               int tg = g;\r
+                               int tb = b;\r
+                               if (this.shine != 0) {\r
+                                       final int f = (int) (255 * this.shine * Math.sin((double) x / width * Math.PI));\r
+                                       tr += f;\r
+                                       tg += f;\r
+                                       tb += f;\r
+                               }\r
+                               if (this.monochrome) {\r
+                                       final int n = (int) (255 * (2 * this.randomNumbers.nextFloat() - 1) * this.amount);\r
+                                       inPixels[x] = a | this.clamp(tr + n) << 16 | this.clamp(tg + n) << 8 | this.clamp(tb + n);\r
+                               } else {\r
+                                       inPixels[x] = a | this.random(tr) << 16 | this.random(tg) << 8 | this.random(tb);\r
+                               }\r
+                       }\r
+\r
+                       if (this.radius != 0) {\r
+                               this.setDataElements(data, palette, 0, y, width, 1, this.blur(inPixels, width, this.radius));\r
+                       } else {\r
+                               this.setDataElements(data, palette, 0, y, width, 1, inPixels);\r
+                       }\r
+               }\r
+\r
+               return data;\r
+       }\r
+\r
+       /**\r
+        * Sets the data for a rectangle of pixels from a primitive array\r
+        * \r
+        * @param data the source ImageData\r
+        * @param palette the palette associated to the imageData\r
+        * @param posX The X coordinate of the upper left pixel location.\r
+        * @param posY The Y coordinate of the upper left pixel location.\r
+        * @param width Width of the pixel rectangle.\r
+        * @param height Height of the pixel rectangle\r
+        * @param pixels An array containing the pixel data to place between x,y and\r
+        *            x+w-1, y+h-1.\r
+        */\r
+       private void setDataElements(final ImageData data, final PaletteData palette, final int posX, final int posY, final int width, final int height, final int[] pixels) {\r
+               int cpt = 0;\r
+               for (int y = posY; y < posY + height; y++) {\r
+                       for (int x = posX; x < posX + width; x++) {\r
+                               final int rgb = pixels[cpt++];\r
+                               final int pixel = palette.getPixel(new RGB(rgb >> 16 & 0xFF, rgb >> 8 & 0xFF, rgb & 0xFF));\r
+                               data.setPixel(x, y, pixel);\r
+                               data.setAlpha(x, y, rgb >> 24 & 0xFF);\r
+                       }\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Add a random number to the value. The result is between 0 and 255\r
+        * \r
+        * @param x the initial value\r
+        * @return\r
+        */\r
+       private int random(int x) {\r
+               x += (int) (255 * (2 * this.randomNumbers.nextFloat() - 1) * this.amount);\r
+               if (x < 0) {\r
+                       x = 0;\r
+               } else if (x > 0xff) {\r
+                       x = 0xff;\r
+               }\r
+               return x;\r
+       }\r
+\r
+       /**\r
+        * Clamp a number between 0 and 255\r
+        * \r
+        * @param c the number to clamp\r
+        * @return the number. If c is negative, returns 0. If c is greater than\r
+        *         255, returns 255.\r
+        */\r
+       private int clamp(final int c) {\r
+               if (c < 0) {\r
+                       return 0;\r
+               }\r
+\r
+               if (c > 255) {\r
+                       return 255;\r
+               }\r
+\r
+               return c;\r
+       }\r
+\r
+       /**\r
+        * Apply a blur filter to an array of int that represents and image which\r
+        * size is width columns * 1 row\r
+        * \r
+        * @param in the array of int that represents the image\r
+        * @param width the width of the image\r
+        * @param radius the "radius" blur parameter\r
+        */\r
+       private int[] blur(final int[] in, final int width, final int radius) {\r
+               final int[] out = new int[width];\r
+               final int widthMinus1 = width - 1;\r
+               final int r2 = 2 * radius + 1;\r
+               int tr = 0, tg = 0, tb = 0;\r
+\r
+               for (int i = -radius; i <= radius; i++) {\r
+                       final int rgb = in[this.mod(i, width)];\r
+                       tr += rgb >> 16 & 0xff;\r
+                       tg += rgb >> 8 & 0xff;\r
+                       tb += rgb & 0xff;\r
+               }\r
+\r
+               for (int x = 0; x < width; x++) {\r
+                       out[x] = 0xff000000 | tr / r2 << 16 | tg / r2 << 8 | tb / r2;\r
+\r
+                       int i1 = x + radius + 1;\r
+                       if (i1 > widthMinus1) {\r
+                               i1 = this.mod(i1, width);\r
+                       }\r
+                       int i2 = x - radius;\r
+                       if (i2 < 0) {\r
+                               i2 = this.mod(i2, width);\r
+                       }\r
+                       final int rgb1 = in[i1];\r
+                       final int rgb2 = in[i2];\r
+\r
+                       tr += (rgb1 & 0xff0000) - (rgb2 & 0xff0000) >> 16;\r
+                       tg += (rgb1 & 0xff00) - (rgb2 & 0xff00) >> 8;\r
+                       tb += (rgb1 & 0xff) - (rgb2 & 0xff);\r
+               }\r
+               return out;\r
+       }\r
+\r
+       /**\r
+        * Return a mod b. This differs from the % operator with respect to negative\r
+        * numbers.\r
+        * \r
+        * @param a the dividend\r
+        * @param b the divisor\r
+        * @return a mod b\r
+        */\r
+       private int mod(int a, final int b) {\r
+               final int n = a / b;\r
+\r
+               a -= n * b;\r
+               if (a < 0) {\r
+                       return a + b;\r
+               }\r
+               return a;\r
+       }\r
+\r
+       // ------------------------------------ Getters and Setters\r
+\r
+       /**\r
+        * @return the "radius" of the blur\r
+        */\r
+       public int getRadius() {\r
+               return this.radius;\r
+       }\r
+\r
+       /**\r
+        * @param radius the "radius" of the blur\r
+        */\r
+       public void setRadius(final int radius) {\r
+               this.radius = radius;\r
+               this.redrawComposite();\r
+       }\r
+\r
+       /**\r
+        * @return the amount of noise to add\r
+        */\r
+       public float getAmount() {\r
+               return this.amount;\r
+       }\r
+\r
+       /**\r
+        * @param amount the amount of noise to add\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the value is not between 0\r
+        *                and 1 inclusive</li>\r
+        *                </ul>\r
+        */\r
+       public void setAmount(final float amount) {\r
+               if (amount < 0f || amount > 1f) {\r
+                       SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+               }\r
+               this.amount = amount;\r
+               this.redrawComposite();\r
+       }\r
+\r
+       /**\r
+        * @return the color of the metal. Please notice that this color is a new\r
+        *         SWT object, so it has to be disposed !\r
+        */\r
+       public Color getColor() {\r
+               return new Color(this.getDisplay(), this.color >> 16 & 0xFF, this.color >> 8 & 0xFF, this.color & 0xFF);\r
+       }\r
+\r
+       /**\r
+        * @param color the color to set\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the value is null</li>\r
+        *                </ul>\r
+        */\r
+       public void setColor(final Color color) {\r
+               if (color == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               this.color = 0xFF << 24 | color.getRed() << 16 | color.getGreen() << 8 | color.getBlue();\r
+               this.redrawComposite();\r
+       }\r
+\r
+       /**\r
+        * @return the shine to add\r
+        */\r
+       public float getShine() {\r
+               return this.shine;\r
+       }\r
+\r
+       /**\r
+        * @param shine the shine to set\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the value is not between 0\r
+        *                and 1 inclusive</li>\r
+        *                </ul>\r
+        */\r
+       public void setShine(final float shine) {\r
+               if (this.amount < 0f || this.amount > 1f) {\r
+                       SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+               }\r
+               this.shine = shine;\r
+               this.redrawComposite();\r
+       }\r
+\r
+       /**\r
+        * @return the monochrome\r
+        */\r
+       public boolean isMonochrome() {\r
+               return this.monochrome;\r
+       }\r
+\r
+       /**\r
+        * @param monochrome the monochrome to set\r
+        */\r
+       public void setMonochrome(final boolean monochrome) {\r
+               this.monochrome = monochrome;\r
+               this.redrawComposite();\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/checkBoxGroup/CheckBoxGroup.java b/org.tizen.common.externals/src/org/mihalis/opal/checkBoxGroup/CheckBoxGroup.java
new file mode 100644 (file)
index 0000000..d8ec1e3
--- /dev/null
@@ -0,0 +1,323 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.checkBoxGroup;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Layout;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Widget;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class provide an etched border with a title and a checkbox.\r
+ * If the checkbox is checked, the content of the composite is enabled. If the\r
+ * checkbox is unchecked, the content of the composite is disabled, thus not\r
+ * editable.\r
+ * <p>\r
+ * <dl>\r
+ * <dt><b>Styles:</b></dt>\r
+ * <dd>BORDER</dd>\r
+ * <dt><b>Events:</b></dt>\r
+ * <dd>(none)</dd>\r
+ * </dl>\r
+ */\r
+public class CheckBoxGroup extends Composite {\r
+       private Image oldImage;\r
+       protected final Button button;\r
+       private final Composite content;\r
+       private final List<SelectionListener> selectionListeners;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a widget which will be the parent of the new instance\r
+        *            (cannot be null)\r
+        * @param style the style of widget to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        * @see Composite#Composite(Composite, int)\r
+        * @see SWT#BORDER\r
+        * @see Widget#getStyle\r
+        */\r
+       public CheckBoxGroup(final Composite parent, final int style) {\r
+               super(parent, style);\r
+               super.setLayout(new GridLayout());\r
+               this.selectionListeners = new ArrayList<SelectionListener>();\r
+\r
+               this.button = new Button(this, SWT.CHECK);\r
+               final GridData gdButton = new GridData(GridData.BEGINNING, GridData.CENTER, true, false);\r
+               gdButton.horizontalIndent = 15;\r
+               this.button.setLayoutData(gdButton);\r
+               this.button.setSelection(true);\r
+               this.button.setBackground(this.getBackground());\r
+               this.button.pack();\r
+\r
+               this.button.addSelectionListener(new SelectionAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                        */\r
+                       @Override\r
+                       public void widgetSelected(final SelectionEvent e) {\r
+                               e.doit = fireSelectionListeners(e);\r
+                               if (!e.doit) {\r
+                                       return;\r
+                               }\r
+                               if (CheckBoxGroup.this.button.getSelection()) {\r
+                                       CheckBoxGroup.this.activate();\r
+                               } else {\r
+                                       CheckBoxGroup.this.deactivate();\r
+                               }\r
+                       }\r
+               });\r
+\r
+               this.content = new Composite(this, SWT.NONE);\r
+               this.content.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));\r
+\r
+               this.addListener(SWT.Resize, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               CheckBoxGroup.this.drawWidget();\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Fire the selection listeners\r
+        * \r
+        * @param selectionEvent mouse event\r
+        * @return true if the selection could be changed, false otherwise\r
+        */\r
+       private boolean fireSelectionListeners(final SelectionEvent selectionEvent) {\r
+               selectionEvent.widget = this;\r
+               for (final SelectionListener listener : this.selectionListeners) {\r
+                       listener.widgetSelected(selectionEvent);\r
+                       if (!selectionEvent.doit) {\r
+                               return false;\r
+                       }\r
+               }\r
+               return true;\r
+       }\r
+\r
+       /**\r
+        * Draws the widget\r
+        */\r
+       private void drawWidget() {\r
+               final Display display = this.getDisplay();\r
+               final Rectangle rect = this.getClientArea();\r
+               final Image newImage = new Image(display, Math.max(1, rect.width), Math.max(1, rect.height));\r
+\r
+               final GC gc = new GC(newImage);\r
+               gc.setBackground(this.getBackground());\r
+\r
+               gc.fillRectangle(0, 0, rect.width, rect.height);\r
+\r
+               final int margin = (int) (this.button.getSize().y * 1.5);\r
+               final int startY = margin / 2;\r
+\r
+               gc.setForeground(this.getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW));\r
+               gc.drawRoundRectangle(1, startY, rect.width - 2, rect.height - startY - 2, 2, 2);\r
+\r
+               gc.setForeground(this.getDisplay().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\r
+               gc.drawRoundRectangle(2, startY + 1, rect.width - 4, rect.height - startY - 4, 2, 2);\r
+\r
+               gc.dispose();\r
+\r
+               this.setBackgroundImage(newImage);\r
+               if (this.oldImage != null) {\r
+                       this.oldImage.dispose();\r
+               }\r
+               this.oldImage = newImage;\r
+\r
+       }\r
+\r
+       /**\r
+        * Activate the content\r
+        */\r
+       public void activate() {\r
+               this.button.setSelection(true);\r
+               SWTGraphicUtil.enable(this.content, true);\r
+       }\r
+\r
+       /**\r
+        * Adds the listener to the collection of listeners who will be notified\r
+        * when the user changes the receiver's selection, by sending it one of the\r
+        * messages defined in the <code>SelectionListener</code> interface.\r
+        * <p>\r
+        * When <code>widgetSelected</code> is called, the item field of the event\r
+        * object is valid. If the receiver has the <code>SWT.CHECK</code> style and\r
+        * the check selection changes, the event object detail field contains the\r
+        * value <code>SWT.CHECK</code>. <code>widgetDefaultSelected</code> is\r
+        * typically called when an item is double-clicked. The item field of the\r
+        * event object is valid for default selection, but the detail field is not\r
+        * used.\r
+        * </p>\r
+        * \r
+        * @param listener the listener which should be notified when the user\r
+        *            changes the receiver's selection\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see SelectionListener\r
+        * @see #removeSelectionListener\r
+        * @see SelectionEvent\r
+        */\r
+       public void addSelectionListener(final SelectionListener listener) {\r
+               checkWidget();\r
+               this.selectionListeners.add(listener);\r
+       }\r
+\r
+       /**\r
+        * Deactivate the content\r
+        */\r
+       public void deactivate() {\r
+               this.button.setSelection(false);\r
+               SWTGraphicUtil.enable(this.content, false);\r
+       }\r
+\r
+       /**\r
+        * @return <code>true</code> if the content is activated, <code>false</code>\r
+        *         otherwise\r
+        */\r
+       public boolean isActivated() {\r
+               return this.button.getSelection();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Composite#getLayout()\r
+        */\r
+       @Override\r
+       public Layout getLayout() {\r
+               return this.content.getLayout();\r
+       }\r
+\r
+       /**\r
+        * Removes the listener from the collection of listeners who will be\r
+        * notified when the user changes the receiver's selection.\r
+        * \r
+        * @param listener the listener which should no longer be notified\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see SelectionListener\r
+        * @see #addSelectionListener\r
+        */\r
+       public void removeSelectionListener(final SelectionListener listener) {\r
+               checkWidget();\r
+               this.selectionListeners.remove(listener);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Composite#setFocus()\r
+        */\r
+       @Override\r
+       public boolean setFocus() {\r
+               return this.content.setFocus();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Composite#setLayout(org.eclipse.swt.widgets.Layout)\r
+        */\r
+       @Override\r
+       public void setLayout(final Layout layout) {\r
+               this.content.setLayout(layout);\r
+       }\r
+\r
+       // ------------------------------------ Getters and Setters\r
+\r
+       /**\r
+        * @return the text of the button\r
+        */\r
+       public String getText() {\r
+               return this.button.getText();\r
+       }\r
+\r
+       /**\r
+        * @param text the text of the button to set\r
+        */\r
+       public void setText(final String text) {\r
+               this.button.setText(text);\r
+       }\r
+\r
+       /**\r
+        * @return the font of the button\r
+        */\r
+       @Override\r
+       public Font getFont() {\r
+               return this.button.getFont();\r
+       }\r
+\r
+       /**\r
+        * @param font the font to set\r
+        */\r
+       @Override\r
+       public void setFont(final Font font) {\r
+               this.button.setFont(font);\r
+       }\r
+\r
+       /**\r
+        * @return the content of the group\r
+        */\r
+       public Composite getContent() {\r
+               return this.content;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/columns/ColumnBrowserWidget.java b/org.tizen.common.externals/src/org/mihalis/opal/columns/ColumnBrowserWidget.java
new file mode 100755 (executable)
index 0000000..991f6a2
--- /dev/null
@@ -0,0 +1,785 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.columns;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Collections;\r
+import java.util.Iterator;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.custom.ScrolledComposite;\r
+import org.eclipse.swt.events.DisposeEvent;\r
+import org.eclipse.swt.events.DisposeListener;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Cursor;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.layout.RowData;\r
+import org.eclipse.swt.layout.RowLayout;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Menu;\r
+import org.eclipse.swt.widgets.Table;\r
+import org.eclipse.swt.widgets.TableColumn;\r
+import org.eclipse.swt.widgets.TableItem;\r
+import org.eclipse.swt.widgets.Widget;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class provide a data browser similar to the ones used in\r
+ * Mac OS X. Look at http://en.wikipedia.org/wiki/Miller_Columns\r
+ * <p>\r
+ * <dl>\r
+ * <dt><b>Styles:</b></dt>\r
+ * <dd>BORDER</dd>\r
+ * <dt><b>Events:</b></dt>\r
+ * <dd>Selection</dd>\r
+ * </dl>\r
+ */\r
+public class ColumnBrowserWidget extends ScrolledComposite {\r
+\r
+       private final List<Table> columns;\r
+       private final Composite composite;\r
+       private final Image columnArrow;\r
+       private final List<SelectionListener> selectionListeners;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a widget which will be the parent of the new instance\r
+        *            (cannot be null)\r
+        * @param style the style of widget to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        * @see Composite#Composite(Composite, int)\r
+        * @see SWT#BORDER\r
+        * @see Widget#getStyle\r
+        */\r
+       public ColumnBrowserWidget(final Composite parent, final int style) {\r
+               super(parent, style | SWT.H_SCROLL | SWT.V_SCROLL);\r
+\r
+               this.composite = new Composite(this, SWT.NONE);\r
+               final RowLayout layout = new RowLayout(SWT.HORIZONTAL);\r
+               layout.spacing = 1;\r
+               layout.pack = false;\r
+               this.composite.setLayout(layout);\r
+\r
+               this.columnArrow = SWTGraphicUtil.createImage("images/columnArrow.png");\r
+\r
+               this.columns = new ArrayList<Table>();\r
+               for (int i = 0; i < 3; i++) {\r
+                       this.createTable();\r
+               }\r
+\r
+               // Store root\r
+               this.columns.get(0).setData(new ColumnItem(this));\r
+\r
+               this.setContent(this.composite);\r
+               this.setExpandHorizontal(true);\r
+               this.setExpandVertical(true);\r
+               this.setShowFocusedControl(true);\r
+               this.updateContent();\r
+               this.setMinSize(this.composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r
+\r
+               this.selectionListeners = new ArrayList<SelectionListener>();\r
+\r
+               this.addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent arg0) {\r
+                               SWTGraphicUtil.dispose(ColumnBrowserWidget.this.columnArrow);\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Create a column that displays data\r
+        */\r
+       private void createTable() {\r
+               final Table table = new Table(this.composite, SWT.SINGLE | SWT.H_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);\r
+               new TableColumn(table, SWT.LEFT);\r
+\r
+               table.setLayoutData(new RowData(150, 175));\r
+               this.columns.add(table);\r
+\r
+               table.addListener(SWT.Resize, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               final int width = table.getSize().x;\r
+                               table.getColumn(0).setWidth(width - 5);\r
+                       }\r
+               });\r
+\r
+               table.addListener(SWT.Selection, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               final Table table = (Table) event.widget;\r
+                               if (table.getSelection() == null || table.getSelection().length != 1) {\r
+                                       return;\r
+                               }\r
+                               ColumnBrowserWidget.this.selectItem(table.getSelection()[0]);\r
+                       }\r
+               });\r
+\r
+               final Listener paintListener = new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               switch (event.type) {\r
+                               case SWT.MeasureItem: {\r
+                                       final Rectangle rect = ColumnBrowserWidget.this.columnArrow.getBounds();\r
+                                       event.width += rect.width;\r
+                                       event.height = Math.max(event.height, rect.height + 2);\r
+                                       break;\r
+                               }\r
+\r
+                               case SWT.PaintItem: {\r
+                                       if (!(event.item instanceof TableItem)) {\r
+                                               return;\r
+                                       }\r
+                                       final TableItem item = (TableItem) event.item;\r
+                                       if (item.getData() == null) {\r
+                                               return;\r
+                                       }\r
+\r
+                                       if (((ColumnItem) item.getData()).getItemCount() == 0) {\r
+                                               return;\r
+                                       }\r
+\r
+                                       final int x = event.x + event.width;\r
+                                       final Rectangle rect = ColumnBrowserWidget.this.columnArrow.getBounds();\r
+                                       final int offset = Math.max(0, (event.height - rect.height) / 2);\r
+                                       event.gc.drawImage(ColumnBrowserWidget.this.columnArrow, x, event.y + offset);\r
+                                       break;\r
+                               }\r
+                               default:\r
+                                   break;\r
+                               }\r
+                       }\r
+               };\r
+               table.addListener(SWT.MeasureItem, paintListener);\r
+               table.addListener(SWT.PaintItem, paintListener);\r
+\r
+               table.addSelectionListener(new SelectionListener() {\r
+\r
+                       @Override\r
+                       public void widgetSelected(final SelectionEvent e) {\r
+                               ColumnBrowserWidget.this.fireSelectionListeners(e);\r
+                       }\r
+\r
+                       @Override\r
+                       public void widgetDefaultSelected(final SelectionEvent e) {\r
+                               ColumnBrowserWidget.this.fireSelectionListeners(e);\r
+                       }\r
+               });\r
+\r
+               if (super.getBackground() != null && super.getBackground().getRed() != 240 && super.getBackground().getGreen() != 240 && super.getBackground().getBlue() != 240) {\r
+                       table.setBackground(super.getBackground());\r
+               }\r
+               table.setBackgroundImage(super.getBackgroundImage());\r
+               table.setBackgroundMode(super.getBackgroundMode());\r
+               table.setCursor(super.getCursor());\r
+               table.setFont(super.getFont());\r
+               table.setForeground(super.getForeground());\r
+               table.setMenu(super.getMenu());\r
+               table.setToolTipText(super.getToolTipText());\r
+\r
+       }\r
+\r
+       /**\r
+        * Fire the selection listeners\r
+        * \r
+        * @param selectionEvent mouse event\r
+        * @return true if the selection could be changed, false otherwise\r
+        */\r
+       private boolean fireSelectionListeners(final SelectionEvent selectionEvent) {\r
+               for (final SelectionListener listener : this.selectionListeners) {\r
+                       final Event event = new Event();\r
+\r
+                       event.button = 0;\r
+                       event.display = this.getDisplay();\r
+                       event.item = null;\r
+                       event.widget = this;\r
+                       event.data = null;\r
+                       event.time = selectionEvent.time;\r
+                       event.x = selectionEvent.x;\r
+                       event.y = selectionEvent.y;\r
+\r
+                       final SelectionEvent selEvent = new SelectionEvent(event);\r
+                       listener.widgetSelected(selEvent);\r
+                       if (!selEvent.doit) {\r
+                               return false;\r
+                       }\r
+               }\r
+               return true;\r
+       }\r
+\r
+       /**\r
+        * Perform actions when an item is selected (ie fill the next column and\r
+        * force focus on it)\r
+        * \r
+        * @param tableItem selected item\r
+        */\r
+       private void selectItem(final TableItem tableItem) {\r
+               final ColumnItem c = (ColumnItem) tableItem.getData();\r
+\r
+               if (c.getItemCount() == 0) {\r
+                       return;\r
+               }\r
+\r
+               final int selectedColumn = this.findSelectedColumn(tableItem);\r
+               boolean needPacking = false;\r
+               if (selectedColumn != this.columns.size() - 1) {\r
+                       for (int i = selectedColumn + 1; i < this.columns.size(); i++) {\r
+                               this.columns.get(i).setData(null);\r
+                               this.columns.get(i).deselectAll();\r
+                       }\r
+\r
+                       int i = 0;\r
+                       final Iterator<Table> it = this.columns.iterator();\r
+                       while (it.hasNext()) {\r
+                               final Table t = it.next();\r
+                               if (i >= 3) {\r
+                                       t.dispose();\r
+                                       it.remove();\r
+                                       // Don't know why, it's not working if I do not include this\r
+                                       // :(\r
+                                       this.setMinSize(this.composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r
+                               }\r
+                               i++;\r
+                       }\r
+\r
+                       if (selectedColumn != this.columns.size() - 1) {\r
+                               this.columns.get(selectedColumn + 1).setData(c);\r
+                       } else {\r
+                               this.createTable();\r
+                               this.columns.get(this.columns.size() - 1).setData(c);\r
+                       }\r
+                       needPacking = true;\r
+\r
+               } else {\r
+                       this.createTable();\r
+                       needPacking = true;\r
+                       this.columns.get(this.columns.size() - 1).setData(c);\r
+               }\r
+               this.updateContent();\r
+               if (needPacking) {\r
+                       this.composite.pack();\r
+                       this.setMinSize(this.composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r
+               }\r
+               this.columns.get(this.columns.size() - 1).forceFocus();\r
+       }\r
+\r
+       /**\r
+        * Find which column has been selected\r
+        * \r
+        * @param tableItem selected table item\r
+        * @return the index of the selected column\r
+        */\r
+       private int findSelectedColumn(final TableItem tableItem) {\r
+               for (int i = 0; i < this.columns.size(); i++) {\r
+                       if (this.columns.get(i).equals(tableItem.getParent())) {\r
+                               return i;\r
+                       }\r
+               }\r
+               return -1;\r
+       }\r
+\r
+       /**\r
+        * Update the content of the widget\r
+        */\r
+       void updateContent() {\r
+               if (this.columns == null) {\r
+                       return;\r
+               }\r
+\r
+               for (int i = 0; i < this.columns.size(); i++) {\r
+\r
+                       final Table table = this.columns.get(i);\r
+                       final int index = table.getSelectionIndex();\r
+                       table.removeAll();\r
+                       if (table.getData() == null) {\r
+                               continue;\r
+                       }\r
+                       for (final ColumnItem c : ((ColumnItem) table.getData()).getItems()) {\r
+                               final TableItem item = new TableItem(table, SWT.NONE);\r
+                               item.setData(c);\r
+                               if (c.getText() != null) {\r
+                                       item.setText(c.getText());\r
+                               }\r
+                               if (c.getImage() != null) {\r
+                                       item.setImage(c.getImage());\r
+                               }\r
+                       }\r
+                       table.setSelection(index);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Adds the listener to the collection of listeners who will be notified\r
+        * when the user changes the receiver's selection, by sending it one of the\r
+        * messages defined in the <code>SelectionListener</code> interface.\r
+        * <p>\r
+        * When <code>widgetSelected</code> is called, the item field of the event\r
+        * object is valid. If the receiver has the <code>SWT.CHECK</code> style and\r
+        * the check selection changes, the event object detail field contains the\r
+        * value <code>SWT.CHECK</code>. <code>widgetDefaultSelected</code> is\r
+        * typically called when an item is double-clicked. The item field of the\r
+        * event object is valid for default selection, but the detail field is not\r
+        * used.\r
+        * </p>\r
+        * \r
+        * @param listener the listener which should be notified when the user\r
+        *            changes the receiver's selection\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see SelectionListener\r
+        * @see #removeSelectionListener\r
+        * @see SelectionEvent\r
+        */\r
+       public void addSelectionListener(final SelectionListener listener) {\r
+               checkWidget();\r
+               this.selectionListeners.add(listener);\r
+       }\r
+\r
+       /**\r
+        * Clear the selection\r
+        * \r
+        * @param needPacking if <code>true</code>, the widget is packed\r
+        */\r
+       public void clear(final boolean needPacking) {\r
+               final Iterator<Table> it = this.columns.iterator();\r
+               int i = 0;\r
+               while (it.hasNext()) {\r
+                       final Table t = it.next();\r
+                       if (i >= 3) {\r
+                               t.dispose();\r
+                               it.remove();\r
+                       } else {\r
+                               if (i != 0) {\r
+                                       t.setData(null);\r
+                               }\r
+                               t.deselectAll();\r
+                       }\r
+                       i++;\r
+               }\r
+               this.updateContent();\r
+               if (needPacking) {\r
+                       this.composite.pack();\r
+                       this.setMinSize(this.composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r
+               }\r
+               this.columns.get(0).forceFocus();\r
+       }\r
+\r
+       /**\r
+        * Returns the <code>ColumnItem</code>s that is currently selected in the\r
+        * receiver.\r
+        * \r
+        * @return the selected item, or <code>null</code> if no one is selected\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public ColumnItem getSelection() {\r
+               for (int i = this.columns.size() - 1; i >= 0; i--) {\r
+                       final Table table = this.columns.get(i);\r
+                       if (table == null || table.getData() == null || table.getSelection().length == 0) {\r
+                               continue;\r
+                       }\r
+\r
+                       return (ColumnItem) table.getItem(table.getSelectionIndex()).getData();\r
+\r
+               }\r
+               return null;\r
+       }\r
+\r
+       /**\r
+        * Removes the listener from the collection of listeners who will be\r
+        * notified when the user changes the receiver's selection.\r
+        * \r
+        * @param listener the listener which should no longer be notified\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see SelectionListener\r
+        * @see #addSelectionListener\r
+        */\r
+       public void removeSelectionListener(final SelectionListener listener) {\r
+               checkWidget();\r
+               this.selectionListeners.remove(listener);\r
+       }\r
+\r
+       /**\r
+        * Selects an item in the receiver. If the item was already selected, it\r
+        * remains selected.\r
+        * \r
+        * @param item the item to be selected\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the item is null</li>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the item has been disposed\r
+        *                </li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void select(final ColumnItem item) {\r
+\r
+               final List<ColumnItem> items = new ArrayList<ColumnItem>();\r
+               this.findElement(item, items);\r
+               Collections.reverse(items);\r
+               if (items.isEmpty()) {\r
+                       return;\r
+               }\r
+\r
+               this.clear(false);\r
+               for (int i = 3; i < items.size(); i++) {\r
+                       this.createTable();\r
+               }\r
+               for (int i = 0; i < items.size() - 1; i++) {\r
+                       this.columns.get(i + 1).setData(items.get(i));\r
+               }\r
+               this.updateContent();\r
+\r
+               for (int i = 0; i < this.columns.size() - 1; i++) {\r
+                       final ColumnItem nextItem = (ColumnItem) this.columns.get(i + 1).getData();\r
+                       for (final TableItem tableItem : this.columns.get(i).getItems()) {\r
+                               if (tableItem.getData() != null && tableItem.getData().equals(nextItem)) {\r
+                                       tableItem.getParent().setSelection(tableItem);\r
+                               }\r
+                       }\r
+               }\r
+\r
+               this.composite.pack();\r
+               this.setMinSize(this.composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r
+               this.columns.get(this.columns.size() - 1).forceFocus();\r
+\r
+       }\r
+\r
+       /**\r
+        * Build an array that contains the hierarchy of ColumnItem from the root\r
+        * node to a given item.\r
+        * \r
+        * @param item item to find\r
+        * @param items the lists of item that composes the hierarchy\r
+        */\r
+       private void findElement(final ColumnItem item, final List<ColumnItem> items) {\r
+               if (item == null) {\r
+                       return;\r
+               }\r
+               items.add(item);\r
+               this.findElement(item.getParentItem(), items);\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's background color to the color specified by the\r
+        * argument, or to the default system color for the control if the argument\r
+        * is null.\r
+        * <p>\r
+        * Note: This operation is a hint and may be overridden by the platform. For\r
+        * example, on Windows the background of a Button cannot be changed.\r
+        * </p>\r
+        * \r
+        * @param color the new color (or null)\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the argument has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * @see org.eclipse.swt.widgets.Control#setBackground(org.eclipse.swt.graphics.Color)\r
+        */\r
+       @Override\r
+       public void setBackground(final Color color) {\r
+               super.setBackground(color);\r
+               for (final Table column : this.columns) {\r
+                       column.setBackground(color);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Sets the background drawing mode to the argument which should be one of\r
+        * the following constants defined in class <code>SWT</code>:\r
+        * <code>INHERIT_NONE</code>, <code>INHERIT_DEFAULT</code>,\r
+        * <code>INHERIT_FORCE</code>.\r
+        * \r
+        * @param mode the new background mode\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see SWT\r
+        * @see org.eclipse.swt.widgets.Composite#setBackgroundMode(int)\r
+        */\r
+       @Override\r
+       public void setBackgroundMode(final int mode) {\r
+               super.setBackgroundMode(mode);\r
+               for (final Table column : this.columns) {\r
+                       column.setBackgroundMode(mode);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's background image to the image specified by the\r
+        * argument, or to the default system color for the control if the argument\r
+        * is null. The background image is tiled to fill the available space.\r
+        * <p>\r
+        * Note: This operation is a hint and may be overridden by the platform. For\r
+        * example, on Windows the background of a Button cannot be changed.\r
+        * </p>\r
+        * \r
+        * @param image the new image (or null)\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the argument has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the argument is not a\r
+        *                bitmap</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see org.eclipse.swt.widgets.Control#setBackgroundImage(org.eclipse.swt.graphics.Image)\r
+        */\r
+       @Override\r
+       public void setBackgroundImage(final Image image) {\r
+               super.setBackgroundImage(image);\r
+               for (final Table column : this.columns) {\r
+                       column.setBackgroundImage(image);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's cursor to the cursor specified by the argument, or to\r
+        * the default cursor for that kind of control if the argument is null.\r
+        * <p>\r
+        * When the mouse pointer passes over a control its appearance is changed to\r
+        * match the control's cursor.\r
+        * </p>\r
+        * \r
+        * @param cursor the new cursor (or null)\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the argument has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * @see org.eclipse.swt.widgets.Control#setCursor(org.eclipse.swt.graphics.Cursor)\r
+        */\r
+       @Override\r
+       public void setCursor(final Cursor cursor) {\r
+               super.setCursor(cursor);\r
+               for (final Table column : this.columns) {\r
+                       column.setCursor(cursor);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Sets the font that the receiver will use to paint textual information to\r
+        * the font specified by the argument, or to the default font for that kind\r
+        * of control if the argument is null.\r
+        * \r
+        * @param font the new font (or null)\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the argument has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * @see org.eclipse.swt.widgets.Control#setFont(org.eclipse.swt.graphics.Font)\r
+        */\r
+       @Override\r
+       public void setFont(final Font font) {\r
+               super.setFont(font);\r
+               for (final Table column : this.columns) {\r
+                       column.setFont(font);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's foreground color to the color specified by the\r
+        * argument, or to the default system color for the control if the argument\r
+        * is null.\r
+        * <p>\r
+        * Note: This operation is a hint and may be overridden by the platform.\r
+        * </p>\r
+        * \r
+        * @param color the new color (or null)\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the argument has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * @see org.eclipse.swt.widgets.Control#setForeground(org.eclipse.swt.graphics.Color)\r
+        */\r
+       @Override\r
+       public void setForeground(final Color color) {\r
+               super.setForeground(color);\r
+               for (final Table column : this.columns) {\r
+                       column.setForeground(color);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's pop up menu to the argument. All controls may\r
+        * optionally have a pop up menu that is displayed when the user requests\r
+        * one for the control. The sequence of key strokes, button presses and/or\r
+        * button releases that are used to request a pop up menu is platform\r
+        * specific.\r
+        * <p>\r
+        * Note: Disposing of a control that has a pop up menu will dispose of the\r
+        * menu. To avoid this behavior, set the menu to null before the control is\r
+        * disposed.\r
+        * </p>\r
+        * \r
+        * @param menu the new pop up menu\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_MENU_NOT_POP_UP - the menu is not a pop up menu</li>\r
+        *                <li>ERROR_INVALID_PARENT - if the menu is not in the same\r
+        *                widget tree</li>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the menu has been disposed\r
+        *                </li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * @see org.eclipse.swt.widgets.Control#setMenu(org.eclipse.swt.widgets.Menu)\r
+        */\r
+       @Override\r
+       public void setMenu(final Menu menu) {\r
+               super.setMenu(menu);\r
+               for (final Table column : this.columns) {\r
+                       column.setMenu(menu);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's tool tip text to the argument, which may be null\r
+        * indicating that the default tool tip for the control will be shown. For a\r
+        * control that has a default tool tip, such as the Tree control on Windows,\r
+        * setting the tool tip text to an empty string replaces the default,\r
+        * causing no tool tip text to be shown.\r
+        * <p>\r
+        * The mnemonic indicator (character '&amp;') is not displayed in a tool\r
+        * tip. To display a single '&amp;' in the tool tip, the character '&amp;'\r
+        * can be escaped by doubling it in the string.\r
+        * </p>\r
+        * \r
+        * @param string the new tool tip text (or null)\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * @see org.eclipse.swt.widgets.Control#setToolTipText(java.lang.String)\r
+        */\r
+       @Override\r
+       public void setToolTipText(final String tooltipText) {\r
+               super.setToolTipText(tooltipText);\r
+               for (final Table column : this.columns) {\r
+                       column.setToolTipText(tooltipText);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @return the root item, or null if there is no data\r
+        */\r
+       ColumnItem getRootItem() {\r
+               if (this.columns == null || this.columns.isEmpty()) {\r
+                       return null;\r
+               }\r
+               return (ColumnItem) this.columns.get(0).getData();\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/columns/ColumnItem.java b/org.tizen.common.externals/src/org/mihalis/opal/columns/ColumnItem.java
new file mode 100644 (file)
index 0000000..52d63fa
--- /dev/null
@@ -0,0 +1,416 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.columns;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.mihalis.opal.OpalItem;\r
+\r
+/**\r
+ * Instances of this object are items manipulated by the ColumnBrowser widget.\r
+ * ColumnItems are part of a tree structure .\r
+ * \r
+ * @see OpalItem\r
+ */\r
+public class ColumnItem extends OpalItem {\r
+\r
+       private final ColumnBrowserWidget widget;\r
+       private final ColumnItem parent;\r
+       private final List<ColumnItem> children;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent. The item is\r
+        * added to the end of the items maintained by its parent.\r
+        * \r
+        * @param widget the widget that will contain this item (can not be null)\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        */\r
+       public ColumnItem(final ColumnBrowserWidget widget) {\r
+               if (widget == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (widget.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+\r
+               this.widget = widget;\r
+               this.parent = null;\r
+               this.children = new ArrayList<ColumnItem>();\r
+\r
+               if (widget.getRootItem() != null) {\r
+                       widget.getRootItem().children.add(this);\r
+               }\r
+               widget.updateContent();\r
+       }\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent. The item is\r
+        * added at a given position in the items'list maintained by its parent.\r
+        * \r
+        * @param widget the widget that will contain this item (can not be null)\r
+        * @param index the position\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        */\r
+       public ColumnItem(final ColumnBrowserWidget widget, final int index) {\r
+\r
+               if (widget == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (widget.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+\r
+               this.widget = widget;\r
+               this.parent = null;\r
+               this.children = new ArrayList<ColumnItem>();\r
+               widget.getRootItem().children.add(index, this);\r
+               widget.updateContent();\r
+       }\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent. The item is\r
+        * added to the end of the items maintained by its parent.\r
+        * \r
+        * @param widget the widget that will contain this item (can not be null)\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        */\r
+       public ColumnItem(final ColumnItem parent) {\r
+\r
+               if (parent == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (parent.widget.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+\r
+               this.widget = parent.widget;\r
+               this.parent = parent;\r
+               this.children = new ArrayList<ColumnItem>();\r
+               parent.children.add(this);\r
+               parent.widget.updateContent();\r
+       }\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent. The item is\r
+        * added at a given position in the items'list maintained by its parent.\r
+        * \r
+        * @param widget the widget that will contain this item (can not be null)\r
+        * @param index the position\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        */\r
+       public ColumnItem(final ColumnItem parent, final int index) {\r
+               if (parent == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (parent.widget.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+\r
+               this.widget = parent.widget;\r
+               this.parent = parent;\r
+               this.children = new ArrayList<ColumnItem>();\r
+               parent.children.add(index, this);\r
+               parent.widget.updateContent();\r
+       }\r
+\r
+       /**\r
+        * Remove a given children of this object\r
+        * \r
+        * @param item the item to remove (can not be null)\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        */\r
+       public void remove(final ColumnItem item) {\r
+               if (this.widget == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (this.widget.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+               this.children.remove(item);\r
+               this.widget.updateContent();\r
+       }\r
+\r
+       /**\r
+        * Remove a children in a given position of this object\r
+        * \r
+        * @param index position of the children in the items'list\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        */\r
+       public void remove(final int index) {\r
+               if (this.widget == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (this.widget.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+               this.children.remove(index);\r
+               this.widget.updateContent();\r
+       }\r
+\r
+       /**\r
+        * Remove all children of this object\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        */\r
+       public void removeAll() {\r
+               if (this.widget == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (this.widget.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+               this.children.clear();\r
+               this.widget.updateContent();\r
+       }\r
+\r
+       /**\r
+        * Returns an item located at a given position\r
+        * \r
+        * @param index position\r
+        * @return the item located at the index position\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        */\r
+       public ColumnItem getItem(final int index) {\r
+               if (this.widget == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (this.widget.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+               return this.children.get(index);\r
+       }\r
+\r
+       /**\r
+        * @return the number of children\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        */\r
+       public int getItemCount() {\r
+               if (this.widget == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (this.widget.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+               return this.children.size();\r
+       }\r
+\r
+       /**\r
+        * @return all children of this item\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        */\r
+       public ColumnItem[] getItems() {\r
+               if (this.widget == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (this.widget.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+               return this.children.toArray(new ColumnItem[this.children.size()]);\r
+       }\r
+\r
+       /**\r
+        * @return the widget that holds this item\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        */\r
+       public ColumnBrowserWidget getParent() {\r
+               if (this.widget == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (this.widget.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+               return this.widget;\r
+       }\r
+\r
+       /**\r
+        * @return the parent item, of <code>null</code> if this item is the root\r
+        *         node\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        */\r
+       public ColumnItem getParentItem() {\r
+               if (this.widget == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (this.widget.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+               return this.parent;\r
+       }\r
+\r
+       /**\r
+        * Return the position of a given item in children's list\r
+        * \r
+        * @param item item to find\r
+        * @return the position of the children, or -1 if <code>item</code> is a not\r
+        *         a children of this object\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        */\r
+       public int indexOf(final ColumnItem item) {\r
+               return this.children.indexOf(item);\r
+       }\r
+\r
+       /**\r
+        * @see java.lang.Object#hashCode()\r
+        */\r
+       @Override\r
+       public int hashCode() {\r
+               final int prime = 31;\r
+               int result = 1;\r
+               result = prime * result + (this.parent == null ? 0 : this.parent.hashCode());\r
+               result = prime * result + (this.widget == null ? 0 : this.widget.hashCode());\r
+               return result;\r
+       }\r
+\r
+       /**\r
+        * @see java.lang.Object#equals(java.lang.Object)\r
+        */\r
+       @Override\r
+       public boolean equals(final Object obj) {\r
+               if (this == obj) {\r
+                       return true;\r
+               }\r
+               if (obj == null) {\r
+                       return false;\r
+               }\r
+               if (getClass() != obj.getClass()) {\r
+                       return false;\r
+               }\r
+               final ColumnItem other = (ColumnItem) obj;\r
+               if (this.children == null) {\r
+                       if (other.children != null) {\r
+                               return false;\r
+                       }\r
+               } else if (!this.children.equals(other.children)) {\r
+                       return false;\r
+               }\r
+               if (this.parent == null) {\r
+                       if (other.parent != null) {\r
+                               return false;\r
+                       }\r
+               } else if (!this.parent.equals(other.parent)) {\r
+                       return false;\r
+               }\r
+               if (this.widget == null) {\r
+                       if (other.widget != null) {\r
+                               return false;\r
+                       }\r
+               } else if (!this.widget.equals(other.widget)) {\r
+                       return false;\r
+               }\r
+               return true;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/flatButton/FlatButton.java b/org.tizen.common.externals/src/org/mihalis/opal/flatButton/FlatButton.java
new file mode 100644 (file)
index 0000000..ede14ba
--- /dev/null
@@ -0,0 +1,633 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation \r
+ *******************************************************************************/\r
+package org.mihalis.opal.flatButton;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.PaintEvent;\r
+import org.eclipse.swt.events.PaintListener;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.widgets.Canvas;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class represent a flat button.\r
+ * <dl>\r
+ * <dt><b>Styles:</b></dt>\r
+ * <dd>(none)</dd>\r
+ * <dd>UP, DOWN, LEFT, RIGHT, CENTER</dd>\r
+ * <dt><b>Events:</b></dt>\r
+ * <dd>Selection</dd>\r
+ * </dl>\r
+ * <p>\r
+ * Note: Only one of the styles LEFT, RIGHT, and CENTER may be specified.\r
+ * </p>\r
+ * \r
+ */\r
+public class FlatButton extends Canvas {\r
+    private Image image;\r
+    private String text;\r
+    private boolean selection;\r
+    private int alignment;\r
+    private final List<SelectionListener> listeners;\r
+    private boolean mouseIn;\r
+    private Color backgroundColor;\r
+    private Color selectedColor;\r
+    private Color selectedTextColor;\r
+    private Color mouseOverColor;\r
+\r
+    /**\r
+     * Constructs a new instance of this class given its parent and a style\r
+     * value describing its behavior and appearance.\r
+     * <p>\r
+     * The style value is either one of the style constants defined in class\r
+     * <code>SWT</code> which is applicable to instances of this class, or must\r
+     * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+     * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+     * style constants. The class description lists the style constants that are\r
+     * applicable to the class. Style bits are also inherited from superclasses.\r
+     * </p>\r
+     * \r
+     * @param parent a composite control which will be the parent of the new\r
+     *            instance (cannot be null)\r
+     * @param style the style of control to construct\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the parent</li>\r
+     *                <li>ERROR_INVALID_SUBCLASS - if this class is not an\r
+     *                allowed subclass</li>\r
+     *                </ul>\r
+     * \r
+     * @see SWT#DOWN\r
+     * @see SWT#LEFT\r
+     * @see SWT#RIGHT\r
+     * @see SWT#CENTER\r
+     */\r
+    public FlatButton(final Composite parent, final int style) {\r
+        super(parent, style);\r
+        this.listeners = new ArrayList<SelectionListener>();\r
+        buildAlignmentFromStyle(style);\r
+        addListeners();\r
+        initializeDefaultColors();\r
+    }\r
+\r
+    private void buildAlignmentFromStyle(final int style) {\r
+        if ((style & SWT.LEFT) == SWT.LEFT) {\r
+            this.alignment = SWT.LEFT;\r
+        } else if ((style & SWT.RIGHT) == SWT.RIGHT) {\r
+            this.alignment = SWT.RIGHT;\r
+        } else {\r
+            this.alignment = SWT.CENTER;\r
+\r
+        }\r
+    }\r
+\r
+    private void addListeners() {\r
+        addPaintListener(new PaintListener() {\r
+            @Override\r
+            public void paintControl(final PaintEvent e) {\r
+                FlatButton.this.paintControl(e);\r
+            }\r
+        });\r
+\r
+        addListener(SWT.MouseEnter, new Listener() {\r
+            @Override\r
+            public void handleEvent(final Event event) {\r
+                FlatButton.this.mouseIn = true;\r
+                redraw();\r
+            }\r
+        });\r
+\r
+        addListener(SWT.MouseExit, new Listener() {\r
+            @Override\r
+            public void handleEvent(final Event event) {\r
+                FlatButton.this.mouseIn = false;\r
+                redraw();\r
+            }\r
+        });\r
+\r
+        addListener(SWT.MouseUp, new Listener() {\r
+            @Override\r
+            public void handleEvent(final Event event) {\r
+                boolean doIt = true;\r
+                FlatButton.this.selection = !FlatButton.this.selection;\r
+                for (final SelectionListener listener : FlatButton.this.listeners) {\r
+                    final SelectionEvent sEvent = new SelectionEvent(event);\r
+                    listener.widgetSelected(sEvent);\r
+                    doIt = doIt && sEvent.doit;\r
+                }\r
+                if (!doIt) {\r
+                    FlatButton.this.selection = !FlatButton.this.selection;\r
+                }\r
+            }\r
+\r
+        });\r
+    }\r
+\r
+    private void initializeDefaultColors() {\r
+        this.backgroundColor = getDisplay().getSystemColor(SWT.COLOR_WHITE);\r
+        this.selectedColor = new Color(getDisplay(), 0, 112, 192);\r
+        this.selectedTextColor = getDisplay().getSystemColor(SWT.COLOR_WHITE);\r
+        this.mouseOverColor = new Color(getDisplay(), 235, 234, 226);\r
+\r
+        SWTGraphicUtil.dispose(this, this.selectedColor);\r
+        SWTGraphicUtil.dispose(this, this.mouseOverColor);\r
+        SWTGraphicUtil.dispose(this, this.image);\r
+    }\r
+\r
+    private void paintControl(final PaintEvent e) {\r
+        final GC gc = e.gc;\r
+        drawBackground(gc);\r
+        if (this.image != null) {\r
+            drawImage(gc);\r
+        }\r
+        if (this.text != null) {\r
+            drawText(gc);\r
+        }\r
+    }\r
+\r
+    private void drawBackground(final GC gc) {\r
+        Color color;\r
+        if (this.selection) {\r
+            color = this.selectedColor;\r
+        } else if (this.mouseIn) {\r
+            color = this.mouseOverColor;\r
+        } else {\r
+            color = this.backgroundColor;\r
+        }\r
+        gc.setBackground(color);\r
+        gc.fillRectangle(getClientArea());\r
+\r
+    }\r
+\r
+    private void drawImage(final GC gc) {\r
+        final Rectangle rect = getClientArea();\r
+        final Point imageSize = new Point(this.image.getBounds().width, this.image.getBounds().height);\r
+\r
+        int x;\r
+        if (this.alignment == SWT.LEFT) {\r
+            x = 5;\r
+        } else if (this.alignment == SWT.RIGHT) {\r
+            x = rect.width - imageSize.x - 5;\r
+        } else {\r
+            x = (rect.width - imageSize.x) / 2;\r
+        }\r
+        gc.drawImage(this.image, x, 5);\r
+    }\r
+\r
+    private void drawText(final GC gc) {\r
+        final Rectangle rect = getClientArea();\r
+\r
+        if (this.selection) {\r
+            gc.setForeground(this.selectedTextColor);\r
+        } else {\r
+            gc.setForeground(getForeground());\r
+        }\r
+\r
+        gc.setFont(getFont());\r
+        final Point textSize = gc.stringExtent(this.text);\r
+        int x, y;\r
+\r
+        if (this.alignment == SWT.LEFT) {\r
+            x = 5;\r
+        } else if (this.alignment == SWT.RIGHT) {\r
+            x = rect.width - textSize.x - 5;\r
+        } else {\r
+            x = (rect.width - textSize.x) / 2;\r
+        }\r
+        if (this.image == null) {\r
+            y = 5;\r
+        } else {\r
+            y = 10 + this.image.getBounds().height;\r
+        }\r
+        gc.drawString(this.text, x, y, true);\r
+    }\r
+\r
+    /**\r
+     * Adds the listener to the collection of listeners who will be notified\r
+     * when the control is selected by the user, by sending it one of the\r
+     * messages defined in the <code>SelectionListener</code> interface.\r
+     * <p>\r
+     * <code>widgetSelected</code> is called when the control is selected by the\r
+     * user. <code>widgetDefaultSelected</code> is not called.\r
+     * </p>\r
+     * <p>\r
+     * When the <code>SWT.RADIO</code> style bit is set, the\r
+     * <code>widgetSelected</code> method is also called when the receiver loses\r
+     * selection because another item in the same radio group was selected by\r
+     * the user. During <code>widgetSelected</code> the application can use\r
+     * <code>getSelection()</code> to determine the current selected state of\r
+     * the receiver.\r
+     * </p>\r
+     * \r
+     * @param listener the listener which should be notified\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     * \r
+     * @see SelectionListener\r
+     * @see #removeSelectionListener\r
+     * @see SelectionEvent\r
+     */\r
+    public void addSelectionListener(final SelectionListener listener) {\r
+        checkWidget();\r
+        this.listeners.add(listener);\r
+    }\r
+\r
+    /**\r
+     * @see org.eclipse.swt.widgets.Composite#computeSize(int, int, boolean)\r
+     */\r
+    @Override\r
+    public Point computeSize(final int wHint, final int hHint, final boolean changed) {\r
+        int width = 10, height = 15;\r
+        if (this.image != null) {\r
+            final Rectangle bounds = this.image.getBounds();\r
+            width += bounds.width;\r
+            height += bounds.height;\r
+        }\r
+\r
+        if (this.text != null) {\r
+            final GC gc = new GC(this);\r
+            final Point extent = gc.stringExtent(this.text);\r
+            gc.dispose();\r
+            width = Math.max(width, extent.x + 10);\r
+            height = height + extent.y;\r
+        }\r
+\r
+        return new Point(Math.max(width, wHint), Math.max(height, hHint));\r
+    }\r
+\r
+    /**\r
+     * Returns a value which describes the position of the text in the receiver.\r
+     * The value will be one of <code>LEFT</code>, <code>RIGHT</code> or\r
+     * <code>CENTER</code>.\r
+     * \r
+     * @return the alignment\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public int getAlignment() {\r
+        checkWidget();\r
+        return this.alignment;\r
+    }\r
+\r
+    /**\r
+     * Returns a value which describes the default background color\r
+     * \r
+     * @return the default background color\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public Color getBackgroundColor() {\r
+        checkWidget();\r
+        return this.backgroundColor;\r
+    }\r
+\r
+    /**\r
+     * Returns the receiver's image if it has one, or null if it does not.\r
+     * \r
+     * @return the receiver's image\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public Image getImage() {\r
+        checkWidget();\r
+        return this.image;\r
+    }\r
+\r
+    /**\r
+     * Returns a value which describes the color when the mouse is over the\r
+     * button\r
+     * \r
+     * @return the color when the mouse is over the button\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public Color getMouseOverColor() {\r
+        checkWidget();\r
+        return this.mouseOverColor;\r
+    }\r
+\r
+    /**\r
+     * Returns a value which describes the color when the button is selected\r
+     * \r
+     * @return the color when the button is selected\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public Color getSelectedColor() {\r
+        checkWidget();\r
+        return this.selectedColor;\r
+    }\r
+\r
+    /**\r
+     * Returns a value which describes the color of the text when the button is\r
+     * selected\r
+     * \r
+     * @return the color of the text when the button is selected\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+\r
+    public Color getSelectedTextColor() {\r
+        return this.selectedTextColor;\r
+    }\r
+\r
+    /**\r
+     * Returns <code>true</code> if the receiver is selected, and false\r
+     * otherwise.\r
+     * <p>\r
+     * \r
+     * @return the selection state\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - if not\r
+     *                called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public boolean getSelection() {\r
+        checkWidget();\r
+        return this.selection;\r
+    }\r
+\r
+    /**\r
+     * Returns the receiver's text.\r
+     * \r
+     * @return the receiver's text\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public String getText() {\r
+        checkWidget();\r
+        return this.text;\r
+    }\r
+\r
+    /**\r
+     * Removes the listener from the collection of listeners who will be\r
+     * notified when the control is selected by the user.\r
+     * \r
+     * @param listener the listener which should no longer be notified\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     * \r
+     * @see SelectionListener\r
+     * @see #addSelectionListener\r
+     */\r
+    public void removeSelectionListener(final SelectionListener listener) {\r
+        checkWidget();\r
+        this.listeners.remove(listener);\r
+    }\r
+\r
+    /**\r
+     * Controls how text, images and arrows will be displayed in the receiver.\r
+     * The argument should be one of <code>LEFT</code>, <code>RIGHT</code> or\r
+     * <code>CENTER</code>.\r
+     * \r
+     * @param alignment the new alignment\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setAlignment(final int alignment) {\r
+        checkWidget();\r
+        if ((alignment & (SWT.LEFT | SWT.RIGHT | SWT.CENTER)) == 0) {\r
+            return;\r
+        }\r
+        this.alignment = alignment;\r
+        redraw();\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's background color to the color specified by the\r
+     * argument.\r
+     * \r
+     * @param color the new color\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_INVALID_ARGUMENT - if the argument has been\r
+     *                disposed</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setBackgroundColor(final Color backgroundColor) {\r
+        checkWidget();\r
+        this.backgroundColor = backgroundColor;\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's image to the argument, which may be <code>null</code>\r
+     * indicating that no image should be displayed.\r
+     * <p>\r
+     * Note that a Button can display an image and text simultaneously on\r
+     * Windows (starting with XP), GTK+ and OSX. On other platforms, a Button\r
+     * that has an image and text set into it will display the image or text\r
+     * that was set most recently.\r
+     * </p>\r
+     * \r
+     * @param image the image to display on the receiver (may be\r
+     *            <code>null</code>)\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_INVALID_ARGUMENT - if the image has been\r
+     *                disposed</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setImage(final Image image) {\r
+        checkWidget();\r
+        this.image = image;\r
+        redraw();\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's color when the mouse if over the button.\r
+     * \r
+     * @param color the new color\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_INVALID_ARGUMENT - if the argument has been\r
+     *                disposed</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setMouseOverColor(final Color mouseOverColor) {\r
+        checkWidget();\r
+        this.mouseOverColor = mouseOverColor;\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's color when the button is selected.\r
+     * \r
+     * @param color the new color\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_INVALID_ARGUMENT - if the argument has been\r
+     *                disposed</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setSelectedColor(final Color selectedColor) {\r
+        checkWidget();\r
+        this.selectedColor = selectedColor;\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's text color when the button is selected.\r
+     * \r
+     * @param color the new color\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_INVALID_ARGUMENT - if the argument has been\r
+     *                disposed</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setSelectedTextColor(final Color selectedTextColor) {\r
+        this.selectedTextColor = selectedTextColor;\r
+    }\r
+\r
+    /**\r
+     * Sets the selection state of the receiver.\r
+     * \r
+     * @param selected the new selection state\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setSelection(final boolean selected) {\r
+        checkWidget();\r
+        this.selection = selected;\r
+        redraw();\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's text.\r
+     * \r
+     * \r
+     * @param string the new text\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_NULL_ARGUMENT - if the text is null</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+     *                disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+     *                thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setText(final String text) {\r
+        checkWidget();\r
+        this.text = text;\r
+        redraw();\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/gradientComposite/GradientComposite.java b/org.tizen.common.externals/src/org/mihalis/opal/gradientComposite/GradientComposite.java
new file mode 100644 (file)
index 0000000..80e5c67
--- /dev/null
@@ -0,0 +1,154 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.gradientComposite;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.DisposeEvent;\r
+import org.eclipse.swt.events.DisposeListener;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Widget;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class are controls which background's texture is a gradient\r
+ * composite\r
+ */\r
+public class GradientComposite extends Composite {\r
+       private Image oldImage;\r
+       private Color gradientEnd;\r
+       private Color gradientStart;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a widget which will be the parent of the new instance\r
+        *            (cannot be null)\r
+        * @param style the style of widget to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        * @see Composite#Composite(Composite, int)\r
+        * @see SWT#NO_BACKGROUND\r
+        * @see SWT#NO_FOCUS\r
+        * @see SWT#NO_MERGE_PAINTS\r
+        * @see SWT#NO_REDRAW_RESIZE\r
+        * @see SWT#NO_RADIO_GROUP\r
+        * @see SWT#EMBEDDED\r
+        * @see SWT#DOUBLE_BUFFERED\r
+        * @see Widget#getStyle\r
+        */\r
+       public GradientComposite(final Composite parent, final int style) {\r
+               super(parent, style);\r
+               this.addListener(SWT.Resize, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               GradientComposite.this.redrawComposite();\r
+                       }\r
+               });\r
+\r
+               parent.addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent e) {\r
+                               SWTGraphicUtil.dispose(GradientComposite.this.oldImage);\r
+                               SWTGraphicUtil.dispose(GradientComposite.this.gradientEnd);\r
+                               SWTGraphicUtil.dispose(GradientComposite.this.gradientStart);\r
+                       }\r
+\r
+               });\r
+\r
+               this.gradientEnd = new Color(this.getDisplay(), 110, 110, 110);\r
+               this.gradientStart = new Color(this.getDisplay(), 0, 0, 0);\r
+\r
+       }\r
+\r
+       /**\r
+        * Redraws the composite\r
+        */\r
+       private void redrawComposite() {\r
+               final Display display = this.getDisplay();\r
+               final Rectangle rect = this.getClientArea();\r
+               final Image newImage = new Image(display, Math.max(1, rect.width), Math.max(1, rect.height));\r
+\r
+               final GC gc = new GC(newImage);\r
+               gc.setForeground(this.gradientStart);\r
+               gc.setBackground(this.gradientEnd);\r
+\r
+               gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height / 2, true);\r
+\r
+               gc.setForeground(this.gradientEnd);\r
+               gc.setBackground(this.gradientStart);\r
+\r
+               gc.fillGradientRectangle(rect.x, rect.height / 2, rect.width, rect.height / 2, true);\r
+               gc.dispose();\r
+\r
+               this.setBackgroundImage(newImage);\r
+               if (this.oldImage != null) {\r
+                       this.oldImage.dispose();\r
+               }\r
+               this.oldImage = newImage;\r
+\r
+       }\r
+\r
+       // ------------------------------------ Getters and Setters\r
+       /**\r
+        * @return the gradientEnd color\r
+        */\r
+       public Color getGradientEnd() {\r
+               return this.gradientEnd;\r
+       }\r
+\r
+       /**\r
+        * @param gradientEnd the gradientEnd color to set\r
+        */\r
+       public void setGradientEnd(final Color gradientEnd) {\r
+               SWTGraphicUtil.dispose(this.gradientEnd);\r
+               this.gradientEnd = gradientEnd;\r
+       }\r
+\r
+       /**\r
+        * @return the gradientStart color\r
+        */\r
+       public Color getGradientStart() {\r
+               return this.gradientStart;\r
+       }\r
+\r
+       /**\r
+        * @param gradientStart the gradientStart color to set\r
+        */\r
+       public void setGradientStart(final Color gradientStart) {\r
+               SWTGraphicUtil.dispose(this.gradientStart);\r
+               this.gradientStart = gradientStart;\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/header/Header.java b/org.tizen.common.externals/src/org/mihalis/opal/header/Header.java
new file mode 100644 (file)
index 0000000..1635263
--- /dev/null
@@ -0,0 +1,540 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation\r
+ *******************************************************************************/\r
+\r
+package org.mihalis.opal.header;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.custom.StyledText;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.FontData;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.Layout;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class provide a header, which is composed of a text, a\r
+ * description and an image.\r
+ * <p>\r
+ * <dl>\r
+ * <dt><b>Styles:</b></dt>\r
+ * <dd>BORDER</dd>\r
+ * <dt><b>Events:</b></dt>\r
+ * <dd>(none)</dd>\r
+ * </dl>\r
+ */\r
+public class Header extends Composite {\r
+\r
+       private Image image;\r
+       private String title;\r
+       private String description;\r
+       private Font titleFont;\r
+       private Color titleColor;\r
+\r
+       private Image oldImage;\r
+       private Color gradientEnd;\r
+       private Color gradientStart;\r
+       private Color separatorColor;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a composite control which will be the parent of the new\r
+        *            instance (cannot be null)\r
+        * @param style the style of control to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        */\r
+       public Header(final Composite parent, final int style) {\r
+               super(parent, style);\r
+\r
+               final FontData[] fontData = getFont().getFontData();\r
+               if (fontData != null && fontData.length > 0) {\r
+                       final FontData fd = fontData[0];\r
+                       fd.setStyle(SWT.BOLD);\r
+                       fd.setHeight(fd.getHeight() + 2);\r
+                       this.titleFont = new Font(getDisplay(), fd);\r
+               } else {\r
+                       this.titleFont = null;\r
+               }\r
+\r
+               this.titleColor = new Color(getDisplay(), 0, 88, 150);\r
+\r
+               this.gradientEnd = new Color(this.getDisplay(), 239, 239, 239);\r
+               this.gradientStart = new Color(this.getDisplay(), 255, 255, 255);\r
+               this.separatorColor = new Color(this.getDisplay(), 229, 229, 229);\r
+\r
+               this.addListener(SWT.Resize, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               redrawComposite();\r
+                       }\r
+               });\r
+\r
+               this.addListener(SWT.Dispose, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               SWTGraphicUtil.dispose(Header.this.titleColor);\r
+                               SWTGraphicUtil.dispose(Header.this.titleFont);\r
+                               SWTGraphicUtil.dispose(Header.this.oldImage);\r
+                               SWTGraphicUtil.dispose(Header.this.gradientEnd);\r
+                               SWTGraphicUtil.dispose(Header.this.gradientStart);\r
+                               SWTGraphicUtil.dispose(Header.this.separatorColor);\r
+                       }\r
+               });\r
+               setBackgroundMode(SWT.INHERIT_FORCE);\r
+       }\r
+\r
+       /**\r
+        * Redraw the composite\r
+        */\r
+       private void redrawComposite() {\r
+               // Dispose previous content\r
+               for (final Control c : this.getChildren()) {\r
+                       c.dispose();\r
+               }\r
+\r
+               int numberOfColumns = 1;\r
+               if (this.image != null) {\r
+                       numberOfColumns++;\r
+               }\r
+\r
+               super.setLayout(new GridLayout(numberOfColumns, false));\r
+               createContent();\r
+               drawBackground();\r
+       }\r
+\r
+       /**\r
+        * Create the content (title, image, description)\r
+        */\r
+       private void createContent() {\r
+               if (this.title != null) {\r
+                       createTitle();\r
+               }\r
+\r
+               if (this.image != null) {\r
+                       createImage();\r
+               }\r
+\r
+               if (this.description != null) {\r
+                       createDescription();\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Create the title\r
+        */\r
+       private void createTitle() {\r
+               final Label labelTitle = new Label(this, SWT.NONE);\r
+               labelTitle.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));\r
+               labelTitle.setFont(this.titleFont);\r
+               labelTitle.setForeground(this.titleColor);\r
+               labelTitle.setText(this.title);\r
+       }\r
+\r
+       /**\r
+        * Create the image\r
+        */\r
+       private void createImage() {\r
+\r
+               int numberOfLines = 1;\r
+\r
+               if (this.title != null && this.description != null) {\r
+                       numberOfLines++;\r
+               }\r
+               final Label labelImage = new Label(this, SWT.NONE);\r
+               labelImage.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, true, 1, numberOfLines));\r
+               labelImage.setImage(this.image);\r
+       }\r
+\r
+       /**\r
+        * Create the description\r
+        */\r
+       private void createDescription() {\r
+               final StyledText labelDescription = new StyledText(this, SWT.WRAP | SWT.READ_ONLY);\r
+               labelDescription.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));\r
+               labelDescription.setEnabled(false);\r
+               labelDescription.setFont(getFont());\r
+               labelDescription.setForeground(getForeground());\r
+               labelDescription.setText("<html><body>" + this.description + "</body></html>");\r
+               SWTGraphicUtil.applyHTMLFormating(labelDescription);\r
+       }\r
+\r
+       /**\r
+        * Draw the background (a gradient+a separator)\r
+        */\r
+       private void drawBackground() {\r
+               final Display display = this.getDisplay();\r
+               final Rectangle rect = this.getClientArea();\r
+               final Image newImage = new Image(display, Math.max(1, rect.width), Math.max(1, rect.height));\r
+\r
+               final GC gc = new GC(newImage);\r
+               gc.setForeground(this.gradientStart);\r
+               gc.setBackground(this.gradientEnd);\r
+\r
+               gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height, false);\r
+\r
+               gc.setForeground(this.separatorColor);\r
+               gc.drawLine(rect.x, rect.y + rect.height - 1, rect.x + rect.width, rect.y + rect.height - 1);\r
+\r
+               gc.dispose();\r
+\r
+               this.setBackgroundImage(newImage);\r
+               if (this.oldImage != null) {\r
+                       this.oldImage.dispose();\r
+               }\r
+               this.oldImage = newImage;\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Composite#setLayout(org.eclipse.swt.widgets.Layout)\r
+        */\r
+       @Override\r
+       public void setLayout(final Layout layout) {\r
+               throw new UnsupportedOperationException("Not supported");\r
+       }\r
+\r
+       // ------------------------------------ Getters and Setters\r
+\r
+       /**\r
+        * Returns the receiver's description if it has one, or null if it does not.\r
+        * \r
+        * @return the receiver's description if it has one, or null if it does not\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public String getDescription() {\r
+               checkWidget();\r
+               return this.description;\r
+       }\r
+\r
+       /**\r
+        * Returns the receiver's gradient end color.\r
+        * \r
+        * @return the receiver's gradient end color\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Color getGradientEnd() {\r
+               checkWidget();\r
+               return this.gradientEnd;\r
+       }\r
+\r
+       /**\r
+        * Returns the receiver's gradient start color.\r
+        * \r
+        * @return the receiver's gradient start color\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Color getGradientStart() {\r
+               checkWidget();\r
+               return this.gradientStart;\r
+       }\r
+\r
+       /**\r
+        * Returns the receiver's image if it has one, or null if it does not.\r
+        * \r
+        * @return the receiver's image if it has one, or null if it does not\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Image getImage() {\r
+               checkWidget();\r
+               return this.image;\r
+       }\r
+\r
+       /**\r
+        * Returns the receiver's separator color.\r
+        * \r
+        * @return the receiver's separator color\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Color getSeparatorColor() {\r
+               checkWidget();\r
+               return this.separatorColor;\r
+       }\r
+\r
+       /**\r
+        * Returns the receiver's title if it has one, or null if it does not.\r
+        * \r
+        * @return the receiver's title if it has one, or null if it does not\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public String getTitle() {\r
+               checkWidget();\r
+               return this.title;\r
+       }\r
+\r
+       /**\r
+        * Returns the title's color.\r
+        * \r
+        * @return the title's color\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Color getTitleColor() {\r
+               checkWidget();\r
+               return this.titleColor;\r
+       }\r
+\r
+       /**\r
+        * Returns the title's font.\r
+        * \r
+        * @return the title's font.\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Font getTitleFont() {\r
+               checkWidget();\r
+               return this.titleFont;\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's description to the argument, which may be null\r
+        * indicating that no description should be displayed.\r
+        * \r
+        * @param description the description of the header (may be null)\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the image has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setDescription(final String description) {\r
+               checkWidget();\r
+               this.description = description;\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's gradient end color.\r
+        * \r
+        * @param gradientEnd the receiver's gradient end color\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the image has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setGradientEnd(final Color gradientEnd) {\r
+               checkWidget();\r
+               this.gradientEnd = gradientEnd;\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's gradient start color.\r
+        * \r
+        * @param gradientStart the receiver's gradient start color\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the image has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setGradientStart(final Color gradientStart) {\r
+               checkWidget();\r
+               this.gradientStart = gradientStart;\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's image to the argument, which may be null indicating\r
+        * that no image should be displayed.\r
+        * \r
+        * @param image the image to display on the receiver (may be null)\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the image has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setImage(final Image image) {\r
+               checkWidget();\r
+               this.image = image;\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's separator color.\r
+        * \r
+        * @param separatorColor the receiver's separator color\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the image has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setSeparatorColor(final Color separatorColor) {\r
+               this.separatorColor = separatorColor;\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's title to the argument, which may be null indicating\r
+        * that no title should be displayed.\r
+        * \r
+        * @param title the title\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the image has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setTitle(final String title) {\r
+               checkWidget();\r
+               this.title = title;\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's title color.\r
+        * \r
+        * @param headerColor the receiver's title color\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the image has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setTitleColor(final Color headerColor) {\r
+               checkWidget();\r
+               this.titleColor = headerColor;\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's title font.\r
+        * \r
+        * @param headerFont the receiver's title font\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the image has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setTitleFont(final Font headerFont) {\r
+               checkWidget();\r
+               this.titleFont = headerFont;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/heapManager/HeapManager.java b/org.tizen.common.externals/src/org/mihalis/opal/heapManager/HeapManager.java
new file mode 100644 (file)
index 0000000..a702b6f
--- /dev/null
@@ -0,0 +1,297 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.heapManager;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.DisposeEvent;\r
+import org.eclipse.swt.events.DisposeListener;\r
+import org.eclipse.swt.events.PaintEvent;\r
+import org.eclipse.swt.events.PaintListener;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Canvas;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Widget;\r
+import org.mihalis.opal.utils.ResourceManager;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class are controls that display the memory used, the whole\r
+ * memory, and contains a button to perform a GC\r
+ */\r
+public class HeapManager extends Composite {\r
+       private Canvas bar;\r
+       private Button button;\r
+       private int heapMaxSize;\r
+       private int heapSize;\r
+       private Color barBorderColor;\r
+       private Color barInnerColor;\r
+       private Color barTextColor;\r
+       private Color barGradientColorTopStart;\r
+       private Color barGradientColorTopEnd;\r
+       private Color barGradientColorMiddleStart;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a widget which will be the parent of the new instance\r
+        *            (cannot be null)\r
+        * @param style the style of widget to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        * @see Composite#Composite(Composite, int)\r
+        * @see Widget#getStyle\r
+        */\r
+       public HeapManager(final Composite parent, final int style) {\r
+               super(parent, style);\r
+               final GridLayout gridLayout = new GridLayout(2, false);\r
+               gridLayout.horizontalSpacing = gridLayout.verticalSpacing = 0;\r
+               setLayout(gridLayout);\r
+\r
+               createBar();\r
+               createButton();\r
+               updateContent();\r
+               createDefaultColors();\r
+\r
+               addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent e) {\r
+                               SWTGraphicUtil.dispose(HeapManager.this.barBorderColor);\r
+                               SWTGraphicUtil.dispose(HeapManager.this.barInnerColor);\r
+                               SWTGraphicUtil.dispose(HeapManager.this.barGradientColorTopStart);\r
+                               SWTGraphicUtil.dispose(HeapManager.this.barGradientColorTopEnd);\r
+                               SWTGraphicUtil.dispose(HeapManager.this.barGradientColorMiddleStart);\r
+                               SWTGraphicUtil.dispose(HeapManager.this.barTextColor);\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Creates the bar that displays the memory\r
+        */\r
+       private void createBar() {\r
+               this.bar = new Canvas(this, SWT.NONE);\r
+               final GridData gd = new GridData(GridData.FILL, GridData.FILL, true, false);\r
+               gd.minimumWidth = 100;\r
+               gd.heightHint = 30;\r
+               this.bar.setLayoutData(gd);\r
+               this.heapMaxSize = (int) (Runtime.getRuntime().maxMemory() / (1024 * 1024));\r
+               this.bar.addPaintListener(new PaintListener() {\r
+\r
+                       @Override\r
+                       public void paintControl(final PaintEvent e) {\r
+                               drawBar(e);\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * Draw the bar\r
+        * \r
+        * @param e {@link PaintEvent}\r
+        */\r
+       private void drawBar(final PaintEvent e) {\r
+               final GC gc = e.gc;\r
+               final Rectangle clientArea = this.bar.getClientArea();\r
+\r
+               gc.setForeground(this.barBorderColor);\r
+               gc.setBackground(this.barInnerColor);\r
+               gc.fillRectangle(clientArea);\r
+               gc.drawRectangle(clientArea.x, clientArea.y, clientArea.width - 1, clientArea.height - 1);\r
+\r
+               final float width = (clientArea.width - 2f) * this.heapSize / this.heapMaxSize;\r
+\r
+               gc.setForeground(this.barGradientColorTopStart);\r
+               gc.setBackground(this.barGradientColorTopEnd);\r
+               gc.fillGradientRectangle(clientArea.x + 1, clientArea.y + 1, (int) width, clientArea.height / 2, true);\r
+\r
+               gc.setForeground(this.barGradientColorMiddleStart);\r
+               gc.setBackground(this.barBorderColor);\r
+               gc.fillGradientRectangle(clientArea.x + 1, clientArea.height / 2, (int) width, clientArea.height / 2, true);\r
+\r
+               final String message = this.heapSize + " " + ResourceManager.getLabel(ResourceManager.MEGABYTES) + "/" + //\r
+                               this.heapMaxSize + " " + ResourceManager.getLabel(ResourceManager.MEGABYTES);\r
+               final Point size = gc.stringExtent(message);\r
+\r
+               gc.setForeground(this.barTextColor);\r
+               gc.setFont(getFont());\r
+               gc.drawText(message, (clientArea.width - size.x) / 2, (clientArea.height - size.y) / 2, true);\r
+\r
+               gc.dispose();\r
+\r
+       }\r
+\r
+       /**\r
+        * Create the button used to perform GC\r
+        */\r
+       private void createButton() {\r
+               this.button = new Button(this, SWT.PUSH);\r
+               this.button.setImage(SWTGraphicUtil.createImage("images/trash.png"));\r
+               this.button.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));\r
+               this.button.addSelectionListener(new SelectionAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                        */\r
+                       @Override\r
+                       public void widgetSelected(final SelectionEvent e) {\r
+                               System.gc();\r
+                       }\r
+\r
+               });\r
+               this.button.setToolTipText(ResourceManager.getLabel(ResourceManager.PERFORM_GC));\r
+               this.button.pack();\r
+       }\r
+\r
+       /**\r
+        * Update the content of the bar\r
+        */\r
+       private void updateContent() {\r
+               getDisplay().timerExec(500, new Runnable() {\r
+\r
+                       @Override\r
+                       public void run() {\r
+                               HeapManager.this.heapSize = (int) (Runtime.getRuntime().totalMemory() / (1024 * 1024));\r
+                               if (!isDisposed()) {\r
+                                       HeapManager.this.bar.redraw();\r
+                                       if (!getDisplay().isDisposed()) {\r
+                                               getDisplay().timerExec(500, this);\r
+                                       }\r
+                               }\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Creates the default colors\r
+        */\r
+       private void createDefaultColors() {\r
+               this.barTextColor = new Color(getDisplay(), 57, 98, 149);\r
+               this.barInnerColor = new Color(getDisplay(), 219, 230, 243);\r
+               this.barBorderColor = new Color(getDisplay(), 101, 148, 207);\r
+               this.barGradientColorTopStart = new Color(getDisplay(), 175, 202, 237);\r
+               this.barGradientColorTopEnd = new Color(getDisplay(), 136, 177, 229);\r
+               this.barGradientColorMiddleStart = new Color(getDisplay(), 112, 161, 223);\r
+\r
+       }\r
+\r
+       /**\r
+        * @return the barBorderColor\r
+        */\r
+       public Color getBarBorderColor() {\r
+               return this.barBorderColor;\r
+       }\r
+\r
+       /**\r
+        * @param barBorderColor the barBorderColor to set\r
+        */\r
+       public void setBarBorderColor(final Color barBorderColor) {\r
+               this.barBorderColor = barBorderColor;\r
+       }\r
+\r
+       /**\r
+        * @return the barInnerColor\r
+        */\r
+       public Color getBarInnerColor() {\r
+               return this.barInnerColor;\r
+       }\r
+\r
+       /**\r
+        * @param barInnerColor the barInnerColor to set\r
+        */\r
+       public void setBarInnerColor(final Color barInnerColor) {\r
+               this.barInnerColor = barInnerColor;\r
+       }\r
+\r
+       /**\r
+        * @return the barTextColor\r
+        */\r
+       public Color getBarTextColor() {\r
+               return this.barTextColor;\r
+       }\r
+\r
+       /**\r
+        * @param barTextColor the barTextColor to set\r
+        */\r
+       public void setBarTextColor(final Color barTextColor) {\r
+               this.barTextColor = barTextColor;\r
+       }\r
+\r
+       /**\r
+        * @return the barGradientColorTopStart\r
+        */\r
+       public Color getBarGradientColorTopStart() {\r
+               return this.barGradientColorTopStart;\r
+       }\r
+\r
+       /**\r
+        * @param barGradientColorTopStart the barGradientColorTopStart to set\r
+        */\r
+       public void setBarGradientColorTopStart(final Color barGradientColorTopStart) {\r
+               this.barGradientColorTopStart = barGradientColorTopStart;\r
+       }\r
+\r
+       /**\r
+        * @return the barGradientColorTopEnd\r
+        */\r
+       public Color getBarGradientColorTopEnd() {\r
+               return this.barGradientColorTopEnd;\r
+       }\r
+\r
+       /**\r
+        * @param barGradientColorTopEnd the barGradientColorTopEnd to set\r
+        */\r
+       public void setBarGradientColorTopEnd(final Color barGradientColorTopEnd) {\r
+               this.barGradientColorTopEnd = barGradientColorTopEnd;\r
+       }\r
+\r
+       /**\r
+        * @return the barGradientColorMiddleStart\r
+        */\r
+       public Color getBarGradientColorMiddleStart() {\r
+               return this.barGradientColorMiddleStart;\r
+       }\r
+\r
+       /**\r
+        * @param barGradientColorMiddleStart the barGradientColorMiddleStart to set\r
+        */\r
+       public void setBarGradientColorMiddleStart(final Color barGradientColorMiddleStart) {\r
+               this.barGradientColorMiddleStart = barGradientColorMiddleStart;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/horizontalSpinner/HorizontalSpinner.java b/org.tizen.common.externals/src/org/mihalis/opal/horizontalSpinner/HorizontalSpinner.java
new file mode 100644 (file)
index 0000000..5362a36
--- /dev/null
@@ -0,0 +1,947 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.horizontalSpinner;\r
+\r
+import java.text.DecimalFormatSymbols;\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.KeyAdapter;\r
+import org.eclipse.swt.events.KeyEvent;\r
+import org.eclipse.swt.events.ModifyEvent;\r
+import org.eclipse.swt.events.ModifyListener;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.events.VerifyEvent;\r
+import org.eclipse.swt.events.VerifyListener;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Cursor;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Menu;\r
+import org.eclipse.swt.widgets.Text;\r
+import org.mihalis.opal.utils.StringUtil;\r
+\r
+/**\r
+ * Instances of this class are selectable user interface objects that allow the user to enter and modify numeric values.\r
+ * <p>\r
+ * <dl>\r
+ * <dt><b>Styles:</b></dt>\r
+ * <dd>READ_ONLY, FLAP</dd>\r
+ * <dt><b>Events:</b></dt>\r
+ * <dd>Selection, Modify</dd>\r
+ * </dl>\r
+ * </p>\r
+ */\r
+public class HorizontalSpinner extends Composite {\r
+    private final List<ModifyListener> modifyListeners = new ArrayList<ModifyListener>();\r
+    private final List<SelectionListener> selectionListeners = new ArrayList<SelectionListener>();\r
+\r
+    private Button leftButton;\r
+    private Button rightButton;\r
+    private Text text;\r
+    private int digits = 0;\r
+    private int increment = 1;\r
+    private int maximum = 0;\r
+    private int minimum = 255;\r
+    private int pageIncrement = 10;\r
+    private int storedValue = 0;\r
+\r
+    private final char decimalFormatSeparator;\r
+\r
+    /**\r
+     * Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.\r
+     * <p>\r
+     * The style value is either one of the style constants defined in class <code>SWT</code> which is applicable to instances of this class, or must be built by <em>bitwise OR</em>'ing together (that is, using the <code>int</code> "|" operator) two or more of those <code>SWT</code> style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.\r
+     * </p>\r
+     * \r
+     * @param parent a composite control which will be the parent of the new instance (cannot be null)\r
+     * @param style the style of control to construct\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li>\r
+     *                <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li>\r
+     *                </ul>\r
+     * \r
+     * @see SWT#READ_ONLY\r
+     * @see SWT#FLAT\r
+     */\r
+    public HorizontalSpinner(final Composite parent, final int style) {\r
+        super(parent, style);\r
+\r
+        final GridLayout gd = new GridLayout(3, false);\r
+        gd.horizontalSpacing = gd.verticalSpacing = 0;\r
+        gd.marginWidth = gd.marginHeight = 0;\r
+        this.setLayout(gd);\r
+\r
+        this.createContent(style);\r
+        this.addTextListeners();\r
+        this.addButtonsListener();\r
+        this.addModifyListeners();\r
+\r
+        this.decimalFormatSeparator = new DecimalFormatSymbols().getDecimalSeparator();\r
+    }\r
+\r
+    /**\r
+     * Create the content of the widget\r
+     * \r
+     * @param style style of the widget\r
+     */\r
+    private void createContent(final int style) {\r
+        final boolean readOnly = (style & SWT.READ_ONLY) == SWT.READ_ONLY;\r
+        final boolean flat = (style & SWT.FLAT) == SWT.FLAT;\r
+\r
+        final int buttonStyle = SWT.ARROW | (flat ? SWT.FLAT : SWT.NONE);\r
+        this.leftButton = new Button(this, buttonStyle | SWT.LEFT);\r
+        this.leftButton.setFont(this.getFont());\r
+        this.leftButton.setBackground(this.getBackground());\r
+        this.leftButton.setCursor(this.getCursor());\r
+        this.leftButton.setEnabled(this.getEnabled());\r
+        this.leftButton.setFont(this.getFont());\r
+        this.leftButton.setForeground(this.getForeground());\r
+        this.leftButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));\r
+\r
+        this.text = new Text(this, readOnly ? SWT.READ_ONLY : SWT.NONE);\r
+        final GridData gd = new GridData(GridData.FILL, GridData.CENTER, true, false);\r
+        gd.minimumWidth = 40;\r
+        this.text.setLayoutData(gd);\r
+\r
+        this.rightButton = new Button(this, buttonStyle | SWT.RIGHT);\r
+        this.rightButton.setFont(this.getFont());\r
+        this.rightButton.setBackground(this.getBackground());\r
+        this.rightButton.setCursor(this.getCursor());\r
+        this.rightButton.setEnabled(this.getEnabled());\r
+        this.rightButton.setFont(this.getFont());\r
+        this.rightButton.setForeground(this.getForeground());\r
+        this.rightButton.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));\r
+\r
+    }\r
+\r
+    /**\r
+     * Add the text listeners\r
+     */\r
+    private void addTextListeners() {\r
+        this.text.addVerifyListener(new VerifyListener() {\r
+\r
+            @Override\r
+            public void verifyText(final VerifyEvent e) {\r
+                if (e.character != 0 && !Character.isDigit(e.character) && e.keyCode != SWT.BS && e.keyCode != SWT.DEL) {\r
+                    e.doit = false;\r
+                    return;\r
+                }\r
+\r
+                e.doit = HorizontalSpinner.this.verifyEntryAndStoreValue(e.text, e.keyCode);\r
+\r
+            }\r
+        });\r
+\r
+        this.text.addKeyListener(new KeyAdapter() {\r
+\r
+            /**\r
+             * @see org.eclipse.swt.events.KeyAdapter#keyReleased(org.eclipse.swt.events.KeyEvent)\r
+             */\r
+            @Override\r
+            public void keyReleased(final KeyEvent e) {\r
+                if (e.keyCode == SWT.ARROW_UP) {\r
+                    HorizontalSpinner.this.increaseValue(HorizontalSpinner.this.increment);\r
+                }\r
+                if (e.keyCode == SWT.ARROW_DOWN) {\r
+                    HorizontalSpinner.this.decreaseValue(HorizontalSpinner.this.increment);\r
+                }\r
+                if (e.keyCode == SWT.PAGE_UP) {\r
+                    HorizontalSpinner.this.increaseValue(HorizontalSpinner.this.pageIncrement);\r
+                }\r
+                if (e.keyCode == SWT.PAGE_DOWN) {\r
+                    HorizontalSpinner.this.decreaseValue(HorizontalSpinner.this.pageIncrement);\r
+                }\r
+            }\r
+\r
+        });\r
+\r
+        this.text.addFocusListener(new org.eclipse.swt.events.FocusAdapter() {\r
+\r
+            /**\r
+             * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)\r
+             */\r
+            @Override\r
+            public void focusLost(final org.eclipse.swt.events.FocusEvent e) {\r
+                if (HorizontalSpinner.this.text.getText().trim().equals("")) {\r
+                    HorizontalSpinner.this.setSelection(HorizontalSpinner.this.storedValue);\r
+                }\r
+            }\r
+\r
+        });\r
+\r
+    }\r
+\r
+    /**\r
+     * Verify the entry and store the value in the field storedValue\r
+     * \r
+     * @param entry entry to check\r
+     * @param keyCode code of the typed key\r
+     * @return <code>true</code> if the entry if correct, <code>false</code> otherwise\r
+     */\r
+    private boolean verifyEntryAndStoreValue(final String entry, final int keyCode) {\r
+        final String work;\r
+        if (keyCode == SWT.DEL) {\r
+            work = StringUtil.removeCharAt(this.text.getText(), this.text.getCaretPosition());\r
+        } else if (keyCode == SWT.BS && this.text.getCaretPosition() == 0) {\r
+            work = StringUtil.removeCharAt(this.text.getText(), this.text.getCaretPosition() - 1);\r
+        } else if (keyCode == 0) {\r
+            work = entry;\r
+        } else {\r
+            work = StringUtil.insertString(this.text.getText(), entry, this.text.getCaretPosition());\r
+        }\r
+\r
+        try {\r
+            final double d = Double.parseDouble(work.replace(this.decimalFormatSeparator, '.'));\r
+            this.storedValue = (int) (d * Math.pow(10, this.getDigits()));\r
+        } catch (final NumberFormatException nfe) {\r
+            return false;\r
+        }\r
+\r
+        for (final SelectionListener s : HorizontalSpinner.this.selectionListeners) {\r
+            s.widgetSelected(null);\r
+        }\r
+\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Add the listener to the buttons\r
+     */\r
+    private void addButtonsListener() {\r
+        this.leftButton.addSelectionListener(new SelectionAdapter() {\r
+\r
+            /**\r
+             * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+             */\r
+            @Override\r
+            public void widgetSelected(final SelectionEvent e) {\r
+                HorizontalSpinner.this.decreaseValue(HorizontalSpinner.this.increment);\r
+            }\r
+        });\r
+\r
+        this.rightButton.addSelectionListener(new SelectionAdapter() {\r
+\r
+            /**\r
+             * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+             */\r
+            @Override\r
+            public void widgetSelected(final SelectionEvent e) {\r
+                HorizontalSpinner.this.increaseValue(HorizontalSpinner.this.increment);\r
+            }\r
+        });\r
+\r
+    }\r
+\r
+    /**\r
+     * Increase the value stored in this snippet\r
+     * \r
+     * @param value value to increase\r
+     */\r
+    private void increaseValue(final int value) {\r
+        this.setSelection(this.getSelection() + value);\r
+\r
+    }\r
+\r
+    /**\r
+     * Decrease the value stored in this snippet\r
+     * \r
+     * @param value value to decrease\r
+     */\r
+    private void decreaseValue(final int value) {\r
+        this.setSelection(this.getSelection() - value);\r
+    }\r
+\r
+    /**\r
+     * Add the modify listeners\r
+     */\r
+    private void addModifyListeners() {\r
+        this.text.addModifyListener(new ModifyListener() {\r
+\r
+            @Override\r
+            public void modifyText(final ModifyEvent e) {\r
+                for (final ModifyListener m : HorizontalSpinner.this.modifyListeners) {\r
+                    m.modifyText(e);\r
+                }\r
+\r
+            }\r
+        });\r
+\r
+    }\r
+\r
+    /**\r
+     * Adds the listener to the collection of listeners who will be notified when the receiver's text is modified, by sending it one of the messages defined in the <code>ModifyListener</code> interface.\r
+     * \r
+     * @param listener the listener which should be notified\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     * \r
+     * @see ModifyListener\r
+     * @see #removeModifyListener\r
+     * @see org.eclipse.swt.widgets.Spinner#addModifyListener(org.eclipse.swt.events.ModifyListener)\r
+     */\r
+\r
+    public void addModifyListener(final ModifyListener listener) {\r
+        this.checkWidget();\r
+        this.modifyListeners.add(listener);\r
+    }\r
+\r
+    /**\r
+     * Adds the listener to the collection of listeners who will be notified when the control is selected by the user, by sending it one of the messages defined in the <code>SelectionListener</code> interface.\r
+     * <p>\r
+     * <code>widgetSelected</code> is not called for texts. <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text.\r
+     * </p>\r
+     * \r
+     * @param listener the listener which should be notified when the control is selected by the user\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     * \r
+     * @see SelectionListener\r
+     * @see #removeSelectionListener\r
+     * @see SelectionEvent\r
+     */\r
+    public void addSelectionListener(final SelectionListener listener) {\r
+        this.checkWidget();\r
+        this.selectionListeners.add(listener);\r
+    }\r
+\r
+    /**\r
+     * Copies the selected text.\r
+     * <p>\r
+     * The current selection is copied to the clipboard.\r
+     * </p>\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void copy() {\r
+        this.checkWidget();\r
+        this.text.copy();\r
+    }\r
+\r
+    /**\r
+     * Cuts the selected text.\r
+     * <p>\r
+     * The current selection is first copied to the clipboard and then deleted from the widget.\r
+     * </p>\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void cut() {\r
+        this.checkWidget();\r
+        this.text.cut();\r
+    }\r
+\r
+    /**\r
+     * Returns the number of decimal places used by the receiver.\r
+     * \r
+     * @return the digits\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public int getDigits() {\r
+        this.checkWidget();\r
+        return this.digits;\r
+    }\r
+\r
+    /**\r
+     * Returns the amount that the receiver's value will be modified by when the up/down arrows are pressed.\r
+     * \r
+     * @return the increment\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public int getIncrement() {\r
+        this.checkWidget();\r
+        return this.increment;\r
+    }\r
+\r
+    /**\r
+     * Returns the maximum value which the receiver will allow.\r
+     * \r
+     * @return the maximum\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public int getMaximum() {\r
+        this.checkWidget();\r
+        return this.maximum;\r
+    }\r
+\r
+    /**\r
+     * Returns the minimum value which the receiver will allow.\r
+     * \r
+     * @return the minimum\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public int getMinimum() {\r
+        this.checkWidget();\r
+        return this.minimum;\r
+    }\r
+\r
+    /**\r
+     * Returns the amount that the receiver's position will be modified by when the page up/down keys are pressed.\r
+     * \r
+     * @return the page increment\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public int getPageIncrement() {\r
+        this.checkWidget();\r
+        return this.pageIncrement;\r
+    }\r
+\r
+    /**\r
+     * Returns the <em>selection</em>, which is the receiver's position.\r
+     * \r
+     * @return the selection\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public int getSelection() {\r
+        this.checkWidget();\r
+        return this.storedValue;\r
+\r
+    }\r
+\r
+    /**\r
+     * Returns a string containing a copy of the contents of the receiver's text field, or an empty string if there are no contents.\r
+     * \r
+     * @return the receiver's text\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     * \r
+     */\r
+    public String getText() {\r
+        this.checkWidget();\r
+        return this.text.getText();\r
+    }\r
+\r
+    /**\r
+     * Returns the maximum number of characters that the receiver's text field is capable of holding. If this has not been changed by <code>setTextLimit()</code>, it will be the constant <code>Spinner.LIMIT</code>.\r
+     * \r
+     * @return the text limit\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     * \r
+     * @see #LIMIT\r
+     */\r
+    public int getTextLimit() {\r
+        this.checkWidget();\r
+        return this.text.getTextLimit();\r
+    }\r
+\r
+    /**\r
+     * Pastes text from clipboard.\r
+     * <p>\r
+     * The selected text is deleted from the widget and new text inserted from the clipboard.\r
+     * </p>\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void paste() {\r
+        this.checkWidget();\r
+        this.text.paste();\r
+    }\r
+\r
+    /**\r
+     * Removes the listener from the collection of listeners who will be notified when the receiver's text is modified.\r
+     * \r
+     * @param listener the listener which should no longer be notified\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     * \r
+     * @see ModifyListener\r
+     * @see #addModifyListener\r
+     */\r
+    public void removeModifyListener(final ModifyListener listener) {\r
+        this.checkWidget();\r
+        this.modifyListeners.remove(listener);\r
+    }\r
+\r
+    /**\r
+     * Removes the listener from the collection of listeners who will be notified when the control is selected by the user.\r
+     * \r
+     * @param listener the listener which should no longer be notified\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     * \r
+     * @see SelectionListener\r
+     * @see #addSelectionListener\r
+     */\r
+    public void removeSelectionListener(final SelectionListener listener) {\r
+        this.checkWidget();\r
+        this.selectionListeners.remove(listener);\r
+    }\r
+\r
+    /**\r
+     * Sets the number of decimal places used by the receiver.\r
+     * <p>\r
+     * The digit setting is used to allow for floating point values in the receiver. For example, to set the selection to a floating point value of 1.37 call setDigits() with a value of 2 and setSelection() with a value of 137. Similarly, if getDigits() has a value of 2 and getSelection() returns 137 this should be interpreted as 1.37. This applies to all numeric APIs.\r
+     * </p>\r
+     * \r
+     * @param value the new digits (must be greater than or equal to zero)\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_INVALID_ARGUMENT - if the value is less than zero</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setDigits(final int value) {\r
+        this.checkWidget();\r
+        this.digits = value;\r
+        this.convertSelection();\r
+    }\r
+\r
+    /**\r
+     * Sets the amount that the receiver's value will be modified by when the up/down arrows are pressed to the argument, which must be at least one.\r
+     * \r
+     * @param value the new increment (must be greater than zero)\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setIncrement(final int value) {\r
+        this.checkWidget();\r
+        this.increment = value;\r
+    }\r
+\r
+    /**\r
+     * Sets the maximum value that the receiver will allow. This new value will be ignored if it is less than the receiver's current minimum value. If the new maximum is applied then the receiver's selection value will be adjusted if necessary to fall within its new range.\r
+     * \r
+     * @param value the new maximum, which must be greater than or equal to the current minimum\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setMaximum(final int value) {\r
+        this.checkWidget();\r
+        this.maximum = value;\r
+    }\r
+\r
+    /**\r
+     * Sets the minimum value that the receiver will allow. This new value will be ignored if it is greater than the receiver's current maximum value. If the new minimum is applied then the receiver's selection value will be adjusted if necessary to fall within its new range.\r
+     * \r
+     * @param value the new minimum, which must be less than or equal to the current maximum\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setMinimum(final int value) {\r
+        this.checkWidget();\r
+        this.minimum = value;\r
+    }\r
+\r
+    /**\r
+     * Sets the amount that the receiver's position will be modified by when the page up/down keys are pressed to the argument, which must be at least one.\r
+     * \r
+     * @param value the page increment (must be greater than zero)\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setPageIncrement(final int value) {\r
+        this.checkWidget();\r
+        this.pageIncrement = value;\r
+    }\r
+\r
+    /**\r
+     * Sets the <em>selection</em>, which is the receiver's position, to the argument. If the argument is not within the range specified by minimum and maximum, it will be adjusted to fall within this range.\r
+     * \r
+     * @param value the new selection (must be zero or greater)\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setSelection(int selection) {\r
+        this.checkWidget();\r
+        if (selection < this.minimum) {\r
+            selection = this.minimum;\r
+        } else if (selection > this.maximum) {\r
+            selection = this.maximum;\r
+        }\r
+\r
+        this.storedValue = selection;\r
+        this.text.setText(this.convertSelection());\r
+        this.text.selectAll();\r
+        this.text.setFocus();\r
+\r
+        for (final SelectionListener s : HorizontalSpinner.this.selectionListeners) {\r
+            s.widgetSelected(null);\r
+        }\r
+\r
+    }\r
+\r
+    /**\r
+     * Convert the selection into a string\r
+     * \r
+     * @return the string representation of the selection\r
+     */\r
+    private String convertSelection() {\r
+        if (this.getDigits() == 0) {\r
+            return String.valueOf(this.storedValue);\r
+        }\r
+        final String temp = String.valueOf(this.storedValue * Math.pow(10, -1 * this.getDigits()));\r
+        return temp.replace('.', this.decimalFormatSeparator);\r
+    }\r
+\r
+    /**\r
+     * Sets the maximum number of characters that the receiver's text field is capable of holding to be the argument.\r
+     * <p>\r
+     * To reset this value to the default, use <code>setTextLimit(Spinner.LIMIT)</code>. Specifying a limit value larger than <code>Spinner.LIMIT</code> sets the receiver's limit to <code>Spinner.LIMIT</code>.\r
+     * </p>\r
+     * \r
+     * @param limit new text limit\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_CANNOT_BE_ZERO - if the limit is zero</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     * \r
+     * @see #LIMIT\r
+     */\r
+    public void setTextLimit(final int limit) {\r
+        this.checkWidget();\r
+        this.text.setTextLimit(limit);\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's selection, minimum value, maximum value, digits, increment and page increment all at once.\r
+     * <p>\r
+     * Note: This is similar to setting the values individually using the appropriate methods, but may be implemented in a more efficient fashion on some platforms.\r
+     * </p>\r
+     * \r
+     * @param selection the new selection value\r
+     * @param minimum the new minimum value\r
+     * @param maximum the new maximum value\r
+     * @param digits the new digits value\r
+     * @param increment the new increment value\r
+     * @param pageIncrement the new pageIncrement value\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    public void setValues(final int selection, final int minimum, final int maximum, final int digits, final int increment, final int pageIncrement) {\r
+        this.setMinimum(minimum);\r
+        this.setMaximum(maximum);\r
+        this.setDigits(digits);\r
+        this.setIncrement(increment);\r
+        this.setPageIncrement(pageIncrement);\r
+        this.setSelection(selection);\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's drag detect state. If the argument is <code>true</code>, the receiver will detect drag gestures, otherwise these gestures will be ignored.\r
+     * \r
+     * @param dragDetect the new drag detect state\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    @Override\r
+    public boolean setFocus() {\r
+        this.checkWidget();\r
+        return this.text.setFocus();\r
+    }\r
+\r
+    /**\r
+     * Forces the receiver to have the <em>keyboard focus</em>, causing all keyboard events to be delivered to it.\r
+     * \r
+     * @return <code>true</code> if the control got focus, and <code>false</code> if it was unable to.\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     * \r
+     * @see #setFocus\r
+     */\r
+    @Override\r
+    public boolean forceFocus() {\r
+        this.checkWidget();\r
+        return this.text.forceFocus();\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's background color to the color specified by the argument, or to the default system color for the control if the argument is null.\r
+     * <p>\r
+     * Note: This operation is a hint and may be overridden by the platform. For example, on Windows the background of a Button cannot be changed.\r
+     * </p>\r
+     * \r
+     * @param color the new color (or null)\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    @Override\r
+    public void setBackground(final Color color) {\r
+        super.setBackground(color);\r
+        this.leftButton.setBackground(color);\r
+        this.rightButton.setBackground(color);\r
+        this.text.setBackground(color);\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's background image to the image specified by the argument, or to the default system color for the control if the argument is null. The background image is tiled to fill the available space.\r
+     * <p>\r
+     * Note: This operation is a hint and may be overridden by the platform. For example, on Windows the background of a Button cannot be changed.\r
+     * </p>\r
+     * \r
+     * @param image the new image (or null)\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>\r
+     *                <li>ERROR_INVALID_ARGUMENT - if the argument is not a bitmap</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    @Override\r
+    public void setBackgroundImage(final Image image) {\r
+        super.setBackgroundImage(image);\r
+        this.leftButton.setBackgroundImage(image);\r
+        this.rightButton.setBackgroundImage(image);\r
+        this.text.setBackgroundImage(image);\r
+\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's cursor to the cursor specified by the argument, or to the default cursor for that kind of control if the argument is null.\r
+     * <p>\r
+     * When the mouse pointer passes over a control its appearance is changed to match the control's cursor.\r
+     * </p>\r
+     * \r
+     * @param cursor the new cursor (or null)\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    @Override\r
+    public void setCursor(final Cursor cursor) {\r
+        super.setCursor(cursor);\r
+        this.leftButton.setCursor(cursor);\r
+        this.rightButton.setCursor(cursor);\r
+        this.text.setCursor(cursor);\r
+\r
+    }\r
+\r
+    /**\r
+     * Enables the receiver if the argument is <code>true</code>, and disables it otherwise. A disabled control is typically not selectable from the user interface and draws with an inactive or "grayed" look.\r
+     * \r
+     * @param enabled the new enabled state\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    @Override\r
+    public void setEnabled(final boolean enabled) {\r
+        super.setEnabled(enabled);\r
+        this.leftButton.setEnabled(enabled);\r
+        this.rightButton.setEnabled(enabled);\r
+        this.text.setEnabled(enabled);\r
+\r
+    }\r
+\r
+    /**\r
+     * Sets the font that the receiver will use to paint textual information to the font specified by the argument, or to the default font for that kind of control if the argument is null.\r
+     * \r
+     * @param font the new font (or null)\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    @Override\r
+    public void setFont(final Font font) {\r
+        super.setFont(font);\r
+        this.text.setFont(font);\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's foreground color to the color specified by the argument, or to the default system color for the control if the argument is null.\r
+     * <p>\r
+     * Note: This operation is a hint and may be overridden by the platform.\r
+     * </p>\r
+     * \r
+     * @param color the new color (or null)\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_INVALID_ARGUMENT - if the argument has been disposed</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    @Override\r
+    public void setForeground(final Color color) {\r
+        super.setForeground(color);\r
+        this.leftButton.setForeground(color);\r
+        this.rightButton.setForeground(color);\r
+        this.text.setForeground(color);\r
+\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's pop up menu to the argument. All controls may optionally have a pop up menu that is displayed when the user requests one for the control. The sequence of key strokes, button presses and/or button releases that are used to request a pop up menu is platform specific.\r
+     * <p>\r
+     * Note: Disposing of a control that has a pop up menu will dispose of the menu. To avoid this behavior, set the menu to null before the control is disposed.\r
+     * </p>\r
+     * \r
+     * @param menu the new pop up menu\r
+     * \r
+     * @exception IllegalArgumentException <ul>\r
+     *                <li>ERROR_MENU_NOT_POP_UP - the menu is not a pop up menu</li>\r
+     *                <li>ERROR_INVALID_PARENT - if the menu is not in the same widget tree</li>\r
+     *                <li>ERROR_INVALID_ARGUMENT - if the menu has been disposed</li>\r
+     *                </ul>\r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    @Override\r
+    public void setMenu(final Menu menu) {\r
+        super.setMenu(menu);\r
+        this.leftButton.setMenu(menu);\r
+        this.rightButton.setMenu(menu);\r
+        this.text.setMenu(menu);\r
+    }\r
+\r
+    /**\r
+     * Sets the receiver's tool tip text to the argument, which may be null indicating that the default tool tip for the control will be shown. For a control that has a default tool tip, such as the Tree control on Windows, setting the tool tip text to an empty string replaces the default, causing no tool tip text to be shown.\r
+     * <p>\r
+     * The mnemonic indicator (character '&amp;') is not displayed in a tool tip. To display a single '&amp;' in the tool tip, the character '&amp;' can be escaped by doubling it in the string.\r
+     * </p>\r
+     * \r
+     * @param string the new tool tip text (or null)\r
+     * \r
+     * @exception SWTException <ul>\r
+     *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>\r
+     *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>\r
+     *                </ul>\r
+     */\r
+    @Override\r
+    public void setToolTipText(final String tooltipText) {\r
+        super.setToolTipText(tooltipText);\r
+        this.leftButton.setToolTipText(tooltipText);\r
+        this.rightButton.setToolTipText(tooltipText);\r
+        this.text.setToolTipText(tooltipText);\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/imageSelector/ISItem.java b/org.tizen.common.externals/src/org/mihalis/opal/imageSelector/ISItem.java
new file mode 100644 (file)
index 0000000..fc91099
--- /dev/null
@@ -0,0 +1,114 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.imageSelector;\r
+\r
+import org.eclipse.swt.graphics.Point;\r
+import org.mihalis.opal.OpalItem;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class represents items manipulated by the ImageSelector\r
+ * widget\r
+ */\r
+public class ISItem extends OpalItem implements Comparable<ISItem> {\r
+\r
+       private double zPosition;\r
+       private Point upperLeftCorner;\r
+       private Point lowerRightCorner;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param fileName file name of the image that will be displayed\r
+        */\r
+       public ISItem(final String fileName) {\r
+               setImage(SWTGraphicUtil.createImage(fileName));\r
+       }\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param title the title of the image\r
+        * @param fileName file name of the image that will be displayed\r
+        */\r
+       public ISItem(final String title, final String fileName) {\r
+               setImage(SWTGraphicUtil.createImage(fileName));\r
+               setText(title);\r
+       }\r
+\r
+       /**\r
+        * @return the zPosition\r
+        */\r
+       double getzPosition() {\r
+               return this.zPosition;\r
+       }\r
+\r
+       /**\r
+        * @param zPosition the zPosition to set\r
+        */\r
+       ISItem setzPosition(final double zPosition) {\r
+               this.zPosition = zPosition;\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the upperLeftCorner\r
+        */\r
+       Point getUpperLeftCorner() {\r
+               return this.upperLeftCorner;\r
+       }\r
+\r
+       /**\r
+        * @param x the upperLeftCorner.x to set\r
+        * @param y the upperLeftCorner.y to set\r
+        */\r
+       void setUpperLeftCorner(final int x, final int y) {\r
+               this.upperLeftCorner = new Point(x, y);\r
+       }\r
+\r
+       /**\r
+        * @return the lowerRightCorner\r
+        */\r
+       Point getLowerRightCorner() {\r
+               return this.lowerRightCorner;\r
+       }\r
+\r
+       /**\r
+        * @param x the lowerRightCorner.x to set\r
+        * @param y the lowerRightCorner.y to set\r
+        */\r
+       void setLowerRightCorner(final int x, final int y) {\r
+               this.lowerRightCorner = new Point(x, y);\r
+       }\r
+\r
+       void resetCornerToNull() {\r
+               this.upperLeftCorner = null;\r
+               this.lowerRightCorner = null;\r
+\r
+       }\r
+\r
+       /**\r
+        * @see java.lang.Object#toString()\r
+        */\r
+       @Override\r
+       public String toString() {\r
+               return "ISItem [getText()=" + this.getText() + "]";\r
+       }\r
+\r
+       /**\r
+        * @see java.lang.Comparable#compareTo(java.lang.Object)\r
+        */\r
+       @Override\r
+       public int compareTo(final ISItem o) {\r
+               return new Double(Math.abs(this.zPosition)).compareTo(Math.abs(o.getzPosition())) * -1;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/imageSelector/ImageSelector.java b/org.tizen.common.externals/src/org/mihalis/opal/imageSelector/ImageSelector.java
new file mode 100755 (executable)
index 0000000..2bab62d
--- /dev/null
@@ -0,0 +1,615 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *     Romain Guy - Original Swing Implementation (http://www.curious-creature.org/2005/07/09/a-music-shelf-in-java2d/)\r
+ *******************************************************************************/\r
+package org.mihalis.opal.imageSelector;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Collections;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.DisposeEvent;\r
+import org.eclipse.swt.events.DisposeListener;\r
+import org.eclipse.swt.events.KeyAdapter;\r
+import org.eclipse.swt.events.KeyEvent;\r
+import org.eclipse.swt.events.MouseAdapter;\r
+import org.eclipse.swt.events.MouseEvent;\r
+import org.eclipse.swt.events.MouseMoveListener;\r
+import org.eclipse.swt.events.PaintEvent;\r
+import org.eclipse.swt.events.PaintListener;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.widgets.Canvas;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class are controls that allow the user to select images.\r
+ * <dl>\r
+ * <dt><b>Styles:</b></dt>\r
+ * <dd>(none)</dd>\r
+ * <dt><b>Events:</b></dt>\r
+ * <dd>(none)</dd>\r
+ * </dl>\r
+ */\r
+public class ImageSelector extends Canvas {\r
+       private List<ISItem> items;\r
+       private List<ISItem> originalItems;\r
+       private Font font;\r
+       private static final int DEFAULT_WIDTH = 148;\r
+       private int maxItemWidth = DEFAULT_WIDTH;\r
+       private int index = -1;\r
+       private double sigma;\r
+       private double rho;\r
+       private double expMultiplier;\r
+       private double expMember;\r
+       private float spacing = 0.4f;\r
+       private Color gradientStart;\r
+       private Color gradientEnd;\r
+       private double animationStep = -1d;\r
+       private static final int TIMER_INTERVAL = 50;\r
+       private int pageIncrement = 5;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a composite control which will be the parent of the new\r
+        *            instance (cannot be null)\r
+        * @param style the style of control to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        */\r
+       public ImageSelector(final Composite parent, final int style) {\r
+               super(parent, style | SWT.NO_BACKGROUND | SWT.DOUBLE_BUFFERED);\r
+               this.font = new Font(this.getDisplay(), "Lucida Sans", 24, SWT.NONE);\r
+\r
+               this.addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent e) {\r
+                               SWTGraphicUtil.dispose(ImageSelector.this.font);\r
+                               SWTGraphicUtil.dispose(ImageSelector.this.gradientStart);\r
+                               SWTGraphicUtil.dispose(ImageSelector.this.gradientEnd);\r
+                       }\r
+\r
+               });\r
+\r
+               addPaintListener(new PaintListener() {\r
+                       @Override\r
+                       public void paintControl(final PaintEvent e) {\r
+                               ImageSelector.this.paintControl(e);\r
+                       }\r
+\r
+               });\r
+\r
+               addKeyListener();\r
+               addMouseListeners();\r
+\r
+               setSigma(0.5);\r
+               this.gradientStart = new Color(getDisplay(), 0, 0, 0);\r
+               this.gradientEnd = new Color(getDisplay(), 110, 110, 110);\r
+       }\r
+\r
+       /**\r
+        * Set the sigma value for the gaussian curve\r
+        * \r
+        * @param sigma new sigma parameter\r
+        */\r
+       public void setSigma(final double sigma) {\r
+               this.sigma = sigma;\r
+               this.rho = 1.0;\r
+               computeEquationParts();\r
+               this.rho = computeModifierUnbounded(0.0);\r
+               computeEquationParts();\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * Computer both members of the equation\r
+        */\r
+       private void computeEquationParts() {\r
+               this.expMultiplier = Math.sqrt(2.0 * Math.PI) / this.sigma / this.rho;\r
+               this.expMember = 4.0 * this.sigma * this.sigma;\r
+       }\r
+\r
+       /**\r
+        * Compute the value of the modifier. The value is bounded between -1 and +1\r
+        * \r
+        * @param x input value\r
+        * @return the value of the modifier between -1 and +1\r
+        */\r
+       private double computeModifierBounded(final double x) {\r
+               double result = computeModifierUnbounded(x);\r
+               if (result > 1.0) {\r
+                       result = 1.0;\r
+               } else if (result < -1.0) {\r
+                       result = -1.0;\r
+               }\r
+               return result;\r
+       }\r
+\r
+       /**\r
+        * Compute the value of the modifier\r
+        * \r
+        * @param x input value\r
+        * @return the value of the function\r
+        */\r
+       private double computeModifierUnbounded(final double x) {\r
+               return this.expMultiplier * Math.exp(-x * x / this.expMember);\r
+       }\r
+\r
+       /**\r
+        * Draw the widget\r
+        * \r
+        * @param e the paintEvent\r
+        */\r
+       private void paintControl(final PaintEvent e) {\r
+\r
+               // Create the image to fill the canvas\r
+               final Image image = new Image(getDisplay(), getClientArea());\r
+\r
+               // Set up the offscreen gc\r
+               final GC gc = new GC(image);\r
+\r
+               // Draw gradient\r
+               drawBackground(gc);\r
+\r
+               // Draw the items\r
+               drawItems(gc);\r
+\r
+               // Draw the title\r
+               if (this.animationStep < 0d) {\r
+                       drawTitle(gc);\r
+               }\r
+\r
+               // Draw the offscreen buffer to the screen\r
+               e.gc.drawImage(image, 0, 0);\r
+\r
+               // Clean up\r
+               image.dispose();\r
+               gc.dispose();\r
+\r
+       }\r
+\r
+       /**\r
+        * Draw the background\r
+        * \r
+        * @param gc graphical context\r
+        */\r
+       private void drawBackground(final GC gc) {\r
+               final Rectangle rect = getClientArea();\r
+\r
+               gc.setForeground(this.gradientStart);\r
+               gc.setBackground(this.gradientEnd);\r
+               gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height / 2, true);\r
+\r
+               gc.setForeground(this.gradientEnd);\r
+               gc.setBackground(this.gradientStart);\r
+               gc.fillGradientRectangle(rect.x, rect.height / 2, rect.width, rect.height / 2, true);\r
+       }\r
+\r
+       /**\r
+        * Draw the items\r
+        * \r
+        * @param gc graphical context\r
+        */\r
+       private void drawItems(final GC gc) {\r
+\r
+               if (this.animationStep < 0d) {\r
+                       this.items.clear();\r
+                       this.items.addAll(this.originalItems);\r
+                       for (int i = 0; i < this.items.size(); i++) {\r
+                               final ISItem item = this.items.get(i);\r
+                               item.setzPosition((i - this.index) * this.spacing);\r
+                       }\r
+\r
+                       Collections.sort(this.items);\r
+               }\r
+\r
+               for (final ISItem item : this.items) {\r
+                       drawItem(gc, item);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Draw a given item\r
+        * \r
+        * @param gc graphical context\r
+        * @param item item to draw\r
+        */\r
+       private void drawItem(final GC gc, final ISItem item) {\r
+\r
+               final int size = computeSize(item);\r
+               final int centerX = computeZPosition(item);\r
+               final int centerY = this.getClientArea().height / 2;\r
+\r
+               if (size <= 0 || centerX < 0 || centerX > getBounds().width) {\r
+                       item.resetCornerToNull();\r
+                       return;\r
+               }\r
+\r
+               final int alpha = computeAlpha(item);\r
+\r
+               final Image newImage = SWTGraphicUtil.createReflectedResizedImage(item.getImage(), size, size);\r
+               gc.setAlpha(alpha);\r
+\r
+               final int x = centerX - newImage.getBounds().width / 2;\r
+               final int y = centerY - newImage.getBounds().height / 2;\r
+\r
+               gc.drawImage(newImage, x, y);\r
+\r
+               item.setUpperLeftCorner(x, y);\r
+               item.setLowerRightCorner(x + newImage.getBounds().width, (int) (y + newImage.getBounds().height / 1.5));\r
+\r
+               newImage.dispose();\r
+       }\r
+\r
+       /**\r
+        * Compute the z position for a given item\r
+        * \r
+        * @param item item\r
+        * @return the z position of the item\r
+        */\r
+       private int computeZPosition(final ISItem item) {\r
+               final int totalWidth = this.getClientArea().width / 2;\r
+               final int centerX = this.getClientArea().width / 2;\r
+               return (int) (centerX + item.getzPosition() * totalWidth);\r
+       }\r
+\r
+       /**\r
+        * Compute size for a given item\r
+        * \r
+        * @param item item\r
+        * @return the size of the item\r
+        */\r
+       private int computeSize(final ISItem item) {\r
+               return (int) (computeModifierBounded(item.getzPosition()) * this.maxItemWidth);\r
+       }\r
+\r
+       /**\r
+        * Compute the alpha value of a given item\r
+        * \r
+        * @param item item\r
+        * @return the alpha value of the item\r
+        */\r
+       private int computeAlpha(final ISItem item) {\r
+               return (int) (255 - 150 * Math.abs(item.getzPosition()));\r
+       }\r
+\r
+       /**\r
+        * Draw the title under the selected item\r
+        * \r
+        * @param gc graphical context\r
+        */\r
+       private void drawTitle(final GC gc) {\r
+               final String title = this.originalItems.get(this.index).getText();\r
+               if (title == null || title.trim().equals("")) {\r
+                       return;\r
+               }\r
+               gc.setFont(getFont());\r
+               final Point textSize = gc.stringExtent(title);\r
+\r
+               gc.setAntialias(SWT.ON);\r
+               gc.setFont(getFont());\r
+               gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+               gc.setAlpha(255);\r
+\r
+               final int centerX = this.getClientArea().width / 2;\r
+               final int centerY = (this.getClientArea().height + this.maxItemWidth) / 2;\r
+\r
+               gc.drawString(title, centerX - textSize.x / 2, (centerY - textSize.y / 2), true);\r
+\r
+       }\r
+\r
+       /**\r
+        * Add the key listener\r
+        */\r
+       private void addKeyListener() {\r
+               this.addKeyListener(new KeyAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.KeyAdapter#keyReleased(org.eclipse.swt.events.KeyEvent)\r
+                        */\r
+                       @Override\r
+                       public void keyReleased(final KeyEvent e) {\r
+                               switch (e.keyCode) {\r
+                               case SWT.ARROW_LEFT:\r
+                               case SWT.ARROW_UP:\r
+                                       scrollAndAnimateBy(-1);\r
+                                       break;\r
+                               case SWT.ARROW_RIGHT:\r
+                               case SWT.ARROW_DOWN:\r
+                                       scrollAndAnimateBy(1);\r
+                                       break;\r
+                               case SWT.HOME:\r
+                                       scrollBy(-1 * ImageSelector.this.index);\r
+                                       break;\r
+                               case SWT.END:\r
+                                       scrollBy(ImageSelector.this.index);\r
+                                       break;\r
+                               case SWT.PAGE_UP:\r
+                                       scrollBy(-1 * ImageSelector.this.pageIncrement);\r
+                                       break;\r
+                               case SWT.PAGE_DOWN:\r
+                                       scrollBy(ImageSelector.this.pageIncrement);\r
+                                       break;\r
+                default:\r
+                    break;\r
+                               }\r
+                       }\r
+\r
+               });\r
+       }\r
+\r
+       /**\r
+        * Scroll the selected item\r
+        * \r
+        * @param increment increment value\r
+        */\r
+       private void scrollBy(final int increment) {\r
+               this.index += increment;\r
+               if (this.index < 0) {\r
+                       this.index = 0;\r
+               }\r
+\r
+               if (this.index >= this.items.size()) {\r
+                       this.index = this.items.size() - 1;\r
+               }\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * Scroll the selected item with an animation\r
+        * \r
+        * @param increment increment value\r
+        */\r
+       private void scrollAndAnimateBy(final int increment) {\r
+               if (this.index == 0 && increment < 0 || this.index == this.items.size() - 1 && increment > 0) {\r
+                       return;\r
+               }\r
+\r
+               final double step = Math.abs(increment) / (300d / TIMER_INTERVAL);\r
+               ImageSelector.this.animationStep = step;\r
+               setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT));\r
+\r
+               getDisplay().syncExec(new Runnable() {\r
+\r
+                       @Override\r
+                       public void run() {\r
+\r
+                               ImageSelector.this.items.clear();\r
+                               ImageSelector.this.items.addAll(ImageSelector.this.originalItems);\r
+                               for (int i = 0; i < ImageSelector.this.items.size(); i++) {\r
+                                       final ISItem item = ImageSelector.this.items.get(i);\r
+                                       item.setzPosition((i - ImageSelector.this.index + ImageSelector.this.animationStep * (increment > 0 ? -1d : 1d)) * ImageSelector.this.spacing);\r
+                               }\r
+                               Collections.sort(ImageSelector.this.items);\r
+                               if (!isDisposed()) {\r
+                                       redraw();\r
+                               }\r
+\r
+                               ImageSelector.this.animationStep += step;\r
+                               if (ImageSelector.this.animationStep >= 1d) {\r
+                                       ImageSelector.this.animationStep = -1d;\r
+                                       ImageSelector.this.index += increment;\r
+                                       setCursor(getDisplay().getSystemCursor(SWT.CURSOR_ARROW));\r
+                               } else {\r
+                                       if (!isDisposed()) {\r
+                                               getDisplay().timerExec(TIMER_INTERVAL, this);\r
+                                       }\r
+                               }\r
+\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Add mouse listeners\r
+        */\r
+       private void addMouseListeners() {\r
+               addMouseMoveListener(new MouseMoveListener() {\r
+\r
+                       @Override\r
+                       public void mouseMove(final MouseEvent e) {\r
+                               for (final ISItem item : ImageSelector.this.items) {\r
+                                       if (item.getUpperLeftCorner() != null && item.getLowerRightCorner() != null && e.x >= item.getUpperLeftCorner().x && e.x <= item.getLowerRightCorner().x && e.y >= item.getUpperLeftCorner().y && e.y <= item.getLowerRightCorner().y) {\r
+                                               setCursor(getDisplay().getSystemCursor(SWT.CURSOR_HAND));\r
+                                               return;\r
+                                       }\r
+                               }\r
+                               setCursor(getDisplay().getSystemCursor(SWT.CURSOR_ARROW));\r
+                       }\r
+               });\r
+\r
+               addMouseListener(new MouseAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.MouseAdapter#mouseUp(org.eclipse.swt.events.MouseEvent)\r
+                        */\r
+                       @Override\r
+                       public void mouseUp(final MouseEvent e) {\r
+                               for (final ISItem item : ImageSelector.this.items) {\r
+                                       if (item.getUpperLeftCorner() != null && item.getLowerRightCorner() != null && e.x >= item.getUpperLeftCorner().x && e.x <= item.getLowerRightCorner().x && e.y >= item.getUpperLeftCorner().y && e.y <= item.getLowerRightCorner().y) {\r
+                                               scrollAndAnimateBy(ImageSelector.this.originalItems.indexOf(item) - ImageSelector.this.index);\r
+                                               return;\r
+                                       }\r
+                               }\r
+                       }\r
+               });\r
+\r
+               addListener(SWT.MouseWheel, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               scrollBy(-1 * event.count);\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * @return the items displayed by this widget\r
+        */\r
+       public List<ISItem> getItems() {\r
+               return this.originalItems;\r
+       }\r
+\r
+       /**\r
+        * @param items the items that are displayed in this widget to set\r
+        */\r
+       public void setItems(final List<ISItem> items) {\r
+               this.items = new ArrayList<ISItem>(items);\r
+               this.originalItems = items;\r
+               this.index = this.items.size() / 2;\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * @return the font used for the title\r
+        */\r
+       @Override\r
+       public Font getFont() {\r
+               return this.font;\r
+       }\r
+\r
+       /**\r
+        * @param font the font used for the title to set\r
+        */\r
+       @Override\r
+       public void setFont(final Font font) {\r
+               SWTGraphicUtil.dispose(this.font);\r
+               this.font = font;\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * @return the index of the selected image\r
+        */\r
+       public int getIndex() {\r
+               return this.index;\r
+       }\r
+\r
+       /**\r
+        * @param index the index of the selected image to set\r
+        */\r
+       public void setIndex(final int index) {\r
+               this.index = index;\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * @return the maximum items width\r
+        */\r
+       public int getMaxItemWidth() {\r
+               return this.maxItemWidth;\r
+       }\r
+\r
+       /**\r
+        * @param maxItemWidth the the maximum items width to set\r
+        */\r
+       public void setMaxItemWidth(final int maxItemWidth) {\r
+               this.maxItemWidth = maxItemWidth;\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * @return the sigma value\r
+        */\r
+       public double getSigma() {\r
+               return this.sigma;\r
+       }\r
+\r
+       /**\r
+        * @return the spacing between 2 items\r
+        */\r
+       public float getSpacing() {\r
+               return this.spacing;\r
+       }\r
+\r
+       /**\r
+        * @param spacing the the spacing between 2 items to set\r
+        */\r
+       public void setSpacing(final float spacing) {\r
+               this.spacing = spacing;\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * @return the gradient start color\r
+        */\r
+       public Color getGradientStart() {\r
+               return this.gradientStart;\r
+       }\r
+\r
+       /**\r
+        * @param gradientStart the the gradient start color to set\r
+        */\r
+       public void setGradientStart(final Color gradientStart) {\r
+               SWTGraphicUtil.dispose(this.gradientStart);\r
+               this.gradientStart = gradientStart;\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * @return the the gradient end color\r
+        */\r
+       public Color getGradientEnd() {\r
+               return this.gradientEnd;\r
+       }\r
+\r
+       /**\r
+        * @param gradientEnd the the gradient end color to set\r
+        */\r
+       public void setGradientEnd(final Color gradientEnd) {\r
+               SWTGraphicUtil.dispose(this.gradientEnd);\r
+               this.gradientEnd = gradientEnd;\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * @return the page increment when the user uses PgUp and PgDown\r
+        */\r
+       public int getPageIncrement() {\r
+               return this.pageIncrement;\r
+       }\r
+\r
+       /**\r
+        * @param pageIncrement the page increment to set\r
+        */\r
+       public void setPageIncrement(final int pageIncrement) {\r
+               this.pageIncrement = pageIncrement;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/infinitePanel/InfiniteProgressPanel.java b/org.tizen.common.externals/src/org/mihalis/opal/infinitePanel/InfiniteProgressPanel.java
new file mode 100644 (file)
index 0000000..e7a62de
--- /dev/null
@@ -0,0 +1,604 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation, \r
+ *     inspired by Romain Guy's work (http://www.curious-creature.org)\r
+ *******************************************************************************/\r
+package org.mihalis.opal.infinitePanel;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.DisposeEvent;\r
+import org.eclipse.swt.events.DisposeListener;\r
+import org.eclipse.swt.events.PaintEvent;\r
+import org.eclipse.swt.events.PaintListener;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.layout.FillLayout;\r
+import org.eclipse.swt.widgets.Canvas;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Shell;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class are controls located on the top of a shell. They\r
+ * display a ticker that indicates to the user that a long task operation is\r
+ * running\r
+ */\r
+public class InfiniteProgressPanel {\r
+\r
+       private static final String INFINITE_PANEL_KEY = "org.mihalis.opal.InfinitePanel.InfiniteProgressPanel";\r
+       private static final int NUMBER_OF_STEPS = 10;\r
+\r
+       private final Shell parent;\r
+       private Shell panel;\r
+       private String text;\r
+       private Font textFont;\r
+       private Color textColor;\r
+       private float fps;\r
+       private int barsCount;\r
+       private int lineWidth;\r
+       private int alpha;\r
+       private Color defaultColor;\r
+       private Color selectionColor;\r
+       private int currentPosition;\r
+       private Thread animatorThread;\r
+       private Canvas canvas;\r
+       private boolean fadeIn;\r
+       private boolean fadeOut;\r
+       private int fadeOutCounter;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent.\r
+        * \r
+        * @param shell a shell that will be the parent of the new instance (cannot\r
+        *            be null)\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the parent has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        */\r
+       private InfiniteProgressPanel(final Shell shell) {\r
+               if (shell == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (shell.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+               }\r
+\r
+               this.parent = shell;\r
+               if (shell.getData(INFINITE_PANEL_KEY) != null) {\r
+                       throw new IllegalArgumentException("This shell has already an infinite panel attached on it !");\r
+               }\r
+\r
+               this.text = null;\r
+               this.textFont = null;\r
+               this.barsCount = 14;\r
+               this.fps = 15.0f;\r
+               this.lineWidth = 16;\r
+               this.alpha = 200;\r
+               this.fadeIn = false;\r
+               this.fadeOut = false;\r
+               this.fadeOutCounter = 0;\r
+               shell.setData(INFINITE_PANEL_KEY, this);\r
+\r
+               this.parent.addListener(SWT.Activate, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event e) {\r
+                               if (InfiniteProgressPanel.this.panel != null && //\r
+                                               !InfiniteProgressPanel.this.panel.isDisposed() && !InfiniteProgressPanel.this.panel.isVisible()) {\r
+                                       InfiniteProgressPanel.this.panel.setVisible(true);\r
+                                       InfiniteProgressPanel.this.panel.setActive();\r
+                               }\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * Starts the ticker\r
+        */\r
+       public void start() {\r
+               if (this.parent.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+\r
+               this.panel = new Shell(this.parent, SWT.APPLICATION_MODAL | SWT.NO_TRIM | SWT.ON_TOP);\r
+               this.panel.setLayout(new FillLayout());\r
+               this.panel.setAlpha(0);\r
+\r
+               this.panel.addListener(SWT.KeyUp, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               event.doit = false;\r
+                       }\r
+               });\r
+\r
+               if (this.defaultColor == null) {\r
+                       this.defaultColor = new Color(this.parent.getDisplay(), 200, 200, 200);\r
+               }\r
+\r
+               if (this.selectionColor == null) {\r
+                       this.selectionColor = new Color(this.parent.getDisplay(), 0, 0, 0);\r
+               }\r
+\r
+               this.parent.addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent e) {\r
+                               SWTGraphicUtil.dispose(InfiniteProgressPanel.this.defaultColor);\r
+                               SWTGraphicUtil.dispose(InfiniteProgressPanel.this.selectionColor);\r
+                       }\r
+               });\r
+\r
+               this.currentPosition = 0;\r
+               this.fadeIn = true;\r
+               this.fadeOut = false;\r
+               this.fadeOutCounter = 0;\r
+\r
+               this.canvas = new Canvas(this.panel, SWT.NO_BACKGROUND | SWT.DOUBLE_BUFFERED);\r
+               this.canvas.addPaintListener(new PaintListener() {\r
+\r
+                       @Override\r
+                       public void paintControl(final PaintEvent e) {\r
+                               InfiniteProgressPanel.this.paintCanvas(e);\r
+                       }\r
+               });\r
+\r
+               this.panel.setBounds(this.panel.getDisplay().map(this.parent, null, this.parent.getClientArea()));\r
+               this.panel.open();\r
+\r
+               this.animatorThread = new Thread() {\r
+\r
+                       /**\r
+                        * @see java.lang.Thread#run()\r
+                        */\r
+                       @Override\r
+                       public void run() {\r
+                               while (!Thread.interrupted()) {\r
+                                       InfiniteProgressPanel.this.currentPosition = (InfiniteProgressPanel.this.currentPosition + 1) % InfiniteProgressPanel.this.barsCount;\r
+                                       if (InfiniteProgressPanel.this.fadeOut) {\r
+                                               InfiniteProgressPanel.this.fadeOutCounter++;\r
+                                       }\r
+                                       InfiniteProgressPanel.this.panel.getDisplay().asyncExec(new Runnable() {\r
+\r
+                                               @Override\r
+                                               public void run() {\r
+                                                       InfiniteProgressPanel.this.canvas.redraw();\r
+                                               }\r
+                                       });\r
+\r
+                                       try {\r
+                                               sleep(InfiniteProgressPanel.this.fadeOut ? 20 : (long) (1000 / InfiniteProgressPanel.this.fps));\r
+                                       } catch (final InterruptedException e) {\r
+                                               break;\r
+                                       }\r
+                               }\r
+                       }\r
+               };\r
+               this.animatorThread.start();\r
+\r
+               this.panel.addListener(SWT.Deactivate, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event arg0) {\r
+                               InfiniteProgressPanel.this.panel.setVisible(false);\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Paint the canvas that holds the ticker\r
+        * \r
+        * @param e\r
+        */\r
+       private void paintCanvas(final PaintEvent e) {\r
+               // Paint the panel\r
+               final Rectangle clientArea = ((Canvas) e.widget).getClientArea();\r
+               final GC gc = e.gc;\r
+\r
+               this.handleFadeIn();\r
+               this.handleFadeOut();\r
+               this.drawBackground(clientArea, gc);\r
+               this.drawTicker(clientArea, gc);\r
+               this.drawText(clientArea, gc);\r
+\r
+       }\r
+\r
+       /**\r
+        * Handle the fade in effect of the panel\r
+        */\r
+       private void handleFadeIn() {\r
+               if (this.fadeIn) {\r
+                       if (this.currentPosition == NUMBER_OF_STEPS) {\r
+                               this.fadeIn = false;\r
+                               this.panel.setAlpha(this.alpha);\r
+                       } else {\r
+                               this.panel.setAlpha(this.currentPosition * this.alpha / NUMBER_OF_STEPS);\r
+                       }\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Handle the fade out effect of the panel\r
+        */\r
+       private void handleFadeOut() {\r
+               if (this.fadeOut) {\r
+                       if (this.fadeOutCounter == NUMBER_OF_STEPS) {\r
+                               if (this.animatorThread != null) {\r
+                                       this.animatorThread.interrupt();\r
+                                       this.animatorThread = null;\r
+                               }\r
+                               if (!this.panel.isDisposed()) {\r
+                                       this.panel.getDisplay().asyncExec(new Runnable() {\r
+\r
+                                               @Override\r
+                                               public void run() {\r
+                                                       if (!InfiniteProgressPanel.this.panel.isDisposed()) {\r
+                                                               InfiniteProgressPanel.this.panel.dispose();\r
+                                                       }\r
+                                               }\r
+                                       });\r
+                               }\r
+                       }\r
+                       this.panel.setAlpha(255 - this.fadeOutCounter * this.alpha / NUMBER_OF_STEPS);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Draw the background of the panel\r
+        * \r
+        * @param gc GC on with the background is drawn\r
+        * @param clientArea client area of the canvas\r
+        */\r
+       private void drawBackground(final Rectangle clientArea, final GC gc) {\r
+               // Draw the background\r
+               gc.setBackground(this.panel.getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+               gc.fillRectangle(clientArea);\r
+       }\r
+\r
+       /**\r
+        * Draw the ticker\r
+        * \r
+        * @param gc GC on with the ticker is drawn\r
+        * @param clientArea client area of the canvas\r
+        */\r
+       private void drawTicker(final Rectangle clientArea, final GC gc) {\r
+               // Draw the ticker\r
+               final int centerX = clientArea.width / 2;\r
+               final int centerY = clientArea.height / 2;\r
+               final int maxRay = (int) (Math.min(clientArea.width, clientArea.height) * 0.6f) / 2;\r
+               final int minRay = (int) (maxRay * 0.5f);\r
+\r
+               double angle = Math.PI / 2;\r
+\r
+               gc.setLineCap(SWT.CAP_ROUND);\r
+               gc.setLineWidth(this.lineWidth);\r
+               gc.setAntialias(SWT.ON);\r
+\r
+               for (int i = 0; i < this.barsCount; i++) {\r
+                       if (i == this.currentPosition) {\r
+                               gc.setForeground(this.selectionColor);\r
+                       } else {\r
+                               gc.setForeground(this.defaultColor);\r
+                       }\r
+                       gc.drawLine((int) (centerX + minRay * Math.cos(angle)), //\r
+                                       (int) (centerY - minRay * Math.sin(angle)), //\r
+                                       (int) (centerX + maxRay * Math.cos(angle)), //\r
+                                       (int) (centerY - maxRay * Math.sin(angle)));\r
+                       angle -= 2 * Math.PI / this.barsCount;\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Draw the text over the ticker\r
+        * \r
+        * @param gc GC on with the text is drawn\r
+        * @param clientArea client area of the canvas\r
+        */\r
+       private void drawText(final Rectangle clientArea, final GC gc) {\r
+               if (this.text == null || "".equals(this.text)) {\r
+                       return;\r
+               }\r
+\r
+               final Font font;\r
+               if (this.textFont == null) {\r
+                       font = this.parent.getDisplay().getSystemFont();\r
+               } else {\r
+                       font = this.textFont;\r
+               }\r
+\r
+               final Color color;\r
+               if (this.textColor == null) {\r
+                       color = this.parent.getDisplay().getSystemColor(SWT.COLOR_BLACK);\r
+               } else {\r
+                       color = this.textColor;\r
+               }\r
+\r
+               gc.setForeground(color);\r
+               gc.setFont(font);\r
+               gc.setTextAntialias(SWT.ON);\r
+               final Point textSize = gc.textExtent(this.text, SWT.DRAW_TRANSPARENT);\r
+               final int textWidth = textSize.x;\r
+               final int textHeight = textSize.y;\r
+\r
+               gc.drawString(this.text, (clientArea.width - textWidth) / 2, (clientArea.height - textHeight) / 2, true);\r
+\r
+       }\r
+\r
+       /**\r
+        * Stop the animation and dispose the panel\r
+        */\r
+       public void stop() {\r
+               if (this.panel.isDisposed() || this.panel.getDisplay().isDisposed()) {\r
+                       return;\r
+               }\r
+               this.fadeOut = true;\r
+       }\r
+\r
+       /**\r
+        * Returns the infinite progress panel for the shell. If no infinite panel\r
+        * has been declared, returns null.\r
+        * \r
+        * @param shell the shell for which we are trying to get the associated\r
+        *            progess panel\r
+        * @return the progress panel associated to shell, or null if there is no\r
+        *         progress panel\r
+        */\r
+       public static InfiniteProgressPanel getInfiniteProgressPanelFor(final Shell shell) {\r
+               if (shell == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (shell.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+\r
+               if (shell.getDisplay().isDisposed()) {\r
+                       SWT.error(SWT.ERROR_DEVICE_DISPOSED);\r
+               }\r
+\r
+               final InfiniteProgressPanel[] temp = new InfiniteProgressPanel[1];\r
+               shell.getDisplay().syncExec(new Runnable() {\r
+\r
+                       @Override\r
+                       public void run() {\r
+                               final Object data = shell.getData(INFINITE_PANEL_KEY);\r
+                               if (data != null && data instanceof InfiniteProgressPanel) {\r
+                                       temp[0] = (InfiniteProgressPanel) data;\r
+                               }\r
+                       }\r
+               });\r
+\r
+               if (temp[0] == null) {\r
+                       return new InfiniteProgressPanel(shell);\r
+               } else {\r
+                       return temp[0];\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Check if a shell has an associated progress panel\r
+        * \r
+        * @param shell the shell\r
+        * @return <code>true</code> if the shell has an associated panel,\r
+        *         <code>false</code> otherwise\r
+        */\r
+       public static boolean hasInfiniteProgressPanel(final Shell shell) {\r
+               return getInfiniteProgressPanelFor(shell) != null;\r
+       }\r
+\r
+       // ------------------------------------------------- Getters and Setters\r
+\r
+       /**\r
+        * @return the alpha value of the panel\r
+        */\r
+       public int getAlpha() {\r
+               return this.alpha;\r
+       }\r
+\r
+       /**\r
+        * @param alpha the alpha value of the panel, between 0 and 255\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the animation is running</li>\r
+        *                </ul>\r
+        */\r
+       public void setAlpha(final int alpha) {\r
+               if (alpha < 0 || alpha > 255) {\r
+                       SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+               }\r
+               this.checkIfAnimationIsRunning();\r
+               this.alpha = alpha;\r
+       }\r
+\r
+       /**\r
+        * Check if the animation is running\r
+        */\r
+       private void checkIfAnimationIsRunning() {\r
+               if (this.animatorThread != null) {\r
+                       SWT.error(SWT.ERROR_INVALID_ARGUMENT, null, "Can not change this value when an animation is running");\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @return the number of bars displayed in the ticker\r
+        */\r
+       public int getBarsCount() {\r
+               return this.barsCount;\r
+       }\r
+\r
+       /**\r
+        * @param barsCount the number of bars displayed in the ticker\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the animation is running</li>\r
+        *                </ul>\r
+        */\r
+       public void setBarsCount(final int barsCount) {\r
+               this.checkIfAnimationIsRunning();\r
+               this.barsCount = barsCount;\r
+       }\r
+\r
+       /**\r
+        * @return the default color for the ticker's bars\r
+        */\r
+       public Color getDefaultColor() {\r
+               return this.defaultColor;\r
+       }\r
+\r
+       /**\r
+        * @param defaultColor the new default color for the ticker's bars. Please\r
+        *            notice that the previous color is disposed.\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the animation is running</li>\r
+        *                </ul>\r
+        */\r
+       public void setDefaultColor(final Color defaultColor) {\r
+               this.checkIfAnimationIsRunning();\r
+               SWTGraphicUtil.dispose(this.defaultColor);\r
+               this.defaultColor = defaultColor;\r
+       }\r
+\r
+       /**\r
+        * @return the number of frame per second for the animation\r
+        */\r
+       public float getFps() {\r
+               return this.fps;\r
+       }\r
+\r
+       /**\r
+        * @param fps the new frame per second value\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the animation is running</li>\r
+        *                </ul>\r
+        */\r
+       public void setFps(final float fps) {\r
+               this.checkIfAnimationIsRunning();\r
+               this.fps = fps;\r
+       }\r
+\r
+       /**\r
+        * @return the line width of the bars that compose the ticker\r
+        */\r
+       public int getLineWidth() {\r
+               return this.lineWidth;\r
+       }\r
+\r
+       /**\r
+        * @param lineWidth the line width of the bars that compose the ticker\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the animation is running</li>\r
+        *                </ul>\r
+        */\r
+       public void setLineWidth(final int lineWidth) {\r
+               this.checkIfAnimationIsRunning();\r
+               this.lineWidth = lineWidth;\r
+       }\r
+\r
+       /**\r
+        * @return the selection color of the ticker's bars\r
+        */\r
+       public Color getSelectionColor() {\r
+               return this.selectionColor;\r
+       }\r
+\r
+       /**\r
+        * @param selectionColor the new selection color for the ticker's bars.\r
+        *            Please notice that the previous color is disposed.\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the animation is running</li>\r
+        *                </ul>\r
+        */\r
+       public void setSelectionColor(final Color selectionColor) {\r
+               this.checkIfAnimationIsRunning();\r
+               SWTGraphicUtil.dispose(this.selectionColor);\r
+               this.selectionColor = selectionColor;\r
+       }\r
+\r
+       /**\r
+        * @return the displayed text\r
+        */\r
+       public String getText() {\r
+               return this.text;\r
+       }\r
+\r
+       /**\r
+        * @param text set the text to display\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the animation is running</li>\r
+        *                </ul>\r
+        */\r
+       public void setText(final String text) {\r
+               this.checkIfAnimationIsRunning();\r
+               this.text = text;\r
+       }\r
+\r
+       /**\r
+        * @return the text color\r
+        */\r
+       public Color getTextColor() {\r
+               return this.textColor;\r
+       }\r
+\r
+       /**\r
+        * @param textColor the text color. Please notice that the previous color is\r
+        *            disposed.\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the animation is running</li>\r
+        *                </ul>\r
+        */\r
+       public void setTextColor(final Color textColor) {\r
+               this.checkIfAnimationIsRunning();\r
+               SWTGraphicUtil.dispose(this.textColor);\r
+               this.textColor = textColor;\r
+       }\r
+\r
+       /**\r
+        * @return the text font\r
+        */\r
+       public Font getTextFont() {\r
+               return this.textFont;\r
+       }\r
+\r
+       /**\r
+        * @param textFont the new text font. Please notice that the previous font\r
+        *            set is disposed.\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the animation is running</li>\r
+        *                </ul>\r
+        */\r
+       public void setTextFont(final Font textFont) {\r
+               this.checkIfAnimationIsRunning();\r
+               if (this.textFont != null && !this.textFont.isDisposed()) {\r
+                       this.textFont.dispose();\r
+               }\r
+               this.textFont = textFont;\r
+\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/itemSelector/DLItem.java b/org.tizen.common.externals/src/org/mihalis/opal/itemSelector/DLItem.java
new file mode 100644 (file)
index 0000000..953226f
--- /dev/null
@@ -0,0 +1,105 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.itemSelector;\r
+\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.mihalis.opal.OpalItem;\r
+\r
+/**\r
+ * Instances of this class represents items manipulated by this DualList widget\r
+ */\r
+public class DLItem extends OpalItem {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param text the text displayed in the DualList widget for this item\r
+        */\r
+       public DLItem(final String text) {\r
+               this.setText(text);\r
+       }\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param text the text displayed in the DualList widget for this item\r
+        * @param image the image displayed in the DualList widget for this item\r
+        */\r
+       public DLItem(final String text, final Image image) {\r
+               this.setText(text);\r
+               this.setImage(image);\r
+       }\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param text the text displayed in the DualList widget for this item\r
+        * @param image the image displayed in the DualList widget for this item\r
+        * @param font the font displayed in the DualList widget for this item\r
+        * @param foregroundColor the foreground color displayed in the DualList\r
+        *            widget for this item\r
+        */\r
+       public DLItem(final String text, final Image image, final Font font, final Color foregroundColor) {\r
+               this.setText(text);\r
+               this.setImage(image);\r
+               this.setFont(font);\r
+               this.setForeground(foregroundColor);\r
+       }\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param text the text displayed in the DualList widget for this item\r
+        * @param image the image displayed in the DualList widget for this item\r
+        * @param foregroundColor the foreground color displayed in the DualList\r
+        *            widget for this item\r
+        * @param backgroundColor the background color displayed in the DualList\r
+        *            widget for this item\r
+        */\r
+       public DLItem(final String text, final Image image, final Color foregroundColor, final Color backgroundColor) {\r
+               this.setText(text);\r
+               this.setImage(image);\r
+               this.setForeground(foregroundColor);\r
+               this.setBackground(backgroundColor);\r
+       }\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param text the text displayed in the DualList widget for this item\r
+        * @param image the image displayed in the DualList widget for this item\r
+        * @param font the font displayed in the DualList widget for this item\r
+        */\r
+       public DLItem(final String text, final Image image, final Font font) {\r
+               this.setText(text);\r
+               this.setImage(image);\r
+               this.setFont(font);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.OpalItem#getHeight()\r
+        */\r
+       @Override\r
+       public int getHeight() {\r
+               throw new UnsupportedOperationException("DLItem does not support this method");\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.OpalItem#setHeight(int)\r
+        */\r
+       @Override\r
+       public void setHeight(final int height) {\r
+               throw new UnsupportedOperationException("DLItem does not support this method");\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/itemSelector/DualList.java b/org.tizen.common.externals/src/org/mihalis/opal/itemSelector/DualList.java
new file mode 100644 (file)
index 0000000..8b6b902
--- /dev/null
@@ -0,0 +1,1265 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.itemSelector;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.DisposeEvent;\r
+import org.eclipse.swt.events.DisposeListener;\r
+import org.eclipse.swt.events.MouseAdapter;\r
+import org.eclipse.swt.events.MouseEvent;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Table;\r
+import org.eclipse.swt.widgets.TableColumn;\r
+import org.eclipse.swt.widgets.TableItem;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+import org.mihalis.opal.utils.SimpleSelectionAdapter;\r
+\r
+/**\r
+ * Instances of this class are controls that allow the user to select multiple\r
+ * elements.\r
+ * <dl>\r
+ * <dt><b>Styles:</b></dt>\r
+ * <dd>(none)</dd>\r
+ * <dt><b>Events:</b></dt>\r
+ * <dd>Selection</dd>\r
+ * </dl>\r
+ */\r
+\r
+public class DualList extends Composite {\r
+\r
+       private final List<DLItem> items;\r
+       private final List<DLItem> selection;\r
+\r
+       private final Table itemsTable;\r
+       private final Table selectionTable;\r
+\r
+       private List<SelectionListener> eventTable;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a composite control which will be the parent of the new\r
+        *            instance (cannot be null)\r
+        * @param style the style of control to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        */\r
+       public DualList(final Composite parent, final int style) {\r
+               super(parent, style);\r
+               this.items = new ArrayList<DLItem>();\r
+               this.selection = new ArrayList<DLItem>();\r
+\r
+               this.setLayout(new GridLayout(4, false));\r
+               this.itemsTable = this.createTable();\r
+               this.itemsTable.addMouseListener(new MouseAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.MouseAdapter#mouseDoubleClick(org.eclipse.swt.events.MouseEvent)\r
+                        */\r
+                       @Override\r
+                       public void mouseDoubleClick(final MouseEvent event) {\r
+                               DualList.this.selectItem();\r
+                       }\r
+\r
+               });\r
+               final Button buttonSelectAll = this.createButton("double_right.png", true, GridData.END);\r
+               buttonSelectAll.addSelectionListener(new SimpleSelectionAdapter() {\r
+\r
+                       @Override\r
+                       public void handle(final SelectionEvent e) {\r
+                               DualList.this.selectAll();\r
+                       }\r
+               });\r
+\r
+               this.selectionTable = this.createTable();\r
+               this.selectionTable.addMouseListener(new MouseAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.MouseAdapter#mouseDoubleClick(org.eclipse.swt.events.MouseEvent)\r
+                        */\r
+                       @Override\r
+                       public void mouseDoubleClick(final MouseEvent event) {\r
+                               DualList.this.deselectItem();\r
+                       }\r
+\r
+               });\r
+\r
+               final Button buttonMoveFirst = this.createButton("double_up.png", true, GridData.END);\r
+               buttonMoveFirst.addSelectionListener(new SimpleSelectionAdapter() {\r
+\r
+                       @Override\r
+                       public void handle(final SelectionEvent e) {\r
+                               DualList.this.moveSelectionToFirstPosition();\r
+                       }\r
+               });\r
+\r
+               final Button buttonSelect = this.createButton("arrow_right.png", false, GridData.CENTER);\r
+               buttonSelect.addSelectionListener(new SimpleSelectionAdapter() {\r
+\r
+                       @Override\r
+                       public void handle(final SelectionEvent e) {\r
+                               DualList.this.selectItem();\r
+                       }\r
+               });\r
+\r
+               final Button buttonMoveUp = this.createButton("arrow_up.png", false, GridData.CENTER);\r
+               buttonMoveUp.addSelectionListener(new SimpleSelectionAdapter() {\r
+\r
+                       @Override\r
+                       public void handle(final SelectionEvent e) {\r
+                               DualList.this.moveUpItem();\r
+                       }\r
+               });\r
+\r
+               final Button buttonDeselect = this.createButton("arrow_left.png", false, GridData.CENTER);\r
+               buttonDeselect.addSelectionListener(new SimpleSelectionAdapter() {\r
+\r
+                       @Override\r
+                       public void handle(final SelectionEvent e) {\r
+                               DualList.this.deselectItem();\r
+                       }\r
+               });\r
+\r
+               final Button buttonMoveDown = this.createButton("arrow_down.png", false, GridData.CENTER);\r
+               buttonMoveDown.addSelectionListener(new SimpleSelectionAdapter() {\r
+\r
+                       @Override\r
+                       public void handle(final SelectionEvent e) {\r
+                               DualList.this.moveDownItem();\r
+                       }\r
+               });\r
+\r
+               final Button buttonDeselectAll = this.createButton("double_left.png", false, GridData.BEGINNING);\r
+               buttonDeselectAll.addSelectionListener(new SimpleSelectionAdapter() {\r
+\r
+                       @Override\r
+                       public void handle(final SelectionEvent e) {\r
+                               DualList.this.deselectAll();\r
+                       }\r
+               });\r
+\r
+               final Button buttonMoveLast = this.createButton("double_down.png", true, GridData.BEGINNING);\r
+               buttonMoveLast.addSelectionListener(new SimpleSelectionAdapter() {\r
+\r
+                       @Override\r
+                       public void handle(final SelectionEvent e) {\r
+                               DualList.this.moveSelectionToLastPosition();\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * @return a table that will contain data\r
+        */\r
+       private Table createTable() {\r
+               final Table table = new Table(this, SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.FULL_SELECTION);\r
+               table.setLinesVisible(false);\r
+               table.setHeaderVisible(false);\r
+               final GridData gd = new GridData(GridData.FILL, GridData.FILL, true, true, 1, 4);\r
+               gd.widthHint = 200;\r
+               table.setLayoutData(gd);\r
+               new TableColumn(table, SWT.CENTER);\r
+               new TableColumn(table, SWT.LEFT);\r
+               table.setData(-1);\r
+               return table;\r
+       }\r
+\r
+       /**\r
+        * Create a button\r
+        * \r
+        * @param fileName file name of the icon\r
+        * @param verticalExpand if <code>true</code>, the button will take all the\r
+        *            available space vertically\r
+        * @param alignment button alignment\r
+        * @return a new button\r
+        */\r
+       private Button createButton(final String fileName, final boolean verticalExpand, final int alignment) {\r
+               final Button button = new Button(this, SWT.PUSH);\r
+               final Image image = new Image(this.getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/" + fileName));\r
+               button.setImage(image);\r
+               button.setLayoutData(new GridData(GridData.CENTER, alignment, false, verticalExpand));\r
+               button.addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent e) {\r
+                               SWTGraphicUtil.dispose(image);\r
+                       }\r
+               });\r
+               return button;\r
+       }\r
+\r
+       /**\r
+        * Adds the argument to the end of the receiver's list.\r
+        * \r
+        * @param item the new item\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the item is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see #add(DLItem,int)\r
+        */\r
+       public void add(final DLItem item) {\r
+               this.checkWidget();\r
+               if (item == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               this.items.add(item);\r
+       }\r
+\r
+       /**\r
+        * Adds the argument to the receiver's list at the given zero-relative\r
+        * index.\r
+        * <p>\r
+        * Note: To add an item at the end of the list, use the result of calling\r
+        * <code>getItemCount()</code> as the index or use <code>add(DLItem)</code>.\r
+        * </p>\r
+        * \r
+        * @param item the new item\r
+        * @param index the index for the item\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the item is null</li>\r
+        *                <li>ERROR_INVALID_RANGE - if the index is not between 0\r
+        *                and the number of elements in the list (inclusive)</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see #add(String)\r
+        */\r
+       public void add(final DLItem item, final int index) {\r
+               this.checkWidget();\r
+               if (item == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               if (index <= 0 || index >= this.items.size()) {\r
+                       SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+               }\r
+               this.items.add(index, item);\r
+       }\r
+\r
+       /**\r
+        * Adds the listener to the collection of listeners who will be notified\r
+        * when the user changes the receiver's selection, by sending it one of the\r
+        * messages defined in the <code>SelectionListener</code> interface.\r
+        * \r
+        * @param listener the listener which should be notified\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see SelectionListener\r
+        * @see #removeSelectionListener\r
+        * @see SelectionEvent\r
+        */\r
+       public void addSelectionListener(final SelectionListener listener) {\r
+               this.checkWidget();\r
+               if (listener == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               if (this.eventTable == null) {\r
+                       this.eventTable = new ArrayList<SelectionListener>();\r
+               }\r
+               this.eventTable.add(listener);\r
+       }\r
+\r
+       /**\r
+        * Removes the listener from the collection of listeners who will be\r
+        * notified when the user changes the receiver's selection.\r
+        * \r
+        * @param listener the listener which should no longer be notified\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see SelectionListener\r
+        * @see #addSelectionListener\r
+        */\r
+       public void removeSelectionListener(final SelectionListener listener) {\r
+               this.checkWidget();\r
+               if (listener == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               if (this.eventTable == null) {\r
+                       return;\r
+               }\r
+               this.eventTable.remove(listener);\r
+       }\r
+\r
+       /**\r
+        * Deselects the item at the given zero-relative index in the receiver. If\r
+        * the item at the index was already deselected, it remains deselected.\r
+        * Indices that are out of range are ignored.\r
+        * \r
+        * @param index the index of the item to deselect\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void deselect(final int index) {\r
+               this.checkWidget();\r
+               if (index <= 0 || index >= this.items.size()) {\r
+                       return;\r
+               }\r
+               this.fireEvents(this.selection.remove(index));\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Deselects the items at the given zero-relative indices in the receiver.\r
+        * If the item at the given zero-relative index in the receiver is selected,\r
+        * it is deselected. If the item at the index was not selected, it remains\r
+        * deselected. Indices that are out of range and duplicate indices are\r
+        * ignored.\r
+        * \r
+        * @param indices the array of indices for the items to deselect\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the set of indices is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void deselect(final int[] indices) {\r
+               this.checkWidget();\r
+               if (indices == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               final List<DLItem> toBeRemoved = new ArrayList<DLItem>();\r
+\r
+               for (final int index : indices) {\r
+                       if (index <= 0 || index >= this.items.size()) {\r
+                               continue;\r
+                       }\r
+                       toBeRemoved.add(this.selection.get(index));\r
+               }\r
+\r
+               for (final DLItem item : toBeRemoved) {\r
+                       this.selection.remove(item);\r
+               }\r
+               toBeRemoved.clear();\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Deselects the items at the given zero-relative indices in the receiver.\r
+        * If the item at the given zero-relative index in the receiver is selected,\r
+        * it is deselected. If the item at the index was not selected, it remains\r
+        * deselected. The range of the indices is inclusive. Indices that are out\r
+        * of range are ignored.\r
+        * \r
+        * @param start the start index of the items to deselect\r
+        * @param end the end index of the items to deselect\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_RANGE - if start is greater than end</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void deselect(final int start, final int end) {\r
+               this.checkWidget();\r
+               if (start > end) {\r
+                       SWT.error(SWT.ERROR_INVALID_RANGE);\r
+               }\r
+               final List<DLItem> toBeRemoved = new ArrayList<DLItem>();\r
+\r
+               for (int index = start; index <= end; index++) {\r
+                       if (index <= 0 || index >= this.items.size()) {\r
+                               continue;\r
+                       }\r
+                       toBeRemoved.add(this.selection.get(index));\r
+               }\r
+\r
+               for (final DLItem item : toBeRemoved) {\r
+                       this.selection.remove(item);\r
+               }\r
+               toBeRemoved.clear();\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Deselects all selected items in the receiver.\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void deselectAll() {\r
+               this.checkWidget();\r
+               this.items.addAll(this.selection);\r
+               this.selection.clear();\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Returns the item at the given, zero-relative index in the receiver.\r
+        * Throws an exception if the index is out of range.\r
+        * \r
+        * @param index the index of the item to return\r
+        * @return the item at the given index\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_RANGE - if the index is not between 0\r
+        *                and the number of elements in the list minus 1 (inclusive)\r
+        *                </li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+\r
+       public DLItem getItem(final int index) {\r
+               this.checkWidget();\r
+               if (index <= 0 || index >= this.items.size()) {\r
+                       SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+               }\r
+               return this.items.get(index);\r
+       }\r
+\r
+       /**\r
+        * Returns the number of items contained in the receiver.\r
+        * \r
+        * @return the number of items\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public int getItemCount() {\r
+               this.checkWidget();\r
+               return this.items.size();\r
+       }\r
+\r
+       /**\r
+        * Returns a (possibly empty) array of <code>DLItem</code>s which are the\r
+        * items in the receiver.\r
+        * <p>\r
+        * Note: This is not the actual structure used by the receiver to maintain\r
+        * its list of items, so modifying the array will not affect the receiver.\r
+        * </p>\r
+        * \r
+        * @return the items in the receiver's list\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public DLItem[] getItems() {\r
+               this.checkWidget();\r
+               return this.items.toArray(new DLItem[this.items.size()]);\r
+       }\r
+\r
+       /**\r
+        * Returns a (possibly empty) list of <code>DLItem</code>s which are the\r
+        * items in the receiver.\r
+        * <p>\r
+        * Note: This is not the actual structure used by the receiver to maintain\r
+        * its list of items, so modifying the array will not affect the receiver.\r
+        * </p>\r
+        * \r
+        * @return the items in the receiver's list\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public List<DLItem> getItemsAsList() {\r
+               this.checkWidget();\r
+               return new ArrayList<DLItem>(this.items);\r
+       }\r
+\r
+       /**\r
+        * Returns an array of <code>DLItem</code>s that are currently selected in\r
+        * the receiver. An empty array indicates that no items are selected.\r
+        * <p>\r
+        * Note: This is not the actual structure used by the receiver to maintain\r
+        * its selection, so modifying the array will not affect the receiver.\r
+        * </p>\r
+        * \r
+        * @return an array representing the selection\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public DLItem[] getSelection() {\r
+               this.checkWidget();\r
+               return this.selection.toArray(new DLItem[this.items.size()]);\r
+       }\r
+\r
+       /**\r
+        * Returns a list of <code>DLItem</code>s that are currently selected in the\r
+        * receiver. An empty array indicates that no items are selected.\r
+        * <p>\r
+        * Note: This is not the actual structure used by the receiver to maintain\r
+        * its selection, so modifying the array will not affect the receiver.\r
+        * </p>\r
+        * \r
+        * @return an array representing the selection\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public List<DLItem> getSelectionAsList() {\r
+               this.checkWidget();\r
+               return new ArrayList<DLItem>(this.selection);\r
+       }\r
+\r
+       /**\r
+        * Returns the number of selected items contained in the receiver.\r
+        * \r
+        * @return the number of selected items\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public int getSelectionCount() {\r
+               this.checkWidget();\r
+               return this.selection.size();\r
+       }\r
+\r
+       /**\r
+        * Removes the item from the receiver at the given zero-relative index.\r
+        * \r
+        * @param index the index for the item\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_RANGE - if the index is not between 0\r
+        *                and the number of elements in the list minus 1 (inclusive)\r
+        *                </li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void remove(final int index) {\r
+               this.checkWidget();\r
+               if (index <= 0 || index >= this.items.size()) {\r
+                       SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+               }\r
+               this.items.remove(index);\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Removes the items from the receiver at the given zero-relative indices.\r
+        * \r
+        * @param indices the array of indices of the items\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_RANGE - if the index is not between 0\r
+        *                and the number of elements in the list minus 1 (inclusive)\r
+        *                </li>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the indices array is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void remove(final int[] indices) {\r
+               this.checkWidget();\r
+               for (final int index : indices) {\r
+                       if (index <= 0 || index >= this.items.size()) {\r
+                               SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+                       }\r
+                       this.items.remove(index);\r
+               }\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Removes the items from the receiver which are between the given\r
+        * zero-relative start and end indices (inclusive).\r
+        * \r
+        * @param start the start of the range\r
+        * @param end the end of the range\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_RANGE - if either the start or end are\r
+        *                not between 0 and the number of elements in the list minus\r
+        *                1 (inclusive) or if start>end</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void remove(final int start, final int end) {\r
+               this.checkWidget();\r
+               if (start > end) {\r
+                       SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+               }\r
+               for (int index = start; index <= end; index++) {\r
+                       if (index <= 0 || index >= this.items.size()) {\r
+                               SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+                       }\r
+                       this.items.remove(index);\r
+               }\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Searches the receiver's list starting at the first item until an item is\r
+        * found that is equal to the argument, and removes that item from the list.\r
+        * \r
+        * @param item the item to remove\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the item is null</li>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the item is not found in\r
+        *                the list</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void remove(final DLItem item) {\r
+               this.checkWidget();\r
+               if (item == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               if (!this.items.contains(item)) {\r
+                       SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+               }\r
+               this.items.remove(item);\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Removes all of the items from the receiver.\r
+        * <p>\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - if not\r
+        *                called from the thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void removeAll() {\r
+               this.checkWidget();\r
+               this.items.clear();\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Selects the item at the given zero-relative index in the receiver's list.\r
+        * If the item at the index was already selected, it remains selected.\r
+        * Indices that are out of range are ignored.\r
+        * \r
+        * @param index the index of the item to select\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void select(final int index) {\r
+               this.checkWidget();\r
+               if (index <= 0 || index >= this.items.size()) {\r
+                       return;\r
+               }\r
+               this.selection.add(this.items.get(index));\r
+               this.fireEvents(this.items.get(index));\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Selects the items at the given zero-relative indices in the receiver. The\r
+        * current selection is not cleared before the new items are selected.\r
+        * <p>\r
+        * If the item at a given index is not selected, it is selected. If the item\r
+        * at a given index was already selected, it remains selected. Indices that\r
+        * are out of range and duplicate indices are ignored. If the receiver is\r
+        * single-select and multiple indices are specified, then all indices are\r
+        * ignored.\r
+        * \r
+        * @param indices the array of indices for the items to select\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the array of indices is null\r
+        *                </li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - if not\r
+        *                called from the thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void select(final int[] indices) {\r
+               this.checkWidget();\r
+               if (indices == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               for (final int index : indices) {\r
+                       if (index <= 0 || index >= this.items.size()) {\r
+                               continue;\r
+                       }\r
+                       this.selection.add(this.items.get(index));\r
+                       this.fireEvents(this.items.get(index));\r
+               }\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Selects the items in the range specified by the given zero-relative\r
+        * indices in the receiver. The range of indices is inclusive. The current\r
+        * selection is not cleared before the new items are selected.\r
+        * <p>\r
+        * If an item in the given range is not selected, it is selected. If an item\r
+        * in the given range was already selected, it remains selected. Indices\r
+        * that are out of range are ignored and no items will be selected if start\r
+        * is greater than end. If the receiver is single-select and there is more\r
+        * than one item in the given range, then all indices are ignored.\r
+        * \r
+        * @param start the start of the range\r
+        * @param end the end of the range\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - if not\r
+        *                called from the thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see List#setSelection(int,int)\r
+        */\r
+       public void select(final int start, final int end) {\r
+               this.checkWidget();\r
+               if (start > end) {\r
+                       SWT.error(SWT.ERROR_INVALID_RANGE);\r
+               }\r
+               for (int index = start; index <= end; index++) {\r
+                       if (index <= 0 || index >= this.items.size()) {\r
+                               continue;\r
+                       }\r
+                       this.selection.add(this.items.get(index));\r
+                       this.fireEvents(this.items.get(index));\r
+               }\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Selects all of the items in the receiver.\r
+        * <p>\r
+        * If the receiver is single-select, do nothing.\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li> <li>ERROR_THREAD_INVALID_ACCESS - if not\r
+        *                called from the thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void selectAll() {\r
+               this.checkWidget();\r
+               this.selection.addAll(this.items);\r
+               for (final DLItem item : this.items) {\r
+                       this.fireEvents(item);\r
+               }\r
+               this.items.clear();\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Control#setBounds(int, int, int, int)\r
+        */\r
+       @Override\r
+       public void setBounds(final int x, final int y, final int width, final int height) {\r
+               super.setBounds(x, y, width, height);\r
+               final boolean itemsContainImage = this.itemsContainImage();\r
+               final Point itemsTableDefaultSize = this.itemsTable.computeSize(SWT.DEFAULT, SWT.DEFAULT);\r
+               final Point selectionTableDefaultSize = this.selectionTable.computeSize(SWT.DEFAULT, SWT.DEFAULT);\r
+\r
+               int itemsTableSize = this.itemsTable.getSize().x;\r
+               if (itemsTableDefaultSize.y > this.itemsTable.getSize().y) {\r
+                       itemsTableSize -= this.itemsTable.getVerticalBar().getSize().x;\r
+               }\r
+\r
+               int selectionTableSize = this.selectionTable.getSize().x;\r
+               if (selectionTableDefaultSize.y > this.selectionTable.getSize().y) {\r
+                       selectionTableSize -= this.selectionTable.getVerticalBar().getSize().x;\r
+               }\r
+\r
+               if (itemsContainImage) {\r
+                       this.itemsTable.getColumn(0).pack();\r
+                       this.itemsTable.getColumn(1).setWidth(itemsTableSize - this.itemsTable.getColumn(0).getWidth());\r
+\r
+                       this.selectionTable.getColumn(0).pack();\r
+                       this.selectionTable.getColumn(1).setWidth(selectionTableSize - this.selectionTable.getColumn(0).getWidth());\r
+\r
+               } else {\r
+                       this.itemsTable.getColumn(0).setWidth(itemsTableSize);\r
+                       this.selectionTable.getColumn(0).setWidth(selectionTableSize);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @return <code>true</code> if any item contains an image\r
+        */\r
+       private boolean itemsContainImage() {\r
+               for (final DLItem item : this.items) {\r
+                       if (item.getImage() != null) {\r
+                               return true;\r
+                       }\r
+               }\r
+\r
+               for (final DLItem item : this.selection) {\r
+                       if (item.getImage() != null) {\r
+                               return true;\r
+                       }\r
+               }\r
+\r
+               return false;\r
+       }\r
+\r
+       /**\r
+        * Sets the item in the receiver's list at the given zero-relative index to\r
+        * the item argument.\r
+        * \r
+        * @param index the index for the item\r
+        * @param item the new item\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_RANGE - if the index is not between 0\r
+        *                and the number of elements in the list minus 1 (inclusive)\r
+        *                </li>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the item is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setItem(final int index, final DLItem item) {\r
+               this.checkWidget();\r
+               if (item == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               if (index <= 0 || index >= this.items.size()) {\r
+                       SWT.error(SWT.ERROR_INVALID_RANGE);\r
+               }\r
+               this.items.set(index, item);\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's items to be the given array of items.\r
+        * \r
+        * @param items the array of items\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the items array is null</li>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if an item in the items array\r
+        *                is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setItems(final DLItem[] items) {\r
+               this.checkWidget();\r
+               if (items == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               final List<DLItem> temp = new ArrayList<DLItem>();\r
+               for (final DLItem item : items) {\r
+                       if (item == null) {\r
+                               SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+                       }\r
+                       temp.add(item);\r
+               }\r
+               this.items.clear();\r
+               this.items.addAll(temp);\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's items to be the given list of items.\r
+        * \r
+        * @param items the list of items\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the items list is null</li>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if an item in the items list\r
+        *                is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setItems(final List<DLItem> items) {\r
+               this.checkWidget();\r
+               this.checkWidget();\r
+               if (items == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               final List<DLItem> temp = new ArrayList<DLItem>();\r
+               for (final DLItem item : items) {\r
+                       if (item == null) {\r
+                               SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+                       }\r
+                       temp.add(item);\r
+               }\r
+               this.items.clear();\r
+               this.items.addAll(temp);\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Redraws all tables that compose this widget\r
+        */\r
+       private void redrawTables() {\r
+               this.setRedraw(false);\r
+               this.redrawTable(this.itemsTable, false);\r
+               this.redrawTable(this.selectionTable, true);\r
+               this.setRedraw(true);\r
+               this.setBounds(this.getBounds());\r
+       }\r
+\r
+       /**\r
+        * Redraw a given table\r
+        * \r
+        * @param table table to be redrawned\r
+        * @param isSelected if <code>true</code>, fill the table with the\r
+        *            selection. Otherwise, fill the table with the unselected\r
+        *            items.\r
+        */\r
+       private void redrawTable(final Table table, final boolean isSelected) {\r
+               this.clean(table);\r
+               this.fillData(table, isSelected ? this.selection : this.items);\r
+       }\r
+\r
+       /**\r
+        * Cleans the content of a table\r
+        * \r
+        * @param table table to be emptied\r
+        */\r
+       private void clean(final Table table) {\r
+               if (table == null) {\r
+                       return;\r
+               }\r
+\r
+               for (final TableItem item : table.getItems()) {\r
+                       item.dispose();\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Fill a table with data\r
+        * \r
+        * @param table table to be filled\r
+        * @param listOfData list of data\r
+        */\r
+       private void fillData(final Table table, final List<DLItem> listOfData) {\r
+               for (final DLItem item : listOfData) {\r
+                       final TableItem tableItem = new TableItem(table, SWT.NONE);\r
+                       tableItem.setData(item);\r
+\r
+                       if (item.getBackground() != null) {\r
+                               tableItem.setBackground(item.getBackground());\r
+                       }\r
+\r
+                       if (item.getForeground() != null) {\r
+                               tableItem.setForeground(item.getForeground());\r
+                       }\r
+\r
+                       if (item.getImage() != null) {\r
+                               tableItem.setImage(0, item.getImage());\r
+                       }\r
+\r
+                       if (item.getFont() != null) {\r
+                               tableItem.setFont(item.getFont());\r
+                       }\r
+\r
+                       tableItem.setText(1, item.getText());\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Move the selected item to the first position\r
+        */\r
+       protected void moveSelectionToFirstPosition() {\r
+               if (this.selectionTable.getSelectionCount() == 0) {\r
+                       return;\r
+               }\r
+\r
+               int index = 0;\r
+               for (final TableItem tableItem : this.selectionTable.getSelection()) {\r
+                       final DLItem item = (DLItem) tableItem.getData();\r
+                       this.selection.remove(item);\r
+                       this.selection.add(index++, item);\r
+               }\r
+\r
+               this.redrawTables();\r
+               this.selectionTable.select(0, index - 1);\r
+               this.selectionTable.forceFocus();\r
+       }\r
+\r
+       /**\r
+        * Select a given item\r
+        */\r
+       protected void selectItem() {\r
+               if (this.itemsTable.getSelectionCount() == 0) {\r
+                       return;\r
+               }\r
+               for (final TableItem tableItem : this.itemsTable.getSelection()) {\r
+                       final DLItem item = (DLItem) tableItem.getData();\r
+                       this.selection.add(item);\r
+                       this.items.remove(item);\r
+               }\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Move the selected item up\r
+        */\r
+       protected void moveUpItem() {\r
+               if (this.selectionTable.getSelectionCount() == 0) {\r
+                       return;\r
+               }\r
+\r
+               for (final int index : this.selectionTable.getSelectionIndices()) {\r
+                       if (index == 0) {\r
+                               this.selectionTable.forceFocus();\r
+                               return;\r
+                       }\r
+               }\r
+\r
+               final int[] newSelection = new int[this.selectionTable.getSelectionCount()];\r
+               int newSelectionIndex = 0;\r
+               for (final TableItem tableItem : this.selectionTable.getSelection()) {\r
+                       final int position = this.selection.indexOf(tableItem.getData());\r
+                       this.swap(position, position - 1);\r
+                       newSelection[newSelectionIndex++] = position - 1;\r
+               }\r
+\r
+               this.redrawTables();\r
+               this.selectionTable.select(newSelection);\r
+               this.selectionTable.forceFocus();\r
+       }\r
+\r
+       /**\r
+        * Deselect a given item\r
+        */\r
+       protected void deselectItem() {\r
+               if (this.selectionTable.getSelectionCount() == 0) {\r
+                       return;\r
+               }\r
+               for (final TableItem tableItem : this.selectionTable.getSelection()) {\r
+                       final DLItem item = (DLItem) tableItem.getData();\r
+                       this.items.add(item);\r
+                       this.selection.remove(item);\r
+               }\r
+               this.redrawTables();\r
+       }\r
+\r
+       /**\r
+        * Move the selected item down\r
+        */\r
+       protected void moveDownItem() {\r
+               if (this.selectionTable.getSelectionCount() == 0) {\r
+                       return;\r
+               }\r
+\r
+               for (final int index : this.selectionTable.getSelectionIndices()) {\r
+                       if (index == this.selectionTable.getItemCount() - 1) {\r
+                               this.selectionTable.forceFocus();\r
+                               return;\r
+                       }\r
+               }\r
+\r
+               final int[] newSelection = new int[this.selectionTable.getSelectionCount()];\r
+               int newSelectionIndex = 0;\r
+               for (final TableItem tableItem : this.selectionTable.getSelection()) {\r
+                       final int position = this.selection.indexOf(tableItem.getData());\r
+                       this.swap(position, position + 1);\r
+                       newSelection[newSelectionIndex++] = position + 1;\r
+               }\r
+\r
+               this.redrawTables();\r
+               this.selectionTable.select(newSelection);\r
+               this.selectionTable.forceFocus();\r
+\r
+       }\r
+\r
+       /**\r
+        * Swap 2 items\r
+        * \r
+        * @param first position of the first item to swap\r
+        * @param second position of the second item to swap\r
+        */\r
+       private void swap(final int first, final int second) {\r
+               final DLItem temp = this.selection.get(first);\r
+               this.selection.set(first, this.selection.get(second));\r
+               this.selection.set(second, temp);\r
+       }\r
+\r
+       /**\r
+        * Move the selected item to the last position\r
+        */\r
+       protected void moveSelectionToLastPosition() {\r
+               if (this.selectionTable.getSelectionCount() == 0) {\r
+                       return;\r
+               }\r
+\r
+               final int numberOfSelectedElements = this.selectionTable.getSelectionCount();\r
+               for (final TableItem tableItem : this.selectionTable.getSelection()) {\r
+                       final DLItem item = (DLItem) tableItem.getData();\r
+                       this.selection.remove(item);\r
+                       this.selection.add(item);\r
+               }\r
+\r
+               this.redrawTables();\r
+               final int numberOfElements = this.selectionTable.getItemCount();\r
+               this.selectionTable.select(numberOfElements - numberOfSelectedElements, numberOfElements - 1);\r
+               this.selectionTable.forceFocus();\r
+       }\r
+\r
+       /**\r
+        * Call all selection listeners\r
+        * \r
+        * @param item selected item\r
+        */\r
+       private void fireEvents(final DLItem item) {\r
+               if (this.eventTable == null) {\r
+                       return;\r
+               }\r
+\r
+               final Event event = new Event();\r
+               event.button = 1;\r
+               event.display = this.getDisplay();\r
+               event.item = null;\r
+               event.widget = this;\r
+               event.data = item;\r
+               final SelectionEvent selectionEvent = new SelectionEvent(event);\r
+\r
+               for (final SelectionListener listener : this.eventTable) {\r
+                       listener.widgetSelected(selectionEvent);\r
+               }\r
+\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/launcher/LLabel.java b/org.tizen.common.externals/src/org/mihalis/opal/launcher/LLabel.java
new file mode 100644 (file)
index 0000000..d6aa5e5
--- /dev/null
@@ -0,0 +1,277 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.launcher;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.PaintEvent;\r
+import org.eclipse.swt.events.PaintListener;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.widgets.Canvas;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instance of this class are a button with text, image and a nice animation\r
+ * effect\r
+ */\r
+class LLabel extends Canvas {\r
+\r
+       private String text;\r
+       private Image image;\r
+       private Font font;\r
+\r
+       private static final int GAP = 12;\r
+       private static int DRAW_FLAGS = SWT.DRAW_MNEMONIC | SWT.DRAW_TAB | SWT.DRAW_TRANSPARENT | SWT.DRAW_DELIMITER;\r
+       private static final int DEFAULT_MARGIN = 5;\r
+       private final int leftMargin = DEFAULT_MARGIN;\r
+       private final int topMargin = DEFAULT_MARGIN;\r
+       private final int rightMargin = DEFAULT_MARGIN;\r
+       private final int bottomMargin = DEFAULT_MARGIN;\r
+       private Point textSize;\r
+\r
+       private static final int MAX_NUMBER_OF_STEPS = 10;\r
+       private int animationStep = 0;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a composite control which will be the parent of the new\r
+        *            instance (cannot be null)\r
+        * @param style the style of control to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        */\r
+       LLabel(final Composite parent, final int style) {\r
+               super(parent, style | SWT.BORDER | SWT.DOUBLE_BUFFERED);\r
+\r
+               final Font original = super.getFont();\r
+\r
+               this.font = new Font(getDisplay(), original.getFontData()[0].getName(), 18, SWT.BOLD);\r
+\r
+               addPaintListener(new PaintListener() {\r
+                       @Override\r
+                       public void paintControl(final PaintEvent event) {\r
+                               onPaint(event);\r
+                       }\r
+               });\r
+\r
+               addListener(SWT.Dispose, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               onDispose(event);\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * Draw the content of the LLabel\r
+        * \r
+        * @param event paintevent\r
+        */\r
+       private void onPaint(final PaintEvent event) {\r
+               final Rectangle rect = getClientArea();\r
+               if (rect.width == 0 || rect.height == 0) {\r
+                       return;\r
+               }\r
+\r
+               final Image bufferImage = new Image(getDisplay(), Math.max(1, rect.width), Math.max(1, rect.height));\r
+\r
+               final GC gc = new GC(bufferImage);\r
+               gc.setForeground(getForeground());\r
+               gc.setBackground(getBackground());\r
+\r
+               gc.fillRectangle(rect);\r
+\r
+               final Point extent = getTotalSize(this.image.getBounds().width, this.image.getBounds().height);\r
+               final int xImage = (rect.width - this.image.getBounds().width) / 2;\r
+               final int yImage = (rect.height - extent.y) / 2;\r
+               gc.drawImage(this.image, xImage, yImage);\r
+\r
+               gc.setFont(this.font);\r
+               final int xText = (rect.width - this.textSize.x) / 2;\r
+               final int yText = yImage + this.image.getBounds().height + GAP - this.textSize.y / 2;\r
+               gc.drawString(this.text, xText, yText);\r
+\r
+               if (this.animationStep != 0) {\r
+                       final float zoom = 1f + this.animationStep * (Math.max(extent.x, extent.y) - Math.max(this.image.getBounds().width, this.image.getBounds().height)) / MAX_NUMBER_OF_STEPS / 100f;\r
+\r
+                       final int newSizeX = (int) (this.image.getBounds().width * zoom);\r
+                       final int newSizeY = (int) (this.image.getBounds().height * zoom);\r
+\r
+                       gc.setAntialias(SWT.ON);\r
+                       gc.setInterpolation(SWT.HIGH);\r
+\r
+                       gc.setAlpha(255 - 255 / MAX_NUMBER_OF_STEPS * this.animationStep);\r
+\r
+                       final Point extentZoomedImage = getTotalSize(newSizeX, newSizeY);\r
+                       final int xZoomedImage = (rect.width - newSizeX) / 2;\r
+                       final int yZoomedImage = (rect.height - extentZoomedImage.y) / 2;\r
+                       gc.drawImage(this.image, 0, 0, this.image.getBounds().width, this.image.getBounds().height, xZoomedImage, yZoomedImage, (int) (this.image.getBounds().width * zoom), (int) (this.image.getBounds().height * zoom));\r
+\r
+               }\r
+\r
+               gc.dispose();\r
+\r
+               event.gc.drawImage(bufferImage, 0, 0);\r
+\r
+               bufferImage.dispose();\r
+\r
+       }\r
+\r
+       /**\r
+        * Dispose elements when the widget is disposed\r
+        * \r
+        * @param event dispose event\r
+        */\r
+       private void onDispose(final Event event) {\r
+               SWTGraphicUtil.dispose(this.image);\r
+               SWTGraphicUtil.dispose(this.font);\r
+               this.text = null;\r
+               this.image = null;\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Composite#computeSize(int, int, boolean)\r
+        */\r
+       @Override\r
+       public Point computeSize(final int wHint, final int hHint, final boolean changed) {\r
+               checkWidget();\r
+               final Point e = getTotalSize(this.image.getBounds().width, this.image.getBounds().height);\r
+               if (wHint == SWT.DEFAULT) {\r
+                       e.x += this.leftMargin + this.rightMargin;\r
+               } else {\r
+                       e.x = wHint;\r
+               }\r
+               if (hHint == SWT.DEFAULT) {\r
+                       e.y += this.topMargin + this.bottomMargin;\r
+               } else {\r
+                       e.y = hHint;\r
+               }\r
+               return e;\r
+       }\r
+\r
+       /**\r
+        * Compute the size of the content (image + text + gap)\r
+        * \r
+        * @param imgWidth image width\r
+        * @param imgHeight image height\r
+        * @return the size of the content\r
+        */\r
+       private Point getTotalSize(final int imgWidth, final int imgHeight) {\r
+               final Point size = new Point(0, 0);\r
+\r
+               int textWidth = 0;\r
+               int textHeight = 0;\r
+\r
+               if (this.textSize == null) {\r
+                       final GC gc = new GC(this);\r
+                       gc.setFont(this.font);\r
+\r
+                       this.textSize = gc.textExtent(this.text, DRAW_FLAGS);\r
+                       gc.dispose();\r
+\r
+               }\r
+               textWidth = this.textSize.x;\r
+               textHeight = this.textSize.y;\r
+\r
+               size.x = Math.max(imgWidth, textWidth);\r
+               size.y = imgHeight + GAP + textHeight;\r
+\r
+               return size;\r
+       }\r
+\r
+       /**\r
+        * @return the text\r
+        */\r
+       String getText() {\r
+               return this.text;\r
+       }\r
+\r
+       /**\r
+        * @param text the text to set\r
+        */\r
+       void setText(final String text) {\r
+               this.text = text;\r
+       }\r
+\r
+       /**\r
+        * @return the image\r
+        */\r
+       Image getImage() {\r
+               return this.image;\r
+       }\r
+\r
+       /**\r
+        * @param image the image to set\r
+        */\r
+       void setImage(final Image image) {\r
+               this.image = image;\r
+       }\r
+\r
+       /**\r
+        * @return the font\r
+        */\r
+       @Override\r
+       public Font getFont() {\r
+               return this.font;\r
+       }\r
+\r
+       /**\r
+        * @param font the font to set\r
+        */\r
+       @Override\r
+       public void setFont(final Font font) {\r
+               SWTGraphicUtil.dispose(font);\r
+               this.font = font;\r
+       }\r
+\r
+       /**\r
+        * Increment the steps of the animation\r
+        * \r
+        * @return true if animation keeps running, false otherwise\r
+        */\r
+       boolean incrementAnimation() {\r
+               this.animationStep++;\r
+               final boolean stopAnimation = this.animationStep > MAX_NUMBER_OF_STEPS;\r
+\r
+               if (stopAnimation) {\r
+                       this.animationStep = 0;\r
+               }\r
+               if (!isDisposed()) {\r
+                       redraw();\r
+               }\r
+               return !stopAnimation;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/launcher/Launcher.java b/org.tizen.common.externals/src/org/mihalis/opal/launcher/Launcher.java
new file mode 100755 (executable)
index 0000000..42bf7b1
--- /dev/null
@@ -0,0 +1,428 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.launcher;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class are a launcher composed of buttons. When one clicks\r
+ * on the button, an animation is started and a selection event is fired\r
+ * <dl>\r
+ * <dt><b>Styles:</b></dt>\r
+ * <dd>(none)</dd>\r
+ * <dt><b>Events:</b></dt>\r
+ * <dd>Selection</dd>\r
+ * </dl>\r
+ */\r
+public class Launcher extends Composite {\r
+\r
+       private final List<LauncherItem> items;\r
+       private final List<SelectionListener> selectionListeners;\r
+       private boolean needRedraw;\r
+       private int selection = -1;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a composite control which will be the parent of the new\r
+        *            instance (cannot be null)\r
+        * @param style the style of control to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        */\r
+       public Launcher(final Composite parent, final int style) {\r
+               super(parent, style | SWT.BORDER);\r
+               this.items = new ArrayList<LauncherItem>();\r
+               this.selectionListeners = new ArrayList<SelectionListener>();\r
+               this.needRedraw = true;\r
+               setBackground(getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+\r
+               this.addListener(SWT.Resize, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               drawLauncher();\r
+                       }\r
+               });\r
+\r
+               this.addListener(SWT.KeyUp, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               OnKeyPressed(event);\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Draw the launcher\r
+        */\r
+       private void drawLauncher() {\r
+               if (!this.needRedraw) {\r
+                       return;\r
+               }\r
+\r
+               disposePreviousContent();\r
+               createButtons();\r
+               pack();\r
+\r
+               this.needRedraw = false;\r
+       }\r
+\r
+       /**\r
+        * Dispose the content before a redraw\r
+        */\r
+       private void disposePreviousContent() {\r
+               for (final Control c : this.getChildren()) {\r
+                       c.dispose();\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Create the buttons that will compose the launcher\r
+        */\r
+       private void createButtons() {\r
+               final GridLayout gridLayout = new GridLayout(this.items.size() / 2, true);\r
+               gridLayout.horizontalSpacing = gridLayout.verticalSpacing = 0;\r
+               this.setLayout(gridLayout);\r
+               for (final LauncherItem item : this.items) {\r
+                       final LLabel label = new LLabel(this, SWT.CENTER);\r
+                       label.setText(item.title);\r
+                       label.setImage(SWTGraphicUtil.createImage(item.image));\r
+                       label.setBackground(getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+                       final GridData gd = new GridData(GridData.FILL, GridData.FILL, true, false);\r
+                       gd.widthHint = 192;\r
+                       gd.heightHint = 220;\r
+                       label.setLayoutData(gd);\r
+                       item.label = label;\r
+\r
+                       label.addListener(SWT.KeyUp, new Listener() {\r
+\r
+                               @Override\r
+                               public void handleEvent(final Event event) {\r
+                                       OnKeyPressed(event);\r
+                               }\r
+                       });\r
+\r
+                       label.addListener(SWT.MouseUp, new Listener() {\r
+\r
+                               @Override\r
+                               public void handleEvent(final Event event) {\r
+                                       OnClick(event);\r
+                               }\r
+                       });\r
+\r
+                       label.addListener(SWT.MouseDoubleClick, new Listener() {\r
+\r
+                               @Override\r
+                               public void handleEvent(final Event event) {\r
+                                       OnDoubleClick(event);\r
+                               }\r
+                       });\r
+\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Code executed when a key is pressed\r
+        * \r
+        * @param event Event\r
+        */\r
+       private void OnKeyPressed(final Event event) {\r
+               switch (event.keyCode) {\r
+               case SWT.ARROW_LEFT:\r
+                       if (this.selection == -1) {\r
+                               this.selection = 0;\r
+                               changeColor(this.selection, true);\r
+                               return;\r
+                       }\r
+\r
+                       if (this.selection % 2 == 1) {\r
+                               changeColor(this.selection, false);\r
+                               this.selection--;\r
+                               changeColor(this.selection, true);\r
+                       }\r
+                       break;\r
+               case SWT.ARROW_UP:\r
+                       if (this.selection == -1) {\r
+                               this.selection = 0;\r
+                               changeColor(this.selection, true);\r
+                               return;\r
+                       }\r
+                       if (this.selection >= 2) {\r
+                               changeColor(this.selection, false);\r
+                               this.selection -= 2;\r
+                               changeColor(this.selection, true);\r
+                       }\r
+                       break;\r
+               case SWT.ARROW_RIGHT:\r
+                       if (this.selection == -1) {\r
+                               this.selection = 0;\r
+                               changeColor(this.selection, true);\r
+                               return;\r
+                       }\r
+                       if (this.selection % 2 == 0) {\r
+                               changeColor(this.selection, false);\r
+                               this.selection++;\r
+                               changeColor(this.selection, true);\r
+                       }\r
+                       break;\r
+               case SWT.ARROW_DOWN:\r
+                       if (this.selection == -1) {\r
+                               this.selection = 0;\r
+                               changeColor(this.selection, true);\r
+                               return;\r
+                       }\r
+                       if (this.selection <= this.items.size() - 2) {\r
+                               changeColor(this.selection, false);\r
+                               this.selection += 2;\r
+                               changeColor(this.selection, true);\r
+                       }\r
+                       break;\r
+               case SWT.HOME:\r
+                       changeColor(this.selection, false);\r
+                       this.selection = 0;\r
+                       changeColor(this.selection, true);\r
+                       break;\r
+               case SWT.END:\r
+                       changeColor(this.selection, false);\r
+                       this.selection = this.items.size() - 1;\r
+                       changeColor(this.selection, true);\r
+                       break;\r
+               default:\r
+                        break;   \r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Code executed when one clicks on the button\r
+        * \r
+        * @param event Event\r
+        */\r
+       private void OnClick(final Event event) {\r
+               for (int i = 0; i < this.items.size(); i++) {\r
+                       final LauncherItem item = this.items.get(i);\r
+                       if (item.label != null && item.label.equals(event.widget)) {\r
+                               if (this.selection != i) {\r
+                                       changeColor(this.selection, false);\r
+                                       this.selection = i;\r
+                                       changeColor(this.selection, true);\r
+                               }\r
+                               return;\r
+                       }\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Change the background color of a given button\r
+        * \r
+        * @param index index of the button\r
+        * @param isSelected if <code>true</code>, the background is the light\r
+        *            shadow. Otherwise, the background color is white\r
+        */\r
+       private void changeColor(final int index, final boolean isSelected) {\r
+               if (index != -1 && this.items.get(index).label != null) {\r
+                       this.items.get(index).label.setBackground(isSelected ? getDisplay().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW) : getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Code executed when one double-clicks on a button\r
+        * \r
+        * @param event Event\r
+        */\r
+       private void OnDoubleClick(final Event event) {\r
+               for (int i = 0; i < this.items.size(); i++) {\r
+                       final LauncherItem item = this.items.get(i);\r
+                       if (item.label != null && item.label.equals(event.widget)) {\r
+                               if (this.selection != i) {\r
+                                       changeColor(this.selection, false);\r
+                                       this.selection = i;\r
+                                       changeColor(this.selection, true);\r
+                               }\r
+                               startAnimation(i, event);\r
+                               return;\r
+                       }\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Start the animation for a given button\r
+        * \r
+        * @param index index of the selected button\r
+        * @param event event (propagated to the selection listeners)\r
+        */\r
+       private void startAnimation(final int index, final Event event) {\r
+               final LLabel label = this.items.get(index).label;\r
+               getDisplay().timerExec(0, new Runnable() {\r
+\r
+                       @Override\r
+                       public void run() {\r
+                               if (label.incrementAnimation()) {\r
+                                       getDisplay().timerExec(20, this);\r
+                               } else {\r
+                                       fireSelectionListeners(event);\r
+                               }\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Fire the selection listeners\r
+        * \r
+        * @param originalEvent mouse event\r
+        * @return <code>true</code> if the selection could be changed,\r
+        *         <code>false</code> otherwise\r
+        */\r
+       private boolean fireSelectionListeners(final Event originalEvent) {\r
+               for (final SelectionListener listener : this.selectionListeners) {\r
+                       final Event event = new Event();\r
+\r
+                       event.button = originalEvent.button;\r
+                       event.display = this.getDisplay();\r
+                       event.item = null;\r
+                       event.widget = this;\r
+                       event.data = null;\r
+                       event.time = originalEvent.time;\r
+                       event.x = originalEvent.x;\r
+                       event.y = originalEvent.y;\r
+\r
+                       final SelectionEvent selEvent = new SelectionEvent(event);\r
+                       listener.widgetSelected(selEvent);\r
+                       if (!selEvent.doit) {\r
+                               return false;\r
+                       }\r
+               }\r
+               return true;\r
+       }\r
+\r
+       /**\r
+        * Add an item to the launcher\r
+        * \r
+        * @param title text associated to this item\r
+        * @param image image associated to this item\r
+        */\r
+       public void addItem(final String title, final String image) {\r
+               checkWidget();\r
+               this.items.add(new LauncherItem(title, image));\r
+               this.needRedraw = true;\r
+       }\r
+\r
+       /**\r
+        * Adds the listener to the collection of listeners who will be notified\r
+        * when the control is selected by the user, by sending it one of the\r
+        * messages defined in the <code>SelectionListener</code> interface.\r
+        * <p>\r
+        * <code>widgetSelected</code> is called when the control is selected by the\r
+        * user. <code>widgetDefaultSelected</code> is not called.\r
+        * </p>\r
+        * \r
+        * @param listener the listener which should be notified\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see SelectionListener\r
+        * @see #removeSelectionListener\r
+        * @see SelectionEvent\r
+        */\r
+       public void addSelectionListener(final SelectionListener listener) {\r
+               checkWidget();\r
+               if (listener == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               this.selectionListeners.add(listener);\r
+\r
+       }\r
+\r
+       /**\r
+        * Removes the listener from the collection of listeners who will be\r
+        * notified when the control is selected by the user.\r
+        * \r
+        * @param listener the listener which should no longer be notified\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see SelectionListener\r
+        * @see #addSelectionListener\r
+        */\r
+       public void removeSelectionListener(final SelectionListener listener) {\r
+               checkWidget();\r
+               if (listener == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               this.selectionListeners.remove(listener);\r
+       }\r
+\r
+       /**\r
+        * Return the selected button\r
+        * \r
+        * @return the index of the selected button\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        */\r
+       public int getSelection() {\r
+               checkWidget();\r
+               return this.selection;\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/launcher/LauncherItem.java b/org.tizen.common.externals/src/org/mihalis/opal/launcher/LauncherItem.java
new file mode 100644 (file)
index 0000000..bb5dc13
--- /dev/null
@@ -0,0 +1,32 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.launcher;\r
+\r
+/**\r
+ * Instances of this class are POJO to store information handled by the Launcher\r
+ * widget I could have used a inner class but I prefer this solution :)\r
+ */\r
+class LauncherItem {\r
+       String title;\r
+       String image;\r
+       LLabel label;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param title text associated to the item\r
+        * @param image image associated to the item\r
+        */\r
+       LauncherItem(final String title, final String image) {\r
+               this.title = title;\r
+               this.image = image;\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/login/LoginDialog.java b/org.tizen.common.externals/src/org/mihalis/opal/login/LoginDialog.java
new file mode 100644 (file)
index 0000000..b811971
--- /dev/null
@@ -0,0 +1,511 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation \r
+ *******************************************************************************/\r
+package org.mihalis.opal.login;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.ModifyEvent;\r
+import org.eclipse.swt.events.ModifyListener;\r
+import org.eclipse.swt.events.PaintEvent;\r
+import org.eclipse.swt.events.PaintListener;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Path;\r
+import org.eclipse.swt.graphics.Pattern;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Canvas;\r
+import org.eclipse.swt.widgets.Combo;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Shell;\r
+import org.eclipse.swt.widgets.Text;\r
+import org.mihalis.opal.opalDialog.Dialog;\r
+import org.mihalis.opal.utils.ResourceManager;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class are Login Dialog box, which is composed of\r
+ * <p>\r
+ * <dl>\r
+ * <dt><b>A login</b></dt>\r
+ * <dt><b>A password</b></dt>\r
+ * <dt><b>An image</b></dt>\r
+ * <dd>(optional)</dd>\r
+ * <dt><b>A description</b></dt>\r
+ * <dd>(optional)</dd>\r
+ * <dt><b>A checkbox "remember the password"</b></dt>\r
+ * <dd>(optional)</dd>\r
+ * </dl>\r
+ * </p>\r
+ */\r
+public class LoginDialog {\r
+       private Image image;\r
+       private String description;\r
+       private String login;\r
+       private String password;\r
+       private List<String> autorizedLogin;\r
+       private boolean displayRememberPassword;\r
+       private boolean rememberPassword;\r
+       private LoginDialogVerifier verifier;\r
+\r
+       private Shell shell;\r
+       private boolean returnedValue;\r
+       private Button buttonOk;\r
+\r
+       /**\r
+        * Constructor\r
+        */\r
+       public LoginDialog() {\r
+               this.displayRememberPassword = true;\r
+       }\r
+\r
+       /**\r
+        * Open the Login box\r
+        * \r
+        * @return <code>true</code> if the authentication is OK, <code>false</code>\r
+        *         if the user pressed on cancel.\r
+        */\r
+       public boolean open() {\r
+               if (this.verifier == null) {\r
+                       throw new IllegalArgumentException("Please set a verifier before opening the dialog box");\r
+               }\r
+\r
+               buildDialog();\r
+               openShell();\r
+\r
+               return this.returnedValue;\r
+       }\r
+\r
+       /**\r
+        * Build the dialog box\r
+        */\r
+       private void buildDialog() {\r
+               buildShell();\r
+               buildImage();\r
+               buildDescription();\r
+               buildLogin();\r
+               buildPassword();\r
+               if (this.displayRememberPassword) {\r
+                       buildRememberPassword();\r
+               }\r
+               buildButtons();\r
+       }\r
+\r
+       /**\r
+        * Build the shell\r
+        */\r
+       private void buildShell() {\r
+               this.shell = new Shell(SWT.SYSTEM_MODAL | SWT.TITLE | SWT.BORDER);\r
+               this.shell.setText(ResourceManager.getLabel(ResourceManager.LOGIN));\r
+               this.shell.setLayout(new GridLayout(4, false));\r
+       }\r
+\r
+       /**\r
+        * Build the image on top of the login box. If no image has been set, create\r
+        * a default image\r
+        */\r
+       private void buildImage() {\r
+               final Canvas canvas = new Canvas(this.shell, SWT.DOUBLE_BUFFERED);\r
+               final GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, false, 4, 1);\r
+               gridData.widthHint = 400;\r
+               gridData.heightHint = 60;\r
+               canvas.setLayoutData(gridData);\r
+               canvas.addPaintListener(new PaintListener() {\r
+\r
+                       @Override\r
+                       public void paintControl(final PaintEvent e) {\r
+                               e.gc.drawImage(LoginDialog.this.image == null ? createDefaultImage(e.width, e.height) : LoginDialog.this.image, 0, 0);\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Create a default image. It is a port of the image used by the Login Box\r
+        * in the project SwingX\r
+        * \r
+        * @param w width\r
+        * @param h height\r
+        * @return a default image (blue wave)\r
+        */\r
+       private Image createDefaultImage(final int w, final int h) {\r
+               final Display display = Display.getCurrent();\r
+               final Color backgroundColor = new Color(display, 49, 121, 242);\r
+               final Color gradientColor1 = new Color(display, 155, 185, 245);\r
+               final Color gradientColor2 = new Color(display, 53, 123, 242);\r
+\r
+               final Image img = new Image(display, w, h);\r
+               final GC gc = new GC(img);\r
+               gc.setAdvanced(true);\r
+               gc.setAntialias(SWT.ON);\r
+               gc.setBackground(backgroundColor);\r
+               gc.fillRectangle(0, 0, w, h);\r
+\r
+               final Path curveShape = new Path(display);\r
+               curveShape.moveTo(0, h * .6f);\r
+               curveShape.cubicTo(w * .167f, h * 1.2f, w * .667f, h * -.5f, w, h * .75f);\r
+               curveShape.lineTo(w, h);\r
+               curveShape.lineTo(0, h);\r
+               curveShape.lineTo(0, h * .8f);\r
+               curveShape.close();\r
+\r
+               final Pattern pattern = new Pattern(display, 0, 0, 1, h * 1.2f, gradientColor1, gradientColor2);\r
+               gc.setBackgroundPattern(pattern);\r
+               gc.fillPath(curveShape);\r
+\r
+               final Font font = new Font(display, "Arial Bold", 30, SWT.NONE);\r
+               gc.setFont(font);\r
+               gc.setForeground(display.getSystemColor(SWT.COLOR_WHITE));\r
+               final Point textSize = gc.stringExtent(ResourceManager.getLabel(ResourceManager.LOGIN));\r
+               gc.drawString(ResourceManager.getLabel(ResourceManager.LOGIN), (int) (w * .05f), (h - textSize.y) / 2, true);\r
+\r
+               font.dispose();\r
+               curveShape.dispose();\r
+               pattern.dispose();\r
+               backgroundColor.dispose();\r
+               gradientColor1.dispose();\r
+               gradientColor2.dispose();\r
+               gc.dispose();\r
+               return img;\r
+       }\r
+\r
+       /**\r
+        * Build the description part of the box\r
+        */\r
+       private void buildDescription() {\r
+               final Label label = new Label(this.shell, SWT.NONE);\r
+               final GridData gridData = new GridData(GridData.FILL, GridData.BEGINNING, true, false, 4, 1);\r
+               gridData.verticalIndent = 5;\r
+               gridData.horizontalIndent = 5;\r
+               label.setLayoutData(gridData);\r
+               final Font bold = SWTGraphicUtil.buildFontFrom(label, SWT.BOLD);\r
+               label.setFont(bold);\r
+               label.addListener(SWT.Dispose, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               SWTGraphicUtil.dispose(bold);\r
+                       }\r
+               });\r
+\r
+               if (this.description == null || this.description.trim().equals("")) {\r
+                       label.setText(" ");\r
+               } else {\r
+                       label.setText(this.description);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Build the login part of the box\r
+        */\r
+       private void buildLogin() {\r
+               final Label label = new Label(this.shell, SWT.NONE);\r
+               final GridData gridData = new GridData(GridData.END, GridData.END, false, false, 1, 1);\r
+               gridData.horizontalIndent = 35;\r
+               gridData.verticalIndent = 15;\r
+               label.setLayoutData(gridData);\r
+               label.setText(ResourceManager.getLabel(ResourceManager.NAME));\r
+\r
+               if (this.autorizedLogin != null && !this.autorizedLogin.isEmpty()) {\r
+                       // Combo\r
+                       final Combo combo = new Combo(this.shell, SWT.BORDER | SWT.READ_ONLY);\r
+\r
+                       combo.setLayoutData(new GridData(GridData.FILL, GridData.END, true, false, 3, 1));\r
+                       for (final String loginToAdd : this.autorizedLogin) {\r
+                               combo.add(loginToAdd);\r
+                       }\r
+                       combo.setText(this.login == null ? "" : this.login);\r
+                       combo.setFocus();\r
+                       combo.addModifyListener(new ModifyListener() {\r
+\r
+                               @Override\r
+                               public void modifyText(final ModifyEvent e) {\r
+                                       LoginDialog.this.login = combo.getText();\r
+                                       changeButtonOkState();\r
+                               }\r
+                       });\r
+               } else {\r
+                       // Text\r
+                       final Text text = new Text(this.shell, SWT.BORDER);\r
+                       text.setText(this.login == null ? "" : this.login);\r
+                       text.setLayoutData(new GridData(GridData.FILL, GridData.END, true, false, 3, 1));\r
+                       text.setFocus();\r
+                       text.addModifyListener(new ModifyListener() {\r
+\r
+                               @Override\r
+                               public void modifyText(final ModifyEvent e) {\r
+                                       LoginDialog.this.login = text.getText();\r
+                                       changeButtonOkState();\r
+                               }\r
+                       });\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Build the password part of the box\r
+        */\r
+       private void buildPassword() {\r
+               final Label label = new Label(this.shell, SWT.NONE);\r
+               final GridData gridData = new GridData(GridData.END, GridData.CENTER, false, false, 1, 1);\r
+               gridData.horizontalIndent = 35;\r
+               label.setLayoutData(gridData);\r
+               label.setText(ResourceManager.getLabel(ResourceManager.PASSWORD));\r
+\r
+               final Text text = new Text(this.shell, SWT.PASSWORD | SWT.BORDER);\r
+               text.setText(this.password == null ? "" : this.password);\r
+               text.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 3, 1));\r
+               text.addModifyListener(new ModifyListener() {\r
+\r
+                       @Override\r
+                       public void modifyText(final ModifyEvent e) {\r
+                               LoginDialog.this.password = text.getText();\r
+                               changeButtonOkState();\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Enable/Disable the button when the login and the password is empty (or\r
+        * not)\r
+        */\r
+       private void changeButtonOkState() {\r
+               final boolean loginEntered = this.login != null && !this.login.trim().equals("");\r
+               final boolean passwordEntered = this.password != null && !this.password.trim().equals("");\r
+               this.buttonOk.setEnabled(loginEntered && passwordEntered);\r
+\r
+       }\r
+\r
+       /**\r
+        * Build the "remember password" part of the box\r
+        */\r
+       private void buildRememberPassword() {\r
+               final Button checkbox = new Button(this.shell, SWT.CHECK);\r
+               final GridData gridData = new GridData(GridData.BEGINNING, GridData.CENTER, true, false, 4, 1);\r
+               gridData.horizontalIndent = 35;\r
+               checkbox.setLayoutData(gridData);\r
+               checkbox.setText(ResourceManager.getLabel(ResourceManager.REMEMBER_PASSWORD));\r
+               checkbox.setSelection(this.rememberPassword);\r
+\r
+       }\r
+\r
+       /**\r
+        * Build the buttons\r
+        */\r
+       private void buildButtons() {\r
+               this.buttonOk = new Button(this.shell, SWT.PUSH);\r
+               final GridData gdOk = new GridData(GridData.END, GridData.CENTER, true, false, 3, 1);\r
+               gdOk.verticalIndent = 60;\r
+               gdOk.minimumWidth = 80;\r
+               this.buttonOk.setLayoutData(gdOk);\r
+               this.buttonOk.setText(ResourceManager.getLabel(ResourceManager.OK));\r
+               this.buttonOk.setEnabled(false);\r
+\r
+               this.buttonOk.addSelectionListener(new SelectionAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                        */\r
+                       @Override\r
+                       public void widgetSelected(final SelectionEvent selectionEvent) {\r
+                               try {\r
+                                       LoginDialog.this.verifier.authenticate(LoginDialog.this.login, LoginDialog.this.password);\r
+                                       LoginDialog.this.returnedValue = true;\r
+                                       LoginDialog.this.shell.dispose();\r
+                               } catch (final Exception e) {\r
+                                       Dialog.error(ResourceManager.getLabel(ResourceManager.LOGIN_FAILED), e.getMessage());\r
+                                       for (final Control control : LoginDialog.this.shell.getChildren()) {\r
+                                               if (control instanceof Text || control instanceof Combo) {\r
+                                                       control.setFocus();\r
+                                                       break;\r
+                                               }\r
+                                       }\r
+\r
+                               }\r
+                       }\r
+\r
+               });\r
+\r
+               final Button buttonCancel = new Button(this.shell, SWT.PUSH);\r
+               final GridData gdCancel = new GridData(GridData.FILL, GridData.CENTER, false, false);\r
+               gdCancel.widthHint = 80;\r
+               gdCancel.verticalIndent = 60;\r
+               buttonCancel.setLayoutData(gdCancel);\r
+               buttonCancel.setText(ResourceManager.getLabel(ResourceManager.CANCEL));\r
+               buttonCancel.addSelectionListener(new SelectionAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                        */\r
+                       @Override\r
+                       public void widgetSelected(final SelectionEvent e) {\r
+                               LoginDialog.this.returnedValue = false;\r
+                               LoginDialog.this.shell.dispose();\r
+                       }\r
+\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Open the shell\r
+        */\r
+       private void openShell() {\r
+               this.shell.setDefaultButton(this.buttonOk);\r
+               this.shell.pack();\r
+               this.shell.open();\r
+               SWTGraphicUtil.centerShell(this.shell);\r
+\r
+               while (!this.shell.isDisposed()) {\r
+                       if (!this.shell.getDisplay().readAndDispatch()) {\r
+                               this.shell.getDisplay().sleep();\r
+                       }\r
+               }\r
+       }\r
+\r
+       // ------------- Getters & Setters\r
+       /**\r
+        * @return the image\r
+        */\r
+       public Image getImage() {\r
+               return this.image;\r
+       }\r
+\r
+       /**\r
+        * @return the description\r
+        */\r
+       public String getDescription() {\r
+               return this.description;\r
+       }\r
+\r
+       /**\r
+        * @return the login\r
+        */\r
+       public String getLogin() {\r
+               return this.login == null ? null : this.login.trim();\r
+       }\r
+\r
+       /**\r
+        * @return the password\r
+        */\r
+       public String getPassword() {\r
+               return this.password == null ? null : this.password.trim();\r
+       }\r
+\r
+       /**\r
+        * @return the list of autorized logins\r
+        */\r
+       public List<String> getAutorizedLogin() {\r
+               return this.autorizedLogin;\r
+       }\r
+\r
+       /**\r
+        * @return <code>true</code> if the checkbox "remember the password" is\r
+        *         displayed, <code>false</code> otherwise\r
+        */\r
+       public boolean isDisplayRememberPassword() {\r
+               return this.displayRememberPassword;\r
+       }\r
+\r
+       /**\r
+        * @return <code>true</code> if the checkbox "remember the password" is\r
+        *         checked, <code>false</code> otherwise\r
+        */\r
+       public boolean isRememberPassword() {\r
+               return this.rememberPassword;\r
+       }\r
+\r
+       /**\r
+        * @return the verifier associated to this box\r
+        */\r
+       public LoginDialogVerifier getVerifier() {\r
+               return this.verifier;\r
+       }\r
+\r
+       /**\r
+        * @param image the image to set\r
+        */\r
+       public void setImage(final Image image) {\r
+               this.image = image;\r
+       }\r
+\r
+       /**\r
+        * @param description the description to set\r
+        */\r
+       public void setDescription(final String description) {\r
+               this.description = description;\r
+       }\r
+\r
+       /**\r
+        * @param login the login to set\r
+        */\r
+       public void setLogin(final String login) {\r
+               this.login = login;\r
+       }\r
+\r
+       /**\r
+        * @param password the password to set\r
+        */\r
+       public void setPassword(final String password) {\r
+               this.password = password;\r
+       }\r
+\r
+       /**\r
+        * @param autorizedLogin the list of autorized logins to set\r
+        */\r
+       public void setAutorizedLogin(final List<String> autorizedLogin) {\r
+               this.autorizedLogin = autorizedLogin;\r
+       }\r
+\r
+       /**\r
+        * @param autorizedLogin the list of autorized logins to set\r
+        */\r
+       public void setAutorizedLogin(final String... autorizedLogin) {\r
+               this.autorizedLogin = Arrays.asList(autorizedLogin);\r
+       }\r
+\r
+       /**\r
+        * @param displayRememberPassword if <code>true</code>, the checkbox\r
+        *            "remember the password" is displayed\r
+        */\r
+       public void setDisplayRememberPassword(final boolean displayRememberPassword) {\r
+               this.displayRememberPassword = displayRememberPassword;\r
+       }\r
+\r
+       /**\r
+        * @param rememberPassword if <code>true</code>, the checkbox\r
+        *            "remember the password" is selected\r
+        */\r
+       public void setRememberPassword(final boolean rememberPassword) {\r
+               this.rememberPassword = rememberPassword;\r
+       }\r
+\r
+       /**\r
+        * @param verifier the verifier to set\r
+        */\r
+       public void setVerifier(final LoginDialogVerifier verifier) {\r
+               this.verifier = verifier;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/login/LoginDialogVerifier.java b/org.tizen.common.externals/src/org/mihalis/opal/login/LoginDialogVerifier.java
new file mode 100644 (file)
index 0000000..14ec22c
--- /dev/null
@@ -0,0 +1,29 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation \r
+ *******************************************************************************/\r
+package org.mihalis.opal.login;\r
+\r
+/**\r
+ * This interface describes a verifier for the LoginDialogWidget\r
+ */\r
+public interface LoginDialogVerifier {\r
+       /**\r
+        * Check if the couple login/password is correct\r
+        * \r
+        * @param login login entered by the user\r
+        * @param password password entered by the user\r
+        * @throws Exception if the couple login/password is wrong. The description\r
+        *             of the exception contains the error message that is gonna be\r
+        *             displayed. For instance, an implementation can throw the\r
+        *             exception *\r
+        *             <code>new Exception("Unable to connect to the LDAP Server")</code>\r
+        */\r
+       void authenticate(String login, String password) throws Exception;\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/multiChoice/MultiChoice.java b/org.tizen.common.externals/src/org/mihalis/opal/multiChoice/MultiChoice.java
new file mode 100755 (executable)
index 0000000..3a5cb0e
--- /dev/null
@@ -0,0 +1,1195 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+\r
+package org.mihalis.opal.multiChoice;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Iterator;\r
+import java.util.LinkedHashSet;\r
+import java.util.List;\r
+import java.util.Set;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Shell;\r
+import org.mihalis.opal.utils.SimpleSelectionAdapter;\r
+\r
+/**\r
+ * The MultiChoice class represents a selectable user interface object that\r
+ * combines a read-only text-field and a set of checkboxes.\r
+ * \r
+ * <p>\r
+ * Note that although this class is a subclass of <code>Composite</code>, it\r
+ * does not make sense to add children to it, or set a layout on it.\r
+ * </p>\r
+ * <dl>\r
+ * <dt><b>Styles:</b>\r
+ * <dd>NONE</dd>\r
+ * <dt><b>Events:</b>\r
+ * <dd>Selection</dd>\r
+ * </dl>\r
+ * \r
+ * @param <T> Class of objects represented by this widget\r
+ */\r
+public class MultiChoice<T> extends Composite {\r
+\r
+       private Label text;\r
+       private Button arrow;\r
+       private Shell popup;\r
+       private Listener listener, filter;\r
+       private int numberOfColumns = 2;\r
+       private List<T> elements;\r
+       private Set<T> selection;\r
+       private List<Button> checkboxes;\r
+       private boolean hasFocus;\r
+       private MultiChoiceSelectionListener<T> selectionListener;\r
+       private T lastModified;\r
+       private Color foreground, background;\r
+       private Font font;\r
+       private String separator;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent.\r
+        * \r
+        * @param parent a widget which will be the parent of the new instance\r
+        *            (cannot be null)\r
+        * @param style not used\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        */\r
+       public MultiChoice(final Composite parent, final int style) {\r
+               this(parent, style, null);\r
+       }\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent.\r
+        * \r
+        * @param parent a widget which will be the parent of the new instance\r
+        *            (cannot be null)\r
+        * @param style not used\r
+        * @param elements list of elements displayed by this widget\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        */\r
+       public MultiChoice(final Composite parent, final int style, final List<T> elements) {\r
+               super(parent, style);\r
+\r
+               final GridLayout gridLayout = new GridLayout(2, false);\r
+               gridLayout.horizontalSpacing = gridLayout.verticalSpacing = gridLayout.marginWidth = gridLayout.marginHeight = 0;\r
+               this.setLayout(gridLayout);\r
+\r
+               this.text = new Label(this, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER);\r
+               this.text.setBackground(this.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND));\r
+               this.text.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));\r
+\r
+               this.arrow = new Button(this, SWT.ARROW | SWT.RIGHT);\r
+               this.arrow.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));\r
+\r
+               this.listener = new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               if (MultiChoice.this.popup == event.widget) {\r
+                                       popupEvent(event);\r
+                                       return;\r
+                               }\r
+\r
+                               if (MultiChoice.this.arrow == event.widget) {\r
+                                       buttonEvent(event);\r
+                                       return;\r
+                               }\r
+\r
+                               if (MultiChoice.this == event.widget) {\r
+                                       multiChoiceEvent(event);\r
+                                       return;\r
+                               }\r
+\r
+                               if (getShell() == event.widget) {\r
+                                       getDisplay().asyncExec(new Runnable() {\r
+                                               @Override\r
+                                               public void run() {\r
+                                                       if (isDisposed()) {\r
+                                                               return;\r
+                                                       }\r
+                                                       handleFocus(SWT.FocusOut);\r
+                                               }\r
+                                       });\r
+                               }\r
+                       }\r
+               };\r
+\r
+               final int[] multiChoiceEvent = { SWT.Dispose, SWT.Move, SWT.Resize };\r
+               for (int i = 0; i < multiChoiceEvent.length; i++) {\r
+                       this.addListener(multiChoiceEvent[i], this.listener);\r
+               }\r
+\r
+               final int[] buttonEvents = { SWT.Selection, SWT.FocusIn };\r
+               for (int i = 0; i < buttonEvents.length; i++) {\r
+                       this.arrow.addListener(buttonEvents[i], this.listener);\r
+               }\r
+\r
+               this.filter = new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               final Shell shell = ((Control) event.widget).getShell();\r
+                               if (shell == MultiChoice.this.getShell()) {\r
+                                       handleFocus(SWT.FocusOut);\r
+                               }\r
+                       }\r
+               };\r
+\r
+               this.selection = new LinkedHashSet<T>();\r
+               this.elements = elements;\r
+               this.separator = ",";\r
+\r
+               createPopup();\r
+               setLabel();\r
+       }\r
+\r
+       /**\r
+        * Adds the argument to the end of the receiver's list.\r
+        * \r
+        * @param values new item\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the string is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void add(final T value) {\r
+               checkWidget();\r
+               if (value == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (this.elements == null) {\r
+                       this.elements = new ArrayList<T>();\r
+               }\r
+               this.elements.add(value);\r
+               refresh();\r
+       }\r
+\r
+       /**\r
+        * Adds the argument to the receiver's list at the given zero-relative\r
+        * index.\r
+        * \r
+        * @param values new item\r
+        * @param index the index for the item\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the string is null</li>\r
+        *                <li>ERROR_INVALID_RANGE - if the index is not between 0\r
+        *                and the number of elements in the list minus 1 (inclusive)\r
+        *                </li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void add(final T value, final int index) {\r
+               checkWidget();\r
+               checkNullElement();\r
+               if (value == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               checkRange(index);\r
+\r
+               this.elements.add(index, value);\r
+               refresh();\r
+       }\r
+\r
+       /**\r
+        * Adds the argument to the end of the receiver's list.\r
+        * \r
+        * @param values new items\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the string is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void addAll(final List<T> values) {\r
+               checkWidget();\r
+               if (values == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (this.elements == null) {\r
+                       this.elements = new ArrayList<T>();\r
+               }\r
+               this.elements.addAll(values);\r
+               refresh();\r
+       }\r
+\r
+       /**\r
+        * Adds the argument to the end of the receiver's list.\r
+        * \r
+        * @param values new items\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the string is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void addAll(final T[] values) {\r
+               checkWidget();\r
+               if (values == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               if (this.elements == null) {\r
+                       this.elements = new ArrayList<T>();\r
+               }\r
+               for (final T value : values) {\r
+                       this.elements.add(value);\r
+               }\r
+               refresh();\r
+       }\r
+\r
+       /**\r
+        * Returns the item at the given, zero-relative index in the receiver's\r
+        * list. Throws an exception if the index is out of range.\r
+        * \r
+        * @param index the index of the item to return\r
+        * @return the item at the given index\r
+        * \r
+        * @exception NullPointerException if there is no item in the receiver\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_RANGE - if the index is not between 0\r
+        *                and the number of elements in the list minus 1 (inclusive)\r
+        *                </li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public T getItem(final int index) {\r
+               checkWidget();\r
+               checkNullElement();\r
+               checkRange(index);\r
+\r
+               return this.elements.get(index);\r
+       }\r
+\r
+       /**\r
+        * Returns the number of items contained in the receiver's list.\r
+        * \r
+        * @return the number of items\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public int getItemCount() {\r
+               checkWidget();\r
+               if (this.elements == null) {\r
+                       return 0;\r
+               }\r
+\r
+               return this.elements.size();\r
+\r
+       }\r
+\r
+       /**\r
+        * Returns the list of items in the receiver's list.\r
+        * <p>\r
+        * Note: This is not the actual structure used by the receiver to maintain\r
+        * its list of items, so modifying the array will not affect the receiver.\r
+        * </p>\r
+        * \r
+        * @return the items in the receiver's list\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public List<T> getItems() {\r
+               checkWidget();\r
+               if (this.elements == null) {\r
+                       return null;\r
+               }\r
+               return new ArrayList<T>(this.elements);\r
+       }\r
+\r
+       /**\r
+        * Removes the item from the receiver's list at the given zero-relative\r
+        * index.\r
+        * \r
+        * @param index the index for the item\r
+        * @exception NullPointerException if there is no item in the receiver\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_RANGE - if the index is not between 0\r
+        *                and the number of elements in the list minus 1 (inclusive)\r
+        *                </li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void removeAt(final int index) {\r
+               checkWidget();\r
+               checkNullElement();\r
+               checkRange(index);\r
+               final Object removedElement = this.elements.remove(index);\r
+               this.selection.remove(removedElement);\r
+               refresh();\r
+       }\r
+\r
+       /**\r
+        * Searches the receiver's list starting at the first item until an item is\r
+        * found that is equal to the argument, and removes that item from the list.\r
+        * \r
+        * @param object the item to remove\r
+        * @exception NullPointerException if there is no item in the receiver\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the object is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void remove(final T object) {\r
+               if (object == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               checkWidget();\r
+               checkNullElement();\r
+               this.elements.remove(object);\r
+               this.selection.remove(object);\r
+               refresh();\r
+       }\r
+\r
+       /**\r
+        * Remove all items of the receiver\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void removeAll() {\r
+               checkWidget();\r
+               checkNullElement();\r
+               if (this.elements != null) {\r
+                       this.elements.clear();\r
+               }\r
+               this.selection.clear();\r
+               refresh();\r
+       }\r
+\r
+       /**\r
+        * Sets the selection of the receiver. If the item was already selected, it\r
+        * remains selected.\r
+        * \r
+        * @param selection the new selection\r
+        * @exception NullPointerException if there is no item in the receiver\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the selection is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+\r
+       public void setSelection(final Set<T> selection) {\r
+               checkWidget();\r
+               checkNullElement();\r
+               if (selection == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               this.selection = selection;\r
+               updateSelection();\r
+       }\r
+\r
+       /**\r
+        * Selects all selected items in the receiver's list.\r
+        * \r
+        * @exception NullPointerException if there is no item in the receiver\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void selectAll() {\r
+               checkWidget();\r
+               checkNullElement();\r
+               this.selection.addAll(this.elements);\r
+               updateSelection();\r
+       }\r
+\r
+       /**\r
+        * Selects the item at the given zero-relative index in the receiver's list.\r
+        * If the item at the index was already selected, it remains selected.\r
+        * \r
+        * @param index the index of the item to select\r
+        * @exception NullPointerException if there is no item in the receiver\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_RANGE - if the index is not between 0\r
+        *                and the number of elements in the list minus 1 (inclusive)\r
+        *                </li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void selectAt(final int index) {\r
+               checkWidget();\r
+               checkNullElement();\r
+               checkRange(index);\r
+               this.selection.add(this.elements.get(index));\r
+               updateSelection();\r
+       }\r
+\r
+       /**\r
+        * Selects an item the receiver's list. If the item was already selected, it\r
+        * remains selected.\r
+        * \r
+        * @param index the index of the item to select\r
+        * @exception NullPointerException if there is no item in the receiver\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the selection is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void select(final T value) {\r
+               checkWidget();\r
+               checkNullElement();\r
+               if (!this.elements.contains(value)) {\r
+                       throw new IllegalArgumentException("Value not present in the widget");\r
+               }\r
+               this.selection.add(value);\r
+               updateSelection();\r
+       }\r
+\r
+       /**\r
+        * Selects items in the receiver. If the items were already selected, they\r
+        * remain selected.\r
+        * \r
+        * @param index the indexes of the items to select\r
+        * @exception NullPointerException if there is no item in the receiver\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the selection is null</li>\r
+        *                <li>ERROR_INVALID_RANGE - if the index is not between 0\r
+        *                and the number of elements in the list minus 1 (inclusive)\r
+        *                </li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setSelectedIndex(final int[] index) {\r
+               checkWidget();\r
+               checkNullElement();\r
+               for (final int i : index) {\r
+                       checkRange(i);\r
+                       this.selection.add(this.elements.get(i));\r
+               }\r
+               updateSelection();\r
+       }\r
+\r
+       /**\r
+        * Returns the zero-relative indices of the items which are currently\r
+        * selected in the receiver. The order of the indices is unspecified. The\r
+        * array is empty if no items are selected.\r
+        * <p>\r
+        * Note: This is not the actual structure used by the receiver to maintain\r
+        * its selection, so modifying the array will not affect the receiver.\r
+        * </p>\r
+        * \r
+        * @return the array of indices of the selected items\r
+        * @exception NullPointerException if there is no item in the receiver\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public int[] getSelectedIndex() {\r
+               checkWidget();\r
+               checkNullElement();\r
+               final List<Integer> selectedIndex = new ArrayList<Integer>();\r
+               for (int i = 0; i < this.elements.size(); i++) {\r
+                       if (this.selection.contains(this.elements.get(i))) {\r
+                               selectedIndex.add(i);\r
+                       }\r
+               }\r
+\r
+               final int[] returned = new int[selectedIndex.size()];\r
+               for (int i = 0; i < selectedIndex.size(); i++) {\r
+                       returned[i] = selectedIndex.get(i);\r
+               }\r
+\r
+               return returned;\r
+       }\r
+\r
+       /**\r
+        * Returns an array of <code>Object</code>s that are currently selected in\r
+        * the receiver. The order of the items is unspecified. An empty array\r
+        * indicates that no items are selected.\r
+        * <p>\r
+        * Note: This is not the actual structure used by the receiver to maintain\r
+        * its selection, so modifying the array will not affect the receiver.\r
+        * </p>\r
+        * \r
+        * @return an array representing the selection\r
+        * @exception NullPointerException if there is no item in the receiver\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public List<T> getSelection() {\r
+               checkWidget();\r
+               checkNullElement();\r
+               return new ArrayList<T>(this.selection);\r
+       }\r
+\r
+       /**\r
+        * Deselects the item at the given zero-relative index in the receiver's\r
+        * list. If the item at the index was already deselected, it remains\r
+        * deselected. Indices that are out of range are ignored.\r
+        * \r
+        * @param index the index of the item to deselect\r
+        * @exception NullPointerException if there is no item in the receiver\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_RANGE - if the index is not between 0\r
+        *                and the number of elements in the list minus 1 (inclusive)\r
+        *                </li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void deselectAt(final int index) {\r
+               checkWidget();\r
+               checkNullElement();\r
+\r
+               if (index < 0 || index >= this.elements.size()) {\r
+                       SWT.error(SWT.ERROR_INVALID_RANGE);\r
+               }\r
+\r
+               this.selection.remove(index);\r
+               updateSelection();\r
+       }\r
+\r
+       /**\r
+        * Deselects the item in the receiver's list. If the item at the index was\r
+        * already deselected, it remains deselected.\r
+        * \r
+        * @param value the item to deselect\r
+        * @exception NullPointerException if there is no item in the receiver\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_RANGE - if the index is not between 0\r
+        *                and the number of elements in the list minus 1 (inclusive)\r
+        *                </li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void deselect(final T value) {\r
+               checkWidget();\r
+               checkNullElement();\r
+               this.selection.remove(value);\r
+               updateSelection();\r
+       }\r
+\r
+       /**\r
+        * Deselects all items in the receiver's list.\r
+        * \r
+        * @param value the item to deselect\r
+        * @exception NullPointerException if there is no item in the receiver\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void deselectAll() {\r
+               checkWidget();\r
+               checkNullElement();\r
+               this.selection.clear();\r
+               updateSelection();\r
+       }\r
+\r
+       /**\r
+        * @return the number of columns\r
+        */\r
+       public int getNumberOfColumns() {\r
+               checkWidget();\r
+               return this.numberOfColumns;\r
+       }\r
+\r
+       /**\r
+        * @param numberOfColumns the number of columns\r
+        */\r
+       public void setNumberOfColumns(final int numberOfColumns) {\r
+               checkWidget();\r
+               this.numberOfColumns = numberOfColumns;\r
+               this.popup.dispose();\r
+               this.popup = null;\r
+               createPopup();\r
+       }\r
+\r
+       /**\r
+        * @return the separator used in the text field. Default value is ","\r
+        */\r
+       public String getSeparator() {\r
+               return this.separator;\r
+       }\r
+\r
+       /**\r
+        * @param separator the new value of the separator\r
+        */\r
+       public void setSeparator(final String separator) {\r
+               this.separator = separator;\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Control#getForeground()\r
+        */\r
+       @Override\r
+       public Color getForeground() {\r
+               return this.foreground;\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Control#setForeground(org.eclipse.swt.graphics.Color)\r
+        */\r
+       @Override\r
+       public void setForeground(final Color foreground) {\r
+               this.foreground = foreground;\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Control#getBackground()\r
+        */\r
+       @Override\r
+       public Color getBackground() {\r
+               return this.background;\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Control#setBackground(org.eclipse.swt.graphics.Color)\r
+        */\r
+       @Override\r
+       public void setBackground(final Color background) {\r
+               this.background = background;\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Control#getFont()\r
+        */\r
+       @Override\r
+       public Font getFont() {\r
+               return this.font;\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Control#setFont(org.eclipse.swt.graphics.Font)\r
+        */\r
+       @Override\r
+       public void setFont(final Font font) {\r
+               this.font = font;\r
+       }\r
+\r
+       /**\r
+        * Refresh the widget (after the add of a new element for example)\r
+        */\r
+       public void refresh() {\r
+               checkWidget();\r
+               this.popup.dispose();\r
+               this.popup = null;\r
+               createPopup();\r
+               updateSelection();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Composite#computeSize(int, int, boolean)\r
+        */\r
+       @Override\r
+       public Point computeSize(final int wHint, final int hHint, final boolean changed) {\r
+               checkWidget();\r
+               int width = 0, height = 0;\r
+\r
+               final GC gc = new GC(this.text);\r
+               final int spacer = gc.stringExtent(" ").x;\r
+               final int textWidth = gc.stringExtent(this.text.getText()).x;\r
+               gc.dispose();\r
+               final Point textSize = this.text.computeSize(SWT.DEFAULT, SWT.DEFAULT, changed);\r
+               final Point arrowSize = this.arrow.computeSize(SWT.DEFAULT, SWT.DEFAULT, changed);\r
+               final int borderWidth = getBorderWidth();\r
+\r
+               height = Math.max(textSize.y, arrowSize.y);\r
+               width = textWidth + 2 * spacer + arrowSize.x + 2 * borderWidth;\r
+               if (wHint != SWT.DEFAULT) {\r
+                       width = wHint;\r
+               }\r
+               if (hHint != SWT.DEFAULT) {\r
+                       height = hHint;\r
+               }\r
+               return new Point(width + 2 * borderWidth, height + 2 * borderWidth);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Control#setEnabled(boolean)\r
+        */\r
+       @Override\r
+       public void setEnabled(final boolean enabled) {\r
+               checkWidget();\r
+               this.arrow.setEnabled(enabled);\r
+               this.text.setEnabled(enabled);\r
+               super.setEnabled(enabled);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Control#setToolTipText(java.lang.String)\r
+        */\r
+       @Override\r
+       public void setToolTipText(final String txt) {\r
+               checkWidget();\r
+               this.text.setToolTipText(txt);\r
+       }\r
+\r
+       /**\r
+        * @return the selection listener\r
+        */\r
+       public SelectionListener getSelectionListener() {\r
+               checkWidget();\r
+               return this.selectionListener;\r
+       }\r
+\r
+       /**\r
+        * @param selectionListener the new selection listener\r
+        */\r
+       public void setSelectionListener(final MultiChoiceSelectionListener<T> selectionListener) {\r
+               checkWidget();\r
+               this.selectionListener = selectionListener;\r
+               refresh();\r
+       }\r
+\r
+       /**\r
+        * Update the selection\r
+        */\r
+       public void updateSelection() {\r
+               checkWidget();\r
+               if (isDisposed()) {\r
+                       return;\r
+               }\r
+\r
+               if (this.popup == null || this.popup.isDisposed()) {\r
+                       return;\r
+               }\r
+\r
+               for (int i = 0; i < this.checkboxes.size(); i++) {\r
+                       final Button currentButton = this.checkboxes.get(i);\r
+                       if (!currentButton.isDisposed()) {\r
+                               final Object content = currentButton.getData();\r
+                               currentButton.setSelection(this.selection.contains(content));\r
+                       }\r
+               }\r
+               setLabel();\r
+\r
+       }\r
+\r
+       /**\r
+        * @return the last modified item\r
+        */\r
+       T getLastModified() {\r
+               return this.lastModified;\r
+       }\r
+\r
+       /**\r
+        * @return the popup\r
+        */\r
+       Shell getPopup() {\r
+               return this.popup;\r
+       }\r
+\r
+       /**\r
+        * Create the popup that contains all checkboxes\r
+        */\r
+       private void createPopup() {\r
+               this.popup = new Shell(getShell(), SWT.NO_TRIM | SWT.ON_TOP);\r
+               this.popup.setLayout(new GridLayout(this.numberOfColumns, true));\r
+\r
+               final int[] popupEvents = { SWT.Close, SWT.Paint, SWT.Deactivate, SWT.Dispose };\r
+               for (int i = 0; i < popupEvents.length; i++) {\r
+                       this.popup.addListener(popupEvents[i], this.listener);\r
+               }\r
+\r
+               if (this.elements == null) {\r
+                       return;\r
+               }\r
+\r
+               this.checkboxes = new ArrayList<Button>(this.elements.size());\r
+               for (final T o : this.elements) {\r
+                       final Button checkBoxButton = new Button(this.popup, SWT.CHECK);\r
+\r
+                       if (this.font != null) {\r
+                               checkBoxButton.setFont(this.font);\r
+                       }\r
+                       if (this.foreground != null) {\r
+                               checkBoxButton.setForeground(this.foreground);\r
+                       }\r
+                       if (this.background != null) {\r
+                               checkBoxButton.setBackground(this.background);\r
+                       }\r
+\r
+                       checkBoxButton.setData(o);\r
+                       checkBoxButton.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false));\r
+                       checkBoxButton.setText(o.toString());\r
+                       checkBoxButton.addSelectionListener(new SimpleSelectionAdapter() {\r
+                               @Override\r
+                               public void handle(final SelectionEvent e) {\r
+                                       if (checkBoxButton.getSelection()) {\r
+                                               MultiChoice.this.selection.add(o);\r
+                                       } else {\r
+                                               MultiChoice.this.selection.remove(o);\r
+                                       }\r
+                                       MultiChoice.this.lastModified = o;\r
+                                       setLabel();\r
+                               }\r
+                       });\r
+\r
+                       if (this.selectionListener != null) {\r
+                               checkBoxButton.addSelectionListener(this.selectionListener);\r
+                       }\r
+\r
+                       checkBoxButton.setSelection(this.selection.contains(o));\r
+                       this.checkboxes.add(checkBoxButton);\r
+               }\r
+               this.popup.layout();\r
+       }\r
+\r
+       /**\r
+        * Set the value of the label, based on the selected items\r
+        */\r
+       private void setLabel() {\r
+               if (this.checkboxes == null) {\r
+                       this.text.setText("");\r
+                       return;\r
+               }\r
+\r
+               final List<String> values = new ArrayList<String>();\r
+               for (final Button current : this.checkboxes) {\r
+                       if (current.getSelection()) {\r
+                               values.add(current.getText());\r
+                       }\r
+               }\r
+\r
+               final StringBuffer sb = new StringBuffer();\r
+               final Iterator<String> it = values.iterator();\r
+               while (it.hasNext()) {\r
+                       sb.append(it.next());\r
+                       if (it.hasNext()) {\r
+                               sb.append(this.separator);\r
+                       }\r
+               }\r
+\r
+               this.text.setText(sb.toString());\r
+       }\r
+\r
+       /**\r
+        * Handle a focus event\r
+        * \r
+        * @param type type of the event to handle\r
+        */\r
+       private void handleFocus(final int type) {\r
+               if (isDisposed()) {\r
+                       return;\r
+               }\r
+               switch (type) {\r
+               case SWT.FocusIn: {\r
+                       if (this.hasFocus) {\r
+                               return;\r
+                       }\r
+                       this.hasFocus = true;\r
+                       final Shell shell = getShell();\r
+                       shell.removeListener(SWT.Deactivate, this.listener);\r
+                       shell.addListener(SWT.Deactivate, this.listener);\r
+                       final Display display = getDisplay();\r
+                       display.removeFilter(SWT.FocusIn, this.filter);\r
+                       display.addFilter(SWT.FocusIn, this.filter);\r
+                       final Event e = new Event();\r
+                       notifyListeners(SWT.FocusIn, e);\r
+                       break;\r
+               }\r
+               case SWT.FocusOut: {\r
+                       if (!this.hasFocus) {\r
+                               return;\r
+                       }\r
+                       final Control focusControl = getDisplay().getFocusControl();\r
+                       if (focusControl == this.arrow) {\r
+                               return;\r
+                       }\r
+                       this.hasFocus = false;\r
+                       final Shell shell = getShell();\r
+                       shell.removeListener(SWT.Deactivate, this.listener);\r
+                       final Display display = getDisplay();\r
+                       display.removeFilter(SWT.FocusIn, this.filter);\r
+                       final Event e = new Event();\r
+                       notifyListeners(SWT.FocusOut, e);\r
+                       break;\r
+               }\r
+               default:\r
+                   break;\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Handle a multichoice event\r
+        * \r
+        * @param event event to handle\r
+        */\r
+       private void multiChoiceEvent(final Event event) {\r
+               switch (event.type) {\r
+               case SWT.Dispose:\r
+                       if (this.popup != null && !this.popup.isDisposed()) {\r
+                               this.popup.dispose();\r
+                       }\r
+                       final Shell shell = getShell();\r
+                       shell.removeListener(SWT.Deactivate, this.listener);\r
+                       final Display display = getDisplay();\r
+                       display.removeFilter(SWT.FocusIn, this.filter);\r
+                       this.popup = null;\r
+                       this.arrow = null;\r
+                       break;\r
+               case SWT.Move:\r
+                       dropDown(false);\r
+                       break;\r
+               case SWT.Resize:\r
+                       if (isDropped()) {\r
+                               dropDown(false);\r
+                       }\r
+                       break;\r
+               default:\r
+                   break;\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Handle a button event\r
+        * \r
+        * @param event event to hangle\r
+        */\r
+       private void buttonEvent(final Event event) {\r
+               switch (event.type) {\r
+               case SWT.FocusIn: {\r
+                       handleFocus(SWT.FocusIn);\r
+                       break;\r
+               }\r
+               case SWT.Selection: {\r
+                       dropDown(!isDropped());\r
+                       break;\r
+               }\r
+               default:\r
+                   break;\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @return <code>true</code> if the popup is visible and not dropped,\r
+        *         <code>false</code> otherwise\r
+        */\r
+       private boolean isDropped() {\r
+               return !this.popup.isDisposed() && this.popup.getVisible();\r
+       }\r
+\r
+       /**\r
+        * Handle a popup event\r
+        * \r
+        * @param event event to handle\r
+        */\r
+       private void popupEvent(final Event event) {\r
+               switch (event.type) {\r
+               case SWT.Paint:\r
+                       final Rectangle listRect = this.popup.getBounds();\r
+                       final Color black = getDisplay().getSystemColor(SWT.COLOR_BLACK);\r
+                       event.gc.setForeground(black);\r
+                       event.gc.drawRectangle(0, 0, listRect.width - 1, listRect.height - 1);\r
+                       break;\r
+               case SWT.Close:\r
+                       event.doit = false;\r
+                       dropDown(false);\r
+                       break;\r
+               case SWT.Deactivate:\r
+                       dropDown(false);\r
+                       break;\r
+               case SWT.Dispose:\r
+                       if (this.checkboxes != null) {\r
+                               this.checkboxes.clear();\r
+                       }\r
+                       this.checkboxes = null;\r
+                       break;\r
+        default:\r
+            break;\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Display/Hide the popup window\r
+        * \r
+        * @param drop if <code>true</code>, displays the popup window. If\r
+        *            <code>false</code>, hide the popup window\r
+        */\r
+       private void dropDown(final boolean drop) {\r
+               if (drop == isDropped()) {\r
+                       return;\r
+               }\r
+\r
+               if (!drop) {\r
+                       this.popup.setVisible(false);\r
+                       if (!isDisposed()) {\r
+                               this.text.setFocus();\r
+                       }\r
+                       return;\r
+               }\r
+\r
+               if (getShell() != this.popup.getParent()) {\r
+                       this.popup.dispose();\r
+                       this.popup = null;\r
+                       createPopup();\r
+               }\r
+\r
+               final Point arrowRect = this.arrow.toDisplay(this.arrow.getSize().x - 5, this.arrow.getSize().y + this.arrow.getBorderWidth() - 3);\r
+               int x = arrowRect.x;\r
+               int y = arrowRect.y;\r
+\r
+               final Rectangle displayRect = getMonitor().getClientArea();\r
+               final Rectangle parentRect = getDisplay().map(getParent(), null, getBounds());\r
+               this.popup.pack();\r
+               final int width = this.popup.getBounds().width;\r
+               final int height = this.popup.getBounds().height;\r
+\r
+               if (y + height > displayRect.y + displayRect.height) {\r
+                       y = parentRect.y - height;\r
+               }\r
+               if (x + width > displayRect.x + displayRect.width) {\r
+                       x = displayRect.x + displayRect.width - width;\r
+               }\r
+\r
+               this.popup.setLocation(x, y);\r
+               this.popup.setVisible(true);\r
+               this.popup.setFocus();\r
+       }\r
+\r
+       /**\r
+        * Check if the elements attributes is not null\r
+        * \r
+        * @exception NullPointerException if there is no item in the receiver\r
+        */\r
+       private void checkNullElement() {\r
+               if (this.elements == null) {\r
+                       throw new NullPointerException("There is no element associated to this widget");\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @param index\r
+        * @throws NullPointerException\r
+        * @throws IllegalArgumentException\r
+        */\r
+       private void checkRange(final int index) throws NullPointerException {\r
+               checkNullElement();\r
+               if (index < 0 || index >= this.elements.size()) {\r
+                       SWT.error(SWT.ERROR_INVALID_RANGE);\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/multiChoice/MultiChoiceSelectionListener.java b/org.tizen.common.externals/src/org/mihalis/opal/multiChoice/MultiChoiceSelectionListener.java
new file mode 100644 (file)
index 0000000..ac5ca79
--- /dev/null
@@ -0,0 +1,56 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+\r
+package org.mihalis.opal.multiChoice;\r
+\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Shell;\r
+\r
+/**\r
+ * Classes which extend this abstract class provide methods that deal with the\r
+ * events that are generated when selection occurs in a MultiChoice control.\r
+ */\r
+public abstract class MultiChoiceSelectionListener<T> implements SelectionListener {\r
+       private final MultiChoice<T> parent;\r
+\r
+       public MultiChoiceSelectionListener(final MultiChoice<T> parent) {\r
+               this.parent = parent;\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+        */\r
+       @Override\r
+       public final void widgetSelected(final SelectionEvent e) {\r
+               final Button button = (Button) e.widget;\r
+               handle(this.parent, this.parent.getLastModified(), button.getSelection(), this.parent.getPopup());\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)\r
+        */\r
+       @Override\r
+       public final void widgetDefaultSelected(final SelectionEvent inutile) {\r
+       }\r
+\r
+       /**\r
+        * This method contains the code that is called when the selection has\r
+        * changed\r
+        * \r
+        * @param parent MultiChoice responsible of the event\r
+        * @param receiver Object modified\r
+        * @param selected If <code>true</code>, the check box has been checked\r
+        * @param popup the popup window that contains all checkboxes\r
+        */\r
+       public abstract void handle(MultiChoice<T> parent, T receiver, boolean selected, Shell popup);\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/notify/Notifier.java b/org.tizen.common.externals/src/org/mihalis/opal/notify/Notifier.java
new file mode 100644 (file)
index 0000000..014a19c
--- /dev/null
@@ -0,0 +1,347 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation \r
+ *******************************************************************************/\r
+package org.mihalis.opal.notify;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.custom.StyledText;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Shell;\r
+import org.mihalis.opal.notify.NotifierColorsFactory.NotifierTheme;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * This class provides a notifier window, which is a window that appears in the\r
+ * bottom of the screen and slides.\r
+ */\r
+public class Notifier {\r
+       private static final int FONT_SIZE = 10;\r
+       private static final int MAX_DURATION_FOR_OPENING = 500;\r
+       private static final int DISPLAY_TIME = 4500;\r
+\r
+       private static final int FADE_TIMER = 50;\r
+       private static final int FADE_OUT_STEP = 8;\r
+\r
+       private static final int STEP = 5;\r
+\r
+       /**\r
+        * Starts a notification. A window will appear in the bottom of the screen,\r
+        * then will disappear after 4.5 s\r
+        * \r
+        * @param title the title of the popup window\r
+        * @param text the text of the notification\r
+        * \r
+        */\r
+       public static void notify(final String title, final String text) {\r
+               notify(null, title, text, NotifierTheme.YELLOW_THEME);\r
+       }\r
+\r
+       /**\r
+        * Starts a notification. A window will appear in the bottom of the screen,\r
+        * then will disappear after 4.5 s\r
+        * \r
+        * @param image the image to display (if <code>null</code>, a default image\r
+        *            is displayed)\r
+        * @param title the title of the popup window\r
+        * @param text the text of the notification\r
+        * \r
+        */\r
+       public static void notify(final Image image, final String title, final String text) {\r
+               notify(image, title, text, NotifierTheme.YELLOW_THEME);\r
+\r
+       }\r
+\r
+       /**\r
+        * Starts a notification. A window will appear in the bottom of the screen,\r
+        * then will disappear after 4.5 s\r
+        * \r
+        * @param title the title of the popup window\r
+        * @param text the text of the notification\r
+        * @param theme the graphical theme. If <code>null</code>, the yellow theme\r
+        *            is used\r
+        * \r
+        * @see NotifierTheme\r
+        */\r
+       public static void notify(final String title, final String text, final NotifierTheme theme) {\r
+               notify(null, title, text, theme);\r
+       }\r
+\r
+       /**\r
+        * Starts a notification. A window will appear in the bottom of the screen,\r
+        * then will disappear after 4.5 s\r
+        * \r
+        * @param image the image to display (if <code>null</code>, a default image\r
+        *            is displayed)\r
+        * @param title the title of the popup window\r
+        * @param text the text of the notification\r
+        * @param theme the graphical theme. If <code>null</code>, the yellow theme\r
+        *            is used\r
+        * \r
+        * @see NotifierTheme\r
+        */\r
+       public static void notify(final Image image, final String title, final String text, final NotifierTheme theme) {\r
+               final Shell shell = createNotificationWindow(image, title, text, NotifierColorsFactory.getColorsForTheme(theme));\r
+               makeShellAppears(shell);\r
+\r
+       }\r
+\r
+       /**\r
+        * Creates a notification window\r
+        * \r
+        * @param image image. If <code>null</code>, a default image is used\r
+        * @param title title, the title of the window\r
+        * @param text text of the window\r
+        * @param colors color set\r
+        * @return the notification window as a shell object\r
+        */\r
+       private static Shell createNotificationWindow(final Image image, final String title, final String text, final NotifierColors colors) {\r
+               final Shell shell = new Shell(SWT.NO_TRIM | SWT.NO_FOCUS);\r
+               shell.setLayout(new GridLayout(2, false));\r
+               shell.setBackgroundMode(SWT.INHERIT_FORCE);\r
+\r
+               createTitle(shell, title, colors);\r
+               createImage(shell, image);\r
+               createText(shell, text, colors);\r
+               createBackground(shell, colors);\r
+               createCloseAction(shell);\r
+\r
+               shell.addListener(SWT.Dispose, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               colors.dispose();\r
+                       }\r
+               });\r
+\r
+               shell.pack();\r
+               shell.setMinimumSize(320, 100);\r
+               return shell;\r
+       }\r
+\r
+       /**\r
+        * Creates the title part of the window\r
+        * \r
+        * @param shell the window\r
+        * @param title the title\r
+        * @param colors the color set\r
+        */\r
+       private static void createTitle(final Shell shell, final String title, final NotifierColors colors) {\r
+               final Label titleLabel = new Label(shell, SWT.NONE);\r
+               final GridData gdLabel = new GridData(GridData.BEGINNING, GridData.BEGINNING, true, false, 2, 1);\r
+               gdLabel.horizontalIndent = 40;\r
+               titleLabel.setLayoutData(gdLabel);\r
+               final Color titleColor = colors.titleColor;\r
+               titleLabel.setForeground(titleColor);\r
+\r
+               final Font titleFont = SWTGraphicUtil.buildFontFrom(titleLabel, SWT.BOLD, FONT_SIZE);\r
+               titleLabel.setFont(titleFont);\r
+               titleLabel.setText(title);\r
+               SWTGraphicUtil.dispose(shell, titleFont);\r
+       }\r
+\r
+       /**\r
+        * Creates the image part of the window\r
+        * \r
+        * @param shell the window\r
+        * @param image the image\r
+        */\r
+       private static void createImage(final Shell shell, final Image image) {\r
+               final Label labelImage = new Label(shell, SWT.NONE);\r
+               final GridData gdImage = new GridData(GridData.CENTER, GridData.BEGINNING, false, true);\r
+               gdImage.horizontalIndent = 10;\r
+               labelImage.setLayoutData(gdImage);\r
+               if (image == null) {\r
+                       final Image temp = SWTGraphicUtil.createImage("images/information.png");\r
+                       labelImage.setImage(temp);\r
+                       SWTGraphicUtil.dispose(shell, temp);\r
+               } else {\r
+                       labelImage.setImage(image);\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Creates the text part of the window\r
+        * \r
+        * @param shell the window\r
+        * @param text the text\r
+        * @param colors the color set\r
+        */\r
+       private static void createText(final Shell shell, final String text, final NotifierColors colors) {\r
+               final StyledText textLabel = new StyledText(shell, SWT.WRAP | SWT.READ_ONLY);\r
+               final GridData gdText = new GridData(GridData.FILL, GridData.FILL, true, true);\r
+               gdText.horizontalIndent = 15;\r
+               textLabel.setLayoutData(gdText);\r
+               textLabel.setEnabled(false);\r
+               final Font textFont = SWTGraphicUtil.buildFontFrom(textLabel, SWT.NONE, 10);\r
+               textLabel.setFont(textFont);\r
+\r
+               final Color textColor = colors.textColor;\r
+               textLabel.setForeground(textColor);\r
+\r
+               textLabel.setText("<html><body>" + text + "</body></html>");\r
+               SWTGraphicUtil.applyHTMLFormating(textLabel);\r
+\r
+               SWTGraphicUtil.dispose(shell, textFont);\r
+\r
+       }\r
+\r
+       /**\r
+        * Creates the background of the window\r
+        * \r
+        * @param shell the window\r
+        * @param colors the color set of the window\r
+        */\r
+       private static void createBackground(final Shell shell, final NotifierColors colors) {\r
+               shell.addListener(SWT.Resize, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               final Rectangle rect = shell.getClientArea();\r
+                               final Image newImage = new Image(Display.getDefault(), Math.max(1, rect.width), rect.height);\r
+                               final GC gc = new GC(newImage);\r
+                               gc.setAntialias(SWT.ON);\r
+\r
+                               final Color borderColor = colors.borderColor;\r
+                               final Color fillColor1 = colors.leftColor;\r
+                               final Color fillColor2 = colors.rightColor;\r
+\r
+                               gc.setBackground(borderColor);\r
+                               gc.fillRoundRectangle(0, 0, rect.width, rect.height, 8, 8);\r
+\r
+                               gc.setBackground(fillColor1);\r
+                               gc.fillRoundRectangle(1, 1, rect.width - 2, rect.height - 2, 8, 8);\r
+\r
+                               gc.setBackground(fillColor2);\r
+                               gc.fillRoundRectangle(30, 1, rect.width - 32, rect.height - 2, 8, 8);\r
+                               gc.fillRectangle(30, 1, 10, rect.height - 2);\r
+\r
+                               final Image closeImage = SWTGraphicUtil.createImage("images/close.png");\r
+                               gc.drawImage(closeImage, rect.width - 21, 13);\r
+\r
+                               gc.dispose();\r
+                               closeImage.dispose();\r
+\r
+                               shell.setBackgroundImage(newImage);\r
+\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * @param shell shell that will appear\r
+        */\r
+       private static void makeShellAppears(final Shell shell) {\r
+               if (shell == null || shell.isDisposed()) {\r
+                       return;\r
+               }\r
+\r
+               final Rectangle clientArea = Display.getDefault().getActiveShell().getMonitor().getClientArea();\r
+               final int startX = clientArea.x + clientArea.width - shell.getSize().x;\r
+\r
+               final int stepForPosition = MAX_DURATION_FOR_OPENING / shell.getSize().y * STEP;\r
+               final int stepForAlpha = STEP * 255 / shell.getSize().y;\r
+\r
+               final int lastPosition = clientArea.y + clientArea.height - shell.getSize().y;\r
+\r
+               shell.setAlpha(0);\r
+               shell.setLocation(startX, clientArea.y + clientArea.height);\r
+               shell.open();\r
+\r
+               shell.getDisplay().timerExec(stepForPosition, new Runnable() {\r
+\r
+                       @Override\r
+                       public void run() {\r
+\r
+                               if (shell == null || shell.isDisposed()) {\r
+                                       return;\r
+                               }\r
+\r
+                               shell.setLocation(startX, shell.getLocation().y - STEP);\r
+                               shell.setAlpha(shell.getAlpha() + stepForAlpha);\r
+                               if (shell.getLocation().y >= lastPosition) {\r
+                                       shell.getDisplay().timerExec(stepForPosition, this);\r
+                               } else {\r
+                                       shell.setAlpha(255);\r
+                                       Display.getDefault().timerExec(DISPLAY_TIME, fadeOut(shell, false));\r
+                               }\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * @param shell shell that will disappear\r
+        * @param fast if true, the fading is much faster\r
+        * @return a runnable\r
+        */\r
+       private static Runnable fadeOut(final Shell shell, final boolean fast) {\r
+               return new Runnable() {\r
+\r
+                       @Override\r
+                       public void run() {\r
+                               if (shell == null || shell.isDisposed()) {\r
+                                       return;\r
+                               }\r
+\r
+                               int currentAlpha = shell.getAlpha();\r
+                               currentAlpha -= FADE_OUT_STEP * (fast ? 8 : 1);\r
+\r
+                               if (currentAlpha <= 0) {\r
+                                       shell.setAlpha(0);\r
+                                       shell.dispose();\r
+                                       return;\r
+                               }\r
+\r
+                               shell.setAlpha(currentAlpha);\r
+\r
+                               Display.getDefault().timerExec(FADE_TIMER, this);\r
+\r
+                       }\r
+\r
+               };\r
+       }\r
+\r
+       /**\r
+        * Add a listener to the shell in order to handle the clicks on the close\r
+        * button\r
+        * \r
+        * @param shell associated shell\r
+        */\r
+       private static void createCloseAction(final Shell shell) {\r
+               shell.addListener(SWT.MouseUp, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               final Rectangle rect = shell.getClientArea();\r
+                               final int xUpperLeftCorner = rect.width - 21;\r
+                               final int yUpperLeftCorner = 13;\r
+\r
+                               if (event.x >= xUpperLeftCorner && event.x <= xUpperLeftCorner + 8 && event.y >= yUpperLeftCorner && event.y <= yUpperLeftCorner + 8) {\r
+                                       Display.getDefault().timerExec(0, fadeOut(shell, true));\r
+                               }\r
+\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/notify/NotifierColors.java b/org.tizen.common.externals/src/org/mihalis/opal/notify/NotifierColors.java
new file mode 100644 (file)
index 0000000..ddde663
--- /dev/null
@@ -0,0 +1,34 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation \r
+ *******************************************************************************/\r
+package org.mihalis.opal.notify;\r
+\r
+import org.eclipse.swt.graphics.Color;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * This class is a simple POJO that holds colors used by the Notifier widget\r
+ * \r
+ */\r
+class NotifierColors {\r
+       Color titleColor;\r
+       Color textColor;\r
+       Color borderColor;\r
+       Color leftColor;\r
+       Color rightColor;\r
+\r
+       void dispose() {\r
+               SWTGraphicUtil.dispose(this.titleColor);\r
+               SWTGraphicUtil.dispose(this.borderColor);\r
+               SWTGraphicUtil.dispose(this.leftColor);\r
+               SWTGraphicUtil.dispose(this.rightColor);\r
+               SWTGraphicUtil.dispose(this.textColor);\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/notify/NotifierColorsFactory.java b/org.tizen.common.externals/src/org/mihalis/opal/notify/NotifierColorsFactory.java
new file mode 100644 (file)
index 0000000..1839063
--- /dev/null
@@ -0,0 +1,66 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON All rights reserved. This program and the\r
+ * accompanying materials are made available under the terms of the Eclipse\r
+ * Public License v1.0 which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ * \r
+ * Contributors: Laurent CARON (laurent.caron at gmail dot com) - initial API\r
+ * and implementation\r
+ *******************************************************************************/\r
+\r
+package org.mihalis.opal.notify;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.widgets.Display;\r
+\r
+/**\r
+ * This class creates the colors associated to a given theme\r
+ * \r
+ */\r
+public class NotifierColorsFactory {\r
+\r
+       public enum NotifierTheme {\r
+               YELLOW_THEME, GRAY_THEME, BLUE_THEME\r
+       };\r
+\r
+       /**\r
+        * Constructor\r
+        */\r
+       private NotifierColorsFactory() {\r
+\r
+       }\r
+\r
+       /**\r
+        * @param theme a theme for the notifier widget\r
+        * @return the color set for the given theme\r
+        */\r
+       static NotifierColors getColorsForTheme(final NotifierTheme theme) {\r
+               final NotifierColors colors = new NotifierColors();\r
+               switch (theme) {\r
+               case BLUE_THEME:\r
+                       colors.textColor = new Color(Display.getDefault(), 4, 64, 140);\r
+                       colors.titleColor = Display.getDefault().getSystemColor(SWT.COLOR_BLACK);\r
+                       colors.borderColor = new Color(Display.getDefault(), 153, 188, 232);\r
+                       colors.leftColor = new Color(Display.getDefault(), 210, 225, 244);\r
+                       colors.rightColor = new Color(Display.getDefault(), 182, 207, 238);\r
+                       break;\r
+               case GRAY_THEME:\r
+                       colors.textColor = Display.getDefault().getSystemColor(SWT.COLOR_BLACK);\r
+                       colors.titleColor = Display.getDefault().getSystemColor(SWT.COLOR_DARK_RED);\r
+                       colors.borderColor = new Color(Display.getDefault(), 208, 208, 208);\r
+                       colors.leftColor = new Color(Display.getDefault(), 255, 255, 255);\r
+                       colors.rightColor = new Color(Display.getDefault(), 208, 208, 208);\r
+                       break;\r
+               default:\r
+                       colors.textColor = Display.getDefault().getSystemColor(SWT.COLOR_BLACK);\r
+                       colors.titleColor = Display.getDefault().getSystemColor(SWT.COLOR_BLACK);\r
+                       colors.borderColor = new Color(Display.getDefault(), 218, 178, 85);\r
+                       colors.leftColor = new Color(Display.getDefault(), 220, 220, 160);\r
+                       colors.rightColor = new Color(Display.getDefault(), 255, 255, 191);\r
+                       break;\r
+               }\r
+               return colors;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/opalDialog/ChoiceItem.java b/org.tizen.common.externals/src/org/mihalis/opal/opalDialog/ChoiceItem.java
new file mode 100644 (file)
index 0000000..cff7959
--- /dev/null
@@ -0,0 +1,56 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *     Eugene Ryzhikov - Author of the Oxbow Project (http://code.google.com/p/oxbow/) - Inspiration\r
+ *******************************************************************************/\r
+package org.mihalis.opal.opalDialog;\r
+\r
+/**\r
+ * Instances of this class are choice items used by the choice widget\r
+ */\r
+public class ChoiceItem {\r
+\r
+       private final String instruction;\r
+       private final String text;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param instruction instruction of the choice\r
+        * @param text text displayed under the instruction\r
+        */\r
+       public ChoiceItem(final String instruction, final String text) {\r
+               this.instruction = instruction;\r
+               this.text = text;\r
+       }\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param instruction instruction\r
+        */\r
+       public ChoiceItem(final String instruction) {\r
+               this(instruction, null);\r
+       }\r
+\r
+       /**\r
+        * @return the instruction\r
+        */\r
+       public String getInstruction() {\r
+               return this.instruction;\r
+       }\r
+\r
+       /**\r
+        * @return the text\r
+        */\r
+       public String getText() {\r
+               return this.text;\r
+       };\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/opalDialog/ChoiceWidget.java b/org.tizen.common.externals/src/org/mihalis/opal/opalDialog/ChoiceWidget.java
new file mode 100644 (file)
index 0000000..24bcf99
--- /dev/null
@@ -0,0 +1,301 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *     Eugene Ryzhikov - Author of the Oxbow Project (http://code.google.com/p/oxbow/) - Inspiration\r
+ *******************************************************************************/\r
+package org.mihalis.opal.opalDialog;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.DisposeEvent;\r
+import org.eclipse.swt.events.DisposeListener;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Widget;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instance of this class are composite that represents a choice like in Windows\r
+ * Vista and Seven. It is composed of a green arrow, instruction and text\r
+ */\r
+public class ChoiceWidget extends Composite {\r
+       private Image oldImage;\r
+\r
+       private ChoiceItem choiceItem;\r
+\r
+       private Label image;\r
+       private Label instruction;\r
+       private Label text;\r
+\r
+       private final List<SelectionListener> selectionListeners;\r
+\r
+       private boolean selection;\r
+       private boolean insideComposite;\r
+       private boolean insideImage;\r
+       private boolean insideText;\r
+       private boolean insideInstruction;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a widget which will be the parent of the new instance\r
+        *            (cannot be null)\r
+        * @param style the style of widget to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        * @see Composite#Composite(Composite, int)\r
+        * @see SWT#NO_BACKGROUND\r
+        * @see SWT#NO_FOCUS\r
+        * @see SWT#NO_MERGE_PAINTS\r
+        * @see SWT#NO_REDRAW_RESIZE\r
+        * @see SWT#NO_RADIO_GROUP\r
+        * @see SWT#EMBEDDED\r
+        * @see SWT#DOUBLE_BUFFERED\r
+        * @see Widget#getStyle\r
+        */\r
+       public ChoiceWidget(final Composite parent, final int style) {\r
+               super(parent, style);\r
+\r
+               this.setBackgroundMode(SWT.INHERIT_DEFAULT);\r
+               this.setLayout(new GridLayout(2, false));\r
+\r
+               buildGreenArrow();\r
+               buildInstruction();\r
+               buildText();\r
+               addMouseListeners();\r
+\r
+               this.selectionListeners = new ArrayList<SelectionListener>();\r
+               this.addListener(SWT.Resize, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               drawComposite();\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Build the green arrow\r
+        */\r
+       private void buildGreenArrow() {\r
+               this.image = new Label(this, SWT.NONE);\r
+               this.image.setImage(SWTGraphicUtil.createImage("images/arrowGreenRight.png"));\r
+               this.image.setBackground(getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+               this.image.setLayoutData(new GridData(GridData.CENTER, GridData.BEGINNING, false, false, 1, 2));\r
+       }\r
+\r
+       /**\r
+        * Build the instruction\r
+        */\r
+       private void buildInstruction() {\r
+               final Color color = new Color(Display.getCurrent(), 35, 107, 178);\r
+               addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent e) {\r
+                               SWTGraphicUtil.dispose(color);\r
+                       }\r
+               });\r
+               this.instruction = new Label(this, SWT.NONE);\r
+               this.instruction.setForeground(color);\r
+               this.instruction.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false));\r
+       }\r
+\r
+       /**\r
+        * Build the panel\r
+        */\r
+       private void buildText() {\r
+               this.text = new Label(this, SWT.NONE);\r
+               this.text.setForeground(getDisplay().getSystemColor(SWT.COLOR_BLACK));\r
+               this.text.setLayoutData(new GridData(GridData.BEGINNING, GridData.BEGINNING, false, true));\r
+       }\r
+\r
+       /**\r
+        * Add mouse listeners\r
+        */\r
+       private void addMouseListeners() {\r
+               final Listener mouseEnterListener = new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+\r
+                               if (event.widget.equals(ChoiceWidget.this)) {\r
+                                       ChoiceWidget.this.insideComposite = true;\r
+                               }\r
+\r
+                               if (event.widget.equals(ChoiceWidget.this.image)) {\r
+                                       ChoiceWidget.this.insideImage = true;\r
+                               }\r
+                               if (event.widget.equals(ChoiceWidget.this.text)) {\r
+                                       ChoiceWidget.this.insideText = true;\r
+                               }\r
+                               if (event.widget.equals(ChoiceWidget.this.instruction)) {\r
+                                       ChoiceWidget.this.insideInstruction = true;\r
+                               }\r
+\r
+                               drawComposite();\r
+                       }\r
+               };\r
+\r
+               final Listener mouseExitListener = new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               if (event.widget.equals(ChoiceWidget.this)) {\r
+                                       ChoiceWidget.this.insideComposite = false;\r
+                               }\r
+\r
+                               if (event.widget.equals(ChoiceWidget.this.image)) {\r
+                                       ChoiceWidget.this.insideImage = false;\r
+                               }\r
+                               if (event.widget.equals(ChoiceWidget.this.text)) {\r
+                                       ChoiceWidget.this.insideText = false;\r
+                               }\r
+                               if (event.widget.equals(ChoiceWidget.this.instruction)) {\r
+                                       ChoiceWidget.this.insideInstruction = false;\r
+                               }\r
+                               drawComposite();\r
+                       }\r
+               };\r
+\r
+               final Listener mouseClickListener = new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               for (final SelectionListener selectionListener : ChoiceWidget.this.selectionListeners) {\r
+                                       selectionListener.widgetSelected(null);\r
+                               }\r
+                       }\r
+               };\r
+\r
+               addListener(SWT.MouseEnter, mouseEnterListener);\r
+               this.image.addListener(SWT.MouseEnter, mouseEnterListener);\r
+               this.text.addListener(SWT.MouseEnter, mouseEnterListener);\r
+               this.instruction.addListener(SWT.MouseEnter, mouseEnterListener);\r
+\r
+               addListener(SWT.MouseExit, mouseExitListener);\r
+               this.image.addListener(SWT.MouseExit, mouseExitListener);\r
+               this.text.addListener(SWT.MouseExit, mouseExitListener);\r
+               this.instruction.addListener(SWT.MouseExit, mouseExitListener);\r
+\r
+               addListener(SWT.MouseUp, mouseClickListener);\r
+               this.image.addListener(SWT.MouseUp, mouseClickListener);\r
+               this.text.addListener(SWT.MouseUp, mouseClickListener);\r
+               this.instruction.addListener(SWT.MouseUp, mouseClickListener);\r
+       }\r
+\r
+       /**\r
+        * Draw the composite\r
+        */\r
+       private void drawComposite() {\r
+\r
+               final Rectangle rect = this.getClientArea();\r
+               final Image newImage = new Image(getDisplay(), Math.max(1, rect.width), Math.max(1, rect.height));\r
+\r
+               final GC gc = new GC(newImage);\r
+\r
+               final boolean inside = this.insideComposite || this.insideImage || this.insideInstruction || this.insideText;\r
+\r
+               if (!inside && !this.selection) {\r
+                       gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+                       gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+                       gc.drawRectangle(rect.x, rect.y, rect.width, rect.height);\r
+               } else {\r
+                       // The mouse is over OR the item is selected\r
+                       final Color gradientColor = inside ? new Color(getDisplay(), 220, 231, 243) : new Color(getDisplay(), 241, 241, 241);\r
+                       final Color borderColor = inside ? new Color(getDisplay(), 35, 107, 178) : new Color(getDisplay(), 192, 192, 192);\r
+\r
+                       gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+                       gc.setBackground(gradientColor);\r
+                       gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height, true);\r
+\r
+                       gc.setForeground(borderColor);\r
+                       gc.drawRoundRectangle(rect.x, rect.y, rect.width - 1, rect.height - 1, 2, 2);\r
+\r
+                       gradientColor.dispose();\r
+                       borderColor.dispose();\r
+               }\r
+               gc.dispose();\r
+\r
+               this.setBackgroundImage(newImage);\r
+               if (this.oldImage != null) {\r
+                       this.oldImage.dispose();\r
+               }\r
+               this.oldImage = newImage;\r
+\r
+       }\r
+\r
+       /**\r
+        * @return the current choice item\r
+        */\r
+       public ChoiceItem getChoiceItem() {\r
+               return this.choiceItem;\r
+       }\r
+\r
+       /**\r
+        * @param choiceItem the choiceItem to set\r
+        */\r
+       public void setChoiceItem(final ChoiceItem choiceItem) {\r
+               this.choiceItem = choiceItem;\r
+               this.instruction.setText(choiceItem.getInstruction());\r
+               this.text.setText(choiceItem.getText());\r
+       }\r
+\r
+       /**\r
+        * Add a selection listener to this widget\r
+        * \r
+        * @param listener listener to add\r
+        */\r
+       public void addSelectionListener(final SelectionListener listener) {\r
+               this.selectionListeners.add(listener);\r
+       }\r
+\r
+       /**\r
+        * Remove a selection listener\r
+        * \r
+        * @param listener listener to remove\r
+        */\r
+       public void removeSelectionListener(final SelectionListener listener) {\r
+               this.selectionListeners.remove(listener);\r
+       }\r
+\r
+       public void setSelection(final boolean selection) {\r
+               this.selection = selection;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/opalDialog/Dialog.java b/org.tizen.common.externals/src/org/mihalis/opal/opalDialog/Dialog.java
new file mode 100644 (file)
index 0000000..914ab12
--- /dev/null
@@ -0,0 +1,480 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *     Eugene Ryzhikov - Author of the Oxbow Project (http://code.google.com/p/oxbow/) - Inspiration\r
+ *******************************************************************************/\r
+package org.mihalis.opal.opalDialog;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Shell;\r
+import org.mihalis.opal.utils.ResourceManager;\r
+\r
+/**\r
+ * Instances of this class are dialog box\r
+ */\r
+public class Dialog {\r
+\r
+       /**\r
+        * Types of opal dialog\r
+        */\r
+       public enum OpalDialogType {\r
+               CLOSE, YES_NO, OK, OK_CANCEL, SELECT_CANCEL, NO_BUTTON, OTHER, NONE\r
+       }\r
+\r
+       private String title;\r
+       OpalDialogType buttonType;\r
+       private final MessageArea messageArea;\r
+       private final FooterArea footerArea;\r
+       final Shell shell;\r
+\r
+       private int minimumWidth = 300;\r
+       private int minimumHeight = 150;\r
+\r
+       /**\r
+        * Constructor\r
+        */\r
+       public Dialog() {\r
+               this(null);\r
+       }\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param parent parent shell\r
+        */\r
+       public Dialog(final Shell parent) {\r
+               if (parent == null) {\r
+                       this.shell = new Shell(Display.getCurrent(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);\r
+               } else {\r
+                       this.shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);\r
+               }\r
+               this.messageArea = new MessageArea(this);\r
+               this.footerArea = new FooterArea(this);\r
+       }\r
+\r
+       /**\r
+        * Show the dialog box\r
+        * \r
+        * @return the index of the selected button\r
+        */\r
+       public int show() {\r
+               final GridLayout gd = new GridLayout(1, true);\r
+               gd.horizontalSpacing = 0;\r
+               gd.verticalSpacing = 0;\r
+               gd.marginHeight = gd.marginWidth = 0;\r
+               this.shell.setLayout(gd);\r
+\r
+               this.messageArea.render();\r
+               this.footerArea.render();\r
+               if (this.title != null) {\r
+                       this.shell.setText(this.title);\r
+               }\r
+               pack();\r
+               this.shell.open();\r
+\r
+               final Display display = this.shell.getDisplay();\r
+               while (!this.shell.isDisposed()) {\r
+                       if (!display.readAndDispatch()) {\r
+                               display.sleep();\r
+                       }\r
+               }\r
+\r
+               return this.footerArea.getSelectedButton();\r
+       }\r
+\r
+       /**\r
+        * Close the dialog box\r
+        */\r
+       public void close() {\r
+               this.shell.dispose();\r
+\r
+       }\r
+\r
+       /**\r
+        * Compute the size of the shell\r
+        */\r
+       void pack() {\r
+\r
+               final Point preferredSize = this.shell.computeSize(SWT.DEFAULT, SWT.DEFAULT);\r
+\r
+               if (preferredSize.x < this.minimumWidth) {\r
+\r
+                       preferredSize.x = this.minimumWidth;\r
+               }\r
+               if (preferredSize.y < this.minimumHeight) {\r
+                       preferredSize.y = this.minimumHeight;\r
+               }\r
+\r
+               final Point displaySize = new Point(this.shell.getDisplay().getBounds().width, this.shell.getDisplay().getBounds().height);\r
+\r
+               final int centerX = (displaySize.x - preferredSize.x) / 2;\r
+               final int centerY = (displaySize.y - preferredSize.y) / 2;\r
+\r
+               this.shell.setBounds(centerX, centerY, preferredSize.x, preferredSize.y);\r
+       }\r
+\r
+       // ------------------------------------------- Convenient methods\r
+\r
+       /**\r
+        * Create a dialog box that asks a question\r
+        * \r
+        * @param title title of the dialog box\r
+        * @param text text of the question\r
+        * @param defaultValue default value of the input\r
+        * @return the value typed by the user\r
+        */\r
+       public static String ask(final String title, final String text, final String defaultValue) {\r
+               return ask(null, title, text, defaultValue);\r
+       }\r
+\r
+       /**\r
+        * Create a dialog box that asks a question\r
+        * \r
+        * @shell parent shell\r
+        * @param title title of the dialog box\r
+        * @param text text of the question\r
+        * @param defaultValue default value of the input\r
+        * @return the value typed by the user\r
+        */\r
+       public static String ask(final Shell shell, final String title, final String text, final String defaultValue) {\r
+               final Dialog dialog = new Dialog(shell);\r
+               dialog.setTitle(ResourceManager.getLabel(ResourceManager.INPUT));\r
+               dialog.getMessageArea().setTitle(title).setText(text).setIcon(Display.getCurrent().getSystemImage(SWT.ICON_INFORMATION)).addTextBox(defaultValue);\r
+               dialog.setButtonType(OpalDialogType.OK_CANCEL);\r
+               if (dialog.show() == 0) {\r
+                       return dialog.getMessageArea().getTextBoxValue();\r
+               } else {\r
+                       return null;\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Create a dialog box that displays an error message\r
+        * \r
+        * @param title title of the dialog box\r
+        * @param errorMessage Error message\r
+        */\r
+       public static void error(final String title, final String errorMessage) {\r
+               error(null, title, errorMessage);\r
+       }\r
+\r
+       /**\r
+        * Create a dialog box that displays an error message\r
+        * \r
+        * @param shell parent shell\r
+        * @param title title of the dialog box\r
+        * @param errorMessage Error message\r
+        */\r
+       public static void error(final Shell shell, final String title, final String errorMessage) {\r
+               final Dialog dialog = new Dialog(shell);\r
+               dialog.setTitle(ResourceManager.getLabel(ResourceManager.APPLICATION_ERROR));\r
+               dialog.getMessageArea().setTitle(title).//\r
+                               setText(errorMessage).//\r
+                               setIcon(Display.getCurrent().getSystemImage(SWT.ICON_ERROR));\r
+               dialog.setButtonType(OpalDialogType.OK);\r
+               dialog.show();\r
+       }\r
+\r
+       /**\r
+        * Create a dialog box that inform the user\r
+        * \r
+        * @param title title of the dialog box\r
+        * @param text text to display\r
+        */\r
+       public static void inform(final String title, final String text) {\r
+               inform(null, title, text);\r
+       }\r
+\r
+       /**\r
+        * Create a dialog box that inform the user\r
+        * \r
+        * @param shell parent shell\r
+        * @param title title of the dialog box\r
+        * @param text text to display\r
+        */\r
+       public static void inform(final Shell shell, final String title, final String text) {\r
+               final Dialog dialog = new Dialog(shell);\r
+               dialog.setTitle(ResourceManager.getLabel(ResourceManager.INFORMATION));\r
+               dialog.getMessageArea().setTitle(title).setText(text).setIcon(Display.getCurrent().getSystemImage(SWT.ICON_INFORMATION));\r
+               dialog.setButtonType(OpalDialogType.CLOSE);\r
+               dialog.show();\r
+\r
+       }\r
+\r
+       /**\r
+        * Create a dialog box that asks the user a confirmation\r
+        * \r
+        * @param title title of the dialog box\r
+        * @param text text to display\r
+        * @return <code>true</code> if the user confirmed, <code>false</code>\r
+        *         otherwise\r
+        */\r
+       public static boolean isConfirmed(final String title, final String text) {\r
+               return isConfirmed(null, title, text, -1);\r
+       }\r
+\r
+       /**\r
+        * Create a dialog box that asks the user a confirmation\r
+        * \r
+        * @param shell parent shell\r
+        * @param title title of the dialog box\r
+        * @param text text to display\r
+        * @return <code>true</code> if the user confirmed, <code>false</code>\r
+        *         otherwise\r
+        */\r
+       public static boolean isConfirmed(final Shell shell, final String title, final String text) {\r
+               return isConfirmed(shell, title, text, -1);\r
+       }\r
+\r
+       /**\r
+        * Create a dialog box that asks the user a confirmation. The button "yes"\r
+        * is not enabled before timer seconds\r
+        * \r
+        * @param title title of the dialog box\r
+        * @param text text to display\r
+        * @param timer number of seconds before enabling the yes button\r
+        * @return <code>true</code> if the user confirmed, <code>false</code>\r
+        *         otherwise\r
+        */\r
+       public static boolean isConfirmed(final String title, final String text, final int timer) {\r
+               return isConfirmed(null, title, text, timer);\r
+       }\r
+\r
+       /**\r
+        * Create a dialog box that asks the user a confirmation. The button "yes"\r
+        * is not enabled before timer seconds\r
+        * \r
+        * @param shell parent shell\r
+        * @param title title of the dialog box\r
+        * @param text text to display\r
+        * @param timer number of seconds before enabling the yes button\r
+        * @return <code>true</code> if the user confirmed, <code>false</code>\r
+        *         otherwise\r
+        */\r
+       public static boolean isConfirmed(final Shell shell, final String title, final String text, final int timer) {\r
+               final Dialog dialog = new Dialog(shell);\r
+               dialog.setTitle(ResourceManager.getLabel(ResourceManager.WARNING));\r
+               dialog.getMessageArea().setTitle(title).setText(text).setIcon(Display.getCurrent().getSystemImage(SWT.ICON_WARNING));\r
+\r
+               dialog.getFooterArea().setTimer(timer).setTimerIndexButton(0);\r
+               dialog.setButtonType(OpalDialogType.YES_NO);\r
+               return dialog.show() == 0;\r
+       }\r
+\r
+       /**\r
+        * Create a dialog box with a radio choice\r
+        * \r
+        * @param title title of the dialog box\r
+        * @param text text to display\r
+        * @param defaultSelection index of the default selection\r
+        * @param values values to display\r
+        * @return the index of the selection\r
+        */\r
+       public static int radioChoice(final String title, final String text, final int defaultSelection, final String... values) {\r
+               return radioChoice(null, title, text, defaultSelection, values);\r
+       }\r
+\r
+       /**\r
+        * Create a dialog box with a radio choice\r
+        * \r
+        * @param shell parent shell\r
+        * @param title title of the dialog box\r
+        * @param text text to display\r
+        * @param defaultSelection index of the default selection\r
+        * @param values values to display\r
+        * @return the index of the selection\r
+        */\r
+       public static int radioChoice(final Shell shell, final String title, final String text, final int defaultSelection, final String... values) {\r
+               final Dialog dialog = new Dialog(shell);\r
+               dialog.setTitle(ResourceManager.getLabel(ResourceManager.CHOICE));\r
+               dialog.getMessageArea().setTitle(title).setText(text).setIcon(Display.getCurrent().getSystemImage(SWT.ICON_QUESTION)).addRadioButtons(defaultSelection, values);\r
+               dialog.setButtonType(OpalDialogType.SELECT_CANCEL);\r
+               if (dialog.show() == 0) {\r
+                       return dialog.getMessageArea().getRadioChoice();\r
+               } else {\r
+                       return -1;\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Display a dialog box with an exception\r
+        * \r
+        * @param exception exception to display\r
+        */\r
+       public static void showException(final Throwable exception) {\r
+               final Dialog dialog = new Dialog();\r
+               dialog.setTitle(ResourceManager.getLabel(ResourceManager.EXCEPTION));\r
+\r
+               final String msg = exception.getMessage();\r
+               final String className = exception.getClass().getName();\r
+               final boolean noMessage = msg == null || msg.trim().length() == 0;\r
+\r
+               dialog.getMessageArea().setTitle(noMessage ? className : msg).//\r
+                               setText(noMessage ? "" : className).//\r
+                               setIcon(Display.getCurrent().getSystemImage(SWT.ICON_ERROR)).//\r
+                               setException(exception);\r
+\r
+               dialog.getFooterArea().setExpanded(true);\r
+\r
+               dialog.setButtonType(OpalDialogType.CLOSE);\r
+               dialog.show();\r
+       }\r
+\r
+       /**\r
+        * Create a dialog box with a choice\r
+        * \r
+        * @param title title of the dialog box\r
+        * @param text text to display\r
+        * @param defaultSelection index of the default selection\r
+        * @param items items to display\r
+        * @return the index of the selected value\r
+        */\r
+       public static int choice(final String title, final String text, final int defaultSelection, final ChoiceItem... items) {\r
+               return choice(null, title, text, defaultSelection, items);\r
+       }\r
+\r
+       /**\r
+        * Create a dialog box with a choice\r
+        * \r
+        * @param shell parent shell\r
+        * @param title title of the dialog box\r
+        * @param text text to display\r
+        * @param defaultSelection index of the default selection\r
+        * @param items items to display\r
+        * @return the index of the selected value\r
+        */\r
+       public static int choice(final Shell shell, final String title, final String text, final int defaultSelection, final ChoiceItem... items) {\r
+               final Dialog dialog = new Dialog(shell);\r
+               dialog.setTitle(ResourceManager.getLabel(ResourceManager.CHOICE));\r
+               dialog.getMessageArea().setTitle(title).setText(text).setIcon(Display.getCurrent().getSystemImage(SWT.ICON_QUESTION)).addChoice(defaultSelection, items);\r
+               dialog.setButtonType(OpalDialogType.NONE);\r
+               dialog.show();\r
+               return dialog.getMessageArea().getChoice();\r
+       }\r
+\r
+       // ------------------------------------------- Getters & Setters\r
+\r
+       /**\r
+        * @return the title\r
+        */\r
+       public String getTitle() {\r
+               return this.title;\r
+       }\r
+\r
+       /**\r
+        * @param title the title to set\r
+        */\r
+       public void setTitle(final String title) {\r
+               this.title = title;\r
+       }\r
+\r
+       /**\r
+        * @return the buttonType\r
+        */\r
+       public OpalDialogType getButtonType() {\r
+               return this.buttonType;\r
+       }\r
+\r
+       /**\r
+        * @param buttonType the buttonType to set\r
+        */\r
+       public void setButtonType(final OpalDialogType buttonType) {\r
+               this.buttonType = buttonType;\r
+\r
+               switch (buttonType) {\r
+               case CLOSE:\r
+                       this.footerArea.setButtonLabels(ResourceManager.getLabel(ResourceManager.CLOSE)).setDefaultButtonIndex(0);\r
+                       break;\r
+               case NO_BUTTON:\r
+                       break;\r
+               case OK:\r
+                       this.footerArea.setButtonLabels(ResourceManager.getLabel(ResourceManager.OK)).setDefaultButtonIndex(0);\r
+                       break;\r
+               case OK_CANCEL:\r
+                       this.footerArea.setButtonLabels(ResourceManager.getLabel(ResourceManager.OK), ResourceManager.getLabel(ResourceManager.CANCEL)).setDefaultButtonIndex(-1);\r
+                       break;\r
+               case SELECT_CANCEL:\r
+                       this.footerArea.setButtonLabels(ResourceManager.getLabel(ResourceManager.SELECT), ResourceManager.getLabel(ResourceManager.CANCEL)).setDefaultButtonIndex(-1);\r
+                       break;\r
+               case YES_NO:\r
+                       this.footerArea.setButtonLabels(ResourceManager.getLabel(ResourceManager.YES), ResourceManager.getLabel(ResourceManager.NO)).setDefaultButtonIndex(0);\r
+                       break;\r
+               default:\r
+                       break;\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * @return the messageArea\r
+        */\r
+       public MessageArea getMessageArea() {\r
+               return this.messageArea;\r
+       }\r
+\r
+       /**\r
+        * @return the footerArea\r
+        */\r
+       public FooterArea getFooterArea() {\r
+               return this.footerArea;\r
+       }\r
+\r
+       /**\r
+        * @return the shell\r
+        */\r
+       public Shell getShell() {\r
+               return this.shell;\r
+       }\r
+\r
+       /**\r
+        * @return the index of the selected button\r
+        */\r
+       public int getSelectedButton() {\r
+               return getFooterArea().getSelectedButton();\r
+       }\r
+\r
+       /**\r
+        * @return the selection state of the checkbox\r
+        */\r
+       public boolean getCheckboxValue() {\r
+               return this.footerArea.getCheckBoxValue();\r
+       }\r
+\r
+       /**\r
+        * @return the minimum width of the dialog box\r
+        */\r
+       public int getMinimumWidth() {\r
+               return this.minimumWidth;\r
+       }\r
+\r
+       /**\r
+        * @param minimumWidth the minimum width of the dialog box to set\r
+        */\r
+       public void setMinimumWidth(final int minimumWidth) {\r
+               this.minimumWidth = minimumWidth;\r
+       }\r
+\r
+       /**\r
+        * @return the minimum height of the dialog box\r
+        */\r
+       public int getMinimumHeight() {\r
+               return this.minimumHeight;\r
+       }\r
+\r
+       /**\r
+        * @param minimumHeight the minimum height of the dialog box to set\r
+        */\r
+       public void setMinimumHeight(final int minimumHeight) {\r
+               this.minimumHeight = minimumHeight;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/opalDialog/DialogArea.java b/org.tizen.common.externals/src/org/mihalis/opal/opalDialog/DialogArea.java
new file mode 100644 (file)
index 0000000..3e47693
--- /dev/null
@@ -0,0 +1,154 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *     Eugene Ryzhikov - Author of the Oxbow Project (http://code.google.com/p/oxbow/) - Inspiration\r
+ *******************************************************************************/\r
+package org.mihalis.opal.opalDialog;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.DisposeEvent;\r
+import org.eclipse.swt.events.DisposeListener;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * This abstract class if the mother of MessageArea and FooterArea classes\r
+ */\r
+abstract class DialogArea {\r
+       protected final Dialog parent;\r
+       private boolean initialised;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param parent parent dialog\r
+        */\r
+       public DialogArea(final Dialog parent) {\r
+               this.parent = parent;\r
+       }\r
+\r
+       /**\r
+        * Render the content of an area\r
+        */\r
+       abstract void render();\r
+\r
+       /**\r
+        * @return the initialised field\r
+        */\r
+       boolean isInitialised() {\r
+               return this.initialised;\r
+       }\r
+\r
+       /**\r
+        * @param initialised the initialised value to set\r
+        */\r
+       void setInitialised(final boolean initialised) {\r
+               this.initialised = initialised;\r
+       }\r
+\r
+       /**\r
+        * @return the normal font used by the dialog box\r
+        */\r
+       protected Font getNormalFont() {\r
+               return getFont("Segoe UI", 9, SWT.NONE);\r
+       }\r
+\r
+       /**\r
+        * @return the bigger font used by the dialog box\r
+        */\r
+       protected Font getBiggerFont() {\r
+               return getFont("Segoe UI", 11, SWT.NONE);\r
+       }\r
+\r
+       /**\r
+        * Build a font\r
+        * \r
+        * @param name name of the font\r
+        * @param size size of the font\r
+        * @param style style of the font\r
+        * @return the font\r
+        */\r
+       private Font getFont(final String name, final int size, final int style) {\r
+               final Font font = new Font(Display.getCurrent(), name, size, style);\r
+               this.parent.shell.addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent e) {\r
+                               SWTGraphicUtil.dispose(font);\r
+                       }\r
+               });\r
+               return font;\r
+       }\r
+\r
+       /**\r
+        * @return the title's color (blue)\r
+        */\r
+       protected Color getTitleColor() {\r
+               final Color color = new Color(Display.getCurrent(), 35, 107, 178);\r
+               this.parent.shell.addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent e) {\r
+                               SWTGraphicUtil.dispose(color);\r
+                       }\r
+               });\r
+               return color;\r
+       }\r
+\r
+       /**\r
+        * @return the grey color\r
+        */\r
+       protected Color getGreyColor() {\r
+               final Color color = new Color(Display.getCurrent(), 240, 240, 240);\r
+               this.parent.shell.addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent e) {\r
+                               SWTGraphicUtil.dispose(color);\r
+                       }\r
+               });\r
+               return color;\r
+       }\r
+\r
+       /**\r
+        * @return the image "fewer details"\r
+        */\r
+       protected Image getFewerDetailsImage() {\r
+               return loadImage("images/fewerDetails.png");\r
+       }\r
+\r
+       /**\r
+        * @return the image "more details"\r
+        */\r
+       protected Image getMoreDetailsImage() {\r
+               return loadImage("images/moreDetails.png");\r
+       }\r
+\r
+       /**\r
+        * Loads an image\r
+        * \r
+        * @param fileName file name of the image\r
+        * @return the image\r
+        */\r
+       private Image loadImage(final String fileName) {\r
+               final Image image = SWTGraphicUtil.createImage(fileName);\r
+               this.parent.shell.addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent e) {\r
+                               SWTGraphicUtil.dispose(image);\r
+                       }\r
+               });\r
+               return image;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/opalDialog/FooterArea.java b/org.tizen.common.externals/src/org/mihalis/opal/opalDialog/FooterArea.java
new file mode 100644 (file)
index 0000000..66c7eca
--- /dev/null
@@ -0,0 +1,531 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *     Eugene Ryzhikov - Author of the Oxbow Project (http://code.google.com/p/oxbow/) - Inspiration\r
+ *******************************************************************************/\r
+package org.mihalis.opal.opalDialog;\r
+\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.utils.ResourceManager;\r
+\r
+/**\r
+ * Instances of this class are message areas\r
+ */\r
+public class FooterArea extends DialogArea {\r
+       private Image icon;\r
+       private String footerText;\r
+\r
+       private List<String> buttonLabels;\r
+       private int defaultButtonIndex;\r
+\r
+       private int timer;\r
+       private int timerIndexButton;\r
+\r
+       private int selectedButtonIndex;\r
+\r
+       private String collapsedLabelText;\r
+       private String expandedLabelText;\r
+       private boolean expanded;\r
+       private String detailText;\r
+       private boolean details;\r
+       private Button disabledButton;\r
+\r
+       private String checkBoxLabel;\r
+       private boolean checkBoxValue;\r
+\r
+       private Label expandedPanel;\r
+       private Composite composite;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param parent dialog that is composed of this footer area\r
+        */\r
+       public FooterArea(final Dialog parent) {\r
+               super(parent);\r
+               this.selectedButtonIndex = -1;\r
+               this.expandedLabelText = ResourceManager.getLabel(ResourceManager.FEWER_DETAILS);\r
+               this.collapsedLabelText = ResourceManager.getLabel(ResourceManager.MORE_DETAILS);\r
+               this.timer = -1;\r
+               this.timerIndexButton = -1;\r
+       }\r
+\r
+       /**\r
+        * Add a check box\r
+        * \r
+        * @param label label to display\r
+        * @param selection default value of the check box\r
+        * @return this footer area\r
+        */\r
+       public FooterArea addCheckBox(final String label, final boolean selection) {\r
+               this.checkBoxLabel = label;\r
+               this.checkBoxValue = selection;\r
+               this.setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.OpalDialog.DialogArea#render()\r
+        */\r
+       @Override\r
+       void render() {\r
+               if (!this.isInitialised()) {\r
+                       return;\r
+               }\r
+\r
+               this.createSeparator();\r
+\r
+               this.composite = new Composite(this.parent.shell, SWT.NONE);\r
+               this.composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));\r
+               this.composite.setBackground(this.getGreyColor());\r
+\r
+               int numberOfColumns = this.buttonLabels == null ? 0 : this.buttonLabels.size();\r
+               if (this.details) {\r
+                       numberOfColumns += 2;\r
+               }\r
+\r
+               final GridLayout gridLayout = new GridLayout(numberOfColumns, false);\r
+               gridLayout.marginHeight = gridLayout.marginWidth = 10;\r
+               this.composite.setLayout(gridLayout);\r
+\r
+               if (this.details) {\r
+                       this.createDetails(numberOfColumns);\r
+               }\r
+\r
+               if (this.buttonLabels != null) {\r
+                       this.createButtons();\r
+               }\r
+\r
+               if (this.details && this.parent.getMessageArea().getException() == null && this.expanded) {\r
+                       this.createExpandedPanel(numberOfColumns);\r
+               }\r
+\r
+               if (this.checkBoxLabel != null) {\r
+                       this.createCheckBox(numberOfColumns);\r
+               }\r
+\r
+               if (this.footerText != null) {\r
+                       this.createFooter();\r
+\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Create the buttons\r
+        */\r
+       private void createButtons() {\r
+               Button defaultButton = null;\r
+               for (int i = 0; i < this.buttonLabels.size(); i++) {\r
+                       final Button button = new Button(this.composite, SWT.PUSH);\r
+                       button.setText(this.buttonLabels.get(i));\r
+\r
+                       final GridData gd = new GridData(GridData.END, GridData.CENTER, i == 0, false);\r
+                       gd.minimumWidth = 70;\r
+                       gd.widthHint = 70;\r
+                       button.setLayoutData(gd);\r
+\r
+                       if (i == this.defaultButtonIndex) {\r
+                               defaultButton = button;\r
+                       }\r
+\r
+                       final Integer integer = new Integer(i);\r
+                       button.addSelectionListener(new SelectionAdapter() {\r
+\r
+                               /**\r
+                                * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                                */\r
+                               @Override\r
+                               public void widgetSelected(final SelectionEvent e) {\r
+                                       FooterArea.this.parent.shell.dispose();\r
+                                       FooterArea.this.selectedButtonIndex = integer.intValue();\r
+                               }\r
+\r
+                       });\r
+\r
+                       if (i == this.timerIndexButton && this.timer != -1) {\r
+                               this.disabledButton = button;\r
+                               button.setData(button.getText());\r
+                               button.setText(button.getText() + " (" + this.timer + ")");\r
+                               button.setEnabled(false);\r
+                       }\r
+\r
+               }\r
+\r
+               if (this.timerIndexButton != -1 && this.timer != -1) {\r
+                       Display.getCurrent().timerExec(1000, new Runnable() {\r
+\r
+                               @Override\r
+                               public void run() {\r
+                                       FooterArea.this.timer--;\r
+                                       if (FooterArea.this.disabledButton.isDisposed()) {\r
+                                               return;\r
+                                       }\r
+\r
+                                       if (FooterArea.this.timer == 0) {\r
+                                               FooterArea.this.disabledButton.setText((String) FooterArea.this.disabledButton.getData());\r
+                                               FooterArea.this.disabledButton.setEnabled(true);\r
+                                       } else {\r
+                                               FooterArea.this.disabledButton.setText(FooterArea.this.disabledButton.getData() + " (" + FooterArea.this.timer + ")");\r
+                                               Display.getCurrent().timerExec(1000, this);\r
+                                       }\r
+\r
+                               }\r
+                       });\r
+               }\r
+\r
+               this.parent.shell.setDefaultButton(defaultButton);\r
+       }\r
+\r
+       /**\r
+        * Create the details section\r
+        * \r
+        * @param numberOfColumns\r
+        */\r
+       private void createDetails(final int numberOfColumns) {\r
+               final Label icon = new Label(this.composite, SWT.NONE);\r
+               icon.setBackground(this.getGreyColor());\r
+               icon.setImage(this.isExpanded() ? this.getFewerDetailsImage() : this.getMoreDetailsImage());\r
+               icon.setLayoutData(new GridData(GridData.CENTER, GridData.CENTER, false, false));\r
+\r
+               final Label label = new Label(this.composite, SWT.NONE);\r
+               label.setBackground(this.getGreyColor());\r
+               label.setText(this.isExpanded() ? this.expandedLabelText : this.collapsedLabelText);\r
+               label.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false));\r
+\r
+               final int numberOfColumnsParam = numberOfColumns;\r
+\r
+               final Listener listener = new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               if (FooterArea.this.parent.getMessageArea().getException() != null) {\r
+                                       if (label.getText().equals(FooterArea.this.expandedLabelText)) {\r
+                                               label.setText(FooterArea.this.collapsedLabelText);\r
+                                               icon.setImage(FooterArea.this.getMoreDetailsImage());\r
+                                               FooterArea.this.parent.getMessageArea().hideException();\r
+                                       } else {\r
+                                               label.setText(FooterArea.this.expandedLabelText);\r
+                                               icon.setImage(FooterArea.this.getFewerDetailsImage());\r
+                                               FooterArea.this.parent.getMessageArea().showException();\r
+                                       }\r
+\r
+                               } else {\r
+                                       if (label.getText().equals(FooterArea.this.expandedLabelText)) {\r
+                                               label.setText(FooterArea.this.collapsedLabelText);\r
+                                               icon.setImage(FooterArea.this.getMoreDetailsImage());\r
+                                               FooterArea.this.expandedPanel.dispose();\r
+                                               FooterArea.this.parent.pack();\r
+                                       } else {\r
+                                               label.setText(FooterArea.this.expandedLabelText);\r
+                                               icon.setImage(FooterArea.this.getFewerDetailsImage());\r
+                                               FooterArea.this.createExpandedPanel(numberOfColumnsParam);\r
+                                               FooterArea.this.parent.pack();\r
+                                       }\r
+                               }\r
+                       }\r
+               };\r
+\r
+               label.addListener(SWT.MouseUp, listener);\r
+               icon.addListener(SWT.MouseUp, listener);\r
+       }\r
+\r
+       /**\r
+        * Create a check box\r
+        * \r
+        * @param numberOfColumns\r
+        */\r
+       private void createCheckBox(final int numberOfColumns) {\r
+               final Button button = new Button(this.composite, SWT.CHECK);\r
+               button.setText(this.checkBoxLabel);\r
+               button.setSelection(this.checkBoxValue);\r
+               button.setBackground(this.getGreyColor());\r
+               button.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, true, false, numberOfColumns, 1));\r
+               button.addSelectionListener(new SelectionAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                        */\r
+                       @Override\r
+                       public void widgetSelected(final SelectionEvent e) {\r
+                               FooterArea.this.checkBoxValue = button.getSelection();\r
+                       }\r
+\r
+               });\r
+       }\r
+\r
+       /**\r
+        * Create footer section\r
+        */\r
+       private void createFooter() {\r
+               this.createSeparator();\r
+\r
+               final Composite informationComposite = new Composite(this.parent.shell, SWT.NONE);\r
+               informationComposite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, false, false));\r
+               informationComposite.setBackground(this.getGreyColor());\r
+\r
+               informationComposite.setLayout(new GridLayout(this.icon == null ? 1 : 2, false));\r
+\r
+               if (this.icon != null) {\r
+                       final Label labelIcon = new Label(informationComposite, SWT.NONE);\r
+                       labelIcon.setBackground(this.getGreyColor());\r
+                       labelIcon.setImage(this.icon);\r
+                       labelIcon.setLayoutData(new GridData(GridData.CENTER, GridData.CENTER, false, false));\r
+               }\r
+               final Label labelText = new Label(informationComposite, SWT.NONE);\r
+               labelText.setBackground(this.getGreyColor());\r
+               labelText.setText(this.footerText);\r
+               labelText.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));\r
+       }\r
+\r
+       /**\r
+        * Create the expanded panel\r
+        * \r
+        * @param numberOfColumns\r
+        */\r
+       private void createExpandedPanel(final int numberOfColumns) {\r
+               this.expandedPanel = new Label(this.composite, SWT.BORDER);\r
+               this.expandedPanel.setText(this.detailText);\r
+               this.expandedPanel.setBackground(this.getGreyColor());\r
+               final GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false, numberOfColumns, 1);\r
+               gd.minimumHeight = gd.heightHint = 150;\r
+               this.expandedPanel.setLayoutData(gd);\r
+       }\r
+\r
+       /**\r
+        * Create a separator\r
+        */\r
+       private void createSeparator() {\r
+               final Composite c = new Composite(this.parent.shell, SWT.NONE);\r
+               c.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));\r
+               c.setBackground(this.getGreyColor());\r
+\r
+               final GridLayout gridLayout = new GridLayout(1, false);\r
+               gridLayout.marginHeight = gridLayout.marginWidth = 0;\r
+               c.setLayout(gridLayout);\r
+\r
+               final Label separator = new Label(c, SWT.SEPARATOR | SWT.HORIZONTAL);\r
+               separator.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));\r
+\r
+       }\r
+\r
+       // ------------------------------------------- Getters & Setters\r
+\r
+       /**\r
+        * @return the icon\r
+        */\r
+       public Image getIcon() {\r
+               return this.icon;\r
+       }\r
+\r
+       /**\r
+        * @param icon the icon to set\r
+        * @return this footer area\r
+        */\r
+       public FooterArea setIcon(final Image icon) {\r
+               this.icon = icon;\r
+               this.setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the text\r
+        */\r
+       public String getFooterText() {\r
+               return this.footerText;\r
+       }\r
+\r
+       /**\r
+        * @param text the text to set\r
+        * @return this footer area\r
+        */\r
+       public FooterArea setFooterText(final String text) {\r
+               this.footerText = text;\r
+               this.setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the button labels\r
+        */\r
+       public List<String> getButtonLabels() {\r
+               return this.buttonLabels;\r
+       }\r
+\r
+       /**\r
+        * @param buttonLabels the button labels to set\r
+        * @return this footer area\r
+        */\r
+       public FooterArea setButtonLabels(final List<String> buttonLabels) {\r
+               this.buttonLabels = buttonLabels;\r
+               this.setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @param buttonLabels the button labels to set\r
+        * @return this footer area\r
+        */\r
+       public FooterArea setButtonLabels(final String... buttonLabels) {\r
+               this.buttonLabels = Arrays.asList(buttonLabels);\r
+               this.setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the default button index\r
+        */\r
+       public int getDefaultButtonIndex() {\r
+               return this.defaultButtonIndex;\r
+       }\r
+\r
+       /**\r
+        * @param defaultButtonIndex the default button index to set\r
+        * @return this footer area\r
+        */\r
+       public FooterArea setDefaultButtonIndex(final int defaultButtonIndex) {\r
+               this.defaultButtonIndex = defaultButtonIndex;\r
+               this.setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the timer value\r
+        */\r
+       public int getTimer() {\r
+               return this.timer;\r
+       }\r
+\r
+       /**\r
+        * @param timer the timer value to set\r
+        * @return this footer area\r
+        */\r
+       public FooterArea setTimer(final int timer) {\r
+               this.timer = timer;\r
+               this.setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the timer index button\r
+        */\r
+       public int getTimerIndexButton() {\r
+               return this.timerIndexButton;\r
+       }\r
+\r
+       /**\r
+        * @param timerIndexButton the timer index button to set\r
+        * @return this footer area\r
+        */\r
+       public FooterArea setTimerIndexButton(final int timerIndexButton) {\r
+               this.timerIndexButton = timerIndexButton;\r
+               this.setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the selected button\r
+        */\r
+       int getSelectedButton() {\r
+               return this.selectedButtonIndex;\r
+       }\r
+\r
+       /**\r
+        * @return the collapsed label text\r
+        */\r
+       public String getCollapsedLabelText() {\r
+               return this.collapsedLabelText;\r
+       }\r
+\r
+       /**\r
+        * @param collapsedLabelText the collapsed label text to set\r
+        * @return this footer area\r
+        */\r
+       public FooterArea setCollapsedLabelText(final String collapsedLabelText) {\r
+               this.details = true;\r
+               this.collapsedLabelText = collapsedLabelText;\r
+               this.setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the expanded label text\r
+        */\r
+       public String getExpandedLabelText() {\r
+               return this.expandedLabelText;\r
+       }\r
+\r
+       /**\r
+        * @param expandedLabelText the expanded label text to set\r
+        * @return this footer area\r
+        */\r
+       public FooterArea setExpandedLabelText(final String expandedLabelText) {\r
+               this.details = true;\r
+               this.expandedLabelText = expandedLabelText;\r
+               this.setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the expanded flag\r
+        */\r
+       public boolean isExpanded() {\r
+               return this.expanded;\r
+       }\r
+\r
+       /**\r
+        * @param expanded the expanded flag to set\r
+        * @return this footer area\r
+        */\r
+       public FooterArea setExpanded(final boolean expanded) {\r
+               this.details = true;\r
+               this.expanded = expanded;\r
+               this.setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the detail text\r
+        */\r
+       public String getDetailText() {\r
+               return this.detailText;\r
+       }\r
+\r
+       /**\r
+        * @param detailText the detail text to set\r
+        * @return this footer area\r
+        */\r
+       public FooterArea setDetailText(final String detailText) {\r
+               this.details = true;\r
+               this.detailText = detailText;\r
+               this.setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the check box vqlue\r
+        */\r
+       public boolean getCheckBoxValue() {\r
+               return this.checkBoxValue;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/opalDialog/MessageArea.java b/org.tizen.common.externals/src/org/mihalis/opal/opalDialog/MessageArea.java
new file mode 100644 (file)
index 0000000..55cc9e8
--- /dev/null
@@ -0,0 +1,541 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *     Eugene Ryzhikov - Author of the Oxbow Project (http://code.google.com/p/oxbow/) - Inspiration\r
+ *******************************************************************************/\r
+package org.mihalis.opal.opalDialog;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.custom.StyledText;\r
+import org.eclipse.swt.events.ModifyEvent;\r
+import org.eclipse.swt.events.ModifyListener;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.ProgressBar;\r
+import org.eclipse.swt.widgets.Text;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+import org.mihalis.opal.utils.StringUtil;\r
+\r
+/**\r
+ * Instances of this class are message areas\r
+ */\r
+public class MessageArea extends DialogArea {\r
+       // Main composite\r
+       private Composite composite;\r
+\r
+       // Informations for a simple dialog box\r
+       private String title;\r
+       private Image icon;\r
+       private String text;\r
+\r
+       // Informations for a radio choice dialog box\r
+       private int radioChoice;\r
+       private int radioDefaultSelection;\r
+       private String[] radioValues;\r
+\r
+       // Informations for a exception viewer dialog box\r
+       private Throwable exception;\r
+       private Text textException;\r
+\r
+       // Informations for an input dialog box\r
+       private String textBoxValue;\r
+\r
+       // Informations for a choice dialog box\r
+       private int choice;\r
+       private int choiceDefaultSelection;\r
+       private ChoiceItem[] choiceValues;\r
+\r
+       // Informations for a progress bar displayed in a dialog box\r
+       private ProgressBar progressBar;\r
+       private int progressBarMinimumValue;\r
+       private int progressBarMaximumValue;\r
+       private int progressBarValue;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param parent dialog that is composed of this message area\r
+        */\r
+       public MessageArea(final Dialog parent) {\r
+               super(parent);\r
+               this.radioChoice = -1;\r
+               this.choice = -1;\r
+               this.progressBarValue = -1;\r
+       }\r
+\r
+       /**\r
+        * Add a choice\r
+        * \r
+        * @param defaultSelection default selection\r
+        * @param items a list of the choice item\r
+        * @return the current message area\r
+        */\r
+       public MessageArea addChoice(final int defaultSelection, final ChoiceItem... items) {\r
+               setInitialised(true);\r
+               this.choiceDefaultSelection = defaultSelection;\r
+               this.choiceValues = items;\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * Add a choice composed of radio buttons\r
+        * \r
+        * @param defaultSelection default selection\r
+        * @param values values\r
+        * @return the current message area\r
+        */\r
+       public MessageArea addRadioButtons(final int defaultSelection, final String... values) {\r
+               setInitialised(true);\r
+               this.radioDefaultSelection = defaultSelection;\r
+               this.radioValues = values;\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * Add a text box for input\r
+        * \r
+        * @param value defaut value of the textbox\r
+        * @return the current message area\r
+        */\r
+       public MessageArea addTextBox(final String value) {\r
+               setInitialised(true);\r
+               this.textBoxValue = value;\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * Add a progress bar\r
+        * \r
+        * @param mininum minimum value\r
+        * @param maximum maximum value\r
+        * @param value default value\r
+        * @return the current message area\r
+        */\r
+       public MessageArea addProgressBar(final int mininum, final int maximum, final int value) {\r
+               setInitialised(true);\r
+               this.progressBarMinimumValue = mininum;\r
+               this.progressBarMaximumValue = maximum;\r
+               this.progressBarValue = value;\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.OpalDialog.DialogArea#render()\r
+        */\r
+       @Override\r
+       public void render() {\r
+               if (!isInitialised()) {\r
+                       return;\r
+               }\r
+\r
+               this.composite = new Composite(this.parent.shell, SWT.NONE);\r
+               this.composite.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));\r
+               this.composite.setBackground(this.composite.getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+\r
+               final boolean hasIcon = this.icon != null;\r
+               final boolean hasTitle = !StringUtil.isEmpty(this.title);\r
+               final boolean hasText = !StringUtil.isEmpty(this.text);\r
+               final boolean hasRadio = this.radioValues != null;\r
+               final boolean hasException = this.exception != null;\r
+               final boolean hasTextbox = this.textBoxValue != null;\r
+               final boolean hasChoice = this.choiceValues != null;\r
+               final boolean hasProgressBar = this.progressBarValue != -1;\r
+\r
+               final int numberOfColumns = hasIcon ? 2 : 1;\r
+               int numberOfRows = hasTitle && hasText ? 2 : 1;\r
+\r
+               if (hasRadio) {\r
+                       numberOfRows += this.radioValues.length;\r
+               }\r
+\r
+               if (hasChoice) {\r
+                       numberOfRows += this.choiceValues.length;\r
+               }\r
+\r
+               if (hasException || hasTextbox) {\r
+                       numberOfRows++;\r
+               }\r
+\r
+               if (hasProgressBar) {\r
+                       numberOfRows++;\r
+               }\r
+\r
+               final GridLayout gridLayout = new GridLayout(numberOfColumns, false);\r
+               gridLayout.marginHeight = gridLayout.marginWidth = 0;\r
+               gridLayout.marginRight = 10;\r
+               gridLayout.marginLeft = 10;\r
+               gridLayout.marginTop = 10;\r
+               gridLayout.marginBottom = 10;\r
+               this.composite.setLayout(gridLayout);\r
+\r
+               if (hasIcon) {\r
+                       createIcon(numberOfRows);\r
+               }\r
+\r
+               if (hasTitle) {\r
+                       createTitle(hasIcon);\r
+               }\r
+\r
+               if (hasText) {\r
+                       createText(hasIcon, hasTitle);\r
+               }\r
+\r
+               if (hasRadio) {\r
+                       createRadioButtons();\r
+               }\r
+\r
+               if (hasException) {\r
+                       createTextException();\r
+               }\r
+\r
+               if (hasTextbox) {\r
+                       createTextBox();\r
+               }\r
+\r
+               if (hasChoice) {\r
+                       createChoice();\r
+               }\r
+\r
+               if (hasProgressBar) {\r
+                       createProgressBar();\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Create the icon\r
+        * \r
+        * @param numberOfRows number of rows displayed\r
+        */\r
+       private void createIcon(final int numberOfRows) {\r
+               final Label label = new Label(this.composite, SWT.NONE);\r
+               label.setImage(this.icon);\r
+               label.setBackground(this.composite.getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+               label.setLayoutData(new GridData(GridData.CENTER, GridData.BEGINNING, false, false, 1, numberOfRows));\r
+       }\r
+\r
+       /**\r
+        * Create the title\r
+        * \r
+        * @param hasIcon if <code>true</code> an icon is displayed\r
+        */\r
+       private void createTitle(final boolean hasIcon) {\r
+               final Label label = new Label(this.composite, SWT.NONE);\r
+               label.setText(this.title);\r
+               label.setFont(getBiggerFont());\r
+               label.setForeground(getTitleColor());\r
+               label.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\r
+               final GridData gd = new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false, 1, 1);\r
+\r
+               if (hasIcon) {\r
+                       gd.horizontalIndent = 8;\r
+               } else {\r
+                       gd.horizontalIndent = 10;\r
+                       gd.verticalIndent = 10;\r
+               }\r
+\r
+               label.setLayoutData(gd);\r
+       }\r
+\r
+       /**\r
+        * Create the text\r
+        * \r
+        * @param hasIcon if <code>true</code> an icon is displayed\r
+        * @param hasTitle if <code>true</code> a title is displayed\r
+        */\r
+       private void createText(final boolean hasIcon, final boolean hasTitle) {\r
+               final StyledText label = new StyledText(this.composite, SWT.NONE);\r
+               label.setText("<html><body>" + this.text + "</body></html>");\r
+               SWTGraphicUtil.applyHTMLFormating(label);\r
+               label.setEnabled(false);\r
+               label.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\r
+               final GridData gd = new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false, 1, 1);\r
+\r
+               if (hasIcon) {\r
+                       gd.horizontalIndent = 8;\r
+               } else {\r
+                       gd.horizontalIndent = 20;\r
+                       if (hasTitle) {\r
+                               gd.verticalIndent = 8;\r
+                       } else {\r
+                               gd.verticalIndent = 20;\r
+                       }\r
+               }\r
+\r
+               label.setLayoutData(gd);\r
+       }\r
+\r
+       /**\r
+        * Create radio buttons\r
+        */\r
+       private void createRadioButtons() {\r
+               for (int i = 0; i < this.radioValues.length; i++) {\r
+                       final Button button = new Button(this.composite, SWT.RADIO);\r
+                       button.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\r
+                       button.setText(this.radioValues[i]);\r
+\r
+                       final Integer index = new Integer(i);\r
+                       button.addSelectionListener(new SelectionAdapter() {\r
+\r
+                               /**\r
+                                * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                                */\r
+                               @Override\r
+                               public void widgetSelected(final SelectionEvent e) {\r
+                                       if (button.getSelection()) {\r
+                                               MessageArea.this.radioChoice = index.intValue();\r
+                                       }\r
+                               }\r
+\r
+                       });\r
+\r
+                       button.setSelection(i == this.radioDefaultSelection);\r
+                       final GridData gd = new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false, 1, 1);\r
+                       gd.horizontalIndent = 10;\r
+                       button.setLayoutData(gd);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Create the text that displays an exception\r
+        */\r
+       private void createTextException() {\r
+               this.textException = new Text(this.composite, SWT.MULTI | SWT.READ_ONLY | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\r
+               this.textException.setText(StringUtil.stackStraceAsString(this.exception));\r
+               this.textException.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\r
+               final GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false, 1, 1);\r
+               gd.minimumHeight = 300;\r
+               this.textException.setLayoutData(gd);\r
+       }\r
+\r
+       /**\r
+        * Create a text box\r
+        */\r
+       private void createTextBox() {\r
+               final Text textbox = new Text(this.composite, SWT.SINGLE | SWT.BORDER);\r
+               textbox.setText(this.textBoxValue);\r
+               textbox.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\r
+               final GridData gd = new GridData(GridData.FILL, GridData.FILL, true, false, 1, 1);\r
+               textbox.setLayoutData(gd);\r
+               textbox.addModifyListener(new ModifyListener() {\r
+\r
+                       @Override\r
+                       public void modifyText(final ModifyEvent e) {\r
+                               MessageArea.this.textBoxValue = textbox.getText();\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * Create a choice selection\r
+        */\r
+       private void createChoice() {\r
+               for (int i = 0; i < this.choiceValues.length; i++) {\r
+                       final ChoiceWidget choice = new ChoiceWidget(this.composite, SWT.RADIO);\r
+                       choice.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\r
+                       choice.setChoiceItem(this.choiceValues[i]);\r
+\r
+                       final Integer index = new Integer(i);\r
+                       choice.addSelectionListener(new SelectionAdapter() {\r
+\r
+                               /**\r
+                                * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                                */\r
+                               @Override\r
+                               public void widgetSelected(final SelectionEvent e) {\r
+                                       MessageArea.this.choice = index.intValue();\r
+                                       MessageArea.this.parent.shell.dispose();\r
+                               }\r
+\r
+                       });\r
+\r
+                       choice.setSelection(i == this.choiceDefaultSelection);\r
+                       final GridData gd = new GridData(GridData.FILL, GridData.FILL, false, false, 1, 1);\r
+                       choice.setLayoutData(gd);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Create a progress bar\r
+        */\r
+       private void createProgressBar() {\r
+               this.progressBar = new ProgressBar(this.composite, SWT.SMOOTH | SWT.HORIZONTAL);\r
+               this.progressBar.setMinimum(this.progressBarMinimumValue);\r
+               this.progressBar.setMaximum(this.progressBarMaximumValue);\r
+               this.progressBar.setSelection(this.progressBarValue);\r
+               this.progressBar.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));\r
+               final GridData gd = new GridData(GridData.FILL, GridData.FILL, true, false, 1, 1);\r
+               this.progressBar.setLayoutData(gd);\r
+       }\r
+\r
+       /**\r
+        * Hide the exception panel\r
+        */\r
+       void hideException() {\r
+               this.textException.dispose();\r
+               this.parent.pack();\r
+\r
+       }\r
+\r
+       /**\r
+        * Show the exception panel\r
+        */\r
+       void showException() {\r
+               createTextException();\r
+               this.parent.pack();\r
+       }\r
+\r
+       // ------------------------------------------- Getters & Setters\r
+\r
+       /**\r
+        * @return the title\r
+        */\r
+       public String getTitle() {\r
+               return this.title;\r
+       }\r
+\r
+       /**\r
+        * @param title the title to set\r
+        * @return the current message area\r
+        */\r
+       public MessageArea setTitle(final String title) {\r
+               this.title = title;\r
+               setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the icon\r
+        */\r
+       public Image getIcon() {\r
+               return this.icon;\r
+       }\r
+\r
+       /**\r
+        * @param icon the icon to set\r
+        */\r
+       public MessageArea setIcon(final Image icon) {\r
+               this.icon = icon;\r
+               setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the text\r
+        */\r
+       public String getText() {\r
+               return this.text;\r
+       }\r
+\r
+       /**\r
+        * @param text the text to set\r
+        */\r
+       public MessageArea setText(final String text) {\r
+               this.text = text;\r
+               setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the radio choice\r
+        */\r
+       public int getRadioChoice() {\r
+               return this.radioChoice;\r
+       }\r
+\r
+       /**\r
+        * @return the exception\r
+        */\r
+       public Throwable getException() {\r
+               return this.exception;\r
+       }\r
+\r
+       /**\r
+        * @param exception the exception to set\r
+        * @return\r
+        */\r
+       public MessageArea setException(final Throwable exception) {\r
+               this.exception = exception;\r
+               setInitialised(true);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the choice\r
+        */\r
+       public int getChoice() {\r
+               return this.choice;\r
+       }\r
+\r
+       /**\r
+        * @return the value stored in the text box\r
+        */\r
+       public String getTextBoxValue() {\r
+               return this.textBoxValue;\r
+       }\r
+\r
+       /**\r
+        * @return the progress bar minimum value\r
+        */\r
+       public int getProgressBarMinimumValue() {\r
+               return this.progressBarMinimumValue;\r
+       }\r
+\r
+       /**\r
+        * @param progressBarMinimumValue the progress bar minimum value to set\r
+        */\r
+       public void setProgressBarMinimumValue(final int progressBarMinimumValue) {\r
+               this.progressBarMinimumValue = progressBarMinimumValue;\r
+               if (this.progressBar != null && !this.progressBar.isDisposed()) {\r
+                       this.progressBar.setMinimum(progressBarMinimumValue);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @return the progress bar maximum value\r
+        */\r
+       public int getProgressBarMaximumValue() {\r
+               return this.progressBarMaximumValue;\r
+       }\r
+\r
+       /**\r
+        * @param progressBarMaximumValue the progress bar minimum value to set\r
+        */\r
+       public void setProgressBarMaximumValue(final int progressBarMaximumValue) {\r
+               this.progressBarMaximumValue = progressBarMaximumValue;\r
+               if (this.progressBar != null && !this.progressBar.isDisposed()) {\r
+                       this.progressBar.setMaximum(progressBarMaximumValue);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @return the progress bar value\r
+        */\r
+       public int getProgressBarValue() {\r
+               return this.progressBarValue;\r
+       }\r
+\r
+       /**\r
+        * @param progressBarValue the progress bar value to set\r
+        */\r
+       public void setProgressBarValue(final int progressBarValue) {\r
+               this.progressBarValue = progressBarValue;\r
+               if (this.progressBar != null && !this.progressBar.isDisposed()) {\r
+                       this.progressBar.setSelection(progressBarValue);\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/panels/BlurredPanel.java b/org.tizen.common.externals/src/org/mihalis/opal/panels/BlurredPanel.java
new file mode 100644 (file)
index 0000000..4d2b79d
--- /dev/null
@@ -0,0 +1,151 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation \r
+ *******************************************************************************/\r
+package org.mihalis.opal.panels;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.PaintEvent;\r
+import org.eclipse.swt.events.PaintListener;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.layout.FillLayout;\r
+import org.eclipse.swt.widgets.Canvas;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Shell;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class are controls located on the top of a shell. They\r
+ * display a blurred version of the content of the shell\r
+ */\r
+public class BlurredPanel {\r
+       private final Shell parent;\r
+       private static final String BLURED_PANEL_KEY = "org.mihalis.opal.Panels.DarkPanel";\r
+       private int radius;\r
+       private Shell panel;\r
+       private Canvas canvas;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent.\r
+        * \r
+        * @param shell a shell that will be the parent of the new instance (cannot\r
+        *            be null)\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the parent has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        */\r
+       public BlurredPanel(final Shell shell) {\r
+               if (shell == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (shell.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+               }\r
+\r
+               this.parent = shell;\r
+               if (shell.getData(BLURED_PANEL_KEY) != null) {\r
+                       throw new IllegalArgumentException("This shell has already an infinite panel attached on it !");\r
+               }\r
+               shell.setData(BLURED_PANEL_KEY, this);\r
+               this.radius = 2;\r
+       }\r
+\r
+       /**\r
+        * Show the blurred panel\r
+        */\r
+       public void show() {\r
+               if (this.parent.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+\r
+               this.panel = new Shell(this.parent, SWT.APPLICATION_MODAL | SWT.NO_TRIM);\r
+               this.panel.setLayout(new FillLayout());\r
+\r
+               this.panel.addListener(SWT.KeyUp, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               event.doit = false;\r
+                       }\r
+               });\r
+\r
+               this.canvas = new Canvas(this.panel, SWT.NO_BACKGROUND | SWT.DOUBLE_BUFFERED);\r
+               this.canvas.addPaintListener(new PaintListener() {\r
+\r
+                       @Override\r
+                       public void paintControl(final PaintEvent e) {\r
+                               paintCanvas(e);\r
+                       }\r
+               });\r
+\r
+               this.panel.setBounds(this.panel.getDisplay().map(this.parent, null, this.parent.getClientArea()));\r
+               this.panel.open();\r
+\r
+       }\r
+\r
+       /**\r
+        * Paint the canvas that holds the panel\r
+        * \r
+        * @param e {@link PaintEvent}\r
+        */\r
+       private void paintCanvas(final PaintEvent e) {\r
+               // Paint the panel\r
+               e.gc.drawImage(createBlurredImage(), 0, 0);\r
+       }\r
+\r
+       private Image createBlurredImage() {\r
+               final GC gc = new GC(this.parent);\r
+               final Image image = new Image(this.parent.getDisplay(), this.parent.getSize().x, this.parent.getSize().y);\r
+               gc.copyArea(image, 0, 0);\r
+               gc.dispose();\r
+\r
+               return new Image(this.parent.getDisplay(), SWTGraphicUtil.blur(image.getImageData(), this.radius));\r
+\r
+       }\r
+\r
+       /**\r
+        * Hide the panel\r
+        */\r
+       public void hide() {\r
+               if (this.parent.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+\r
+               if (this.panel == null || this.panel.isDisposed()) {\r
+                       return;\r
+               }\r
+\r
+               this.panel.dispose();\r
+       }\r
+\r
+       /**\r
+        * @return the radius of the blur effect\r
+        */\r
+       public int getRadius() {\r
+               return this.radius;\r
+       }\r
+\r
+       /**\r
+        * @param radius the radius to set\r
+        */\r
+       public void setRadius(final int radius) {\r
+               this.radius = radius;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/panels/DarkPanel.java b/org.tizen.common.externals/src/org/mihalis/opal/panels/DarkPanel.java
new file mode 100644 (file)
index 0000000..ca681be
--- /dev/null
@@ -0,0 +1,144 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation \r
+ *******************************************************************************/\r
+package org.mihalis.opal.panels;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.PaintEvent;\r
+import org.eclipse.swt.events.PaintListener;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.layout.FillLayout;\r
+import org.eclipse.swt.widgets.Canvas;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Shell;\r
+\r
+/**\r
+ * Instances of this class are controls located on the top of a shell. They\r
+ * display a dark panel on this shell\r
+ */\r
+public class DarkPanel {\r
+       private final Shell parent;\r
+       private static final String DARK_PANEL_KEY = "org.mihalis.opal.BluredPanel.DarkPanel";\r
+       private int alpha;\r
+       private Shell panel;\r
+       private Canvas canvas;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent.\r
+        * \r
+        * @param shell a shell that will be the parent of the new instance (cannot\r
+        *            be null)\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the parent has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        */\r
+       public DarkPanel(final Shell shell) {\r
+               if (shell == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+\r
+               if (shell.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_INVALID_ARGUMENT);\r
+               }\r
+\r
+               this.parent = shell;\r
+               if (shell.getData(DARK_PANEL_KEY) != null) {\r
+                       throw new IllegalArgumentException("This shell has already an infinite panel attached on it !");\r
+               }\r
+               shell.setData(DARK_PANEL_KEY, this);\r
+               this.alpha = 100;\r
+       }\r
+\r
+       /**\r
+        * Show the dark panel\r
+        */\r
+       public void show() {\r
+               if (this.parent.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+\r
+               this.panel = new Shell(this.parent, SWT.APPLICATION_MODAL | SWT.NO_TRIM);\r
+               this.panel.setLayout(new FillLayout());\r
+               this.panel.setAlpha(this.alpha);\r
+\r
+               this.panel.addListener(SWT.KeyUp, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               event.doit = false;\r
+                       }\r
+               });\r
+\r
+               this.canvas = new Canvas(this.panel, SWT.NO_BACKGROUND | SWT.DOUBLE_BUFFERED);\r
+               this.canvas.addPaintListener(new PaintListener() {\r
+\r
+                       @Override\r
+                       public void paintControl(final PaintEvent e) {\r
+                               paintCanvas(e);\r
+                       }\r
+               });\r
+\r
+               this.panel.setBounds(this.panel.getDisplay().map(this.parent, null, this.parent.getClientArea()));\r
+               this.panel.open();\r
+\r
+       }\r
+\r
+       /**\r
+        * Paint the canvas that holds the panel\r
+        * \r
+        * @param e {@link PaintEvent}\r
+        */\r
+       private void paintCanvas(final PaintEvent e) {\r
+               // Paint the panel\r
+               final Rectangle clientArea = ((Canvas) e.widget).getClientArea();\r
+               final GC gc = e.gc;\r
+               gc.setBackground(this.panel.getDisplay().getSystemColor(SWT.COLOR_BLACK));\r
+               gc.fillRectangle(clientArea);\r
+       }\r
+\r
+       /**\r
+        * Hide the dark panel\r
+        */\r
+       public void hide() {\r
+               if (this.parent.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+\r
+               if (this.panel == null || this.panel.isDisposed()) {\r
+                       return;\r
+               }\r
+\r
+               this.panel.dispose();\r
+       }\r
+\r
+       /**\r
+        * @return the alpha value\r
+        */\r
+       public int getAlpha() {\r
+               return this.alpha;\r
+       }\r
+\r
+       /**\r
+        * @param alpha the alpha to set\r
+        */\r
+       public void setAlpha(final int alpha) {\r
+               this.alpha = alpha;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWContainer.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWContainer.java
new file mode 100644 (file)
index 0000000..17784f6
--- /dev/null
@@ -0,0 +1,45 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow;\r
+\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.mihalis.opal.preferenceWindow.widgets.PWWidget;\r
+\r
+/**\r
+ * Abstract class for "Containers" (row, group and tab)\r
+ * \r
+ */\r
+public abstract class PWContainer {\r
+\r
+       /**\r
+        * Add a container to the current element\r
+        * \r
+        * @param element element to add\r
+        * @return the container\r
+        */\r
+       public abstract PWContainer add(final PWContainer element);\r
+\r
+       /**\r
+        * Add a widget to the current element\r
+        * \r
+        * @param widget widget to add\r
+        * @return the container\r
+        */\r
+       public abstract PWContainer add(final PWWidget widget);\r
+\r
+       /**\r
+        * Build the content of the container\r
+        * \r
+        * @param parent parent composite\r
+        */\r
+       public abstract void build(final Composite parent);\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWGroup.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWGroup.java
new file mode 100644 (file)
index 0000000..ac0efb4
--- /dev/null
@@ -0,0 +1,169 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Group;\r
+import org.mihalis.opal.preferenceWindow.widgets.PWWidget;\r
+\r
+/**\r
+ * Instances of this class are groups\r
+ */\r
+public class PWGroup extends PWRowGroup {\r
+\r
+       private final String label;\r
+       private final boolean hasBorder;\r
+       private final List<PWRow> children;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param hasBorder if <code>true</code>, the group has a border\r
+        */\r
+       public PWGroup(final boolean hasBorder) {\r
+               this(null, hasBorder);\r
+       }\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label label associated to the group\r
+        */\r
+       public PWGroup(final String label) {\r
+               this(label, true);\r
+       }\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label label associated to the group\r
+        * @param hasBorder if <code>true</code>, the group has a border\r
+        */\r
+       public PWGroup(final String label, final boolean hasBorder) {\r
+               this.label = label;\r
+               this.hasBorder = hasBorder;\r
+               this.children = new ArrayList<PWRow>();\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.PWContainer#add(org.mihalis.opal.preferenceWindow.PWContainer)\r
+        */\r
+       @Override\r
+       public PWContainer add(final PWContainer element) {\r
+               if (!(element instanceof PWRow)) {\r
+                       throw new UnsupportedOperationException("Can only add a PWRow.");\r
+               }\r
+               this.children.add((PWRow) element);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.PWContainer#add(org.mihalis.opal.preferenceWindow.widgets.PWWidget)\r
+        */\r
+       @Override\r
+       public PWContainer add(final PWWidget widget) {\r
+               final PWRow row = new PWRow();\r
+               row.add(widget);\r
+               this.children.add(row);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.PWContainer#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public void build(final Composite parent) {\r
+               final Composite composite;\r
+               if (this.hasBorder) {\r
+                       composite = new Group(parent, SWT.NONE);\r
+                       if (this.label != null && !this.label.trim().equals("")) {\r
+                               ((Group) composite).setText(this.label);\r
+                       }\r
+               } else {\r
+                       composite = new Composite(parent, SWT.BORDER);\r
+               }\r
+\r
+               final int numCol = computeNumberOfColumns();\r
+\r
+               composite.setLayout(new GridLayout(numCol, false));\r
+               composite.setLayoutData(new GridData(GridData.BEGINNING, GridData.FILL, false, false, this.parentNumberOfColums, 1));\r
+\r
+               for (final PWRow row : this.children) {\r
+                       row.setParentNumberOfColumns(numCol);\r
+                       row.build(composite);\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * @return\r
+        */\r
+       private int computeNumberOfColumns() {\r
+               int numberOfColumns = 1;\r
+               for (final PWRow row : this.children) {\r
+                       numberOfColumns = Math.max(numberOfColumns, row.getNumberOfColums());\r
+               }\r
+               return numberOfColumns;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.PWRowGroup#checkParent(org.mihalis.opal.preferenceWindow.PWContainer)\r
+        */\r
+       @Override\r
+       protected void checkParent(final PWContainer parent) {\r
+               if (parent instanceof PWTab) {\r
+                       return;\r
+               }\r
+               throw new UnsupportedOperationException("Bad parent, should be only PWTab ");\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.PWRowGroup#enableOrDisable()\r
+        */\r
+       @Override\r
+       public void enableOrDisable() {\r
+               if (this.enabler == null) {\r
+                       return;\r
+               }\r
+\r
+               final boolean enabled = this.enabler.isEnabled();\r
+               for (final PWRow row : this.children) {\r
+                       enableOrDisable(row, enabled);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Enable or disable a row\r
+        * \r
+        * @param row row to enable or disable\r
+        * @param enabled enable flag\r
+        */\r
+       private void enableOrDisable(final PWRow row, final boolean enabled) {\r
+               for (final PWWidget widget : row.widgets) {\r
+                       final boolean widgetEnable = widget.enableOrDisable();\r
+\r
+                       for (final Control c : widget.getControls()) {\r
+                               if (!c.isDisposed()) {\r
+                                       c.setEnabled(enabled && widgetEnable);\r
+                               }\r
+                       }\r
+               }\r
+\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWRow.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWRow.java
new file mode 100644 (file)
index 0000000..e38abdc
--- /dev/null
@@ -0,0 +1,142 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.mihalis.opal.preferenceWindow.widgets.PWButton;\r
+import org.mihalis.opal.preferenceWindow.widgets.PWLabel;\r
+import org.mihalis.opal.preferenceWindow.widgets.PWWidget;\r
+\r
+/**\r
+ * Instances of this class are rows\r
+ */\r
+public class PWRow extends PWRowGroup {\r
+       protected final List<PWWidget> widgets;\r
+\r
+       /**\r
+        * Constructor\r
+        */\r
+       public PWRow() {\r
+               this.widgets = new ArrayList<PWWidget>();\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.PWContainer#add(org.mihalis.opal.preferenceWindow.widgets.PWWidget)\r
+        */\r
+       @Override\r
+       public PWContainer add(final PWWidget widget) {\r
+               this.widgets.add(widget);\r
+               addColumn(widget.getNumberOfColumns());\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.PWContainer#add(org.mihalis.opal.preferenceWindow.PWContainer)\r
+        */\r
+       @Override\r
+       public PWContainer add(final PWContainer element) {\r
+               if (element instanceof PWRow || element instanceof PWGroup) {\r
+                       return this.parent.add(element);\r
+               } else {\r
+                       throw new UnsupportedOperationException("Can only add a PWGroup or a PWRow.");\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.PWContainer#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public void build(final Composite parent) {\r
+               final int size = this.widgets.size();\r
+               int columIndex = 0;\r
+               for (int i = 0; i < size; i++) {\r
+                       final PWWidget widget = this.widgets.get(i);\r
+                       final Control control = widget.checkAndBuild(parent);\r
+                       if (control != null && control.getLayoutData() == null) {\r
+                               final int colSpan;\r
+                               final boolean grabExcessSpace;\r
+                               final int alignment;\r
+                               if (size == 1) {\r
+                                       if (widget.isSingleWidget()) {\r
+                                               colSpan = this.parentNumberOfColums;\r
+                                       } else {\r
+                                               colSpan = this.parentNumberOfColums - widget.getNumberOfColumns() + 1;\r
+                                       }\r
+                                       grabExcessSpace = true;\r
+                               } else {\r
+                                       if (i == size - 1) {\r
+                                               colSpan = this.parentNumberOfColums - columIndex;\r
+                                               grabExcessSpace = widget.isGrabExcessSpace();\r
+                                       } else {\r
+                                               colSpan = 1;\r
+                                               grabExcessSpace = widget instanceof PWButton && i == 0 ? true : widget.isGrabExcessSpace();\r
+                                       }\r
+                               }\r
+                               columIndex += widget.getNumberOfColumns();\r
+\r
+                               if (i == 0 && grabExcessSpace && size > 1) {\r
+                                       if (widget instanceof PWLabel || widget instanceof PWButton) {\r
+                                               alignment = GridData.END;\r
+                                       } else {\r
+                                               alignment = GridData.BEGINNING;\r
+                                       }\r
+                               } else {\r
+                                       alignment = widget.getAlignment();\r
+                               }\r
+\r
+                               final GridData gd = new GridData(alignment, GridData.BEGINNING, grabExcessSpace, false, colSpan, 1);\r
+                               gd.horizontalIndent = widget.getIndent();\r
+                               gd.widthHint = widget.getWidth();\r
+                               if (widget.getHeight() != -1) {\r
+                                       gd.heightHint = widget.getHeight();\r
+                               }\r
+                               control.setLayoutData(gd);\r
+                       }\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.PWRowGroup#checkParent(org.mihalis.opal.preferenceWindow.PWContainer)\r
+        */\r
+       @Override\r
+       protected void checkParent(final PWContainer parent) {\r
+               if (parent instanceof PWTab || parent instanceof PWGroup) {\r
+                       return;\r
+               }\r
+               throw new UnsupportedOperationException("Bad parent, should be only PWTab or PWGroup");\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.PWRowGroup#enableOrDisable()\r
+        */\r
+       @Override\r
+       public void enableOrDisable() {\r
+               if (this.enabler == null) {\r
+                       return;\r
+               }\r
+\r
+               final boolean enabled = this.enabler.isEnabled();\r
+               for (final PWWidget widget : this.widgets) {\r
+                       final boolean widgetEnable = widget.enableOrDisable();\r
+                       for (final Control c : widget.getControls()) {\r
+                               if (!c.isDisposed()) {\r
+                                       c.setEnabled(enabled && widgetEnable);\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWRowGroup.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWRowGroup.java
new file mode 100644 (file)
index 0000000..63674bc
--- /dev/null
@@ -0,0 +1,79 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow;\r
+\r
+import org.mihalis.opal.preferenceWindow.enabler.Enabler;\r
+\r
+/**\r
+ * Abstract class for both row and groups\r
+ */\r
+public abstract class PWRowGroup extends PWContainer {\r
+\r
+       protected int numberOfColumns;\r
+       protected int parentNumberOfColums;\r
+       protected PWContainer parent;\r
+       protected Enabler enabler;\r
+\r
+       /**\r
+        * Check if the parent is compatible with the object\r
+        * \r
+        * @param parent parent to check\r
+        * @throws UnsupportedOperationException if the parent is not compatible\r
+        *             with the object\r
+        */\r
+       protected abstract void checkParent(PWContainer parent);\r
+\r
+       /**\r
+        * Enables or disables all elements stored in this group or row\r
+        */\r
+       public abstract void enableOrDisable();\r
+\r
+       /**\r
+        * Add a column to the current element\r
+        * \r
+        * @param number number of column to add\r
+        */\r
+       public void addColumn(final int number) {\r
+               this.numberOfColumns += number;\r
+       }\r
+\r
+       /**\r
+        * @return the number of columns of this group or row\r
+        */\r
+       public int getNumberOfColums() {\r
+               return this.numberOfColumns;\r
+       }\r
+\r
+       /**\r
+        * @param enabler the enabler to set\r
+        */\r
+       public PWRowGroup setEnabler(final Enabler enabler) {\r
+               this.enabler = enabler;\r
+               this.enabler.injectRowGroup(this);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @param parent the parent to set\r
+        */\r
+       public void setParent(final PWContainer parent) {\r
+               checkParent(parent);\r
+               this.parent = parent;\r
+       }\r
+\r
+       /**\r
+        * @param numberOfColumns the number of columns of the parent\r
+        */\r
+       public void setParentNumberOfColumns(final int numberOfColumns) {\r
+               this.parentNumberOfColums = numberOfColumns;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWTab.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWTab.java
new file mode 100644 (file)
index 0000000..03fc554
--- /dev/null
@@ -0,0 +1,111 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.mihalis.opal.preferenceWindow.widgets.PWWidget;\r
+\r
+/**\r
+ * Instance of this class are tabs\r
+ * \r
+ */\r
+public class PWTab extends PWContainer {\r
+       private final Image image;\r
+       private final String text;\r
+       private final List<PWRowGroup> children;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param image image associated to the tab\r
+        * @param text text associated to the tab\r
+        */\r
+       PWTab(final Image image, final String text) {\r
+               this.image = image;\r
+               this.text = text;\r
+               this.children = new ArrayList<PWRowGroup>();\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.PWContainer#add(org.mihalis.opal.preferenceWindow.PWContainer)\r
+        */\r
+       @Override\r
+       public PWContainer add(final PWContainer element) {\r
+               if (!(element instanceof PWGroup) && !(element instanceof PWRow)) {\r
+                       throw new UnsupportedOperationException("Can only add a PWGroup or a PWRow.");\r
+               }\r
+               ((PWRowGroup) element).setParent(this);\r
+               this.children.add((PWRowGroup) element);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.PWContainer#add(org.mihalis.opal.preferenceWindow.widgets.PWWidget)\r
+        */\r
+       @Override\r
+       public PWContainer add(final PWWidget widget) {\r
+               final PWRow row = new PWRow();\r
+               row.setParent(this);\r
+               row.add(widget);\r
+               this.children.add(row);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.PWContainer#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public void build(final Composite parent) {\r
+               final int numberOfColumns = computeNumberOfColums();\r
+               parent.setLayout(new GridLayout(numberOfColumns, false));\r
+\r
+               for (final PWRowGroup rowGroup : this.children) {\r
+                       rowGroup.setParentNumberOfColumns(numberOfColumns);\r
+                       rowGroup.build(parent);\r
+               }\r
+\r
+               PreferenceWindow.getInstance().fireEnablers();\r
+\r
+       }\r
+\r
+       /**\r
+        * @return the total number of columns in this tab\r
+        */\r
+       private int computeNumberOfColums() {\r
+               int numberOfColumns = 1;\r
+               for (final PWRowGroup rowGroup : this.children) {\r
+                       if (rowGroup instanceof PWRow) {\r
+                               numberOfColumns = Math.max(numberOfColumns, rowGroup.getNumberOfColums());\r
+                       }\r
+               }\r
+               return numberOfColumns;\r
+       }\r
+\r
+       /**\r
+        * @return the image associate to this tab\r
+        */\r
+       public Image getImage() {\r
+               return this.image;\r
+       }\r
+\r
+       /**\r
+        * @return the text associated to this tab\r
+        */\r
+       public String getText() {\r
+               return this.text;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWTabContainer.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PWTabContainer.java
new file mode 100644 (file)
index 0000000..8bfe14c
--- /dev/null
@@ -0,0 +1,228 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.flatButton.FlatButton;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class are a container that allows the user to select a tab\r
+ */\r
+class PWTabContainer extends Composite {\r
+\r
+    private final List<PWTab> tabs;\r
+    private Composite container;\r
+    private Image oldButtonContainerImage;\r
+    private final List<FlatButton> buttons;\r
+    private Composite buttonContainer;\r
+\r
+    /**\r
+     * Constructor\r
+     * \r
+     * @param parent parent composite\r
+     * @param style style (not used)\r
+     * @param tabs list of tabs\r
+     */\r
+    PWTabContainer(final Composite parent, final int style, final List<PWTab> tabs) {\r
+        super(parent, style);\r
+        this.tabs = new ArrayList<PWTab>();\r
+        this.tabs.addAll(tabs);\r
+\r
+        this.buttons = new ArrayList<FlatButton>();\r
+\r
+        final GridLayout gridLayout = new GridLayout(2, false);\r
+        gridLayout.marginWidth = gridLayout.marginHeight = 0;\r
+        gridLayout.horizontalSpacing = gridLayout.verticalSpacing = 0;\r
+        setLayout(gridLayout);\r
+\r
+    }\r
+\r
+    /**\r
+     * Build the container\r
+     */\r
+    void build() {\r
+        build(null);\r
+    }\r
+    \r
+    void build(Color selectedTabColor) {\r
+        \r
+        createButtonsContainer();\r
+        createButtons(selectedTabColor);\r
+        createContentContainer();\r
+\r
+        select(0);\r
+    }\r
+\r
+    /**\r
+     * Create the buttons container\r
+     */\r
+    private void createButtonsContainer() {\r
+        createContainer();\r
+        createButtonsContainerBackground();\r
+\r
+    }\r
+\r
+    /**\r
+     * Create the container\r
+     */\r
+    private void createContainer() {\r
+        this.buttonContainer = new Composite(this, SWT.NONE);\r
+        final GridData buttonContainerGridData = new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1);\r
+        //buttonContainerGridData.heightHint = 63; // Original size (32x32)\r
+        //buttonContainerGridData.heightHint = 79; // Tizen fit size (48x48)\r
+        this.buttonContainer.setLayoutData(buttonContainerGridData);\r
+\r
+        this.buttonContainer.setBackground(getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+\r
+        final GridLayout gridLayout = new GridLayout(this.tabs.size(), false);\r
+        gridLayout.marginWidth = gridLayout.marginHeight = 0;\r
+        gridLayout.horizontalSpacing = gridLayout.verticalSpacing = 0;\r
+        gridLayout.marginBottom = 2;\r
+        this.buttonContainer.setLayout(gridLayout);\r
+    }\r
+\r
+    /**\r
+     * Create the background of the container\r
+     */\r
+    private void createButtonsContainerBackground() {\r
+        this.buttonContainer.addListener(SWT.Resize, new Listener() {\r
+\r
+            @Override\r
+            public void handleEvent(final Event event) {\r
+                final Rectangle rect = PWTabContainer.this.buttonContainer.getClientArea();\r
+                final Image image = new Image(getDisplay(), Math.max(1, rect.width), Math.max(1, rect.height));\r
+                final GC gc = new GC(image);\r
+                final Color grey = new Color(getDisplay(), 204, 204, 204);\r
+                gc.setForeground(grey);\r
+                gc.drawLine(0, rect.height - 1, rect.width, rect.height - 1);\r
+                grey.dispose();\r
+                gc.dispose();\r
+                PWTabContainer.this.buttonContainer.setBackgroundImage(image);\r
+                if (PWTabContainer.this.oldButtonContainerImage != null) {\r
+                    PWTabContainer.this.oldButtonContainerImage.dispose();\r
+                }\r
+                PWTabContainer.this.oldButtonContainerImage = image;\r
+\r
+            }\r
+        });\r
+        SWTGraphicUtil.dispose(this.buttonContainer, this.oldButtonContainerImage);\r
+    }\r
+\r
+//    /**\r
+//     * Create the buttons\r
+//     */\r
+//    private void createButtons() {\r
+//        createButtons(null);\r
+//    }\r
+    \r
+    private void createButtons(Color selectedTabColor) {\r
+        for (int i = 0; i < this.tabs.size(); i++) {\r
+            final PWTab tab = this.tabs.get(i);\r
+            final FlatButton button = new FlatButton(this.buttonContainer, SWT.NONE);\r
+            button.setText(tab.getText());\r
+            button.setImage(tab.getImage());\r
+            \r
+            if(selectedTabColor != null) {\r
+                button.setSelectedColor(selectedTabColor);\r
+            }\r
+            SWTGraphicUtil.dispose(button, tab.getImage());\r
+\r
+            final GridData gd;\r
+            if (i == this.tabs.size() - 1) {\r
+                gd = new GridData(GridData.BEGINNING, GridData.BEGINNING, true, false);\r
+            } else {\r
+                gd = new GridData(GridData.BEGINNING, GridData.BEGINNING, false, false);\r
+            }\r
+            if (i == 0) {\r
+                gd.horizontalIndent = 5;\r
+            }\r
+            gd.widthHint = 75;\r
+            button.setLayoutData(gd);\r
+\r
+            final int index = i;\r
+            button.addSelectionListener(new SelectionAdapter() {\r
+\r
+                /**\r
+                 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                 */\r
+                @Override\r
+                public void widgetSelected(final SelectionEvent e) {\r
+                    select(index);\r
+                }\r
+\r
+            });\r
+\r
+            this.buttons.add(button);\r
+\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Select a given button\r
+     * \r
+     * @param index index of the selected button\r
+     */\r
+    private void select(final int index) {\r
+        for (final Control c : this.container.getChildren()) {\r
+            c.dispose();\r
+        }\r
+\r
+        this.tabs.get(index).build(this.container);\r
+        this.container.layout();\r
+\r
+        for (int i = 0; i < this.buttons.size(); i++) {\r
+            this.buttons.get(i).setSelection(i == index);\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Create the content container, ie the composite that will contain all\r
+     * widgets\r
+     */\r
+    private void createContentContainer() {\r
+        this.container = new Composite(this, SWT.NONE);\r
+        final GridData tempContainer = new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1);\r
+        \r
+        int defaultSize = 350;\r
+        int notebookSize = 280;\r
+        \r
+        //tempContainer.widthHint = 700;\r
+        tempContainer.heightHint = defaultSize;\r
+        \r
+        Rectangle bounds = Display.getCurrent().getBounds();\r
+        if (bounds.height <= (768 + defaultSize - notebookSize)) {\r
+            tempContainer.heightHint = notebookSize; // 280px is fitted on 768px display\r
+        }\r
+        \r
+        this.container.setLayoutData(tempContainer);\r
+    }\r
+\r
+    public Composite getContainer() {\r
+        return this.container;\r
+    }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PreferenceWindow.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/PreferenceWindow.java
new file mode 100644 (file)
index 0000000..01de51e
--- /dev/null
@@ -0,0 +1,306 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow;\r
+\r
+import java.util.ArrayList;\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.Map;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Shell;\r
+import org.mihalis.opal.preferenceWindow.widgets.PWWidget;\r
+import org.mihalis.opal.utils.ResourceManager;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * This class is a preference window\r
+ * \r
+ */\r
+public class PreferenceWindow {\r
+       private final Map<String, ValueAndAssociatedWidgets> values;\r
+       private final List<PWTab> tabs;\r
+       private final Shell parentShell;\r
+       private boolean returnedValue;\r
+       private Shell shell;\r
+       private static PreferenceWindow instance;\r
+       \r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param parent parent shell (may be null)\r
+        * @param values a map that contains all values that will be displayed in\r
+        *            widgets\r
+        */\r
+       private PreferenceWindow(final Shell parent, final Map<String, Object> values) {\r
+               this.parentShell = parent;\r
+               this.values = new HashMap<String, ValueAndAssociatedWidgets>(values.size());\r
+\r
+               for (final String key : values.keySet()) {\r
+                       this.values.put(key, new ValueAndAssociatedWidgets(values.get(key)));\r
+               }\r
+\r
+               this.tabs = new ArrayList<PWTab>();\r
+       }\r
+\r
+       /**\r
+        * Create a preference window (a singleton)\r
+        * \r
+        * @param parent parent shell (may be null)\r
+        * @param values a map that contains all values that will be displayed in\r
+        *            widgets\r
+        * @return\r
+        */\r
+       public static PreferenceWindow create(final Shell parent, final Map<String, Object> values) {\r
+               instance = new PreferenceWindow(parent, values);\r
+               return instance;\r
+       }\r
+\r
+       /**\r
+        * Create a preference window (a singleton)\r
+        * \r
+        * @param values a map that contains all values that will be displayed in\r
+        *            widgets\r
+        * @return\r
+        */\r
+       public static PreferenceWindow create(final Map<String, Object> values) {\r
+               instance = new PreferenceWindow(null, values);\r
+               return instance;\r
+       }\r
+\r
+       /**\r
+        * @return an instance of the preference window\r
+        */\r
+       public static PreferenceWindow getInstance() {\r
+               if (instance == null) {\r
+                       throw new NullPointerException("The instance of PreferenceWindow has not yet been created or has been destroyed.");\r
+               }\r
+               return instance;\r
+       }\r
+\r
+       /**\r
+        * Add a tab to the preference window\r
+        * \r
+        * @param image image associated to the tab\r
+        * @param text text associated to the image\r
+        * @return the\r
+        */\r
+       public PWTab addTab(final Image image, final String text) {\r
+               final PWTab tab = new PWTab(image, text);\r
+               this.tabs.add(tab);\r
+               return tab;\r
+       }\r
+\r
+       /**\r
+        * Add a widget that is linked to a given property\r
+        * \r
+        * @param propertyKey the property\r
+        * @param widget the widget\r
+        */\r
+       public void addWidgetLinkedTo(final String propertyKey, final PWWidget widget) {\r
+               if (!this.values.containsKey(propertyKey)) {\r
+                       this.values.put(propertyKey, new ValueAndAssociatedWidgets(null));\r
+               }\r
+               this.values.get(propertyKey).addWidget(widget);\r
+       }\r
+\r
+       /**\r
+        * Add a row group that is linked to a given property\r
+        * \r
+        * @param propertyKey the property\r
+        * @param rowGroup the widget\r
+        */\r
+       public void addRowGroupLinkedTo(final String propertyKey, final PWRowGroup rowGroup) {\r
+               if (!this.values.containsKey(propertyKey)) {\r
+                       this.values.put(propertyKey, new ValueAndAssociatedWidgets(null));\r
+               }\r
+               this.values.get(propertyKey).addRowGroup(rowGroup);\r
+       }\r
+\r
+       /**\r
+        * Open the preference window\r
+        * \r
+        * @return <code>true</code> if the user pressed on the Ok button,\r
+        *         <code>false</code> if the user pressed on the Cancel button\r
+        */\r
+       public boolean open() {\r
+               if (this.parentShell == null) {\r
+                       this.shell = new Shell(SWT.SHELL_TRIM);\r
+               } else {\r
+                       this.shell = new Shell(instance.parentShell, SWT.SHELL_TRIM);\r
+               }\r
+\r
+               this.shell.addListener(SWT.Dispose, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               instance = null;\r
+                       }\r
+               });\r
+\r
+               buildShell();\r
+               openShell();\r
+\r
+               return this.returnedValue;\r
+       }\r
+\r
+       /**\r
+        * Builds the shell\r
+        */\r
+       private void buildShell() {\r
+               this.shell.setText(ResourceManager.getLabel(ResourceManager.PREFERENCES));\r
+               final GridLayout gridLayout = new GridLayout(2, false);\r
+               gridLayout.marginWidth = gridLayout.marginHeight = 0;\r
+               gridLayout.horizontalSpacing = gridLayout.verticalSpacing = 0;\r
+               this.shell.setLayout(gridLayout);\r
+               final PWTabContainer container = new PWTabContainer(this.shell, SWT.NONE, this.tabs);\r
+               container.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1));\r
+               container.build();\r
+\r
+               final Label sep = new Label(this.shell, SWT.SEPARATOR | SWT.HORIZONTAL);\r
+               sep.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1));\r
+\r
+               buildButtons();\r
+\r
+       }\r
+\r
+    /**\r
+     * Builds the Tabs for inner composite\r
+     * \r
+     * @author Jihoon Song {@literal <jihoon80.song@samsung.com>} (S-Core)\r
+     */\r
+    public void buildTabs(Composite parent) {\r
+        buildTabs(parent, null);\r
+    }\r
+    \r
+    public void buildTabs(Composite parent, Color selectedTabColor) {\r
+        final PWTabContainer container = new PWTabContainer(parent, SWT.BORDER, this.tabs);\r
+        container.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 2, 1));\r
+        container.build(selectedTabColor);\r
+    }\r
+\r
+       /**\r
+        * Builds the buttons\r
+        */\r
+       private void buildButtons() {\r
+               final Button buttonOK = new Button(this.shell, SWT.PUSH);\r
+               buttonOK.setText(ResourceManager.getLabel(ResourceManager.OK));\r
+               final GridData gridDataOk = new GridData(GridData.END, GridData.END, true, false);\r
+               gridDataOk.widthHint = 100;\r
+               buttonOK.setLayoutData(gridDataOk);\r
+               buttonOK.addSelectionListener(new SelectionAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                        */\r
+                       @Override\r
+                       public void widgetSelected(final SelectionEvent e) {\r
+                               PreferenceWindow.this.returnedValue = true;\r
+                               PreferenceWindow.this.shell.dispose();\r
+                       }\r
+\r
+               });\r
+               this.shell.setDefaultButton(buttonOK);\r
+\r
+               final Button buttonCancel = new Button(this.shell, SWT.PUSH);\r
+               buttonCancel.setText(ResourceManager.getLabel(ResourceManager.CANCEL));\r
+               final GridData gridDataCancel = new GridData(GridData.BEGINNING, GridData.END, false, false);\r
+               gridDataCancel.widthHint = 100;\r
+               buttonCancel.setLayoutData(gridDataCancel);\r
+               buttonCancel.addSelectionListener(new SelectionAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                        */\r
+                       @Override\r
+                       public void widgetSelected(final SelectionEvent e) {\r
+                               PreferenceWindow.this.returnedValue = false;\r
+                               PreferenceWindow.this.shell.dispose();\r
+                       }\r
+\r
+               });\r
+       }\r
+\r
+       /**\r
+        * Open the shell\r
+        */\r
+       private void openShell() {\r
+               this.shell.pack();\r
+               this.shell.open();\r
+               SWTGraphicUtil.centerShell(this.shell);\r
+\r
+               while (!this.shell.isDisposed()) {\r
+                       if (!this.shell.getDisplay().readAndDispatch()) {\r
+                               this.shell.getDisplay().sleep();\r
+                       }\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Fire all enablers\r
+        */\r
+       public void fireEnablers() {\r
+               for (final String key : this.values.keySet()) {\r
+                       this.values.get(key).fireValueChanged();\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @param key\r
+        * @return the value associated to the <i>key</i>\r
+        */\r
+       public Object getValueFor(final String key) {\r
+               if (this.values.containsKey(key)) {\r
+                       return this.values.get(key).getValue();\r
+               }\r
+               return null;\r
+       }\r
+\r
+       /**\r
+        * @return the list of all values\r
+        */\r
+       public Map<String, Object> getValues() {\r
+               final Map<String, Object> returnedValues = new HashMap<String, Object>();\r
+               for (final String key : this.values.keySet()) {\r
+                       returnedValues.put(key, this.values.get(key).getValue());\r
+               }\r
+               return returnedValues;\r
+       }\r
+\r
+       /**\r
+        * Store a value associated to the key\r
+        * \r
+        * @param key\r
+        * @param value\r
+        */\r
+       public void setValue(final String key, final Object value) {\r
+               if (this.values.containsKey(key)) {\r
+                       this.values.get(key).setValue(value);\r
+               } else {\r
+                       this.values.put(key, new ValueAndAssociatedWidgets(value));\r
+               }\r
+\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/ValueAndAssociatedWidgets.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/ValueAndAssociatedWidgets.java
new file mode 100644 (file)
index 0000000..5d13736
--- /dev/null
@@ -0,0 +1,79 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.mihalis.opal.preferenceWindow.widgets.PWWidget;\r
+\r
+/**\r
+ * This POJO contains a value a list of widgets that depends on a given property\r
+ * \r
+ */\r
+class ValueAndAssociatedWidgets {\r
+       private Object value;\r
+       private final List<PWWidget> widgets;\r
+       private final List<PWRowGroup> rowGroups;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param value associated value\r
+        */\r
+       ValueAndAssociatedWidgets(final Object value) {\r
+               this.value = value;\r
+               this.widgets = new ArrayList<PWWidget>();\r
+               this.rowGroups = new ArrayList<PWRowGroup>();\r
+       }\r
+\r
+       /**\r
+        * @param widget dependant widget\r
+        */\r
+       void addWidget(final PWWidget widget) {\r
+               this.widgets.add(widget);\r
+       }\r
+\r
+       /**\r
+        * @param rowGroup dependant row or group\r
+        */\r
+       void addRowGroup(final PWRowGroup rowGroup) {\r
+               this.rowGroups.add(rowGroup);\r
+       }\r
+\r
+       /**\r
+        * @return the value stored in the instance\r
+        */\r
+       Object getValue() {\r
+               return this.value;\r
+       }\r
+\r
+       /**\r
+        * @param value new value stored in this instance\r
+        */\r
+       void setValue(final Object value) {\r
+               this.value = value;\r
+               fireValueChanged();\r
+       }\r
+\r
+       /**\r
+        * Fire events when the value has changed\r
+        */\r
+       void fireValueChanged() {\r
+               for (final PWRowGroup rowGroup : this.rowGroups) {\r
+                       rowGroup.enableOrDisable();\r
+               }\r
+\r
+               for (final PWWidget widget : this.widgets) {\r
+                       widget.enableOrDisable();\r
+               }\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/enabler/EnabledIfEquals.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/enabler/EnabledIfEquals.java
new file mode 100644 (file)
index 0000000..b29db9d
--- /dev/null
@@ -0,0 +1,44 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.enabler;\r
+\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * This enabler is used to enable a widget if a property is equal to a given\r
+ * value\r
+ */\r
+public class EnabledIfEquals extends Enabler {\r
+       private final Object value;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param prop property to evaluate\r
+        * @param value condition value\r
+        */\r
+       public EnabledIfEquals(final String prop, final Object value) {\r
+               super(prop);\r
+               this.value = value;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.enabler.Enabler#isEnabled()\r
+        */\r
+       @Override\r
+       public boolean isEnabled() {\r
+               final Object propValue = PreferenceWindow.getInstance().getValueFor(this.prop);\r
+               if (this.value == null) {\r
+                       return propValue == null;\r
+               }\r
+               return this.value.equals(propValue);\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/enabler/EnabledIfNotEquals.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/enabler/EnabledIfNotEquals.java
new file mode 100644 (file)
index 0000000..7f4e9c1
--- /dev/null
@@ -0,0 +1,44 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.enabler;\r
+\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * This enabler is used to enable a widget if a property is not equal to a given\r
+ * value\r
+ */\r
+public class EnabledIfNotEquals extends Enabler {\r
+       private final Object value;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param prop property to evaluate\r
+        * @param value condition value\r
+        */\r
+       public EnabledIfNotEquals(final String prop, final Object value) {\r
+               super(prop);\r
+               this.value = value;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.enabler.Enabler#isEnabled()\r
+        */\r
+       @Override\r
+       public boolean isEnabled() {\r
+               final Object propValue = PreferenceWindow.getInstance().getValueFor(this.prop);\r
+               if (this.value == null) {\r
+                       return propValue == null;\r
+               }\r
+               return !this.value.equals(propValue);\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/enabler/EnabledIfTrue.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/enabler/EnabledIfTrue.java
new file mode 100644 (file)
index 0000000..969e2c5
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.enabler;\r
+\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * This enabler is used to enable a widget if a boolean property is true\r
+ */\r
+public class EnabledIfTrue extends Enabler {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param prop boolean property\r
+        */\r
+       public EnabledIfTrue(final String prop) {\r
+               super(prop);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.enabler.Enabler#isEnabled()\r
+        */\r
+       @Override\r
+       public boolean isEnabled() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(this.prop);\r
+\r
+               if (value != null && !(value instanceof Boolean)) {\r
+                       throw new UnsupportedOperationException("Impossible to evaluate [" + this.prop + "] because it is not a Boolean !");\r
+               }\r
+\r
+               if (value == null) {\r
+                       return true;\r
+               }\r
+\r
+               return ((Boolean) value).booleanValue();\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/enabler/Enabler.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/enabler/Enabler.java
new file mode 100644 (file)
index 0000000..3b0e04a
--- /dev/null
@@ -0,0 +1,57 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.enabler;\r
+\r
+import org.mihalis.opal.preferenceWindow.PWRowGroup;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+import org.mihalis.opal.preferenceWindow.widgets.PWWidget;\r
+\r
+/**\r
+ * This is the abstract class of all Enablers. An enabler is an object used to\r
+ * enable or disable a widget depending on a value of a stored property.\r
+ */\r
+public abstract class Enabler {\r
+\r
+       protected String prop;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param prop property linked to the enabler.\r
+        */\r
+       public Enabler(final String prop) {\r
+               this.prop = prop;\r
+       }\r
+\r
+       /**\r
+        * @return the evaluation condition\r
+        */\r
+       public abstract boolean isEnabled();\r
+\r
+       /**\r
+        * Link a widget to the enabler\r
+        * \r
+        * @param widget widget to link\r
+        */\r
+       public void injectWidget(final PWWidget widget) {\r
+               PreferenceWindow.getInstance().addWidgetLinkedTo(this.prop, widget);\r
+       }\r
+\r
+       /**\r
+        * Link a row or a group to the enabler\r
+        * \r
+        * @param rowGroup RowGroup to link\r
+        */\r
+       public void injectRowGroup(final PWRowGroup rowGroup) {\r
+               PreferenceWindow.getInstance().addRowGroupLinkedTo(this.prop, rowGroup);\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWButton.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWButton.java
new file mode 100644 (file)
index 0000000..4762b80
--- /dev/null
@@ -0,0 +1,63 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+\r
+/**\r
+ * Instances of this class are buttons\r
+ * \r
+ */\r
+public class PWButton extends PWWidget {\r
+       private final SelectionListener listener;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param listener selection listener\r
+        */\r
+       public PWButton(final String label, final SelectionListener listener) {\r
+               super(label, null, 1, true);\r
+               this.listener = listener;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public Control build(final Composite parent) {\r
+               final Button button = new Button(parent, SWT.PUSH);\r
+               addControl(button);\r
+               if (getLabel() == null) {\r
+                       throw new UnsupportedOperationException("You need to set a label for a button");\r
+               } else {\r
+                       button.setText(getLabel());\r
+               }\r
+               if (this.listener != null) {\r
+                       button.addSelectionListener(this.listener);\r
+               }\r
+\r
+               return button;\r
+\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWCheckbox.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWCheckbox.java
new file mode 100644 (file)
index 0000000..8dc7f36
--- /dev/null
@@ -0,0 +1,76 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * Instances of this class are checkboxes\r
+ */\r
+public class PWCheckbox extends PWWidget {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWCheckbox(final String label, final String propertyKey) {\r
+               super(label, propertyKey, 1, true);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public Control build(final Composite parent) {\r
+               if (getLabel() == null) {\r
+                       throw new UnsupportedOperationException("Please specify a label for a checkbox");\r
+               }\r
+               final Button button = new Button(parent, SWT.CHECK);\r
+               addControl(button);\r
+               button.setText(getLabel());\r
+               final boolean originalSelection = (Boolean) PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               button.setSelection(originalSelection);\r
+\r
+               button.addSelectionListener(new SelectionAdapter() {\r
+                       /**\r
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                        */\r
+                       @Override\r
+                       public void widgetSelected(final SelectionEvent e) {\r
+                               PreferenceWindow.getInstance().setValue(getPropertyKey(), button.getSelection());\r
+                       }\r
+               });\r
+               return button;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), new Boolean(false));\r
+               } else {\r
+                       if (!(value instanceof Boolean)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be a Boolean because it is associated to a checkbox");\r
+                       }\r
+               }\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWChooser.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWChooser.java
new file mode 100644 (file)
index 0000000..318215a
--- /dev/null
@@ -0,0 +1,82 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.Text;\r
+import org.mihalis.opal.utils.ResourceManager;\r
+\r
+/**\r
+ * Abstract class for chooser widgets\r
+ * \r
+ */\r
+public abstract class PWChooser extends PWWidget {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWChooser(final String label, final String propertyKey) {\r
+               super(label, propertyKey, 3, false);\r
+               setGrabExcessSpace(false);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public Control build(final Composite parent) {\r
+               final Label label = new Label(parent, SWT.NONE);\r
+\r
+               if (getLabel() == null) {\r
+                       throw new UnsupportedOperationException("You need to set a label for a directory or a dialog chooser");\r
+               } else {\r
+                       label.setText(getLabel());\r
+               }\r
+               addControl(label);\r
+               final GridData labelGridData = new GridData(GridData.END, GridData.BEGINNING, false, false);\r
+               labelGridData.horizontalIndent = getIndent();\r
+               label.setLayoutData(labelGridData);\r
+\r
+               final Text text = new Text(parent, SWT.BORDER | SWT.READ_ONLY);\r
+               addControl(text);\r
+               final GridData textGridData = new GridData(GridData.FILL, GridData.BEGINNING, true, false);\r
+               text.setLayoutData(textGridData);\r
+\r
+               final Button button = new Button(parent, SWT.PUSH);\r
+               addControl(button);\r
+               final GridData buttonGridData = new GridData(GridData.FILL, GridData.BEGINNING, false, false);\r
+               buttonGridData.widthHint = 150;\r
+               button.setText(ResourceManager.getLabel(ResourceManager.CHOOSE) + "...");\r
+               button.setLayoutData(buttonGridData);\r
+\r
+               setButtonAction(text, button);\r
+\r
+               return button;\r
+\r
+       }\r
+\r
+       /**\r
+        * Code executed when the user presses the button\r
+        * \r
+        * @param text text box\r
+        * @param button associated button\r
+        */\r
+       protected abstract void setButtonAction(Text text, Button button);\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWColorChooser.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWColorChooser.java
new file mode 100644 (file)
index 0000000..0d3b1b3
--- /dev/null
@@ -0,0 +1,133 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.RGB;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.ColorDialog;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class are used to select a color\r
+ * \r
+ */\r
+public class PWColorChooser extends PWWidget {\r
+\r
+       private Color color;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWColorChooser(final String label, final String propertyKey) {\r
+               super(label, propertyKey, label == null ? 1 : 2, false);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public Control build(final Composite parent) {\r
+               final RGB rgb = (RGB) PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+\r
+               if (rgb == null) {\r
+                       this.color = Display.getDefault().getSystemColor(SWT.COLOR_WHITE);\r
+               } else {\r
+                       this.color = new Color(Display.getDefault(), rgb);\r
+               }\r
+\r
+               buildLabel(parent, GridData.CENTER);\r
+               final Button button = new Button(parent, SWT.PUSH);\r
+               addControl(button);\r
+\r
+               button.addListener(SWT.Resize, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               drawButton(button);\r
+                       }\r
+               });\r
+\r
+               button.addListener(SWT.Selection, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               final ColorDialog dialog = new ColorDialog(button.getShell());\r
+                               final RGB result = dialog.open();\r
+                               if (result != null) {\r
+                                       SWTGraphicUtil.dispose(PWColorChooser.this.color);\r
+                                       PWColorChooser.this.color = new Color(button.getDisplay(), result);\r
+                                       drawButton(button);\r
+                                       PreferenceWindow.getInstance().setValue(getPropertyKey(), result);\r
+                               }\r
+                       }\r
+               });\r
+\r
+               button.addListener(SWT.Dispose, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               SWTGraphicUtil.dispose(PWColorChooser.this.color);\r
+                       }\r
+               });\r
+\r
+               return button;\r
+       }\r
+\r
+       /**\r
+        * @param button button on which we draw the rectangle\r
+        */\r
+       protected void drawButton(final Button button) {\r
+               final int height = (int) button.getFont().getFontData()[0].height;\r
+               final int width = button.getBounds().width - 16;\r
+\r
+               final Image newImage = new Image(button.getDisplay(), Math.max(1, width), Math.max(1, height));\r
+\r
+               final GC gc = new GC(newImage);\r
+               gc.setBackground(PWColorChooser.this.color);\r
+               gc.fillRectangle(0, 0, width, height);\r
+\r
+               gc.setForeground(button.getDisplay().getSystemColor(SWT.COLOR_BLACK));\r
+               gc.drawRectangle(0, 0, width - 1, height - 1);\r
+\r
+               gc.dispose();\r
+\r
+               button.setImage(newImage);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), null);\r
+               } else {\r
+                       if (!(value instanceof RGB)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be a RGB because it is associated to a color chooser");\r
+                       }\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWCombo.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWCombo.java
new file mode 100644 (file)
index 0000000..1960011
--- /dev/null
@@ -0,0 +1,107 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.widgets.Combo;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * Instances of this class are Combo\r
+ * \r
+ */\r
+public class PWCombo extends PWWidget {\r
+\r
+       private final List<Object> data;\r
+       private final boolean editable;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWCombo(final String label, final String propertyKey, final Object... values) {\r
+               this(label, propertyKey, false, values);\r
+       }\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWCombo(final String label, final String propertyKey, final boolean editable, final Object... values) {\r
+               super(label, propertyKey, label == null ? 1 : 2, false);\r
+               this.data = new ArrayList<Object>(Arrays.asList(values));\r
+               this.editable = editable;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public Control build(final Composite parent) {\r
+               buildLabel(parent, GridData.CENTER);\r
+\r
+               final Combo combo = new Combo(parent, SWT.BORDER | (this.editable ? SWT.NONE : SWT.READ_ONLY));\r
+               addControl(combo);\r
+\r
+               for (int i = 0; i < this.data.size(); i++) {\r
+                       final Object datum = this.data.get(i);\r
+                       combo.add(datum.toString());\r
+                       if (datum.equals(PreferenceWindow.getInstance().getValueFor(getPropertyKey()))) {\r
+                               combo.select(i);\r
+                       }\r
+               }\r
+\r
+               combo.addListener(SWT.Modify, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               PreferenceWindow.getInstance().setValue(getPropertyKey(), PWCombo.this.data.get(combo.getSelectionIndex()));\r
+                       }\r
+               });\r
+\r
+               return combo;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), null);\r
+               } else {\r
+                       if (this.editable && !(value instanceof String)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be a String because it is associated to an editable combo");\r
+                       }\r
+\r
+                       if (!this.data.isEmpty()) {\r
+                               if (!value.getClass().equals(this.data.get(0).getClass())) {\r
+                                       throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be a " + this.data.get(0).getClass() + " because it is associated to a combo");\r
+                               }\r
+                       }\r
+\r
+               }\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWDirectoryChooser.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWDirectoryChooser.java
new file mode 100644 (file)
index 0000000..db0cd9b
--- /dev/null
@@ -0,0 +1,78 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.DirectoryDialog;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Text;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+import org.mihalis.opal.utils.ResourceManager;\r
+\r
+/**\r
+ * Instances of this class are used to select a directory\r
+ */\r
+public class PWDirectoryChooser extends PWChooser {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWDirectoryChooser(final String label, final String propertyKey) {\r
+               super(label, propertyKey);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWChooser#setButtonAction(org.eclipse.swt.widgets.Text,\r
+        *      org.eclipse.swt.widgets.Button)\r
+        */\r
+       @Override\r
+       protected void setButtonAction(final Text text, final Button button) {\r
+\r
+               final String originalDirectory = (String) PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               text.setText(originalDirectory);\r
+\r
+               button.addListener(SWT.Selection, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               final DirectoryDialog dialog = new DirectoryDialog(text.getShell());\r
+                               dialog.setMessage(ResourceManager.getLabel(ResourceManager.CHOOSE_DIRECTORY));\r
+                               final String result = dialog.open();\r
+                               if (result != null) {\r
+                                       text.setText(result);\r
+                                       PreferenceWindow.getInstance().setValue(getPropertyKey(), result);\r
+                               }\r
+\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), "");\r
+               } else {\r
+                       if (!(value instanceof String)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be a String because it is associated to a directory chooser");\r
+                       }\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWFileChooser.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWFileChooser.java
new file mode 100644 (file)
index 0000000..421aa0e
--- /dev/null
@@ -0,0 +1,75 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.FileDialog;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Text;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * Instances of this class are used to select a file\r
+ */\r
+public class PWFileChooser extends PWChooser {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWFileChooser(final String label, final String propertyKey) {\r
+               super(label, propertyKey);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWChooser#setButtonAction(org.eclipse.swt.widgets.Text,\r
+        *      org.eclipse.swt.widgets.Button)\r
+        */\r
+       @Override\r
+       protected void setButtonAction(final Text text, final Button button) {\r
+               final String originalFile = (String) PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               text.setText(originalFile);\r
+\r
+               button.addListener(SWT.Selection, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               final FileDialog dialog = new FileDialog(text.getShell(), SWT.OPEN);\r
+                               final String result = dialog.open();\r
+                               if (result != null) {\r
+                                       text.setText(result);\r
+                                       PreferenceWindow.getInstance().setValue(getPropertyKey(), result);\r
+                               }\r
+\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), "");\r
+               } else {\r
+                       if (!(value instanceof String)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be a String because it is associated to a file chooser");\r
+                       }\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWFloatText.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWFloatText.java
new file mode 100644 (file)
index 0000000..db64468
--- /dev/null
@@ -0,0 +1,114 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.VerifyEvent;\r
+import org.eclipse.swt.events.VerifyListener;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+import org.mihalis.opal.utils.StringUtil;\r
+\r
+/**\r
+ * Instances of this class are text box to type floats\r
+ */\r
+public class PWFloatText extends PWText {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWFloatText(final String label, final String propertyKey) {\r
+               super(label, propertyKey);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#addVerifyListeners()\r
+        */\r
+       @Override\r
+       public void addVerifyListeners() {\r
+               this.text.addVerifyListener(new VerifyListener() {\r
+\r
+                       @Override\r
+                       public void verifyText(final VerifyEvent e) {\r
+                               if (e.character != 0 && !Character.isDigit(e.character) && e.keyCode != SWT.BS && e.keyCode != SWT.DEL && e.character != '.' && e.character != ',') {\r
+                                       e.doit = false;\r
+                                       return;\r
+                               }\r
+\r
+                               e.doit = verifyEntry(e.text, e.keyCode);\r
+\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Check if an entry is a float\r
+        * \r
+        * @param entry text typed by the user\r
+        * @param keyCode key code\r
+        * @return true if the user typed a float value, false otherwise\r
+        */\r
+       private boolean verifyEntry(final String entry, final int keyCode) {\r
+               final String work;\r
+               if (keyCode == SWT.DEL) {\r
+                       work = StringUtil.removeCharAt(this.text.getText(), this.text.getCaretPosition());\r
+               } else if (keyCode == SWT.BS && this.text.getCaretPosition() == 0) {\r
+                       work = StringUtil.removeCharAt(this.text.getText(), this.text.getCaretPosition() - 1);\r
+               } else if (keyCode == 0) {\r
+                       work = entry;\r
+               } else {\r
+                       work = StringUtil.insertString(this.text.getText(), entry, this.text.getCaretPosition());\r
+               }\r
+\r
+               try {\r
+                       Double.parseDouble(work.replace(',', '.'));\r
+               } catch (final NumberFormatException nfe) {\r
+                       return false;\r
+               }\r
+\r
+               return true;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), new Float(0));\r
+               } else {\r
+                       if (!(value instanceof Float)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be a Float because it is associated to a float text widget");\r
+                       }\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#convertValue()\r
+        */\r
+       @Override\r
+       public Object convertValue() {\r
+               return Float.parseFloat(this.text.getText());\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#getStyle()\r
+        */\r
+       @Override\r
+       public int getStyle() {\r
+               return SWT.NONE;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWFontChooser.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWFontChooser.java
new file mode 100644 (file)
index 0000000..5637fe2
--- /dev/null
@@ -0,0 +1,95 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.graphics.FontData;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.FontDialog;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Text;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+import org.mihalis.opal.utils.ResourceManager;\r
+\r
+/**\r
+ * Instances of this class are used to select a font\r
+ */\r
+public class PWFontChooser extends PWChooser {\r
+       private FontData fontData;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWFontChooser(final String label, final String propertyKey) {\r
+               super(label, propertyKey);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), null);\r
+               } else {\r
+                       if (!(value instanceof FontData)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be a FontData because it is associated to a font chooser");\r
+                       }\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWChooser#setButtonAction(org.eclipse.swt.widgets.Text,\r
+        *      org.eclipse.swt.widgets.Button)\r
+        */\r
+       @Override\r
+       protected void setButtonAction(final Text text, final Button button) {\r
+               this.fontData = (FontData) PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+\r
+               button.addListener(SWT.Selection, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               final FontDialog dialog = new FontDialog(text.getShell());\r
+                               final FontData result = dialog.open();\r
+                               if (result != null && result.getName() != null && !"".equals(result.getName().trim())) {\r
+                                       PWFontChooser.this.fontData = result;\r
+                                       PreferenceWindow.getInstance().setValue(getPropertyKey(), result);\r
+                                       text.setText(buildFontInformation());\r
+                               }\r
+\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * @return a string that contains data about the choosen font\r
+        */\r
+       protected String buildFontInformation() {\r
+               final StringBuilder sb = new StringBuilder();\r
+               if (this.fontData != null) {\r
+                       sb.append(this.fontData.getName()).append(",").append(this.fontData.getHeight()).append(" pt");\r
+                       if ((this.fontData.getStyle() & SWT.BOLD) == SWT.BOLD) {\r
+                               sb.append(", ").append(ResourceManager.getLabel(ResourceManager.BOLD));\r
+                       }\r
+                       if ((this.fontData.getStyle() & SWT.ITALIC) == SWT.ITALIC) {\r
+                               sb.append(", ").append(ResourceManager.getLabel(ResourceManager.ITALIC));\r
+                       }\r
+               }\r
+               return sb.toString();\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWIntegerText.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWIntegerText.java
new file mode 100644 (file)
index 0000000..8e681df
--- /dev/null
@@ -0,0 +1,84 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * Instances of this class are text box to type Integers\r
+ */\r
+public class PWIntegerText extends PWText {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWIntegerText(final String label, final String propertyKey) {\r
+               super(label, propertyKey);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#addVerifyListeners()\r
+        */\r
+       @Override\r
+       public void addVerifyListeners() {\r
+               this.text.addListener(SWT.Verify, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event e) {\r
+                               final String string = e.text;\r
+                               final char[] chars = new char[string.length()];\r
+                               string.getChars(0, chars.length, chars, 0);\r
+                               for (int i = 0; i < chars.length; i++) {\r
+                                       if (!('0' <= chars[i] && chars[i] <= '9') && e.keyCode != SWT.BS && e.keyCode != SWT.DEL) {\r
+                                               e.doit = false;\r
+                                               return;\r
+                                       }\r
+                               }\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), new Integer(0));\r
+               } else {\r
+                       if (!(value instanceof Integer)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be an Integer because it is associated to a integer text widget");\r
+                       }\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#convertValue()\r
+        */\r
+       @Override\r
+       public Object convertValue() {\r
+               return Integer.parseInt(this.text.getText());\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#getStyle()\r
+        */\r
+       @Override\r
+       public int getStyle() {\r
+               return SWT.NONE;\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWLabel.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWLabel.java
new file mode 100644 (file)
index 0000000..bcffef7
--- /dev/null
@@ -0,0 +1,81 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.custom.StyledText;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class are labels, that could contain some HTML tags (B,I,U)\r
+ */\r
+public class PWLabel extends PWWidget {\r
+\r
+       private StyledText labelWidget;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        */\r
+       public PWLabel(final String label) {\r
+               super(label, null, 1, true);\r
+               setAlignment(GridData.FILL);\r
+               setGrabExcessSpace(true);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public Control build(final Composite parent) {\r
+               if (getLabel() == null) {\r
+                       throw new UnsupportedOperationException("You need to set a description for a PWLabel object");\r
+               }\r
+               this.labelWidget = new StyledText(parent, SWT.WRAP | SWT.READ_ONLY);\r
+               this.labelWidget.setEnabled(false);\r
+               this.labelWidget.setBackground(parent.getBackground());\r
+               this.labelWidget.setText("<html><body>" + getLabel() + "</body></html>");\r
+               SWTGraphicUtil.applyHTMLFormating(this.labelWidget);\r
+               return this.labelWidget;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#enableOrDisable()\r
+        */\r
+       @Override\r
+       public boolean enableOrDisable() {\r
+               if (this.enabler == null) {\r
+                       return true;\r
+               }\r
+\r
+               final boolean enabled = this.enabler.isEnabled();\r
+               if (!this.labelWidget.isDisposed()) {\r
+                       if (enabled) {\r
+                               this.labelWidget.setForeground(this.labelWidget.getDisplay().getSystemColor(SWT.COLOR_BLACK));\r
+                       } else {\r
+                               this.labelWidget.setForeground(this.labelWidget.getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));\r
+                       }\r
+               }\r
+               return enabled;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWPasswordText.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWPasswordText.java
new file mode 100644 (file)
index 0000000..843b288
--- /dev/null
@@ -0,0 +1,69 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * Instances of this class are text box to type password\r
+ */\r
+public class PWPasswordText extends PWText {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWPasswordText(final String label, final String propertyKey) {\r
+               super(label, propertyKey);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#addVerifyListeners()\r
+        */\r
+       @Override\r
+       public void addVerifyListeners() {\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), "");\r
+               } else {\r
+                       if (!(value instanceof String)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be a String because it is associated to a password text box");\r
+                       }\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#convertValue()\r
+        */\r
+       @Override\r
+       public Object convertValue() {\r
+               return this.text.getText();\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#getStyle()\r
+        */\r
+       @Override\r
+       public int getStyle() {\r
+               return SWT.PASSWORD;\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWRadio.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWRadio.java
new file mode 100644 (file)
index 0000000..3dfee00
--- /dev/null
@@ -0,0 +1,98 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Arrays;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * Instances of this class are a group of radio buttons\r
+ * \r
+ */\r
+public class PWRadio extends PWWidget {\r
+\r
+       private final List<Object> data;\r
+       private final List<Button> buttons;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWRadio(final String label, final String prop, final Object... values) {\r
+               super(null, prop, label == null ? 1 : 2, false);\r
+               this.data = new ArrayList<Object>(Arrays.asList(values));\r
+               this.buttons = new ArrayList<Button>();\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public Control build(final Composite parent) {\r
+               buildLabel(parent, GridData.BEGINNING);\r
+\r
+               final Composite composite = new Composite(parent, SWT.NONE);\r
+               final GridLayout gridLayout = new GridLayout();\r
+               gridLayout.marginHeight = gridLayout.marginWidth = 0;\r
+               composite.setLayout(gridLayout);\r
+\r
+               for (final Object datum : this.data) {\r
+                       final Button button = new Button(composite, SWT.RADIO);\r
+                       addControl(button);\r
+                       button.setText(datum.toString());\r
+                       button.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, true, false));\r
+                       button.setSelection(datum.equals(PreferenceWindow.getInstance().getValueFor(getPropertyKey())));\r
+                       button.setData(datum);\r
+                       button.addListener(SWT.Selection, new Listener() {\r
+                               @Override\r
+                               public void handleEvent(final Event event) {\r
+                                       if (button.getSelection()) {\r
+                                               PreferenceWindow.getInstance().setValue(getPropertyKey(), button.getData());\r
+                                       }\r
+                               }\r
+                       });\r
+\r
+                       this.buttons.add(button);\r
+               }\r
+               return composite;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), null);\r
+               } else {\r
+                       if (!this.data.isEmpty()) {\r
+                               if (!value.getClass().equals(this.data.get(0).getClass())) {\r
+                                       throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be a " + this.data.get(0).getClass() + " because it is associated to a combo");\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWScale.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWScale.java
new file mode 100644 (file)
index 0000000..a6bb648
--- /dev/null
@@ -0,0 +1,91 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Scale;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * Instances of this class are scales\r
+ */\r
+public class PWScale extends PWWidget {\r
+\r
+       private final int max;\r
+       private final int min;\r
+       private final int increment;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        * @param min minimum value\r
+        * @param max maximum value\r
+        * @param increment increment value\r
+        */\r
+       public PWScale(final String label, final String propertyKey, final int min, final int max, final int increment) {\r
+               super(label, propertyKey, label == null ? 1 : 2, false);\r
+               this.min = min;\r
+               this.max = max;\r
+               this.increment = increment;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public Control build(final Composite parent) {\r
+               buildLabel(parent, GridData.CENTER);\r
+               final Scale scale = new Scale(parent, SWT.HORIZONTAL);\r
+               addControl(scale);\r
+               scale.setIncrement(this.increment);\r
+               scale.setMinimum(this.min);\r
+               scale.setMaximum(this.max);\r
+               final Integer originalValue = (Integer) PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               scale.setSelection(originalValue.intValue());\r
+\r
+               scale.addListener(SWT.Modify, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               PreferenceWindow.getInstance().setValue(getPropertyKey(), new Integer(scale.getSelection()));\r
+                       }\r
+               });\r
+\r
+               return scale;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), new Integer(this.min));\r
+               } else {\r
+                       if (!(value instanceof Integer)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be an Integer because it is associated to a iscale");\r
+                       }\r
+\r
+                       final int valueAsInt = ((Integer) value).intValue();\r
+                       if (valueAsInt < this.min || valueAsInt > this.max) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' is out of range (value is " + valueAsInt + ", range is " + this.min + "-" + this.max + ")");\r
+                       }\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWSeparator.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWSeparator.java
new file mode 100644 (file)
index 0000000..b24032a
--- /dev/null
@@ -0,0 +1,78 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.mihalis.opal.titledSeparator.TitledSeparator;\r
+\r
+/**\r
+ * Instances of this class are separators\r
+ * \r
+ */\r
+public class PWSeparator extends PWWidget {\r
+\r
+       private final Image image;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        */\r
+       public PWSeparator() {\r
+               this(null, null);\r
+       }\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        */\r
+       public PWSeparator(final String label) {\r
+               this(label, null);\r
+       }\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param image associated image\r
+        */\r
+       public PWSeparator(final String label, final Image image) {\r
+               super(label, null, 1, true);\r
+               this.image = image;\r
+               setAlignment(GridData.FILL);\r
+               setGrabExcessSpace(true);\r
+               setHeight(20);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public Control build(final Composite parent) {\r
+               final TitledSeparator sep = new TitledSeparator(parent, SWT.NONE);\r
+               addControl(sep);\r
+               sep.setText(getLabel());\r
+               sep.setImage(this.image);\r
+               return sep;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWSpinner.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWSpinner.java
new file mode 100644 (file)
index 0000000..9fe4875
--- /dev/null
@@ -0,0 +1,86 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Spinner;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * Instances of this class are spinners\r
+ */\r
+public class PWSpinner extends PWWidget {\r
+       private final int max;\r
+       private final int min;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        * @param min minimum value\r
+        * @param max maximum value\r
+        */\r
+       public PWSpinner(final String label, final String propertyKey, final int min, final int max) {\r
+               super(label, propertyKey, label == null ? 1 : 2, false);\r
+               this.min = min;\r
+               this.max = max;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public Control build(final Composite parent) {\r
+               buildLabel(parent, GridData.CENTER);\r
+               final Spinner spinner = new Spinner(parent, SWT.HORIZONTAL | SWT.BORDER);\r
+               addControl(spinner);\r
+               spinner.setMinimum(this.min);\r
+               spinner.setMaximum(this.max);\r
+               final Integer originalValue = (Integer) PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               spinner.setSelection(originalValue.intValue());\r
+\r
+               spinner.addListener(SWT.Modify, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               PreferenceWindow.getInstance().setValue(getPropertyKey(), new Integer(spinner.getSelection()));\r
+                       }\r
+               });\r
+\r
+               return spinner;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), new Integer(this.min));\r
+               } else {\r
+                       if (!(value instanceof Integer)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be an Integer because it is associated to a spinner");\r
+                       }\r
+\r
+                       final int valueAsInt = ((Integer) value).intValue();\r
+                       if (valueAsInt < this.min || valueAsInt > this.max) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' is out of range (value is " + valueAsInt + ", range is " + this.min + "-" + this.max + ")");\r
+                       }\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWStringText.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWStringText.java
new file mode 100644 (file)
index 0000000..bc2301a
--- /dev/null
@@ -0,0 +1,68 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * Instances of this class are text box to type Strings\r
+ */\r
+public class PWStringText extends PWText {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWStringText(final String label, final String propertyKey) {\r
+               super(label, propertyKey);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#addVerifyListeners()\r
+        */\r
+       @Override\r
+       public void addVerifyListeners() {\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), "");\r
+               } else {\r
+                       if (!(value instanceof String)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be a String because it is associated to a stringtext");\r
+                       }\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#convertValue()\r
+        */\r
+       @Override\r
+       public Object convertValue() {\r
+               return this.text.getText();\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#getStyle()\r
+        */\r
+       @Override\r
+       public int getStyle() {\r
+               return SWT.NONE;\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWText.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWText.java
new file mode 100644 (file)
index 0000000..3d37a86
--- /dev/null
@@ -0,0 +1,74 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Text;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * This is the abstract class for all text widgets (except textarea)\r
+ */\r
+public abstract class PWText extends PWWidget {\r
+\r
+       protected Text text;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated property key\r
+        */\r
+       public PWText(final String label, final String propertyKey) {\r
+               super(label, propertyKey, label == null ? 1 : 2, false);\r
+               setGrabExcessSpace(true);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public Control build(final Composite parent) {\r
+               buildLabel(parent, GridData.CENTER);\r
+               this.text = new Text(parent, SWT.BORDER | getStyle());\r
+               addControl(this.text);\r
+               addVerifyListeners();\r
+               this.text.setText(PreferenceWindow.getInstance().getValueFor(getPropertyKey()).toString());\r
+               this.text.addListener(SWT.Modify, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               PreferenceWindow.getInstance().setValue(getPropertyKey(), convertValue());\r
+                       }\r
+               });\r
+               return this.text;\r
+       }\r
+\r
+       /**\r
+        * Add the verify listeners\r
+        */\r
+       public abstract void addVerifyListeners();\r
+\r
+       /**\r
+        * @return the value of the data typed by the user in the correct format\r
+        */\r
+       public abstract Object convertValue();\r
+\r
+       /**\r
+        * @return the style (SWT.NONE or SWT.PASSWORD)\r
+        */\r
+       public abstract int getStyle();\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWTextarea.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWTextarea.java
new file mode 100644 (file)
index 0000000..0521707
--- /dev/null
@@ -0,0 +1,77 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Text;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+\r
+/**\r
+ * Instances of this class are text areas\r
+ * \r
+ */\r
+public class PWTextarea extends PWWidget {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWTextarea(final String label, final String propertyKey) {\r
+               super(label, propertyKey, label == null ? 1 : 2, false);\r
+               setGrabExcessSpace(true);\r
+               setHeight(50);\r
+               setWidth(350);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#build(org.eclipse.swt.widgets.Composite)\r
+        */\r
+       @Override\r
+       public Control build(final Composite parent) {\r
+               buildLabel(parent, GridData.BEGINNING);\r
+\r
+               final Text text = new Text(parent, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);\r
+               addControl(text);\r
+               text.setText(PreferenceWindow.getInstance().getValueFor(getPropertyKey()).toString());\r
+               text.addListener(SWT.FocusOut, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               PreferenceWindow.getInstance().setValue(getPropertyKey(), text.getText());\r
+                       }\r
+               });\r
+\r
+               return text;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), "");\r
+               } else {\r
+                       if (!(value instanceof String)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be a String because it is associated to a textarea");\r
+                       }\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWURLText.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWURLText.java
new file mode 100644 (file)
index 0000000..ebb145a
--- /dev/null
@@ -0,0 +1,98 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import java.net.MalformedURLException;\r
+import java.net.URL;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.opalDialog.Dialog;\r
+import org.mihalis.opal.preferenceWindow.PreferenceWindow;\r
+import org.mihalis.opal.utils.ResourceManager;\r
+\r
+/**\r
+ * Instances of this class are text box used to type URL\r
+ */\r
+public class PWURLText extends PWText {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label associated label\r
+        * @param propertyKey associated key\r
+        */\r
+       public PWURLText(final String label, final String propertyKey) {\r
+               super(label, propertyKey);\r
+               setWidth(200);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#addVerifyListeners()\r
+        */\r
+       @Override\r
+       public void addVerifyListeners() {\r
+               this.text.addListener(SWT.FocusOut, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               try {\r
+                                       new URL(PWURLText.this.text.getText());\r
+                               } catch (final MalformedURLException e) {\r
+                                       Dialog.error(ResourceManager.getLabel(ResourceManager.APPLICATION_ERROR), ResourceManager.getLabel(ResourceManager.VALID_URL));\r
+                                       event.doit = false;\r
+                                       PWURLText.this.text.forceFocus();\r
+                               }\r
+\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWWidget#check()\r
+        */\r
+       @Override\r
+       public void check() {\r
+               final Object value = PreferenceWindow.getInstance().getValueFor(getPropertyKey());\r
+               if (value == null) {\r
+                       PreferenceWindow.getInstance().setValue(getPropertyKey(), "");\r
+               } else {\r
+                       if (!(value instanceof String)) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has to be a String because it is associated to a URL text box");\r
+                       }\r
+\r
+                       try {\r
+                               new URL((String) value);\r
+                       } catch (final MalformedURLException e) {\r
+                               throw new UnsupportedOperationException("The property '" + getPropertyKey() + "' has a value (" + value + ") that is not an URL");\r
+                       }\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#convertValue()\r
+        */\r
+       @Override\r
+       public Object convertValue() {\r
+               return this.text.getText();\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.preferenceWindow.widgets.PWText#getStyle()\r
+        */\r
+       @Override\r
+       public int getStyle() {\r
+               return SWT.NONE;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWWidget.java b/org.tizen.common.externals/src/org/mihalis/opal/preferenceWindow/widgets/PWWidget.java
new file mode 100644 (file)
index 0000000..424cf02
--- /dev/null
@@ -0,0 +1,264 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.preferenceWindow.widgets;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.mihalis.opal.preferenceWindow.enabler.Enabler;\r
+\r
+/**\r
+ * This class is the root class for all widgets that take part of a preference\r
+ * window\r
+ * \r
+ */\r
+public abstract class PWWidget {\r
+       private final String propertyKey;\r
+       private final String label;\r
+       protected Enabler enabler;\r
+       private final List<Control> controls;\r
+\r
+       private int alignment = GridData.BEGINNING;\r
+       private int indent = 0;\r
+       private int width = 100;\r
+       private int height = -1;\r
+       protected int numberOfColumns = 1;\r
+       private boolean grabExcessSpace = false;\r
+\r
+       private boolean singleWidget = false;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param label label associated to the widget\r
+        * @param propertyKey property key binded to the widget\r
+        * @param numberOfColumns number of columns taken by the widget\r
+        * @param singleWidget if true, the widget is supposed to be "alone" (used\r
+        *            for placement)\r
+        */\r
+       protected PWWidget(final String label, final String propertyKey, final int numberOfColumns, final boolean singleWidget) {\r
+               this.label = label;\r
+               this.propertyKey = propertyKey;\r
+               this.numberOfColumns = numberOfColumns;\r
+               this.singleWidget = singleWidget;\r
+               this.controls = new ArrayList<Control>();\r
+       }\r
+\r
+       /**\r
+        * Build the widget\r
+        * \r
+        * @param parent parent composite\r
+        * @return the created control\r
+        */\r
+       protected abstract Control build(Composite parent);\r
+\r
+       /**\r
+        * Build the label associated to the widget\r
+        * \r
+        * @param parent parent composite\r
+        * @param verticalAlignment vertical alignment\r
+        */\r
+       protected void buildLabel(final Composite parent, final int verticalAlignment) {\r
+               if (getLabel() != null) {\r
+                       final Label label = new Label(parent, SWT.NONE);\r
+                       label.setText(getLabel());\r
+                       final GridData labelGridData = new GridData(GridData.END, verticalAlignment, false, false);\r
+                       labelGridData.horizontalIndent = getIndent();\r
+                       label.setLayoutData(labelGridData);\r
+                       addControl(label);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Check if the property can be binded to the widget\r
+        * \r
+        * @throws UnsupportedOperationException if the property could not be binded\r
+        *             to the widget\r
+        */\r
+       protected abstract void check();\r
+\r
+       /**\r
+        * Check if the property can be binded to the widget, then build the widget\r
+        * \r
+        * @param parent parent composite\r
+        * @return the created control\r
+        */\r
+       public Control checkAndBuild(final Composite parent) {\r
+               check();\r
+               return build(parent);\r
+       }\r
+\r
+       /**\r
+        * Enable or disable the widget, depending on the associated enabler\r
+        */\r
+       public boolean enableOrDisable() {\r
+               if (this.enabler == null) {\r
+                       return true;\r
+               }\r
+\r
+               final boolean enabled = this.enabler.isEnabled();\r
+               for (final Control c : this.controls) {\r
+                       if (!c.isDisposed()) {\r
+                               c.setEnabled(enabled);\r
+                       }\r
+               }\r
+               return enabled;\r
+       }\r
+\r
+       // ------------------------------- getters & setters\r
+\r
+       /**\r
+        * @return the alignment (GridData.BEGINNING, GridData.CENTER, GridData.END,\r
+        *         GridData.FILL)\r
+        */\r
+       public int getAlignment() {\r
+               return this.alignment;\r
+       }\r
+\r
+       /**\r
+        * @return the list of controls contained in the widget\r
+        */\r
+       public List<Control> getControls() {\r
+               return this.controls;\r
+       }\r
+\r
+       /**\r
+        * @return <code>true</code> if the widget should grab the excess space\r
+        */\r
+       public boolean isGrabExcessSpace() {\r
+               return this.grabExcessSpace;\r
+       }\r
+\r
+       /**\r
+        * @return the height of the widget\r
+        */\r
+       public int getHeight() {\r
+               return this.height;\r
+       }\r
+\r
+       /**\r
+        * @return the indentation space of the widget\r
+        */\r
+       public int getIndent() {\r
+               return this.indent;\r
+       }\r
+\r
+       /**\r
+        * @return the label associated to the widget (may be <code>null</code>)\r
+        */\r
+       public String getLabel() {\r
+               return this.label;\r
+       }\r
+\r
+       /**\r
+        * @return the number of columns associated to the widget\r
+        */\r
+       public int getNumberOfColumns() {\r
+               return this.numberOfColumns;\r
+       }\r
+\r
+       /**\r
+        * @return the propertyKey associated to the widget\r
+        */\r
+       String getPropertyKey() {\r
+               return this.propertyKey;\r
+       }\r
+\r
+       /**\r
+        * @return the width of the widget\r
+        */\r
+       public int getWidth() {\r
+               return this.width;\r
+       }\r
+\r
+       /**\r
+        * @return <code>true</code> if the widget is "alone"\r
+        */\r
+       public boolean isSingleWidget() {\r
+               return this.singleWidget;\r
+       }\r
+\r
+       /**\r
+        * Adds a control to the list of control contained in the widget\r
+        * \r
+        * @param control control to add\r
+        */\r
+       protected void addControl(final Control control) {\r
+               this.controls.add(control);\r
+       }\r
+\r
+       /**\r
+        * @param alignment the alignment to set (GridData.BEGINNING,\r
+        *            GridData.CENTER, GridData.END, GridData.FILL)\r
+        * @return the widget\r
+        */\r
+       public PWWidget setAlignment(final int alignment) {\r
+               if (alignment != GridData.BEGINNING && alignment != GridData.CENTER && alignment != GridData.END && alignment != GridData.FILL) {\r
+                       throw new UnsupportedOperationException("Value should be one of the following :GridData.BEGINNING, GridData.CENTER, GridData.END, GridData.FILL");\r
+               }\r
+               this.alignment = alignment;\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @param enabler the enabler to set\r
+        * @return the widget\r
+        */\r
+       public PWWidget setEnabler(final Enabler enabler) {\r
+               this.enabler = enabler;\r
+               this.enabler.injectWidget(this);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @param grabExcessSpace true if you want the widget to grab the excess\r
+        *            space\r
+        * @return the widget\r
+        */\r
+       public PWWidget setGrabExcessSpace(final boolean grabExcessSpace) {\r
+               this.grabExcessSpace = grabExcessSpace;\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @param height the height to set\r
+        * @return the widget\r
+        */\r
+       public PWWidget setHeight(final int height) {\r
+               this.height = height;\r
+               return this;\r
+\r
+       }\r
+\r
+       /**\r
+        * @param indent the indentation space to set\r
+        * @return the widget\r
+        */\r
+       public PWWidget setIndent(final int indent) {\r
+               this.indent = indent;\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @param width the width to set\r
+        * @return the widget\r
+        */\r
+       public PWWidget setWidth(final int width) {\r
+               this.width = width;\r
+               return this;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/BaseFocusControlListener.java b/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/BaseFocusControlListener.java
new file mode 100644 (file)
index 0000000..35c65be
--- /dev/null
@@ -0,0 +1,169 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Peter Weishapl - Inspiration\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.promptSupport;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.ControlEvent;\r
+import org.eclipse.swt.events.ControlListener;\r
+import org.eclipse.swt.events.FocusEvent;\r
+import org.eclipse.swt.events.FocusListener;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.promptSupport.PromptSupport.FocusBehavior;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Abstract class that contains code for the FocusLost, FocusGained and\r
+ * ControlResized events\r
+ * \r
+ */\r
+abstract class BaseFocusControlListener implements FocusListener, ControlListener {\r
+\r
+       protected Control control;\r
+       private boolean firstDraw;\r
+       private Font initialFont;\r
+       private Color initialBackgroundColor;\r
+       private Color initialForegroundColor;\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param control control on which this listener will be attached\r
+        */\r
+       BaseFocusControlListener(final Control control) {\r
+               this.control = control;\r
+               this.firstDraw = true;\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.events.FocusListener#focusGained(org.eclipse.swt.events.FocusEvent)\r
+        */\r
+       @Override\r
+       public void focusGained(final FocusEvent e) {\r
+               if (isFilled()) {\r
+                       // Widget not empty\r
+                       return;\r
+               }\r
+\r
+               applyInitialLook();\r
+               if (PromptSupport.getFocusBehavior(this.control) == FocusBehavior.HIDE_PROMPT) {\r
+                       hidePrompt();\r
+               } else {\r
+                       highLightPrompt();\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Apply the initial look of the widget\r
+        */\r
+       private void applyInitialLook() {\r
+               this.control.setFont(this.initialFont);\r
+               this.control.setBackground(this.initialBackgroundColor);\r
+               this.control.setForeground(this.initialForegroundColor);\r
+       }\r
+\r
+       /**\r
+        * Code when the focus behiaviour is "Hide"\r
+        */\r
+       protected abstract void hidePrompt();\r
+\r
+       /**\r
+        * Code when the focus behiaviour is "Highlight"\r
+        */\r
+       protected abstract void highLightPrompt();\r
+\r
+       /**\r
+        * @see org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt.events.FocusEvent)\r
+        */\r
+       @Override\r
+       public void focusLost(final FocusEvent e) {\r
+               if (isFilled()) {\r
+                       return;\r
+               }\r
+\r
+               storeInitialLook();\r
+               applyForegroundColor();\r
+               applyBackgroundColor();\r
+               applyFontStyle();\r
+               fillPromptText();\r
+       }\r
+\r
+       /**\r
+        * @return <code>true</code> if the widget is filled, <code>false</code>\r
+        *         otherwise\r
+        */\r
+       protected abstract boolean isFilled();\r
+\r
+       /**\r
+        * Apply the foreground color for the prompt\r
+        */\r
+       private void applyForegroundColor() {\r
+               this.control.setForeground(PromptSupport.getForeground(this.control));\r
+       }\r
+\r
+       /**\r
+        * Apply the background color for the prompt\r
+        */\r
+       private void applyBackgroundColor() {\r
+               this.control.setBackground(PromptSupport.getBackground(this.control));\r
+       }\r
+\r
+       /**\r
+        * Apply the font style to the prompt\r
+        */\r
+       private void applyFontStyle() {\r
+               final Font font = SWTGraphicUtil.buildFontFrom(this.control, PromptSupport.getFontStyle(this.control));\r
+               this.control.setFont(font);\r
+               this.control.addListener(SWT.Dispose, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               SWTGraphicUtil.dispose(font);\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * Fill the prompt text\r
+        */\r
+       protected abstract void fillPromptText();\r
+\r
+       /**\r
+        * @see org.eclipse.swt.events.ControlListener#controlMoved(org.eclipse.swt.events.ControlEvent)\r
+        */\r
+       @Override\r
+       public void controlMoved(final ControlEvent e) {\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.events.ControlListener#controlResized(org.eclipse.swt.events.ControlEvent)\r
+        */\r
+       @Override\r
+       public void controlResized(final ControlEvent e) {\r
+               if (this.firstDraw) {\r
+                       storeInitialLook();\r
+                       this.firstDraw = true;\r
+                       focusLost(null);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Store the initial look of the widget\r
+        */\r
+       private void storeInitialLook() {\r
+               this.initialFont = this.control.getFont();\r
+               this.initialBackgroundColor = this.control.getBackground();\r
+               this.initialForegroundColor = this.control.getForeground();\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/CComboFocusControlListener.java b/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/CComboFocusControlListener.java
new file mode 100644 (file)
index 0000000..5a2da07
--- /dev/null
@@ -0,0 +1,68 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Peter Weishapl - Inspiration\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.promptSupport;\r
+\r
+import org.eclipse.swt.custom.CCombo;\r
+\r
+/**\r
+ * Focus/Control listener for a CCombo widget\r
+ */\r
+class CComboFocusControlListener extends BaseFocusControlListener {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param control control on which this listener will be attached\r
+        */\r
+       public CComboFocusControlListener(final CCombo control) {\r
+               super(control);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#hidePrompt()\r
+        */\r
+       @Override\r
+       protected void hidePrompt() {\r
+               ((CCombo) this.control).setText("");\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#highLightPrompt()\r
+        */\r
+       @Override\r
+       protected void highLightPrompt() {\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#fillPromptText()\r
+        */\r
+       @Override\r
+       protected void fillPromptText() {\r
+               final String promptText = PromptSupport.getPrompt(this.control);\r
+               if (promptText != null) {\r
+                       ((CCombo) this.control).setText(promptText);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#isFilled()\r
+        */\r
+       @Override\r
+       protected boolean isFilled() {\r
+               final String promptText = PromptSupport.getPrompt(this.control);\r
+               if (promptText != null && promptText.equals(((CCombo) this.control).getText().trim())) {\r
+                       return false;\r
+               }\r
+               return !"".equals(((CCombo) this.control).getText().trim());\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/ComboFocusControlListener.java b/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/ComboFocusControlListener.java
new file mode 100644 (file)
index 0000000..8e330f9
--- /dev/null
@@ -0,0 +1,73 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Peter Weishapl - Inspiration\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.promptSupport;\r
+\r
+import org.eclipse.swt.widgets.Combo;\r
+\r
+/**\r
+ * Focus/Control listener for a Combo widget\r
+ */\r
+class ComboFocusControlListener extends BaseFocusControlListener {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param control control on which this listener will be attached\r
+        */\r
+       public ComboFocusControlListener(final Combo control) {\r
+               super(control);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#hidePrompt()\r
+        */\r
+       @Override\r
+       protected void hidePrompt() {\r
+               ((Combo) this.control).setText("");\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#highLightPrompt()\r
+        */\r
+       @Override\r
+       protected void highLightPrompt() {\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#fillPromptText()\r
+        */\r
+       @Override\r
+       protected void fillPromptText() {\r
+               final String promptText = PromptSupport.getPrompt(this.control);\r
+               if (promptText != null) {\r
+                       this.control.getDisplay().asyncExec(new Runnable() {\r
+\r
+                               @Override\r
+                               public void run() {\r
+                                       ((Combo) ComboFocusControlListener.this.control).setText(promptText);\r
+                               }\r
+                       });\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#isFilled()\r
+        */\r
+       @Override\r
+       protected boolean isFilled() {\r
+               final String promptText = PromptSupport.getPrompt(this.control);\r
+               if (promptText != null && promptText.equals(((Combo) this.control).getText().trim())) {\r
+                       return false;\r
+               }\r
+               return !"".equals(((Combo) this.control).getText().trim());\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/FocusControlListenerFactory.java b/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/FocusControlListenerFactory.java
new file mode 100644 (file)
index 0000000..82671db
--- /dev/null
@@ -0,0 +1,49 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Peter Weishapl - Inspiration\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.promptSupport;\r
+\r
+import org.eclipse.swt.custom.CCombo;\r
+import org.eclipse.swt.custom.StyledText;\r
+import org.eclipse.swt.widgets.Combo;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Text;\r
+\r
+/**\r
+ * This is a factory of focus/control listeners\r
+ * \r
+ */\r
+class FocusControlListenerFactory {\r
+\r
+       /**\r
+        * @param control control on which the listener will be added\r
+        * @return a BaseControlFocus Listener that can be attached to the events\r
+        *         focusLost, focusGained and controlResized\r
+        */\r
+       static BaseFocusControlListener getFocusControlListenerFor(final Control control) {\r
+               if (control instanceof Combo) {\r
+                       return new ComboFocusControlListener((Combo) control);\r
+               }\r
+               if (control instanceof CCombo) {\r
+                       return new CComboFocusControlListener((CCombo) control);\r
+               }\r
+\r
+               if (control instanceof Text) {\r
+                       return new TextFocusControlListener((Text) control);\r
+               }\r
+\r
+               if (control instanceof StyledText) {\r
+                       return new StyledTextFocusControlListener((StyledText) control);\r
+               }\r
+               throw new IllegalArgumentException("Control should be a Text, a Combo, a CCombo or a StyledText widget");\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/PromptSupport.java b/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/PromptSupport.java
new file mode 100644 (file)
index 0000000..d04ade6
--- /dev/null
@@ -0,0 +1,230 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Peter Weishapl - Inspiration\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.promptSupport;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.custom.CCombo;\r
+import org.eclipse.swt.custom.StyledText;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.widgets.Combo;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Text;\r
+\r
+/**\r
+ * This utility class allows the user to add a prompt to a text or combo\r
+ * component (see http://designinginterfaces.com/Input_Prompt)\r
+ * \r
+ */\r
+public class PromptSupport {\r
+       public static enum FocusBehavior {\r
+               /**\r
+                * Highlight the prompt text as it would be selected.\r
+                */\r
+               HIGHLIGHT_PROMPT,\r
+               /**\r
+                * Hide the prompt text.\r
+                */\r
+               HIDE_PROMPT\r
+       };\r
+\r
+       private static final String KEY = "org.mihalis.opal.promptSupport.PromptSupport";\r
+       static final String BACKGROUND = KEY + ".background";\r
+       static final String FOREGROUND = KEY + ".foreground";\r
+       static final String STYLE = KEY + ".style";\r
+       static final String BEHAVIOR = KEY + ".behavior";\r
+       static final String PROMPT = KEY + ".prompt";\r
+       static final String SET = KEY + ".set";\r
+\r
+       /**\r
+        * <p>\r
+        * Convenience method to set the <code>promptText</code> and\r
+        * <code>promptTextColor</code> on a {@link Control}.\r
+        * </p>\r
+        * \r
+        * @param promptText Prompt Text\r
+        * @param promptForeground Foreground\r
+        * @param promptBackground Background\r
+        * @param control control\r
+        * @exception IllegalArgumentException if the control is not a Text Box, a\r
+        *                Combo Box, a StyledText or a CCombo\r
+        */\r
+       public static void init(final String promptText, final Color promptForeground, final Color promptBackground, final Control control) {\r
+               if (promptText != null && promptText.length() > 0) {\r
+                       setPrompt(promptText, control);\r
+               }\r
+               if (promptForeground != null) {\r
+                       setForeground(promptForeground, control);\r
+               }\r
+               if (promptBackground != null) {\r
+                       setBackground(promptBackground, control);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Get the background color of the <code>control</code>, when no text is\r
+        * present. If no color has been set, the <code>control</code> background\r
+        * color will be returned.\r
+        * \r
+        * @param textComponent\r
+        * @return the the background color of the text component, when no text is\r
+        *         present\r
+        */\r
+       public static Color getBackground(final Control control) {\r
+               final Color temp = (Color) control.getData(BACKGROUND);\r
+               return temp == null ? control.getBackground() : temp;\r
+       }\r
+\r
+       /**\r
+        * <p>\r
+        * Sets the prompts background color on <code>control</code>. This\r
+        * background color will only be used when no text is present.\r
+        * </p>\r
+        * \r
+        * @param background\r
+        * @param control\r
+        * @exception IllegalArgumentException if the control is not a Text Box, a\r
+        *                Combo Box, a StyledText or a CCombo\r
+        */\r
+       public static void setBackground(final Color color, final Control control) {\r
+               checkControl(control);\r
+               control.setData(BACKGROUND, color);\r
+       }\r
+\r
+       /**\r
+        * Get the {@link FocusBehavior} of <code>control</code>.\r
+        * \r
+        * @param control\r
+        * @return the {@link FocusBehavior} or {@link FocusBehavior#HIDE_PROMPT} if\r
+        *         none is set\r
+        */\r
+       public static FocusBehavior getFocusBehavior(final Control control) {\r
+               final FocusBehavior temp = (FocusBehavior) control.getData(BEHAVIOR);\r
+               return temp == null ? FocusBehavior.HIDE_PROMPT : temp;\r
+\r
+       }\r
+\r
+       /**\r
+        * Sets the {@link FocusBehavior} on <code>control</code>, if it is the\r
+        * focus owner.\r
+        * \r
+        * @param focusBehavior\r
+        * @param control\r
+        * @exception IllegalArgumentException if the control is not a Text Box, a\r
+        *                Combo Box, a StyledText or a CCombo\r
+        */\r
+       public static void setFocusBehavior(final FocusBehavior focusBehavior, final Control control) {\r
+               checkControl(control);\r
+               control.setData(BEHAVIOR, focusBehavior);\r
+       }\r
+\r
+       /**\r
+        * Returns the font style of the prompt text, which is a OR mix of\r
+        * SWT.ITALIC, SWT.NONE or SWT.BOLD\r
+        * \r
+        * @param control\r
+        * @return font style of the prompt text\r
+        */\r
+       public static int getFontStyle(final Control control) {\r
+               final Integer temp = (Integer) control.getData(STYLE);\r
+               return temp == null ? SWT.ITALIC : temp;\r
+\r
+       }\r
+\r
+       /**\r
+        * <p>\r
+        * Set the style of the prompt font, which is a OR mix of SWT.ITALIC,\r
+        * SWT.NONE or SWT.BOLD\r
+        * </p>\r
+        * \r
+        * @param fontStyle\r
+        * @param control\r
+        * @exception IllegalArgumentException if the control is not a Text Box, a\r
+        *                Combo Box, a StyledText or a CCombo\r
+        */\r
+       public static void setFontStyle(final int fontStyle, final Control control) {\r
+               checkControl(control);\r
+               control.setData(STYLE, fontStyle);\r
+       }\r
+\r
+       /**\r
+        * Get the foreground color of the prompt text. If no color has been set,\r
+        * the <code>GREY</code> color will be returned.\r
+        * \r
+        * @param color\r
+        * @return the color of the prompt text or <code>GREY</code>if none is set\r
+        */\r
+       public static Color getForeground(final Control control) {\r
+               final Color temp = (Color) control.getData(FOREGROUND);\r
+               return temp == null ? control.getForeground() : temp;\r
+\r
+       }\r
+\r
+       /**\r
+        * Sets the foreground color of the prompt on <code>control</code>. This\r
+        * color will be used when no text is present.\r
+        * \r
+        * @param promptTextColor\r
+        * @param textComponent\r
+        * @exception IllegalArgumentException if the control is not a Text Box, a\r
+        *                Combo Box, a StyledText or a CCombo\r
+        */\r
+       public static void setForeground(final Color color, final Control control) {\r
+               checkControl(control);\r
+               control.setData(FOREGROUND, color);\r
+       }\r
+\r
+       /**\r
+        * Get the prompt text of <code>control</code>.\r
+        * \r
+        * @param control\r
+        * @return the prompt text\r
+        */\r
+       public static String getPrompt(final Control control) {\r
+               return (String) control.getData(PROMPT);\r
+       }\r
+\r
+       /**\r
+        * <p>\r
+        * Sets the prompt text on <code>control</code>\r
+        * </p>\r
+        * \r
+        * @param promptText\r
+        * @param textComponent\r
+        * @exception IllegalArgumentException if the control is not a Text Box, a\r
+        *                Combo Box, a StyledText or a CCombo\r
+        */\r
+       public static void setPrompt(final String promptText, final Control control) {\r
+               checkControl(control);\r
+\r
+               final boolean alreadySet = control.getData(SET) == null ? false : (Boolean) control.getData(SET);\r
+               if (alreadySet) {\r
+                       throw new IllegalArgumentException("A prompt has already been set on this control !");\r
+               }\r
+               control.setData(PROMPT, promptText);\r
+\r
+               final BaseFocusControlListener bfl = FocusControlListenerFactory.getFocusControlListenerFor(control);\r
+               control.addFocusListener(bfl);\r
+               control.addControlListener(bfl);\r
+               control.setData(SET, true);\r
+       }\r
+\r
+       /**\r
+        * Check if the control is a Text, a Combo, a StyledText or a CCombo\r
+        * \r
+        * @param control control to check\r
+        */\r
+       private static void checkControl(final Control control) {\r
+               if (!(control instanceof Text) && !(control instanceof Combo) && !(control instanceof StyledText) && !(control instanceof CCombo)) {\r
+                       throw new IllegalArgumentException("PromptSupport can only be used on a Text, a Combo, a StyledText or a CCombo widget.");\r
+               }\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/StyledTextFocusControlListener.java b/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/StyledTextFocusControlListener.java
new file mode 100644 (file)
index 0000000..2be5bca
--- /dev/null
@@ -0,0 +1,76 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Peter Weishapl - Inspiration\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.promptSupport;\r
+\r
+import org.eclipse.swt.custom.StyledText;\r
+\r
+/**\r
+ * Focus/Control listener for a StyledText widget\r
+ */\r
+class StyledTextFocusControlListener extends BaseFocusControlListener {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param control control on which this listener will be attached\r
+        */\r
+       public StyledTextFocusControlListener(final StyledText control) {\r
+               super(control);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#hidePrompt()\r
+        */\r
+       @Override\r
+       protected void hidePrompt() {\r
+               ((StyledText) this.control).setText("");\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#highLightPrompt()\r
+        */\r
+       @Override\r
+       protected void highLightPrompt() {\r
+               this.control.getDisplay().asyncExec(new Runnable() {\r
+                       @Override\r
+                       public void run() {\r
+                               ((StyledText) StyledTextFocusControlListener.this.control).selectAll();\r
+\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#fillPromptText()\r
+        */\r
+       @Override\r
+       protected void fillPromptText() {\r
+               final String promptText = PromptSupport.getPrompt(this.control);\r
+               if (promptText != null) {\r
+                       ((StyledText) this.control).setText(promptText);\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#isFilled()\r
+        */\r
+       @Override\r
+       protected boolean isFilled() {\r
+               final String promptText = PromptSupport.getPrompt(this.control);\r
+               if (promptText != null && promptText.equals(((StyledText) this.control).getText().trim())) {\r
+                       return false;\r
+               }\r
+               return !"".equals(((StyledText) this.control).getText().trim());\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/TextFocusControlListener.java b/org.tizen.common.externals/src/org/mihalis/opal/promptSupport/TextFocusControlListener.java
new file mode 100644 (file)
index 0000000..f90a975
--- /dev/null
@@ -0,0 +1,75 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Peter Weishapl - Inspiration\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.promptSupport;\r
+\r
+import org.eclipse.swt.widgets.Text;\r
+\r
+/**\r
+ * Focus/Control listener for a Text widget\r
+ */\r
+class TextFocusControlListener extends BaseFocusControlListener {\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param control control on which this listener will be attached\r
+        */\r
+       public TextFocusControlListener(final Text control) {\r
+               super(control);\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#hidePrompt()\r
+        */\r
+       @Override\r
+       protected void hidePrompt() {\r
+               ((Text) this.control).setText("");\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#highLightPrompt()\r
+        */\r
+       @Override\r
+       protected void highLightPrompt() {\r
+               // If we do a select all directly, it's not working !\r
+               this.control.getDisplay().asyncExec(new Runnable() {\r
+                       @Override\r
+                       public void run() {\r
+                               ((Text) TextFocusControlListener.this.control).selectAll();\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#fillPromptText()\r
+        */\r
+       @Override\r
+       protected void fillPromptText() {\r
+               final String promptText = PromptSupport.getPrompt(this.control);\r
+               if (promptText != null) {\r
+                       ((Text) this.control).setText(promptText);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.promptSupport.BaseFocusControlListener#isFilled()\r
+        */\r
+       @Override\r
+       protected boolean isFilled() {\r
+               final String promptText = PromptSupport.getPrompt(this.control);\r
+               if (promptText != null && promptText.equals(((Text) this.control).getText().trim())) {\r
+                       return false;\r
+               }\r
+               return !"".equals(((Text) this.control).getText().trim());\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/rangeSlider/RangeSlider.java b/org.tizen.common.externals/src/org/mihalis/opal/rangeSlider/RangeSlider.java
new file mode 100755 (executable)
index 0000000..620042e
--- /dev/null
@@ -0,0 +1,1060 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.rangeSlider;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.PaintEvent;\r
+import org.eclipse.swt.events.PaintListener;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.widgets.Canvas;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class provide a separator with a title and/or an image.\r
+ * <p>\r
+ * <dl>\r
+ * <dt><b>Styles:</b></dt>\r
+ * <dd>BORDER</dd>\r
+ * <dd>HORIZONTAL</dd>\r
+ * <dd>VERTICAL</dd> *\r
+ * <dt><b>Events:</b></dt>\r
+ * <dd>Selection</dd>\r
+ * </dl>\r
+ * </p>\r
+ */\r
+public class RangeSlider extends Canvas {\r
+\r
+       private enum SELECTED_KNOB {\r
+               NONE, UPPER, LOWER\r
+       };\r
+\r
+       private int minimum;\r
+       private int maximum;\r
+       private int lowerValue;\r
+       private int upperValue;\r
+       private final List<SelectionListener> listeners;\r
+       private final Image slider, sliderHover, sliderDrag, sliderSelected;\r
+       private final Image vSlider, vSliderHover, vSliderDrag, vSliderSelected;\r
+       private int orientation;\r
+       private int increment;\r
+       private int pageIncrement;\r
+       private SELECTED_KNOB lastSelected;\r
+       private boolean dragInProgress;\r
+       private Point coordUpper;\r
+       private boolean upperHover;\r
+       private Point coordLower;\r
+       private boolean lowerHover;\r
+       private int previousUpperValue;\r
+       private int previousLowerValue;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a composite control which will be the parent of the new\r
+        *            instance (cannot be null)\r
+        * @param style the style of control to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        */\r
+       public RangeSlider(final Composite parent, final int style) {\r
+               super(parent, SWT.DOUBLE_BUFFERED | ((style & SWT.BORDER) == SWT.BORDER ? SWT.BORDER : SWT.NONE));\r
+               this.minimum = this.lowerValue = 0;\r
+               this.maximum = this.upperValue = 100;\r
+               this.listeners = new ArrayList<SelectionListener>();\r
+               this.increment = 1;\r
+               this.pageIncrement = 10;\r
+               this.lastSelected = SELECTED_KNOB.NONE;\r
+               this.slider = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/slider-normal.png"));\r
+               this.sliderHover = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/slider-hover.png"));\r
+               this.sliderDrag = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/slider-drag.png"));\r
+               this.sliderSelected = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/slider-selected.png"));\r
+\r
+               this.vSlider = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/h-slider-normal.png"));\r
+               this.vSliderHover = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/h-slider-hover.png"));\r
+               this.vSliderDrag = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/h-slider-drag.png"));\r
+               this.vSliderSelected = new Image(getDisplay(), this.getClass().getClassLoader().getResourceAsStream("images/h-slider-selected.png"));\r
+\r
+               if ((style & SWT.VERTICAL) == SWT.VERTICAL) {\r
+                       this.orientation = SWT.VERTICAL;\r
+               } else {\r
+                       this.orientation = SWT.HORIZONTAL;\r
+               }\r
+\r
+               addListener(SWT.Dispose, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               SWTGraphicUtil.dispose(RangeSlider.this.slider);\r
+                               SWTGraphicUtil.dispose(RangeSlider.this.sliderHover);\r
+                               SWTGraphicUtil.dispose(RangeSlider.this.sliderDrag);\r
+                               SWTGraphicUtil.dispose(RangeSlider.this.sliderSelected);\r
+\r
+                               SWTGraphicUtil.dispose(RangeSlider.this.vSlider);\r
+                               SWTGraphicUtil.dispose(RangeSlider.this.vSliderHover);\r
+                               SWTGraphicUtil.dispose(RangeSlider.this.vSliderDrag);\r
+                               SWTGraphicUtil.dispose(RangeSlider.this.vSliderSelected);\r
+                       }\r
+               });\r
+\r
+               addMouseListeners();\r
+               addListener(SWT.KeyDown, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               handleKeyDown(event);\r
+                       }\r
+               });\r
+               addPaintListener(new PaintListener() {\r
+                       @Override\r
+                       public void paintControl(final PaintEvent e) {\r
+                               drawWidget(e);\r
+\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Add the mouse listeners (mouse up, mouse down, mouse move, mouse wheel)\r
+        */\r
+       private void addMouseListeners() {\r
+               addListener(SWT.MouseDown, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event e) {\r
+                               handleMouseDown(e);\r
+                       }\r
+               });\r
+\r
+               addListener(SWT.MouseUp, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event e) {\r
+                               handleMouseUp(e);\r
+                       }\r
+               });\r
+\r
+               addListener(SWT.MouseMove, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event e) {\r
+                               handleMouseMove(e);\r
+                       }\r
+               });\r
+\r
+               addListener(SWT.MouseWheel, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event e) {\r
+                               handleMouseWheel(e);\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Code executed when the mouse is down\r
+        * \r
+        * @param e event\r
+        */\r
+       private void handleMouseDown(final Event e) {\r
+\r
+               if (this.upperHover) {\r
+                       this.dragInProgress = true;\r
+                       this.lastSelected = SELECTED_KNOB.UPPER;\r
+                       this.previousUpperValue = this.upperValue;\r
+                       return;\r
+               }\r
+\r
+               if (this.lowerHover) {\r
+                       this.dragInProgress = true;\r
+                       this.lastSelected = SELECTED_KNOB.LOWER;\r
+                       this.previousLowerValue = this.lowerValue;\r
+                       return;\r
+               }\r
+\r
+               this.dragInProgress = false;\r
+               this.lastSelected = SELECTED_KNOB.NONE;\r
+       }\r
+\r
+       /**\r
+        * Code executed when the mouse is up\r
+        * \r
+        * @param e event\r
+        */\r
+       private void handleMouseUp(final Event e) {\r
+               if (!this.dragInProgress) {\r
+                       return;\r
+               }\r
+               this.dragInProgress = false;\r
+               if (!fireSelectionListeners(e)) {\r
+                       if (this.lastSelected == SELECTED_KNOB.UPPER) {\r
+                               this.upperValue = this.previousUpperValue;\r
+                       } else {\r
+                               this.lowerValue = this.previousLowerValue;\r
+                       }\r
+                       redraw();\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Fire all selection listeners\r
+        * \r
+        * @param event selection event\r
+        * @return <code>true</code> if no listener cancels the selection,\r
+        *         <code>false</code> otherwise\r
+        */\r
+       private boolean fireSelectionListeners(final Event event) {\r
+               for (final SelectionListener selectionListener : this.listeners) {\r
+                       final SelectionEvent selectionEvent = new SelectionEvent(event);\r
+                       selectionListener.widgetSelected(selectionEvent);\r
+                       if (!selectionEvent.doit) {\r
+                               return false;\r
+                       }\r
+               }\r
+               return true;\r
+       }\r
+\r
+       /**\r
+        * Code executed when the mouse pointer is moving\r
+        * \r
+        * @param e event\r
+        */\r
+       private void handleMouseMove(final Event e) {\r
+               final int x = e.x, y = e.y;\r
+               final Image img = this.orientation == SWT.HORIZONTAL ? this.slider : this.vSlider;\r
+               this.upperHover = x >= this.coordUpper.x && x <= this.coordUpper.x + img.getBounds().width && y >= this.coordUpper.y && y <= this.coordUpper.y + img.getBounds().height;\r
+               this.lowerHover = x >= this.coordLower.x && x <= this.coordLower.x + img.getBounds().width && y >= this.coordLower.y && y <= this.coordLower.y + img.getBounds().height;\r
+\r
+               if (this.dragInProgress) {\r
+                       if (this.orientation == SWT.HORIZONTAL) {\r
+                               final int mouseValue = (int) ((x - 9f) / computePixelSizeForHorizonalSlider()) + this.minimum;\r
+                               if (this.lastSelected == SELECTED_KNOB.UPPER) {\r
+                                       this.upperValue = (int) (Math.ceil(mouseValue / this.increment) * this.increment) - this.increment;\r
+                                       checkUpperValue();\r
+                               } else {\r
+                                       this.lowerValue = (int) (Math.ceil(mouseValue / this.increment) * this.increment) - this.increment;\r
+                                       checkLowerValue();\r
+                               }\r
+\r
+                       } else {\r
+                               final int mouseValue = (int) ((y - 9f) / computePixelSizeForVerticalSlider()) + this.minimum;\r
+                               if (this.lastSelected == SELECTED_KNOB.UPPER) {\r
+                                       this.upperValue = (int) (Math.ceil(mouseValue / this.increment) * this.increment) - this.increment;\r
+                                       checkUpperValue();\r
+                               } else {\r
+                                       this.lowerValue = (int) (Math.ceil(mouseValue / this.increment) * this.increment) - this.increment;\r
+                                       checkLowerValue();\r
+                               }\r
+\r
+                       }\r
+               }\r
+\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * Code executed when the mouse wheel is activated\r
+        * \r
+        * @param e event\r
+        */\r
+       private void handleMouseWheel(final Event e) {\r
+               if (this.lastSelected == SELECTED_KNOB.NONE) {\r
+                       return;\r
+               }\r
+\r
+               if (this.lastSelected == SELECTED_KNOB.LOWER) {\r
+                       this.lowerValue += e.count * this.increment;\r
+                       checkLowerValue();\r
+                       redraw();\r
+               } else {\r
+                       this.upperValue += e.count * this.increment;\r
+                       checkUpperValue();\r
+                       redraw();\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Check if the lower value is in ranges\r
+        */\r
+       private void checkLowerValue() {\r
+               if (this.lowerValue < this.minimum) {\r
+                       this.lowerValue = this.minimum;\r
+               }\r
+               if (this.lowerValue > this.maximum) {\r
+                       this.lowerValue = this.maximum;\r
+               }\r
+               if (this.lowerValue > this.upperValue) {\r
+                       this.lowerValue = this.upperValue;\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Check if the upper value is in ranges\r
+        */\r
+       private void checkUpperValue() {\r
+               if (this.upperValue < this.minimum) {\r
+                       this.upperValue = this.minimum;\r
+               }\r
+               if (this.upperValue > this.maximum) {\r
+                       this.upperValue = this.maximum;\r
+               }\r
+               if (this.upperValue < this.lowerValue) {\r
+                       this.upperValue = this.lowerValue;\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Draws the widget\r
+        * \r
+        * @param e paint event\r
+        */\r
+       private void drawWidget(final PaintEvent e) {\r
+               final Rectangle rect = this.getClientArea();\r
+               if (rect.width == 0 || rect.height == 0) {\r
+                       return;\r
+               }\r
+               e.gc.setAdvanced(true);\r
+               e.gc.setAntialias(SWT.ON);\r
+               if (this.orientation == SWT.HORIZONTAL) {\r
+                       drawHorizontalRangeSlider(e.gc);\r
+               } else {\r
+                       drawVerticalRangeSlider(e.gc);\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Draw the range slider (horizontal)\r
+        * \r
+        * @param gc graphic context\r
+        */\r
+       private void drawHorizontalRangeSlider(final GC gc) {\r
+               drawBackgroundHorizontal(gc);\r
+               drawBarsHorizontal(gc);\r
+               this.coordUpper = drawHorizontalKnob(gc, this.upperValue, true);\r
+               this.coordLower = drawHorizontalKnob(gc, this.lowerValue, false);\r
+       }\r
+\r
+       /**\r
+        * Draw the background\r
+        * \r
+        * @param gc graphic context\r
+        */\r
+       private void drawBackgroundHorizontal(final GC gc) {\r
+               final Rectangle clientArea = this.getClientArea();\r
+\r
+               gc.setBackground(getBackground());\r
+               gc.fillRectangle(clientArea);\r
+\r
+               if (isEnabled()) {\r
+                       gc.setForeground(getForeground());\r
+               } else {\r
+                       gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_GRAY));\r
+               }\r
+               gc.drawRoundRectangle(9, 9, clientArea.width - 20, clientArea.height - 20, 3, 3);\r
+\r
+               final float pixelSize = computePixelSizeForHorizonalSlider();\r
+               final int startX = (int) (pixelSize * this.lowerValue);\r
+               final int endX = (int) (pixelSize * this.upperValue);\r
+               if (isEnabled()) {\r
+                       gc.setBackground(getForeground());\r
+               } else {\r
+                       gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_GRAY));\r
+               }\r
+               gc.fillRectangle(12 + startX, 9, endX - startX - 6, clientArea.height - 20);\r
+\r
+       }\r
+\r
+       /**\r
+        * @return how many pixels corresponds to 1 point of value\r
+        */\r
+       private float computePixelSizeForHorizonalSlider() {\r
+               return (getClientArea().width - 20f) / (this.maximum - this.minimum);\r
+       }\r
+\r
+       /**\r
+        * Draw the bars\r
+        * \r
+        * @param gc graphic context\r
+        */\r
+       private void drawBarsHorizontal(final GC gc) {\r
+               final Rectangle clientArea = this.getClientArea();\r
+               if (isEnabled()) {\r
+                       gc.setForeground(getForeground());\r
+               } else {\r
+                       gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_GRAY));\r
+               }\r
+\r
+               final float pixelSize = computePixelSizeForHorizonalSlider();\r
+               for (int i = 1; i < 10; i++) {\r
+                       final int x = (int) (9 + pixelSize * (this.maximum - this.minimum) / 10 * i);\r
+                       gc.drawLine(x, 4, x, 7);\r
+                       gc.drawLine(x, clientArea.height - 6, x, clientArea.height - 9);\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Draws an horizontal knob\r
+        * \r
+        * @param gc graphic context\r
+        * @param value corresponding value\r
+        * @param upper if <code>true</code>, draws the upper knob. If\r
+        *            <code>false</code>, draws the lower knob\r
+        * @return the coordinate of the upper left corner of the knob\r
+        */\r
+       private Point drawHorizontalKnob(final GC gc, final int value, final boolean upper) {\r
+               final float pixelSize = computePixelSizeForHorizonalSlider();\r
+               final int x = (int) (pixelSize * value);\r
+               Image image;\r
+               if (upper) {\r
+                       if (this.upperHover) {\r
+                               image = this.dragInProgress ? this.sliderDrag : this.sliderHover;\r
+                       } else if (this.lastSelected == SELECTED_KNOB.UPPER) {\r
+                               image = this.sliderSelected;\r
+                       } else {\r
+                               image = this.slider;\r
+                       }\r
+               } else {\r
+                       if (this.lowerHover) {\r
+                               image = this.dragInProgress ? this.sliderDrag : this.sliderHover;\r
+                       } else if (this.lastSelected == SELECTED_KNOB.LOWER) {\r
+                               image = this.sliderSelected;\r
+                       } else {\r
+                               image = this.slider;\r
+                       }\r
+               }\r
+               if (isEnabled()) {\r
+                       gc.drawImage(image, x + 5, getClientArea().height / 2 - this.slider.getBounds().height / 2);\r
+               } else {\r
+                       final Image temp = new Image(getDisplay(), image, SWT.IMAGE_DISABLE);\r
+                       gc.drawImage(temp, x + 5, getClientArea().height / 2 - this.slider.getBounds().height / 2);\r
+                       temp.dispose();\r
+               }\r
+               return new Point(x + 5, getClientArea().height / 2 - this.slider.getBounds().height / 2);\r
+       }\r
+\r
+       /**\r
+        * Draw the range slider (vertical)\r
+        * \r
+        * @param gc graphic context\r
+        */\r
+       private void drawVerticalRangeSlider(final GC gc) {\r
+               drawBackgroundVertical(gc);\r
+               drawBarsVertical(gc);\r
+               this.coordUpper = drawVerticalKnob(gc, this.upperValue, true);\r
+               this.coordLower = drawVerticalKnob(gc, this.lowerValue, false);\r
+       }\r
+\r
+       /**\r
+        * Draws the background\r
+        * \r
+        * @param gc graphic context\r
+        */\r
+       private void drawBackgroundVertical(final GC gc) {\r
+               final Rectangle clientArea = this.getClientArea();\r
+               gc.setBackground(getBackground());\r
+               gc.fillRectangle(clientArea);\r
+\r
+               if (isEnabled()) {\r
+                       gc.setForeground(getForeground());\r
+               } else {\r
+                       gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_GRAY));\r
+               }\r
+               gc.drawRoundRectangle(9, 9, clientArea.width - 20, clientArea.height - 20, 3, 3);\r
+\r
+               final float pixelSize = computePixelSizeForVerticalSlider();\r
+               final int startY = (int) (pixelSize * this.lowerValue);\r
+               final int endY = (int) (pixelSize * this.upperValue);\r
+               if (isEnabled()) {\r
+                       gc.setBackground(getForeground());\r
+               } else {\r
+                       gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_GRAY));\r
+               }\r
+               gc.fillRectangle(9, 12 + startY, clientArea.width - 20, endY - startY - 6);\r
+\r
+       }\r
+\r
+       /**\r
+        * @return how many pixels corresponds to 1 point of value\r
+        */\r
+       private float computePixelSizeForVerticalSlider() {\r
+               return (getClientArea().height - 20f) / (this.maximum - this.minimum);\r
+       }\r
+\r
+       /**\r
+        * Draws the bars\r
+        * \r
+        * @param gc graphic context\r
+        */\r
+       private void drawBarsVertical(final GC gc) {\r
+               final Rectangle clientArea = this.getClientArea();\r
+               if (isEnabled()) {\r
+                       gc.setForeground(getForeground());\r
+               } else {\r
+                       gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_GRAY));\r
+               }\r
+\r
+               final float pixelSize = computePixelSizeForVerticalSlider();\r
+               for (int i = 1; i < 10; i++) {\r
+                       final int y = (int) (9 + pixelSize * (this.maximum - this.minimum) / 10 * i);\r
+                       gc.drawLine(4, y, 7, y);\r
+                       gc.drawLine(clientArea.width - 6, y, clientArea.width - 9, y);\r
+\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Draws a vertical knob\r
+        * \r
+        * @param gc graphic context\r
+        * @param value corresponding value\r
+        * @param upper if <code>true</code>, draws the upper knob. If\r
+        *            <code>false</code>, draws the lower knob\r
+        * @return the coordinate of the upper left corner of the knob\r
+        */\r
+       private Point drawVerticalKnob(final GC gc, final int value, final boolean upper) {\r
+               final float pixelSize = computePixelSizeForVerticalSlider();\r
+               final int y = (int) (pixelSize * value);\r
+\r
+               Image image;\r
+               if (upper) {\r
+                       if (this.upperHover) {\r
+                               image = this.dragInProgress ? this.vSliderDrag : this.vSliderHover;\r
+                       } else if (this.lastSelected == SELECTED_KNOB.UPPER) {\r
+                               image = this.vSliderSelected;\r
+                       } else {\r
+                               image = this.vSlider;\r
+                       }\r
+               } else {\r
+                       if (this.lowerHover) {\r
+                               image = this.dragInProgress ? this.vSliderDrag : this.vSliderHover;\r
+                       } else if (this.lastSelected == SELECTED_KNOB.LOWER) {\r
+                               image = this.vSliderSelected;\r
+                       } else {\r
+                               image = this.vSlider;\r
+                       }\r
+               }\r
+\r
+               if (isEnabled()) {\r
+                       gc.drawImage(image, getClientArea().width / 2 - 8, y + 2);\r
+               } else {\r
+                       final Image temp = new Image(getDisplay(), image, SWT.IMAGE_DISABLE);\r
+                       gc.drawImage(temp, getClientArea().width / 2 - 8, y + 2);\r
+                       temp.dispose();\r
+\r
+               }\r
+               return new Point(getClientArea().width / 2 - 8, y + 2);\r
+       }\r
+\r
+       /**\r
+        * Code executed when a key is typed\r
+        * \r
+        * @param event event\r
+        */\r
+       private void handleKeyDown(final Event event) {\r
+\r
+               boolean needRedraw = false;\r
+\r
+               if (this.lastSelected == SELECTED_KNOB.NONE) {\r
+                       this.lastSelected = SELECTED_KNOB.LOWER;\r
+               }\r
+\r
+               switch (event.keyCode) {\r
+               case SWT.HOME:\r
+                       if (this.lastSelected == SELECTED_KNOB.UPPER) {\r
+                               this.upperValue = this.minimum;\r
+                       } else {\r
+                               this.lowerValue = this.minimum;\r
+                       }\r
+                       needRedraw = true;\r
+                       break;\r
+               case SWT.END:\r
+                       if (this.lastSelected == SELECTED_KNOB.UPPER) {\r
+                               this.upperValue = this.maximum;\r
+                       } else {\r
+                               this.upperValue = this.maximum;\r
+                       }\r
+                       needRedraw = true;\r
+                       break;\r
+               case SWT.PAGE_UP:\r
+                       if (this.lastSelected == SELECTED_KNOB.UPPER) {\r
+                               this.upperValue += this.pageIncrement;\r
+                       } else {\r
+                               this.lowerValue += this.pageIncrement;\r
+                       }\r
+                       needRedraw = true;\r
+                       break;\r
+               case SWT.PAGE_DOWN:\r
+                       if (this.lastSelected == SELECTED_KNOB.UPPER) {\r
+                               this.upperValue -= this.pageIncrement;\r
+                       } else {\r
+                               this.lowerValue -= this.pageIncrement;\r
+                       }\r
+                       needRedraw = true;\r
+                       break;\r
+               case SWT.ARROW_LEFT:\r
+               case SWT.ARROW_UP:\r
+                       if (this.lastSelected == SELECTED_KNOB.UPPER) {\r
+                               this.upperValue -= this.increment;\r
+                       } else {\r
+                               this.lowerValue -= this.increment;\r
+                       }\r
+                       needRedraw = true;\r
+                       break;\r
+               case SWT.ARROW_RIGHT:\r
+               case SWT.ARROW_DOWN:\r
+                       if (this.lastSelected == SELECTED_KNOB.UPPER) {\r
+                               this.upperValue += this.increment;\r
+                       } else {\r
+                               this.lowerValue += this.increment;\r
+                       }\r
+                       needRedraw = true;\r
+                       break;\r
+        default:\r
+            break;\r
+               }\r
+\r
+               if (needRedraw) {\r
+                       if (this.lastSelected == SELECTED_KNOB.UPPER) {\r
+                               checkUpperValue();\r
+                       } else {\r
+                               checkLowerValue();\r
+                       }\r
+                       redraw();\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Adds the listener to the collection of listeners who will be notified\r
+        * when the user changes the receiver's value, by sending it one of the\r
+        * messages defined in the <code>SelectionListener</code> interface.\r
+        * <p>\r
+        * <code>widgetSelected</code> is called when the user changes the\r
+        * receiver's value. <code>widgetDefaultSelected</code> is not called.\r
+        * </p>\r
+        * \r
+        * @param listener the listener which should be notified\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see SelectionListener\r
+        * @see #removeSelectionListener\r
+        */\r
+       public void addSelectionListener(final SelectionListener listener) {\r
+               checkWidget();\r
+               this.listeners.add(listener);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Composite#computeSize(int, int, boolean)\r
+        */\r
+       @Override\r
+       public Point computeSize(final int wHint, final int hHint, final boolean changed) {\r
+               final int width, height;\r
+               checkWidget();\r
+               if (this.orientation == SWT.HORIZONTAL) {\r
+                       if (wHint < 100) {\r
+                               width = 100;\r
+                       } else {\r
+                               width = wHint;\r
+                       }\r
+\r
+                       if (hHint < 30) {\r
+                               height = 30;\r
+                       } else {\r
+                               height = hHint;\r
+                       }\r
+               } else {\r
+                       if (wHint < 30) {\r
+                               width = 30;\r
+                       } else {\r
+                               width = wHint;\r
+                       }\r
+\r
+                       if (hHint < 100) {\r
+                               height = 100;\r
+                       } else {\r
+                               height = hHint;\r
+                       }\r
+               }\r
+\r
+               return new Point(width, height);\r
+       }\r
+\r
+       /**\r
+        * Returns the amount that the selected receiver's value will be modified by\r
+        * when the up/down (or right/left) arrows are pressed.\r
+        * \r
+        * @return the increment\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public int getIncrement() {\r
+               checkWidget();\r
+               return this.increment;\r
+       }\r
+\r
+       /**\r
+        * Returns the 'lower selection', which is the lower receiver's position.\r
+        * \r
+        * @return the selection\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public int getLowerValue() {\r
+               checkWidget();\r
+               return this.lowerValue;\r
+       }\r
+\r
+       /**\r
+        * Returns the maximum value which the receiver will allow.\r
+        * \r
+        * @return the maximum\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public int getMaximum() {\r
+               checkWidget();\r
+               return this.maximum;\r
+       }\r
+\r
+       /**\r
+        * Returns the minimum value which the receiver will allow.\r
+        * \r
+        * @return the minimum\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public int getMinimum() {\r
+               checkWidget();\r
+               return this.minimum;\r
+       }\r
+\r
+       /**\r
+        * Returns the amount that the selected receiver's value will be modified by\r
+        * when the page increment/decrement areas are selected.\r
+        * \r
+        * @return the page increment\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public int getPageIncrement() {\r
+               checkWidget();\r
+               return this.pageIncrement;\r
+       }\r
+\r
+       /**\r
+        * Returns the 'selection', which is an array where the first element is the\r
+        * lower selection, and the second element is the upper selection\r
+        * \r
+        * @return the selection\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public int[] getSelection() {\r
+               checkWidget();\r
+               final int[] selection = new int[2];\r
+               selection[0] = this.lowerValue;\r
+               selection[1] = this.upperValue;\r
+               return selection;\r
+       }\r
+\r
+       /**\r
+        * Returns the 'upper selection', which is the upper receiver's position.\r
+        * \r
+        * @return the selection\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public int getUpperValue() {\r
+               checkWidget();\r
+               return this.upperValue;\r
+       }\r
+\r
+       /**\r
+        * Removes the listener from the collection of listeners who will be\r
+        * notified when the user changes the receiver's value.\r
+        * \r
+        * @param listener the listener which should no longer be notified\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see SelectionListener\r
+        * @see #addSelectionListener\r
+        */\r
+       public void removeSelectionListener(final SelectionListener listener) {\r
+               checkWidget();\r
+               this.listeners.remove(listener);\r
+       }\r
+\r
+       /**\r
+        * Sets the amount that the selected receiver's value will be modified by\r
+        * when the up/down (or right/left) arrows are pressed to the argument,\r
+        * which must be at least one.\r
+        * \r
+        * @param increment the new increment (must be greater than zero)\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setIncrement(final int increment) {\r
+               checkWidget();\r
+               this.increment = increment;\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * Sets the 'lower selection', which is the receiver's lower value, to the\r
+        * argument which must be greater than or equal to zero.\r
+        * \r
+        * @param value the new selection (must be zero or greater)\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setLowerValue(final int value) {\r
+               checkWidget();\r
+               if (this.minimum <= value && value <= this.maximum && value <= this.upperValue) {\r
+                       this.lowerValue = value;\r
+               }\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * Sets the maximum value that the receiver will allow. This new value will\r
+        * be ignored if it is not greater than the receiver's current minimum\r
+        * value. If the new maximum is applied then the receiver's selection value\r
+        * will be adjusted if necessary to fall within its new range.\r
+        * \r
+        * @param value the new maximum, which must be greater than the current\r
+        *            minimum\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setMaximum(final int value) {\r
+               checkWidget();\r
+               if (this.minimum <= value) {\r
+                       this.maximum = value;\r
+                       if (this.lowerValue >= this.maximum) {\r
+                               this.lowerValue = this.maximum;\r
+                       }\r
+                       if (this.upperValue >= this.maximum) {\r
+                               this.upperValue = this.maximum;\r
+                       }\r
+               }\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * Sets the minimum value that the receiver will allow. This new value will\r
+        * be ignored if it is negative or is not less than the receiver's current\r
+        * maximum value. If the new minimum is applied then the receiver's\r
+        * selection value will be adjusted if necessary to fall within its new\r
+        * range.\r
+        * \r
+        * @param value the new minimum, which must be nonnegative and less than the\r
+        *            current maximum\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setMinimum(final int value) {\r
+               checkWidget();\r
+               if (this.maximum >= value) {\r
+                       this.minimum = value;\r
+                       if (this.lowerValue <= this.minimum) {\r
+                               this.lowerValue = this.minimum;\r
+                       }\r
+                       if (this.upperValue <= this.minimum) {\r
+                               this.upperValue = this.minimum;\r
+                       }\r
+               }\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * Sets the amount that the receiver's value will be modified by when the\r
+        * page increment/decrement areas are selected to the argument, which must\r
+        * be at least one.\r
+        * \r
+        * @param pageIncrement the page increment (must be greater than zero)\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setPageIncrement(final int pageIncrement) {\r
+               checkWidget();\r
+               this.pageIncrement = pageIncrement;\r
+       }\r
+\r
+       /**\r
+        * Sets the 'selection', which is the receiver's value, to the argument\r
+        * which must be greater than or equal to zero.\r
+        * \r
+        * @param value the new selection (first value is lower value, second value\r
+        *            is upper value)\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setSelection(final int[] values) {\r
+               checkWidget();\r
+               setLowerValue(values[0]);\r
+               setUpperValue(values[1]);\r
+               checkUpperValue();\r
+               checkLowerValue();\r
+               redraw();\r
+       }\r
+\r
+       /**\r
+        * Sets the 'selection', which is the receiver's value, argument which must\r
+        * be greater than or equal to zero.\r
+        * \r
+        * @param lowerValue the new lower selection (must be zero or greater)\r
+        * @param upperValue the new upper selection (must be zero or greater)\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setSelection(final int lowerValue, final int upperValue) {\r
+               checkWidget();\r
+               setLowerValue(lowerValue);\r
+               setUpperValue(upperValue);\r
+       }\r
+\r
+       /**\r
+        * Sets the 'upper selection', which is the upper receiver's value, argument\r
+        * which must be greater than or equal to zero.\r
+        * \r
+        * @param value the new selection (must be zero or greater)\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setUpperValue(final int value) {\r
+               checkWidget();\r
+               if (this.minimum <= value && value <= this.maximum && value >= this.lowerValue) {\r
+                       this.upperValue = value;\r
+               }\r
+               redraw();\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/switchButton/SwitchButton.java b/org.tizen.common.externals/src/org/mihalis/opal/switchButton/SwitchButton.java
new file mode 100644 (file)
index 0000000..c3b0c3c
--- /dev/null
@@ -0,0 +1,938 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.switchButton;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.DisposeEvent;\r
+import org.eclipse.swt.events.DisposeListener;\r
+import org.eclipse.swt.events.MouseAdapter;\r
+import org.eclipse.swt.events.MouseEvent;\r
+import org.eclipse.swt.events.MouseTrackListener;\r
+import org.eclipse.swt.events.PaintEvent;\r
+import org.eclipse.swt.events.PaintListener;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.widgets.Canvas;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Event;\r
+\r
+/**\r
+ * Instances of this class are simple switch button.\r
+ * <dl>\r
+ * <dt><b>Styles:</b></dt>\r
+ * <dd>(none)</dd>\r
+ * <dt><b>Events:</b></dt>\r
+ * <dd>Selection</dd>\r
+ * </dl>\r
+ */\r
+public class SwitchButton extends Canvas {\r
+\r
+       /**\r
+        * Selection\r
+        */\r
+       private boolean selection;\r
+\r
+       /**\r
+        * Text displayed for the selected value (default = "On")\r
+        */\r
+       private String textForSelect;\r
+\r
+       /**\r
+        * Text displayed for the unselected value (default = "Off")\r
+        */\r
+       private String textForUnselect;\r
+\r
+       /**\r
+        * Text corresponding to the button (default is "")\r
+        */\r
+       private String text;\r
+\r
+       /**\r
+        * If true, display round rectangles instead of rectangles (default value is\r
+        * true)\r
+        */\r
+       private boolean round;\r
+\r
+       /**\r
+        * if not null, displays a rectangle (or a round rectangle) around the whole\r
+        * widget. Default value is null.\r
+        */\r
+       private Color borderColor;\r
+\r
+       /**\r
+        * if not null, displays a glow effect when the mouse is over the widget.\r
+        * Default value is null.\r
+        */\r
+       private Color focusColor;\r
+\r
+       /**\r
+        * Colors when the button is selected\r
+        */\r
+       private Color selectedForegroundColor, selectedBackgroundColor;\r
+\r
+       /**\r
+        * Colors when the button is not selected\r
+        */\r
+       private Color unselectedForegroundColor, unselectedBackgroundColor;\r
+\r
+       /**\r
+        * Colors for the button\r
+        */\r
+       private Color buttonBorderColor, buttonBackgroundColor1, buttonBackgroundColor2;\r
+\r
+       /**\r
+        * Gap between the button and the text (default value is 5)\r
+        */\r
+       private int gap;\r
+\r
+       /**\r
+        * Margin inside the button\r
+        */\r
+       private static final int INSIDE_BUTTON_MARGIN = 5;\r
+\r
+       /**\r
+        * Graphical context for this button\r
+        */\r
+       private GC gc;\r
+\r
+       /**\r
+        * List of selection listeners\r
+        */\r
+       private final List<SelectionListener> listOfSelectionListeners;\r
+\r
+       /**\r
+        * True when the mouse entered the widget\r
+        */\r
+       private boolean mouseInside;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a composite control which will be the parent of the new\r
+        *            instance (cannot be null)\r
+        * @param style the style of control to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        */\r
+       public SwitchButton(final Composite parent, final int style) {\r
+               super(parent, style | SWT.DOUBLE_BUFFERED);\r
+\r
+               this.selection = false;\r
+               this.textForSelect = "On";\r
+               this.textForUnselect = "Off";\r
+               this.round = true;\r
+               this.borderColor = null;\r
+               this.focusColor = this.getDisplay().getSystemColor(SWT.COLOR_YELLOW);\r
+               this.selectedForegroundColor = this.getDisplay().getSystemColor(SWT.COLOR_WHITE);\r
+               this.selectedBackgroundColor = new Color(this.getDisplay(), 0, 112, 195);\r
+               this.unselectedForegroundColor = this.getDisplay().getSystemColor(SWT.COLOR_BLACK);\r
+               this.unselectedBackgroundColor = new Color(this.getDisplay(), 203, 203, 203);\r
+\r
+               this.buttonBorderColor = new Color(this.getDisplay(), 96, 96, 96);\r
+               this.buttonBackgroundColor1 = new Color(this.getDisplay(), 254, 254, 254);\r
+               this.buttonBackgroundColor2 = new Color(this.getDisplay(), 192, 192, 192);\r
+\r
+               this.gap = 5;\r
+\r
+               this.listOfSelectionListeners = new ArrayList<SelectionListener>();\r
+\r
+               this.addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent e) {\r
+                               SwitchButton.this.selectedBackgroundColor.dispose();\r
+                               SwitchButton.this.unselectedBackgroundColor.dispose();\r
+                               SwitchButton.this.buttonBorderColor.dispose();\r
+                               SwitchButton.this.buttonBackgroundColor1.dispose();\r
+                               SwitchButton.this.buttonBackgroundColor2.dispose();\r
+                       }\r
+               });\r
+\r
+               this.addPaintListener(new PaintListener() {\r
+                       @Override\r
+                       public void paintControl(final PaintEvent event) {\r
+                               SwitchButton.this.onPaint(event);\r
+                       }\r
+               });\r
+\r
+               this.addMouseListener(new MouseAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.MouseAdapter#mouseUp(org.eclipse.swt.events.MouseEvent)\r
+                        */\r
+                       @Override\r
+                       public void mouseUp(final MouseEvent e) {\r
+                               if (SwitchButton.this.fireSelectionListeners(e)) {\r
+                                       SwitchButton.this.selection = !SwitchButton.this.selection;\r
+                                       SwitchButton.this.redraw();\r
+                               }\r
+                       }\r
+\r
+               });\r
+\r
+               this.mouseInside = false;\r
+               this.addMouseTrackListener(new MouseTrackListener() {\r
+\r
+                       @Override\r
+                       public void mouseHover(final MouseEvent e) {\r
+                               SwitchButton.this.mouseInside = true;\r
+                               SwitchButton.this.redraw();\r
+                       }\r
+\r
+                       @Override\r
+                       public void mouseExit(final MouseEvent e) {\r
+                               SwitchButton.this.mouseInside = false;\r
+                               SwitchButton.this.redraw();\r
+                       }\r
+\r
+                       @Override\r
+                       public void mouseEnter(final MouseEvent e) {\r
+                               SwitchButton.this.mouseInside = true;\r
+                               SwitchButton.this.redraw();\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Paint the widget\r
+        * \r
+        * @param event paint event\r
+        */\r
+       private void onPaint(final PaintEvent event) {\r
+               final Rectangle rect = this.getClientArea();\r
+               if (rect.width == 0 || rect.height == 0) {\r
+                       return;\r
+               }\r
+               this.gc = event.gc;\r
+               this.gc.setAntialias(SWT.ON);\r
+\r
+               final Point buttonSize = this.computeButtonSize();\r
+               this.drawSwitchButton(buttonSize);\r
+               this.drawText(buttonSize);\r
+\r
+               if (this.borderColor != null) {\r
+                       this.drawBorder();\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Draw the switch button\r
+        * \r
+        * @param buttonSize size of the button\r
+        */\r
+       private void drawSwitchButton(final Point buttonSize) {\r
+               // Draw the background of the button\r
+               this.gc.setForeground(this.buttonBorderColor);\r
+               if (this.round) {\r
+                       this.gc.drawRoundRectangle(2, 2, buttonSize.x, buttonSize.y, 3, 3);\r
+               } else {\r
+                       this.gc.drawRectangle(2, 2, buttonSize.x, buttonSize.y);\r
+               }\r
+\r
+               this.drawRightPart(buttonSize);\r
+               this.drawLeftPart(buttonSize);\r
+               this.gc.setClipping(this.getClientArea());\r
+               this.drawToggleButton(buttonSize);\r
+       }\r
+\r
+       /**\r
+        * Draw the right part of the button\r
+        * \r
+        * @param buttonSize size of the button\r
+        */\r
+       private void drawRightPart(final Point buttonSize) {\r
+               this.gc.setForeground(this.selectedBackgroundColor);\r
+               this.gc.setBackground(this.selectedBackgroundColor);\r
+               this.gc.setClipping(3, 3, buttonSize.x / 2, buttonSize.y - 1);\r
+               if (this.round) {\r
+                       this.gc.fillRoundRectangle(2, 2, buttonSize.x, buttonSize.y, 3, 3);\r
+               } else {\r
+                       this.gc.fillRectangle(2, 2, buttonSize.x, buttonSize.y);\r
+               }\r
+               this.gc.setForeground(this.selectedForegroundColor);\r
+               final Point textSize = this.gc.textExtent(this.textForSelect);\r
+               this.gc.drawString(this.textForSelect, (buttonSize.x / 2 - textSize.x) / 2 + 3, (buttonSize.y - textSize.y) / 2 + 3);\r
+       }\r
+\r
+       /**\r
+        * Draw the left part of the button\r
+        * \r
+        * @param buttonSize size of the button\r
+        */\r
+       private void drawLeftPart(final Point buttonSize) {\r
+               this.gc.setForeground(this.unselectedBackgroundColor);\r
+               this.gc.setBackground(this.unselectedBackgroundColor);\r
+               this.gc.setClipping(buttonSize.x / 2 + 3, 3, buttonSize.x / 2, buttonSize.y - 1);\r
+               if (this.round) {\r
+                       this.gc.fillRoundRectangle(2, 2, buttonSize.x, buttonSize.y, 3, 3);\r
+               } else {\r
+                       this.gc.fillRectangle(2, 2, buttonSize.x, buttonSize.y);\r
+               }\r
+               this.gc.setForeground(this.unselectedForegroundColor);\r
+               final Point textSize = this.gc.textExtent(this.textForUnselect);\r
+\r
+               this.gc.drawString(this.textForUnselect, buttonSize.x / 2 + (buttonSize.x / 2 - textSize.x) / 2 + 3, (buttonSize.y - textSize.y) / 2 + 3);\r
+       }\r
+\r
+       /**\r
+        * Draw the toggle button\r
+        * \r
+        * @param buttonSize size of the button\r
+        */\r
+       private void drawToggleButton(final Point buttonSize) {\r
+               this.gc.setForeground(this.buttonBackgroundColor1);\r
+               this.gc.setBackground(this.buttonBackgroundColor2);\r
+               if (this.selection) {\r
+                       this.gc.fillGradientRectangle(3, 3, buttonSize.x / 2, buttonSize.y, true);\r
+               } else {\r
+                       this.gc.fillGradientRectangle(buttonSize.x / 2, 3, buttonSize.x / 2 + 2, buttonSize.y - 1, true);\r
+               }\r
+\r
+               this.gc.setForeground(this.buttonBorderColor);\r
+               if (this.selection) {\r
+                       this.gc.drawRoundRectangle(2, 2, buttonSize.x / 2, buttonSize.y, 3, 3);\r
+               } else {\r
+                       this.gc.drawRoundRectangle(buttonSize.x / 2, 2, buttonSize.x / 2 + 2, buttonSize.y, 3, 3);\r
+               }\r
+\r
+               if (this.focusColor != null && this.mouseInside) {\r
+                       this.gc.setForeground(this.focusColor);\r
+                       this.gc.setLineWidth(2);\r
+                       if (this.selection) {\r
+                               this.gc.drawRoundRectangle(3, 3, buttonSize.x / 2, buttonSize.y - 1, 3, 3);\r
+                       } else {\r
+                               this.gc.drawRoundRectangle(buttonSize.x / 2 + 1, 3, buttonSize.x / 2, buttonSize.y - 2, 3, 3);\r
+                       }\r
+                       this.gc.setLineWidth(1);\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * @return the button size\r
+        */\r
+       private Point computeButtonSize() {\r
+               // Compute size for the left part\r
+               final Point sizeForLeftPart = this.gc.stringExtent(this.textForSelect);\r
+               // Compute size for the right part\r
+               final Point sizeForRightPart = this.gc.stringExtent(this.textForUnselect);\r
+\r
+               // Compute whole size\r
+               final int width = Math.max(sizeForLeftPart.x, sizeForRightPart.x) * 2 + 2 * INSIDE_BUTTON_MARGIN;\r
+               final int height = Math.max(sizeForLeftPart.y, sizeForRightPart.y) + 2 * INSIDE_BUTTON_MARGIN;\r
+\r
+               return new Point(width, height);\r
+       }\r
+\r
+       /**\r
+        * Draws the text besides the button\r
+        * \r
+        * @param buttonSize whole size of the button\r
+        */\r
+       private void drawText(final Point buttonSize) {\r
+               this.gc.setForeground(this.getForeground());\r
+               this.gc.setBackground(this.getBackground());\r
+\r
+               final int widgetHeight = this.computeSize(0, 0, true).y;\r
+               final int textHeight = this.gc.stringExtent(this.text).y;\r
+               final int x = 2 + buttonSize.x + this.gap;\r
+\r
+               this.gc.drawString(this.text, x, (widgetHeight - textHeight) / 2);\r
+       }\r
+\r
+       /**\r
+        * Draw (eventually) the border around the button\r
+        */\r
+       private void drawBorder() {\r
+               if (this.borderColor == null) {\r
+                       return;\r
+               }\r
+\r
+               this.gc.setForeground(this.borderColor);\r
+               final Point temp = this.computeSize(0, 0, false);\r
+               if (this.round) {\r
+                       this.gc.drawRoundRectangle(0, 0, temp.x - 2, temp.y - 2, 3, 3);\r
+               } else {\r
+                       this.gc.drawRectangle(0, 0, temp.x - 2, temp.y - 2);\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Fire the selection listeners\r
+        * \r
+        * @param mouseEvent mouse event\r
+        * @return true if the selection could be changed, false otherwise\r
+        */\r
+       private boolean fireSelectionListeners(final MouseEvent mouseEvent) {\r
+               for (final SelectionListener listener : this.listOfSelectionListeners) {\r
+                       final Event event = new Event();\r
+\r
+                       event.button = mouseEvent.button;\r
+                       event.display = this.getDisplay();\r
+                       event.item = null;\r
+                       event.widget = this;\r
+                       event.data = null;\r
+                       event.time = mouseEvent.time;\r
+                       event.x = mouseEvent.x;\r
+                       event.y = mouseEvent.y;\r
+\r
+                       final SelectionEvent selEvent = new SelectionEvent(event);\r
+                       listener.widgetSelected(selEvent);\r
+                       if (!selEvent.doit) {\r
+                               return false;\r
+                       }\r
+               }\r
+               return true;\r
+       }\r
+\r
+       /**\r
+        * Adds the listener to the collection of listeners who will be notified\r
+        * when the control is selected by the user, by sending it one of the\r
+        * messages defined in the <code>SelectionListener</code> interface.\r
+        * <p>\r
+        * <code>widgetSelected</code> is called when the control is selected by the\r
+        * user. <code>widgetDefaultSelected</code> is not called.\r
+        * </p>\r
+        * \r
+        * @param listener the listener which should be notified\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see SelectionListener\r
+        * @see #removeSelectionListener\r
+        * @see SelectionEvent\r
+        */\r
+       public void addSelectionListener(final SelectionListener listener) {\r
+               this.checkWidget();\r
+               if (listener == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               this.listOfSelectionListeners.add(listener);\r
+       }\r
+\r
+       /**\r
+        * Removes the listener from the collection of listeners who will be\r
+        * notified when the control is selected by the user.\r
+        * \r
+        * @param listener the listener which should no longer be notified\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        * \r
+        * @see SelectionListener\r
+        * @see #addSelectionListener\r
+        */\r
+       public void removeSelectionListener(final SelectionListener listener) {\r
+               this.checkWidget();\r
+               if (listener == null) {\r
+                       SWT.error(SWT.ERROR_NULL_ARGUMENT);\r
+               }\r
+               this.listOfSelectionListeners.remove(listener);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Composite#computeSize(int, int, boolean)\r
+        */\r
+       @Override\r
+       public Point computeSize(final int wHint, final int hHint, final boolean changed) {\r
+               this.checkWidget();\r
+               boolean disposeGC = false;\r
+               if (this.gc == null) {\r
+                       this.gc = new GC(this);\r
+                       disposeGC = true;\r
+               }\r
+\r
+               final Point buttonSize = this.computeButtonSize();\r
+               int width = buttonSize.x;\r
+               int height = buttonSize.y;\r
+\r
+               if (this.text != null && this.text.trim().length() > 0) {\r
+                       final Point textSize = this.gc.textExtent(this.text);\r
+                       width += textSize.x + this.gap + 1;\r
+               }\r
+\r
+               width += 4;\r
+               height += 6;\r
+\r
+               if (disposeGC) {\r
+                       this.gc.dispose();\r
+               }\r
+\r
+               return new Point(width, height);\r
+       }\r
+\r
+       /**\r
+        * @return the selection state of the button\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public boolean getSelection() {\r
+               this.checkWidget();\r
+               return this.selection;\r
+       }\r
+\r
+       /**\r
+        * @param selection the selection state of the button\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setSelection(final boolean selection) {\r
+               this.checkWidget();\r
+               this.selection = selection;\r
+       }\r
+\r
+       /**\r
+        * @return the text used to display the selection\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public String getTextForSelect() {\r
+               this.checkWidget();\r
+               return this.textForSelect;\r
+       }\r
+\r
+       /**\r
+        * @param textForSelect the text used to display the selection\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setTextForSelect(final String textForSelect) {\r
+               this.checkWidget();\r
+               this.textForSelect = textForSelect;\r
+       }\r
+\r
+       /**\r
+        * @return the text used to display the unselected option\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public String getTextForUnselect() {\r
+               this.checkWidget();\r
+               return this.textForUnselect;\r
+       }\r
+\r
+       /**\r
+        * @param textForUnselect the text used to display the unselected option\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setTextForUnselect(final String textForUnselect) {\r
+               this.checkWidget();\r
+               this.textForUnselect = textForUnselect;\r
+       }\r
+\r
+       /**\r
+        * @return the text displayed in the widget\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public String getText() {\r
+               this.checkWidget();\r
+               return this.text;\r
+       }\r
+\r
+       /**\r
+        * @param the text displayed in the widget\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setText(final String text) {\r
+               this.checkWidget();\r
+               this.text = text;\r
+       }\r
+\r
+       /**\r
+        * @return the round flag\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public boolean isRound() {\r
+               this.checkWidget();\r
+               return this.round;\r
+       }\r
+\r
+       /**\r
+        * @param round the round flag to set. If true, the widget is composed of\r
+        *            round rectangle instead of rectangles\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setRound(final boolean round) {\r
+               this.checkWidget();\r
+               this.round = round;\r
+       }\r
+\r
+       /**\r
+        * @return the border's color. If null, no border is displayed\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Color getBorderColor() {\r
+               this.checkWidget();\r
+               return this.borderColor;\r
+       }\r
+\r
+       /**\r
+        * @param borderColor the border's color. If null, no border is displayed.\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setBorderColor(final Color borderColor) {\r
+               this.checkWidget();\r
+               this.borderColor = borderColor;\r
+       }\r
+\r
+       /**\r
+        * @return the focus color. If null, no focus effect is displayed.\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Color getFocusColor() {\r
+               this.checkWidget();\r
+               return this.focusColor;\r
+       }\r
+\r
+       /**\r
+        * @param focusColor the focus color to set. If null, no focus effect is\r
+        *            displayed.\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setFocusColor(final Color focusColor) {\r
+               this.checkWidget();\r
+               this.focusColor = focusColor;\r
+       }\r
+\r
+       /**\r
+        * @return the foreground color of the left part of the widget (selection is\r
+        *         on)\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Color getSelectedForegroundColor() {\r
+               this.checkWidget();\r
+               return this.selectedForegroundColor;\r
+       }\r
+\r
+       /**\r
+        * @param the foreground color of the left part of the widget (selection is\r
+        *            on)\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setSelectedForegroundColor(final Color selectedForegroundColor) {\r
+               this.checkWidget();\r
+               this.selectedForegroundColor = selectedForegroundColor;\r
+       }\r
+\r
+       /**\r
+        * @return the background color of the left part of the widget (selection is\r
+        *         on)\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Color getSelectedBackgroundColor() {\r
+               this.checkWidget();\r
+               return this.selectedBackgroundColor;\r
+       }\r
+\r
+       /**\r
+        * @param the background color of the left part of the widget (selection is\r
+        *            on)\r
+        */\r
+       public void setSelectedBackgroundColor(final Color selectedBackgroundColor) {\r
+               this.checkWidget();\r
+               this.selectedBackgroundColor = selectedBackgroundColor;\r
+       }\r
+\r
+       /**\r
+        * @return the foreground color of the left part of the widget (selection is\r
+        *         on)\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Color getUnselectedForegroundColor() {\r
+               this.checkWidget();\r
+               return this.unselectedForegroundColor;\r
+       }\r
+\r
+       /**\r
+        * @param unselectedForegroundColor the foreground color of the left part of\r
+        *            the widget (selection is on)\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setUnselectedForegroundColor(final Color unselectedForegroundColor) {\r
+               this.checkWidget();\r
+               this.unselectedForegroundColor = unselectedForegroundColor;\r
+       }\r
+\r
+       /**\r
+        * @return the background color of the left part of the widget (selection is\r
+        *         on)\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Color getUnselectedBackgroundColor() {\r
+               this.checkWidget();\r
+               return this.unselectedBackgroundColor;\r
+       }\r
+\r
+       /**\r
+        * @param unselectedBackgroundColor the background color of the left part of\r
+        *            the widget (selection is on)\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setUnselectedBackgroundColor(final Color unselectedBackgroundColor) {\r
+               this.checkWidget();\r
+               this.unselectedBackgroundColor = unselectedBackgroundColor;\r
+       }\r
+\r
+       /**\r
+        * @return the border color of the switch button\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Color getButtonBorderColor() {\r
+               this.checkWidget();\r
+               return this.buttonBorderColor;\r
+       }\r
+\r
+       /**\r
+        * @param buttonBorderColor the border color of the switch button\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setButtonBorderColor(final Color buttonBorderColor) {\r
+               this.checkWidget();\r
+               this.buttonBorderColor = buttonBorderColor;\r
+       }\r
+\r
+       /**\r
+        * @return the first color of the toggle button\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Color getButtonBackgroundColor1() {\r
+               this.checkWidget();\r
+               return this.buttonBackgroundColor1;\r
+       }\r
+\r
+       /**\r
+        * @param buttonBackgroundColor1 the first color of the toggle button\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setButtonBackgroundColor1(final Color buttonBackgroundColor1) {\r
+               this.checkWidget();\r
+               this.buttonBackgroundColor1 = buttonBackgroundColor1;\r
+       }\r
+\r
+       /**\r
+        * @return the second color of the toggle button\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Color getButtonBackgroundColor2() {\r
+               this.checkWidget();\r
+               return this.buttonBackgroundColor2;\r
+       }\r
+\r
+       /**\r
+        * @param buttonBackgroundColor2 the second color of the toggle button\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setButtonBackgroundColor2(final Color buttonBackgroundColor2) {\r
+               this.checkWidget();\r
+               this.buttonBackgroundColor2 = buttonBackgroundColor2;\r
+       }\r
+\r
+       /**\r
+        * @return the gap value\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public int getGap() {\r
+               this.checkWidget();\r
+               return this.gap;\r
+       }\r
+\r
+       /**\r
+        * @param gap the gap value to set\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setGap(final int gap) {\r
+               this.checkWidget();\r
+               this.gap = gap;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/textAssist/TextAssist.java b/org.tizen.common.externals/src/org/mihalis/opal/textAssist/TextAssist.java
new file mode 100755 (executable)
index 0000000..08bcebc
--- /dev/null
@@ -0,0 +1,694 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     IBM Corporation - initial API and implementation (Snippet 320)\r
+ *     Laurent CARON (laurent.caron@gmail.com) - Make a widget from the snippet\r
+ *******************************************************************************/\r
+package org.mihalis.opal.textAssist;\r
+\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.events.ModifyListener;\r
+import org.eclipse.swt.events.SelectionListener;\r
+import org.eclipse.swt.events.VerifyListener;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.layout.FillLayout;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Shell;\r
+import org.eclipse.swt.widgets.Table;\r
+import org.eclipse.swt.widgets.TableItem;\r
+import org.eclipse.swt.widgets.Text;\r
+import org.eclipse.swt.widgets.Widget;\r
+\r
+/**\r
+ * Instances of this class are selectable user interface objects that allow the\r
+ * user to enter and modify text. The difference with the Text widget is that\r
+ * when the user types something, some propositions are displayed.\r
+ * \r
+ * @see org.eclipse.swt.widgets.Text\r
+ */\r
+public class TextAssist extends Composite {\r
+\r
+       private final Text text;\r
+       private final Shell popup;\r
+       private final Table table;\r
+       private TextAssistContentProvider contentProvider;\r
+       private int numberOfLines;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a composite control which will be the parent of the new\r
+        *            instance (cannot be null)\r
+        * @param style the style of control to construct\r
+        * @param contentProvider the content provider\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                <li>ERROR_INVALID_SUBCLASS - if this class is not an\r
+        *                allowed subclass</li>\r
+        *                </ul>\r
+        * \r
+        * @see SWT#SINGLE\r
+        * @see SWT#MULTI\r
+        * @see SWT#READ_ONLY\r
+        * @see SWT#WRAP\r
+        * @see SWT#LEFT\r
+        * @see SWT#RIGHT\r
+        * @see SWT#CENTER\r
+        * @see SWT#PASSWORD\r
+        * @see SWT#SEARCH\r
+        * @see SWT#ICON_SEARCH\r
+        * @see SWT#ICON_CANCEL\r
+        * @see Widget#checkSubclass\r
+        * @see Widget#getStyle\r
+        */\r
+       public TextAssist(final Composite parent, final int style, final TextAssistContentProvider contentProvider) {\r
+               super(parent, style);\r
+               this.contentProvider = contentProvider;\r
+               this.contentProvider.setTextAssist(this);\r
+\r
+               this.setLayout(new FillLayout());\r
+               this.numberOfLines = 10;\r
+               this.text = new Text(this, style);\r
+               this.popup = new Shell(this.getDisplay(), SWT.ON_TOP);\r
+               this.popup.setLayout(new FillLayout());\r
+               this.table = new Table(this.popup, SWT.SINGLE);\r
+\r
+               this.text.addListener(SWT.KeyDown, createKeyDownListener());\r
+               this.text.addListener(SWT.Modify, createModifyListener());\r
+               this.text.addListener(SWT.FocusOut, createFocusOutListener());\r
+\r
+               this.table.addListener(SWT.DefaultSelection, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               TextAssist.this.text.setText(TextAssist.this.table.getSelection()[0].getText());\r
+                               TextAssist.this.popup.setVisible(false);\r
+                       }\r
+               });\r
+               this.table.addListener(SWT.KeyDown, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               if (event.keyCode == SWT.ESC) {\r
+                                       TextAssist.this.popup.setVisible(false);\r
+                               }\r
+                       }\r
+               });\r
+\r
+               this.table.addListener(SWT.FocusOut, createFocusOutListener());\r
+\r
+               getShell().addListener(SWT.Move, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               TextAssist.this.popup.setVisible(false);\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * @return a listener for the keydown event\r
+        */\r
+       private Listener createKeyDownListener() {\r
+               return new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               switch (event.keyCode) {\r
+                               case SWT.ARROW_DOWN:\r
+                                       int index = (TextAssist.this.table.getSelectionIndex() + 1) % TextAssist.this.table.getItemCount();\r
+                                       TextAssist.this.table.setSelection(index);\r
+                                       event.doit = false;\r
+                                       break;\r
+                               case SWT.ARROW_UP:\r
+                                       index = TextAssist.this.table.getSelectionIndex() - 1;\r
+                                       if (index < 0) {\r
+                                               index = TextAssist.this.table.getItemCount() - 1;\r
+                                       }\r
+                                       TextAssist.this.table.setSelection(index);\r
+                                       event.doit = false;\r
+                                       break;\r
+                               case SWT.CR:\r
+                                       if (TextAssist.this.popup.isVisible() && TextAssist.this.table.getSelectionIndex() != -1) {\r
+                                               TextAssist.this.text.setText(TextAssist.this.table.getSelection()[0].getText());\r
+                                               TextAssist.this.popup.setVisible(false);\r
+                                       }\r
+                                       break;\r
+                               case SWT.ESC:\r
+                                       TextAssist.this.popup.setVisible(false);\r
+                                       break;\r
+                                       \r
+                               default:\r
+                                   break;\r
+                               }\r
+                       }\r
+               };\r
+       }\r
+\r
+       /**\r
+        * @return a listener for the modify event\r
+        */\r
+       private Listener createModifyListener() {\r
+               return new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               final String string = TextAssist.this.text.getText();\r
+                               if (string.length() == 0) {\r
+                                       TextAssist.this.popup.setVisible(false);\r
+                                       return;\r
+                               }\r
+\r
+                               List<String> values = TextAssist.this.contentProvider.getContent(string);\r
+                               if (values == null || values.isEmpty()) {\r
+                                       TextAssist.this.popup.setVisible(false);\r
+                                       return;\r
+                               }\r
+\r
+                               if (values.size() > TextAssist.this.numberOfLines) {\r
+                                       values = values.subList(0, TextAssist.this.numberOfLines);\r
+                               }\r
+\r
+                               TextAssist.this.table.removeAll();\r
+                               final int numberOfRows = Math.min(values.size(), TextAssist.this.numberOfLines);\r
+                               for (int i = 0; i < numberOfRows; i++) {\r
+                                       final TableItem tableItem = new TableItem(TextAssist.this.table, SWT.NONE);\r
+                                       tableItem.setText(values.get(i));\r
+                               }\r
+\r
+                               final Point point = TextAssist.this.text.toDisplay(TextAssist.this.text.getLocation().x, TextAssist.this.text.getSize().y + TextAssist.this.text.getBorderWidth() - 3);\r
+                               int x = point.x;\r
+                               int y = point.y;\r
+\r
+                               final Rectangle displayRect = getMonitor().getClientArea();\r
+                               final Rectangle parentRect = getDisplay().map(getParent(), null, getBounds());\r
+                               TextAssist.this.popup.pack();\r
+                               final int width = TextAssist.this.popup.getBounds().width;\r
+                               final int height = TextAssist.this.popup.getBounds().height;\r
+\r
+                               if (y + height > displayRect.y + displayRect.height) {\r
+                                       y = parentRect.y - height;\r
+                               }\r
+                               if (x + width > displayRect.x + displayRect.width) {\r
+                                       x = displayRect.x + displayRect.width - width;\r
+                               }\r
+\r
+                               TextAssist.this.popup.setLocation(x, y);\r
+                               TextAssist.this.popup.setVisible(true);\r
+\r
+                       }\r
+               };\r
+       }\r
+\r
+       /**\r
+        * @return a listener for the FocusOut event\r
+        */\r
+       private Listener createFocusOutListener() {\r
+               return new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               /* async is needed to wait until focus reaches its new Control */\r
+                               TextAssist.this.getDisplay().asyncExec(new Runnable() {\r
+                                       @Override\r
+                                       public void run() {\r
+                                               if (TextAssist.this.getDisplay().isDisposed()) {\r
+                                                       return;\r
+                                               }\r
+                                               final Control control = TextAssist.this.getDisplay().getFocusControl();\r
+                                               if (control == null || control != TextAssist.this.text && control != TextAssist.this.table) {\r
+                                                       TextAssist.this.popup.setVisible(false);\r
+                                               }\r
+                                       }\r
+                               });\r
+                       }\r
+               };\r
+       }\r
+\r
+       /**\r
+        * @return the contentProvider\r
+        */\r
+       public TextAssistContentProvider getContentProvider() {\r
+               checkWidget();\r
+               return this.contentProvider;\r
+       }\r
+\r
+       /**\r
+        * @param contentProvider the contentProvider to set\r
+        */\r
+       public void setContentProvider(final TextAssistContentProvider contentProvider) {\r
+               checkWidget();\r
+               this.contentProvider = contentProvider;\r
+       }\r
+\r
+       /**\r
+        * @return the numberOfLines\r
+        */\r
+       public int getNumberOfLines() {\r
+               checkWidget();\r
+               return this.numberOfLines;\r
+       }\r
+\r
+       /**\r
+        * @param numberOfLines the numberOfLines to set\r
+        */\r
+       public void setNumberOfLines(final int numberOfLines) {\r
+               checkWidget();\r
+               this.numberOfLines = numberOfLines;\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#addModifyListener(org.eclipse.swt.events.ModifyListener)\r
+        */\r
+       public void addModifyListener(final ModifyListener listener) {\r
+               checkWidget();\r
+               this.text.addModifyListener(listener);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#addSelectionListener(org.eclipse.swt.events.SelectionListener)\r
+        */\r
+       public void addSelectionListener(final SelectionListener listener) {\r
+               checkWidget();\r
+               this.text.addSelectionListener(listener);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#addVerifyListener(org.eclipse.swt.events.VerifyListener)\r
+        */\r
+       public void addVerifyListener(final VerifyListener listener) {\r
+               checkWidget();\r
+               this.text.addVerifyListener(listener);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#append(java.lang.String)\r
+        */\r
+       public void append(final String string) {\r
+               checkWidget();\r
+               this.text.append(string);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#clearSelection()\r
+        */\r
+       public void clearSelection() {\r
+               checkWidget();\r
+               this.text.clearSelection();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#computeSize(int, int, boolean)\r
+        */\r
+       @Override\r
+       public Point computeSize(final int wHint, final int hHint, final boolean changed) {\r
+               checkWidget();\r
+               return this.text.computeSize(wHint, hHint, changed);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#computeTrim(int, int, int, int)\r
+        */\r
+       @Override\r
+       public Rectangle computeTrim(final int x, final int y, final int width, final int height) {\r
+               checkWidget();\r
+               return super.computeTrim(x, y, width, height);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#copy()\r
+        */\r
+       public void copy() {\r
+               checkWidget();\r
+               this.text.copy();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#cut()\r
+        */\r
+       public void cut() {\r
+               checkWidget();\r
+               this.text.cut();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getCaretLineNumber()\r
+        */\r
+       public int getCaretLineNumber() {\r
+               checkWidget();\r
+               return this.text.getCaretLineNumber();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getCaretLocation()\r
+        */\r
+       public Point getCaretLocation() {\r
+               checkWidget();\r
+               return this.text.getCaretLocation();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getCaretPosition()\r
+        */\r
+       public int getCaretPosition() {\r
+               checkWidget();\r
+               return this.text.getCaretPosition();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getCharCount()\r
+        */\r
+       public int getCharCount() {\r
+               checkWidget();\r
+               return this.text.getCharCount();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getDoubleClickEnabled()\r
+        */\r
+       public boolean getDoubleClickEnabled() {\r
+               checkWidget();\r
+               return this.text.getDoubleClickEnabled();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getEchoChar()\r
+        */\r
+       public char getEchoChar() {\r
+               checkWidget();\r
+               return this.text.getEchoChar();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getEditable()\r
+        */\r
+       public boolean getEditable() {\r
+               checkWidget();\r
+               return this.text.getEditable();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getLineCount()\r
+        */\r
+       public int getLineCount() {\r
+               checkWidget();\r
+               return this.text.getLineCount();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getLineDelimiter()\r
+        */\r
+       public String getLineDelimiter() {\r
+               checkWidget();\r
+               return this.text.getLineDelimiter();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getLineHeight()\r
+        */\r
+       public int getLineHeight() {\r
+               checkWidget();\r
+               return this.text.getLineHeight();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getMessage()\r
+        */\r
+       public String getMessage() {\r
+               checkWidget();\r
+               return this.text.getMessage();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getOrientation()\r
+        */\r
+       public int getOrientation() {\r
+               checkWidget();\r
+               return this.text.getOrientation();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getSelection()\r
+        */\r
+       public Point getSelection() {\r
+               checkWidget();\r
+               return this.text.getSelection();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getSelectionCount()\r
+        */\r
+       public int getSelectionCount() {\r
+               checkWidget();\r
+               return this.text.getSelectionCount();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getSelectionText()\r
+        */\r
+       public String getSelectionText() {\r
+               checkWidget();\r
+               return this.text.getSelectionText();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getTabs()\r
+        */\r
+       public int getTabs() {\r
+               checkWidget();\r
+               return this.text.getTabs();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getText()\r
+        */\r
+       public String getText() {\r
+               checkWidget();\r
+               return this.text.getText();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getText(int, int)\r
+        */\r
+       public String getText(final int start, final int end) {\r
+               checkWidget();\r
+               return this.text.getText(start, end);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getTextLimit()\r
+        */\r
+       public int getTextLimit() {\r
+               checkWidget();\r
+               return this.text.getTextLimit();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getTopIndex()\r
+        */\r
+       public int getTopIndex() {\r
+               checkWidget();\r
+               return this.text.getTopIndex();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#getTopPixel()\r
+        */\r
+       public int getTopPixel() {\r
+               checkWidget();\r
+               return this.text.getTopPixel();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#insert(java.lang.String)\r
+        */\r
+       public void insert(final String string) {\r
+               checkWidget();\r
+               this.text.insert(string);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#paste()\r
+        */\r
+       public void paste() {\r
+               checkWidget();\r
+               this.text.paste();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#removeModifyListener(org.eclipse.swt.events.ModifyListener)\r
+        */\r
+       public void removeModifyListener(final ModifyListener listener) {\r
+               checkWidget();\r
+               this.text.removeModifyListener(listener);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#removeSelectionListener(org.eclipse.swt.events.SelectionListener)\r
+        */\r
+       public void removeSelectionListener(final SelectionListener listener) {\r
+               checkWidget();\r
+               this.text.removeSelectionListener(listener);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#removeVerifyListener(org.eclipse.swt.events.VerifyListener)\r
+        */\r
+       public void removeVerifyListener(final VerifyListener listener) {\r
+               checkWidget();\r
+               this.text.removeVerifyListener(listener);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#selectAll()\r
+        */\r
+       public void selectAll() {\r
+               checkWidget();\r
+               this.text.selectAll();\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setDoubleClickEnabled(boolean)\r
+        */\r
+       public void setDoubleClickEnabled(final boolean doubleClick) {\r
+               checkWidget();\r
+               this.text.setDoubleClickEnabled(doubleClick);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setEchoChar(char)\r
+        */\r
+       public void setEchoChar(final char echo) {\r
+               checkWidget();\r
+               this.text.setEchoChar(echo);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setEditable(boolean)\r
+        */\r
+       public void setEditable(final boolean editable) {\r
+               checkWidget();\r
+               this.text.setEditable(editable);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setFont(org.eclipse.swt.graphics.Font)\r
+        */\r
+       @Override\r
+       public void setFont(final Font font) {\r
+               checkWidget();\r
+               this.text.setFont(font);\r
+               this.table.setFont(font);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setMessage(java.lang.String)\r
+        */\r
+       public void setMessage(final String string) {\r
+               checkWidget();\r
+               this.text.setMessage(string);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setOrientation(int)\r
+        */\r
+       public void setOrientation(final int orientation) {\r
+               checkWidget();\r
+               this.text.setOrientation(orientation);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setRedraw(boolean)\r
+        */\r
+       @Override\r
+       public void setRedraw(final boolean redraw) {\r
+               checkWidget();\r
+               this.text.setRedraw(redraw);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setSelection(int, int)\r
+        */\r
+       public void setSelection(final int start, final int end) {\r
+               checkWidget();\r
+               this.text.setSelection(start, end);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setSelection(int)\r
+        */\r
+       public void setSelection(final int start) {\r
+               checkWidget();\r
+               this.text.setSelection(start);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setSelection(org.eclipse.swt.graphics.Point)\r
+        */\r
+       public void setSelection(final Point selection) {\r
+               checkWidget();\r
+               this.text.setSelection(selection);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setTabs(int)\r
+        */\r
+       public void setTabs(final int tabs) {\r
+               checkWidget();\r
+               this.text.setTabs(tabs);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setText(java.lang.String)\r
+        */\r
+       public void setText(final String text) {\r
+               checkWidget();\r
+               this.text.setText(text);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setTextLimit(int)\r
+        */\r
+       public void setTextLimit(final int textLimit) {\r
+               checkWidget();\r
+               this.text.setTextLimit(textLimit);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#setTopIndex(int)\r
+        */\r
+       public void setTopIndex(final int topIndex) {\r
+               checkWidget();\r
+               this.text.setTopIndex(topIndex);\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Text#showSelection()\r
+        */\r
+       public void showSelection() {\r
+               checkWidget();\r
+               this.text.showSelection();\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/textAssist/TextAssistContentProvider.java b/org.tizen.common.externals/src/org/mihalis/opal/textAssist/TextAssistContentProvider.java
new file mode 100644 (file)
index 0000000..313fb68
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.textAssist;\r
+\r
+import java.util.List;\r
+\r
+/**\r
+ * This class is a content provider for the TextAssist widget. When the user\r
+ * types something, an instance returns an arraylist of proposition based on the\r
+ * typed text.\r
+ * \r
+ */\r
+public abstract class TextAssistContentProvider {\r
+       private TextAssist textAssist;\r
+\r
+       /**\r
+        * Provides the content\r
+        * \r
+        * @param entry text typed by the user\r
+        * @return an array list of String that contains propositions for the entry\r
+        *         typed by the user\r
+        */\r
+       public abstract List<String> getContent(final String entry);\r
+\r
+       /**\r
+        * @param textAssist the textAssist to set\r
+        */\r
+       protected void setTextAssist(final TextAssist textAssist) {\r
+               this.textAssist = textAssist;\r
+       }\r
+\r
+       /**\r
+        * @return the max number of propositions.\r
+        */\r
+       protected int getMaxNumberOfLines() {\r
+               return this.textAssist.getNumberOfLines();\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/tipOfTheDay/TipOfTheDay.java b/org.tizen.common.externals/src/org/mihalis/opal/tipOfTheDay/TipOfTheDay.java
new file mode 100755 (executable)
index 0000000..4ec53c7
--- /dev/null
@@ -0,0 +1,524 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation \r
+ *******************************************************************************/\r
+package org.mihalis.opal.tipOfTheDay;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import java.util.Random;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.browser.Browser;\r
+import org.eclipse.swt.events.SelectionAdapter;\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.FontData;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.layout.FillLayout;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Button;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Group;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.eclipse.swt.widgets.Shell;\r
+import org.mihalis.opal.header.Header;\r
+import org.mihalis.opal.utils.ResourceManager;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class are a "Tip of Day" box, which is composed of\r
+ * <p>\r
+ * <dl>\r
+ * <dt><b>A tip</b></dt>\r
+ * <dt><b>2 buttons to navigate between types</b></dt>\r
+ * <dt><b>A close button</b></dt>\r
+ * <dt><b>A checkbox "show tip on startup"</b></dt>\r
+ * <dd>(optional)</dd>\r
+ * <dt><b>A checkbox "remember the password"</b></dt>\r
+ * <dd>(optional)</dd>\r
+ * </dl>\r
+ * </p>\r
+ */\r
+public class TipOfTheDay {\r
+\r
+       /**\r
+        * Types of opal dialog\r
+        */\r
+       public enum TipStyle {\r
+               TWO_COLUMNS, TWO_COLUMNS_LARGE, HEADER\r
+       }\r
+\r
+       private final List<String> tips;\r
+       private boolean displayShowOnStartup = true;\r
+       private boolean showOnStartup = true;\r
+       private Shell shell;\r
+       private Button close;\r
+       private int index;\r
+       private Browser tipArea;\r
+       private String fontName;\r
+       private TipStyle style;\r
+       private Image image;\r
+\r
+       /**\r
+        * Constructor\r
+        */\r
+       public TipOfTheDay() {\r
+               this.tips = new ArrayList<String>();\r
+               this.index = -1;\r
+               final Font temp = Display.getDefault().getSystemFont();\r
+               final FontData[] fontData = temp.getFontData();\r
+               if (fontData != null && fontData.length > 0) {\r
+                       this.fontName = fontData[0].getName();\r
+               } else {\r
+                       this.fontName = "Arial";\r
+               }\r
+               this.style = TipStyle.TWO_COLUMNS;\r
+\r
+       }\r
+\r
+       /**\r
+        * Open the "tip of the day" box\r
+        * \r
+        * @param parent the parent shell\r
+        */\r
+       public void open(final Shell parent) {\r
+               if (this.index == -1) {\r
+                       this.index = new Random().nextInt(this.tips.size());\r
+               }\r
+               buildShell(parent);\r
+               if (this.style == TipStyle.HEADER) {\r
+                       buildHeader();\r
+               } else {\r
+                       buildLeftColumn();\r
+               }\r
+               buildTip();\r
+               buildButtons();\r
+               openShell();\r
+       }\r
+\r
+       /**\r
+        * Build the shell\r
+        * \r
+        * @param parent parent shell\r
+        */\r
+       private void buildShell(final Shell parent) {\r
+               this.shell = new Shell(parent, SWT.SYSTEM_MODAL | SWT.TITLE | SWT.BORDER | SWT.CLOSE | SWT.RESIZE);\r
+               this.shell.setText(ResourceManager.getLabel(ResourceManager.TIP_OF_THE_DAY));\r
+               this.shell.setLayout(new GridLayout(this.style == TipStyle.HEADER ? 1 : 2, false));\r
+\r
+               this.shell.addListener(SWT.Traverse, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               switch (event.detail) {\r
+                               case SWT.TRAVERSE_ESCAPE:\r
+                                       TipOfTheDay.this.shell.dispose();\r
+                                       event.detail = SWT.TRAVERSE_NONE;\r
+                                       event.doit = false;\r
+                                       break;\r
+                               default:\r
+                                   break;\r
+                               }\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * Build the header\r
+        */\r
+       private void buildHeader() {\r
+               final Header header = new Header(this.shell, SWT.NONE);\r
+               final GridData gd = new GridData(GridData.FILL, GridData.BEGINNING, true, false);\r
+               gd.heightHint = 80;\r
+               header.setLayoutData(gd);\r
+               header.setTitle(ResourceManager.getLabel(ResourceManager.DID_YOU_KNOW));\r
+               if (this.image == null) {\r
+                       final Image img = SWTGraphicUtil.createImage("images/light2.png");\r
+                       header.setImage(img);\r
+                       this.shell.addListener(SWT.Dispose, new Listener() {\r
+\r
+                               @Override\r
+                               public void handleEvent(final Event event) {\r
+                                       img.dispose();\r
+\r
+                               }\r
+                       });\r
+               } else {\r
+                       header.setImage(this.image);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Build the left column\r
+        */\r
+       private void buildLeftColumn() {\r
+               final Composite composite = new Composite(this.shell, SWT.NONE);\r
+               int numberOfRows = 1;\r
+               if (this.style == TipStyle.TWO_COLUMNS_LARGE) {\r
+                       numberOfRows = this.displayShowOnStartup ? 5 : 4;\r
+               }\r
+\r
+               final GridData gd = new GridData(GridData.FILL, GridData.BEGINNING, false, true, 1, numberOfRows);\r
+               composite.setLayoutData(gd);\r
+               final FillLayout compositeLayout = new FillLayout();\r
+               compositeLayout.marginWidth = 2;\r
+               composite.setLayout(compositeLayout);\r
+               final Label label = new Label(composite, SWT.NONE);\r
+               if (this.image == null) {\r
+                       final Image img = SWTGraphicUtil.createImage("images/light1.png");\r
+                       label.setImage(img);\r
+                       this.shell.addListener(SWT.Dispose, new Listener() {\r
+\r
+                               @Override\r
+                               public void handleEvent(final Event event) {\r
+                                       img.dispose();\r
+                               }\r
+                       });\r
+               } else {\r
+                       label.setImage(this.image);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Build the tip area\r
+        */\r
+       private void buildTip() {\r
+               if (this.style == TipStyle.TWO_COLUMNS) {\r
+                       final Group group = new Group(this.shell, SWT.NONE);\r
+                       final GridData gd = new GridData(GridData.FILL, GridData.FILL, true, true);\r
+                       gd.widthHint = 300;\r
+                       gd.heightHint = 120;\r
+                       group.setLayoutData(gd);\r
+                       group.setText(ResourceManager.getLabel(ResourceManager.DID_YOU_KNOW));\r
+                       final FillLayout fillLayout = new FillLayout();\r
+                       fillLayout.marginWidth = 15;\r
+                       group.setLayout(fillLayout);\r
+\r
+                       this.tipArea = new Browser(group, SWT.BORDER);\r
+               } else if (this.style == TipStyle.TWO_COLUMNS_LARGE) {\r
+                       final Label title = new Label(this.shell, SWT.NONE);\r
+                       final GridData gd = new GridData(GridData.FILL, GridData.FILL, true, false);\r
+                       gd.verticalIndent = 15;\r
+                       title.setLayoutData(gd);\r
+                       final Font tempFont = SWTGraphicUtil.buildFontFrom(title, SWT.BOLD, 16);\r
+                       title.setText(ResourceManager.getLabel(ResourceManager.TIP_OF_THE_DAY));\r
+                       title.setFont(tempFont);\r
+                       this.shell.addListener(SWT.Dispose, new Listener() {\r
+\r
+                               @Override\r
+                               public void handleEvent(final Event event) {\r
+                                       tempFont.dispose();\r
+                               }\r
+                       });\r
+                       final Label separator = new Label(this.shell, SWT.SEPARATOR | SWT.HORIZONTAL);\r
+                       separator.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false));\r
+\r
+                       this.tipArea = new Browser(this.shell, SWT.BORDER);\r
+                       final GridData gdTipArea = new GridData(GridData.FILL, GridData.FILL, true, true);\r
+                       gdTipArea.heightHint = 120;\r
+                       this.tipArea.setLayoutData(gdTipArea);\r
+\r
+               } else {\r
+                       this.tipArea = new Browser(this.shell, SWT.BORDER);\r
+                       final GridData gd = new GridData(GridData.FILL, GridData.FILL, true, true);\r
+                       gd.heightHint = 120;\r
+                       this.tipArea.setLayoutData(gd);\r
+               }\r
+               fillTipArea();\r
+\r
+       }\r
+\r
+       /**\r
+        * Fill the tip area with the selected tip\r
+        */\r
+       private void fillTipArea() {\r
+               this.tipArea.setText("<html><body bgcolor=\"#ffffff\" text=\"#000000\"><p style=\"font-family:" + this.fontName + ";font-size=12px\">" //\r
+                               + this.tips.get(this.index) + "</p></body></html>");\r
+       }\r
+\r
+       /**\r
+        * Build the button (checkbox, previous tip, next tip, close)\r
+        */\r
+       private void buildButtons() {\r
+               final Composite composite = new Composite(this.shell, SWT.NONE);\r
+               int numberOfColumns;\r
+               if (this.style == TipStyle.HEADER) {\r
+                       numberOfColumns = 1;\r
+               } else if (this.style == TipStyle.TWO_COLUMNS) {\r
+                       numberOfColumns = 2;\r
+               } else {\r
+                       numberOfColumns = 1;\r
+               }\r
+\r
+               final GridData gd = new GridData(GridData.FILL, GridData.BEGINNING, false, false, numberOfColumns, 1);\r
+               composite.setLayoutData(gd);\r
+               final GridLayout gridLayout = new GridLayout();\r
+               gridLayout.marginWidth = 2;\r
+               if (this.style == TipStyle.TWO_COLUMNS_LARGE) {\r
+                       composite.setLayout(new GridLayout(3, false));\r
+               } else {\r
+                       composite.setLayout(new GridLayout(this.displayShowOnStartup ? 4 : 3, false));\r
+               }\r
+\r
+               final GridData gridShowOnStartup, gridPrevious, gridNext, gridClose;\r
+               if (this.style == TipStyle.TWO_COLUMNS_LARGE) {\r
+                       gridShowOnStartup = new GridData(GridData.BEGINNING, GridData.BEGINNING, true, false, 3, 1);\r
+\r
+                       gridPrevious = new GridData(GridData.END, GridData.CENTER, true, false);\r
+                       gridPrevious.widthHint = 120;\r
+\r
+                       gridNext = new GridData(GridData.CENTER, GridData.CENTER, false, false);\r
+                       gridNext.widthHint = 120;\r
+\r
+                       gridClose = new GridData(GridData.BEGINNING, GridData.CENTER, true, false);\r
+                       gridClose.widthHint = 120;\r
+\r
+               } else {\r
+                       gridShowOnStartup = new GridData(GridData.BEGINNING, GridData.CENTER, true, false);\r
+\r
+                       gridPrevious = new GridData(GridData.END, GridData.CENTER, this.showOnStartup ? false : true, false);\r
+                       gridPrevious.widthHint = 120;\r
+\r
+                       gridNext = new GridData(GridData.FILL, GridData.CENTER, false, false);\r
+                       gridNext.widthHint = 120;\r
+\r
+                       gridClose = new GridData(GridData.FILL, GridData.CENTER, false, false);\r
+                       gridClose.widthHint = 120;\r
+               }\r
+\r
+               if (this.displayShowOnStartup) {\r
+                       buildShowOnStartup(composite, gridShowOnStartup);\r
+               }\r
+\r
+               buildPreviousButton(composite, gridPrevious);\r
+               buildNextButton(composite, gridNext);\r
+               buildCloseButton(composite, gridClose);\r
+\r
+       }\r
+\r
+       /**\r
+        * Build the "show on startup" checkbox\r
+        * \r
+        * @param composite parent composite\r
+        * @param gridData associated grid data\r
+        */\r
+       private void buildShowOnStartup(final Composite composite, final GridData gridData) {\r
+               final Button checkBox = new Button(composite, SWT.CHECK);\r
+               checkBox.setLayoutData(gridData);\r
+               checkBox.setText(ResourceManager.getLabel(ResourceManager.SHOW_TIP_AT_STARTUP));\r
+               checkBox.setSelection(this.showOnStartup);\r
+               checkBox.addListener(SWT.Selection, new Listener() {\r
+\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               TipOfTheDay.this.showOnStartup = checkBox.getSelection();\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Build the "previous tip" button\r
+        * \r
+        * @param composite parent composite\r
+        * @param gridData associated grid data\r
+        */\r
+       private void buildPreviousButton(final Composite composite, final GridData gridData) {\r
+               final Button previous = new Button(composite, SWT.PUSH);\r
+               previous.setText(ResourceManager.getLabel(ResourceManager.PREVIOUS_TIP));\r
+               previous.setLayoutData(gridData);\r
+               previous.addSelectionListener(new SelectionAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                        */\r
+                       @Override\r
+                       public void widgetSelected(final SelectionEvent e) {\r
+                               if (TipOfTheDay.this.index == 0) {\r
+                                       setIndex(TipOfTheDay.this.tips.size() - 1);\r
+                               } else {\r
+                                       setIndex(TipOfTheDay.this.index - 1);\r
+                               }\r
+                       }\r
+\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Build the "next tip" button\r
+        * \r
+        * @param composite parent composite\r
+        * @param gridData associated grid data\r
+        */\r
+       private void buildNextButton(final Composite composite, final GridData gridData) {\r
+               final Button next = new Button(composite, SWT.PUSH);\r
+               next.setText(ResourceManager.getLabel(ResourceManager.NEXT_TIP));\r
+\r
+               next.setLayoutData(gridData);\r
+               next.addSelectionListener(new SelectionAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                        */\r
+                       @Override\r
+                       public void widgetSelected(final SelectionEvent e) {\r
+                               if (TipOfTheDay.this.index == TipOfTheDay.this.tips.size() - 1) {\r
+                                       setIndex(0);\r
+                               } else {\r
+                                       setIndex(TipOfTheDay.this.index + 1);\r
+                               }\r
+                       }\r
+\r
+               });\r
+       }\r
+\r
+       /**\r
+        * Build the "close" button\r
+        * \r
+        * @param composite parent composite\r
+        * @param gridData associated grid data\r
+        */\r
+       private void buildCloseButton(final Composite composite, final GridData gridData) {\r
+               this.close = new Button(composite, SWT.PUSH);\r
+               this.close.setText(ResourceManager.getLabel(ResourceManager.CLOSE));\r
+\r
+               this.close.setLayoutData(gridData);\r
+               this.close.addSelectionListener(new SelectionAdapter() {\r
+\r
+                       /**\r
+                        * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+                        */\r
+                       @Override\r
+                       public void widgetSelected(final SelectionEvent e) {\r
+                               TipOfTheDay.this.shell.dispose();\r
+                       }\r
+\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Open the shell\r
+        */\r
+       private void openShell() {\r
+               this.shell.setDefaultButton(this.close);\r
+               this.shell.pack();\r
+               this.shell.open();\r
+               SWTGraphicUtil.centerShell(this.shell);\r
+\r
+               while (!this.shell.isDisposed()) {\r
+                       if (!this.shell.getDisplay().readAndDispatch()) {\r
+                               this.shell.getDisplay().sleep();\r
+                       }\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Add a tip\r
+        * \r
+        * @param tip tip to add\r
+        * @return the current object\r
+        */\r
+       public TipOfTheDay addTip(final String tip) {\r
+               this.tips.add(tip);\r
+               return this;\r
+       }\r
+\r
+       /**\r
+        * @return the image\r
+        */\r
+       public Image getImage() {\r
+               return this.image;\r
+       }\r
+\r
+       /**\r
+        * @return the index of the current tip\r
+        */\r
+       public int getIndex() {\r
+               return this.index;\r
+       }\r
+\r
+       /**\r
+        * @return the style of the window\r
+        */\r
+       public TipStyle getStyle() {\r
+               return this.style;\r
+       }\r
+\r
+       /**\r
+        * @return all the the tips\r
+        */\r
+       public List<String> getTips() {\r
+               return this.tips;\r
+       }\r
+\r
+       /**\r
+        * @return if <code>true</code>, the "Show On Startup" checkbox is displayed\r
+        */\r
+       public boolean isDisplayShowOnStartup() {\r
+               return this.displayShowOnStartup;\r
+       }\r
+\r
+       /**\r
+        * @return the value of the checkbox "Show On Startup"\r
+        */\r
+       public boolean isShowOnStartup() {\r
+               return this.showOnStartup;\r
+       }\r
+\r
+       /**\r
+        * @param if <code>true</code>, the checkbox "Show on startup" is displayed\r
+        */\r
+       public void setDisplayShowOnStartup(final boolean displayShowOnStartup) {\r
+               this.displayShowOnStartup = displayShowOnStartup;\r
+       }\r
+\r
+       /**\r
+        * @param index the index of the selected tip. By default, the tip is chosen\r
+        *            randomly\r
+        */\r
+       public void setIndex(final int index) {\r
+               if (index < 0 || index >= this.tips.size() || this.tips.get(index) == null) {\r
+                       throw new IllegalArgumentException("Index should be between 0 and " + (this.tips.size() - 1) + " (entered value:" + index + ")");\r
+               }\r
+\r
+               this.index = index;\r
+               if (this.tipArea != null && !this.tipArea.isDisposed()) {\r
+                       fillTipArea();\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @param image the image to set\r
+        */\r
+       public void setImage(final Image image) {\r
+               this.image = image;\r
+       }\r
+\r
+       /**\r
+        * @param the value of the checkbox "Show on startup"\r
+        */\r
+       public void setShowOnStartup(final boolean showOnStartup) {\r
+               this.showOnStartup = showOnStartup;\r
+       }\r
+\r
+       /**\r
+        * @param style the style of the window\r
+        */\r
+       public void setStyle(final TipStyle style) {\r
+               this.style = style;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/titledSeparator/TitledSeparator.java b/org.tizen.common.externals/src/org/mihalis/opal/titledSeparator/TitledSeparator.java
new file mode 100644 (file)
index 0000000..12f708b
--- /dev/null
@@ -0,0 +1,314 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.titledSeparator;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.FontData;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.layout.GridData;\r
+import org.eclipse.swt.layout.GridLayout;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Label;\r
+import org.eclipse.swt.widgets.Layout;\r
+import org.eclipse.swt.widgets.Listener;\r
+import org.mihalis.opal.utils.SWTGraphicUtil;\r
+\r
+/**\r
+ * Instances of this class provide a separator with a title and/or an image.\r
+ * <p>\r
+ * <dl>\r
+ * <dt><b>Styles:</b></dt>\r
+ * <dd>BORDER</dd>\r
+ * <dt><b>Events:</b></dt>\r
+ * <dd>(none)</dd>\r
+ * </dl>\r
+ * </p>\r
+ */\r
+public class TitledSeparator extends Composite {\r
+\r
+       private int alignment;\r
+       private Image image;\r
+       private String text;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a composite control which will be the parent of the new\r
+        *            instance (cannot be null)\r
+        * @param style the style of control to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        */\r
+       public TitledSeparator(final Composite parent, final int style) {\r
+               super(parent, style);\r
+               this.alignment = SWT.LEFT;\r
+\r
+               final Color originalColor = new Color(getDisplay(), 0, 88, 150);\r
+               setForeground(originalColor);\r
+\r
+               final Font originalFont;\r
+               final FontData[] fontData = getFont().getFontData();\r
+               if (fontData != null && fontData.length > 0) {\r
+                       final FontData fd = fontData[0];\r
+                       fd.setStyle(SWT.BOLD);\r
+                       originalFont = new Font(getDisplay(), fd);\r
+                       setFont(originalFont);\r
+               } else {\r
+                       originalFont = null;\r
+               }\r
+\r
+               this.addListener(SWT.Resize, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               redrawComposite();\r
+                       }\r
+               });\r
+\r
+               this.addListener(SWT.Dispose, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event event) {\r
+                               SWTGraphicUtil.dispose(originalColor);\r
+                               SWTGraphicUtil.dispose(originalFont);\r
+                       }\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * Redraw the composite\r
+        */\r
+       private void redrawComposite() {\r
+               // Dispose previous content\r
+               for (final Control c : this.getChildren()) {\r
+                       c.dispose();\r
+               }\r
+\r
+               int numberOfColumns = 1;\r
+\r
+               if (this.text != null) {\r
+                       numberOfColumns++;\r
+               }\r
+               if (this.image != null) {\r
+                       numberOfColumns++;\r
+               }\r
+\r
+               if (this.alignment == SWT.CENTER) {\r
+                       numberOfColumns++;\r
+               }\r
+\r
+               super.setLayout(new GridLayout(numberOfColumns, false));\r
+               createContent();\r
+       }\r
+\r
+       /**\r
+        * Create the content\r
+        */\r
+       private void createContent() {\r
+               switch (this.alignment) {\r
+               case SWT.CENTER:\r
+                       createSeparator();\r
+                       createTitle();\r
+                       break;\r
+               case SWT.LEFT:\r
+                       createTitle();\r
+                       createSeparator();\r
+                       break;\r
+               default:\r
+                       createSeparator();\r
+                       createTitle();\r
+                       break;\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * Create a separator\r
+        */\r
+       private void createSeparator() {\r
+               final Label separator = new Label(this, SWT.SEPARATOR | SWT.HORIZONTAL);\r
+               separator.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));\r
+               separator.setBackground(getBackground());\r
+       }\r
+\r
+       /**\r
+        * Create the title\r
+        */\r
+       private void createTitle() {\r
+\r
+               if (this.image != null) {\r
+                       final Label imageLabel = createLabel();\r
+                       imageLabel.setImage(this.image);\r
+               }\r
+\r
+               if (this.text != null && !this.text.trim().equals("")) {\r
+                       final Label textLabel = createLabel();\r
+                       textLabel.setText(this.text);\r
+\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * @return a SWT label\r
+        */\r
+       private Label createLabel() {\r
+               final Label label = new Label(this, SWT.NONE);\r
+               label.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));\r
+               label.setFont(getFont());\r
+               label.setForeground(getForeground());\r
+               label.setBackground(getBackground());\r
+               return label;\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Composite#setLayout(org.eclipse.swt.widgets.Layout)\r
+        */\r
+       @Override\r
+       public void setLayout(final Layout layout) {\r
+               throw new UnsupportedOperationException("Not supported");\r
+       }\r
+\r
+       /**\r
+        * Returns a value which describes the position of the text or image in the\r
+        * receiver. The value will be one of <code>LEFT</code>, <code>RIGHT</code>\r
+        * or <code>CENTER</code>.\r
+        * \r
+        * @return the alignment\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+\r
+       public int getAlignment() {\r
+               checkWidget();\r
+               return this.alignment;\r
+       }\r
+\r
+       /**\r
+        * Returns the receiver's image if it has one, or null if it does not.\r
+        * \r
+        * @return the receiver's image\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public Image getImage() {\r
+               checkWidget();\r
+               return this.image;\r
+       }\r
+\r
+       /**\r
+        * Returns the receiver's text.\r
+        * \r
+        * @return the receiver's text\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public String getText() {\r
+               checkWidget();\r
+               return this.text;\r
+       }\r
+\r
+       /**\r
+        * Controls how text will be displayed in the receiver. The argument should\r
+        * be one of <code>LEFT</code>, <code>RIGHT</code> or <code>CENTER</code>.\r
+        * \r
+        * @param alignment the new alignment\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setAlignment(final int alignment) {\r
+               checkWidget();\r
+               this.alignment = alignment;\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's image to the argument, which may be null indicating\r
+        * that no image should be displayed.\r
+        * \r
+        * @param image the image to display on the receiver (may be null)\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_INVALID_ARGUMENT - if the image has been\r
+        *                disposed</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setImage(final Image image) {\r
+               checkWidget();\r
+               this.image = image;\r
+       }\r
+\r
+       /**\r
+        * Sets the receiver's text.\r
+        * \r
+        * @param string the new text\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the text is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setText(final String text) {\r
+               checkWidget();\r
+               this.text = text;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/DownUpAppearTransition.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/DownUpAppearTransition.java
new file mode 100644 (file)
index 0000000..56f8265
--- /dev/null
@@ -0,0 +1,34 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+/**\r
+ * In this transition, the second control is behind, the first control is\r
+ * sliding from down to up\r
+ */\r
+public class DownUpAppearTransition extends VerticalTransition {\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.VerticalTransition#getCoeff()\r
+        */\r
+       @Override\r
+       protected int getCoeff() {\r
+               return -1;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.VerticalTransition#secondIsBehind()\r
+        */\r
+       @Override\r
+       protected boolean secondIsBehind() {\r
+               return false;\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/DownUpTransition.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/DownUpTransition.java
new file mode 100644 (file)
index 0000000..2844d82
--- /dev/null
@@ -0,0 +1,33 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+/**\r
+ * In this transition, both control are sliding (vertical movement, down to up)\r
+ */\r
+public class DownUpTransition extends VerticalTransition {\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.VerticalTransition#getCoeff()\r
+        */\r
+       @Override\r
+       protected int getCoeff() {\r
+               return -1;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.VerticalTransition#secondIsBehind()\r
+        */\r
+       @Override\r
+       protected boolean secondIsBehind() {\r
+               return true;\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/HorizontalTransition.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/HorizontalTransition.java
new file mode 100644 (file)
index 0000000..a68403d
--- /dev/null
@@ -0,0 +1,86 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+import org.eclipse.swt.widgets.Control;\r
+\r
+/**\r
+ * Instances of this class are horizontal transitions (right>left,\r
+ * left>right...)\r
+ */\r
+public abstract class HorizontalTransition implements Transition {\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.Transition#performTransition(org.eclipse.swt.widgets.Control,\r
+        *      org.eclipse.swt.widgets.Control)\r
+        */\r
+       @Override\r
+       public void performTransition(final Control first, final Control second) {\r
+               if (first.isDisposed() || second.isDisposed()) {\r
+                       return;\r
+               }\r
+\r
+               final int[] currentPosition = new int[1];\r
+               currentPosition[0] = 0;\r
+               final int maxValue = first.getParent().getClientArea().width;\r
+\r
+               first.setBounds(0, 0, first.getBounds().width, first.getBounds().height);\r
+               second.setBounds(0, -1 * second.getBounds().width, second.getBounds().width, second.getBounds().height);\r
+\r
+               first.moveAbove(second);\r
+               second.setVisible(true);\r
+\r
+               if (first.isDisposed() || first.getDisplay().isDisposed()) {\r
+                       return;\r
+               }\r
+               first.getDisplay().timerExec(0, new Runnable() {\r
+\r
+                       @Override\r
+                       public void run() {\r
+\r
+                               if (first.isDisposed() || second.isDisposed()) {\r
+                                       return;\r
+                               }\r
+\r
+                               currentPosition[0] = currentPosition[0] + 10;\r
+                               if (currentPosition[0] > maxValue) {\r
+                                       first.setVisible(false);\r
+                                       second.setVisible(true);\r
+                                       second.setBounds(0, 0, first.getBounds().width, first.getBounds().height);\r
+                                       return;\r
+                               }\r
+\r
+                               first.setBounds(getCoeff() * currentPosition[0], 0, first.getBounds().width, first.getBounds().height);\r
+\r
+                               if (secondIsBehind()) {\r
+                                       second.setBounds(-1 * getCoeff() * (maxValue - currentPosition[0]), 0, second.getBounds().width, second.getBounds().height);\r
+                               }\r
+\r
+                               if (!first.isDisposed() && !first.getDisplay().isDisposed()) {\r
+                                       first.getDisplay().timerExec(10, this);\r
+                               }\r
+                       }\r
+\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * @return the multiplicator coefficient\r
+        */\r
+       protected abstract int getCoeff();\r
+\r
+       /**\r
+        * @return <code>true</code> if the second composite is behind the first\r
+        *         one, <code>false</code> otherwise\r
+        */\r
+       protected abstract boolean secondIsBehind();\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/LeftRightAppearTransition.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/LeftRightAppearTransition.java
new file mode 100644 (file)
index 0000000..55239df
--- /dev/null
@@ -0,0 +1,35 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+/**\r
+ * In this transition, the second control is behind, the first control is\r
+ * sliding from left to right\r
+ */\r
+public class LeftRightAppearTransition extends HorizontalTransition {\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.HorizontalTransition#getCoeff()\r
+        */\r
+       @Override\r
+       protected int getCoeff() {\r
+               return 1;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.HorizontalTransition#secondIsBehind()\r
+        */\r
+       @Override\r
+       protected boolean secondIsBehind() {\r
+               return false;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/LeftRightTransition.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/LeftRightTransition.java
new file mode 100644 (file)
index 0000000..a7df752
--- /dev/null
@@ -0,0 +1,35 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+/**\r
+ * In this transition, both control are sliding (vertical movement, left to\r
+ * right)\r
+ */\r
+public class LeftRightTransition extends HorizontalTransition {\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.HorizontalTransition#getCoeff()\r
+        */\r
+       @Override\r
+       protected int getCoeff() {\r
+               return 1;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.HorizontalTransition#secondIsBehind()\r
+        */\r
+       @Override\r
+       protected boolean secondIsBehind() {\r
+               return true;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/NoTransition.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/NoTransition.java
new file mode 100644 (file)
index 0000000..cbdee8e
--- /dev/null
@@ -0,0 +1,31 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+import org.eclipse.swt.widgets.Control;\r
+\r
+/**\r
+ * This transition is simple, because there is no effect :)\r
+ * \r
+ */\r
+class NoTransition implements Transition {\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.Transition#performTransition(org.eclipse.swt.widgets.Control,\r
+        *      org.eclipse.swt.widgets.Control)\r
+        */\r
+       @Override\r
+       public void performTransition(final Control first, final Control second) {\r
+               first.setVisible(false);\r
+               second.setVisible(true);\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/RightLeftAppearTransition.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/RightLeftAppearTransition.java
new file mode 100644 (file)
index 0000000..94a38bb
--- /dev/null
@@ -0,0 +1,35 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+/**\r
+ * In this transition, the second control is behind, the first control is\r
+ * sliding from right to left\r
+ */\r
+public class RightLeftAppearTransition extends HorizontalTransition {\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.HorizontalTransition#getCoeff()\r
+        */\r
+       @Override\r
+       protected int getCoeff() {\r
+               return -1;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.HorizontalTransition#secondIsBehind()\r
+        */\r
+       @Override\r
+       protected boolean secondIsBehind() {\r
+               return false;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/RightLeftTransition.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/RightLeftTransition.java
new file mode 100644 (file)
index 0000000..cf3c803
--- /dev/null
@@ -0,0 +1,35 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+/**\r
+ * In this transition, both control are sliding (vertical movement, right to\r
+ * left)\r
+ */\r
+public class RightLeftTransition extends HorizontalTransition {\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.HorizontalTransition#getCoeff()\r
+        */\r
+       @Override\r
+       protected int getCoeff() {\r
+               return -1;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.HorizontalTransition#secondIsBehind()\r
+        */\r
+       @Override\r
+       protected boolean secondIsBehind() {\r
+               return true;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/TRANSITIONS.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/TRANSITIONS.java
new file mode 100644 (file)
index 0000000..0a77856
--- /dev/null
@@ -0,0 +1,18 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+/**\r
+ * This enumeration is a list of transitions\r
+ */\r
+public enum TRANSITIONS {\r
+       LEFT_TO_RIGHT, LEFT_TO_RIGHT_AND_APPEAR, RIGHT_TO_LEFT, RIGHT_TO_LEFT_AND_APPEAR, UP_TO_DOWN, UP_TO_DOWN_AND_APPEAR, DOWN_TO_UP, DOWN_TO_UP_AND_APPEAR, NONE\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/Transition.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/Transition.java
new file mode 100644 (file)
index 0000000..2921698
--- /dev/null
@@ -0,0 +1,28 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+import org.eclipse.swt.widgets.Control;\r
+\r
+/**\r
+ * This interface describes a transition\r
+ */\r
+interface Transition {\r
+\r
+       /**\r
+        * Performs a transition between 2 controls of a TransitionComposite\r
+        * \r
+        * @param first first control\r
+        * @param second second control\r
+        */\r
+       void performTransition(Control first, Control second);\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/TransitionComposite.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/TransitionComposite.java
new file mode 100644 (file)
index 0000000..93ac865
--- /dev/null
@@ -0,0 +1,274 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.SWTException;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Event;\r
+import org.eclipse.swt.widgets.Listener;\r
+\r
+/**\r
+ * Instances of this class provide a multi-part composite. You can perform\r
+ * transitions when you move from one part to another\r
+ * <p>\r
+ * <dl>\r
+ * <dt><b>Styles:</b></dt>\r
+ * <dd>BORDER</dd>\r
+ * <dt><b>Events:</b></dt>\r
+ * <dd>(none)</dd>\r
+ * </dl>\r
+ * </p>\r
+ */\r
+public class TransitionComposite extends Composite {\r
+\r
+       private final List<Control> controls;\r
+       private int selection = 0;\r
+       private TRANSITIONS transition = TRANSITIONS.NONE;\r
+\r
+       /**\r
+        * Constructs a new instance of this class given its parent and a style\r
+        * value describing its behavior and appearance.\r
+        * <p>\r
+        * The style value is either one of the style constants defined in class\r
+        * <code>SWT</code> which is applicable to instances of this class, or must\r
+        * be built by <em>bitwise OR</em>'ing together (that is, using the\r
+        * <code>int</code> "|" operator) two or more of those <code>SWT</code>\r
+        * style constants. The class description lists the style constants that are\r
+        * applicable to the class. Style bits are also inherited from superclasses.\r
+        * </p>\r
+        * \r
+        * @param parent a composite control which will be the parent of the new\r
+        *            instance (cannot be null)\r
+        * @param style the style of control to construct\r
+        * \r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the parent is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the parent</li>\r
+        *                </ul>\r
+        * \r
+        */\r
+       public TransitionComposite(final Composite parent, final int style) {\r
+               super(parent, style);\r
+               this.controls = new ArrayList<Control>();\r
+\r
+               addListener(SWT.Resize, new Listener() {\r
+                       @Override\r
+                       public void handleEvent(final Event e) {\r
+                               TransitionComposite.this.controls.get(TransitionComposite.this.selection).setBounds(getClientArea());\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * Add a control to this composite\r
+        * \r
+        * @param control control to add\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void addControl(final Control control) {\r
+               checkWidget();\r
+               this.controls.add(control);\r
+               if (this.controls.size() == 1) {\r
+                       control.setVisible(true);\r
+               } else {\r
+                       control.setVisible(false);\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @see org.eclipse.swt.widgets.Composite#computeSize(int, int, boolean)\r
+        */\r
+       @Override\r
+       public Point computeSize(final int wHint, final int hHint, final boolean changed) {\r
+               int width = 0, height = 0;\r
+               for (final Control control : this.controls) {\r
+                       final Point point = control.computeSize(wHint, hHint, changed);\r
+                       width = Math.max(width, point.x);\r
+                       height = Math.max(height, point.y);\r
+               }\r
+               return new Point(Math.max(width, wHint), Math.max(height, hHint));\r
+       }\r
+\r
+       /**\r
+        * @return the current transition\r
+        * @exception IllegalArgumentException <ul>\r
+        *                <li>ERROR_NULL_ARGUMENT - if the listener is null</li>\r
+        *                </ul>\r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public TRANSITIONS getTransition() {\r
+               checkWidget();\r
+               return this.transition;\r
+       }\r
+\r
+       /**\r
+        * Move selection to the first control\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void moveToFirst() {\r
+               checkWidget();\r
+               changeSelectionTo(0);\r
+       }\r
+\r
+       /**\r
+        * Move selection to the last control\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void moveToLast() {\r
+               checkWidget();\r
+               changeSelectionTo(this.controls.size() - 1);\r
+       }\r
+\r
+       /**\r
+        * Move selection to the next control\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void moveToNext() {\r
+               checkWidget();\r
+               final int index = this.selection + 1;\r
+               if (index == this.controls.size()) {\r
+                       return;\r
+               }\r
+               changeSelectionTo(index);\r
+       }\r
+\r
+       /**\r
+        * Move selection to the previous control\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void moveToPrevious() {\r
+               checkWidget();\r
+               final int index = this.selection - 1;\r
+               if (index < 0) {\r
+                       return;\r
+               }\r
+               changeSelectionTo(index);\r
+       }\r
+\r
+       /**\r
+        * Move selection to a given index\r
+        * \r
+        * @param index index of the new selection\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setSelection(final int index) {\r
+               checkWidget();\r
+               if (index < 0 || index > this.controls.size() - 1) {\r
+                       return;\r
+               }\r
+               changeSelectionTo(index);\r
+       }\r
+\r
+       /**\r
+        * Change current selection\r
+        * \r
+        * @param index index of the new selection\r
+        */\r
+       private void changeSelectionTo(final int index) {\r
+\r
+               final Transition t = TransitionFactory.getTransitionFor(this.transition);\r
+               t.performTransition(this.controls.get(this.selection), this.controls.get(index));\r
+\r
+               this.selection = index;\r
+               this.controls.get(this.selection).setBounds(getClientArea());\r
+       }\r
+\r
+       /**\r
+        * Move selection to a given control\r
+        * \r
+        * @param control control newly selected\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+       public void setSelection(final Control control) {\r
+               checkWidget();\r
+               for (int i = 0; i < this.controls.size(); i++) {\r
+                       if (this.controls.get(i) != null && this.controls.get(i).equals(control)) {\r
+                               changeSelectionTo(i);\r
+                               return;\r
+                       }\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Move selection to the first control\r
+        * \r
+        * @param transition new transition\r
+        * \r
+        * @exception SWTException <ul>\r
+        *                <li>ERROR_WIDGET_DISPOSED - if the receiver has been\r
+        *                disposed</li>\r
+        *                <li>ERROR_THREAD_INVALID_ACCESS - if not called from the\r
+        *                thread that created the receiver</li>\r
+        *                </ul>\r
+        */\r
+\r
+       public void setTransition(final TRANSITIONS transition) {\r
+               checkWidget();\r
+               this.transition = transition;\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/TransitionFactory.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/TransitionFactory.java
new file mode 100755 (executable)
index 0000000..ef73b8b
--- /dev/null
@@ -0,0 +1,48 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+/**\r
+ * This class is a transition factory\r
+ */\r
+public class TransitionFactory {\r
+\r
+       /**\r
+        * @param transition transition to get\r
+        * @return a transition corresponding to the <code>transition</code>\r
+        *         parameter\r
+        */\r
+       public static Transition getTransitionFor(final TRANSITIONS transition) {\r
+               switch (transition) {\r
+               case DOWN_TO_UP:\r
+                       return new DownUpTransition();\r
+               case DOWN_TO_UP_AND_APPEAR:\r
+                       return new DownUpAppearTransition();\r
+               case LEFT_TO_RIGHT:\r
+                       return new LeftRightTransition();\r
+               case LEFT_TO_RIGHT_AND_APPEAR:\r
+                       return new LeftRightAppearTransition();\r
+               case NONE:\r
+                       return new NoTransition();\r
+               case RIGHT_TO_LEFT:\r
+                       return new RightLeftTransition();\r
+               case RIGHT_TO_LEFT_AND_APPEAR:\r
+                       return new RightLeftAppearTransition();\r
+               case UP_TO_DOWN:\r
+                       return new UpDownTransition();\r
+               case UP_TO_DOWN_AND_APPEAR:\r
+                       return new UpDownAppearTransition();\r
+        default:\r
+            return null;\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/UpDownAppearTransition.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/UpDownAppearTransition.java
new file mode 100644 (file)
index 0000000..b849657
--- /dev/null
@@ -0,0 +1,34 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+/**\r
+ * In this transition, the second control is behind, the first control is\r
+ * sliding from up to down\r
+ */\r
+public class UpDownAppearTransition extends VerticalTransition {\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.VerticalTransition#getCoeff()\r
+        */\r
+       @Override\r
+       protected int getCoeff() {\r
+               return 1;\r
+       }\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.VerticalTransition#secondIsBehind()\r
+        */\r
+       @Override\r
+       protected boolean secondIsBehind() {\r
+               return false;\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/UpDownTransition.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/UpDownTransition.java
new file mode 100644 (file)
index 0000000..e352a59
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+/**\r
+ * In this transition, both control are sliding (vertical movement, up to down)\r
+ */\r
+public class UpDownTransition extends VerticalTransition {\r
+\r
+       @Override\r
+       protected int getCoeff() {\r
+               return 1;\r
+       }\r
+\r
+       @Override\r
+       protected boolean secondIsBehind() {\r
+               return true;\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/VerticalTransition.java b/org.tizen.common.externals/src/org/mihalis/opal/transitionComposite/VerticalTransition.java
new file mode 100644 (file)
index 0000000..ffe0942
--- /dev/null
@@ -0,0 +1,84 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron@gmail.com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.transitionComposite;\r
+\r
+import org.eclipse.swt.widgets.Control;\r
+\r
+/**\r
+ * Instances of this class are vertical transitions (down>up, up>down...)\r
+ */\r
+abstract class VerticalTransition implements Transition {\r
+\r
+       /**\r
+        * @see org.mihalis.opal.transitionComposite.Transition#performTransition(org.eclipse.swt.widgets.Control,\r
+        *      org.eclipse.swt.widgets.Control)\r
+        */\r
+       @Override\r
+       public void performTransition(final Control first, final Control second) {\r
+               if (first.isDisposed() || second.isDisposed()) {\r
+                       return;\r
+               }\r
+\r
+               final int[] currentPosition = new int[1];\r
+               currentPosition[0] = 0;\r
+               final int maxValue = first.getParent().getClientArea().height;\r
+\r
+               first.setBounds(0, 0, first.getBounds().width, first.getBounds().height);\r
+               second.setBounds(0, -1 * second.getBounds().width, second.getBounds().width, second.getBounds().height);\r
+\r
+               first.moveAbove(second);\r
+               second.setVisible(true);\r
+\r
+               if (first.isDisposed() || first.getDisplay().isDisposed()) {\r
+                       return;\r
+               }\r
+\r
+               first.getDisplay().timerExec(0, new Runnable() {\r
+\r
+                       @Override\r
+                       public void run() {\r
+\r
+                               if (first.isDisposed() || second.isDisposed()) {\r
+                                       return;\r
+                               }\r
+\r
+                               currentPosition[0] = currentPosition[0] + 10;\r
+                               if (currentPosition[0] > maxValue) {\r
+                                       first.setVisible(false);\r
+                                       second.setBounds(0, 0, first.getBounds().width, first.getBounds().height);\r
+\r
+                                       return;\r
+                               }\r
+\r
+                               first.setBounds(0, getCoeff() * currentPosition[0], first.getBounds().width, first.getBounds().height);\r
+                               if (secondIsBehind()) {\r
+                                       second.setBounds(0, -1 * getCoeff() * (maxValue - currentPosition[0]), second.getBounds().width, second.getBounds().height);\r
+                               }\r
+                               if (!first.isDisposed() && !first.getDisplay().isDisposed()) {\r
+                                       first.getDisplay().timerExec(15, this);\r
+                               }\r
+                       }\r
+\r
+               });\r
+\r
+       }\r
+\r
+       /**\r
+        * @return the multiplicator coefficient\r
+        */\r
+       protected abstract int getCoeff();\r
+\r
+       /**\r
+        * @return <code>true</code> if the second composite is behind the first\r
+        *         one, <code>false</code> otherwise\r
+        */\r
+       protected abstract boolean secondIsBehind();\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/utils/FileToolbox.java b/org.tizen.common.externals/src/org/mihalis/opal/utils/FileToolbox.java
new file mode 100644 (file)
index 0000000..7201ffc
--- /dev/null
@@ -0,0 +1,47 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation\r
+ *******************************************************************************/\r
+package org.mihalis.opal.utils;\r
+\r
+import java.io.FileInputStream;\r
+import java.io.FileNotFoundException;\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+import java.net.MalformedURLException;\r
+import java.net.URL;\r
+\r
+public class FileToolbox {\r
+\r
+    /**\r
+     * Loads a file into a stream\r
+     * \r
+     * @param fileName file name\r
+     * @return a stream composed of this file\r
+     */\r
+    public static InputStream getInputStream(final String fileName) {\r
+        if (fileName.startsWith("jar:")) {\r
+            URL url;\r
+            try {\r
+                url = new URL(fileName);\r
+                return url.openStream();\r
+            } catch (final MalformedURLException e) {\r
+                throw new RuntimeException(e);\r
+            } catch (final IOException e) {\r
+                throw new RuntimeException(e);\r
+            }\r
+        } else {\r
+            try {\r
+                return new FileInputStream(fileName);\r
+            } catch (final FileNotFoundException e) {\r
+                throw new RuntimeException(e);\r
+            }\r
+        }\r
+    }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/utils/HTMLStyledTextParser.java b/org.tizen.common.externals/src/org/mihalis/opal/utils/HTMLStyledTextParser.java
new file mode 100644 (file)
index 0000000..d928047
--- /dev/null
@@ -0,0 +1,179 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.utils;\r
+\r
+import java.io.IOException;\r
+import java.io.StringReader;\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import javax.swing.text.MutableAttributeSet;\r
+import javax.swing.text.html.HTML.Tag;\r
+import javax.swing.text.html.HTMLEditorKit;\r
+import javax.swing.text.html.HTMLEditorKit.ParserCallback;\r
+import javax.swing.text.html.parser.ParserDelegator;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.custom.StyleRange;\r
+import org.eclipse.swt.custom.StyledText;\r
+\r
+/**\r
+ * Instances of this class are used to convert HTML content of a styled text\r
+ * into style ranges\r
+ */\r
+public class HTMLStyledTextParser extends ParserCallback {\r
+\r
+       private final List<StyleRange> listOfStyles;\r
+       private final StyledText styledText;\r
+       private int position;\r
+       private final StringBuilder outputString;\r
+\r
+       private StyleRange currentStyleRange;\r
+       private TagType currentTagType;\r
+       private int currentPosition;\r
+\r
+       private enum TagType {\r
+               B, U, I\r
+       };\r
+\r
+       /**\r
+        * Constructor\r
+        * \r
+        * @param styledText styled text to analyze\r
+        */\r
+       HTMLStyledTextParser(final StyledText styledText) {\r
+               super();\r
+               this.styledText = styledText;\r
+               this.position = -1;\r
+               this.listOfStyles = new ArrayList<StyleRange>();\r
+               this.currentStyleRange = null;\r
+               this.currentTagType = null;\r
+               this.currentPosition = 0;\r
+               this.outputString = new StringBuilder();\r
+       }\r
+\r
+       /**\r
+        * @see javax.swing.text.html.HTMLEditorKit.ParserCallback#handleStartTag(javax.swing.text.html.HTML.Tag,\r
+        *      javax.swing.text.MutableAttributeSet, int)\r
+        */\r
+       @Override\r
+       public void handleStartTag(final Tag t, final MutableAttributeSet a, final int pos) {\r
+               if (t == Tag.B) {\r
+                       this.currentStyleRange = new StyleRange();\r
+                       this.currentTagType = TagType.B;\r
+                       this.currentPosition = this.position;\r
+               }\r
+               if (t == Tag.I) {\r
+                       this.currentStyleRange = new StyleRange();\r
+                       this.currentTagType = TagType.I;\r
+                       this.currentPosition = this.position;\r
+               }\r
+               if (t == Tag.U) {\r
+                       this.currentStyleRange = new StyleRange();\r
+                       this.currentTagType = TagType.U;\r
+                       this.currentPosition = this.position;\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+        * @see javax.swing.text.html.HTMLEditorKit.ParserCallback#handleEndTag(javax.swing.text.html.HTML.Tag,\r
+        *      int)\r
+        */\r
+       @Override\r
+       public void handleEndTag(final Tag t, final int pos) {\r
+\r
+               if (t != Tag.B && t != Tag.I && t != Tag.U) {\r
+                       return;\r
+               }\r
+\r
+               int style;\r
+               boolean underline;\r
+               if (t == Tag.B) {\r
+                       if (TagType.B != this.currentTagType) {\r
+                               throw new RuntimeException("Error parsing [" + this.styledText.getText() + "] : bad syntax");\r
+                       }\r
+                       style = SWT.BOLD;\r
+                       underline = false;\r
+               } else if (t == Tag.I) {\r
+                       if (TagType.I != this.currentTagType) {\r
+                               throw new RuntimeException("Error parsing [" + this.styledText.getText() + "] : bad syntax");\r
+                       }\r
+                       style = SWT.ITALIC;\r
+                       underline = false;\r
+               } else if (t == Tag.U) {\r
+                       if (TagType.U != this.currentTagType) {\r
+                               throw new RuntimeException("Error parsing [" + this.styledText.getText() + "] : bad syntax");\r
+                       }\r
+                       style = SWT.NORMAL;\r
+                       underline = true;\r
+               } else {\r
+                       style = SWT.NORMAL;\r
+                       underline = false;\r
+               }\r
+\r
+               this.currentStyleRange.start = this.currentPosition;\r
+               this.currentStyleRange.length = this.position - this.currentPosition + 1;\r
+               this.currentStyleRange.fontStyle = style;\r
+               this.currentStyleRange.underline = underline;\r
+               this.listOfStyles.add(this.currentStyleRange);\r
+\r
+               this.currentStyleRange = null;\r
+               this.currentTagType = null;\r
+       }\r
+\r
+       /**\r
+        * @see javax.swing.text.html.HTMLEditorKit.ParserCallback#handleError(java.lang.String,\r
+        *      int)\r
+        */\r
+       @Override\r
+       public void handleError(final String errorMsg, final int pos) {\r
+               throw new RuntimeException("Parsing error: " + errorMsg + " at " + pos);\r
+       }\r
+\r
+       /**\r
+        * @see javax.swing.text.html.HTMLEditorKit.ParserCallback#handleText(char[],\r
+        *      int)\r
+        */\r
+       @Override\r
+       public void handleText(final char[] data, final int pos) {\r
+               this.outputString.append(data);\r
+               this.position += data.length;\r
+       }\r
+\r
+       /**\r
+        * @see javax.swing.text.html.HTMLEditorKit.ParserCallback#handleSimpleTag(javax.swing.text.html.HTML.Tag,\r
+        *      javax.swing.text.MutableAttributeSet, int)\r
+        */\r
+       @Override\r
+       public void handleSimpleTag(final Tag t, final MutableAttributeSet a, final int pos) {\r
+               if (t == Tag.BR) {\r
+                       this.outputString.append("\n");\r
+                       this.position += t.toString().length();\r
+\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Parse the content, build the list of style ranges and apply them to the\r
+        * styled text widget\r
+        * \r
+        * @throws IOException\r
+        */\r
+       public void parse() throws IOException {\r
+               final HTMLEditorKit.Parser parser = new ParserDelegator();\r
+               parser.parse(new StringReader(this.styledText.getText()), this, true);\r
+               this.styledText.setText(this.outputString.toString());\r
+               this.styledText.setStyleRanges(this.listOfStyles.toArray(new StyleRange[this.listOfStyles.size()]));\r
+\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/utils/ResourceManager.java b/org.tizen.common.externals/src/org/mihalis/opal/utils/ResourceManager.java
new file mode 100644 (file)
index 0000000..7b910be
--- /dev/null
@@ -0,0 +1,67 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation\r
+ *******************************************************************************/\r
+\r
+package org.mihalis.opal.utils;\r
+\r
+import java.util.ResourceBundle;\r
+\r
+public class ResourceManager {\r
+       private static final ResourceBundle RSC = ResourceBundle.getBundle("resources/opal");\r
+\r
+       public static final String OK = "Ok";\r
+       public static final String CANCEL = "Cancel";\r
+       public static final String CLOSE = "Close";\r
+       public static final String YES = "Yes";\r
+       public static final String NO = "No";\r
+\r
+       public static final String MEGABYTES = "megabytes";\r
+       public static final String PERFORM_GC = "performGC";\r
+\r
+       public static final String LOGIN = "login";\r
+       public static final String NAME = "name";\r
+       public static final String PASSWORD = "password";\r
+       public static final String REMEMBER_PASSWORD = "rememberPassword";\r
+       public static final String LOGIN_FAILED = "loginFailed";\r
+\r
+       public static final String INPUT = "Input";\r
+       public static final String APPLICATION_ERROR = "ApplicationError";\r
+       public static final String INFORMATION = "Information";\r
+       public static final String WARNING = "Warning";\r
+       public static final String CHOICE = "Choice";\r
+       public static final String EXCEPTION = "Exception";\r
+       public static final String SELECT = "Select";\r
+       public static final String FEWER_DETAILS = "FewerDetails";\r
+       public static final String MORE_DETAILS = "MoreDetails";\r
+\r
+       public static final String TIP_OF_THE_DAY = "tipOfTheDay";\r
+       public static final String DID_YOU_KNOW = "didYouKnow";\r
+       public static final String SHOW_TIP_AT_STARTUP = "showTipAtStartup";\r
+       public static final String PREVIOUS_TIP = "previousTip";\r
+       public static final String NEXT_TIP = "nextTip";\r
+\r
+       public static final String CHOOSE = "choose";\r
+       public static final String PREFERENCES = "preferences";\r
+       public static final String VALID_URL = "validURL";\r
+       public static final String CHOOSE_DIRECTORY = "chooseDirectory";\r
+       public static final String ITALIC = "italic";\r
+       public static final String BOLD = "bold";\r
+\r
+       /**\r
+        * Get a translated label\r
+        * \r
+        * @param key key to get\r
+        * @return the translated value of the key\r
+        */\r
+       public static String getLabel(final String key) {\r
+               return RSC.getString(key);\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/utils/SWTGraphicUtil.java b/org.tizen.common.externals/src/org/mihalis/opal/utils/SWTGraphicUtil.java
new file mode 100644 (file)
index 0000000..e28dd52
--- /dev/null
@@ -0,0 +1,463 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.utils;\r
+\r
+import java.io.IOException;\r
+import java.util.ArrayList;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.custom.StyledText;\r
+import org.eclipse.swt.events.DisposeEvent;\r
+import org.eclipse.swt.events.DisposeListener;\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.FontData;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.ImageData;\r
+import org.eclipse.swt.graphics.PaletteData;\r
+import org.eclipse.swt.graphics.RGB;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.graphics.Resource;\r
+import org.eclipse.swt.graphics.Transform;\r
+import org.eclipse.swt.widgets.Composite;\r
+import org.eclipse.swt.widgets.Control;\r
+import org.eclipse.swt.widgets.Display;\r
+import org.eclipse.swt.widgets.Monitor;\r
+import org.eclipse.swt.widgets.Shell;\r
+\r
+/**\r
+ * This class is a singleton that provides useful methods\r
+ */\r
+public class SWTGraphicUtil {\r
+\r
+       /**\r
+        * Constructor\r
+        */\r
+       private SWTGraphicUtil() {\r
+       }\r
+\r
+       /**\r
+        * Dispose safely any SWT resource when a control is disposed\r
+        * \r
+        * @param r the resource to dispose\r
+        */\r
+       public static void dispose(final Control control, final Resource r) {\r
+               control.addDisposeListener(new DisposeListener() {\r
+\r
+                       @Override\r
+                       public void widgetDisposed(final DisposeEvent e) {\r
+                               dispose(r);\r
+                       }\r
+               });\r
+       }\r
+\r
+       /**\r
+        * Dispose safely any SWT resource\r
+        * \r
+        * @param r the resource to dispose\r
+        */\r
+       public static void dispose(final Resource r) {\r
+               if (r != null && !r.isDisposed()) {\r
+                       r.dispose();\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Loads an image and create a SWT Image corresponding to this file\r
+        * \r
+        * @param fileName file name of the image\r
+        * @return an image\r
+        * @see org.eclipse.swt.graphics.Image\r
+        */\r
+       public static Image createImage(final String fileName) {\r
+               return new Image(Display.getCurrent(), SWTGraphicUtil.class.getClassLoader().getResourceAsStream(fileName));\r
+       }\r
+\r
+       /**\r
+        * Create a reflected image of a source Inspired by Daniel Spiewak\r
+        * (http://www.eclipsezone.com/eclipse/forums/t91013.html)\r
+        * \r
+        * @param source source to be reflected\r
+        * @return the source image with a reflection\r
+        */\r
+       public static Image createReflectedImage(final Image source) {\r
+               if (source == null) {\r
+                       return null;\r
+               }\r
+\r
+               if (source.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+\r
+               // Create a new image\r
+               final Rectangle sourceBounds = source.getBounds();\r
+               final Image newImage = new Image(source.getDevice(), new Rectangle(0, 0, sourceBounds.width, (int) (sourceBounds.height * 1.5)));\r
+               final GC gc = new GC(newImage);\r
+               gc.setAdvanced(true);\r
+\r
+               gc.drawImage(source, 0, 0);\r
+\r
+               // Add the reflection\r
+               final Transform t = new Transform(source.getDevice());\r
+               t.setElements(1, 0, 0, -.5f, 0, sourceBounds.height + sourceBounds.height / 2);\r
+               gc.setTransform(t);\r
+\r
+               gc.drawImage(source, 0, 0);\r
+\r
+               t.dispose();\r
+               gc.dispose();\r
+\r
+               // And add the alpha mask\r
+               final ImageData imgData = newImage.getImageData();\r
+               final int width = imgData.width;\r
+               final int height = imgData.height;\r
+               final byte[] alphaData = new byte[height * width];\r
+\r
+               final byte[] noAlpha = new byte[width];\r
+               for (int x = 0; x < width; x++) {\r
+                       noAlpha[x] = (byte) 255;\r
+               }\r
+\r
+               for (int y = 0; y < height; y++) {\r
+                       final byte[] alphaRow = new byte[width];\r
+                       if (y < sourceBounds.height) {\r
+                               System.arraycopy(noAlpha, 0, alphaData, y * width, width);\r
+                       } else {\r
+                               for (int x = 0; x < width; x++) {\r
+                                       alphaRow[x] = (byte) (255 - 255 * y / height);\r
+                               }\r
+                               System.arraycopy(alphaRow, 0, alphaData, y * width, width);\r
+                       }\r
+\r
+               }\r
+               imgData.alphaData = alphaData;\r
+               return new Image(source.getDevice(), imgData);\r
+       }\r
+\r
+       /**\r
+        * Returns a new scaled image.\r
+        * \r
+        * @param source the image to be scaled\r
+        * @param newWidth new width of the image\r
+        * @param newHeight new height of the image\r
+        * @return a scaled image of the source\r
+        */\r
+       public static Image resize(final Image source, final int newWidth, final int newHeight) {\r
+\r
+               if (source == null) {\r
+                       return null;\r
+               }\r
+\r
+               if (source.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+\r
+               final Image scaledImage = new Image(source.getDevice(), newWidth, newHeight);\r
+               final GC gc = new GC(scaledImage);\r
+               gc.setAntialias(SWT.ON);\r
+               gc.setInterpolation(SWT.HIGH);\r
+               gc.drawImage(source, 0, 0, source.getBounds().width, source.getBounds().height, 0, 0, newWidth, newHeight);\r
+               gc.dispose();\r
+\r
+               return scaledImage;\r
+       }\r
+\r
+       /**\r
+        * Create a reflected and resized version of an image\r
+        * \r
+        * @param source source image to be scaled and reflected\r
+        * @param newWidth new width of the scaled image\r
+        * @param newHeight new height of the scaled image\r
+        * @return the resized and reflected image\r
+        */\r
+       public static Image createReflectedResizedImage(final Image source, final int newWidth, final int newHeight) {\r
+               if (source == null) {\r
+                       return null;\r
+               }\r
+\r
+               if (source.isDisposed()) {\r
+                       SWT.error(SWT.ERROR_WIDGET_DISPOSED);\r
+               }\r
+\r
+               final Image newImage = new Image(source.getDevice(), newWidth, (int) (newHeight * 1.5));\r
+               final GC gc = new GC(newImage);\r
+               gc.setAntialias(SWT.ON);\r
+               gc.setInterpolation(SWT.HIGH);\r
+               gc.drawImage(source, 0, 0, source.getBounds().width, source.getBounds().height, 0, 0, newWidth, newHeight);\r
+\r
+               // Add the reflection\r
+               final Transform t = new Transform(source.getDevice());\r
+               t.setElements(1, 0, 0, -.5f, 0, (float) (newHeight * 1.5));\r
+               gc.setTransform(t);\r
+\r
+               gc.drawImage(source, 0, 0, source.getBounds().width, source.getBounds().height, 0, 0, newWidth, newHeight);\r
+\r
+               t.dispose();\r
+               gc.dispose();\r
+\r
+               // And add the alpha mask\r
+               final ImageData imgData = newImage.getImageData();\r
+               final int width = imgData.width;\r
+               final int height = imgData.height;\r
+               final byte[] alphaData = new byte[height * width];\r
+\r
+               final byte[] noAlpha = new byte[width];\r
+               for (int x = 0; x < width; x++) {\r
+                       noAlpha[x] = (byte) 255;\r
+               }\r
+\r
+               for (int y = 0; y < height; y++) {\r
+                       final byte[] alphaRow = new byte[width];\r
+                       if (y < newHeight) {\r
+                               System.arraycopy(noAlpha, 0, alphaData, y * width, width);\r
+                       } else {\r
+                               for (int x = 0; x < width; x++) {\r
+                                       alphaRow[x] = (byte) (255 - 255 * y / height);\r
+                               }\r
+                               System.arraycopy(alphaRow, 0, alphaData, y * width, width);\r
+                       }\r
+\r
+               }\r
+               imgData.alphaData = alphaData;\r
+               return new Image(source.getDevice(), imgData);\r
+\r
+       }\r
+\r
+       /**\r
+        * Center a shell on the screen\r
+        * \r
+        * @param shell shell to center\r
+        */\r
+       public static void centerShell(final Shell shell) {\r
+               final Monitor primary = shell.getDisplay().getPrimaryMonitor();\r
+               final Rectangle bounds = primary.getBounds();\r
+               final Rectangle rect = shell.getBounds();\r
+               final int x = bounds.x + (bounds.width - rect.width) / 2;\r
+               final int y = bounds.y + (bounds.height - rect.height) / 2;\r
+               shell.setLocation(x, y);\r
+       }\r
+\r
+       /**\r
+        * Apply a very basic HTML formating to a text stored in a StyledText\r
+        * widget. Supported tags are <B>, <I> and <U>\r
+        * \r
+        * @param styledText styled text that contains an HTML text\r
+        */\r
+       public static void applyHTMLFormating(final StyledText styledText) {\r
+               try {\r
+                       new HTMLStyledTextParser(styledText).parse();\r
+               } catch (final IOException e) {\r
+                       e.printStackTrace();\r
+               }\r
+       }\r
+\r
+       /**\r
+        * @param originalImageData The ImageData to be average blurred.\r
+        *            Transparency information will be ignored.\r
+        * @param radius the number of radius pixels to consider when blurring\r
+        *            image.\r
+        * @return A blurred copy of the image data, or null if an error occured.\r
+        * @author Nicholas Rajendram\r
+        * @see http://www.jasonwaltman.com/thesis/filter-blur.html\r
+        * @see http://www.blackpawn.com/texts/blur/default.html\r
+        */\r
+       public static ImageData blur(final ImageData originalImageData, int radius) {\r
+               /*\r
+                * This method will vertically blur all the pixels in a row at once.\r
+                * This blurring is performed incrementally to each row.\r
+                * \r
+                * In order to vertically blur any given pixel, maximally (radius * 2 +\r
+                * 1) pixels must be examined. Since each of these pixels exists in the\r
+                * same column, they span across a series of consecutive rows. These\r
+                * rows are horizontally blurred before being cached and used as input\r
+                * for the vertical blur. Blurring a pixel horizontally and then\r
+                * vertically is equivalent to blurring the pixel with both its\r
+                * horizontal and vertical neighbours at once.\r
+                * \r
+                * Pixels are blurred under the notion of a 'summing scope'. A certain\r
+                * scope of pixels in a column are summed then averaged to determine a\r
+                * target pixel's resulting RGB value. When the next lower target pixel\r
+                * is being calculated, the topmost pixel is removed from the summing\r
+                * scope (by subtracting its RGB) and a new pixel is added to the bottom\r
+                * of the scope (by adding its RGB). In this sense, the summing scope is\r
+                * moving downward.\r
+                */\r
+               if (radius < 1) {\r
+                       return originalImageData;\r
+               }\r
+               // prepare new image data with 24-bit direct palette to hold blurred\r
+               // copy of image\r
+               final ImageData newImageData = new ImageData(originalImageData.width, originalImageData.height, 24, new PaletteData(0xFF, 0xFF00, 0xFF0000));\r
+               if (radius >= newImageData.height || radius >= newImageData.width) {\r
+                       radius = Math.min(newImageData.height, newImageData.width) - 1;\r
+               }\r
+               // initialize cache\r
+               final ArrayList<RGB[]> rowCache = new ArrayList<RGB[]>();\r
+               final int cacheSize = radius * 2 + 1 > newImageData.height ? newImageData.height : radius * 2 + 1; // number\r
+                                                                                                                                                                                                                       // of\r
+                                                                                                                                                                                                                       // rows\r
+                                                                                                                                                                                                                       // of\r
+                                                                                                                                                                                                                       // imageData\r
+                                                                                                                                                                                                                       // we\r
+                                                                                                                                                                                                                       // cache\r
+               int cacheStartIndex = 0; // which row of imageData the cache begins with\r
+               for (int row = 0; row < cacheSize; row++) {\r
+                       // row data is horizontally blurred before caching\r
+                       rowCache.add(rowCache.size(), blurRow(originalImageData, row, radius));\r
+               }\r
+               // sum red, green, and blue values separately for averaging\r
+               final RGB[] rowRGBSums = new RGB[newImageData.width];\r
+               final int[] rowRGBAverages = new int[newImageData.width];\r
+               int topSumBoundary = 0; // current top row of summed values scope\r
+               int targetRow = 0; // row with RGB averages to be determined\r
+               int bottomSumBoundary = 0; // current bottom row of summed values scope\r
+               int numRows = 0; // number of rows included in current summing scope\r
+               for (int i = 0; i < newImageData.width; i++) {\r
+                       rowRGBSums[i] = new RGB(0, 0, 0);\r
+               }\r
+               while (targetRow < newImageData.height) {\r
+                       if (bottomSumBoundary < newImageData.height) {\r
+                               do {\r
+                                       // sum pixel RGB values for each column in our radius scope\r
+                                       for (int col = 0; col < newImageData.width; col++) {\r
+                                               rowRGBSums[col].red += rowCache.get(bottomSumBoundary - cacheStartIndex)[col].red;\r
+                                               rowRGBSums[col].green += rowCache.get(bottomSumBoundary - cacheStartIndex)[col].green;\r
+                                               rowRGBSums[col].blue += rowCache.get(bottomSumBoundary - cacheStartIndex)[col].blue;\r
+                                       }\r
+                                       numRows++;\r
+                                       bottomSumBoundary++; // move bottom scope boundary lower\r
+                                       if (bottomSumBoundary < newImageData.height && bottomSumBoundary - cacheStartIndex > radius * 2) {\r
+                                               // grow cache\r
+                                               rowCache.add(rowCache.size(), blurRow(originalImageData, bottomSumBoundary, radius));\r
+                                       }\r
+                               } while (bottomSumBoundary <= radius); // to initialize\r
+                                                                                                               // rowRGBSums at start\r
+                       }\r
+                       if (targetRow - topSumBoundary > radius) {\r
+                               // subtract values of top row from sums as scope of summed\r
+                               // values moves down\r
+                               for (int col = 0; col < newImageData.width; col++) {\r
+                                       rowRGBSums[col].red -= rowCache.get(topSumBoundary - cacheStartIndex)[col].red;\r
+                                       rowRGBSums[col].green -= rowCache.get(topSumBoundary - cacheStartIndex)[col].green;\r
+                                       rowRGBSums[col].blue -= rowCache.get(topSumBoundary - cacheStartIndex)[col].blue;\r
+                               }\r
+                               numRows--;\r
+                               topSumBoundary++; // move top scope boundary lower\r
+                               rowCache.remove(0); // remove top row which is out of summing\r
+                                                                       // scope\r
+                               cacheStartIndex++;\r
+                       }\r
+                       // calculate each column's RGB-averaged pixel\r
+                       for (int col = 0; col < newImageData.width; col++) {\r
+                               rowRGBAverages[col] = newImageData.palette.getPixel(new RGB(rowRGBSums[col].red / numRows, rowRGBSums[col].green / numRows, rowRGBSums[col].blue / numRows));\r
+                       }\r
+                       // replace original pixels\r
+                       newImageData.setPixels(0, targetRow, newImageData.width, rowRGBAverages, 0);\r
+                       targetRow++;\r
+               }\r
+               return newImageData;\r
+       }\r
+\r
+       /**\r
+        * Average blurs a given row of image data. Returns the blurred row as a\r
+        * matrix of separated RGB values.\r
+        */\r
+       private static RGB[] blurRow(final ImageData originalImageData, final int row, final int radius) {\r
+               final RGB[] rowRGBAverages = new RGB[originalImageData.width]; // resulting\r
+                                                                                                                                               // rgb\r
+                                                                                                                                               // averages\r
+               final int[] lineData = new int[originalImageData.width];\r
+               originalImageData.getPixels(0, row, originalImageData.width, lineData, 0);\r
+               int r = 0, g = 0, b = 0; // sum red, green, and blue values separately\r
+                                                                       // for averaging\r
+               int leftSumBoundary = 0; // beginning index of summed values scope\r
+               int targetColumn = 0; // column of RGB average to be determined\r
+               int rightSumBoundary = 0; // ending index of summed values scope\r
+               int numCols = 0; // number of columns included in current summing scope\r
+               RGB rgb;\r
+               while (targetColumn < lineData.length) {\r
+                       if (rightSumBoundary < lineData.length) {\r
+                               // sum RGB values for each pixel in our radius scope\r
+                               do {\r
+                                       rgb = originalImageData.palette.getRGB(lineData[rightSumBoundary]);\r
+                                       r += rgb.red;\r
+                                       g += rgb.green;\r
+                                       b += rgb.blue;\r
+                                       numCols++;\r
+                                       rightSumBoundary++;\r
+                               } while (rightSumBoundary <= radius); // to initialize summing\r
+                                                                                                               // scope at start\r
+                       }\r
+                       // subtract sum of left pixel as summing scope moves right\r
+                       if (targetColumn - leftSumBoundary > radius) {\r
+                               rgb = originalImageData.palette.getRGB(lineData[leftSumBoundary]);\r
+                               r -= rgb.red;\r
+                               g -= rgb.green;\r
+                               b -= rgb.blue;\r
+                               numCols--;\r
+                               leftSumBoundary++;\r
+                       }\r
+                       // calculate RGB averages\r
+                       rowRGBAverages[targetColumn] = new RGB(r / numCols, g / numCols, b / numCols);\r
+                       targetColumn++;\r
+               }\r
+               return rowRGBAverages;\r
+       }\r
+\r
+       /**\r
+        * Enable/disable all widgets of a control\r
+        * \r
+        * @param control control to enable/disable\r
+        * @param enable <code>true</code> to enable, <code>false</code> to disable\r
+        */\r
+       public static void enable(final Control control, final boolean enable) {\r
+               if (control instanceof Composite) {\r
+                       for (final Control c : ((Composite) control).getChildren()) {\r
+                               enable(c, enable);\r
+                       }\r
+               }\r
+               control.setEnabled(enable);\r
+       }\r
+\r
+       /**\r
+        * Build a font from a given control. Useful if we just want a bold label\r
+        * for example\r
+        * \r
+        * @param control control that handle the default font\r
+        * @param style new style\r
+        * @return a font with the given style\r
+        */\r
+       public static Font buildFontFrom(final Control control, final int style) {\r
+               final Font temp = control.getFont();\r
+               final FontData[] fontData = temp.getFontData();\r
+               if (fontData == null || fontData.length == 0) {\r
+                       return temp;\r
+               }\r
+               return new Font(control.getDisplay(), fontData[0].getName(), fontData[0].getHeight(), style);\r
+       }\r
+\r
+       /**\r
+        * Build a font from a given control. Useful if we just want a bold label\r
+        * for example\r
+        * \r
+        * @param control control that handle the default font\r
+        * @param style new style\r
+        * @return a font with the given style\r
+        */\r
+       public static Font buildFontFrom(final Control control, final int style, final int size) {\r
+               final Font temp = control.getFont();\r
+               final FontData[] fontData = temp.getFontData();\r
+               if (fontData == null || fontData.length == 0) {\r
+                       return temp;\r
+               }\r
+               return new Font(control.getDisplay(), fontData[0].getName(), size, style);\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/utils/SimpleSelectionAdapter.java b/org.tizen.common.externals/src/org/mihalis/opal/utils/SimpleSelectionAdapter.java
new file mode 100644 (file)
index 0000000..1299df6
--- /dev/null
@@ -0,0 +1,47 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - initial API and implementation\r
+ *******************************************************************************/\r
+\r
+package org.mihalis.opal.utils;\r
+\r
+import org.eclipse.swt.events.SelectionEvent;\r
+import org.eclipse.swt.events.SelectionListener;\r
+\r
+/**\r
+ * This class is an adapter for the SelectionListener. Both behaviours (DefaultSelected and Selected) are doing the same thing\r
+ */\r
+public abstract class SimpleSelectionAdapter implements SelectionListener {\r
+\r
+    /**\r
+     * @see org.eclipse.swt.events.SelectionListener#widgetDefaultSelected(org.eclipse.swt.events.SelectionEvent)\r
+     */\r
+    @Override\r
+    public void widgetDefaultSelected(final SelectionEvent e) {\r
+        this.handle(e);\r
+\r
+    }\r
+\r
+    /**\r
+     * @see org.eclipse.swt.events.SelectionListener#widgetSelected(org.eclipse.swt.events.SelectionEvent)\r
+     */\r
+    @Override\r
+    public void widgetSelected(final SelectionEvent e) {\r
+        this.handle(e);\r
+\r
+    }\r
+\r
+    /**\r
+     * Sent when selection occurs in the control.\r
+     * \r
+     * @param e - an event containing information about the selection\r
+     */\r
+    public abstract void handle(SelectionEvent e);\r
+\r
+}\r
diff --git a/org.tizen.common.externals/src/org/mihalis/opal/utils/StringUtil.java b/org.tizen.common.externals/src/org/mihalis/opal/utils/StringUtil.java
new file mode 100644 (file)
index 0000000..7c1994c
--- /dev/null
@@ -0,0 +1,73 @@
+/*******************************************************************************\r
+ * Copyright (c) 2011 Laurent CARON\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     Laurent CARON (laurent.caron at gmail dot com) - Initial implementation and API\r
+ *******************************************************************************/\r
+package org.mihalis.opal.utils;\r
+\r
+import java.io.PrintWriter;\r
+import java.io.StringWriter;\r
+\r
+/**\r
+ * This class provides useful String manipulation methods\r
+ * \r
+ */\r
+public class StringUtil {\r
+       /**\r
+        * Check if a string is empty or null\r
+        * \r
+        * @param source source string\r
+        * @return <code>true</code> is the string is empty or null,\r
+        *         <code>false</code> otherwise\r
+        */\r
+       public static boolean isEmpty(final String source) {\r
+               return source == null || source.trim().isEmpty();\r
+       }\r
+\r
+       /**\r
+        * Converts exception stack trace as string\r
+        * \r
+        * @param exception exception to convert\r
+        * @return a string that contains the exception\r
+        */\r
+       public static final String stackStraceAsString(final Throwable exception) {\r
+               final StringWriter stringWriter = new StringWriter();\r
+               exception.printStackTrace(new PrintWriter(stringWriter));\r
+               return stringWriter.toString();\r
+       }\r
+\r
+       /**\r
+        * Insert a string in a middle of another string\r
+        * \r
+        * @param source source string\r
+        * @param newEntry string to insert into source\r
+        * @param position position to insert source\r
+        * @return the new string\r
+        */\r
+       public static String insertString(final String source, final String newEntry, final int position) {\r
+               final StringBuilder sb = new StringBuilder();\r
+               sb.append(source.substring(0, position)).append(newEntry).append(source.substring(position));\r
+               return sb.toString();\r
+       }\r
+\r
+       /**\r
+        * Remove a character in a String\r
+        * \r
+        * @param source source string\r
+        * @param position position of the character to remove\r
+        * @return the string without the character\r
+        */\r
+       public static String removeCharAt(final String source, final int position) {\r
+               final StringBuilder sb = new StringBuilder();\r
+               if (position == source.length()) {\r
+                       return source;\r
+               }\r
+               sb.append(source.substring(0, position)).append(source.substring(position + 1));\r
+               return sb.toString();\r
+       }\r
+}\r
diff --git a/org.tizen.common.externals/src/org/tizen/common/externals/ExternalsPlugin.java b/org.tizen.common.externals/src/org/tizen/common/externals/ExternalsPlugin.java
new file mode 100644 (file)
index 0000000..6201817
--- /dev/null
@@ -0,0 +1,76 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Jihoon Song <jihoon80.song@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.externals;\r
+\r
+import org.eclipse.ui.plugin.AbstractUIPlugin;\r
+import org.osgi.framework.BundleContext;\r
+\r
+/**\r
+ * The activator class controls the plug-in life cycle\r
+ */\r
+public class ExternalsPlugin extends AbstractUIPlugin {\r
+\r
+       // The plug-in ID\r
+       public static final String PLUGIN_ID = "org.tizen.common.extras"; //$NON-NLS-1$\r
+\r
+       // The shared instance\r
+       private static ExternalsPlugin plugin;\r
+       \r
+       /**\r
+        * The constructor\r
+        */\r
+       public ExternalsPlugin() {\r
+       }\r
+\r
+       /*\r
+        * (non-Javadoc)\r
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)\r
+        */\r
+       public void start(BundleContext context) throws Exception {\r
+               super.start(context);\r
+               plugin = this;\r
+       }\r
+\r
+       /*\r
+        * (non-Javadoc)\r
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)\r
+        */\r
+       public void stop(BundleContext context) throws Exception {\r
+               plugin = null;\r
+               super.stop(context);\r
+       }\r
+\r
+       /**\r
+        * Returns the shared instance\r
+        *\r
+        * @return the shared instance\r
+        */\r
+       public static ExternalsPlugin getDefault() {\r
+               return plugin;\r
+       }\r
+\r
+}\r
index bee14d1..58e60a8 100644 (file)
@@ -1,6 +1,4 @@
 bin.includes = feature.xml,\
                license.html,\
                feature.properties,\
-               epl-v10.html,\
-               LICENSE-2.0.htm
-root = rootfiles
+               LICENSE-2.0.htm
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index 7ea234d..535edcc
@@ -1,21 +1,20 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
-      id="org.tizen.common.feature"
-      label="Tizen Common Tools"
-      version="0.20.0.qualifier"
-      provider-name="Samsung"
-      plugin="org.tizen.base.platform"
-      license-feature="org.tizen.base.feature">
-
-   <description>
-      Common library for Tizen SDK.
-   </description>
-
-   <copyright>
-      Copyright (c) 2010-2011, Samsung Electronics Co., LTD. All rights reserved.
-   </copyright>
-
-   <license url="license.html">
+<?xml version="1.0" encoding="UTF-8"?>\r
+<feature\r
+      id="org.tizen.common.feature"\r
+      label="Tizen Common"\r
+      version="1.0.0.qualifier"\r
+      plugin="org.tizen.common"\r
+      license-feature="org.tizen.base.feature">\r
+\r
+   <description>\r
+      Common library for Tizen SDK.\r
+   </description>\r
+\r
+   <copyright>\r
+      Copyright (c)\r
+   </copyright>\r
+\r
+   <license url="license.html">\r
       Tizen SDK
 
 Tizen SDK contains software portions licensed under various open source licenses as well as proprietary components.  All open source software portions (&quot;Open Source Software&quot;) are licensed under the open source licenses that accompany such Open Source Software.
@@ -26,21 +25,56 @@ Except for the Open Source Software contained in Tizen SDK, all other software p
 
 You may access and download Tizen SDK Open Source Software at: http://developer.tizen.org/download/tizenopensdk.tar.gz
 
-BY CLICKING THE &quot;I AGREE&quot; BUTTON OR BY USING ANY PART OF TIZEN SDK, YOU AGREE (ON BEHALF OF YOURSELF AND/OR YOUR COMPANY) TO THE OPEN SOURCE SOFTWARE LICENSE TERMS AND THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT. IF YOU DO NOT AGREE WITH THE OPEN SOURCE SOFTWARE LICENSE TERMS OR THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT, YOU MAY NOT DOWNLOAD OR USE TIZEN SDK.
-   </license>
-
-   <plugin
-         id="org.tizen.common"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.tizen.common.connection"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-</feature>
+BY CLICKING THE &quot;I AGREE&quot; BUTTON OR BY USING ANY PART OF TIZEN SDK, YOU AGREE (ON BEHALF OF YOURSELF AND/OR YOUR COMPANY) TO THE OPEN SOURCE SOFTWARE LICENSE TERMS AND THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT. IF YOU DO NOT AGREE WITH THE OPEN SOURCE SOFTWARE LICENSE TERMS OR THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT, YOU MAY NOT DOWNLOAD OR USE TIZEN SDK.\r
+   </license>\r
+\r
+   <plugin\r
+         id="org.tizen.common"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.tizen.common.connection"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.tizen.common.externals"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.tizen.common.verrari"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.tizen.common.sign"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.tizen.common.sdblib"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+   <plugin\r
+         id="org.tizen.common.verrari.realm"\r
+         download-size="0"\r
+         install-size="0"\r
+         version="0.0.0"\r
+         unpack="false"/>\r
+\r
+</feature>\r
index 2545107..c42e289 100644 (file)
@@ -1,22 +1,27 @@
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Tizen SOFTWARE DEVELOPMENT KIT (&quot;SDK&quot;) LICENSE AGREEMENT</title>
-</head>
-
-<body lang="EN-US">
-               <p align="center">Tizen SDK</p><br /><br />
-
-Tizen SDK contains software portions licensed under various open source licenses as well as proprietary components.  All open source software portions ("Open Source Software") are licensed under the open source licenses that accompany such Open Source Software.<br /><br />
-
-The licenses governing the Open Source Software are available at: <a href="http://developer.tizen.org/download/tizen_sdk_opensource_license.html">http://developer.tizen.org/download/tizen_sdk_opensource_license.html</a><br /><br />
-Except for the Open Source Software contained in Tizen SDK, all other software portions contained in Tizen SDK are governed by the terms and conditions of the Tizen Software Development Kit License Agreement, available at: <a href="http://developer.tizen.org/download/samsung_sdk_license.html">http://developer.tizen.org/download/samsung_sdk_license.html</a><br /><br />
-
-You may access and download Tizen SDK Open Source Software at: <a href="http://developer.tizen.org/download/tizenopensdk.tar.gz">http://developer.tizen.org/download/tizenopensdk.tar.gz</a><br /><br />
-
-BY CLICKING THE "I AGREE" BUTTON OR BY USING ANY PART OF TIZEN SDK, YOU AGREE (ON BEHALF OF YOURSELF AND/OR YOUR COMPANY) TO THE OPEN SOURCE SOFTWARE LICENSE TERMS AND THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT. IF YOU DO NOT AGREE WITH THE OPEN SOURCE SOFTWARE LICENSE TERMS OR THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT, YOU MAY NOT DOWNLOAD OR USE TIZEN SDK.<br /><br />
-</body>
-</html>
+<?xml version="1.0" encoding="ISO-8859-1" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+<head>\r
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />\r
+<title>Tizen SOFTWARE DEVELOPMENT KIT (&quot;SDK&quot;) LICENSE AGREEMENT</title>\r
+</head>\r
+\r
+<body lang="EN-US">\r
+               <p align="center">Tizen SDK</p><br /><br />\r
+\r
+Tizen SDK contains software portions licensed under various open source licenses as well as proprietary components.  All open source software portions ("Open Source Software") are licensed under the open source\r
+licenses that accompany such Open Source Software.<br/><br/>\r
+\r
+The licenses governing the Open Source Software are available at:<br />\r
+<a href="https://developer.tizen.org/tizen-sdk-opensource-license">https://developer.tizen.org/tizen-sdk-opensource-license</a><br /><br />\r
\r
+Except for the Open Source Software and proprietary components contributed from companies other than Samsung, contained in Tizen SDK, all other software portions contained in Tizen SDK are governed by the\r
+terms and conditions of the Samsung Tizen SDK License Agreement, available at:<br />\r
+<a href="https://developer.tizen.org/tizen-sdk-license">https://developer.tizen.org/tizen-sdk-license</a><br /><br />\r
+\r
+The licenses of all proprietary components contributed from companies other than Samsung will be either displayed as part of their respective installers or accessed inside installation package archive of each\r
+component.\r
+\r
+You may access and download Tizen SDK Open Source Software at:<br />\r
+<a href="http://developer.tizen.org/download/tizenopensdk.tar.gz">http://developer.tizen.org/download/tizenopensdk.tar.gz</a><br /><br />\r
+BY CLICKING THE "I AGREE" BUTTON OR BY USING ANY PART OF TIZEN SDK, YOU AGREE (ON BEHALF OF YOURSELF AND/OR YOUR COMPANY) TO THE OPEN SOURCE SOFTWARE LICENSE TERMS, THE SAMSUNG TIZEN SDK LICENSE AGREEMENT AND THE LICENSES OF ALL PROPRIETARY COMPONENTS CONTRIBUTED FROM COMPANIES OTHER THAN SAMSUNG. If you do not agree with the Open Source Software license terms or the SAMSUNG TIZEN SDK LICENSE AGREEMENT or THE LICENSES OF ALL PROPRIETARY COMPONENTS CONTRIBUTED FROM COMPANIES OTHER THAN SAMSUNG, you may not download or use Tizen SDK.\r
diff --git a/org.tizen.common.sdblib/.classpath b/org.tizen.common.sdblib/.classpath
new file mode 100644 (file)
index 0000000..ad32c83
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.common.sdblib/.project b/org.tizen.common.sdblib/.project
new file mode 100644 (file)
index 0000000..20024d8
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.common.sdblib</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.common.sdblib/.settings/org.eclipse.jdt.core.prefs b/org.tizen.common.sdblib/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..db78d86
--- /dev/null
@@ -0,0 +1,8 @@
+#Thu Nov 22 14:29:16 KST 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/org.tizen.common.sdblib/META-INF/MANIFEST.MF b/org.tizen.common.sdblib/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..6e5c6e9
--- /dev/null
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Tizen Common sdblib
+Bundle-SymbolicName: org.tizen.common.sdblib
+Bundle-Vendor: The Linux Foundation
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.tizen.sdblib
diff --git a/org.tizen.common.sdblib/build.properties b/org.tizen.common.sdblib/build.properties
new file mode 100644 (file)
index 0000000..34d2e4d
--- /dev/null
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/ArrayHelper.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/ArrayHelper.java
new file mode 100644 (file)
index 0000000..1c60c08
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+/**
+ * Utility class providing array to int/long conversion for data received from devices through sdb. 
+ */
+public final class ArrayHelper {
+
+    /**
+     * Swaps an unsigned value around, and puts the result in an array that can be sent to a device.
+     * @param value The value to swap.
+     * @param dest the destination array
+     * @param offset the offset in the array where to put the swapped value.
+     *      Array length must be at least offset + 4
+     */
+    public static void swap32bitsToArray(int value, byte[] dest, int offset) {
+        dest[offset] = (byte)(value & 0x000000FF);
+        dest[offset + 1] = (byte)((value & 0x0000FF00) >> 8);
+        dest[offset + 2] = (byte)((value & 0x00FF0000) >> 16);
+        dest[offset + 3] = (byte)((value & 0xFF000000) >> 24);
+    }
+
+    /**
+     * Reads a signed 32 bit integer from an array coming from a device.
+     * @param value the array containing the int
+     * @param offset the offset in the array at which the int starts
+     * @return the integer read from the array
+     */
+    public static int swap32bitFromArray(byte[] value, int offset) {
+        int v = 0;
+        v |= ((int)value[offset]) & 0x000000FF;
+        v |= (((int)value[offset + 1]) & 0x000000FF) << 8;
+        v |= (((int)value[offset + 2]) & 0x000000FF) << 16;
+        v |= (((int)value[offset + 3]) & 0x000000FF) << 24;
+
+        return v;
+    }
+    
+    /**
+     * Reads an unsigned 16 bit integer from an array coming from a device,
+     * and returns it as an 'int'
+     * @param value the array containing the 16 bit int (2 byte).
+     * @param offset the offset in the array at which the int starts
+     *      Array length must be at least offset + 2
+     * @return the integer read from the array.
+     */
+    public static int swapU16bitFromArray(byte[] value, int offset) {
+        int v = 0;
+        v |= ((int)value[offset]) & 0x000000FF;
+        v |= (((int)value[offset + 1]) & 0x000000FF) << 8;
+
+        return v;
+    }
+    
+    /**
+     * Reads a signed 64 bit integer from an array coming from a device.
+     * @param value the array containing the int
+     * @param offset the offset in the array at which the int starts
+     *      Array length must be at least offset + 8
+     * @return the integer read from the array
+     */
+    public static long swap64bitFromArray(byte[] value, int offset) {
+        long v = 0;
+        v |= ((long)value[offset]) & 0x00000000000000FFL;
+        v |= (((long)value[offset + 1]) & 0x00000000000000FFL) << 8;
+        v |= (((long)value[offset + 2]) & 0x00000000000000FFL) << 16;
+        v |= (((long)value[offset + 3]) & 0x00000000000000FFL) << 24;
+        v |= (((long)value[offset + 4]) & 0x00000000000000FFL) << 32;
+        v |= (((long)value[offset + 5]) & 0x00000000000000FFL) << 40;
+        v |= (((long)value[offset + 6]) & 0x00000000000000FFL) << 48;
+        v |= (((long)value[offset + 7]) & 0x00000000000000FFL) << 56;
+
+        return v;
+    }
+}
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/CrashReportService.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/CrashReportService.java
new file mode 100644 (file)
index 0000000..c6d2e5e
--- /dev/null
@@ -0,0 +1,281 @@
+/*
+ * CrashReportService
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * Yoonki Park <yoonki.park@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.sdblib;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.nio.ByteBuffer;
+import java.nio.channels.SelectionKey;
+import java.nio.channels.Selector;
+import java.nio.channels.SocketChannel;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.tizen.sdblib.SdbHelper.SdbResponse;
+import org.tizen.sdblib.SmartDevelopmentBridge.IDeviceChangeListener;
+
+/**
+ * CrashReportService provides notification to all listeners when a cs file is created.
+ * 
+ *  <p/>It is needed to implement {@link ICSServiceListener} for getting the service.
+ * @author yoonki.park<yoonki.park@samsung.com>
+ * 
+ */
+public final class CrashReportService implements IDeviceChangeListener {
+    private final static ArrayList<ICrashReportServiceListener> mCSListeners = new ArrayList<ICrashReportServiceListener>();
+    private static CrashReportService mInstance;
+    private Selector mSelector = null;
+    private volatile boolean finished = false;
+
+    private CrashReportService() throws IOException {
+        mSelector = Selector.open();
+        SmartDevelopmentBridge.addDeviceChangeListener(this);
+    }
+
+    /**
+     * Gets crash report service.
+     * @return
+     * @throws IOException
+     */
+    public static synchronized CrashReportService getService() throws IOException {
+        if (mInstance == null) {
+            mInstance = new CrashReportService();
+        }
+
+        return mInstance;
+    }
+
+    /**
+     * Initializes report channels when Tizen device are connected right after
+     * launching IDE.
+     */
+    private void initReportChannel() {
+        IDevice[] devices = SmartDevelopmentBridge.getBridge().getDevices();
+        for (IDevice device : devices) {
+            if (device.isOnline()) {
+                registerReportChannel(device);
+            }
+        }
+    }
+
+    /**
+     * Registers a channel for given device.
+     * 
+     * @param device
+     */
+    private void registerReportChannel(IDevice device) {
+        SocketChannel channel = null;
+
+        InetSocketAddress mAddress = SmartDevelopmentBridge.getSocketAddress();
+        try {
+            channel = SocketChannel.open(mAddress);
+            channel.configureBlocking(false);
+
+            SdbHelper.setDevice(channel, device);
+
+            byte[] request = SdbHelper.formSdbRequest("cs:");
+            SdbHelper.write(channel, request, -1, SdbPreferences.getTimeOut());
+
+            SdbResponse resp = SdbHelper.readSdbResponse(channel, false);
+
+            if (resp.okay == false) {
+                Log.e("sdb", "got unhappy response from sdb cs req: " + resp.message);
+                close(channel);
+                return;
+            }
+            Log.i("sdb", "registering CS Report Service");
+            mSelector.wakeup();
+            channel.register(mSelector, SelectionKey.OP_READ, device);
+            Log.i("sdb", "registered CS Report Service");
+        } catch (IOException e) {
+            Log.e("sdb", "failed to open a socket channel");
+        }
+    }
+
+    /**
+     * Starts CS Report Service
+     */
+    public void startService() {
+        new Thread("CS Report Service") {
+            @Override
+            public void run() {
+                Log.i("sdb", "starting CS Report Service");
+                initReportChannel(); // TODO : should moved to deviceConnected event
+                try {
+                    while (!finished) {
+                        if (mSelector.select() <= 0) { //spin-wait sleep, in ms
+                            Thread.sleep(SdbHelper.WAIT_TIME);
+                            continue;
+                        }
+                        Iterator it = mSelector.selectedKeys().iterator();
+                        while (it.hasNext()) {
+                            SelectionKey key = (SelectionKey) it.next();
+                            if (key.isConnectable()) {
+                                SocketChannel sc = (SocketChannel) key.channel();
+                                if (sc.isConnectionPending()) {
+                                    sc.finishConnect();
+                                }
+                            } else if (key.isReadable()) {
+                                read(key);
+                            }
+                            it.remove();
+                        }
+                    }
+                } catch (Exception e) {
+                    try {
+                        mSelector.close();
+                        Log.e("sdb", "select failed :" + e);
+                    } catch (IOException e1) {
+                       Log.e("sdb", "selector close failed :" + e);
+                    }
+                }
+            }
+        }.start();
+    }
+
+    /**
+    * Stops CS Report Service
+    */
+    public void stopService()
+    {
+        finished = true;
+        SmartDevelopmentBridge.removeDeviceChangeListener(this);
+    }
+
+    /**
+     * Reads a cs file path from the given key, and send this path to all
+     * listener.
+     * 
+     * @param key
+     *            Selected key.
+     * @return
+     */
+    private void read(SelectionKey key) {
+        SocketChannel sc = (SocketChannel) key.channel();
+        ByteBuffer reply = ByteBuffer.allocate(124);
+        int len = 0;
+
+        Charset charset = Charset.forName(SdbHelper.UTF_ENCODING);
+
+        try {
+            len = sc.read(reply);
+        } catch (IOException e) {
+            key.cancel();
+            close(sc);
+            Log.e("sdb", "read failed :" + e);
+        }
+        reply.flip();
+        Log.i("sdb", "read byte :" + len);
+        if (len < 0) {
+            close(sc);
+        } else {
+            if (len > 0) {
+                notifyAllListeners((IDevice) key.attachment(), charset.decode(reply).toString());
+            }
+        }
+
+        clearBuffer(reply);
+    }
+
+    private void clearBuffer(ByteBuffer buffer) {
+        if (buffer != null) {
+            buffer.clear();
+        }
+    }
+
+    /**
+     * Notifies all listeners of cs file path from the device.
+     * @param device
+     * @param path
+     */
+    private void notifyAllListeners(final IDevice device, final String path) {
+        // TODO : At this time, send to the one listener.
+
+        Log.i("sdb", "cs file is created and notify to " + device.getSerialNumber());
+        synchronized (mCSListeners) {
+            for (ICrashReportServiceListener listener : mCSListeners) {
+                if (device != null) {
+                    try {
+                        listener.fileCreated(device, path);
+                    } catch (Exception e) {
+                        Log.e("sdb", "unexpected error occurred :" + e);
+                    }
+                }
+            }
+        }
+    }
+
+    public static void addCrashReportServiceListener(ICrashReportServiceListener listener) {
+        synchronized (mCSListeners) {
+            if (mCSListeners.contains(listener) == false) {
+                mCSListeners.add(listener);
+            }
+        }
+    }
+
+    public static void removeCrashReportServiceListener(ICrashReportServiceListener listener) {
+        synchronized (mCSListeners) {
+            if (mCSListeners.contains(listener) == true) {
+                mCSListeners.remove(listener);
+            }
+        }
+    }
+
+    @Override
+    public void deviceConnected(IDevice device) {
+        if (device.isOnline()) {
+            Log.i("sdb", "welcome to new connection :" + device.getSerialNumber());
+            registerReportChannel(device);
+        }
+    }
+
+    @Override
+    public void deviceDisconnected(IDevice device) {
+        Log.i("sdb", "bye!:" + device.getSerialNumber());
+    }
+
+    @Override
+    public void deviceChanged(IDevice device, int changeMask) {
+        Log.i("sdb", "welcome to new connection :" + device.getSerialNumber());
+        if (changeMask == 1) {
+            deviceConnected(device);
+        }
+    }
+
+    /**
+     * Closes the connection.
+     */
+    private void close(SocketChannel channel) {
+        if (channel != null) {
+            try {
+                channel.close();
+            } catch (IOException e) {
+               Log.e("sdb", "close failed :" + e);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/Device.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/Device.java
new file mode 100644 (file)
index 0000000..21b4347
--- /dev/null
@@ -0,0 +1,287 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.tizen.sdblib.SyncService.SyncResult;
+
+
+
+/**
+ * A Device. It can be a physical device or an emulator.
+ */
+final class Device implements IDevice {
+       
+    private final static int INSTALL_TIMEOUT = 2*60*1000; //2min
+
+    final static String COMMAND_ARCHITECTURE_INFO = "uname -m";
+    final static String EMULATOR = "emulator";
+    final static String COMMAND_DEVICE_TYPE = "[ -f /dev/samsung_sdb ] || echo " + EMULATOR;
+
+    /** Serial number of the device */
+    private String mSerialNumber = null;
+    private boolean mIsEmulator = false;
+
+    private Arch mArch = Arch.ARM;
+
+    private String mDeviceName = null;
+
+    /** State of the device. */
+    private DeviceState mState = null;
+
+    private DeviceMonitor mMonitor;
+
+    private static final String LOG_TAG = "Device";
+    
+    private SdbShellProcess sdbShellProcess = null;
+
+    public String getSerialNumber() {
+        return mSerialNumber;
+    }
+
+    @Override
+    public String getDeviceName() {
+        return mDeviceName;
+    }
+
+    public DeviceState getState() {
+        return mState;
+    }
+
+    /**
+     * Changes the state of the device.
+     */
+    void setState(DeviceState state) {
+        mState = state;
+    }
+
+    @Override
+    public String toString() {
+        return mSerialNumber;
+    }
+
+    public boolean isOnline() {
+        return mState == DeviceState.ONLINE;
+    }
+
+    public boolean isEmulator() {
+        return mIsEmulator;
+    }
+
+    public boolean isOffline() {
+        return mState == DeviceState.OFFLINE;
+    }
+
+    public SyncService getSyncService()
+            throws TimeoutException, SdbCommandRejectedException, IOException {
+        SyncService syncService = new SyncService(SmartDevelopmentBridge.getSocketAddress(), this);
+        if (syncService.openSync()) {
+            return syncService;
+         }
+
+        return null;
+    }
+
+    public FileListingService getFileListingService() {
+        return new FileListingService(this);
+    }
+    
+    public SdbShellProcess executeShellCommand(String command) throws IOException {
+       SmartDevelopmentBridge sdb = SmartDevelopmentBridge.getBridge();
+       if (sdb == null)
+               return null;
+       String sdbPath = sdb.getSdbOsLocation();
+       if (sdbPath == null)
+               return null;
+       if (mSerialNumber == null)
+               return null;
+       
+       String sdbShellCmd = sdbPath + " -s " + mSerialNumber + " shell";
+       Process pSdb = Runtime.getRuntime().exec(sdbShellCmd);
+       sdbShellProcess = new SdbShellProcess(pSdb, command);
+       return sdbShellProcess;
+    }
+    
+    public void executeShellCommand(String command, IShellOutputReceiver receiver)
+            throws TimeoutException, SdbCommandRejectedException, ShellCommandUnresponsiveException,
+            IOException {
+        SdbHelper.executeRemoteCommand(SmartDevelopmentBridge.getSocketAddress(), command, this,
+                receiver, SdbPreferences.getTimeOut());
+    }
+
+    public void executeShellCommand(String command, IShellOutputReceiver receiver,
+            int maxTimeToOutputResponse)
+            throws TimeoutException, SdbCommandRejectedException, ShellCommandUnresponsiveException,
+            IOException {
+        SdbHelper.executeRemoteCommand(SmartDevelopmentBridge.getSocketAddress(), command, this,
+                receiver, maxTimeToOutputResponse);
+    }
+
+    public void runEventLogService(LogReceiver receiver)
+            throws TimeoutException, SdbCommandRejectedException, IOException {
+        SdbHelper.runEventLogService(SmartDevelopmentBridge.getSocketAddress(), this, receiver);
+    }
+
+    public void runLogService(String logname, LogReceiver receiver)
+            throws TimeoutException, SdbCommandRejectedException, IOException {
+        SdbHelper.runLogService(SmartDevelopmentBridge.getSocketAddress(), this, logname, receiver);
+    }
+
+    public void createForward(int localPort, int remotePort)
+            throws TimeoutException, SdbCommandRejectedException, IOException {
+        SdbHelper.createForward(SmartDevelopmentBridge.getSocketAddress(), this, localPort, remotePort);
+    }
+
+    public void removeForward(int localPort, int remotePort)
+            throws TimeoutException, SdbCommandRejectedException, IOException {
+        SdbHelper.removeForward(SmartDevelopmentBridge.getSocketAddress(), this, localPort, remotePort);
+    }
+
+    Device(DeviceMonitor monitor, String serialNumber, DeviceState deviceState) {
+        mMonitor = monitor;
+        mSerialNumber = serialNumber;
+        mState = deviceState;
+    }
+
+    Device(DeviceMonitor monitor, String serialNumber, DeviceState deviceState, String deviceName) {
+        mMonitor = monitor;
+        mSerialNumber = serialNumber;
+        mState = deviceState;
+        this.mDeviceName = deviceName;
+    }
+
+    DeviceMonitor getMonitor() {
+        return mMonitor;
+    }
+
+    void update(int changeMask) {
+        mMonitor.getServer().deviceChanged(this, changeMask);
+    }
+
+    public String syncPackageToDevice(String localFilePath)
+            throws IOException, SdbCommandRejectedException, TimeoutException {
+        try {
+            String packageFileName = getFileName(localFilePath);
+            String remoteFilePath = String.format("/opt/apps/tmp/%1$s", packageFileName); //$NON-NLS-1$
+
+            Log.d(packageFileName, String.format("Uploading %1$s onto device '%2$s'",
+                    packageFileName, getSerialNumber()));
+
+            SyncService sync = getSyncService();
+            if (sync != null) {
+                String message = String.format("Uploading file onto device '%1$s'",
+                        getSerialNumber());
+                Log.d(LOG_TAG, message);
+                SyncResult result = sync.pushFile(localFilePath, remoteFilePath,
+                        SyncService.getNullProgressMonitor());
+
+                if (result.getCode() != SyncService.RESULT_OK) {
+                    throw new IOException(String.format("Unable to upload file: %1$s",
+                            result.getMessage()));
+                }
+            } else {
+                throw new IOException("Unable to open sync connection!");
+            }
+            return remoteFilePath;
+        } catch (TimeoutException e) {
+            Log.e(LOG_TAG, "Unable to open sync connection! Timeout.");
+            throw e;
+        } catch (IOException e) {
+            Log.e(LOG_TAG, String.format("Unable to open sync connection! reason: %1$s",
+                    e.getMessage()));
+            throw e;
+        }
+    }
+
+    /**
+     * Helper method to retrieve the file name given a local file path
+     * @param filePath full directory path to file
+     * @return {@link String} file name
+     */
+    private String getFileName(String filePath) {
+        return new File(filePath).getName();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void removeRemotePackage(String remoteFilePath)
+            throws TimeoutException, SdbCommandRejectedException, ShellCommandUnresponsiveException,
+            IOException {
+        // now we delete the app we sync'ed
+        try {
+            executeShellCommand("rm " + remoteFilePath, new NullOutputReceiver(), INSTALL_TIMEOUT);
+        } catch (IOException e) {
+            Log.e(LOG_TAG, String.format("Failed to delete temporary package: %1$s",
+                    e.getMessage()));
+            throw e;
+        }
+    }
+
+    public Arch getArch()
+    {
+        return mArch;
+    }
+
+    public void checkArchitecture()
+    {
+        try
+        {
+            executeShellCommand(COMMAND_ARCHITECTURE_INFO, new ArchInfoReceiver());
+        } catch (Exception e)
+        {
+               Log.e("sdb", "execute " + COMMAND_ARCHITECTURE_INFO + " failed:" +  e);
+        }
+    }
+    
+    public void checkDeviceType()
+    {
+        try
+        {
+            executeShellCommand(COMMAND_DEVICE_TYPE, new DeviceTypeReceiver());
+        } catch (Exception e)
+        {
+               Log.e("sdb", "execute " + COMMAND_DEVICE_TYPE + " failed:" +  e);
+        }
+    }
+
+    class ArchInfoReceiver extends MultiLineReceiver
+    {
+        @Override
+        public void processNewLines(String[] lines)
+        {
+            if(lines[0] != null && !lines[0].contains(Arch.ARM.getArch()))
+            {
+                mArch = Arch.X86;
+            }
+        }
+    }
+
+    class DeviceTypeReceiver extends MultiLineReceiver
+    {
+        @Override
+        public void processNewLines(String[] lines)
+        {
+            if(EMULATOR.equals(lines[0]))
+            {
+                mIsEmulator = true;
+            }
+        }
+    }
+}
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/DeviceMonitor.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/DeviceMonitor.java
new file mode 100644 (file)
index 0000000..f88a007
--- /dev/null
@@ -0,0 +1,431 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.nio.ByteBuffer;
+import java.nio.channels.AsynchronousCloseException;
+import java.nio.channels.Selector;
+import java.nio.channels.SocketChannel;
+import java.util.ArrayList;
+
+import org.tizen.sdblib.Device.ArchInfoReceiver;
+import org.tizen.sdblib.IDevice.DeviceState;
+import org.tizen.sdblib.SdbHelper.SdbResponse;
+
+
+/**
+ * A Device monitor. This connects to the Smart Development Bridge and get device.
+ */
+final class DeviceMonitor {
+    private byte[] mLengthBuffer = new byte[4];
+
+    private boolean mQuit = false;
+
+    private SmartDevelopmentBridge mServer;
+
+    private SocketChannel mMainSdbConnection = null;
+    private boolean mMonitoring = false;
+    private int mConnectionAttempt = 0;
+    private int mRestartAttemptCount = 0;
+    private boolean mInitialDeviceListDone = false;
+
+    private Selector mSelector;
+    ArchInfoReceiver receiver = null;
+    private final ArrayList<Device> mDevices = new ArrayList<Device>();
+
+    /**
+     * Creates a new {@link DeviceMonitor} object and links it to the running
+     * {@link SmartDevelopmentBridge} object.
+     * @param server the running {@link SmartDevelopmentBridge}.
+     */
+    DeviceMonitor(SmartDevelopmentBridge server) {
+        mServer = server;
+    }
+
+    /**
+     * Starts the monitoring.
+     */
+    void start() {
+        Log.d("DeviceMonitor", "start monitoring");
+        new Thread("Device List Monitor") { //$NON-NLS-1$
+            @Override
+            public void run() {
+                deviceMonitorLoop();
+            }
+        }.start();
+    }
+
+    /**
+     * Stops the monitoring.
+     */
+    void stop() {
+        Log.d("DeviceMonitor", "stop monitoring");
+        mQuit = true;
+
+        // wake up the main loop thread by closing the main connection to sdb.
+        try {
+            if (mMainSdbConnection != null) {
+                mMainSdbConnection.close();
+            }
+        } catch (IOException e) {
+            Log.e("sdb", "close main sdb connection failed:" + e);
+        }
+
+        // wake up the secondary loop by closing the selector.
+        if (mSelector != null) {
+            mSelector.wakeup();
+        }
+    }
+
+
+
+    /**
+     * Returns if the monitor is currently connected to the debug bridge server.
+     * @return
+     */
+    boolean isMonitoring() {
+        return mMonitoring;
+    }
+
+    int getConnectionAttemptCount() {
+        return mConnectionAttempt;
+    }
+
+    int getRestartAttemptCount() {
+        return mRestartAttemptCount;
+    }
+
+    /**
+     * Returns the devices.
+     */
+    Device[] getDevices() {
+        synchronized (mDevices) {
+            return mDevices.toArray(new Device[mDevices.size()]);
+        }
+    }
+
+    boolean hasInitialDeviceList() {
+        return mInitialDeviceListDone;
+    }
+
+    SmartDevelopmentBridge getServer() {
+        return mServer;
+    }
+
+    /**
+     * Monitors the devices. This connects to the Debug Bridge
+     */
+    private void deviceMonitorLoop() {
+        do {
+            try {
+                if (mMainSdbConnection == null) {
+                    Log.d("DeviceMonitor", "opening sdb connection");
+                    mMainSdbConnection = openSdbConnection();
+                    if (mMainSdbConnection == null) {
+                        Log.d("DeviceMonitor", "start sdb");
+                        if (mServer.startSdb() == false) {
+                            mRestartAttemptCount++;
+                            Log.e("DeviceMonitor",
+                                    "sdb restart attempts: " + mRestartAttemptCount);
+                        }
+                        waitABit();
+                    } else {
+                        Log.d("DeviceMonitor", "connected to sdb for device monitoring");
+                    }
+                }
+
+                if (mMainSdbConnection != null && mMonitoring == false) {
+                    mMonitoring = sendDeviceListMonitoringRequest();
+                }
+
+                if (mMonitoring) {
+                    // read the length of the incoming message
+                    int length = readLength(mMainSdbConnection, mLengthBuffer);
+
+                    if (length >= 0) {
+                        // read the incoming message
+                        processIncomingDeviceData(length);
+
+                        // flag the fact that we have build the list at least once.
+                        mInitialDeviceListDone = true;
+                    }
+                }
+            } catch (AsynchronousCloseException ace) {
+                // this happens because of a call to Quit. We do nothing, and the loop will break.
+            } catch (TimeoutException ioe) {
+                handleExpectioninMonitorLoop(ioe);
+            } catch (IOException ioe) {
+                handleExpectioninMonitorLoop(ioe);
+            }
+        } while (mQuit == false);
+    }
+
+    private void handleExpectioninMonitorLoop(Exception e) {
+        if (mQuit == false) {
+            if (e instanceof TimeoutException) {
+                Log.e("DeviceMonitor", "sdb connection Error: timeout");
+            } else {
+                Log.e("DeviceMonitor", "sdb connection Error:" + e.getMessage());
+            }
+            mMonitoring = false;
+            if (mMainSdbConnection != null) {
+                try {
+                    mMainSdbConnection.close();
+                } catch (IOException ioe) {
+                    // we can safely ignore that one.
+                    Log.e("sdb", "close main sdb connection failed:" + ioe);
+                }
+                mMainSdbConnection = null;
+            }
+        }
+    }
+
+    /**
+     * Sleeps for a little bit.
+     */
+    private void waitABit() {
+        try {
+            Thread.sleep(1000);
+        } catch (InterruptedException e1) {
+        }
+    }
+
+    /**
+     * Attempts to connect to the debug bridge server.
+     * @return a connect socket if success, null otherwise
+     */
+    private SocketChannel openSdbConnection() {
+        Log.d("DeviceMonitor", "connecting to sdb for Device List Monitoring...");
+
+        SocketChannel sdbChannel = null;
+        try {
+            sdbChannel = SocketChannel.open(SmartDevelopmentBridge.getSocketAddress());
+            mServer.setStarted(true);
+            sdbChannel.socket().setTcpNoDelay(true);
+        } catch (IOException e) {
+            Log.e("DeviceMonitor", "Failed to open socket channel");
+        }
+
+        return sdbChannel;
+    }
+
+    /**
+     *
+     * @return
+     * @throws IOException
+     */
+    private boolean sendDeviceListMonitoringRequest() throws TimeoutException, IOException {
+        byte[] request = SdbHelper.formSdbRequest("host:track-devices"); //$NON-NLS-1$
+        Log.d("DeviceMonitor", "send monitoring request");
+        try {
+            SdbHelper.write(mMainSdbConnection, request);
+
+            SdbResponse resp = SdbHelper.readSdbResponse(mMainSdbConnection,
+                    false /* readDiagString */);
+
+            if (resp.okay == false) {
+                // request was refused by sdb!
+                Log.e("DeviceMonitor", "sdb refused request: " + resp.message);
+            }
+
+            return resp.okay;
+        } catch (IOException e) {
+            Log.e("DeviceMonitor", "sending tracking request failed!");
+            mMainSdbConnection.close();
+            throw e;
+        }
+    }
+
+    /**
+     * Processes an incoming device message from the socket
+     * @param socket
+     * @param length
+     * @throws IOException
+     */
+    private void processIncomingDeviceData(int length) throws IOException {
+        ArrayList<Device> list = new ArrayList<Device>();
+
+        if (length > 0) {
+            byte[] buffer = new byte[length];
+            String result = read(mMainSdbConnection, buffer);
+
+            String[] devices = result.split("\n"); // $NON-NLS-1$
+
+            for (String d : devices) {
+                Log.d("DeviceMonitor", "deviceData: " + d);
+                String[] param = d.split("\t"); // $NON-NLS-1$
+                if (param.length == 3) {
+                    // new sdb uses only serial numbers to identify devices
+                    Device device = new Device(this, param[0].trim() /*serialnumber*/,
+                            DeviceState.getState(param[1].trim()),
+                            param[2].trim() /*device name*/);
+
+                    //add the device to the list
+                    list.add(device);
+                    Log.d("DeviceMonitor", "deviceData: " + device.getSerialNumber() + " added to list");
+                }
+            }
+        }
+
+        // now merge the new devices with the old ones.
+        updateDevices(list);
+    }
+
+    /**
+     *  Updates the device list with the new items received from the monitoring service.
+     */
+    private void updateDevices(ArrayList<Device> newList) {
+        // because we are going to call mServer.deviceDisconnected which will acquire this lock
+        // we lock it first, so that the SmartDevelopmentBridge lock is always locked first.
+        synchronized (SmartDevelopmentBridge.getLock()) {
+            // array to store the devices that must be queried for information.
+            // it's important to not do it inside the synchronized loop as this could block
+            // the whole workspace (this lock is acquired during build too).
+            ArrayList<Device> devicesToQuery = new ArrayList<Device>();
+            synchronized (mDevices) {
+                // For each device in the current list, we look for a matching the new list.
+                // * if we find it, we update the current object with whatever new information
+                //   there is
+                //   (mostly state change, if the device becomes ready, we query for build info).
+                //   We also remove the device from the new list to mark it as "processed"
+                // * if we do not find it, we remove it from the current list.
+                // Once this is done, the new list contains device we aren't monitoring yet, so we
+                // add them to the list, and start monitoring them.
+                for (int d = 0 ; d < mDevices.size() ;) {
+                    Device device = mDevices.get(d);
+                    // look for a similar device in the new list.
+                    int count = newList.size();
+                    boolean foundMatch = false;
+                    for (int dd = 0 ; dd < count ; dd++) {
+                        Device newDevice = newList.get(dd);
+                        // see if it matches in id and serial number.
+                        if (newDevice.getSerialNumber().equals(device.getSerialNumber())) {
+                            foundMatch = true;
+
+                            // update the state if needed.
+                            if (device.getState() != newDevice.getState()) {
+                                device.setState(newDevice.getState());
+
+                                //should to check architecture if device is an emulator and state changed from "off-lined" to "on-lined"
+                                if(device.getState() == DeviceState.ONLINE)
+                                {
+                                    device.checkArchitecture();
+                                    device.checkDeviceType();
+                                    Log.d("DeviceMonitor", "updateDevices: " + device.getSerialNumber() + " onlined");
+                                    device.update(Device.CHANGE_STATE);
+                                }
+                            }
+                            // remove the new device from the list since it's been used
+                            newList.remove(dd);
+                            break;
+                        }
+                    }
+
+                    if (foundMatch == false) {
+                        // the device is gone, we need to remove it, and keep current index
+                        // to process the next one.
+                        removeDevice(device);
+                        mServer.deviceDisconnected(device);
+                        Log.d("DeviceMonitor", "updateDevices: " + device.getSerialNumber() + " off-lined");
+                    } else {
+                        // process the next one
+                        d++;
+                    }
+                }
+
+                // at this point we should still have some new devices in newList, so we
+                // process them.
+                for (Device newDevice : newList) {
+                    //should to check architecture if new device is an emulator on-lined
+                    if(newDevice.isOnline())
+                    {
+                        newDevice.checkArchitecture();
+                        newDevice.checkDeviceType();
+                    }
+                    // add them to the list
+                    mDevices.add(newDevice);
+
+                    // look for their build info.
+                    if (newDevice.isOnline()) {
+                        devicesToQuery.add(newDevice);
+                        mServer.deviceConnected(newDevice);
+                        Log.d("DeviceMonitor", "updateDevices: " + newDevice.getSerialNumber() + " newly connected.");
+                    }
+                }
+            }
+        }
+        newList.clear();
+    }
+
+    private void removeDevice(Device device) {
+        mDevices.remove(device);
+    }
+
+
+    /**
+     * Reads the length of the next message from a socket.
+     * @param socket The {@link SocketChannel} to read from.
+     * @return the length, or 0 (zero) if no data is available from the socket.
+     * @throws IOException if the connection failed.
+     */
+    private int readLength(SocketChannel socket, byte[] buffer) throws IOException {
+        String msg = read(socket, buffer);
+
+        if (msg != null) {
+            try {
+                return Integer.parseInt(msg, 16);
+            } catch (NumberFormatException nfe) {
+                // we'll throw an exception below.
+                Log.e("sdb", "parse integer failed:" + nfe);
+            }
+       }
+
+        // we receive something we can't read. It's better to reset the connection at this point.
+        throw new IOException("Unable to read length");
+    }
+
+    /**
+     * Fills a buffer from a socket.
+     * @param socket
+     * @param buffer
+     * @return the content of the buffer as a string, or null if it failed to convert the buffer.
+     * @throws IOException
+     */
+    private String read(SocketChannel socket, byte[] buffer) throws IOException {
+        ByteBuffer buf = ByteBuffer.wrap(buffer, 0, buffer.length);
+
+        while (buf.position() != buf.limit()) {
+            int count;
+
+            count = socket.read(buf);
+            if (count < 0) {
+                throw new IOException("EOF");
+            }
+        }
+
+        try {
+            return new String(buffer, 0, buf.position(), SdbHelper.DEFAULT_ENCODING);
+        } catch (UnsupportedEncodingException e) {
+            Log.e("sdb", "read buffer failed from socket:" + e);
+        }
+
+        return null;
+    }
+
+}
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/FileListingService.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/FileListingService.java
new file mode 100644 (file)
index 0000000..ae0eb89
--- /dev/null
@@ -0,0 +1,1005 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Provides {@link Device} side file listing service.
+ * <p/>
+ * To get an instance for a known {@link Device}, call
+ * {@link Device#getFileListingService()}.
+ */
+public final class FileListingService
+{
+
+    /** Pattern to find filenames that match "*.apk" */
+    private final static Pattern sApkPattern = Pattern.compile(".*\\.apk", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+
+    private final static String PM_FULL_LISTING = "pm list packages -f"; //$NON-NLS-1$
+
+    /**
+     * Pattern to parse the output of the 'pm -lf' command.<br>
+     * The output format looks like:<br>
+     * /data/app/myapp.apk=com.mypackage.myapp
+     */
+    private final static Pattern sPmPattern = Pattern.compile("^package:(.+?)=(.+)$"); //$NON-NLS-1$
+
+    /** Top level data folder. */
+    public final static String DIRECTORY_DATA = "data"; //$NON-NLS-1$
+    /** Top level sdcard folder. */
+    public final static String DIRECTORY_SDCARD = "sdcard"; //$NON-NLS-1$
+    /** Top level mount folder. */
+    public final static String DIRECTORY_MNT = "mnt"; //$NON-NLS-1$
+    /** Top level system folder. */
+    public final static String DIRECTORY_SYSTEM = "system"; //$NON-NLS-1$
+    /** Top level temp folder. */
+    public final static String DIRECTORY_TEMP = "tmp"; //$NON-NLS-1$
+    /** Application folder. */
+    public final static String DIRECTORY_APP = "app"; //$NON-NLS-1$
+
+    public static final long REFRESH_RATE = 5000L;
+    /**
+     * Refresh test has to be slightly lower for precision issue.
+     */
+    static final long REFRESH_TEST = (long) (REFRESH_RATE * .8);
+
+    /** Entry type: File */
+    public static final int TYPE_FILE = 0;
+    /** Entry type: Directory */
+    public static final int TYPE_DIRECTORY = 1;
+    /** Entry type: Directory Link */
+    public static final int TYPE_DIRECTORY_LINK = 2;
+    /** Entry type: Block */
+    public static final int TYPE_BLOCK = 3;
+    /** Entry type: Character */
+    public static final int TYPE_CHARACTER = 4;
+    /** Entry type: Link */
+    public static final int TYPE_LINK = 5;
+    /** Entry type: Socket */
+    public static final int TYPE_SOCKET = 6;
+    /** Entry type: FIFO */
+    public static final int TYPE_FIFO = 7;
+    /** Entry type: Other */
+    public static final int TYPE_OTHER = 8;
+    /** Entry type: root */
+    public static final int TYPE_ROOT_EMULATOR = 9;
+    public static final int TYPE_ROOT_DEVICE = 10;
+
+    /** Device side file separator. */
+    public static final String FILE_SEPARATOR = "/"; //$NON-NLS-1$
+
+    private static final String FILE_ROOT = "/"; //$NON-NLS-1$
+
+    /**
+     * Regexp pattern to parse the result from ls. Do not think the same format
+     * between Emulator and Device such as "ls -l --time-style=long-iso"
+     */
+
+    private static String LS_COMMAND_TIMESTYLE = " --time-style=long-iso" ;
+
+//    private static String patternAnsiColor = "\\033\\[[0-9;]*m";
+    private static String patternPermisions = "([bcdlsp-][-r][-w][-xsS][-r][-w][-xsS][-r][-w][-xstST])";
+    private static String patternFilecount = "(\\d{1,})";
+    private static String patternOwner = "(\\S+)";
+    private static String patternGroup = "(\\S+)";
+    private static String patternSize = "([\\d\\s,]*)";
+    private static String patternDate = "(\\d{4}-\\d{2}-\\d{2}|[a-zA-Z]{3}\\s+\\d{1,2})";
+    private static String patternTime = "(\\d{1,2}:\\d{1,2}|[0-9]{4})";
+    private static String patternName = "(.*)";
+    private static String patternLs = "^" + patternPermisions + "\\s+" + patternFilecount + "\\s+" + patternOwner + "\\s+" + patternGroup + "\\s+"
+            + patternSize + "\\s+" + patternDate + "\\s+" + patternTime + "\\s" + patternName + "$";
+
+    // private static Pattern sLsPattern = Pattern.compile(
+    //   "^([bcdlsp-][-r][-w][-xsS][-r][-w][-xsS][-r][-w][-xstST])\\s+(\\S+)\\s+(\\S+)\\s+([\\d\\s,]*)\\s+(\\d{4}-\\d\\d-\\d\\d)\\s+(\\d\\d:\\d\\d)\\s+(.*)$"); //$NON-NLS-1$
+    private static Pattern sLsPattern = Pattern.compile(patternLs);
+//    private static Pattern ansiColorReplacePattern = Pattern.compile(patternAnsiColor);
+    private final Device mDevice;
+    private FileEntry mRoot;
+
+    private final ArrayList<Thread> mThreadList = new ArrayList<Thread>();
+
+    /**
+     * Represents an entry in a directory. This can be a file or a directory.
+     */
+    public final static class FileEntry
+    {
+        /** Pattern to escape filenames for shell command consumption. */
+        private final static Pattern sEscapePattern = Pattern.compile("([\\\\\"$])"); //$NON-NLS-1$
+
+        /**
+         * Comparator object for FileEntry
+         */
+        private static Comparator<FileEntry> sEntryComparator = new Comparator<FileEntry>()
+        {
+            @Override
+            public int compare(FileEntry o1, FileEntry o2)
+            {
+                if (o1 instanceof FileEntry && o2 instanceof FileEntry)
+                {
+                    FileEntry fe1 = (FileEntry) o1;
+                    FileEntry fe2 = (FileEntry) o2;
+                    return fe1.name.compareTo(fe2.name);
+                }
+                return 0;
+            }
+        };
+
+        FileEntry parent;
+        String name;
+        String info;
+        String permissions;
+        String size;
+        String date;
+        String time;
+        String owner;
+        String group;
+        String linkPath;
+        FileListingService fileListingService;
+        int type;
+        boolean isAppPackage;
+
+        boolean isRoot;
+
+        /**
+         * Indicates whether the entry content has been fetched yet, or not.
+         */
+        long fetchTime = 0;
+
+        final ArrayList<FileEntry> mChildren = new ArrayList<FileEntry>();
+
+        /**
+         * Creates a new file entry.
+         *
+         * @param parent
+         *            parent entry or null if entry is root
+         * @param name
+         *            name of the entry.
+         * @param type
+         *            entry type. Can be one of the following:
+         *            {@link FileListingService#TYPE_FILE},
+         *            {@link FileListingService#TYPE_DIRECTORY},
+         *            {@link FileListingService#TYPE_OTHER}.
+         */
+        public FileEntry(FileEntry parent, String name, int type, boolean isRoot, FileListingService service)
+        {
+            this.parent = parent;
+            this.name = name;
+            this.type = type;
+            this.isRoot = isRoot;
+            this.fileListingService = service;
+        }
+
+        /**
+         * Returns the name of the entry
+         */
+        public String getName()
+        {
+            return name;
+        }
+
+        public void setName(String name)
+        {
+            this.name = name;
+        }
+
+        /**
+         * Returns the size string of the entry, as returned by <code>ls</code>.
+         */
+        public String getSize()
+        {
+            return size;
+        }
+
+        /**
+         * Returns the size of the entry.
+         */
+        public int getSizeValue()
+        {
+            return Integer.parseInt(size);
+        }
+
+        /**
+         * Returns the date string of the entry, as returned by <code>ls</code>.
+         */
+        public String getDate()
+        {
+            return date;
+        }
+
+        /**
+         * Returns the time string of the entry, as returned by <code>ls</code>.
+         */
+        public String getTime()
+        {
+            return time;
+        }
+
+        /**
+         * Returns the permission string of the entry, as returned by
+         * <code>ls</code>.
+         */
+        public String getPermissions()
+        {
+            return permissions;
+        }
+
+        /**
+         * Returns the extra info for the entry.
+         * <p/>
+         * For a link, it will be a description of the link.
+         * <p/>
+         * For an application apk file it will be the application package as
+         * returned by the Package Manager.
+         */
+        public String getInfo()
+        {
+            return info;
+        }
+
+        public String getLinkFullPath()
+        {
+            return linkPath;
+        }
+
+        /**
+         * Return the full path of the entry.
+         *
+         * @return a path string using {@link FileListingService#FILE_SEPARATOR}
+         *         as separator.
+         */
+        public String getFullPath()
+        {
+            if (isRoot)
+            {
+                return FILE_ROOT;
+            }
+            StringBuilder pathBuilder = new StringBuilder();
+            fillPathBuilder(pathBuilder, false);
+
+            return pathBuilder.toString();
+        }
+
+        /**
+         * Return the fully escaped path of the entry. This path is safe to use
+         * in a shell command line.
+         *
+         * @return a path string using {@link FileListingService#FILE_SEPARATOR}
+         *         as separator
+         */
+        public String getFullEscapedPath()
+        {
+            StringBuilder pathBuilder = new StringBuilder();
+            fillPathBuilder(pathBuilder, true);
+
+            return pathBuilder.toString();
+        }
+
+        /**
+         * Returns the path as a list of segments.
+         */
+        public String[] getPathSegments()
+        {
+            ArrayList<String> list = new ArrayList<String>();
+            fillPathSegments(list);
+
+            return list.toArray(new String[list.size()]);
+        }
+
+        /**
+         * Returns true if the entry is a directory, false otherwise;
+         */
+        public int getType()
+        {
+            return type;
+        }
+
+        public FileListingService getFileListingService()
+        {
+            return fileListingService;
+        }
+
+        /**
+         * Returns if the entry is a folder or a link to a folder.
+         */
+        public boolean isDirectory()
+        {
+            return type == TYPE_DIRECTORY || type == TYPE_DIRECTORY_LINK
+                    || type == TYPE_ROOT_DEVICE || type == TYPE_ROOT_EMULATOR ;
+        }
+
+        /**
+         * Returns the parent entry.
+         */
+        public FileEntry getParent()
+        {
+            return parent;
+        }
+
+        /**
+         * Returns the cached children of the entry. This returns the cache
+         * created from calling <code>FileListingService.getChildren()</code>.
+         */
+        public FileEntry[] getCachedChildren()
+        {
+            return mChildren.toArray(new FileEntry[mChildren.size()]);
+        }
+
+        /**
+         * Returns the child {@link FileEntry} matching the name. This uses the
+         * cached children list.
+         *
+         * @param name
+         *            the name of the child to return.
+         * @return the FileEntry matching the name or null.
+         */
+        public FileEntry findChild(String name)
+        {
+            for (FileEntry entry : mChildren)
+            {
+                if (entry.name.equals(name))
+                {
+                    return entry;
+                }
+            }
+            return null;
+        }
+
+        /**
+         * Returns whether the entry is the root.
+         */
+        public boolean isRoot()
+        {
+            return isRoot;
+        }
+
+        void addChild(FileEntry child)
+        {
+            mChildren.add(child);
+        }
+
+        void setChildren(ArrayList<FileEntry> newChildren)
+        {
+            mChildren.clear();
+            mChildren.addAll(newChildren);
+        }
+
+        boolean needFetch()
+        {
+            if (fetchTime == 0)
+            {
+                return true;
+            }
+            long current = System.currentTimeMillis();
+            if (current - fetchTime > REFRESH_TEST)
+            {
+                return true;
+            }
+
+            return false;
+        }
+
+        /**
+         * Returns if the entry is a valid application package.
+         */
+        public boolean isApplicationPackage()
+        {
+            return isAppPackage;
+        }
+
+        /**
+         * Returns if the file name is an application package name.
+         */
+        public boolean isAppFileName()
+        {
+            Matcher m = sApkPattern.matcher(name);
+            return m.matches();
+        }
+
+        /**
+         * Recursively fills the pathBuilder with the full path
+         *
+         * @param pathBuilder
+         *            a StringBuilder used to create the path.
+         * @param escapePath
+         *            Whether the path need to be escaped for consumption by a
+         *            shell command line.
+         */
+        protected void fillPathBuilder(StringBuilder pathBuilder, boolean escapePath)
+        {
+            if (isRoot)
+            {
+                return;
+            }
+
+            if (parent != null)
+            {
+                parent.fillPathBuilder(pathBuilder, escapePath);
+            }
+            pathBuilder.append(FILE_SEPARATOR);
+            pathBuilder.append(escapePath ? escape(name) : name);
+        }
+
+        /**
+         * Recursively fills the segment list with the full path.
+         *
+         * @param list
+         *            The list of segments to fill.
+         */
+        protected void fillPathSegments(ArrayList<String> list)
+        {
+            if (isRoot)
+            {
+                return;
+            }
+
+            if (parent != null)
+            {
+                parent.fillPathSegments(list);
+            }
+
+            list.add(name);
+        }
+
+        /**
+         * Returns an escaped version of the entry name.
+         *
+         * @param entryName
+         */
+        private String escape(String entryName)
+        {
+            return sEscapePattern.matcher(entryName).replaceAll("\\\\$1"); //$NON-NLS-1$
+        }
+    }
+
+    private class LsReceiver extends MultiLineReceiver
+    {
+
+        private final ArrayList<FileEntry> mEntryList;
+        private final FileEntry[] mCurrentChildren;
+        private final FileEntry mParentEntry;
+//        private final boolean supportAnsiColor;
+        /**
+         * Create an ls receiver/parser.
+         *
+         * @param currentChildren
+         *            The list of current children. To prevent collapse during
+         *            update, reusing the same FileEntry objects for files that
+         *            were already there is paramount.
+         * @param entryList
+         *            the list of new children to be filled by the receiver.
+         * @param linkList
+         *            the list of link path to compute post ls, to figure out if
+         *            the link pointed to a file or to a directory.
+         * @param bSupportAnsiColor
+         *            decision to get result from "ls" command without ansicode for color
+         */
+        public LsReceiver(FileEntry parentEntry, ArrayList<FileEntry> entryList)
+        {
+            mParentEntry = parentEntry;
+            mCurrentChildren = parentEntry.getCachedChildren();
+            mEntryList = entryList;
+        }
+
+        @Override
+        public void processNewLines(String[] lines)
+        {
+            for (String line : lines)
+            {
+                // no need to handle empty lines.
+                if (line.length() == 0)
+                {
+                    continue;
+                }
+
+//              if(!supportAnsiColor)
+//              {
+//                  StringBuffer buffer = new StringBuffer();
+//
+//                  Matcher matcher = ansiColorReplacePattern.matcher(line);
+//
+//                  while(matcher.find())
+//                  {
+//                      matcher.appendReplacement(buffer, "");
+//                  }
+//                  }
+//                  matcher.appendTail(buffer);
+//                  line = buffer.toString();
+//              }
+
+                // run the line through the regexp
+                Matcher m = sLsPattern.matcher(line);
+                if (m.matches() == false)
+                {
+                    continue;
+                }
+
+                // get the name
+                String name = m.group(8);
+                // get the rest of the groups
+                String permissions = m.group(1);
+                String owner = m.group(3);
+                String group = m.group(4);
+                String size = m.group(5);
+                String date = m.group(6);
+                String time = m.group(7);
+                String info = null;
+                String linkTo = null;
+                int objectType = getFileType(permissions.charAt(0));
+
+                // now check what we may be linking to
+                if (objectType == TYPE_LINK)
+                {
+                    String[] segments = name.split("\\s->\\s"); //$NON-NLS-1$
+
+                    // we should have 2 segments
+                    if (segments.length == 2)
+                    {
+                        // update the entry name to not
+                        // contain the link
+                        name = segments[0];
+
+                        // and the link name
+                        info = segments[1];
+                        linkTo = segments[1];
+
+                        // add an arrow in front to specify
+                        // it's a link.
+                        info = "-> " + info; //$NON-NLS-1$;
+                        // now get the path to the link
+                        String[] pathSegments = info.split(FILE_SEPARATOR);
+
+                        if (pathSegments.length >= 1)
+                        {
+                            // FIXME : not fully impl
+                            String command = "ls -al ";
+                            if (linkTo.charAt(0) != '/')
+                                command = command + "/";
+                            command = command + linkTo;
+                            try
+                            {
+                                LsLinkReceiver receiver = new LsLinkReceiver();
+                                mDevice.executeShellCommand(command, receiver);
+                                if (receiver.isDirectoryLink == true)
+                                    objectType = TYPE_DIRECTORY_LINK;
+                            } catch (Exception e)
+                            {
+                                // sdb failed somehow, we do nothing.
+                               Log.e("sdb", "excute " + command + " failed:" + e);
+                            }
+                        }
+                    }
+                }
+                // get the entry, either from an existing one, or a
+                // new one
+                FileEntry entry = getExistingEntry(name);
+                if (entry == null)
+                {
+                    entry = new FileEntry(mParentEntry, name, objectType, false /* isRoot */, mParentEntry.fileListingService);
+                }
+
+                // add some misc info
+                entry.permissions = permissions;
+                entry.size = size;
+                entry.date = date;
+                entry.time = time;
+                entry.owner = owner;
+                entry.group = group;
+                if (objectType == TYPE_LINK || objectType == TYPE_DIRECTORY_LINK)
+                {
+                    entry.info = info;
+                    entry.linkPath = linkTo;
+                }
+
+                mEntryList.add(entry);
+            }
+        }
+
+        final class LsLinkReceiver extends MultiLineReceiver
+        {
+            boolean isDirectoryLink = false;
+
+            @Override
+            public void processNewLines(String[] lines)
+            {
+                for (String line : lines)
+                {
+                    if (line.length() > 0)
+                    {
+                        Matcher m = sLsPattern.matcher(line);
+                        if (m.matches())
+                        {
+                            int objectType = getFileType(m.group(1).charAt(0));
+                            String name = m.group(8);
+                            if (".".equals(name) && objectType == TYPE_DIRECTORY)
+                            {
+                                isDirectoryLink = true;
+                                break;
+                            }
+                        }
+                    }
+                }
+
+            }
+
+            @Override
+            public boolean isCancelled()
+            {
+                return false;
+            }
+        }
+
+        /**
+         * Queries for an already existing Entry per name
+         *
+         * @param name
+         *            the name of the entry
+         * @return the existing FileEntry or null if no entry with a matching
+         *         name exists.
+         */
+        private FileEntry getExistingEntry(String name)
+        {
+            for (int i = 0; i < mCurrentChildren.length; i++)
+            {
+                FileEntry e = mCurrentChildren[i];
+
+                // since we're going to "erase" the one we use, we need to
+                // check that the item is not null.
+                if (e != null)
+                {
+                    // compare per name, case-sensitive.
+                    if (name.equals(e.name))
+                    {
+                        // erase from the list
+                        mCurrentChildren[i] = null;
+
+                        // and return the object
+                        return e;
+                    }
+                }
+            }
+
+            // couldn't find any matching object, return null
+            return null;
+        }
+
+        @Override
+        public boolean isCancelled()
+        {
+            return false;
+        }
+
+        public void finishLinks()
+        {
+            // TODO Handle links in the listing service
+        }
+
+        private int getFileType(char type)
+        {
+            // and the type
+            int objectType = TYPE_OTHER;
+            switch (type)
+            {
+                case '-':
+                    objectType = TYPE_FILE;
+                    break;
+                case 'b':
+                    objectType = TYPE_BLOCK;
+                    break;
+                case 'c':
+                    objectType = TYPE_CHARACTER;
+                    break;
+                case 'd':
+                    objectType = TYPE_DIRECTORY;
+                    break;
+                case 'l':
+                    objectType = TYPE_LINK;
+                    break;
+                case 's':
+                    objectType = TYPE_SOCKET;
+                    break;
+                case 'p':
+                    objectType = TYPE_FIFO;
+                    break;
+            }
+            return objectType;
+        }
+    }
+
+    /**
+     * Classes which implement this interface provide a method that deals with
+     * asynchronous result from <code>ls</code> command on the device.
+     *
+     * @see FileListingService#getChildren(com.samsung.sdblib.FileListingService.FileEntry,
+     *      boolean, com.samsung.sdblib.FileListingService.IListingReceiver)
+     */
+    public interface IListingReceiver
+    {
+        public void setChildren(FileEntry entry, FileEntry[] children);
+
+        public void refreshEntry(FileEntry entry);
+    }
+
+    /**
+     * Creates a File Listing Service for a specified {@link Device}.
+     *
+     * @param device
+     *            The Device the service is connected to.
+     */
+    FileListingService(Device device)
+    {
+        mDevice = device;
+    }
+
+    /**
+     * Returns the root element.
+     *
+     * @return the {@link FileEntry} object representing the root element or
+     *         <code>null</code> if the device is invalid.
+     */
+    public FileEntry getRoot()
+    {
+        if (mDevice != null)
+        {
+            if (mRoot == null)
+            {
+                int deviceType = FileListingService.TYPE_ROOT_DEVICE;
+                if (mDevice.isEmulator())
+                    deviceType = FileListingService.TYPE_ROOT_EMULATOR;
+
+                mRoot = new FileEntry(null, mDevice.getDeviceName(), deviceType, true, this);
+            }
+            return mRoot;
+        }
+        return null;
+    }
+
+    public FileEntry[] getChildren(final FileEntry entry, boolean useCache, final IListingReceiver receiver)
+    {
+        return getChildren(entry, useCache, receiver, false);
+    }
+
+    public FileEntry[] getChildrenWithAnsicodeColor(final FileEntry entry, boolean useCache, final IListingReceiver receiver)
+    {
+        return getChildren(entry, useCache, receiver, true);
+    }
+
+    /**
+     * Returns the children of a {@link FileEntry}.
+     * <p/>
+     * This method supports a cache mechanism and synchronous and asynchronous
+     * modes.
+     * <p/>
+     * If <var>receiver</var> is <code>null</code>, the device side
+     * <code>ls</code> command is done synchronously, and the method will return
+     * upon completion of the command.<br>
+     * If <var>receiver</var> is non <code>null</code>, the command is launched
+     * is a separate thread and upon completion, the receiver will be notified
+     * of the result.
+     * <p/>
+     * The result for each <code>ls</code> command is cached in the parent
+     * <code>FileEntry</code>. <var>useCache</var> allows usage of this cache,
+     * but only if the cache is valid. The cache is valid only for
+     * {@link FileListingService#REFRESH_RATE} ms. After that a new
+     * <code>ls</code> command is always executed.
+     * <p/>
+     * If the cache is valid and <code>useCache == true</code>, the method will
+     * always simply return the value of the cache, whether a
+     * {@link IListingReceiver} has been provided or not.
+     *
+     * @param entry
+     *            The parent entry.
+     * @param useCache
+     *            A flag to use the cache or to force a new ls command.
+     * @param receiver
+     *            A receiver for asynchronous calls.
+     * @param bSupportAnsiColor
+         *        A boolean value to get result from "ls" command without ansicode for color
+     * @return The list of children or <code>null</code> for asynchronous calls.
+     *
+     * @see FileEntry#getCachedChildren()
+     */
+    private FileEntry[] getChildren(final FileEntry entry, boolean useCache, final IListingReceiver receiver, final boolean bSupportAnsiColor)
+    {
+        // first thing we do is check the cache, and if we already have a recent
+        // enough children list, we just return that.
+        if (useCache && entry.needFetch() == false)
+        {
+            return entry.getCachedChildren();
+        }
+
+        // if there's no receiver, then this is a synchronous call, and we
+        // return the result of ls
+        if (receiver == null)
+        {
+            doLs(entry, bSupportAnsiColor);
+            return entry.getCachedChildren();
+        }
+
+        // this is a asynchronous call.
+        // we launch a thread that will do ls and give the listing
+        // to the receiver
+        Thread t = new Thread("ls " + entry.getFullEscapedPath()) { //$NON-NLS-1$
+            @Override
+            public void run()
+            {
+                doLs(entry, bSupportAnsiColor);
+
+                receiver.setChildren(entry, entry.getCachedChildren());
+
+                final FileEntry[] children = entry.getCachedChildren();
+                if (children.length > 0 && children[0].isApplicationPackage())
+                {
+                    final HashMap<String, FileEntry> map = new HashMap<String, FileEntry>();
+
+                    for (FileEntry child : children)
+                    {
+                        String path = child.getFullEscapedPath();
+                        map.put(path, child);
+                    }
+
+                    // call pm.
+                    String command = PM_FULL_LISTING;
+                    try
+                    {
+                        mDevice.executeShellCommand(command, new MultiLineReceiver()
+                        {
+                            @Override
+                            public void processNewLines(String[] lines)
+                            {
+                                for (String line : lines)
+                                {
+                                    if (line.length() > 0)
+                                    {
+                                        // get the filepath and package
+                                        // from the line
+                                        Matcher m = sPmPattern.matcher(line);
+                                        if (m.matches())
+                                        {
+                                            // get the children with
+                                            // that path
+                                            FileEntry entry = map.get(m.group(1));
+                                            if (entry != null)
+                                            {
+                                                entry.info = m.group(2);
+                                                receiver.refreshEntry(entry);
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+
+                            @Override
+                            public boolean isCancelled()
+                            {
+                                return false;
+                            }
+                        });
+                    } catch (Exception e)
+                    {
+                        // sdb failed somehow, we do nothing.
+                       Log.e("sdb", "excute " + command + " failed:" + e);
+                    }
+                }
+
+                // if another thread is pending, launch it
+                synchronized (mThreadList)
+                {
+                    // first remove ourselves from the list
+                    mThreadList.remove(this);
+
+                    // then launch the next one if applicable.
+                    if (mThreadList.size() > 0)
+                    {
+                        Thread t = mThreadList.get(0);
+                        t.start();
+                    }
+                }
+            }
+        };
+
+        // we don't want to run multiple ls on the device at the same time, so
+        // we
+        // store the thread in a list and launch it only if there's no other
+        // thread running.
+        // the thread will launch the next one once it's done.
+        synchronized (mThreadList)
+        {
+            // add to the list
+            mThreadList.add(t);
+
+            // if it's the only one, launch it.
+            if (mThreadList.size() == 1)
+            {
+                t.start();
+            }
+        }
+
+        // and we return null.
+        return null;
+    }
+
+    public IDevice getDevice()
+    {
+        return mDevice;
+    }
+
+    private void doLs(FileEntry entry, boolean supportAnsiColor)
+    {
+        // create a list that will receive the list of the entries
+        ArrayList<FileEntry> entryList = new ArrayList<FileEntry>();
+
+        try
+        {
+            // create the command
+            String lsCommand = null;
+            String teeCommand = "";
+            if (entry.getType() == FileListingService.TYPE_LINK || entry.getType() == FileListingService.TYPE_DIRECTORY_LINK)
+            {
+                if (entry.getLinkFullPath().charAt(0) == '/')
+                    lsCommand = "ls -l " + getStringWithDoubleQuote(entry.getLinkFullPath()); //$NON-NLS-1$
+                else
+                    lsCommand = "ls -l " + getStringWithDoubleQuote("/" + entry.getLinkFullPath()); //$NON-NLS-1$
+            } else
+            {
+                lsCommand = "ls -l " + getStringWithDoubleQuote("/" + entry.getFullEscapedPath()); //$NON-NLS-1$
+            }
+
+            if(!supportAnsiColor)
+            {
+                teeCommand = " 2> /dev/null | tee /dev/null";
+            }
+
+            // create the receiver object that will parse the result from ls
+            LsReceiver receiver = new LsReceiver(entry, entryList);
+            // call ls.
+            mDevice.executeShellCommand(lsCommand + LS_COMMAND_TIMESTYLE + teeCommand, receiver);
+
+            // finish the process of the receiver to handle links
+            receiver.finishLinks();
+
+            //if fail to execute command, retry without timesytle
+            if(entryList.size() == 0)
+            {
+                mDevice.executeShellCommand(lsCommand + teeCommand, receiver);
+                receiver.finishLinks();
+            }
+
+        } catch (Exception e)
+        {
+            // catch all and do nothing.
+               Log.e("sdb", "excute doLS failed:" + e);
+        }
+
+        // at this point we need to refresh the viewer
+        entry.fetchTime = System.currentTimeMillis();
+
+        // sort the children and set them as the new children
+        Collections.sort(entryList, FileEntry.sEntryComparator);
+        entry.setChildren(entryList);
+    }
+    
+    private String getStringWithDoubleQuote(String str)
+    {
+        return "\"" + str + "\"";
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/ICrashReportServiceListener.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/ICrashReportServiceListener.java
new file mode 100755 (executable)
index 0000000..af75387
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * CrashReportService
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * Yoonki Park <yoonki.park@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.sdblib;
+
+
+/**
+ * Provides event when a cs file is created in a Tizen device
+ * @author yoonki.park<park.yoonki@gmail.com>
+ *
+ */
+public interface ICrashReportServiceListener {
+    /**
+     * Sent when the cs file is created.
+     *  
+     * @param device The device where the event is created.
+     * @param remoteCSPath The absolute path on the given device.
+     */
+    void fileCreated(IDevice device, String remoteCSPath);
+}
\ No newline at end of file
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/IDevice.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/IDevice.java
new file mode 100755 (executable)
index 0000000..11a93d2
--- /dev/null
@@ -0,0 +1,280 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import java.io.IOException;
+
+/**
+ *  A Device. It can be a physical device or an emulator.
+ */
+public interface IDevice {
+    /** Serial number of the first connected emulator. */
+    String FIRST_EMULATOR_SN = "emulator-26100"; //$NON-NLS-1$
+    /** Device change bit mask: {@link DeviceState} change. */
+    int CHANGE_STATE = 0x0001;
+    /** Device change bit mask: {@link Client} list change. */
+    int CHANGE_CLIENT_LIST = 0x0002;
+    /** Device change bit mask: build info change. */
+    int CHANGE_BUILD_INFO = 0x0004;
+    
+    /**
+     * The architecture of a device.
+     * Returns {@link Arch#X86} or {@link Arch#ARM} about device architecture.
+     */
+    public static enum Arch{
+        X86("86"),
+        ARM("arm");
+
+        private String arch;
+
+        Arch(String arch)
+        {
+            this.arch = arch;
+        }
+
+        public String getArch()
+        {
+            return arch;
+        }
+    }
+
+    /**
+     * The state of a device.
+     */
+    public static enum DeviceState {
+        OFFLINE("offline"), //$NON-NLS-1$
+        ONLINE("device"); //$NON-NLS-1$
+
+        private String mState;
+
+        DeviceState(String state) {
+            mState = state;
+        }
+
+        /**
+         * Returns a {@link DeviceState} from the string returned by <code>sdb devices</code>.
+         *
+         * @param state the device state.
+         * @return a {@link DeviceState} object or <code>null</code> if the state is unknown.
+         */
+        public static DeviceState getState(String state) {
+            for (DeviceState deviceState : values()) {
+                if (deviceState.mState.equals(state)) {
+                    return deviceState;
+                }
+            }
+            return null;
+        }
+    }
+
+    /**
+     * Returns the serial number of the device.
+     */
+    String getSerialNumber();
+
+    /**
+     * Returns the name of the device.
+     */
+    String getDeviceName();
+
+    DeviceState getState();
+
+    /**
+     * Returns if the device is ready.
+     *
+     * @return <code>true</code> if {@link #getState()} returns {@link DeviceState#ONLINE}.
+     */
+    boolean isOnline();
+
+    /**
+     * Returns <code>true</code> if the device is an emulator.
+     */
+    boolean isEmulator();
+    
+    /**
+     * Returns {@link Arch} about device architecture.
+     */
+    Arch getArch();
+
+    /**
+     * Returns if the device is offline.
+     *
+     * @return <code>true</code> if {@link #getState()} returns {@link DeviceState#OFFLINE}.
+     */
+    boolean isOffline();
+
+    /**
+     * Returns a {@link SyncService} object to push / pull files to and from the device.
+     *
+     * @return <code>null</code> if the SyncService couldn't be created. This can happen if sdb
+     *            refuse to open the connection because the {@link IDevice} is invalid
+     *            (or got disconnected).
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws IOException if the connection with sdb failed.
+     */
+    SyncService getSyncService()
+            throws TimeoutException, SdbCommandRejectedException, IOException;
+
+    /**
+     * Returns a {@link FileListingService} for this device.
+     */
+    FileListingService getFileListingService();
+
+    /**
+     * Executes a shell command on the device and return SdbShellProcess
+     *
+     * @param command the shell command to execute
+     * @throws IOException in case of I/O error on the connection.
+     *
+     * @see SdbShellProcess
+     */
+    SdbShellProcess executeShellCommand(String command) throws IOException;
+
+    /**
+     * Executes a shell command on the device, and sends the result to a <var>receiver</var>
+     * <p/>This is similar to calling
+     * <code>executeShellCommand(command, receiver, SdbPreferences.getTimeOut())</code>.
+     *
+     * @param command the shell command to execute
+     * @param receiver the {@link IShellOutputReceiver} that will receives the output of the shell
+     *            command
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws ShellCommandUnresponsiveException in case the shell command doesn't send output
+     *            for a given time.
+     * @throws IOException in case of I/O error on the connection.
+     *
+     * @see #executeShellCommand(String, IShellOutputReceiver, int)
+     * @see SdbPreferences#getTimeOut()
+     */
+    void executeShellCommand(String command, IShellOutputReceiver receiver)
+            throws TimeoutException, SdbCommandRejectedException, ShellCommandUnresponsiveException,
+            IOException;
+
+    /**
+     * Executes a shell command on the device, and sends the result to a <var>receiver</var>.
+     * <p/><var>maxTimeToOutputResponse</var> is used as a maximum waiting time when expecting the
+     * command output from the device.<br>
+     * At any time, if the shell command does not output anything for a period longer than
+     * <var>maxTimeToOutputResponse</var>, then the method will throw
+     * {@link ShellCommandUnresponsiveException}.
+     * <p/>For commands like log output, a <var>maxTimeToOutputResponse</var> value of 0, meaning
+     * that the method will never throw and will block until the receiver's
+     * {@link IShellOutputReceiver#isCancelled()} returns <code>true</code>, should be
+     * used.
+     *
+     * @param command the shell command to execute
+     * @param receiver the {@link IShellOutputReceiver} that will receives the output of the shell
+     *            command
+     * @param maxTimeToOutputResponse the maximum amount of time during which the command is allowed
+     *            to not output any response. A value of 0 means the method will wait forever
+     *            (until the <var>receiver</var> cancels the execution) for command output and
+     *            never throw.
+     * @throws TimeoutException in case of timeout on the connection when sending the command.
+     * @throws SdbCommandRejectedException if sdb rejects the command.
+     * @throws ShellCommandUnresponsiveException in case the shell command doesn't send any output
+     *            for a period longer than <var>maxTimeToOutputResponse</var>.
+     * @throws IOException in case of I/O error on the connection.
+     *
+     * @see SdbPreferences#getTimeOut()
+     */
+    void executeShellCommand(String command, IShellOutputReceiver receiver,
+            int maxTimeToOutputResponse)
+            throws TimeoutException, SdbCommandRejectedException, ShellCommandUnresponsiveException,
+            IOException;
+
+    /**
+     * Runs the event log service and outputs the event log to the {@link LogReceiver}.
+     * <p/>This call is blocking until {@link LogReceiver#isCancelled()} returns true.
+     * @param receiver the receiver to receive the event log entries.
+     * @throws TimeoutException in case of timeout on the connection. This can only be thrown if the
+     * timeout happens during setup. Once logs start being received, no timeout will occur as it's
+     * not possible to detect a difference between no log and timeout.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws IOException in case of I/O error on the connection.
+     */
+    void runEventLogService(LogReceiver receiver)
+            throws TimeoutException, SdbCommandRejectedException, IOException;
+
+    /**
+     * Runs the log service for the given log and outputs the log to the {@link LogReceiver}.
+     * <p/>This call is blocking until {@link LogReceiver#isCancelled()} returns true.
+     *
+     * @param logname the logname of the log to read from.
+     * @param receiver the receiver to receive the event log entries.
+     * @throws TimeoutException in case of timeout on the connection. This can only be thrown if the
+     *            timeout happens during setup. Once logs start being received, no timeout will
+     *            occur as it's not possible to detect a difference between no log and timeout.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws IOException in case of I/O error on the connection.
+     */
+    void runLogService(String logname, LogReceiver receiver)
+            throws TimeoutException, SdbCommandRejectedException, IOException;
+
+    /**
+     * Creates a port forwarding between a local and a remote port.
+     *
+     * @param localPort the local port to forward
+     * @param remotePort the remote port.
+     * @return <code>true</code> if success.
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws IOException in case of I/O error on the connection.
+     */
+    void createForward(int localPort, int remotePort)
+            throws TimeoutException, SdbCommandRejectedException, IOException;
+
+    /**
+     * Removes a port forwarding between a local and a remote port.
+     *
+     * @param localPort the local port to forward
+     * @param remotePort the remote port.
+     * @return <code>true</code> if success.
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws IOException in case of I/O error on the connection.
+     */
+    void removeForward(int localPort, int remotePort)
+            throws TimeoutException, SdbCommandRejectedException, IOException;
+
+    /**
+     * Pushes a file to device
+     *
+     * @param localFilePath the absolute path to file on local host
+     * @return {@link String} destination path on device for file
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws IOException in case of I/O error on the connection.
+     */
+    String syncPackageToDevice(String localFilePath)
+            throws TimeoutException, SdbCommandRejectedException, IOException;
+
+    /**
+     * Removes a file from device.
+     *
+     * @param remoteFilePath path on device of file to remove
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws ShellCommandUnresponsiveException if the device didn't respond for long time when
+     *            performing the action.
+     * @throws IOException if file removal failed
+     */
+    void removeRemotePackage(String remoteFilePath)
+            throws TimeoutException, SdbCommandRejectedException, ShellCommandUnresponsiveException,
+            IOException;
+}
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/IShellOutputReceiver.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/IShellOutputReceiver.java
new file mode 100755 (executable)
index 0000000..4df697e
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+/**
+ * Classes which implement this interface provide methods that deal with out from a remote shell
+ * command on a device/emulator.
+ */
+public interface IShellOutputReceiver {
+    /**
+     * Called every time some new data is available.
+     * @param data The new data.
+     * @param offset The offset at which the new data starts.
+     * @param length The length of the new data.
+     */
+    void addOutput(byte[] data, int offset, int length);
+
+    /**
+     * Called at the end of the process execution (unless the process was
+     * canceled). This allows the receiver to terminate and flush whatever
+     * data was not yet processed.
+     */
+    void flush();
+
+    /**
+     * Cancel method to stop the execution of the remote shell command.
+     * @return true to cancel the execution of the command.
+     */
+    boolean isCancelled();
+};
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/Log.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/Log.java
new file mode 100644 (file)
index 0000000..5fee8c0
--- /dev/null
@@ -0,0 +1,414 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * Log class that mirrors the API in main SLP sources.
+ * <p/>Default behavior outputs the log to {@link System#out}. Use
+ * {@link #setLogOutput(com.samsung.sdblib.Log.ILogOutput)} to redirect the log somewhere else.
+ */
+public final class Log {
+
+    private static File logFile = null;
+    /**
+     * Log Level enum.
+     */
+    public enum LogLevel {
+        VERBOSE(2, "Verbose", 'V'), //$NON-NLS-1$
+        DEBUG(3, "Debug", 'D'), //$NON-NLS-1$
+        INFO(4, "Info", 'I'), //$NON-NLS-1$
+        WARN(5, "Warning", 'W'), //$NON-NLS-1$
+        ERROR(6, "Error", 'E'), //$NON-NLS-1$
+        FATAL(7, "Fatal", 'F'); //$NON-NLS-1$
+
+        private int mPriorityLevel;
+        private String mStringValue;
+        private char mPriorityLetter;
+
+        LogLevel(int intPriority, String stringValue, char priorityChar) {
+            mPriorityLevel = intPriority;
+            mStringValue = stringValue;
+            mPriorityLetter = priorityChar;
+        }
+
+        public static LogLevel getByString(String value) {
+            for (LogLevel mode : values()) {
+                if (mode.mStringValue.equals(value)) {
+                    return mode;
+                }
+            }
+
+            return null;
+        }
+        
+        /**
+         * Returns the {@link LogLevel} enum matching the specified letter.
+         * @param letter the letter matching a <code>LogLevel</code> enum
+         * @return a <code>LogLevel</code> object or <code>null</code> if no match were found.
+         */
+        public static LogLevel getByLetter(char letter) {
+            for (LogLevel mode : values()) {
+                if (mode.mPriorityLetter == letter) {
+                    return mode;
+                }
+            }
+
+            return null;
+        }
+
+        /**
+         * Returns the {@link LogLevel} enum matching the specified letter.
+         * <p/>
+         * The letter is passed as a {@link String} argument, but only the first character
+         * is used. 
+         * @param letter the letter matching a <code>LogLevel</code> enum
+         * @return a <code>LogLevel</code> object or <code>null</code> if no match were found.
+         */
+        public static LogLevel getByLetterString(String letter) {
+            if (letter.length() > 0) {
+                return getByLetter(letter.charAt(0));
+            }
+
+            return null;
+        }
+
+        /**
+         * Returns the letter identifying the priority of the {@link LogLevel}.
+         */
+        public char getPriorityLetter() {
+            return mPriorityLetter;
+        }
+
+        /**
+         * Returns the numerical value of the priority.
+         */
+        public int getPriority() {
+            return mPriorityLevel;
+        }
+
+        /**
+         * Returns a non translated string representing the LogLevel.
+         */
+        public String getStringValue() {
+            return mStringValue;
+        }
+    }
+    
+    /**
+     * Classes which implement this interface provides methods that deal with outputting log
+     * messages.
+     */
+    public interface ILogOutput {
+        /**
+         * Sent when a log message needs to be printed.
+         * @param logLevel The {@link LogLevel} enum representing the priority of the message.
+         * @param tag The tag associated with the message.
+         * @param message The message to display.
+         */
+        public void printLog(LogLevel logLevel, String tag, String message);
+
+        /**
+         * Sent when a log message needs to be printed, and, if possible, displayed to the user
+         * in a dialog box.
+         * @param logLevel The {@link LogLevel} enum representing the priority of the message.
+         * @param tag The tag associated with the message.
+         * @param message The message to display.
+         */
+        public void printAndPromptLog(LogLevel logLevel, String tag, String message);
+    }
+
+    private static LogLevel mLevel = SdbPreferences.getLogLevel();
+
+    private static ILogOutput sLogOutput;
+
+    private static final char[] mSpaceLine = new char[72];
+    private static final char[] mHexDigit = new char[]
+        { '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f' };
+    static {
+        /* prep for hex dump */
+        int i = mSpaceLine.length-1;
+        while (i >= 0)
+            mSpaceLine[i--] = ' ';
+        mSpaceLine[0] = mSpaceLine[1] = mSpaceLine[2] = mSpaceLine[3] = '0';
+        mSpaceLine[4] = '-';
+    }
+
+    static final class Config {
+        static final boolean LOGV = true;
+        static final boolean LOGD = true;
+    };
+
+    private Log() {}
+
+    /**
+     * Outputs a {@link LogLevel#VERBOSE} level message.
+     * @param tag The tag associated with the message.
+     * @param message The message to output.
+     */
+    public static void v(String tag, String message) {
+        println(LogLevel.VERBOSE, tag, message);
+    }
+
+    /**
+     * Outputs a {@link LogLevel#DEBUG} level message.
+     * @param tag The tag associated with the message.
+     * @param message The message to output.
+     */
+    public static void d(String tag, String message) {
+        println(LogLevel.DEBUG, tag, message);
+    }
+
+    /**
+     * Outputs a {@link LogLevel#INFO} level message.
+     * @param tag The tag associated with the message.
+     * @param message The message to output.
+     */
+    public static void i(String tag, String message) {
+        println(LogLevel.INFO, tag, message);
+    }
+
+    /**
+     * Outputs a {@link LogLevel#WARN} level message.
+     * @param tag The tag associated with the message.
+     * @param message The message to output.
+     */
+    public static void w(String tag, String message) {
+        println(LogLevel.WARN, tag, message);
+    }
+
+    /**
+     * Outputs a {@link LogLevel#ERROR} level message.
+     * @param tag The tag associated with the message.
+     * @param message The message to output.
+     */
+    public static void e(String tag, String message) {
+        println(LogLevel.ERROR, tag, message);
+    }
+
+    /**
+     * Outputs a log message and attempts to display it in a dialog.
+     * @param tag The tag associated with the message.
+     * @param message The message to output.
+     */
+    public static void logAndDisplay(LogLevel logLevel, String tag, String message) {
+        if (sLogOutput != null) {
+            sLogOutput.printAndPromptLog(logLevel, tag, message);
+        } else {
+            println(logLevel, tag, message);
+        }
+    }
+
+    /**
+     * Outputs a {@link LogLevel#ERROR} level {@link Throwable} information.
+     * @param tag The tag associated with the message.
+     * @param throwable The {@link Throwable} to output.
+     */
+    public static void e(String tag, Throwable throwable) {
+        if (throwable != null) {
+            StringWriter sw = new StringWriter();
+            PrintWriter pw = new PrintWriter(sw);
+
+            throwable.printStackTrace(pw);
+            println(LogLevel.ERROR, tag, throwable.getMessage() + '\n' + sw.toString());
+        }
+    }
+
+    static void setLevel(LogLevel logLevel) {
+        mLevel = logLevel;
+    }
+
+    /**
+     * Sets the {@link ILogOutput} to use to print the logs. If not set, {@link System#out}
+     * will be used.
+     * @param logOutput The {@link ILogOutput} to use to print the log.
+     */
+    public static void setLogOutput(ILogOutput logOutput) {
+        sLogOutput = logOutput;
+    }
+
+    /**
+     * Show hex dump.
+     * <p/>
+     * Local addition.  Output looks like:
+     * 1230- 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff  0123456789abcdef
+     * <p/>
+     * Uses no string concatenation; creates one String object per line.
+     */
+    static void hexDump(String tag, LogLevel level, byte[] data, int offset, int length) {
+
+        int kHexOffset = 6;
+        int kAscOffset = 55;
+        char[] line = new char[mSpaceLine.length];
+        int addr, baseAddr, count;
+        int i, ch;
+        boolean needErase = true;
+
+        //Log.w(tag, "HEX DUMP: off=" + offset + ", length=" + length);
+
+        baseAddr = 0;
+        while (length != 0) {
+            if (length > 16) {
+                // full line
+                count = 16;
+            } else {
+                // partial line; re-copy blanks to clear end
+                count = length;
+                needErase = true;
+            }
+
+            if (needErase) {
+                System.arraycopy(mSpaceLine, 0, line, 0, mSpaceLine.length);
+                needErase = false;
+            }
+
+            // output the address (currently limited to 4 hex digits)
+            addr = baseAddr;
+            addr &= 0xffff;
+            ch = 3;
+            while (addr != 0) {
+                line[ch] = mHexDigit[addr & 0x0f];
+                ch--;
+                addr >>>= 4;
+            }
+
+            // output hex digits and ASCII chars
+            ch = kHexOffset;
+            for (i = 0; i < count; i++) {
+                byte val = data[offset + i];
+
+                line[ch++] = mHexDigit[(val >>> 4) & 0x0f];
+                line[ch++] = mHexDigit[val & 0x0f];
+                ch++;
+
+                if (val >= 0x20 && val < 0x7f)
+                    line[kAscOffset + i] = (char) val;
+                else
+                    line[kAscOffset + i] = '.';
+            }
+
+            println(level, tag, new String(line));
+
+            // advance to next chunk of data
+            length -= count;
+            offset += count;
+            baseAddr += count;
+        }
+
+    }
+
+    /**
+     * Dump the entire contents of a byte array with DEBUG priority.
+     */
+    static void hexDump(byte[] data) {
+        hexDump("sdb", LogLevel.DEBUG, data, 0, data.length);
+    }
+
+    /* currently prints to stdout; could write to a log window */
+    private static void println(LogLevel logLevel, String tag, String message) {
+        if (logLevel.getPriority() >= mLevel.getPriority()) {
+            if (sLogOutput != null) {
+                sLogOutput.printLog(logLevel, tag, message);
+            } else {
+                printLog(logLevel, tag, message);
+            }
+        }
+    }
+    
+    /**
+     * Prints a log message.
+     * @param logLevel
+     * @param tag
+     * @param message
+     */
+    public static void printLog(LogLevel logLevel, String tag, String message) {
+        printLog(getLogFormatString(logLevel, tag, message));
+    }
+
+    /**
+     * Formats a log message.
+     * @param logLevel
+     * @param tag
+     * @param message
+     */
+    public static String getLogFormatString(LogLevel logLevel, String tag, String message) {
+        SimpleDateFormat formatter = new SimpleDateFormat("hh:mm:ss");
+        return String.format("%s %c/%s: %s\n", formatter.format(new Date()),
+                logLevel.getPriorityLetter(), tag, message);
+    }
+    
+    public static void printLog(String msg)
+    {
+        if(logFile == null)
+        {
+            try
+            {
+                String sdbPath = SmartDevelopmentBridge.getBridge().getSdbOsLocation();
+                int lastIndex = sdbPath.lastIndexOf(File.separatorChar);
+                String logPath = sdbPath.substring(0, lastIndex);
+                
+                SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd-HHmmss");
+    
+                if(logPath != null)
+                {
+                    File file = new File(logPath);
+                    if(file.exists() && file.isDirectory())
+                    {
+                        String fileName = logPath + File.separatorChar + formatter.format(new Date()) + "-sdblib-log";
+                        logFile = new File(fileName);
+                    }
+                }
+            }catch(Exception e){
+                System.out.println("Failed to make log file");
+            }
+        }
+
+        if(logFile != null)
+        {
+            FileWriter writer = null;
+            try
+            {
+                writer = new FileWriter(logFile, true);
+                writer.write(msg);
+                writer.write('\n');
+                writer.flush();
+            } catch (IOException e)
+            {
+                System.out.println("Failed to write in log file");
+            } finally {
+                try {
+                    writer.close();
+                } catch (IOException e) {
+                    System.out.println("Failed to close a log file");
+                }
+            }
+        }
+        else
+        {
+            System.out.println(msg);
+        }
+    }
+}
+
+
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/LogReceiver.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/LogReceiver.java
new file mode 100755 (executable)
index 0000000..234a935
--- /dev/null
@@ -0,0 +1,244 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import java.security.InvalidParameterException;
+
+/**
+ * Receiver able to provide low level parsing for device-side log services.
+ */
+public final class LogReceiver {
+
+    private final static int ENTRY_HEADER_SIZE = 20; // 2*2 + 4*4; see LogEntry.
+
+    /**
+     * Represents a log entry and its raw data.
+     */
+    public final static class LogEntry {
+        /*
+         * See //device/include/utils/logger.h
+         */
+        /** 16bit unsigned: length of the payload. */
+        public int  len; /* This is normally followed by a 16 bit padding */
+        /** pid of the process that generated this {@link LogEntry} */
+        public int   pid;
+        /** tid of the process that generated this {@link LogEntry} */
+        public int   tid;
+        /** Seconds since epoch. */
+        public int   sec;
+        /** nanoseconds. */
+        public int   nsec;
+        /** The entry's raw data. */
+        public byte[] data;
+    };
+
+    /**
+     * Classes which implement this interface provide a method that deals
+     * with {@link LogEntry} objects coming from log service through a {@link LogReceiver}.
+     * <p/>This interface provides two methods.
+     * <ul>
+     * <li>{@link #newEntry(com.samsung.sdblib.log.LogReceiver.LogEntry)} provides a
+     * first level of parsing, extracting {@link LogEntry} objects out of the log service output.</li>
+     * <li>{@link #newData(byte[], int, int)} provides a way to receive the raw information
+     * coming directly from the log service.</li>
+     * </ul>
+     */
+    public interface ILogListener {
+        /**
+         * Sent when a new {@link LogEntry} has been parsed by the {@link LogReceiver}.
+         * @param entry the new log entry.
+         */
+        void newEntry(LogEntry entry);
+        
+        /**
+         * Sent when new raw data is coming from the log service.
+         * @param data the raw data buffer.
+         * @param offset the offset into the buffer signaling the beginning of the new data.
+         * @param length the length of the new data.
+         */
+        void newData(byte[] data, int offset, int length);
+    }
+
+    /** Current {@link LogEntry} being read, before sending it to the listener. */
+    private LogEntry mCurrentEntry;
+
+    /** Temp buffer to store partial entry headers. */
+    private byte[] mEntryHeaderBuffer = new byte[ENTRY_HEADER_SIZE];
+    /** Offset in the partial header buffer */
+    private int mEntryHeaderOffset = 0;
+    /** Offset in the partial entry data */
+    private int mEntryDataOffset = 0;
+    
+    /** Listener waiting for receive fully read {@link LogEntry} objects */
+    private ILogListener mListener;
+
+    private boolean mIsCancelled = false;
+    
+    /**
+     * Creates a {@link LogReceiver} with an {@link ILogListener}.
+     * <p/>
+     * The {@link ILogListener} will receive new log entries as they are parsed, in the form 
+     * of {@link LogEntry} objects.
+     * @param listener the listener to receive new log entries.
+     */
+    public LogReceiver(ILogListener listener) {
+        mListener = listener;
+    }
+    
+
+    /**
+     * Parses new data coming from the log service.
+     * @param data the data buffer
+     * @param offset the offset into the buffer signaling the beginning of the new data.
+     * @param length the length of the new data.
+     */
+    public void parseNewData(byte[] data, int offset, int length) {
+        // notify the listener of new raw data
+        if (mListener != null) {
+            mListener.newData(data, offset, length);
+        }
+
+        // loop while there is still data to be read and the receiver has not be cancelled.
+        while (length > 0 && mIsCancelled == false) {
+            // first check if we have no current entry.
+            if (mCurrentEntry == null) {
+                if (mEntryHeaderOffset + length < ENTRY_HEADER_SIZE) {
+                    // if we don't have enough data to finish the header, save
+                    // the data we have and return
+                    System.arraycopy(data, offset, mEntryHeaderBuffer, mEntryHeaderOffset, length);
+                    mEntryHeaderOffset += length;
+                    return;
+                } else {
+                    // we have enough to fill the header, let's do it.
+                    // did we store some part at the beginning of the header?
+                    if (mEntryHeaderOffset != 0) {
+                        // copy the rest of the entry header into the header buffer
+                        int size = ENTRY_HEADER_SIZE - mEntryHeaderOffset; 
+                        System.arraycopy(data, offset, mEntryHeaderBuffer, mEntryHeaderOffset,
+                                size);
+                        
+                        // create the entry from the header buffer
+                        mCurrentEntry = createEntry(mEntryHeaderBuffer, 0);
+    
+                        // since we used the whole entry header buffer, we reset  the offset
+                        mEntryHeaderOffset = 0;
+                        
+                        // adjust current offset and remaining length to the beginning
+                        // of the entry data
+                        offset += size;
+                        length -= size;
+                    } else {
+                        // create the entry directly from the data array
+                        mCurrentEntry = createEntry(data, offset);
+                        
+                        // adjust current offset and remaining length to the beginning
+                        // of the entry data
+                        offset += ENTRY_HEADER_SIZE;
+                        length -= ENTRY_HEADER_SIZE;
+                    }
+                }
+            }
+            
+            // at this point, we have an entry, and offset/length have been updated to skip
+            // the entry header.
+    
+            // if we have enough data for this entry or more, we'll need to end this entry
+            if (length >= mCurrentEntry.len - mEntryDataOffset) {
+                // compute and save the size of the data that we have to read for this entry,
+                // based on how much we may already have read.
+                int dataSize = mCurrentEntry.len - mEntryDataOffset;  
+    
+                // we only read what we need, and put it in the entry buffer.
+                System.arraycopy(data, offset, mCurrentEntry.data, mEntryDataOffset, dataSize);
+                
+                // notify the listener of a new entry
+                if (mListener != null) {
+                    mListener.newEntry(mCurrentEntry);
+                }
+    
+                // reset some flags: we have read 0 data of the current entry.
+                // and we have no current entry being read.
+                mEntryDataOffset = 0;
+                mCurrentEntry = null;
+                
+                // and update the data buffer info to the end of the current entry / start
+                // of the next one.
+                offset += dataSize;
+                length -= dataSize;
+            } else {
+                // we don't have enough data to fill this entry, so we store what we have
+                // in the entry itself.
+                System.arraycopy(data, offset, mCurrentEntry.data, mEntryDataOffset, length);
+                
+                // save the amount read for the data.
+                mEntryDataOffset += length;
+                return;
+            }
+        }
+    }
+
+    /**
+     * Returns whether this receiver is canceling the remote service.
+     */
+    public boolean isCancelled() {
+        return mIsCancelled;
+    }
+    
+    /**
+     * Cancels the current remote service.
+     */
+    public void cancel() {
+        mIsCancelled = true;
+    }
+    
+    /**
+     * Creates a {@link LogEntry} from the array of bytes. This expects the data buffer size
+     * to be at least <code>offset + {@link #ENTRY_HEADER_SIZE}</code>.
+     * @param data the data buffer the entry is read from.
+     * @param offset the offset of the first byte from the buffer representing the entry.
+     * @return a new {@link LogEntry} or <code>null</code> if some error happened.
+     */
+    private LogEntry createEntry(byte[] data, int offset) {
+        if (data.length < offset + ENTRY_HEADER_SIZE) {
+            throw new InvalidParameterException(
+                    "Buffer not big enough to hold full LoggerEntry header");
+        }
+
+        // create the new entry and fill it.
+        LogEntry entry = new LogEntry();
+        entry.len = ArrayHelper.swapU16bitFromArray(data, offset);
+        
+        // we've read only 16 bits, but since there's also a 16 bit padding,
+        // we can skip right over both.
+        offset += 4;
+        
+        entry.pid = ArrayHelper.swap32bitFromArray(data, offset);
+        offset += 4;
+        entry.tid = ArrayHelper.swap32bitFromArray(data, offset);
+        offset += 4;
+        entry.sec = ArrayHelper.swap32bitFromArray(data, offset);
+        offset += 4;
+        entry.nsec = ArrayHelper.swap32bitFromArray(data, offset);
+        offset += 4;
+        
+        // allocate the data
+        entry.data = new byte[entry.len];
+        
+        return entry;
+    }
+    
+}
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/MultiLineReceiver.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/MultiLineReceiver.java
new file mode 100755 (executable)
index 0000000..24a8763
--- /dev/null
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+
+/**
+ * Base implementation of {@link IShellOutputReceiver}, that takes the raw data
+ * coming from the socket, and convert it into {@link String} objects.
+ * <p/>
+ * Additionally, it splits the string by lines.
+ * <p/>
+ * Classes extending it must implement {@link #processNewLines(String[])} which
+ * receives new parsed lines as they become available.
+ */
+public abstract class MultiLineReceiver implements IShellOutputReceiver {
+
+       private String OUTPUT_DECODING = "UTF-8";
+       private boolean mTrimLines = true;
+
+       /** unfinished message line, stored for next packet */
+       private String mUnfinishedLine = null;
+
+       private final ArrayList<String> mArray = new ArrayList<String>();
+
+       /**
+        * Set the trim lines flag.
+        * 
+        * @param trim
+        *            hether the lines are trimmed, or not.
+        */
+       public void setTrimLine(boolean trim) {
+               mTrimLines = trim;
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see com.samsung.sdblib.sdb.IShellOutputReceiver#addOutput( byte[], int,
+        * int)
+        */
+       public final void addOutput(byte[] data, int offset, int length) {
+               if (isCancelled() == false) {
+                       String s = null;
+                       try {
+                               s = new String(data, offset, length, OUTPUT_DECODING); //$NON-NLS-1$
+
+                       } catch (UnsupportedEncodingException e) {
+                               // normal encoding didn't work, try the default one
+                               s = new String(data, offset, length);
+                       }
+
+                       // ok we've got a string
+                       if (s != null) {
+                               // if we had an unfinished line we add it.
+                               if (mUnfinishedLine != null) {
+                                       s = mUnfinishedLine + s;
+                                       mUnfinishedLine = null;
+                               }
+
+                               // now we split the lines
+                               mArray.clear();
+                               int start = 0;
+                               do {
+                                       int index = s.indexOf("\r\n", start); //$NON-NLS-1$
+
+                                       // if \r\n was not found, this is an unfinished line
+                                       // and we store it to be processed for the next packet
+                                       if (index == -1) {
+                                               mUnfinishedLine = s.substring(start);
+                                               break;
+                                       }
+
+                                       // so we found a \r\n;
+                                       // extract the line
+                                       String line = s.substring(start, index);
+                                       if (mTrimLines) {
+                                               line = line.trim();
+                                       }
+                                       mArray.add(line);
+
+                                       // move start to after the \r\n we found
+                                       start = index + 2;
+                               } while (true);
+
+                               if (mArray.size() > 0) {
+                                       // at this point we've split all the lines.
+                                       // make the array
+                                       String[] lines = mArray.toArray(new String[mArray.size()]);
+
+                                       // send it for final processing
+                                       processNewLines(lines);
+                               }
+                       }
+               }
+               else
+               {
+                   Log.d("sdb", "process cancelled");
+               }
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see com.samsung.sdblib.sdb.IShellOutputReceiver#flush()
+        */
+       public final void flush() {
+               if (mUnfinishedLine != null && !mUnfinishedLine.isEmpty()) {
+                       processNewLines(new String[] { mUnfinishedLine });
+               }
+
+               done();
+       }
+
+       /**
+        * Terminates the process. This is called after the last lines have been
+        * through {@link #processNewLines(String[])}.
+        */
+       public void done() {
+               Log.d("sdb", "process done");
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see com.samsung.sdblib.sdb.IShellOutputReceiver#isCancelled()
+        */
+       public boolean isCancelled() {
+               return false;
+       }
+
+       /**
+        * Called when new lines are being received by the remote process.
+        * <p/>
+        * It is guaranteed that the lines are complete when they are given to this
+        * method.
+        * 
+        * @param lines
+        *            The array containing the new lines.
+        */
+       public abstract void processNewLines(String[] lines);
+}
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/NullOutputReceiver.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/NullOutputReceiver.java
new file mode 100644 (file)
index 0000000..1c30a82
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+/**
+ * Implementation of {@link IShellOutputReceiver} that does nothing.
+ * <p/>This can be used to execute a remote shell command when the output is not needed.
+ */
+public final class NullOutputReceiver implements IShellOutputReceiver {
+
+    private static NullOutputReceiver sReceiver = new NullOutputReceiver();
+
+    public static IShellOutputReceiver getReceiver() {
+        return sReceiver;
+    }
+
+    /* (non-Javadoc)
+     * @see com.samsung.sdblib.sdb.IShellOutputReceiver#addOutput(byte[], int, int)
+     */
+    public void addOutput(byte[] data, int offset, int length) {
+    }
+
+    /* (non-Javadoc)
+     * @see com.samsung.sdblib.sdb.IShellOutputReceiver#flush()
+     */
+    public void flush() {
+    }
+
+    /* (non-Javadoc)
+     * @see com.samsung.sdblib.sdb.IShellOutputReceiver#isCancelled()
+     */
+    public boolean isCancelled() {
+        return false;
+    }
+
+}
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/SdbCommandRejectedException.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/SdbCommandRejectedException.java
new file mode 100644 (file)
index 0000000..1209939
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import java.io.IOException;
+
+/**
+ * Exception thrown when sdb refuses a command.
+ */
+public class SdbCommandRejectedException extends IOException {
+    private static final long serialVersionUID = 1L;
+    private final boolean mIsDeviceOffline;
+    private final boolean mErrorDuringDeviceSelection;
+
+    SdbCommandRejectedException(String message) {
+        super(message);
+        mIsDeviceOffline = "device offline".equals(message);
+        mErrorDuringDeviceSelection = false;
+    }
+
+    SdbCommandRejectedException(String message, boolean errorDuringDeviceSelection) {
+        super(message);
+        mErrorDuringDeviceSelection = errorDuringDeviceSelection;
+        mIsDeviceOffline = "device offline".equals(message);
+    }
+
+    /**
+     * Returns true if the error is due to the device being offline.
+     */
+    public boolean isDeviceOffline() {
+        return mIsDeviceOffline;
+    }
+
+    /**
+     * Returns whether sdb refused to target a given device for the command.
+     * <p/>If false, sdb refused the command itself, if true, it refused to target the given
+     * device.
+     */
+    public boolean wasErrorDuringDeviceSelection() {
+        return mErrorDuringDeviceSelection;
+    }
+}
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/SdbHelper.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/SdbHelper.java
new file mode 100644 (file)
index 0000000..60bb4df
--- /dev/null
@@ -0,0 +1,733 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.InetSocketAddress;
+import java.nio.ByteBuffer;
+import java.nio.channels.SocketChannel;
+
+/**
+ * Helper class to handle requests and connections to sdb.
+ * <p/>{@link DebugBridgeServer} is the public API to connection to sdb, while {@link SdbHelper}
+ * does the low level stuff.
+ * <p/>This currently uses spin-wait non-blocking I/O. A Selector would be more efficient,
+ * but seems like overkill for what we're doing here.
+ */
+final class SdbHelper {
+
+    // public static final long kOkay = 0x59414b4fL;
+    // public static final long kFail = 0x4c494146L;
+
+    static final int WAIT_TIME = 5; // spin-wait sleep, in ms
+
+    static final String DEFAULT_ENCODING = "ISO-8859-1"; //$NON-NLS-1$
+    static final String UTF_ENCODING = "UTF-8"; 
+
+    /** do not instantiate */
+    private SdbHelper() {
+    }
+
+    /**
+     * Response from SDB.
+     */
+    static class SdbResponse {
+        public SdbResponse() {
+            message = "";
+        }
+
+        public boolean okay; // first 4 bytes in response were "OKAY"?
+
+        public String message; // diagnostic string if #okay is false
+    }
+
+    /**
+     * Create and connect a new pass-through socket, from the host to a port on
+     * the device.
+     *
+     * @param sdbSockAddr
+     * @param device the device to connect to. Can be null in which case the connection will be
+     * to the first available device.
+     * @param devicePort the port we're opening
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws IOException in case of I/O error on the connection.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     */
+    public static SocketChannel open(InetSocketAddress sdbSockAddr,
+            Device device, int devicePort)
+            throws IOException, TimeoutException, SdbCommandRejectedException {
+
+        SocketChannel sdbChan = SocketChannel.open(sdbSockAddr);
+        try {
+            sdbChan.socket().setTcpNoDelay(true);
+            sdbChan.configureBlocking(false);
+
+            // if the device is not -1, then we first tell sdb we're looking to
+            // talk to a specific device
+            setDevice(sdbChan, device);
+
+            byte[] req = createsdbForwardRequest(null, devicePort);
+            // Log.hexDump(req);
+
+            write(sdbChan, req);
+
+            SdbResponse resp = readSdbResponse(sdbChan, false);
+            if (resp.okay == false) {
+                throw new SdbCommandRejectedException(resp.message);
+            }
+
+            sdbChan.configureBlocking(true);
+        } catch (TimeoutException e) {
+            sdbChan.close();
+            throw e;
+        } catch (IOException e) {
+            sdbChan.close();
+            throw e;
+        }
+
+        return sdbChan;
+    }
+
+    /**
+     * Creates and connects a new pass-through socket, from the host to a port on
+     * the device.
+     *
+     * @param sdbSockAddr
+     * @param device the device to connect to. Can be null in which case the connection will be
+     * to the first available device.
+     * @param pid the process pid to connect to.
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws IOException in case of I/O error on the connection.
+     */
+    public static SocketChannel createPassThroughConnection(InetSocketAddress sdbSockAddr,
+            Device device, int pid)
+            throws TimeoutException, SdbCommandRejectedException, IOException {
+
+        SocketChannel sdbChan = SocketChannel.open(sdbSockAddr);
+        try {
+            sdbChan.socket().setTcpNoDelay(true);
+            sdbChan.configureBlocking(false);
+
+            // if the device is not -1, then we first tell sdb we're looking to
+            // talk to a specific device
+            setDevice(sdbChan, device);
+
+            byte[] req = createJdwpForwardRequest(pid);
+            // Log.hexDump(req);
+
+            write(sdbChan, req);
+
+            SdbResponse resp = readSdbResponse(sdbChan, false /* readDiagString */);
+            if (resp.okay == false) {
+                throw new SdbCommandRejectedException(resp.message);
+            }
+
+            sdbChan.configureBlocking(true);
+        } catch (TimeoutException e) {
+            sdbChan.close();
+            throw e;
+        } catch (IOException e) {
+            sdbChan.close();
+            throw e;
+        }
+
+        return sdbChan;
+    }
+
+    /**
+     * Creates a port forwarding request for sdb. This returns an array
+     * containing "####tcp:{port}:{addStr}".
+     * @param addrStr the host. Can be null.
+     * @param port the port on the device. This does not need to be numeric.
+     */
+    private static byte[] createsdbForwardRequest(String addrStr, int port) {
+        String reqStr;
+
+        if (addrStr == null)
+            reqStr = "tcp:" + port;
+        else
+            reqStr = "tcp:" + port + ":" + addrStr;
+        return formSdbRequest(reqStr);
+    }
+
+    /**
+     * Creates a port forwarding request to a jdwp process. This returns an array
+     * containing "####jwdp:{pid}".
+     * @param pid the jdwp process pid on the device.
+     */
+    private static byte[] createJdwpForwardRequest(int pid) {
+        String reqStr = String.format("jdwp:%1$d", pid); //$NON-NLS-1$
+        return formSdbRequest(reqStr);
+    }
+
+    /**
+     * Create an ASCII string preceeded by four hex digits. The opening "####"
+     * is the length of the rest of the string, encoded as ASCII hex (case
+     * doesn't matter). "port" and "host" are what we want to forward to. If
+     * we're on the host side connecting into the device, "addrStr" should be
+     * null.
+     */
+    static byte[] formSdbRequest(String req) {
+
+        byte [] result;
+        byte [] reqByte;
+        byte [] lengthByte;
+
+        try {
+            reqByte = req.getBytes(UTF_ENCODING);
+            
+            //info about reqByte length with 4 digit ex) 001D
+            lengthByte = String.format("%04X", reqByte.length).getBytes();
+
+            result = new byte[reqByte.length + 4];
+            System.arraycopy(lengthByte, 0, result, 0, 4);
+            System.arraycopy(reqByte, 0, result, 4, reqByte.length);
+            
+        } catch (UnsupportedEncodingException uee) {
+            uee.printStackTrace(); // not expected
+            return null;
+        }
+        assert result.length == reqByte.length + 4;
+        return result;
+    }
+
+    /**
+     * Reads the response from sdb after a command.
+     * @param chan The socket channel that is connected to sdb.
+     * @param readDiagString If true, we're expecting an OKAY response to be
+     *      followed by a diagnostic string. Otherwise, we only expect the
+     *      diagnostic string to follow a FAIL.
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws IOException in case of I/O error on the connection.
+     */
+    static SdbResponse readSdbResponse(SocketChannel chan, boolean readDiagString)
+            throws TimeoutException, IOException {
+
+        SdbResponse resp = new SdbResponse();
+
+        byte[] reply = new byte[4];
+        read(chan, reply);
+
+        if (isOkay(reply)) {
+            resp.okay = true;
+        } else {
+            readDiagString = true; // look for a reason after the FAIL
+            resp.okay = false;
+        }
+
+        // not a loop -- use "while" so we can use "break"
+            while (readDiagString) {
+                // length string is in next 4 bytes
+                byte[] lenBuf = new byte[4];
+                read(chan, lenBuf);
+
+                String lenStr = replyToString(lenBuf);
+
+                int len;
+                try {
+                    len = Integer.parseInt(lenStr, 16);
+                } catch (NumberFormatException nfe) {
+                    Log.w("sdb", "Expected digits, got '" + lenStr + "': "
+                            + lenBuf[0] + " " + lenBuf[1] + " " + lenBuf[2] + " "
+                            + lenBuf[3]);
+                    Log.w("sdb", "reply was " + replyToString(reply));
+                    break;
+                }
+
+                byte[] msg = new byte[len];
+                read(chan, msg);
+
+                resp.message = replyToString(msg);
+                Log.v("sdb", "Got reply '" + replyToString(reply) + "', diag='"
+                        + resp.message + "'");
+
+                break;
+            }
+
+        return resp;
+    }
+
+    /**
+     * Executes a shell command on the device without output receiver.
+     *
+     * @param sdbSockAddr the {@link InetSocketAddress} to sdb.
+     * @param command the shell command to execute
+     * @param device the {@link IDevice} on which to execute the command.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws IOException in case of I/O error on the connection.
+        *
+     */
+    static void executeRemoteCommand(InetSocketAddress sdbSockAddr,
+            String command, IDevice device)
+            throws SdbCommandRejectedException, IOException {
+        Log.v("sdb", "execute: running " + command);
+
+        SocketChannel sdbChan = null;
+        try {
+            sdbChan = SocketChannel.open(sdbSockAddr);
+            sdbChan.configureBlocking(false);
+
+            // if the device is not -1, then we first tell sdb we're looking to
+            // talk
+            // to a specific device
+            setDevice(sdbChan, device);
+
+            byte[] request = formSdbRequest("shell:" + command); //$NON-NLS-1$
+            write(sdbChan, request);
+
+            SdbResponse resp = readSdbResponse(sdbChan, false /* readDiagString */);
+            if (resp.okay == false) {
+                Log.e("sdb", "sdb rejected shell command (" + command + "): " + resp.message);
+                throw new SdbCommandRejectedException(resp.message);
+            }
+            
+            byte[] data = new byte[16384];
+            ByteBuffer buf = ByteBuffer.wrap(data);
+               int exitCount = 0;
+            while(true) {
+               int count = 0;
+                   sdbChan.read(buf);
+                   if (count < 0) {
+                       // met EOF
+                       break;
+                   } else if (count == 0) {
+                       if (exitCount < 5) {
+                               try {
+                                   int wait = WAIT_TIME * 5;
+                                   exitCount++;
+                                   Thread.sleep(wait);
+                               } catch (InterruptedException ie) {
+                               }
+                       } else
+                               break;
+                   } else {
+                       buf.rewind();
+                   }
+            }
+        } finally {
+            if (sdbChan != null) {
+                sdbChan.close();
+            }
+        }
+    }
+
+    /**
+     * Executes a shell command on the device and retrieve the output. The output is
+     * handed to <var>rcvr</var> as it arrives.
+     *
+     * @param sdbSockAddr the {@link InetSocketAddress} to sdb.
+     * @param command the shell command to execute
+     * @param device the {@link IDevice} on which to execute the command.
+     * @param rcvr the {@link IShellOutputReceiver} that will receives the output of the shell
+     *            command
+     * @param maxTimeToOutputResponse max time between command output. If more time passes
+     *            between command output, the method will throw
+     *            {@link ShellCommandUnresponsiveException}. A value of 0 means the method will
+     *            wait forever for command output and never throw.
+     * @throws TimeoutException in case of timeout on the connection when sending the command.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws ShellCommandUnresponsiveException in case the shell command doesn't send any output
+     *            for a period longer than <var>maxTimeToOutputResponse</var>.
+     * @throws IOException in case of I/O error on the connection.
+     *
+     * @see SdbPreferences#getTimeOut()
+     */
+    static void executeRemoteCommand(InetSocketAddress sdbSockAddr,
+            String command, IDevice device, IShellOutputReceiver rcvr, int maxTimeToOutputResponse)
+            throws TimeoutException, SdbCommandRejectedException, ShellCommandUnresponsiveException,
+            IOException {
+        Log.v("sdb", "execute: running " + command);
+
+        SocketChannel sdbChan = null;
+        try {
+            sdbChan = SocketChannel.open(sdbSockAddr);
+            sdbChan.configureBlocking(false);
+
+            // if the device is not -1, then we first tell sdb we're looking to
+            // talk
+            // to a specific device
+            setDevice(sdbChan, device);
+
+            byte[] request = formSdbRequest("shell:" + command); //$NON-NLS-1$
+            write(sdbChan, request);
+
+            SdbResponse resp = readSdbResponse(sdbChan, false /* readDiagString */);
+            if (resp.okay == false) {
+                Log.e("sdb", "sdb rejected shell command (" + command + "): " + resp.message);
+                throw new SdbCommandRejectedException(resp.message);
+            }
+
+            byte[] data = new byte[16384];
+            ByteBuffer buf = ByteBuffer.wrap(data);
+            int timeToResponseCount = 0;
+            while (true) {
+                int count;
+
+                if (rcvr != null && rcvr.isCancelled()) {
+                    Log.v("sdb", "execute: cancelled");
+                    break;
+                }
+
+                count = sdbChan.read(buf);
+                if (count < 0) {
+                    // we're at the end, we flush the output
+                    rcvr.flush();
+                    Log.v("sdb", "execute '" + command + "' on '" + device + "' : EOF hit. Read: "
+                            + count);
+                    break;
+                } else if (count == 0) {
+                    try {
+                        int wait = WAIT_TIME * 5;
+                        timeToResponseCount += wait;
+                        if (maxTimeToOutputResponse > 0 &&
+                                timeToResponseCount > maxTimeToOutputResponse) {
+                            throw new ShellCommandUnresponsiveException();
+                        }
+                        Thread.sleep(wait);
+                    } catch (InterruptedException ie) {
+                    }
+                } else {
+                    // reset timeout
+                    timeToResponseCount = 0;
+
+                    // send data to receiver if present
+                    if (rcvr != null) {
+                        rcvr.addOutput(buf.array(), buf.arrayOffset(), buf.position());
+                    }
+                    buf.rewind();
+                }
+            }
+        } finally {
+            if (sdbChan != null) {
+                sdbChan.close();
+            }
+            Log.v("sdb", "execute: returning");
+        }
+    }
+
+    /**
+     * Runs the Event log service on the {@link Device}, and provides its output to the
+     * {@link LogReceiver}.
+     * <p/>This call is blocking until {@link LogReceiver#isCancelled()} returns true.
+     * @param sdbSockAddr the socket address to connect to sdb
+     * @param device the Device on which to run the service
+     * @param rcvr the {@link LogReceiver} to receive the log output
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws IOException in case of I/O error on the connection.
+     */
+    public static void runEventLogService(InetSocketAddress sdbSockAddr, Device device,
+            LogReceiver rcvr) throws TimeoutException, SdbCommandRejectedException, IOException {
+        runLogService(sdbSockAddr, device, "events", rcvr); //$NON-NLS-1$
+    }
+
+    /**
+     * Runs a log service on the {@link Device}, and provides its output to the {@link LogReceiver}.
+     * <p/>This call is blocking until {@link LogReceiver#isCancelled()} returns true.
+     * @param sdbSockAddr the socket address to connect to sdb
+     * @param device the Device on which to run the service
+     * @param logName the name of the log file to output
+     * @param rcvr the {@link LogReceiver} to receive the log output
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws IOException in case of I/O error on the connection.
+     */
+    public static void runLogService(InetSocketAddress sdbSockAddr, Device device, String logName,
+            LogReceiver rcvr) throws TimeoutException, SdbCommandRejectedException, IOException {
+        SocketChannel sdbChan = null;
+
+        try {
+            sdbChan = SocketChannel.open(sdbSockAddr);
+            sdbChan.configureBlocking(false);
+
+            // if the device is not -1, then we first tell sdb we're looking to talk
+            // to a specific device
+            setDevice(sdbChan, device);
+
+            byte[] request = formSdbRequest("log:" + logName);
+            write(sdbChan, request);
+
+            SdbResponse resp = readSdbResponse(sdbChan, false /* readDiagString */);
+            if (resp.okay == false) {
+                throw new SdbCommandRejectedException(resp.message);
+            }
+
+            byte[] data = new byte[16384];
+            ByteBuffer buf = ByteBuffer.wrap(data);
+            while (true) {
+                int count;
+
+                if (rcvr != null && rcvr.isCancelled()) {
+                    break;
+                }
+
+                count = sdbChan.read(buf);
+                if (count < 0) {
+                    break;
+                } else if (count == 0) {
+                    try {
+                        Thread.sleep(WAIT_TIME * 5);
+                    } catch (InterruptedException ie) {
+                    }
+                } else {
+                    if (rcvr != null) {
+                        rcvr.parseNewData(buf.array(), buf.arrayOffset(), buf.position());
+                    }
+                    buf.rewind();
+                }
+            }
+        } finally {
+            if (sdbChan != null) {
+                sdbChan.close();
+            }
+        }
+    }
+
+    /**
+     * Creates a port forwarding between a local and a remote port.
+     * @param sdbSockAddr the socket address to connect to sdb
+     * @param device the device on which to do the port fowarding
+     * @param localPort the local port to forward
+     * @param remotePort the remote port.
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws IOException in case of I/O error on the connection.
+     */
+    public static void createForward(InetSocketAddress sdbSockAddr, Device device, int localPort,
+            int remotePort) throws TimeoutException, SdbCommandRejectedException, IOException {
+
+        SocketChannel sdbChan = null;
+        try {
+            sdbChan = SocketChannel.open(sdbSockAddr);
+            sdbChan.configureBlocking(false);
+
+            byte[] request = formSdbRequest(String.format(
+                    "host-serial:%1$s:forward:tcp:%2$d;tcp:%3$d", //$NON-NLS-1$
+                    device.getSerialNumber(), localPort, remotePort));
+
+            write(sdbChan, request);
+
+            SdbResponse resp = readSdbResponse(sdbChan, false /* readDiagString */);
+            if (resp.okay == false) {
+                Log.w("create-forward", "Error creating forward: " + resp.message);
+                throw new SdbCommandRejectedException(resp.message);
+            }
+        } finally {
+            if (sdbChan != null) {
+                sdbChan.close();
+            }
+        }
+    }
+
+    /**
+     * Remove a port forwarding between a local and a remote port.
+     * @param sdbSockAddr the socket address to connect to sdb
+     * @param device the device on which to remove the port fowarding
+     * @param localPort the local port of the forward
+     * @param remotePort the remote port.
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws IOException in case of I/O error on the connection.
+     */
+    public static void removeForward(InetSocketAddress sdbSockAddr, Device device, int localPort,
+            int remotePort) throws TimeoutException, SdbCommandRejectedException, IOException {
+
+        SocketChannel sdbChan = null;
+        try {
+            sdbChan = SocketChannel.open(sdbSockAddr);
+            sdbChan.configureBlocking(false);
+
+            byte[] request = formSdbRequest(String.format(
+                    "host-serial:%1$s:killforward:tcp:%2$d;tcp:%3$d", //$NON-NLS-1$
+                    device.getSerialNumber(), localPort, remotePort));
+
+            write(sdbChan, request);
+
+            SdbResponse resp = readSdbResponse(sdbChan, false /* readDiagString */);
+            if (resp.okay == false) {
+                Log.w("remove-forward", "Error creating forward: " + resp.message);
+                throw new SdbCommandRejectedException(resp.message);
+            }
+        } finally {
+            if (sdbChan != null) {
+                sdbChan.close();
+            }
+        }
+    }
+
+    /**
+     * Checks to see if the first four bytes in "reply" are OKAY.
+     */
+    static boolean isOkay(byte[] reply) {
+        return reply[0] == (byte)'O' && reply[1] == (byte)'K'
+                && reply[2] == (byte)'A' && reply[3] == (byte)'Y';
+    }
+
+    /**
+     * Converts an sdb reply to a string.
+     */
+    static String replyToString(byte[] reply) {
+        String result;
+        try {
+            result = new String(reply, DEFAULT_ENCODING);
+        } catch (UnsupportedEncodingException uee) {
+            uee.printStackTrace(); // not expected
+            result = "";
+        }
+        return result;
+    }
+
+    /**
+     * Reads from the socket until the array is filled, or no more data is coming (because
+     * the socket closed or the timeout expired).
+     * <p/>This uses the default time out value.
+     *
+     * @param chan the opened socket to read from. It must be in non-blocking
+     *      mode for timeouts to work
+     * @param data the buffer to store the read data into.
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws IOException in case of I/O error on the connection.
+     */
+    static void read(SocketChannel chan, byte[] data) throws TimeoutException, IOException {
+        read(chan, data, -1, SdbPreferences.getTimeOut());
+    }
+
+    /**
+     * Reads from the socket until the array is filled, the optional length
+     * is reached, or no more data is coming (because the socket closed or the
+     * timeout expired). After "timeout" milliseconds since the
+     * previous successful read, this will return whether or not new data has
+     * been found.
+     *
+     * @param chan the opened socket to read from. It must be in non-blocking
+     *      mode for timeouts to work
+     * @param data the buffer to store the read data into.
+     * @param length the length to read or -1 to fill the data buffer completely
+     * @param timeout The timeout value. A timeout of zero means "wait forever".
+     */
+    static void read(SocketChannel chan, byte[] data, int length, int timeout)
+            throws TimeoutException, IOException {
+        ByteBuffer buf = ByteBuffer.wrap(data, 0, length != -1 ? length : data.length);
+        int numWaits = 0;
+
+        while (buf.position() != buf.limit()) {
+            int count;
+
+            count = chan.read(buf);
+            if (count < 0) {
+                Log.d("sdb", "read: channel EOF");
+                throw new IOException("EOF");
+            } else if (count == 0) {
+                // TODO: need more accurate timeout?
+                if (timeout != 0 && numWaits * WAIT_TIME > timeout) {
+                    Log.d("sdb", "read: timeout");
+                    throw new TimeoutException();
+                }
+                // non-blocking spin
+                try {
+                    Thread.sleep(WAIT_TIME);
+                } catch (InterruptedException ie) {
+                }
+                numWaits++;
+            } else {
+                numWaits = 0;
+            }
+        }
+    }
+
+    /**
+     * Write until all data in "data" is written or the connection fails or times out.
+     * <p/>This uses the default time out value.
+     * @param chan the opened socket to write to.
+     * @param data the buffer to send.
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws IOException in case of I/O error on the connection.
+     */
+    static void write(SocketChannel chan, byte[] data) throws TimeoutException, IOException {
+        write(chan, data, -1, SdbPreferences.getTimeOut());
+    }
+
+    /**
+     * Write until all data in "data" is written, the optional length is reached,
+     * the timeout expires, or the connection fails. Returns "true" if all
+     * data was written.
+     * @param chan the opened socket to write to.
+     * @param data the buffer to send.
+     * @param length the length to write or -1 to send the whole buffer.
+     * @param timeout The timeout value. A timeout of zero means "wait forever".
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws IOException in case of I/O error on the connection.
+     */
+    static void write(SocketChannel chan, byte[] data, int length, int timeout)
+            throws TimeoutException, IOException {
+        ByteBuffer buf = ByteBuffer.wrap(data, 0, length != -1 ? length : data.length);
+        int numWaits = 0;
+
+        while (buf.position() != buf.limit()) {
+            int count;
+
+            count = chan.write(buf);
+            if (count < 0) {
+                Log.d("sdb", "write: channel EOF");
+                throw new IOException("channel EOF");
+            } else if (count == 0) {
+                // TODO: need more accurate timeout?
+                if (timeout != 0 && numWaits * WAIT_TIME > timeout) {
+                    Log.d("sdb", "write: timeout");
+                    throw new TimeoutException();
+                }
+                // non-blocking spin
+                try {
+                    Thread.sleep(WAIT_TIME);
+                } catch (InterruptedException ie) {
+                }
+                numWaits++;
+            } else {
+                numWaits = 0;
+            }
+        }
+    }
+
+    /**
+     * tells sdb to talk to a specific device
+     *
+     * @param sdbChan the socket connection to sdb
+     * @param device The device to talk to.
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws SdbCommandRejectedException if sdb rejects the command
+     * @throws IOException in case of I/O error on the connection.
+     */
+    static void setDevice(SocketChannel sdbChan, IDevice device)
+            throws TimeoutException, SdbCommandRejectedException, IOException {
+        // if the device is not -1, then we first tell sdb we're looking to talk
+        // to a specific device
+        if (device != null) {
+            String msg = "host:transport:" + device.getSerialNumber(); //$NON-NLS-1$
+            byte[] device_query = formSdbRequest(msg);
+
+            write(sdbChan, device_query);
+
+            SdbResponse resp = readSdbResponse(sdbChan, false /* readDiagString */);
+            if (resp.okay == false) {
+                throw new SdbCommandRejectedException(resp.message,
+                        true/*errorDuringDeviceSelection*/);
+            }
+        }
+    }
+}
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/SdbPreferences.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/SdbPreferences.java
new file mode 100644 (file)
index 0000000..3abd06f
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import org.tizen.sdblib.Log.LogLevel;
+
+/**
+ * Preferences for the sdb library.
+ * <p/>This class does not handle storing the preferences. It is merely a central point for
+ * applications using the sdblib to override the default values.
+ * <p/>Various components of the sdblib query this class to get their values.
+ * <p/>Calls to some <code>set##()</code> methods will update the components using the values
+ * right away, while other methods will have no effect once {@link AndroidDebugBridge#init(boolean)}
+ * has been called.
+ * <p/>Check the documentation of each method.
+ */
+public final class SdbPreferences {
+
+       public static LogLevel DEFAULT_LOG_LEVEL = LogLevel.ERROR;
+    /** Default timeout values for sdb connection (milliseconds) */
+    public static final int DEFAULT_TIMEOUT = 5000; // standard delay, in ms
+
+    private static LogLevel sLogLevel = DEFAULT_LOG_LEVEL;
+    private static int sTimeOut = DEFAULT_TIMEOUT;
+    
+    private static final String DEFAULT_LOG_LEVEL_PROPERTY = System.getProperty("default.sdblib.loglevel");
+
+    /**
+     * Returns the minimum {@link LogLevel} being displayed.
+     */
+    public static LogLevel getLogLevel() {
+        String default_level = DEFAULT_LOG_LEVEL_PROPERTY;
+        if(default_level != null)
+        {
+            LogLevel levels[] = LogLevel.values();
+            for(LogLevel level : levels)
+            {
+                if(level.getPriority() == Integer.parseInt(default_level))
+                {
+                    DEFAULT_LOG_LEVEL = level;
+                    return DEFAULT_LOG_LEVEL;
+                }
+            }
+        }
+        return sLogLevel;
+    }
+
+    /**
+     * Sets the minimum {@link LogLevel} to display.
+     * <p/>This change takes effect right away.
+     */
+    public static void setLogLevel(String value) {
+        sLogLevel = LogLevel.getByString(value);
+
+        Log.setLevel(sLogLevel);
+    }
+
+    /**
+     * Returns the timeout to be used in sdb connections (milliseconds).
+     */
+    public static int getTimeOut() {
+        return sTimeOut;
+    }
+
+    /**
+     * Sets the timeout value for sdb connection.
+     * <p/>This change takes effect for newly created connections only.
+     * @param timeOut the timeout value (milliseconds).
+     */
+    public static void setTimeOut(int timeOut) {
+        sTimeOut = timeOut;
+    }
+
+    /**
+     * Non accessible constructor.
+     */
+    private SdbPreferences() {
+        // pass, only static methods in the class.
+    }
+}
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/SdbShellProcess.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/SdbShellProcess.java
new file mode 100644 (file)
index 0000000..2bfa8f8
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.sdblib;
+
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+
+public class SdbShellProcess extends Process {
+
+       public Process process = null;
+       public BufferedWriter bw = null;
+       
+       public SdbShellProcess(Process process, String command) {
+               this.process = process;
+               bw = new BufferedWriter(new OutputStreamWriter(this.process.getOutputStream()));
+               try {
+                       bw.write(command + ";exit");
+                       bw.newLine();
+                       bw.flush();
+               } catch (IOException e) {
+                       Log.e("sdb", "buffer write failed:" +  e);
+               }
+       }
+       
+       private void interrupt() {
+               if (bw == null)
+                       return;
+
+               char c = 0x03; //standard code representing "Ctrl-C" sequence
+               try {
+                       bw.write(c);
+                       bw.flush();
+                       Thread.sleep(250); // wait for terminate
+               } catch (IOException e) {
+                       Log.e("sdb", "buffer write failed:" +  e);
+               } catch (InterruptedException e) {
+                       Log.e("sdb", "buffer interruted:" +  e);
+               } finally {
+                       try {
+                               bw.close();
+                       } catch (IOException e) {
+                               Log.e("sdb", "close failed:" +  e);
+                       }
+               }
+       }
+       
+       @Override
+       public void destroy() {
+               interrupt();
+               try {
+                       process.exitValue();
+               } catch (IllegalThreadStateException e) {
+                       process.destroy();
+               }
+       }
+
+       @Override
+       public int exitValue() {
+               return process.exitValue();
+       }
+
+       @Override
+       public InputStream getErrorStream() {
+               return process.getErrorStream();
+       }
+
+       @Override
+       public InputStream getInputStream() {
+               return process.getInputStream();
+       }
+
+       @Override
+       public OutputStream getOutputStream() {
+               return process.getOutputStream();
+       }
+
+       @Override
+       public int waitFor() throws InterruptedException {
+               return process.waitFor();
+       }
+}
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/ShellCommandUnresponsiveException.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/ShellCommandUnresponsiveException.java
new file mode 100644 (file)
index 0000000..bcd8bf4
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import java.io.IOException;
+
+/**
+ * Exception thrown when a shell command executed on a device takes too long to send its output.
+ * <p/>The command may not actually be unresponsive, it just has spent too much time not outputting
+ * any thing to the console.
+ */
+public class ShellCommandUnresponsiveException extends IOException {
+    private static final long serialVersionUID = 1L;
+}
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/SmartDevelopmentBridge.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/SmartDevelopmentBridge.java
new file mode 100644 (file)
index 0000000..e5a8030
--- /dev/null
@@ -0,0 +1,942 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.UnknownHostException;
+import java.security.InvalidParameterException;
+import java.util.ArrayList;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+/**
+ * A connection to the host-side smart development bridge (sdb)
+ * <p/>This is the central point to communicate with any devices, emulators, or the applications
+ * running on them.
+ * <p/><b>{@link #init(boolean)} must be called before anything is done.</b>
+ */
+public final class SmartDevelopmentBridge {
+    private final static String SDB = "sdb"; //$NON-NLS-1$
+    private final static String SDBLIB = "sdblib"; //$NON-NLS-1$
+    private final static String SERVER_PORT_ENV_VAR = "SDB_SERVER_PORT"; //$NON-NLS-1$
+
+    // Where to find the SDB bridge.
+    final static String SDB_HOST = "127.0.0.1"; //$NON-NLS-1$
+    final static int SDB_PORT = 26099;
+
+    private static InetAddress sHostAddr;
+    private static InetSocketAddress sSocketAddr;
+
+    private static SmartDevelopmentBridge sThis;
+
+    /** Full path to sdb. */
+    private String mSdbOsLocation = null;
+
+    protected Lock lock = new ReentrantLock();
+    private boolean mStarted = false;
+
+    private DeviceMonitor mDeviceMonitor;
+
+    private final static ArrayList<IDebugBridgeChangeListener> sBridgeListeners =
+        new ArrayList<IDebugBridgeChangeListener>();
+    private final static ArrayList<IDeviceChangeListener> sDeviceListeners =
+        new ArrayList<IDeviceChangeListener>();
+
+    // lock object for synchronization
+    private static final Object sLock = sBridgeListeners;
+
+    /**
+     * Classes which implement this interface provide a method that deals
+     * with {@link SmartDevelopmentBridge} changes.
+     */
+    public interface IDebugBridgeChangeListener {
+        /**
+         * Sent when a new {@link SmartDevelopmentBridge} is connected.
+         * <p/>
+         * This is sent from a non UI thread.
+         * @param bridge the new {@link SmartDevelopmentBridge} object.
+         */
+        public void bridgeChanged(SmartDevelopmentBridge bridge);
+    }
+
+    /**
+     * Classes which implement this interface provide methods that deal
+     * with {@link IDevice} addition, deletion, and changes.
+     */
+    public interface IDeviceChangeListener {
+        /**
+         * Sent when the a device is connected to the {@link SmartDevelopmentBridge}.
+         * <p/>
+         * This is sent from a non UI thread.
+         * @param device the new device.
+         */
+        public void deviceConnected(IDevice device);
+
+        /**
+         * Sent when the a device is connected to the {@link SmartDevelopmentBridge}.
+         * <p/>
+         * This is sent from a non UI thread.
+         * @param device the new device.
+         */
+        public void deviceDisconnected(IDevice device);
+
+        /**
+         * Sent when a device data changed, or when clients are started/terminated on the device.
+         * <p/>
+         * This is sent from a non UI thread.
+         * @param device the device that was updated.
+         * @param changeMask the mask describing what changed. It can contain any of the following
+         * values: {@link IDevice#CHANGE_BUILD_INFO}, {@link IDevice#CHANGE_STATE},
+         * {@link IDevice#CHANGE_CLIENT_LIST}
+         */
+        public void deviceChanged(IDevice device, int changeMask);
+    }
+
+    /**
+     * Initializes the <code>sdb</code> library.
+     * <p/>This must be called once <b>before</b> any call to
+     * {@link #createBridge(String, boolean)}.
+     * <p>The library can be initialized in 2 ways:
+     * <ul>
+     * <li>Mode 1: <var>clientSupport</var> == <code>true</code>.<br>The library monitors the
+     * devices and the applications running on them. It will connect to each application, as a
+     * debugger of sort, to be able to interact with them through JDWP packets.</li>
+     * <li>Mode 2: <var>clientSupport</var> == <code>false</code>.<br>The library only monitors
+     * devices. The applications are left untouched, letting other tools built on
+     * <code>sdblib</code> to connect a debugger to them.</li>
+     * </ul>
+     * <p/><b>Only one tool can run in mode 1 at the same time.</b>
+     * <p/>Note that mode 1 does not prevent debugging of applications running on devices. Mode 1
+     * lets debuggers connect to <code>sdblib</code> which acts as a proxy between the debuggers and
+     * the applications to debug. See {@link Client#getDebuggerListenPort()}.
+     * <p/>The preferences of <code>sdblib</code> should also be initialized with whatever default
+     * values were changed from the default values.
+     * <p/>When the application quits, {@link #terminate()} should be called.
+     * @param clientSupport Indicates whether the library should enable the monitoring and
+     * interaction with applications running on the devices.
+     * @see SmartDevelopmentBridge#createBridge(String, boolean)
+     * @see SdbPreferences
+     */
+    public static void init() {
+        // Determine port and instantiate socket address.
+        initsdbSocketAddr();
+    }
+
+    /**
+     * Terminates the sdb library. This must be called upon application termination.
+     */
+    public static void terminate() {
+        // kill the monitoring services
+        if (sThis != null && sThis.mDeviceMonitor != null) {
+            sThis.mDeviceMonitor.stop();
+            sThis.mDeviceMonitor = null;
+        }
+    }
+
+    /**
+     * Returns the socket address of the SDB server on the host.
+     */
+    public static InetSocketAddress getSocketAddress() {
+        return sSocketAddr;
+    }
+
+    /**
+     * Creates a {@link SmartDevelopmentBridge} that is not linked to any particular executable.
+     * <p/>This bridge will expect sdb to be running. It will not be able to start/stop
+     * sdb.
+     * <p/>If a bridge has already been started, it is directly returned with no changes (similar
+     * to calling {@link #getBridge()}).
+     * @return a connected bridge.
+     */
+    public static SmartDevelopmentBridge createBridge() {
+        synchronized (sLock) {
+            if (sThis != null) {
+                return sThis;
+            }
+
+            try {
+                sThis = new SmartDevelopmentBridge();
+                sThis.start();
+            } catch (InvalidParameterException e) {
+                sThis = null;
+            }
+
+            // because the listeners could remove themselves from the list while processing
+            // their event callback, we make a copy of the list and iterate on it instead of
+            // the main list.
+            // This mostly happens when the application quits.
+            IDebugBridgeChangeListener[] listenersCopy = sBridgeListeners.toArray(
+                    new IDebugBridgeChangeListener[sBridgeListeners.size()]);
+
+            // notify the listeners of the change
+            for (IDebugBridgeChangeListener listener : listenersCopy) {
+                // we attempt to catch any exception so that a bad listener doesn't kill our
+                // thread
+                try {
+                    listener.bridgeChanged(sThis);
+                } catch (Exception e) {
+                    Log.e(SDBLIB, e);
+                }
+            }
+
+            return sThis;
+        }
+    }
+
+
+    /**
+     * Creates a new debug bridge from the location of the command line tool.
+     * <p/>
+     * Any existing server will be disconnected, unless the location is the same and
+     * <code>forceNewBridge</code> is set to false.
+     * @param osLocation the location of the command line tool 'sdb'
+     * @param forceNewBridge force creation of a new bridge even if one with the same location
+     * already exists.
+     * @return a connected bridge.
+     * @throws Exception
+     */
+    public static SmartDevelopmentBridge createBridge(String osLocation, boolean forceNewBridge){
+        synchronized (sLock) {
+            if (sThis != null) {
+                if (sThis.mSdbOsLocation != null && sThis.mSdbOsLocation.equals(osLocation) &&
+                        forceNewBridge == false) {
+                    return sThis;
+                } else {
+                    // stop the current server
+                    sThis.stop();
+                }
+            }
+
+            sThis = new SmartDevelopmentBridge(osLocation);
+            sThis.start();
+
+            // because the listeners could remove themselves from the list while processing
+            // their event callback, we make a copy of the list and iterate on it instead of
+            // the main list.
+            // This mostly happens when the application quits.
+            IDebugBridgeChangeListener[] listenersCopy = sBridgeListeners.toArray(
+                    new IDebugBridgeChangeListener[sBridgeListeners.size()]);
+
+            // notify the listeners of the change
+            for (IDebugBridgeChangeListener listener : listenersCopy) {
+                // we attempt to catch any exception so that a bad listener doesn't kill our
+                // thread
+                try {
+                    listener.bridgeChanged(sThis);
+                } catch (Exception e) {
+                    Log.e(SDBLIB, e);
+                }
+            }
+
+            return sThis;
+        }
+    }
+
+    /**
+     * Returns the current debug bridge. Can be <code>null</code> if none were created.
+     */
+    public static SmartDevelopmentBridge getBridge() {
+        return sThis;
+    }
+
+    public String getSdbOsLocation() {
+               return mSdbOsLocation;
+       }
+
+       /**
+     * Disconnects the current debug bridge, and destroy the object.
+     * <p/>This also stops the current sdb host server.
+     * <p/>
+     * A new object will have to be created with {@link #createBridge(String, boolean)}.
+     */
+    public static void disconnectBridge() {
+        synchronized (sLock) {
+            if (sThis != null) {
+                sThis.stop();
+                sThis = null;
+
+                // because the listeners could remove themselves from the list while processing
+                // their event callback, we make a copy of the list and iterate on it instead of
+                // the main list.
+                // This mostly happens when the application quits.
+                IDebugBridgeChangeListener[] listenersCopy = sBridgeListeners.toArray(
+                        new IDebugBridgeChangeListener[sBridgeListeners.size()]);
+
+                // notify the listeners.
+                for (IDebugBridgeChangeListener listener : listenersCopy) {
+                    // we attempt to catch any exception so that a bad listener doesn't kill our
+                    // thread
+                    try {
+                        listener.bridgeChanged(sThis);
+                    } catch (Exception e) {
+                        Log.e(SDBLIB, e);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Adds the listener to the collection of listeners who will be notified when a new
+     * {@link SmartDevelopmentBridge} is connected, by sending it one of the messages defined
+     * in the {@link IDebugBridgeChangeListener} interface.
+     * @param listener The listener which should be notified.
+     */
+    public static void addDebugBridgeChangeListener(IDebugBridgeChangeListener listener) {
+        synchronized (sLock) {
+            if (sBridgeListeners.contains(listener) == false) {
+                sBridgeListeners.add(listener);
+                if (sThis != null) {
+                    // we attempt to catch any exception so that a bad listener doesn't kill our
+                    // thread
+                    try {
+                        listener.bridgeChanged(sThis);
+                    } catch (Exception e) {
+                        Log.e(SDBLIB, e);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Removes the listener from the collection of listeners who will be notified when a new
+     * {@link SmartDevelopmentBridge} is started.
+     * @param listener The listener which should no longer be notified.
+     */
+    public static void removeDebugBridgeChangeListener(IDebugBridgeChangeListener listener) {
+        synchronized (sLock) {
+            sBridgeListeners.remove(listener);
+        }
+    }
+
+    /**
+     * Adds the listener to the collection of listeners who will be notified when a {@link IDevice}
+     * is connected, disconnected, or when its properties or its {@link Client} list changed,
+     * by sending it one of the messages defined in the {@link IDeviceChangeListener} interface.
+     * @param listener The listener which should be notified.
+     */
+    public static void addDeviceChangeListener(IDeviceChangeListener listener) {
+        addDeviceChangeListener(listener, false);
+    }
+    
+    /**
+     * Adds the listener to the collection of listeners who will be notified when a {@link IDevice}
+     * is connected, disconnected, or when its properties or its {@link Client} list changed,
+     * by sending it one of the messages defined in the {@link IDeviceChangeListener} interface.
+     * 
+     * @param listener The listener which should be notified.
+     * @param getPreviousNoti Provides connected device notification which not notified before adding listener.
+     */
+    public static void addDeviceChangeListener(IDeviceChangeListener listener, boolean getPreviousNoti) {
+        synchronized (sLock) {
+            if (sDeviceListeners.contains(listener) == false) {
+                sDeviceListeners.add(listener);
+                if(getPreviousNoti)
+                {
+                    IDevice[] devices = SmartDevelopmentBridge.getBridge().getDevices();
+                    for(IDevice device : devices)
+                    {
+                        if(device.isOnline())
+                        {
+                            listener.deviceConnected(device);
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Removes the listener from the collection of listeners who will be notified when a
+     * {@link IDevice} is connected, disconnected, or when its properties or its {@link Client}
+     * list changed.
+     * @param listener The listener which should no longer be notified.
+     */
+    public static void removeDeviceChangeListener(IDeviceChangeListener listener) {
+        synchronized (sLock) {
+            sDeviceListeners.remove(listener);
+        }
+    }
+
+    /**
+     * Returns the devices.
+     * @see #hasInitialDeviceList()
+     */
+    public IDevice[] getDevices() {
+        synchronized (sLock) {
+            if (mDeviceMonitor != null) {
+                return mDeviceMonitor.getDevices();
+            }
+        }
+
+        return new IDevice[0];
+    }
+
+    /**
+     * Returns whether the bridge has acquired the initial list from sdb after being created.
+     * <p/>Calling {@link #getDevices()} right after {@link #createBridge(String, boolean)} will
+     * generally result in an empty list. This is due to the internal asynchronous communication
+     * mechanism with <code>sdb</code> that does not guarantee that the {@link IDevice} list has been
+     * built before the call to {@link #getDevices()}.
+     * <p/>The recommended way to get the list of {@link IDevice} objects is to create a
+     * {@link IDeviceChangeListener} object.
+     */
+    public boolean hasInitialDeviceList() {
+        if (mDeviceMonitor != null) {
+            return mDeviceMonitor.hasInitialDeviceList();
+        }
+
+        return false;
+    }
+
+    /**
+     * Returns whether the {@link SmartDevelopmentBridge} object is still connected to the sdb daemon.
+     */
+    public boolean isConnected() {
+        if (mDeviceMonitor != null) {
+            return mDeviceMonitor.isMonitoring();
+        }
+        return false;
+    }
+
+    /**
+     * Returns the number of times the {@link SmartDevelopmentBridge} object attempted to connect
+     * to the sdb daemon.
+     */
+    public int getConnectionAttemptCount() {
+        if (mDeviceMonitor != null) {
+            return mDeviceMonitor.getConnectionAttemptCount();
+        }
+        return -1;
+    }
+
+    /**
+     * Returns the number of times the {@link SmartDevelopmentBridge} object attempted to restart
+     * the sdb daemon.
+     */
+    public int getRestartAttemptCount() {
+        if (mDeviceMonitor != null) {
+            return mDeviceMonitor.getRestartAttemptCount();
+        }
+        return -1;
+    }
+
+    /**
+     * Creates a new bridge.
+     * @param osLocation the location of the command line tool
+     * @throws InvalidParameterException
+     */
+    private SmartDevelopmentBridge(String osLocation) throws InvalidParameterException {
+        if (osLocation == null || osLocation.length() == 0) {
+            throw new InvalidParameterException();
+        }
+        mSdbOsLocation = osLocation;
+    }
+
+    /**
+     * Creates a new bridge not linked to any particular sdb executable.
+     */
+    private SmartDevelopmentBridge() {
+    }
+
+    /**
+     * Starts the debug bridge.
+     * @return true if success.
+     */
+    boolean start() {
+
+        // now that the bridge is connected, we start the underlying services.
+        mDeviceMonitor = new DeviceMonitor(this);
+        mDeviceMonitor.start();
+
+        return true;
+    }
+
+   /**
+     * Kills the debug bridge, and the sdb host server.
+     * @return true if success
+     */
+    boolean stop() {
+        // if we haven't started we return false;
+        if (mStarted == false) {
+            return false;
+        }
+
+        // kill the monitoring services
+        mDeviceMonitor.stop();
+        mDeviceMonitor = null;
+
+        if (stopSdb() == false) {
+            return false;
+        }
+
+        setStarted(false);
+        return true;
+    }
+
+    /**
+     * Restarts sdb, but not the services around it.
+     * @return true if success.
+     */
+    public boolean restart() {
+        if (mSdbOsLocation == null) {
+            Log.e(SDB,
+                    "Cannot restart sdb when SmartDevelopmentBridge is created without the location of sdb."); //$NON-NLS-1$
+            return false;
+        }
+
+        synchronized (this) {
+            stopSdb();
+
+            boolean restart = startSdb();
+
+            if (restart && mDeviceMonitor == null) {
+                mDeviceMonitor = new DeviceMonitor(this);
+                mDeviceMonitor.start();
+            }
+
+            return restart;
+        }
+    }
+
+    /**
+     * Notify the listener of a new {@link IDevice}.
+     * <p/>
+     * The notification of the listeners is done in a synchronized block. It is important to
+     * expect the listeners to potentially access various methods of {@link IDevice} as well as
+     * {@link #getDevices()} which use internal locks.
+     * <p/>
+     * For this reason, any call to this method from a method of {@link DeviceMonitor},
+     * {@link IDevice} which is also inside a synchronized block, should first synchronize on
+     * the {@link SmartDevelopmentBridge} lock. Access to this lock is done through {@link #getLock()}.
+     * @param device the new <code>IDevice</code>.
+     * @see #getLock()
+     */
+    void deviceConnected(IDevice device) {
+        // because the listeners could remove themselves from the list while processing
+        // their event callback, we make a copy of the list and iterate on it instead of
+        // the main list.
+        // This mostly happens when the application quits.
+        IDeviceChangeListener[] listenersCopy;
+        synchronized (sLock) {
+            listenersCopy = sDeviceListeners.toArray(
+                    new IDeviceChangeListener[sDeviceListeners.size()]);
+        }
+
+        // Notify the listeners
+        for (IDeviceChangeListener listener : listenersCopy) {
+            // we attempt to catch any exception so that a bad listener doesn't kill our
+            // thread
+            try {
+                listener.deviceConnected(device);
+            } catch (Exception e) {
+                Log.e(SDBLIB, e);
+            }
+        }
+    }
+
+    /**
+     * Notify the listener of a disconnected {@link IDevice}.
+     * <p/>
+     * The notification of the listeners is done in a synchronized block. It is important to
+     * expect the listeners to potentially access various methods of {@link IDevice} as well as
+     * {@link #getDevices()} which use internal locks.
+     * <p/>
+     * For this reason, any call to this method from a method of {@link DeviceMonitor},
+     * {@link IDevice} which is also inside a synchronized block, should first synchronize on
+     * the {@link SmartDevelopmentBridge} lock. Access to this lock is done through {@link #getLock()}.
+     * @param device the disconnected <code>IDevice</code>.
+     * @see #getLock()
+     */
+    void deviceDisconnected(IDevice device) {
+        // because the listeners could remove themselves from the list while processing
+        // their event callback, we make a copy of the list and iterate on it instead of
+        // the main list.
+        // This mostly happens when the application quits.
+        IDeviceChangeListener[] listenersCopy;
+        synchronized (sLock) {
+            listenersCopy = sDeviceListeners.toArray(
+                    new IDeviceChangeListener[sDeviceListeners.size()]);
+        }
+
+        // Notify the listeners
+        for (IDeviceChangeListener listener : listenersCopy) {
+            // we attempt to catch any exception so that a bad listener doesn't kill our
+            // thread
+            try {
+                listener.deviceDisconnected(device);
+            } catch (Exception e) {
+                Log.e(SDBLIB, e);
+            }
+        }
+    }
+
+    /**
+     * Notify the listener of a modified {@link IDevice}.
+     * <p/>
+     * The notification of the listeners is done in a synchronized block. It is important to
+     * expect the listeners to potentially access various methods of {@link IDevice} as well as
+     * {@link #getDevices()} which use internal locks.
+     * <p/>
+     * For this reason, any call to this method from a method of {@link DeviceMonitor},
+     * {@link IDevice} which is also inside a synchronized block, should first synchronize on
+     * the {@link SmartDevelopmentBridge} lock. Access to this lock is done through {@link #getLock()}.
+     * @param device the modified <code>IDevice</code>.
+     * @see #getLock()
+     */
+    void deviceChanged(IDevice device, int changeMask) {
+        // because the listeners could remove themselves from the list while processing
+        // their event callback, we make a copy of the list and iterate on it instead of
+        // the main list.
+        // This mostly happens when the application quits.
+        IDeviceChangeListener[] listenersCopy;
+        synchronized (sLock) {
+            listenersCopy = sDeviceListeners.toArray(
+                    new IDeviceChangeListener[sDeviceListeners.size()]);
+        }
+
+        // Notify the listeners
+        for (IDeviceChangeListener listener : listenersCopy) {
+            // we attempt to catch any exception so that a bad listener doesn't kill our
+            // thread
+            try {
+                listener.deviceChanged(device, changeMask);
+            } catch (Exception e) {
+                Log.e(SDBLIB, e);
+            }
+        }
+    }
+
+    /**
+     * Returns the {@link DeviceMonitor} object.
+     */
+    DeviceMonitor getDeviceMonitor() {
+        return mDeviceMonitor;
+    }
+
+    /**
+     * Starts the sdb host side server.
+     * @return true if success
+     */
+    synchronized boolean startSdb() {
+        if (mSdbOsLocation == null) {
+            Log.e(SDB,
+                "Cannot start sdb when SmartDevelopmentBridge is created without the location of sdb."); //$NON-NLS-1$
+            return false;
+        }
+
+        Process proc;
+        int status = -1;
+
+        try {
+            String[] command = new String[2];
+            command[0] = mSdbOsLocation;
+            command[1] = "start-server"; //$NON-NLS-1$
+            Log.d(SDBLIB,
+                    String.format("launching '%1$s %2$s' to ensure SDB is running.", //$NON-NLS-1$
+                    mSdbOsLocation, command[1]));
+            proc = Runtime.getRuntime().exec(command);
+
+            ArrayList<String> errorOutput = new ArrayList<String>();
+            ArrayList<String> stdOutput = new ArrayList<String>();
+            status = grabProcessOutput(proc, errorOutput, stdOutput,
+                    false /* waitForReaders */);
+
+        } catch (IOException ioe) {
+            Log.d(SDBLIB, "unable to run 'sdb': " + ioe.getMessage()); //$NON-NLS-1$
+            // we'll return false;
+        } catch (InterruptedException ie) {
+            Log.d(SDBLIB, "unable to run 'sdb': " + ie.getMessage()); //$NON-NLS-1$
+            // we'll return false;
+        }
+
+        if (status != 0) {
+            Log.w(SDBLIB,
+                    "'sdb start-server' failed -- run manually if necessary"); //$NON-NLS-1$
+            return false;
+        }
+
+        Log.d(SDBLIB, "'sdb start-server' succeeded"); //$NON-NLS-1$
+        setStarted(true);
+        return true;
+    }
+
+    /**
+     * Stops the sdb host side server.
+     * @return true if success
+     */
+    private synchronized boolean stopSdb() {
+        if (mSdbOsLocation == null) {
+            Log.e(SDB,
+                "Cannot stop sdb when SmartDevelopmentBridge is created without the location of sdb."); //$NON-NLS-1$
+            return false;
+        }
+
+        Process proc;
+        int status = -1;
+
+        try {
+            String[] command = new String[2];
+            command[0] = mSdbOsLocation;
+            command[1] = "kill-server"; //$NON-NLS-1$
+            proc = Runtime.getRuntime().exec(command);
+            status = proc.waitFor();
+        }
+        catch (IOException ioe) {
+            // we'll return false;
+               Log.e("sdb", "stop sdb failed:" +  ioe);
+        }
+        catch (InterruptedException ie) {
+            // we'll return false;
+        }
+
+        if (status != 0) {
+            Log.w(SDBLIB,
+                    "'sdb kill-server' failed -- run manually if necessary"); //$NON-NLS-1$
+            return false;
+        }
+
+        Log.d(SDBLIB, "'sdb kill-server' succeeded"); //$NON-NLS-1$
+        setStarted(false);
+        return true;
+    }
+
+    /**
+     * Get the stderr/stdout outputs of a process and return when the process is done.
+     * Both <b>must</b> be read or the process will block on windows.
+     * @param process The process to get the ouput from
+     * @param errorOutput The array to store the stderr output. cannot be null.
+     * @param stdOutput The array to store the stdout output. cannot be null.
+     * @param displayStdOut If true this will display stdout as well
+     * @param waitforReaders if true, this will wait for the reader threads.
+     * @return the process return code.
+     * @throws InterruptedException
+     */
+    private int grabProcessOutput(final Process process, final ArrayList<String> errorOutput,
+            final ArrayList<String> stdOutput, boolean waitforReaders)
+            throws InterruptedException {
+        assert errorOutput != null;
+        assert stdOutput != null;
+        // read the lines as they come. if null is returned, it's
+        // because the process finished
+        Thread t1 = new Thread("SdbReadThread1") { //$NON-NLS-1$
+            @Override
+            public void run() {
+                // create a buffer to read the stderr output
+                InputStreamReader is = new InputStreamReader(process.getErrorStream());
+                BufferedReader errReader = new BufferedReader(is);
+
+                try {
+                    while (true) {
+                        String line = errReader.readLine();
+                        if (line != null) {
+                            Log.e(SDB, line);
+                            errorOutput.add(line);
+                        } else {
+                            break;
+                        }
+                    }
+                } catch (IOException e) {
+                    // do nothing.
+                       Log.e("sdb", "SdbReadThread1 failed:" +  e);
+                } finally {
+                       try {
+                               errReader.close();
+                                       } catch (IOException e) {
+                                               Log.e("sdb", "close failed:" +  e);
+                                       }
+                }
+            }
+        };
+
+        Thread t2 = new Thread("SdbReadThread2") { //$NON-NLS-1$
+            @Override
+            public void run() {
+                InputStreamReader is = new InputStreamReader(process.getInputStream());
+                BufferedReader outReader = new BufferedReader(is);
+
+                try {
+                    while (true) {
+                        String line = outReader.readLine();
+                        if (line != null) {
+                            Log.d(SDB, line);
+                            stdOutput.add(line);
+                        } else {
+                            break;
+                        }
+                    }
+                } catch (IOException e) {
+                    // do nothing.
+                       Log.e("sdb", "SdbReadThread2 failed:" +  e);
+                } finally {
+                       try {
+                                               outReader.close();
+                                       } catch (IOException e) {
+                                               Log.e("sdb", "close failed:" +  e);
+                                       }
+                }
+            }
+        };
+
+        t1.start();
+        t2.start();
+
+        // it looks like on windows process#waitFor() can return
+        // before the thread have filled the arrays, so we wait for both threads and the
+        // process itself.
+        if (waitforReaders) {
+            try {
+                t1.join();
+            } catch (InterruptedException e) {
+            }
+            try {
+                t2.join();
+            } catch (InterruptedException e) {
+            }
+        }
+
+        // get the return code from the process
+        return process.waitFor();
+    }
+
+    /**
+     * Returns the singleton lock used by this class to protect any access to the listener.
+     * <p/>
+     * This includes adding/removing listeners, but also notifying listeners of new bridges,
+     * devices, and clients.
+     */
+    static Object getLock() {
+        return sLock;
+    }
+
+    /**
+     * Instantiates sSocketAddr with the address of the host's sdb process.
+     */
+    private static void initsdbSocketAddr() {
+        try {
+            int sdb_port = determineAndValidateSdbPort();
+            sHostAddr = InetAddress.getByName(SDB_HOST);
+            sSocketAddr = new InetSocketAddress(sHostAddr, sdb_port);
+        } catch (UnknownHostException e) {
+            // localhost should always be known.
+               Log.e("sdb", "init socket failed:" +  e);
+        }
+    }
+
+    /**
+     * Determines port where SDB is expected by looking at an env variable.
+     * <p/>
+     * The value for the environment variable SDB_SERVER_PORT is validated,
+     * IllegalArgumentException is thrown on illegal values.
+     * <p/>
+     * @return The port number where the host's sdb should be expected or started.
+     * @throws IllegalArgumentException if SDB_SERVER_PORT has a non-numeric value.
+     */
+    private static int determineAndValidateSdbPort() {
+        String sdb_env_var;
+        int result = SDB_PORT;
+        try {
+            sdb_env_var = System.getenv(SERVER_PORT_ENV_VAR);
+
+            if (sdb_env_var != null) {
+                sdb_env_var = sdb_env_var.trim();
+            }
+
+            if (sdb_env_var != null && sdb_env_var.length() > 0) {
+                // C tools (sdb, emulator) accept hex and octal port numbers, so need to accept
+                // them too.
+                result = Integer.decode(sdb_env_var);
+
+                if (result <= 0) {
+                    String errMsg = "env var " + SERVER_PORT_ENV_VAR //$NON-NLS-1$
+                            + ": must be >=0, got " //$NON-NLS-1$
+                            + System.getenv(SERVER_PORT_ENV_VAR);
+                    throw new IllegalArgumentException(errMsg);
+                }
+            }
+        } catch (NumberFormatException nfEx) {
+            String errMsg = "env var " + SERVER_PORT_ENV_VAR //$NON-NLS-1$
+                    + ": illegal value '" //$NON-NLS-1$
+                    + System.getenv(SERVER_PORT_ENV_VAR) + "'"; //$NON-NLS-1$
+            throw new IllegalArgumentException(errMsg);
+        } catch (SecurityException secEx) {
+            // A security manager has been installed that doesn't allow access to env vars.
+            // So an environment variable might have been set, but we can't tell.
+            // Let's log a warning and continue with SDB's default port.
+            // The issue is that sdb would be started (by the forked process having access
+            // to the env vars) on the desired port, but within this process, we can't figure out
+            // what that port is. However, a security manager not granting access to env vars
+            // but allowing to fork is a rare and interesting configuration, so the right
+            // thing seems to be to continue using the default port, as forking is likely to
+            // fail later on in the scenario of the security manager.
+            Log.w(SDBLIB,
+                    "No access to env variables allowed by current security manager. " //$NON-NLS-1$
+                    + "If you've set SDB_SERVER_PORT: it's being ignored."); //$NON-NLS-1$
+        }
+        return result;
+    }
+    
+    public void waitforStart()
+    {
+        while(!getStarted())
+        {
+            synchronized ( this )
+            {
+                try {
+                    wait();
+                } catch (InterruptedException e) {
+                    // TODO Auto-generated catch block
+                    e.printStackTrace();
+                }
+            }
+        }
+    }
+    
+    private boolean getStarted()
+    {
+        lock.lock();
+        try
+        {
+            return mStarted;
+        }finally
+        {
+            lock.unlock();
+        }
+    }
+    
+    public void setStarted(boolean isStarted)
+    {
+        lock.lock();
+        try
+        {
+            mStarted = isStarted;
+            synchronized(this)
+            {
+               notifyAll();
+            }
+        }finally
+        {
+            lock.unlock();
+        }
+    }
+
+}
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/SyncService.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/SyncService.java
new file mode 100755 (executable)
index 0000000..a8038e9
--- /dev/null
@@ -0,0 +1,1473 @@
+/*
+ * Copyright (C) 2007 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.InetSocketAddress;
+import java.nio.channels.SocketChannel;
+import java.util.ArrayList;
+
+import org.tizen.sdblib.FileListingService.FileEntry;
+import org.tizen.sdblib.SdbHelper.SdbResponse;
+import org.tizen.sdblib.SyncService.ISyncProgressMonitor;
+
+
+/**
+ * Sync service class to push/pull to/from devices/emulators, through the debug bridge.
+ * <p/>
+ * To get a {@link SyncService} object, use {@link Device#getSyncService()}.
+ */
+public final class SyncService {
+
+    private final static byte[] ID_OKAY = { 'O', 'K', 'A', 'Y' };
+    private final static byte[] ID_FAIL = { 'F', 'A', 'I', 'L' };
+    private final static byte[] ID_RECV = { 'R', 'E', 'C', 'V' };
+    private final static byte[] ID_DATA = { 'D', 'A', 'T', 'A' };
+    private final static byte[] ID_DONE = { 'D', 'O', 'N', 'E' };
+    private final static byte[] ID_SEND = { 'S', 'E', 'N', 'D' };
+
+    private final static NullSyncProgressMonitor sNullSyncProgressMonitor =
+            new NullSyncProgressMonitor();
+
+    public static final String MESSAGE_SIZECHECKING = "File size checking: it can take some time.";
+
+    private final static int SYNC_DATA_MAX = 64*1024;
+    private final static int REMOTE_PATH_MAX_LENGTH = 1024;
+
+    /** Result code for transfer success. */
+    public static final int RESULT_OK = 0;
+    /** Result code for canceled transfer */
+    public static final int RESULT_CANCELED = 1;
+    /** Result code for unknown error */
+    public static final int RESULT_UNKNOWN_ERROR = 2;
+    /** Result code for network connection error */
+    public static final int RESULT_CONNECTION_ERROR = 3;
+    /** Result code for unknown remote object during a pull */
+    public static final int RESULT_NO_REMOTE_OBJECT = 4;
+    /** Result code when attempting to pull multiple files into a file */
+    public static final int RESULT_TARGET_IS_FILE = 5;
+    /** Result code when attempting to pull multiple into a directory that does not exist. */
+    public static final int RESULT_NO_DIR_TARGET = 6;
+    /** Result code for wrong encoding on the remote path. */
+    public static final int RESULT_REMOTE_PATH_ENCODING = 7;
+    /** Result code for remote path that is too long. */
+    public static final int RESULT_REMOTE_PATH_LENGTH = 8;
+    /** Result code for error while writing local file. */
+    public static final int RESULT_FILE_WRITE_ERROR = 9;
+    /** Result code for error while reading local file. */
+    public static final int RESULT_FILE_READ_ERROR = 10;
+    /** Result code for attempting to push a file that does not exist. */
+    public static final int RESULT_NO_LOCAL_FILE = 11;
+    /** Result code for attempting to push a directory. */
+    public static final int RESULT_LOCAL_IS_DIRECTORY = 12;
+    /** Result code for when the target path of a multi file push is a file. */
+    public static final int RESULT_REMOTE_IS_FILE = 13;
+    /** Result code for receiving too much data from the remove device at once */
+    public static final int RESULT_BUFFER_OVERRUN = 14;
+    /** Result code for network connection timeout */
+    public static final int RESULT_CONNECTION_TIMEOUT = 15;
+    /** Result code for file exist */
+    public static final int RESULT_FILE_EXIST = 16;
+    /** Result code for fail delete file */
+    public static final int RESULT_FAIL_DELETE_FILE = 17;
+    /** Result code for fail delete file */
+    public static final int RESULT_FAIL_CREATE_FILE = 18;
+
+    /**
+     * A file transfer result.
+     * <p/>
+     * This contains a code, and an optional string
+     */
+    public static class SyncResult {
+        private final int mCode;
+        private final String mMessage;
+        SyncResult(int code, String message) {
+            mCode = code;
+            mMessage = message;
+        }
+
+        SyncResult(int code, Exception e) {
+            mCode = code;
+            String errorMessage  = errorCodeToString(code);
+            String exceptionMessage = e.getMessage();
+            if(exceptionMessage != null)
+            {
+                mMessage = errorMessage + "\n" + exceptionMessage;
+            }
+            else
+            {
+                mMessage = errorMessage;
+            }
+        }
+
+        SyncResult(int code) {
+            this(code, errorCodeToString(code));
+        }
+
+        public int getCode() {
+            return mCode;
+        }
+
+        public String getMessage() {
+            return mMessage;
+        }
+    }
+
+    /**
+     * Classes which implement this interface provide methods that deal
+     * with displaying transfer progress.
+     */
+    public interface ISyncProgressMonitor {
+        /**
+         * Sent when the transfer starts
+         * @param totalWork the total amount of work.
+         */
+        void start(int totalWork);
+        /**
+         * Sent when the transfer is finished or interrupted.
+         */
+        void stop();
+        /**
+         * Sent to query for possible cancellation.
+         * @return true if the transfer should be stopped.
+         */
+        boolean isCanceled();
+        /**
+         * Sent when a sub task is started.
+         * @param name the name of the sub task.
+         */
+        void startSubTask(String name);
+        /**
+         * Sent when some progress have been made.
+         * @param work the amount of work done.
+         */
+        void advance(int work);
+    }
+
+    /**
+     * A Sync progress monitor that does nothing
+     */
+    private static class NullSyncProgressMonitor implements ISyncProgressMonitor {
+        @Override
+        public void advance(int work) {
+        }
+        @Override
+        public boolean isCanceled() {
+            return false;
+        }
+
+        @Override
+        public void start(int totalWork) {
+        }
+        @Override
+        public void startSubTask(String name) {
+        }
+        @Override
+        public void stop() {
+        }
+    }
+
+    private final InetSocketAddress mAddress;
+    private final Device mDevice;
+    private SocketChannel mChannel;
+
+    /**
+     * Buffer used to send data. Allocated when needed and reused afterward.
+     */
+    private byte[] mBuffer;
+
+    /**
+     * Creates a Sync service object.
+     * @param address The address to connect to
+     * @param device the {@link Device} that the service connects to.
+     */
+    SyncService(InetSocketAddress address, Device device) {
+        mAddress = address;
+        mDevice = device;
+    }
+
+    /**
+     * Opens the sync connection. This must be called before any calls to push[File] / pull[File].
+     * @return true if the connection opened, false if sdb refuse the connection. This can happen
+     * if the {@link Device} is invalid.
+     * @throws TimeoutException in case of timeout on the connection.
+     * @throws sdbCommandRejectedException if sdb rejects the command
+     * @throws IOException If the connection to sdb failed.
+     */
+    boolean openSync() throws TimeoutException, SdbCommandRejectedException, IOException {
+        try {
+            mChannel = SocketChannel.open(mAddress);
+            mChannel.configureBlocking(false);
+
+            // target a specific device
+            SdbHelper.setDevice(mChannel, mDevice);
+
+            byte[] request = SdbHelper.formSdbRequest("sync:"); // $NON-NLS-1$
+            SdbHelper.write(mChannel, request, -1, SdbPreferences.getTimeOut());
+
+            SdbResponse resp = SdbHelper.readSdbResponse(mChannel, false /* readDiagString */);
+
+            if (resp.okay == false) {
+                Log.w("sdb", "Got unhappy response from sdb sync req: " + resp.message);
+                mChannel.close();
+                mChannel = null;
+                return false;
+            }
+        } catch (TimeoutException e) {
+            if (mChannel != null) {
+                try {
+                    mChannel.close();
+                } catch (IOException e2) {
+                    // we want to throw the original exception, so we ignore this one.
+                       Log.e("sdb", "close failed:" +  e2);
+                }
+                mChannel = null;
+            }
+
+            throw e;
+        } catch (IOException e) {
+            if (mChannel != null) {
+                try {
+                    mChannel.close();
+                } catch (IOException e2) {
+                    // we want to throw the original exception, so we ignore this one.
+                       Log.e("sdb", "close failed:" +  e);
+                }
+                mChannel = null;
+            }
+
+            throw e;
+        }
+
+        return true;
+    }
+
+    /**
+     * Closes the connection.
+     */
+    public void close() {
+        if (mChannel != null) {
+            try {
+                mChannel.close();
+            } catch (IOException e) {
+                // nothing to be done really...
+               Log.e("sdb", "close failed:" +  e);
+            }
+            mChannel = null;
+        }
+    }
+
+    /**
+     * Returns a sync progress monitor that does nothing. This allows background tasks that don't
+     * want/need to display ui, to pass a valid {@link ISyncProgressMonitor}.
+     * <p/>This object can be reused multiple times and can be used by concurrent threads.
+     */
+    public static ISyncProgressMonitor getNullProgressMonitor() {
+        return sNullSyncProgressMonitor;
+    }
+
+    /**
+     * Converts an error code into a non-localized string
+     * @param code the error code;
+     */
+    private static String errorCodeToString(int code) {
+        switch (code) {
+            case RESULT_OK:
+                return "Success.";
+            case RESULT_CANCELED:
+                return "Transfer canceled by the user.";
+            case RESULT_UNKNOWN_ERROR:
+                return "Unknown Error.";
+            case RESULT_CONNECTION_ERROR:
+                return "sdb Connection Error.";
+            case RESULT_NO_REMOTE_OBJECT:
+                return "Remote object doesn't exist!";
+            case RESULT_TARGET_IS_FILE:
+                return "Target object is a file.";
+            case RESULT_NO_DIR_TARGET:
+                return "Target directory doesn't exist.";
+            case RESULT_REMOTE_PATH_ENCODING:
+                return "Remote Path encoding is not supported.";
+            case RESULT_REMOTE_PATH_LENGTH:
+                return "Remove path is too long.";
+            case RESULT_FILE_WRITE_ERROR:
+                return "Writing local file failed!";
+            case RESULT_FILE_READ_ERROR:
+                return "Reading local file failed!";
+            case RESULT_NO_LOCAL_FILE:
+                return "Local file doesn't exist.";
+            case RESULT_LOCAL_IS_DIRECTORY:
+                return "Local path is a directory.";
+            case RESULT_REMOTE_IS_FILE:
+                return "Remote path is a file.";
+            case RESULT_BUFFER_OVERRUN:
+                return "Receiving too much data.";
+            case RESULT_CONNECTION_TIMEOUT:
+                return "timeout";
+            case RESULT_FILE_EXIST:
+                return "File exists.";
+            case RESULT_FAIL_DELETE_FILE:
+                return "Fail delete file.";
+            case RESULT_FAIL_CREATE_FILE:
+                return "Fail create file.";
+        }
+
+        throw new RuntimeException();
+    }
+
+    /**
+     * Pulls file(s) or folder(s).
+     * @param entries the remote item(s) to pull
+     * @param localPath The local destination. If the entries count is > 1 or
+     *      if the unique entry is a folder, this should be a folder.
+     * @param monitor The progress monitor. Cannot be null.
+     * @return a {@link SyncResult} object with a code and an optional message.
+     *
+     * @see FileListingService.FileEntry
+     * @see #getNullProgressMonitor()
+     */
+    public SyncResult pull(FileEntry[] entries, String localPath, ISyncProgressMonitor monitor) {
+
+        // first we check the destination is a directory and exists
+        File f = new File(localPath);
+        if (f.exists() == false) {
+            return new SyncResult(RESULT_NO_DIR_TARGET);
+        }
+        if (!f.isDirectory()) {
+            return new SyncResult(RESULT_TARGET_IS_FILE);
+        }
+
+        // get a FileListingService object
+        FileListingService fls = new FileListingService(mDevice);
+
+        // compute the number of file to move
+        int total = getTotalRemoteFileSize(entries, fls);
+
+        // start the monitor
+        monitor.start(total);
+
+        SyncResult result = doPull(entries, localPath, fls, monitor);
+
+        monitor.stop();
+
+        return result;
+    }
+    
+    /**
+     * Pulls file(s) or folder(s).
+     * @param entries the remote item(s) to pull
+     * @param localPath The local destination. If the entries count is > 1 or
+     *      if the unique entry is a folder, this should be a folder.
+     * @param monitor The progress monitor. Cannot be null.
+     * @param time interval while pulling the files
+     * @return a {@link SyncResult} object with a code and an optional message.
+     *
+     * @see FileListingService.FileEntry
+     * @see #getNullProgressMonitor()
+     */
+    public SyncResult pull(FileEntry[] entries, String localPath, ISyncProgressMonitor monitor, int timeOut) {
+
+        // first we check the destination is a directory and exists
+        File f = new File(localPath);
+        if (f.exists() == false) {
+            return new SyncResult(RESULT_NO_DIR_TARGET);
+        }
+        if (!f.isDirectory()) {
+            return new SyncResult(RESULT_TARGET_IS_FILE);
+        }
+
+        // get a FileListingService object
+        FileListingService fls = new FileListingService(mDevice);
+
+        monitor.start(-1);
+
+        monitor.startSubTask(MESSAGE_SIZECHECKING);
+
+        // compute the number of file to move
+        long total;
+        try {
+            total = getTotalRemoteFileSizeLong(entries, fls, monitor);
+        } catch (InterruptedException e) {
+            return new SyncResult(RESULT_CANCELED);
+        } finally {
+            monitor.stop();
+        }
+
+        TransferInfo transferInfo = new TransferInfo();
+
+        // start the monitor
+        monitor.start(transferInfo.downSizing(total));
+
+        SyncResult result = doPull(entries, localPath, fls, monitor, transferInfo, timeOut);
+
+        monitor.stop();
+
+        return result;
+    }
+
+    /**
+     * Pulls a single file.
+     * @param remote the remote file
+     * @param localFilename The local destination.
+     * @param monitor The progress monitor. Cannot be null.
+     * @return a {@link SyncResult} object with a code and an optional message.
+     *
+     * @see FileListingService.FileEntry
+     * @see #getNullProgressMonitor()
+     */
+    public SyncResult pullFile(FileEntry remote, String localFilename,
+            ISyncProgressMonitor monitor) {
+        int total = remote.getSizeValue();
+        monitor.start(total);
+
+        SyncResult result = doPullFile(remote.getFullEscapedPath(), localFilename, monitor);
+
+        monitor.stop();
+        return result;
+    }
+
+    /**
+     * Pulls a single file.
+     * <p/>Because this method just deals with a String for the remote file instead of a
+     * {@link FileEntry}, the size of the file being pulled is unknown and the
+     * {@link ISyncProgressMonitor} will not properly show the progress
+     * @param remoteFilepath the full path to the remote file
+     * @param localFilename The local destination.
+     * @param monitor The progress monitor. Cannot be null.
+     * @return a {@link SyncResult} object with a code and an optional message.
+     *
+     * @see #getNullProgressMonitor()
+     */
+    public SyncResult pullFile(String remoteFilepath, String localFilename,
+            ISyncProgressMonitor monitor) {
+        monitor.start(0);
+        //TODO: use the {@link FileListingService} to get the file size.
+
+        SyncResult result = doPullFile(remoteFilepath, localFilename, monitor);
+
+        monitor.stop();
+        return result;
+    }
+
+    /**
+     * Pulls a single file.
+     * <p/>Because this method just deals with a String for the remote file instead of a
+     * {@link FileEntry}, the size of the file being pulled is unknown and the
+     * {@link ISyncProgressMonitor} will not properly show the progress
+     * @param remoteFilepath the full path to the remote file
+     * @param localFilename The local destination.
+     * @param forceOverwrite this decides overwrite, if local file is already exist.
+     * @param monitor The progress monitor. Cannot be null.
+     * @return a {@link SyncResult} object with a code and an optional message.
+     *
+     * @see #getNullProgressMonitor()
+     */
+    public SyncResult pullFile(String remoteFile, String localFile, boolean forceOverwrite,
+            ISyncProgressMonitor monitor) {
+        File f = new File(localFile);
+        if (f.exists() == true) {
+            if (f.isDirectory()) {
+                return new SyncResult(RESULT_LOCAL_IS_DIRECTORY);
+            }
+
+            if (forceOverwrite == false) {
+                return new SyncResult(RESULT_FILE_EXIST);
+            } else {
+                boolean result = f.delete();
+                if (result == false) {
+                    return new SyncResult(RESULT_FAIL_DELETE_FILE);
+                }
+            }
+        }
+
+        try {
+            String filePath = f.getAbsolutePath();
+            String dirPath = filePath.substring(0, filePath.lastIndexOf(File.separator));
+            File d = new File(dirPath);
+            if (d.exists() == false) {
+                d.mkdirs();
+            }
+            boolean result = f.createNewFile();
+            if (result == false) {
+                return new SyncResult(RESULT_FAIL_CREATE_FILE);
+            }
+        } catch (IOException e) {
+            return new SyncResult(RESULT_UNKNOWN_ERROR, e);
+        }
+
+        monitor.start(0);
+        //TODO: use the {@link FileListingService} to get the file size.
+
+        SyncResult result = doPullFile(remoteFile, localFile, monitor);
+
+        monitor.stop();
+        return result;
+    }
+
+
+    /**
+     * Push several files.
+     * @param local An array of loca files to push
+     * @param remote the remote {@link FileEntry} representing a directory.
+     * @param monitor The progress monitor. Cannot be null.
+     * @return a {@link SyncResult} object with a code and an optional message.
+     */
+    public SyncResult push(String[] local, FileEntry remote, ISyncProgressMonitor monitor) {
+        if (!remote.isDirectory()) {
+            return new SyncResult(RESULT_REMOTE_IS_FILE);
+        }
+
+        // make a list of File from the list of String
+        ArrayList<File> files = new ArrayList<File>();
+        for (String path : local) {
+            files.add(new File(path));
+        }
+
+        // get the total count of the bytes to transfer
+        File[] fileArray = files.toArray(new File[files.size()]);
+        int total = getTotalLocalFileSize(fileArray);
+
+        monitor.start(total);
+
+        SyncResult result = doPush(fileArray, remote.getFullPath(), monitor);
+
+        monitor.stop();
+
+        return result;
+    }
+
+    /**
+     * Push several files.
+     * @param local An array of loca files to push
+     * @param remote the remote {@link FileEntry} representing a directory.
+     * @param monitor The progress monitor. Cannot be null.
+     * @param time out value while push the files
+     * @return a {@link SyncResult} object with a code and an optional message.
+     */
+    public SyncResult push(String[] local, FileEntry remote, ISyncProgressMonitor monitor, int timeOut) {
+        if (!remote.isDirectory()) {
+            return new SyncResult(RESULT_REMOTE_IS_FILE);
+        }
+
+        // make a list of File from the list of String
+        ArrayList<File> files = new ArrayList<File>();
+        for (String path : local) {
+            files.add(new File(path));
+        }
+        
+        monitor.start(-1);
+        
+        monitor.startSubTask(MESSAGE_SIZECHECKING);
+
+        // get the total count of the bytes to transfer
+        File[] fileArray = files.toArray(new File[files.size()]);
+
+        long total;
+        try {
+            total = getTotalLocalFileSizeLong(fileArray, monitor);
+        } catch (InterruptedException e) {
+            return new SyncResult(RESULT_CANCELED);
+        } finally {
+            monitor.stop();
+        }
+
+        TransferInfo sizeInfo = new TransferInfo();
+        
+        monitor.start(sizeInfo.downSizing(total));
+
+        SyncResult result = doPush(fileArray, remote.getFullPath(), monitor, sizeInfo, timeOut);
+
+        monitor.stop();
+
+        return result;
+    }
+
+    /**
+     * Push a single file.
+     * @param local the local filepath.
+     * @param remote The remote filepath.
+     * @param monitor The progress monitor. Cannot be null.
+     * @return a {@link SyncResult} object with a code and an optional message.
+     */
+    public SyncResult pushFile(String local, String remote, ISyncProgressMonitor monitor) {
+        File f = new File(local);
+        if (f.exists() == false) {
+            return new SyncResult(RESULT_NO_LOCAL_FILE);
+        }
+
+        if (f.isDirectory()) {
+            return new SyncResult(RESULT_LOCAL_IS_DIRECTORY);
+        }
+
+        monitor.start((int)f.length());
+
+        SyncResult result = doPushFile(local, remote, monitor);
+
+        monitor.stop();
+
+        return result;
+    }
+
+    /**
+     * compute the recursive file size of all the files in the list. Folder
+     * have a weight of 1.
+     * @param entries
+     * @param fls
+     * @return
+     */
+    private int getTotalRemoteFileSize(FileEntry[] entries, FileListingService fls) {
+        int count = 0;
+        for (FileEntry e : entries) {
+            int type = e.getType();
+            if (type == FileListingService.TYPE_DIRECTORY || type == FileListingService.TYPE_ROOT_DEVICE
+                    || type == FileListingService.TYPE_ROOT_EMULATOR) {
+                // get the children
+                FileEntry[] children = fls.getChildren(e, false, null);
+                count += getTotalRemoteFileSize(children, fls) + 1;
+            } else if (type == FileListingService.TYPE_FILE) {
+                count += e.getSizeValue();
+            }
+        }
+
+        return count;
+    }
+    
+    /**
+     * compute the recursive file size of all the files in the list. Folder
+     * have a weight of 1.
+     * @param entries
+     * @param fls
+     * @return long typed file size
+     */
+    private long getTotalRemoteFileSizeLong(FileEntry[] entries, FileListingService fls) {
+        long count = 0;
+        for (FileEntry e : entries) {
+            int type = e.getType();
+            if (type == FileListingService.TYPE_DIRECTORY || type == FileListingService.TYPE_ROOT_DEVICE
+                    || type == FileListingService.TYPE_ROOT_EMULATOR) {
+                // get the children
+                FileEntry[] children = fls.getChildren(e, false, null);
+                count += getTotalRemoteFileSizeLong(children, fls) + 1;
+            } else if (type == FileListingService.TYPE_FILE) {
+                count += e.getSizeValue();
+            }
+        }
+
+        return count;
+    }
+    
+    /**
+     * compute the recursive file size of all the files in the list. Folder
+     * have a weight of 1.
+     * @param entries
+     * @param fls
+     * @param monitor 
+     * @return long typed file size
+     * @throws InterruptedException 
+     */
+    private long getTotalRemoteFileSizeLong(FileEntry[] entries, FileListingService fls, ISyncProgressMonitor monitor) throws InterruptedException {
+        long count = 0;
+        for (FileEntry e : entries) {
+            if (monitor.isCanceled()) {
+                throw new InterruptedException("The long running operation was cancelled");
+            }
+            int type = e.getType();
+            if (type == FileListingService.TYPE_DIRECTORY || type == FileListingService.TYPE_ROOT_DEVICE
+                    || type == FileListingService.TYPE_ROOT_EMULATOR | type == FileListingService.TYPE_LINK | type == FileListingService.TYPE_DIRECTORY_LINK) {
+                // get the children
+                FileEntry[] children = fls.getChildren(e, false, null);
+                count += getTotalRemoteFileSizeLong(children, fls, monitor) + 1;
+            } else if (type == FileListingService.TYPE_FILE) {
+                count += e.getSizeValue();
+            }
+        }
+
+        return count;
+    }
+
+    /**
+     * compute the recursive file size of all the files in the list. Folder
+     * have a weight of 1.
+     * This does not check for circular links.
+     * @param files
+     * @return
+     */
+    private int getTotalLocalFileSize(File[] files) {
+        int count = 0;
+
+        for (File f : files) {
+            if (f.exists()) {
+                if (f.isDirectory()) {
+                    return getTotalLocalFileSize(f.listFiles()) + 1;
+                } else if (f.isFile()) {
+                    count += f.length();
+                }
+            }
+        }
+
+        return count;
+    }
+    
+    /**
+     * compute the recursive file size of all the files in the list. Folder
+     * have a weight of 1.
+     * This does not check for circular links.
+     * @param files
+     * @return long typed file size
+     * @throws InterruptedException 
+     */
+    private long getTotalLocalFileSizeLong(File[] files, ISyncProgressMonitor monitor) throws InterruptedException {
+        long count = 0;
+
+        for (File f : files) {
+            if (monitor.isCanceled()) {
+                throw new InterruptedException("The long running operation was cancelled");
+            }
+            if (f.exists()) {
+                if (f.isDirectory()) {
+                    return getTotalLocalFileSizeLong(f.listFiles(), monitor) + 1;
+                } else if (f.isFile()) {
+                    count += f.length();
+                }
+            }
+        }
+
+        return count;
+    }
+    
+    /**
+     * compute the recursive file size of all the files in the list. Folder
+     * have a weight of 1.
+     * This does not check for circular links.
+     * @param files
+     * @return long typed file size
+     */
+    private long getTotalLocalFileSizeLong(File[] files) {
+        long count = 0;
+
+        for (File f : files) {
+            if (f.exists()) {
+                if (f.isDirectory()) {
+                    return getTotalLocalFileSizeLong(f.listFiles()) + 1;
+                } else if (f.isFile()) {
+                    count += f.length();
+                }
+            }
+        }
+
+        return count;
+    }
+
+    /**
+     * Pulls multiple files/folders recursively.
+     * @param entries The list of entry to pull
+     * @param localPath the localpath to a directory
+     * @param fileListingService a FileListingService object to browse through remote directories.
+     * @param monitor the progress monitor. Must be started already.
+     * @return a {@link SyncResult} object with a code and an optional message.
+     */
+    private SyncResult doPull(FileEntry[] entries, String localPath,
+            FileListingService fileListingService,
+            ISyncProgressMonitor monitor) {
+
+        for (FileEntry e : entries) {
+            // check if we're cancelled
+            if (monitor.isCanceled() == true) {
+                return new SyncResult(RESULT_CANCELED);
+            }
+
+            // get type (we only pull directory and files for now)
+            monitor.startSubTask(e.getFullPath());
+            String dest = localPath + File.separator + e.getName();
+            SyncResult result;
+            if (e.isDirectory()) {
+
+                // make the directory
+                File d = new File(dest);
+                d.mkdir();
+
+                // then recursively call the content. Since we did a ls command
+                // to get the number of files, we can use the cache
+                FileEntry[] children = fileListingService.getChildren(e, true, null);
+                result = doPull(children, dest, fileListingService, monitor);
+            } else{
+                result = doPullFile(e.getFullPath(), dest, monitor);
+            }
+
+            if (result.mCode != RESULT_OK) {
+                return result;
+            }else if(e.isDirectory())
+            {
+                monitor.advance(1);
+            }
+        }
+
+        return new SyncResult(RESULT_OK);
+    }
+    
+    /**
+     * Pulls multiple files/folders recursively.
+     * @param entries The list of entry to pull
+     * @param localPath the localpath to a directory
+     * @param fileListingService a FileListingService object to browse through remote directories.
+     * @param monitor the progress monitor. Must be started already.
+     * @param size information
+     * @param time interval while pulling the files
+     * @return a {@link SyncResult} object with a code and an optional message.
+     */
+    private SyncResult doPull(FileEntry[] entries, String localPath,
+            FileListingService fileListingService,
+            ISyncProgressMonitor monitor,
+            TransferInfo transferInfo,
+            int timeOut) {
+
+        for (FileEntry e : entries) {
+            // check if we're cancelled
+            if (monitor.isCanceled() == true) {
+                return new SyncResult(RESULT_CANCELED);
+            }
+
+            // get type (we only pull directory and files for now)
+//            monitor.startSubTask(e.getFullPath());
+            transferInfo.setDest(e.getFullPath());
+            String dest = localPath + File.separator + e.getName();
+            SyncResult result;
+            if (e.isDirectory()) {
+
+                // make the directory
+                File d = new File(dest);
+                d.mkdir();
+
+                // then recursively call the content. Since we did a ls command
+                // to get the number of files, we can use the cache
+                FileEntry[] children = fileListingService.getChildren(e, true, null);
+                result = doPull(children, dest, fileListingService, monitor, transferInfo, timeOut);
+            } else{
+                result = doPullFile(e.getFullPath(), dest, monitor, transferInfo, timeOut);
+            }
+
+            if (result.mCode != RESULT_OK) {
+                return result;
+            }else if(e.isDirectory())
+            {
+                monitor.advance(1);
+            }
+        }
+
+        return new SyncResult(RESULT_OK);
+    }
+
+    /**
+     * Pulls a remote file
+     * @param remotePath the remote file (length max is 1024)
+     * @param localPath the local destination
+     * @param monitor the monitor. The monitor must be started already.
+     * @return a {@link SyncResult} object with a code and an optional message.
+     */
+    private SyncResult doPullFile(String remotePath, String localPath,
+            ISyncProgressMonitor monitor) {
+        return doPullFile(remotePath, localPath, monitor, null, SdbPreferences.getTimeOut());
+    }
+    
+    /**
+     * Pulls a remote file
+     * @param remotePath the remote file (length max is 1024)
+     * @param localPath the local destination
+     * @param monitor the monitor. The monitor must be started already.
+     * @param size information
+     * @param time out value while pulling the file
+     * @return a {@link SyncResult} object with a code and an optional message.
+     */
+    private SyncResult doPullFile(String remotePath, String localPath,
+            ISyncProgressMonitor monitor,
+            TransferInfo transferInfo,
+            int timeOut) {
+
+        byte[] msg;
+        byte[] pullResult = new byte[8];
+        if(transferInfo != null)
+        {
+            transferInfo.setSrc(localPath);
+        }
+
+        try {
+            byte[] remotePathContent = remotePath.getBytes(SdbHelper.UTF_ENCODING);
+
+            if (remotePathContent.length > REMOTE_PATH_MAX_LENGTH) {
+                return new SyncResult(RESULT_REMOTE_PATH_LENGTH);
+            }
+
+            // create the full request message
+            msg = createFileReq(ID_RECV, remotePathContent);
+
+            // and send it.
+            SdbHelper.write(mChannel, msg, -1, timeOut);
+
+            // read the result, in a byte array containing 2 ints
+            // (id, size)
+            SdbHelper.read(mChannel, pullResult, -1, timeOut);
+
+            // check we have the proper data back
+            if (checkResult(pullResult, ID_DATA) == false &&
+                    checkResult(pullResult, ID_DONE) == false) {
+                return new SyncResult(RESULT_CONNECTION_ERROR);
+            }
+        } catch (UnsupportedEncodingException e) {
+            return new SyncResult(RESULT_REMOTE_PATH_ENCODING, e);
+        } catch (TimeoutException e) {
+            return new SyncResult(RESULT_CONNECTION_TIMEOUT, e);
+        } catch (IOException e) {
+            return new SyncResult(RESULT_CONNECTION_ERROR, e);
+        }
+
+        // access the destination file
+        File f = new File(localPath);
+
+        // create the stream to write in the file. We use a new try/catch block to differentiate
+        // between file and network io exceptions.
+        FileOutputStream fos = null;
+        try {
+            fos = new FileOutputStream(f);
+        } catch (FileNotFoundException e) {
+            return new SyncResult(RESULT_FILE_WRITE_ERROR, e);
+        }
+
+        // the buffer to read the data
+        byte[] data = new byte[SYNC_DATA_MAX];
+
+        // loop to get data until we're done.
+        while (true) {
+            // check if we're cancelled
+            if (monitor.isCanceled() == true) {
+                return new SyncResult(RESULT_CANCELED);
+            }
+
+            // if we're done, we stop the loop
+            if (checkResult(pullResult, ID_DONE)) {
+                break;
+            }
+            if (checkResult(pullResult, ID_DATA) == false) {
+                // hmm there's an error
+                return new SyncResult(RESULT_CONNECTION_ERROR);
+            }
+            int length = ArrayHelper.swap32bitFromArray(pullResult, 4);
+            if (length > SYNC_DATA_MAX) {
+                // buffer overrun!
+                // error and exit
+                return new SyncResult(RESULT_BUFFER_OVERRUN);
+            }
+
+            try {
+                // now read the length we received
+                SdbHelper.read(mChannel, data, length, timeOut);
+
+                // get the header for the next packet.
+                SdbHelper.read(mChannel, pullResult, -1, timeOut);
+            } catch (TimeoutException e) {
+                return new SyncResult(RESULT_CONNECTION_TIMEOUT, e);
+            } catch (IOException e) {
+                return new SyncResult(RESULT_CONNECTION_ERROR, e);
+            }
+
+            // write the content in the file
+            try {
+                fos.write(data, 0, length);
+            } catch (IOException e) {
+                return new SyncResult(RESULT_FILE_WRITE_ERROR, e);
+            }
+            
+            if(transferInfo != null)
+            {
+                transferInfo.monitorAdvance(length, monitor);
+            }
+            else
+            {
+                monitor.advance(length);
+            }
+        }
+
+        try {
+            fos.flush();
+        } catch (IOException e) {
+            return new SyncResult(RESULT_FILE_WRITE_ERROR, e);
+        } 
+        
+        return new SyncResult(RESULT_OK);
+    }
+
+
+    /**
+     * Push multiple files
+     * @param fileArray
+     * @param remotePath
+     * @param monitor
+     * @return a {@link SyncResult} object with a code and an optional message.
+     */
+    private SyncResult doPush(File[] fileArray, String remotePath, ISyncProgressMonitor monitor) {
+        for (File f : fileArray) {
+            // check if we're canceled
+            if (monitor.isCanceled() == true) {
+                return new SyncResult(RESULT_CANCELED);
+            }
+            if (f.exists()) {
+                if (f.isDirectory()) {
+                    // append the name of the directory to the remote path
+                    String dest = remotePath + "/" + f.getName(); // $NON-NLS-1S
+                    monitor.startSubTask(dest);
+                    SyncResult result = doPush(f.listFiles(), dest, monitor);
+
+                    if (result.mCode != RESULT_OK) {
+                        return result;
+                    }
+
+                    monitor.advance(1);
+                } else if (f.isFile()) {
+                    // append the name of the file to the remote path
+                    String remoteFile = remotePath + "/" + f.getName(); // $NON-NLS-1S
+                    monitor.startSubTask(remoteFile);
+                    SyncResult result = doPushFile(f.getAbsolutePath(), remoteFile, monitor);
+                    if (result.mCode != RESULT_OK) {
+                        return result;
+                    }
+                }
+            }
+        }
+
+        return new SyncResult(RESULT_OK);
+    }
+
+    /**
+     * Push multiple files
+     * @param fileArray
+     * @param remotePath
+     * @param monitor
+     * @param size information
+     * @param time out value while pushing the files
+     * @return a {@link SyncResult} object with a code and an optional message.
+     */
+    private SyncResult doPush(File[] fileArray, String remotePath, ISyncProgressMonitor monitor, TransferInfo transferInfo, int timeOut) {
+        for (File f : fileArray) {
+            // check if we're canceled
+            if (monitor.isCanceled() == true) {
+                return new SyncResult(RESULT_CANCELED);
+            }
+            if (f.exists()) {
+                String remoteFile;
+                if("/".equals(remotePath))
+                {
+                    remoteFile = remotePath + f.getName();
+                }
+                else
+                {
+                    remoteFile = remotePath + "/" + f.getName();
+                }
+                transferInfo.setDest(remoteFile);
+                
+                if (f.isDirectory()) {
+                    // append the name of the directory to the remote path
+//                    String dest = remotePath + "/" + f.getName(); // $NON-NLS-1S
+//                    monitor.startSubTask(dest);
+                    SyncResult result = doPush(f.listFiles(), remoteFile, monitor, transferInfo, timeOut);
+
+                    if (result.mCode != RESULT_OK) {
+                        return result;
+                    }
+
+                    monitor.advance(1);
+                } else if (f.isFile()) {
+                    // append the name of the file to the remote path
+//                    String remoteFile = remotePath + "/" + f.getName(); // $NON-NLS-1S
+//                    monitor.startSubTask(remoteFile);
+//                    transferInfo.fileName = remoteFile;
+                    SyncResult result = doPushFile(f.getAbsolutePath(), remoteFile, monitor, transferInfo, timeOut);
+                    if (result.mCode != RESULT_OK) {
+                        return result;
+                    }
+                }
+            }
+        }
+
+        return new SyncResult(RESULT_OK);
+    }
+
+    /**
+     * Push a single file
+     * @param localPath the local file to push
+     * @param remotePath the remote file (length max is 1024)
+     * @param monitor the monitor. The monitor must be started already.
+     * @return a {@link SyncResult} object with a code and an optional message.
+     */
+    private SyncResult doPushFile(String localPath, String remotePath,
+            ISyncProgressMonitor monitor) {
+        return doPushFile( localPath, remotePath, monitor, null, SdbPreferences.getTimeOut());
+    }
+    
+    /**
+     * Push a single file with permission 755
+     * @param localPath the local file to push
+     * @param remotePath the remote file (length max is 1024)
+     * @param monitor the monitor. The monitor must be started already.
+     * @param size information
+     * @param time out value while pushing the file
+     * @return a {@link SyncResult} object with a code and an optional message.
+     */
+    private SyncResult doPushFile(String localPath, String remotePath,
+            ISyncProgressMonitor monitor,
+            TransferInfo transferInfo,
+            int timeOut) {
+        remotePath = remotePath.replace("\\ ", " ");
+        if(transferInfo != null)
+        {
+            transferInfo.setSrc(localPath);
+        }
+
+        FileInputStream fis = null;
+        byte[] msg;
+
+        try {
+            byte[] remotePathContent = remotePath.getBytes(SdbHelper.UTF_ENCODING);
+
+            if (remotePathContent.length > REMOTE_PATH_MAX_LENGTH) {
+                return new SyncResult(RESULT_REMOTE_PATH_LENGTH);
+            }
+
+            File f = new File(localPath);
+
+            // this shouldn't happen but still...
+            if (f.exists() == false) {
+                return new SyncResult(RESULT_NO_LOCAL_FILE);
+            }
+
+            // create the stream to read the file
+            fis = new FileInputStream(f);
+
+            // create the header for the action
+            msg = createSendFileReq(ID_SEND, remotePathContent, 0755);
+        } catch (UnsupportedEncodingException e) {
+            return new SyncResult(RESULT_REMOTE_PATH_ENCODING, e);
+        } catch (FileNotFoundException e) {
+            return new SyncResult(RESULT_FILE_READ_ERROR, e);
+        }
+
+        // and send it. We use a custom try/catch block to make the difference between
+        // file and network IO exceptions.
+        try {
+            SdbHelper.write(mChannel, msg, -1, timeOut);
+        } catch (TimeoutException e) {
+            return new SyncResult(RESULT_CONNECTION_TIMEOUT, e);
+        } catch (IOException e) {
+            return new SyncResult(RESULT_CONNECTION_ERROR, e);
+        }
+
+        // create the buffer used to read.
+        // we read max SYNC_DATA_MAX, but we need 2 4 bytes at the beginning.
+        if (mBuffer == null) {
+            mBuffer = new byte[SYNC_DATA_MAX + 8];
+        }
+        System.arraycopy(ID_DATA, 0, mBuffer, 0, ID_DATA.length);
+
+        // look while there is something to read
+        while (true) {
+            // check if we're canceled
+            if (monitor.isCanceled() == true) {
+                return new SyncResult(RESULT_CANCELED);
+            }
+
+            // read up to SYNC_DATA_MAX
+            int readCount = 0;
+            try {
+                readCount = fis.read(mBuffer, 8, SYNC_DATA_MAX);
+            } catch (IOException e) {
+                return new SyncResult(RESULT_FILE_READ_ERROR, e);
+            }
+
+            if (readCount == -1) {
+                // we reached the end of the file
+                break;
+            }
+
+            // now send the data to the device
+            // first write the amount read
+            ArrayHelper.swap32bitsToArray(readCount, mBuffer, 4);
+
+            // now write it
+            try {
+                SdbHelper.write(mChannel, mBuffer, readCount+8, timeOut);
+            } catch (TimeoutException e) {
+                return new SyncResult(RESULT_CONNECTION_TIMEOUT, e);
+            } catch (IOException e) {
+                return new SyncResult(RESULT_CONNECTION_ERROR, e);
+            }
+
+            if(transferInfo != null)
+            {
+                transferInfo.monitorAdvance(readCount, monitor);
+            }
+            else
+            {
+                monitor.advance(readCount);
+            }
+        }
+        // close the local file
+        try {
+            fis.close();
+        } catch (IOException e) {
+            return new SyncResult(RESULT_FILE_READ_ERROR, e);
+        }
+
+        try {
+            // create the DONE message
+            long time = System.currentTimeMillis() / 1000;
+            msg = createReq(ID_DONE, (int)time);
+
+            // and send it.
+            SdbHelper.write(mChannel, msg, -1, timeOut);
+
+            // read the result, in a byte array containing 2 ints
+            // (id, size)
+            byte[] result = new byte[8];
+            SdbHelper.read(mChannel, result, -1 /* full length */, timeOut);
+
+            if (checkResult(result, ID_OKAY) == false) {
+                if (checkResult(result, ID_FAIL)) {
+                    // read some error message...
+                    int len = ArrayHelper.swap32bitFromArray(result, 4);
+
+                    SdbHelper.read(mChannel, mBuffer, len, timeOut);
+
+                    // output the result?
+                    String message = new String(mBuffer, 0, len);
+                    Log.e("sdb", "transfer error: " + message);
+                    return new SyncResult(RESULT_UNKNOWN_ERROR, message);
+                }
+
+                return new SyncResult(RESULT_UNKNOWN_ERROR);
+            }
+        } catch (TimeoutException e) {
+            return new SyncResult(RESULT_CONNECTION_TIMEOUT, e);
+        } catch (IOException e) {
+            return new SyncResult(RESULT_CONNECTION_ERROR, e);
+        }
+
+        return new SyncResult(RESULT_OK);
+    }
+
+    /**
+     * Create a command with a code and an int values
+     * @param command
+     * @param value
+     * @return
+     */
+    private static byte[] createReq(byte[] command, int value) {
+        byte[] array = new byte[8];
+
+        System.arraycopy(command, 0, array, 0, 4);
+        ArrayHelper.swap32bitsToArray(value, array, 4);
+
+        return array;
+    }
+
+    /**
+     * Creates the data array for a file request. This creates an array with a 4 byte command + the
+     * remote file name.
+     * @param command the 4 byte command (ID_STAT, ID_RECV, ...).
+     * @param path The path, as a byte array, of the remote file on which to
+     *      execute the command.
+     * @return the byte[] to send to the device through sdb
+     */
+    private static byte[] createFileReq(byte[] command, byte[] path) {
+        byte[] array = new byte[8 + path.length];
+
+        System.arraycopy(command, 0, array, 0, 4);
+        ArrayHelper.swap32bitsToArray(path.length, array, 4);
+        System.arraycopy(path, 0, array, 8, path.length);
+
+        return array;
+    }
+
+    private static byte[] createSendFileReq(byte[] command, byte[] path, int mode) {
+        // make the mode into a string
+        String modeStr = "," + (mode & 0777); // $NON-NLS-1S
+        byte[] modeContent;
+        try {
+            modeContent = modeStr.getBytes(SdbHelper.DEFAULT_ENCODING);
+        } catch (UnsupportedEncodingException e) {
+            return null;
+        }
+
+        byte[] array = new byte[8 + path.length + modeContent.length];
+
+        System.arraycopy(command, 0, array, 0, 4);
+        ArrayHelper.swap32bitsToArray(path.length + modeContent.length, array, 4);
+        System.arraycopy(path, 0, array, 8, path.length);
+        System.arraycopy(modeContent, 0, array, 8 + path.length, modeContent.length);
+
+        return array;
+
+
+    }
+
+    /**
+     * Checks the result array starts with the provided code
+     * @param result The result array to check
+     * @param code The 4 byte code.
+     * @return true if the code matches.
+     */
+    private static boolean checkResult(byte[] result, byte[] code) {
+        if (result[0] != code[0] ||
+                result[1] != code[1] ||
+                result[2] != code[2] ||
+                result[3] != code[3]) {
+            return false;
+        }
+
+        return true;
+
+    }
+}
+
+//to process size is bigger than integer maximum value
+class TransferInfo{
+
+    private String from = null;
+    private String to = null;
+    //to show total file size and unit
+    private String total_sizeAndunit = null;
+    private int rate = 0;
+    private int remains = 0;
+    private long total_size = 0;
+    private long transfered_size = 0;
+    
+    TransferInfo(){}
+
+    /**
+     * Getting size down until size is smaller than integer maximum size
+     * @param origin
+     * @return down size
+     */
+    public int downSizing(long origin)
+    {
+        total_size = origin;
+        int times = 0;
+        while(origin > Integer.MAX_VALUE)
+        {
+            origin /= 10;
+            times++;
+        }
+
+        rate = (int) Math.pow(10, times);
+        total_sizeAndunit = getSizeAndUnit(total_size);
+        return (int)origin;
+    }
+
+    public void setDest(String dest)
+    {
+        to = dest;
+    }
+    
+    public void setSrc(String src)
+    {
+        from = src;
+    }
+
+    public void monitorAdvance(int count, ISyncProgressMonitor monitor)
+    {
+        transfered_size += count;
+        
+        int size = remains + count ;
+
+        if(size > rate)
+        {
+            monitor.advance(size/rate);
+            remains = size%rate;
+        }
+        else
+        {
+            remains = size;
+        }
+        
+        if(from != null)
+        {
+            monitor.startSubTask(String.format("From\t\"%s\"\tto\t\"%s\"\n( %s / %s ) ", from, to, getSizeAndUnit(transfered_size), total_sizeAndunit));
+        }
+    }
+
+    public String getSizeAndUnit(long size)
+    {
+        int index = 0;
+        int i = 0;
+        int short_size = 0;
+        double size_for_GB = 0;
+
+        while(i < 3)
+        {
+            if(size >= 1000)
+            {
+                //case of b, kb, mb : xxx b/kb/mb
+                //case of gb : xxx.xx gb
+                if(index == 2)
+                {
+                    size_for_GB = (double)size/1000.00;
+                }else
+                {
+                    size/=1000;
+                }
+
+                if(size > 0)
+                {
+                    index++;
+                }
+                else
+                {
+                    break;
+                }
+                i++;
+            }
+            else
+            {
+                break;
+            }
+        }
+
+        short_size = (int)size % 1000;
+
+        String unit = null;
+
+        switch(index)
+        {
+            case 0:
+                unit = "B";
+                break;
+            case 1:
+                unit = "KB";
+                break;
+            case 2:
+                unit = "MB";
+                break;
+            case 3:
+                unit = "GB";
+                return String.format("%.2f %s", size_for_GB, unit);
+        }
+
+        return String.format("%d %s", short_size, unit);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.common.sdblib/src/org/tizen/sdblib/TimeoutException.java b/org.tizen.common.sdblib/src/org/tizen/sdblib/TimeoutException.java
new file mode 100644 (file)
index 0000000..b0ae737
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.tizen.sdblib;
+
+import java.io.IOException;
+
+/**
+ * Exception thrown when a connection to sdb failed with a timeout.
+ *
+ */
+public class TimeoutException extends IOException {
+    private static final long serialVersionUID = 1L;
+}
diff --git a/org.tizen.common.sdblib/test/lib/asm-4.0.jar b/org.tizen.common.sdblib/test/lib/asm-4.0.jar
new file mode 100644 (file)
index 0000000..6d63075
Binary files /dev/null and b/org.tizen.common.sdblib/test/lib/asm-4.0.jar differ
diff --git a/org.tizen.common.sdblib/test/lib/asm-tree-4.0.jar b/org.tizen.common.sdblib/test/lib/asm-tree-4.0.jar
new file mode 100644 (file)
index 0000000..aa99d3a
Binary files /dev/null and b/org.tizen.common.sdblib/test/lib/asm-tree-4.0.jar differ
diff --git a/org.tizen.common.sdblib/test/lib/javassist-3.16.1-GA.jar b/org.tizen.common.sdblib/test/lib/javassist-3.16.1-GA.jar
new file mode 100644 (file)
index 0000000..c29da0f
Binary files /dev/null and b/org.tizen.common.sdblib/test/lib/javassist-3.16.1-GA.jar differ
diff --git a/org.tizen.common.sdblib/test/lib/junit-4.10-src.jar b/org.tizen.common.sdblib/test/lib/junit-4.10-src.jar
new file mode 100644 (file)
index 0000000..1449d28
Binary files /dev/null and b/org.tizen.common.sdblib/test/lib/junit-4.10-src.jar differ
diff --git a/org.tizen.common.sdblib/test/lib/junit-4.10.jar b/org.tizen.common.sdblib/test/lib/junit-4.10.jar
new file mode 100644 (file)
index 0000000..bf5c0b9
Binary files /dev/null and b/org.tizen.common.sdblib/test/lib/junit-4.10.jar differ
diff --git a/org.tizen.common.sdblib/test/lib/mockito-all-1.9.0.jar b/org.tizen.common.sdblib/test/lib/mockito-all-1.9.0.jar
new file mode 100644 (file)
index 0000000..273fd50
Binary files /dev/null and b/org.tizen.common.sdblib/test/lib/mockito-all-1.9.0.jar differ
diff --git a/org.tizen.common.sdblib/test/lib/powermock-mockito-1.4.12-full.jar b/org.tizen.common.sdblib/test/lib/powermock-mockito-1.4.12-full.jar
new file mode 100644 (file)
index 0000000..b70358d
Binary files /dev/null and b/org.tizen.common.sdblib/test/lib/powermock-mockito-1.4.12-full.jar differ
diff --git a/org.tizen.common.sdblib/test/src/org/tizen/sdblib/TransferInfoTest.java b/org.tizen.common.sdblib/test/src/org/tizen/sdblib/TransferInfoTest.java
new file mode 100644 (file)
index 0000000..d2748fd
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Hyunsik Noh <hyunsik.noh@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.sdblib;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+public class TransferInfoTest
+{
+    @Test
+    public void test_getSizeAndUnit()
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+                new Object[] { 100L, new String("100 B") },
+                new Object[] { 1000L, new String("1 KB") },
+                new Object[] { 10000L, new String("10 KB") },
+                new Object[] { 100000L, new String("100 KB") },
+                new Object[] { 1000000L, new String("1 MB") },
+                new Object[] { 10000000L, new String("10 MB") },
+                new Object[] { 100000000L, new String("100 MB") },
+                new Object[] { 1000000000L, new String("1.00 GB") },
+            };
+            TransferInfo info = new TransferInfo();
+            for ( final Object[] TEST_CASE : TEST_CASES )
+            {
+                final long input = (Long) TEST_CASE[0];
+                final String expected = (String) TEST_CASE[1];
+                assertEquals( expected, info.getSizeAndUnit(input));
+            }
+    }
+}
diff --git a/org.tizen.common.sign/.classpath b/org.tizen.common.sign/.classpath
new file mode 100644 (file)
index 0000000..a1f627e
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry exported="true" kind="lib" path="lib/HashSign.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/xmlsec-1.5.3.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/CertificateGenerator.jar"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.common.sign/.project b/org.tizen.common.sign/.project
new file mode 100644 (file)
index 0000000..f416e24
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.common.sign</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.common.sign/.settings/org.eclipse.jdt.core.prefs b/org.tizen.common.sign/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..4735ca7
--- /dev/null
@@ -0,0 +1,8 @@
+#Sat Oct 20 17:22:06 KST 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/org.tizen.common.sign/META-INF/MANIFEST.MF b/org.tizen.common.sign/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..2ad2235
--- /dev/null
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.tizen.common.sign; singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.tizen.common.sign.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.tizen.common
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.eclipse.core.resources
+Bundle-Vendor: %Bundle-Vendor
+Export-Package: hashsign,
+ org.tizen.common.sign,
+ org.tizen.common.sign.command,
+ org.tizen.common.sign.exception,
+ org.tizen.common.sign.model,
+ org.tizen.common.sign.preferences,
+ org.tizen.common.sign.signer,
+ org.tizen.common.sign.ui,
+ org.tizen.common.sign.util
+Bundle-ClassPath: lib/CertificateGenerator.jar,
+ .,
+ lib/HashSign.jar,
+ lib/xmlsec-1.5.3.jar
diff --git a/org.tizen.common.sign/OSGI-INF/l10n/bundle.properties b/org.tizen.common.sign/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..4b03885
--- /dev/null
@@ -0,0 +1,4 @@
+#Properties file for org.tizen.common.sign
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen Common Sign
+page.name = Secure Profiles
\ No newline at end of file
diff --git a/org.tizen.common.sign/about.html b/org.tizen.common.sign/about.html
new file mode 100644 (file)
index 0000000..54e85f7
--- /dev/null
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May, 2011</p>
+<h3>Tizen SDK</h3>
+
+<p><a href="http://www.tizen.org/" target="_blank">Tizen SDK</a> 
+is a set of Eclipse plug-ins that helps programmers to develop applications for 
+the mobile platform.</p>
+
+<h3>License</h3>
+
+<p>See <a href="about_files/LICENSE-2.0.htm">Apache License, Version 2.0</a>.</p>
+
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as set out below. If you did not
+receive this Content directly from the Eclipse Foundation, the following is provided for informational
+purposes only, and you should look to the Redistributor's license for terms and conditions of use.</p>
+
+<h4>Apache Santuario</h4>
+<p>
+The Apache Santuario<SMALL><SUP>TM</SUP></SMALL> project is aimed at providing implementation of the primary security standards for XML
+<ul>
+    <li>XML-Signature Syntax and Processing
+    <li>XML Encryption Syntax and Processing.
+</ul>
+</p>
+
+<p>See <a href="about_files/santuario-LICENSE.txt">about_files/santuario-LICENSE.txt</a>.</p>
+<p>
+Code licensed under the terms of the <a href="http://www.apache.org/licenses/">Apache License</a>. The home page is located at:
+<ul>
+<a href="http://santuario.apache.org/">http://santuario.apache.org/</a>
+</ul>
+</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.common.sign/about_files/LICENSE-2.0.htm b/org.tizen.common.sign/about_files/LICENSE-2.0.htm
new file mode 100644 (file)
index 0000000..f7ca656
--- /dev/null
@@ -0,0 +1,191 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache License, Version 2.0</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+    <link rel="stylesheet" type="text/css" media="screen" href="/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="/css/code.css">
+
+    <script type="text/javascript" src="/js/jquery.js"></script>
+    <script type="text/javascript" src="/js/apache_boot.js"></script>
+
+    
+
+    
+    <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License.  You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License. -->
+  </head>
+
+  <body>
+    <div id="page" class="container_16">
+      <div id="header" class="grid_8">
+        <h1>The Apache Software Foundation</h1>
+        <h2>Apache License, Version 2.0</h2>
+      </div>
+
+      <div class="clear"></div>
+      <div id="content" class="grid_16"><div class="section-content"><p>Apache License<br></br>Version 2.0, January 2004<br></br>
+<a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a> </p>
+<p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p>
+<p><strong><a name="definitions">1. Definitions</a></strong>.</p>
+<p>"License" shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.</p>
+<p>"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.</p>
+<p>"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control with
+that entity. For the purposes of this definition, "control" means (i) the
+power, direct or indirect, to cause the direction or management of such
+entity, whether by contract or otherwise, or (ii) ownership of fifty
+percent (50%) or more of the outstanding shares, or (iii) beneficial
+ownership of such entity.</p>
+<p>"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.</p>
+<p>"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.</p>
+<p>"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media types.</p>
+<p>"Work" shall mean the work of authorship, whether in Source or Object form,
+made available under the License, as indicated by a copyright notice that
+is included in or attached to the work (an example is provided in the
+Appendix below).</p>
+<p>"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent, as
+a whole, an original work of authorship. For the purposes of this License,
+Derivative Works shall not include works that remain separable from, or
+merely link (or bind by name) to the interfaces of, the Work and Derivative
+Works thereof.</p>
+<p>"Contribution" shall mean any work of authorship, including the original
+version of the Work and any modifications or additions to that Work or
+Derivative Works thereof, that is intentionally submitted to Licensor for
+inclusion in the Work by the copyright owner or by an individual or Legal
+Entity authorized to submit on behalf of the copyright owner. For the
+purposes of this definition, "submitted" means any form of electronic,
+verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems that
+are managed by, or on behalf of, the Licensor for the purpose of discussing
+and improving the Work, but excluding communication that is conspicuously
+marked or otherwise designated in writing by the copyright owner as "Not a
+Contribution."</p>
+<p>"Contributor" shall mean Licensor and any individual or Legal Entity on
+behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.</p>
+<p><strong><a name="copyright">2. Grant of Copyright License</a></strong>. Subject to the
+terms and conditions of this License, each Contributor hereby grants to You
+a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of, publicly
+display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.</p>
+<p><strong><a name="patent">3. Grant of Patent License</a></strong>. Subject to the terms
+and conditions of this License, each Contributor hereby grants to You a
+perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made, use,
+offer to sell, sell, import, and otherwise transfer the Work, where such
+license applies only to those patent claims licensable by such Contributor
+that are necessarily infringed by their Contribution(s) alone or by
+combination of their Contribution(s) with the Work to which such
+Contribution(s) was submitted. If You institute patent litigation against
+any entity (including a cross-claim or counterclaim in a lawsuit) alleging
+that the Work or a Contribution incorporated within the Work constitutes
+direct or contributory patent infringement, then any patent licenses
+granted to You under this License for that Work shall terminate as of the
+date such litigation is filed.</p>
+<p><strong><a name="redistribution">4. Redistribution</a></strong>. You may reproduce and
+distribute copies of the Work or Derivative Works thereof in any medium,
+with or without modifications, and in Source or Object form, provided that
+You meet the following conditions:</p>
+<ol>
+<li>
+<p>You must give any other recipients of the Work or Derivative Works a
+copy of this License; and</p>
+</li>
+<li>
+<p>You must cause any modified files to carry prominent notices stating
+that You changed the files; and</p>
+</li>
+<li>
+<p>You must retain, in the Source form of any Derivative Works that You
+distribute, all copyright, patent, trademark, and attribution notices from
+the Source form of the Work, excluding those notices that do not pertain to
+any part of the Derivative Works; and</p>
+</li>
+<li>
+<p>If the Work includes a "NOTICE" text file as part of its distribution,
+then any Derivative Works that You distribute must include a readable copy
+of the attribution notices contained within such NOTICE file, excluding
+those notices that do not pertain to any part of the Derivative Works, in
+at least one of the following places: within a NOTICE text file distributed
+as part of the Derivative Works; within the Source form or documentation,
+if provided along with the Derivative Works; or, within a display generated
+by the Derivative Works, if and wherever such third-party notices normally
+appear. The contents of the NOTICE file are for informational purposes only
+and do not modify the License. You may add Your own attribution notices
+within Derivative Works that You distribute, alongside or as an addendum to
+the NOTICE text from the Work, provided that such additional attribution
+notices cannot be construed as modifying the License.
+You may add Your own copyright statement to Your modifications and may
+provide additional or different license terms and conditions for use,
+reproduction, or distribution of Your modifications, or for any such
+Derivative Works as a whole, provided Your use, reproduction, and
+distribution of the Work otherwise complies with the conditions stated in
+this License.</p>
+</li>
+</ol>
+<p><strong><a name="contributions">5. Submission of Contributions</a></strong>. Unless You
+explicitly state otherwise, any Contribution intentionally submitted for
+inclusion in the Work by You to the Licensor shall be under the terms and
+conditions of this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify the
+terms of any separate license agreement you may have executed with Licensor
+regarding such Contributions.</p>
+<p><strong><a name="trademarks">6. Trademarks</a></strong>. This License does not grant
+permission to use the trade names, trademarks, service marks, or product
+names of the Licensor, except as required for reasonable and customary use
+in describing the origin of the Work and reproducing the content of the
+NOTICE file.</p>
+<p><strong><a name="no-warranty">7. Disclaimer of Warranty</a></strong>. Unless required by
+applicable law or agreed to in writing, Licensor provides the Work (and
+each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
+without limitation, any warranties or conditions of TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You
+are solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your exercise
+of permissions under this License.</p>
+<p><strong><a name="no-liability">8. Limitation of Liability</a></strong>. In no event and
+under no legal theory, whether in tort (including negligence), contract, or
+otherwise, unless required by applicable law (such as deliberate and
+grossly negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a result
+of this License or out of the use or inability to use the Work (including
+but not limited to damages for loss of goodwill, work stoppage, computer
+failure or malfunction, or any and all other commercial damages or losses),
+even if such Contributor has been advised of the possibility of such
+damages.</p>
+<p><strong><a name="additional">9. Accepting Warranty or Additional Liability</a></strong>.
+While redistributing the Work or Derivative Works thereof, You may choose
+to offer, and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this License.
+However, in accepting such obligations, You may act only on Your own behalf
+and on Your sole responsibility, not on behalf of any other Contributor,
+and only if You agree to indemnify, defend, and hold each Contributor
+harmless for any liability incurred by, or claims asserted against, such
+Contributor by reason of your accepting any such warranty or additional
+liability.</p>
+<p>END OF TERMS AND CONDITIONS</p>
+
+    <div class="clear"></div>
+    
+    </div>
+    <div id="copyright" class="container_16">
+      <p>Copyright &#169; 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+    </div>
+  </body>
+</html>
diff --git a/org.tizen.common.sign/about_files/santuario-LICENSE.txt b/org.tizen.common.sign/about_files/santuario-LICENSE.txt
new file mode 100644 (file)
index 0000000..d645695
--- /dev/null
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/org.tizen.common.sign/build.properties b/org.tizen.common.sign/build.properties
new file mode 100644 (file)
index 0000000..29261e1
--- /dev/null
@@ -0,0 +1,12 @@
+source.. = src/
+output.. = bin/
+bin.includes = plugin.xml,\
+               META-INF/,\
+               .,\
+               key/,\
+               OSGI-INF/,\
+               lib/CertificateGenerator.jar,\
+               lib/HashSign.jar,\
+               lib/xmlsec-1.5.3.jar,\
+               about_files/,\
+               about.html
diff --git a/org.tizen.common.sign/key/samsung.devmode.sdk.cert.p12 b/org.tizen.common.sign/key/samsung.devmode.sdk.cert.p12
new file mode 100644 (file)
index 0000000..8302b60
Binary files /dev/null and b/org.tizen.common.sign/key/samsung.devmode.sdk.cert.p12 differ
diff --git a/org.tizen.common.sign/lib/CertificateGenerator.jar b/org.tizen.common.sign/lib/CertificateGenerator.jar
new file mode 100644 (file)
index 0000000..0f94b29
Binary files /dev/null and b/org.tizen.common.sign/lib/CertificateGenerator.jar differ
diff --git a/org.tizen.common.sign/lib/HashSign.jar b/org.tizen.common.sign/lib/HashSign.jar
new file mode 100644 (file)
index 0000000..64d83b7
Binary files /dev/null and b/org.tizen.common.sign/lib/HashSign.jar differ
diff --git a/org.tizen.common.sign/lib/xmlsec-1.5.3.jar b/org.tizen.common.sign/lib/xmlsec-1.5.3.jar
new file mode 100644 (file)
index 0000000..effb937
Binary files /dev/null and b/org.tizen.common.sign/lib/xmlsec-1.5.3.jar differ
diff --git a/org.tizen.common.sign/plugin.xml b/org.tizen.common.sign/plugin.xml
new file mode 100644 (file)
index 0000000..e340406
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+
+   <extension
+         point="org.eclipse.ui.preferencePages">
+      <page
+            category="org.tizen.common.preferences.tizencommon"
+            class="org.tizen.common.sign.preferences.SigningPreferencePage"
+            id="org.tizen.common.sign.preferences.SigningPreferencePage"
+            name="%page.name">
+      </page>
+   </extension>
+
+</plugin>
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/Activator.java b/org.tizen.common.sign/src/org/tizen/common/sign/Activator.java
new file mode 100644 (file)
index 0000000..5162648
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jihoon Song <jihoon80.song@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.sign;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+import org.tizen.common.CommonPlugin;
+import org.tizen.common.core.command.Prompter;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+       // The plug-in ID
+       public static final String PLUGIN_ID = "org.tizen.common.sign"; //$NON-NLS-1$
+
+       // The shared instance
+       private static Activator plugin;
+       
+       /**
+        * The constructor
+        */
+       public Activator() {
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+        */
+       public void start(BundleContext context) throws Exception {
+               super.start(context);
+               plugin = this;
+       }
+
+       /*
+        * (non-Javadoc)
+        * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+        */
+       public void stop(BundleContext context) throws Exception {
+               plugin = null;
+               super.stop(context);
+       }
+
+       /**
+        * Returns the shared instance
+        *
+        * @return the shared instance
+        */
+       public static Activator getDefault() {
+               return plugin;
+       }
+
+       /**
+        * Returns an image descriptor for the image file at the given
+        * plug-in relative path
+        *
+        * @param path the path
+        * @return the image descriptor
+        */
+       public static ImageDescriptor getImageDescriptor(String path) {
+               return imageDescriptorFromPlugin(PLUGIN_ID, path);
+       }
+       
+       public Prompter getPrompter() {
+        return CommonPlugin.getDefault().getPrompter();
+    }
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/command/ReadSigningProfileFileCommand.java b/org.tizen.common.sign/src/org/tizen/common/sign/command/ReadSigningProfileFileCommand.java
new file mode 100755 (executable)
index 0000000..5a4c7f3
--- /dev/null
@@ -0,0 +1,256 @@
+/*
+ * Web IDE - sign
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.sign.command;
+
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.command.AbstractCommand;
+import org.tizen.common.core.command.ExecutionContext;
+import org.tizen.common.core.command.Executor;
+import org.tizen.common.core.command.InputValidator;
+import org.tizen.common.core.command.UserField;
+import org.tizen.common.file.FileHandler;
+import org.tizen.common.file.FileHandler.Attribute;
+import org.tizen.common.file.FileHandler.Type;
+import org.tizen.common.sign.model.SignatureConstants;
+import org.tizen.common.sign.preferences.SigningProfileItem;
+import org.tizen.common.sign.util.SigningProfileUtil;
+import org.tizen.common.util.IOUtil;
+import org.tizen.common.util.StringUtil;
+
+public class
+ReadSigningProfileFileCommand
+extends AbstractCommand<Object>
+{
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );
+
+    protected final String path;
+
+    protected final String profileName;
+
+    protected InputStream profileInputStream;
+
+    protected List<SigningProfileItem> profileItems = new ArrayList<SigningProfileItem>();
+
+
+    public ReadSigningProfileFileCommand( final String path, final String profileName )
+    {
+        this.path = path;
+        this.profileName = profileName;
+
+        logger.info( "Read profile[{}] from {}", profileName, path );
+    }
+
+    public void run(
+        final Executor executor,
+        final ExecutionContext context
+    )
+    throws Exception
+    {
+        if ( !canRun( context ) )
+        {
+            return ;
+        }
+        
+        final FileHandler fileHandler = context.getFileHandler();
+        byte[] bytes = IOUtil.getBytes( fileHandler.read( this.path ) , true);
+        this.profileInputStream = new ByteArrayInputStream( bytes );
+        
+        try {
+            this.profileItems = SigningProfileUtil.parseProfileFile( this.profileInputStream, this.profileName );
+            
+            interactForPassword( executor, context );
+        } finally {
+            tryClose( this.profileInputStream );
+            this.profileInputStream = null;
+        }
+    }
+
+    protected void interactForPassword(final Executor executor, final ExecutionContext context)
+            throws Exception {
+        SigningProfileItem authorItem = getItem( true );
+        SigningProfileItem distributorItem = getItem( false );
+        
+        boolean hasAuthor = isValidItem( authorItem );
+        boolean hasDistributor = isValidItem( distributorItem );
+        
+        if ( !hasAuthor ) {
+            // If don't have author certificate, no interact.
+            return;
+        }
+        
+        if ( !SigningProfileUtil.hasPassword( authorItem ) ||
+                ( hasDistributor && !SigningProfileUtil.hasPassword( distributorItem ) ) ) {
+            
+            ArrayList<UserField> fieldList = new ArrayList<UserField>();
+            
+            // Author password text
+            UserField authorText = new UserField( SignatureConstants.AUTHOR, "Author password : ", char[].class );
+            authorText.setValue( authorItem.getPassword() );
+            authorText.setValidator( new InputValidator() {
+                @Override
+                public String check(Object value) {
+                    if ( value instanceof String ) {
+                        return StringUtil.isEmpty( (String) value ) ? "Input author password." : null;
+                    }
+                    return null;
+                }
+            } );
+            fieldList.add( authorText );
+            
+            // Savable author password button 
+            UserField authorButton = new UserField( "authorPwdSavable", "Save author password", boolean.class );
+            fieldList.add( authorButton );
+            
+            // Distributor password text
+            UserField distributor2Text = new UserField( SignatureConstants.DISTRIBUTOR_2ND, "Distributor password : ", char[].class );
+            if ( !hasDistributor ) {
+                distributor2Text.setModify( false );
+            } else {
+                distributor2Text.setValue( distributorItem.getPassword() );
+                distributor2Text.setValidator( new InputValidator() {
+                    @Override
+                    public String check(Object value) {
+                        if ( value instanceof String ) {
+                            return StringUtil.isEmpty( (String) value ) ? "Input distributor password." : null;
+                        }
+                        return null;
+                    }
+                } );
+            }
+            fieldList.add( distributor2Text );
+            
+            // Savable distributor2 password button
+            UserField distributor2Button = new UserField( "distributorPwdSavable", "Save author password", boolean.class );
+            if ( !hasDistributor ) {
+                distributor2Button.setModify( false );
+            }
+            fieldList.add( distributor2Button );
+            
+            // options
+            Map<String, Object> options = new HashMap<String, Object>();
+            
+            
+            // Interact passwords
+            context.getPrompter().batch( fieldList, options );
+            
+            
+            // save profiles
+            boolean saveAuthor = getBoolean( authorButton.getValue() );
+            boolean saveDistributor = hasDistributor ? getBoolean( distributor2Button.getValue() ) : false;
+            
+            if ( saveAuthor ) {
+                authorItem.setPassword( (char[]) authorText.getValue() );
+            }
+            if ( hasDistributor && saveDistributor ) {
+                distributorItem.setPassword( (char[]) distributor2Text.getValue() );
+            }
+            
+            writeProfiles( executor, context );
+            
+            // synchronize profile password
+            if ( !saveAuthor ) {
+                authorItem.setPassword( (char[]) authorText.getValue() );
+            }
+            if ( hasDistributor && !saveDistributor ) {
+                distributorItem.setPassword( (char[]) distributor2Text.getValue() );
+            }
+        }
+    }
+    
+    protected void writeProfiles(final Executor executor, final ExecutionContext context)
+            throws Exception {
+        final FileHandler fileHandler = context.getFileHandler();
+        
+        this.profileInputStream.reset();
+        final InputStream in = SigningProfileUtil.updateProfiles( this.profileInputStream, this.profileName, this.profileItems );
+        if ( in == null ) {
+            logger.warn( "Cannot update profiles" );
+            return;
+        }
+        
+        try {
+            fileHandler.write( this.path, in );
+        } finally {
+            tryClose( in );
+        }
+    }
+
+    protected
+    boolean
+    canRun(
+        final ExecutionContext context
+    )
+    throws IOException
+    {
+        final FileHandler fileHandler = context.getFileHandler();
+        if ( !fileHandler.is( path, Attribute.EXISTS ) )
+        {
+            return false;
+        }
+        if ( !fileHandler.is( path, Attribute.READABLE ) )
+        {
+            return false;
+        }
+        return ( Type.FILE.equals( fileHandler.get( path, Attribute.TYPE ) ) );
+    }
+
+    public List<SigningProfileItem> getProfileItems()
+    {
+        return this.profileItems;
+    }
+
+    protected boolean isValidItem(SigningProfileItem item) {
+        if ( item == null ) {
+            return false;
+        }
+        
+        return SigningProfileUtil.hasKeyLocation( item );
+    }
+    
+    protected SigningProfileItem getItem(boolean author) {
+        for ( SigningProfileItem item : this.profileItems ) {
+            if ( item.isAuthor() == author ) {
+                return item;
+            }
+        }
+        
+        return null;
+    }
+
+    protected boolean getBoolean(Object obj) {
+        return ( obj == null ) ? true : Boolean.parseBoolean( String.valueOf( obj ) );
+    }
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/exception/CertificationException.java b/org.tizen.common.sign/src/org/tizen/common/sign/exception/CertificationException.java
new file mode 100644 (file)
index 0000000..dfaae55
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Web IDE - sign
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.sign.exception;
+
+public class
+CertificationException
+extends Exception {
+       
+       private static final long serialVersionUID = 7001672806422880543L;
+       
+       public CertificationException( final String msg, final Throwable cause ) {
+               super( msg, cause );
+       }
+       public CertificationException( final String msg ) {
+               super( msg );
+       }
+
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/exception/ComplicatedCertificationException.java b/org.tizen.common.sign/src/org/tizen/common/sign/exception/ComplicatedCertificationException.java
new file mode 100644 (file)
index 0000000..dcc49e9
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Web IDE - sign
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.sign.exception;
+
+public class ComplicatedCertificationException
+extends CertificationException
+{
+
+       /**
+        * 
+        */
+       private static final long serialVersionUID = -8921261148323181356L;
+
+       public ComplicatedCertificationException(String msg) {
+               super(msg);
+               // TODO Auto-generated constructor stub
+       }
+
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/exception/SigningErrorDialog.java b/org.tizen.common.sign/src/org/tizen/common/sign/exception/SigningErrorDialog.java
new file mode 100644 (file)
index 0000000..f08c647
--- /dev/null
@@ -0,0 +1,373 @@
+/*
+ * Web IDE - sign
+ * 
+ * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jihoon Song <jihoon80.song@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
+
+package org.tizen.common.sign.exception;
+
+import static org.tizen.common.util.SWTUtil.getActiveShell;
+import static org.tizen.common.util.StringUtil.nvl;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IconAndMessageDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.tizen.common.sign.preferences.SigningPreferencePage;
+
+
+public class
+SigningErrorDialog
+extends IconAndMessageDialog
+{
+       /**
+        * The title of the dialog.
+        */
+       private String title;
+
+       public
+       SigningErrorDialog(
+               final String message
+       )
+       {
+               this( getActiveShell(), "Signing", message );
+       }
+
+       /**
+        * Creates an error dialog. Note that the dialog will have no visual
+        * representation (no widgets) until it is told to open.
+        * <p>
+        * Normally one should use <code>openError</code> to create and open one
+        * of these. This constructor is useful only if the error object being
+        * displayed contains child items <it>and </it> you need to specify a mask
+        * which will be used to filter the displaying of these children. The error
+        * dialog will only be displayed if there is at least one child status
+        * matching the mask.
+        * </p>
+        * 
+        * @param parentShell
+        *            the shell under which to create this dialog
+        * @param dialogTitle
+        *            the title to use for this dialog, or <code>null</code> to
+        *            indicate that the default title should be used
+        * @param message
+        *            the message to show in this dialog, or <code>null</code> to
+        *            indicate that the error's message should be shown as the
+        *            primary message
+        * @param status
+        *            the error to show to the user
+        * @param displayMask
+        *            the mask to use to filter the displaying of child items, as
+        *            per <code>IStatus.matches</code>
+        * @see org.eclipse.core.runtime.IStatus#matches(int)
+        */
+       public
+       SigningErrorDialog(
+               final Shell parentShell,
+               final String dialogTitle,
+               final String message
+       )
+       {
+               super( parentShell );
+               this.title = nvl( dialogTitle, JFaceResources.getString( "Problem_Occurred" ) );
+               this.message = message;
+       }
+
+       /*
+        * (non-Javadoc) Method declared in Window.
+        */
+       protected void configureShell(Shell shell) {
+               super.configureShell(shell);
+               shell.setText(title);
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
+        */
+       protected void createButtonsForButtonBar(Composite parent) {
+               // create OK and Details buttons
+               createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
+               createButton( parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true );
+       }
+
+       /**
+        * This implementation of the <code>Dialog</code> framework method creates
+        * and lays out a composite. Subclasses that require a different dialog area
+        * may either override this method, or call the <code>super</code>
+        * implementation and add controls to the created composite.
+        * 
+        * Note:  Since 3.4, the created composite no longer grabs excess vertical space.
+        * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=72489.
+        * If the old behavior is desired by subclasses, get the returned composite's
+        * layout data and set grabExcessVerticalSpace to true.
+        */
+       protected
+       Control
+       createDialogArea(
+               final Composite parent
+       )
+       {
+               // Create a composite with standard margins and spacing
+               // Add the messageArea to this composite so that as subclasses add widgets to the messageArea
+               // and dialogArea, the number of children of parent remains fixed and with consistent layout.
+               // Fixes bug #240135
+               Composite composite = new Composite(parent, SWT.NONE);
+               createMessageArea(composite);
+               GridLayout layout = new GridLayout();
+               layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);
+               layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);
+               layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
+               layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
+               layout.numColumns = 2;
+               composite.setLayout(layout);
+               GridData childData = new GridData(GridData.FILL_BOTH);
+               childData.horizontalSpan = 2;
+               childData.grabExcessVerticalSpace = false;
+               composite.setLayoutData(childData);
+               composite.setFont(parent.getFont());
+
+               return composite;
+       }
+
+       @Override
+       protected Control createMessageArea(Composite composite) {
+
+               // create composite
+               // create image
+               Image image = getImage();
+               if (image != null) {
+                       imageLabel = new Label(composite, SWT.NULL);
+                       image.setBackground(imageLabel.getBackground());
+                       imageLabel.setImage(image);
+                       addAccessibleListeners(imageLabel, image);
+                       GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.BEGINNING)
+                                       .applyTo(imageLabel);
+               }
+               // create message
+               if (message != null) {
+                       Link messageLabel = new Link(composite, getMessageLabelStyle());
+                       messageLabel.setText( message );
+                       GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).grab(true, false).hint(
+                                                       convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH),
+                                                       SWT.DEFAULT).applyTo(messageLabel);
+                       messageLabel.addSelectionListener(new SelectionListener() {
+                               
+                               @Override
+                               public void widgetSelected(SelectionEvent e) {
+                                       PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(), SigningPreferencePage.PREFERENCE_PAGE_ID, new String[] { SigningPreferencePage.PREFERENCE_PAGE_ID }, null);
+                                       dialog.open();
+                               }
+                               
+                               @Override
+                               public void widgetDefaultSelected(SelectionEvent e) {
+                               }
+                       });
+               }
+               
+               return composite;
+       }
+       
+       /**
+        * Add an accessible listener to the label if it can be inferred from the
+        * image.
+        * 
+        * @param label
+        * @param image
+        */
+       private void addAccessibleListeners(Label label, final Image image) {
+               label.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+                       public void getName(AccessibleEvent event) {
+                               final String accessibleMessage = getAccessibleMessageFor(image);
+                               if (accessibleMessage == null) {
+                                       return;
+                               }
+                               event.result = accessibleMessage;
+                       }
+               });
+       }
+       
+       private String getAccessibleMessageFor(Image image) {
+               if (image.equals(getErrorImage())) {
+                       return JFaceResources.getString("error");//$NON-NLS-1$
+               }
+
+               if (image.equals(getWarningImage())) {
+                       return JFaceResources.getString("warning");//$NON-NLS-1$
+               }
+
+               if (image.equals(getInfoImage())) {
+                       return JFaceResources.getString("info");//$NON-NLS-1$
+               }
+
+               if (image.equals(getQuestionImage())) {
+                       return JFaceResources.getString("question"); //$NON-NLS-1$
+               }
+
+               return null;
+       }
+       
+       /*
+        * @see IconAndMessageDialog#createDialogAndButtonArea(Composite)
+        */
+       protected void createDialogAndButtonArea(Composite parent) {
+               super.createDialogAndButtonArea(parent);
+               if (this.dialogArea instanceof Composite) {
+                       // Create a label if there are no children to force a smaller layout
+                       Composite dialogComposite = (Composite) dialogArea;
+                       if (dialogComposite.getChildren().length == 0) {
+                               new Label(dialogComposite, SWT.NULL);
+                       }
+               }
+       }
+
+       /*
+        * (non-Javadoc)
+        * 
+        * @see org.eclipse.jface.dialogs.IconAndMessageDialog#getImage()
+        */
+       protected Image getImage() {
+               /*if (status != null) {
+                       if (status.getSeverity() == IStatus.WARNING) {
+                               return getWarningImage();
+                       }
+                       if (status.getSeverity() == IStatus.INFO) {
+                               return getInfoImage();
+                       }
+               }*/
+               // If it was not a warning or an error then return the error image
+               return getErrorImage();
+       }
+
+       /**
+        * Opens an error dialog to display the given error. Use this method if the
+        * error object being displayed does not contain child items, or if you wish
+        * to display all such items without filtering.
+        * 
+        * @param parent
+        *            the parent shell of the dialog, or <code>null</code> if none
+        * @param dialogTitle
+        *            the title to use for this dialog, or <code>null</code> to
+        *            indicate that the default title should be used
+        * @param message
+        *            the message to show in this dialog, or <code>null</code> to
+        *            indicate that the error's message should be shown as the
+        *            primary message
+        * @param status
+        *            the error to show to the user
+        * @return the code of the button that was pressed that resulted in this
+        *         dialog closing. This will be <code>Dialog.OK</code> if the OK
+        *         button was pressed, or <code>Dialog.CANCEL</code> if this
+        *         dialog's close window decoration or the ESC key was used.
+        */
+       public static int openError(Shell parent, String dialogTitle,
+                       String message, IStatus status) {
+               return openError(parent, dialogTitle, message, status, IStatus.OK
+                               | IStatus.INFO | IStatus.WARNING | IStatus.ERROR);
+       }
+
+       /**
+        * Opens an error dialog to display the given error. Use this method if the
+        * error object being displayed contains child items <it>and </it> you wish
+        * to specify a mask which will be used to filter the displaying of these
+        * children. The error dialog will only be displayed if there is at least
+        * one child status matching the mask.
+        * 
+        * @param parentShell
+        *            the parent shell of the dialog, or <code>null</code> if none
+        * @param title
+        *            the title to use for this dialog, or <code>null</code> to
+        *            indicate that the default title should be used
+        * @param message
+        *            the message to show in this dialog, or <code>null</code> to
+        *            indicate that the error's message should be shown as the
+        *            primary message
+        * @param status
+        *            the error to show to the user
+        * @param displayMask
+        *            the mask to use to filter the displaying of child items, as
+        *            per <code>IStatus.matches</code>
+        * @return the code of the button that was pressed that resulted in this
+        *         dialog closing. This will be <code>Dialog.OK</code> if the OK
+        *         button was pressed, or <code>Dialog.CANCEL</code> if this
+        *         dialog's close window decoration or the ESC key was used.
+        * @see org.eclipse.core.runtime.IStatus#matches(int)
+        */
+       public static int openError(Shell parentShell, String title,
+                       String message, IStatus status, int displayMask) {
+               ErrorDialog dialog = new ErrorDialog(parentShell, title, message,
+                               status, displayMask);
+               return dialog.open();
+       }
+
+       /**
+        * Returns whether the given status object should be displayed.
+        * 
+        * @param status
+        *            a status object
+        * @param mask
+        *            a mask as per <code>IStatus.matches</code>
+        * @return <code>true</code> if the given status should be displayed, and
+        *         <code>false</code> otherwise
+        * @see org.eclipse.core.runtime.IStatus#matches(int)
+        */
+       protected static boolean shouldDisplay(IStatus status, int mask) {
+               IStatus[] children = status.getChildren();
+               if (children == null || children.length == 0) {
+                       return status.matches(mask);
+               }
+               for (int i = 0; i < children.length; i++) {
+                       if (children[i].matches(mask)) {
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.Dialog#isResizable()
+     */
+    protected boolean isResizable() {
+       return true;
+    }
+
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/model/Certification.java b/org.tizen.common.sign/src/org/tizen/common/sign/model/Certification.java
new file mode 100644 (file)
index 0000000..ab69b49
--- /dev/null
@@ -0,0 +1,306 @@
+/*
+ * Web IDE - sign
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.sign.model;
+
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.Key;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivateKey;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.command.Prompter;
+import org.tizen.common.sign.exception.CertificationException;
+import org.tizen.common.sign.exception.ComplicatedCertificationException;
+import org.tizen.common.sign.preferences.UIMessages;
+import org.tizen.common.sign.preferences.SigningProfileItem;
+
+public class Certification {
+       
+       protected final Logger logger = LoggerFactory.getLogger( getClass() );
+       
+       public static enum KeyExtension {
+           p12( "PKCS12" ),
+           keystore( "JKS" );
+           
+           private String keyType;
+           
+           KeyExtension(String keyType) {
+               this.keyType = keyType;
+           }
+           
+           public String getKeyType() {
+               return this.keyType;
+           }
+           
+           public static boolean hasExtension( String extension ) {
+               for ( KeyExtension keyExt : KeyExtension.values() ) {
+                   if ( keyExt.name().equalsIgnoreCase( extension ) ) {
+                       return true;
+                   }
+               }
+               return false;
+           }
+       }
+
+       protected Prompter prompter;
+       
+       protected KeyStore keyStore;
+       
+       protected PrivateKey privateKey;
+
+       protected String privateKeyAlias;
+       
+       protected List<X509Certificate> certificationChain;
+
+       protected X509Certificate certificate;
+       
+       protected String password;
+       
+       public Certification(
+               final Prompter prompter
+       )
+       {
+               this.prompter = prompter; 
+       }
+       
+       protected Prompter getPrompter()
+       {
+               return this.prompter;
+       }
+       
+       protected char[] inputPassword( final String message )
+       {
+               final Prompter prompter = getPrompter();
+               return (char[]) prompter.password( message );
+       }
+
+       public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
+
+    public
+       boolean
+       load(
+               final SigningProfileItem profileItem
+       )
+       throws CertificationException
+       {
+               final String keyLocation = profileItem.getKeyLocation();
+               char[] password = profileItem.getPassword();
+               
+               if ( null == password || password.length == 0 )
+               {
+                       password = inputPassword( "Enter password for file" + keyLocation );
+                       
+                       if ( null == password  || password.length == 0 )
+                       {
+                               return false;
+                       }
+               }
+               
+               this.setPassword( new String( password ) );
+               /*
+               loadKeyStore( profileItem, password );
+               
+               try
+               {
+                       loadPrivateKey( password );
+               }
+               catch ( Exception e )
+               {
+                       if ( profileItem.isAuthor() )
+                       {
+                               throw new CertificationException( UIMessages.getString( "org.tizen.common.sign.authcertkeyerror" ), e );
+                       }
+                       else 
+                       {
+                               throw new CertificationException( UIMessages.getString( "org.tizen.common.sign.districertkeyerror" ), e );
+                       }
+               }
+               
+               try {
+                       loadCertificate( keyLocation );
+               } catch (Exception e) {
+                       if ( profileItem.isAuthor() )
+                       {
+                               throw new CertificationException( UIMessages.getString( "org.tizen.common.sign.authcerterror" ), e );
+                       }
+                       else 
+                       {
+                               throw new CertificationException( UIMessages.getString( "org.tizen.common.sign.districerterror" ), e );
+                       }
+               }
+               
+               loadCertificateChain();
+               */
+               return true;
+       }
+       protected
+       void
+       loadKeyStore(
+               SigningProfileItem item,
+//             final InputStream keyIn,
+               final char[] password
+       )
+       throws CertificationException
+       {
+               InputStream keyIn = null;
+               try
+               {
+                   keyIn = item.openKeyInputStream();
+                   
+                   IPath path = new Path( item.getKeyLocation() );
+                   String fileExtension = path.getFileExtension();
+                   
+                   for ( KeyExtension keyExtension : KeyExtension.values() ) {
+                       if ( keyExtension.name().equalsIgnoreCase( fileExtension ) ) {
+                           keyStore = KeyStore.getInstance( keyExtension.getKeyType() );
+                           keyStore.load( keyIn, password );
+                           return ;
+                       }
+                   }
+                       
+                   throw new KeyStoreException("couldn't find a matched key type.");
+               }
+               catch ( NoSuchAlgorithmException e )
+               {
+                       logger.error( "Error occured", e );
+               }
+               catch ( final CertificateException e )
+               {
+                       logger.error( "Error occured", e );
+               }
+               catch ( final IOException e )
+               {
+                       logger.error( "Error occured", e );
+               }
+               catch ( final KeyStoreException e )
+               {
+                       logger.error( "Error occured", e );
+               }
+               finally
+               {
+                       tryClose( keyIn );
+               }
+               
+               throw new CertificationException(
+                       UIMessages.getString( "org.tizen.common.sign.errorloadingkeystore")
+                       + " " + item.getKeyLocation() + ". "
+                       + UIMessages.getString( "org.tizen.common.sign.checkpassword" )
+               );
+       }
+       
+       protected void loadPrivateKey( char[] password ) {
+               try {
+                       java.util.Enumeration<String> alias = keyStore.aliases();
+                       while (alias.hasMoreElements()) {
+                               String aliasEntry = alias.nextElement();
+                               if ( keyStore.isKeyEntry( aliasEntry ) )
+                               {
+                                       privateKeyAlias = aliasEntry;
+                                       privateKey = (PrivateKey)keyStore.getKey( aliasEntry, password );
+                               }
+                       }
+               } catch (java.security.KeyStoreException e) {
+                       logger.error( "Error occured", e );
+               } catch (NoSuchAlgorithmException e) {
+                       logger.error( "Error occured", e );
+               } catch (java.security.UnrecoverableKeyException e) {
+                       logger.error( "Error occured", e );
+               }
+       }
+       
+       private void assertInvalidCertificate( X509Certificate interCertificate, String p12FileLocation ) throws ComplicatedCertificationException
+       {
+               Date notBefore = interCertificate.getNotBefore();
+               Date notAfter = interCertificate.getNotAfter();
+               Date date = new Date();
+               if (date.before(notBefore) || date.after(notAfter)) {
+                       String detailsText = UIMessages.getString( "org.tizen.common.sign.certificatevaliditymessage1") //$NON-NLS-1$
+                       + " " + p12FileLocation + " " + UIMessages.getString( "org.tizen.common.sign.certificatevaliditymessage2") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                       + " " + notBefore + " " + UIMessages.getString( "org.tizen.common.sign.certificatevaliditymessage3") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                       + " " + notAfter; //$NON-NLS-1$
+                       throw new ComplicatedCertificationException(detailsText);
+               } 
+       }
+
+
+       protected void loadCertificate( final String location ) throws KeyStoreException, ComplicatedCertificationException {
+               final Certificate cert = keyStore.getCertificate(privateKeyAlias);
+               if (cert instanceof X509Certificate) {
+                       // check expired
+                       assertInvalidCertificate( (X509Certificate) cert, location );
+                       certificate = (X509Certificate) cert;
+               }
+       }
+       
+       
+       protected void loadCertificateChain() throws CertificationException{
+               certificationChain = new ArrayList<X509Certificate>();
+               try {
+                       Certificate[] chain = keyStore.getCertificateChain( privateKeyAlias );
+                       if (chain != null && chain.length > 0) {
+                               for (int i = 0; i < chain.length; i++) {
+                                       if (chain[i] instanceof X509Certificate) {
+                                               certificationChain.add((X509Certificate) chain[i]);
+                                       }
+                               }
+                       }
+               } catch ( KeyStoreException e ) {
+                       throw new CertificationException( e.getMessage(), e );
+               }
+               
+       }
+
+
+       public Key getPrivateKey() {
+               return privateKey;
+       }
+
+       public X509Certificate[] getCertificationChain() {
+               return certificationChain.toArray( new X509Certificate[0] );
+       }
+
+
+
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/model/SignatureConstants.java b/org.tizen.common.sign/src/org/tizen/common/sign/model/SignatureConstants.java
new file mode 100755 (executable)
index 0000000..64f0468
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jihoon Song <jihoon80.song@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.sign.model;
+
+public interface SignatureConstants {
+    
+    String AUTHOR = "author";
+    String DISTRIBUTOR = "distributor";
+    String DISTRIBUTOR_1ST = DISTRIBUTOR + "1";
+    String DISTRIBUTOR_2ND = DISTRIBUTOR + "2";
+    
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/FileBrowserCellEditor.java b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/FileBrowserCellEditor.java
new file mode 100644 (file)
index 0000000..ae23a1d
--- /dev/null
@@ -0,0 +1,368 @@
+/*
+ * Web IDE - sign
+ * 
+ * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jihoon Song <jihoon80.song@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
+
+package org.tizen.common.sign.preferences;
+
+import org.eclipse.jface.viewers.DialogCellEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyAdapter;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.MouseAdapter;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Text;
+
+public class FileBrowserCellEditor extends DialogCellEditor {
+
+       private Text text;
+       
+       private boolean isSelection = false;
+       private boolean isDeleteable = false;
+       private boolean isSelectable = false;
+       private ModifyListener modifyListener;
+
+       private Button button;
+       
+       public FileBrowserCellEditor(Composite parent) {
+               super(parent, SWT.NONE);
+               doSetValue(""); //$NON-NLS-1$
+       }
+       
+       public FileBrowserCellEditor(Composite parent, boolean toModify) {
+               this(parent);
+       }
+
+       protected String[] getDialogFilter() {
+           // return new String[]{"*.p12;*.keystore", "*.p12", "*.keystore"}; // for Android KeyStore
+        return new String[]{"*.p12"};
+       }
+       
+       @Override
+       protected Object openDialogBox(Control cellEditorWindow) {
+               FileDialog dialog = new FileDialog(cellEditorWindow.getShell(), SWT.NONE );
+               dialog.setFilterExtensions( getDialogFilter() );
+               dialog.setText(Messages.FileBrowserCellEditor_2);
+               
+               Object value = getValue();
+        if (value != null) {
+                       dialog.setFileName((String) value);
+               }
+               String filePath = dialog.open();
+               return filePath;
+       }
+
+       protected Button createButton(Composite parent) {
+               Button result = new Button(parent, SWT.DOWN);
+               result.setText(".."); //$NON-NLS-1$
+               this.button = result;
+               return result;
+       }
+       
+    /**
+     * Creates the controls used to show the value of this cell editor.
+     * <p>
+     * The default implementation of this framework method creates
+     * a label widget, using the same font and background color as the parent control.
+     * </p>
+     * <p>
+     * Subclasses may reimplement.  If you reimplement this method, you
+     * should also reimplement <code>updateContents</code>.
+     * </p>
+     *
+     * @param cell the control for this cell editor 
+     * @return the underlying control
+     */
+    protected Control createContents(Composite cell) {
+       
+       text = new Text(cell, getStyle());
+        text.addSelectionListener(new SelectionAdapter() {
+            public void widgetDefaultSelected(SelectionEvent e) {
+                handleDefaultSelection(e);
+            }
+        });
+        text.addKeyListener(new KeyAdapter() {
+            // hook key pressed - see PR 14201  
+            public void keyPressed(KeyEvent e) {
+                keyReleaseOccured(e);
+
+                // as a result of processing the above call, clients may have
+                // disposed this cell editor
+                if ((getControl() == null) || getControl().isDisposed()) {
+                                       return;
+                               }
+                checkSelection(); // see explanation below
+                checkDeleteable();
+                checkSelectable();
+            }
+        });
+        text.addTraverseListener(new TraverseListener() {
+            public void keyTraversed(TraverseEvent e) {
+                if (e.detail == SWT.TRAVERSE_ESCAPE
+                        || e.detail == SWT.TRAVERSE_RETURN) {
+                    e.doit = false;
+                }
+            }
+        });
+        // We really want a selection listener but it is not supported so we
+        // use a key listener and a mouse listener to know when selection changes
+        // may have occurred
+        text.addMouseListener(new MouseAdapter() {
+            public void mouseUp(MouseEvent e) {
+                checkSelection();
+                checkDeleteable();
+                checkSelectable();
+            }
+        });
+        /*text.addFocusListener(new FocusAdapter() {
+            public void focusLost(FocusEvent e) {
+                FileBrowserCellEditor.this.focusLost();
+            }
+        });*/
+        text.setFont(cell.getFont());
+        text.setBackground(cell.getBackground());
+        text.addModifyListener(getModifyListener());
+       
+        return text;
+    }
+    
+    /**
+     * Return the modify listener.
+     */
+    private ModifyListener getModifyListener() {
+        if (modifyListener == null) {
+            modifyListener = new ModifyListener() {
+                public void modifyText(ModifyEvent e) {
+                    editOccured(e);
+                }
+            };
+        }
+        return modifyListener;
+    }
+    
+    /**
+     * Processes a modify event that occurred in this text cell editor.
+     * This framework method performs validation and sets the error message
+     * accordingly, and then reports a change via <code>fireEditorValueChanged</code>.
+     * Subclasses should call this method at appropriate times. Subclasses
+     * may extend or reimplement.
+     *
+     * @param e the SWT modify event
+     */
+    protected void editOccured(ModifyEvent e) {
+       String value = text.getText();
+       if (value == null) {
+               value = "";//$NON-NLS-1$
+       }
+       Object typedValue = value;
+
+       boolean oldValidState = isValueValid();
+       boolean newValidState = isCorrect(typedValue);
+
+       valueChanged(oldValidState, newValidState);
+
+    }
+    
+    /**
+     * Checks to see if the selection state (selection /
+     * no selection) has changed and if so fire an
+     * enablement changed notification.
+     */
+    private void checkSelection() {
+        boolean oldIsSelection = isSelection;
+        isSelection = text.getSelectionCount() > 0;
+        if (oldIsSelection != isSelection) {
+            fireEnablementChanged(COPY);
+            fireEnablementChanged(CUT);
+        }
+    }
+    
+    /**
+     * Checks to see if the "deletable" state (can delete/
+     * nothing to delete) has changed and if so fire an
+     * enablement changed notification.
+     */
+    private void checkDeleteable() {
+        boolean oldIsDeleteable = isDeleteable;
+        isDeleteable = isDeleteEnabled();
+        if (oldIsDeleteable != isDeleteable) {
+            fireEnablementChanged(DELETE);
+        }
+    }
+    
+    /**
+     * Checks to see if the "selectable" state (can select)
+     * has changed and if so fire an enablement changed notification.
+     */
+    private void checkSelectable() {
+        boolean oldIsSelectable = isSelectable;
+        isSelectable = isSelectAllEnabled();
+        if (oldIsSelectable != isSelectable) {
+            fireEnablementChanged(SELECT_ALL);
+        }
+    }
+
+    
+    /**
+     * Handles a default selection event from the text control by applying the editor
+     * value and deactivating this cell editor.
+     * 
+     * @param event the selection event
+     * 
+     * @since 3.0
+     */
+    protected void handleDefaultSelection(SelectionEvent event) {
+        // same with enter-key handling code in keyReleaseOccured(e);
+        fireApplyEditorValue();
+        deactivate();
+    }
+    
+    /**
+     * Updates the controls showing the value of this cell editor.
+     * <p>
+     * 
+     * The default implementation of this framework method just converts
+     * the passed object to a string using <code>toString</code> and
+     * sets this as the text of the label widget.
+     * </p>
+     * <p>
+     * Subclasses may reimplement.  If you reimplement this method, you
+     * should also reimplement <code>createContents</code>.
+     * </p>
+     *
+     * @param value the new value of this cell editor
+     */
+    protected void updateContents(Object value) {
+        if (text == null) {
+                       return;
+               }
+
+        String text = "";//$NON-NLS-1$
+        if (value != null) {
+                       text = value.toString();
+               }
+
+        this.text.setText(text);
+    }
+    
+    /** The <code>TextCellEditor</code> implementation of
+    * this <code>CellEditor</code> framework method accepts
+    * a text string (type <code>String</code>).
+    *
+    * @param value a text string (type <code>String</code>)
+    */
+   protected void doSetValue(Object value) {
+     //  Assert.isTrue(text != null && (value instanceof String));
+       text.removeModifyListener(getModifyListener());
+       if(value == null){
+          value = ""; //$NON-NLS-1$
+       }
+       text.setText((String) value);
+       text.addModifyListener(getModifyListener());
+       super.doSetValue(value);
+   }
+       
+    /* (non-Javadoc)
+     * Method declared on CellEditor.
+     */
+    protected void doSetFocus() {
+       if (text != null) {
+               text.selectAll();
+               text.setFocus();
+               checkSelection();
+               checkDeleteable();
+               checkSelectable();
+       }
+       button.setFocus();
+//     super.doSetFocus();
+    }
+    
+    /**
+     * Processes a key release event that occurred in this cell editor.
+     * <p>
+     * The <code>TextCellEditor</code> implementation of this framework method 
+     * ignores when the RETURN key is pressed since this is handled in 
+     * <code>handleDefaultSelection</code>.
+     * An exception is made for Ctrl+Enter for multi-line texts, since
+     * a default selection event is not sent in this case. 
+     * </p>
+     *
+     * @param keyEvent the key event
+     */
+    protected void keyReleaseOccured(KeyEvent keyEvent) {
+        if (keyEvent.character == '\r') { // Return key
+            // Enter is handled in handleDefaultSelection.
+            // Do not apply the editor value in response to an Enter key event
+            // since this can be received from the IME when the intent is -not-
+            // to apply the value.  
+            // See bug 39074 [CellEditors] [DBCS] canna input mode fires bogus event from Text Control
+            //
+            // An exception is made for Ctrl+Enter for multi-line texts, since
+            // a default selection event is not sent in this case. 
+            if (text != null && !text.isDisposed()
+                    && (text.getStyle() & SWT.MULTI) != 0) {
+                if ((keyEvent.stateMask & SWT.CTRL) != 0) {
+                    super.keyReleaseOccured(keyEvent);
+                }
+            }
+            return;
+        }
+        super.keyReleaseOccured(keyEvent);
+    }
+    
+    /**
+     * The <code>TextCellEditor</code> implementation of
+     * this <code>CellEditor</code> framework method returns
+     * the text string.
+     *
+     * @return the text string
+     */
+    protected Object doGetValue() {
+        return text.getText();
+    }
+    
+    /**
+     * The <code>TextCellEditor</code>  implementation of this 
+     * <code>CellEditor</code> method returns <code>true</code>
+     * if there is a selection or if the caret is not positioned 
+     * at the end of the text.
+     */
+    public boolean isDeleteEnabled() {
+        if (text == null || text.isDisposed()) {
+                       return false;
+               }
+        return text.getSelectionCount() > 0
+                || text.getCaretPosition() < text.getCharCount();
+    }
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/Messages.java b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/Messages.java
new file mode 100644 (file)
index 0000000..7b4c58f
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Web IDE - sign
+ * 
+ * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jihoon Song <jihoon80.song@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
+
+package org.tizen.common.sign.preferences;
+
+import org.eclipse.osgi.util.NLS;
+
+public class
+Messages
+extends NLS
+{
+       private static final String BUNDLE_NAME = Messages.class.getName();
+       
+       public static String ELEMENT_NOT_FOUND;
+       
+       public static String AUTOINSERT_BTN;
+       
+       
+       // Profile Items
+       public static String PROFILES_COLUMN1;
+       public static String PROFILES_COLUMN2;
+       public static String PROFILES_COLUMN3;
+       public static String PROFILES_COLUMN4;
+       
+       public static String PROFILES_ADD_BTN;
+       public static String PROFILES_ADD_TOOLTIP;
+       
+       public static String PROFILES_REMOVE_BTN;
+       public static String PROFILES_REMOVE_TOOLTIP;
+       
+       public static String PROFILES_SETACTIVE_BTN;
+       public static String PROFILES_SETACTIVE_TOOLTIP;
+       
+       public static String NOTE_LABEL;
+       public static String NOTE_DESC;
+       
+       
+       public static String ERROR_DIALOG_TITLE;
+       public static String ERROR_DIALOG_NOT_SELECTED;
+       
+       public static String FileBrowserCellEditor_2;
+       
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+       }
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/Messages.properties b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/Messages.properties
new file mode 100644 (file)
index 0000000..8737002
--- /dev/null
@@ -0,0 +1,23 @@
+ELEMENT_NOT_FOUND=element not found
+AUTOINSERT_BTN=Insert signature at launching
+
+PROFILES_COLUMN1=Certificate path
+PROFILES_COLUMN2=Pass
+PROFILES_COLUMN3=CA path(Optional)
+PROFILES_COLUMN4=Root CA path(Optional)
+PROFILES_ADD_BTN=Add
+PROFILES_ADD_TOOLTIP=Add Profile
+
+PROFILES_REMOVE_BTN=Remove
+PROFILES_REMOVE_TOOLTIP=Remove Profile
+
+NOTE_LABEL=Note:
+NOTE_DESC=(The following format characters are supported in identifier string\n%a:Author, %f:Fingerprint, %w:Widget, %h:Hash, %t:Time)
+
+PROFILES_SETACTIVE_BTN=Set Active
+PROFILES_SETACTIVE_TOOLTIP=Set Active Profile
+
+ERROR_DIALOG_TITLE=Profile does not exist
+ERROR_DIALOG_NOT_SELECTED=Select a profile first
+
+FileBrowserCellEditor_2=Select a certificate file
\ No newline at end of file
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/ProfileCellModifier.java b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/ProfileCellModifier.java
new file mode 100644 (file)
index 0000000..0c0a9ee
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * Web IDE - sign
+ * 
+ * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jihoon Song <jihoon80.song@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
+
+package org.tizen.common.sign.preferences;
+
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.swt.widgets.TableItem;
+import org.tizen.common.sign.util.SigningProfileUtil;
+
+public class ProfileCellModifier implements ICellModifier {
+
+       private TableViewer viewer;
+       private SigningPreferencePage page;
+       
+
+       public ProfileCellModifier(TableViewer viewer, SigningPreferencePage signingPreferencePage) {
+               this.viewer = viewer;
+               this.page = signingPreferencePage;
+       }
+       
+       @Override
+       public boolean canModify(Object element, String property) {
+               return true;
+       }
+
+       @Override
+       public Object getValue(Object element, String property) {
+               
+               if (element instanceof SigningProfileItem) {
+                       if (property.equals(SigningProfileUtil.ITEM_ATTR_PASS)) {
+                               return ((SigningProfileItem)element).getPassword();
+                       } else if (property.equals(SigningProfileUtil.ITEM_ATTR_KEY)) {
+                               return ((SigningProfileItem)element).getKeyLocation();
+                       }
+                       else if (property.equals(SigningProfileUtil.ITEM_ATTR_CA)) {
+                return ((SigningProfileItem)element).getCAPath();
+            }
+                       else if (property.equals(SigningProfileUtil.ITEM_ATTR_ROOTCA)) {
+                return ((SigningProfileItem)element).getRootCAPath();
+            }
+               }
+               return null;
+       }
+
+       @Override
+       public void modify(Object element, String property, Object value) {
+               if (element instanceof TableItem) {
+                       Object data = ((TableItem)element).getData();
+                       SigningProfileItem profileItem = (SigningProfileItem)data;
+                       String _value = (String) value;
+                       if (data instanceof SigningProfileItem) {
+                               if (property.equals(SigningProfileUtil.ITEM_ATTR_PASS)) {
+                                   profileItem.setPassword(_value.toCharArray());
+                               }
+                               else if (property.equals(SigningProfileUtil.ITEM_ATTR_KEY)) {
+                                       profileItem.setKeyLocation(_value);
+                               }
+                               else if(property.equals(SigningProfileUtil.ITEM_ATTR_CA)) {
+                                   profileItem.setCAPath(_value);
+                               }
+                               else if(property.equals(SigningProfileUtil.ITEM_ATTR_ROOTCA)) {
+                                   profileItem.setRootCAPath(_value);
+                               }
+                       }
+               viewer.update(data, null);
+               page.validatePreferencePage();
+               }
+       }
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/ProfileItemContentProvider.java b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/ProfileItemContentProvider.java
new file mode 100644 (file)
index 0000000..40251b8
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Web IDE - sign
+ * 
+ * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jihoon Song <jihoon80.song@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
+
+package org.tizen.common.sign.preferences;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+public class ProfileItemContentProvider implements IStructuredContentProvider {
+       
+       @Override
+       public Object[] getElements(Object inputElement) {
+               if (inputElement instanceof SigningProfile) {
+                       List<SigningProfileItem> profileItemList = ((SigningProfile)inputElement).getProfileItemList();
+                       return profileItemList.toArray();
+               }
+               return null;
+       }
+
+       @Override
+       public void dispose() {
+       }
+
+       @Override
+       public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+       }
+
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/ProfileItemLabelProvider.java b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/ProfileItemLabelProvider.java
new file mode 100644 (file)
index 0000000..b8e545b
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Web IDE - sign
+ * 
+ * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jihoon Song <jihoon80.song@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
+
+package org.tizen.common.sign.preferences;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+public class
+ProfileItemLabelProvider
+extends LabelProvider
+implements ITableLabelProvider
+{
+
+       @Override
+       public Image getColumnImage(Object element, int columnIndex) {
+               return null;
+       }
+
+       @Override
+       public String getColumnText(Object element, int columnIndex) {
+               if (columnIndex == 0) {
+                       if (element instanceof SigningProfileItem) {
+                               return ((SigningProfileItem)element).getKeyLocation();
+                       }
+               } else if (columnIndex == 1) {
+                       if (element instanceof SigningProfileItem) {
+                           char[] identifier = ((SigningProfileItem)element).getPassword();
+                           if(identifier == null) {
+                               return null;
+                           }
+                           int passLength = identifier.length;
+                           StringBuffer result = new StringBuffer();
+                           for(int i=0; i<passLength; i++) {
+                               result.append("*");
+                           }
+                               return result.toString();
+                       }
+               }  else if (columnIndex == 2) {
+                   if(element instanceof SigningProfileItem) {
+                       return ((SigningProfileItem)element).getCAPath();
+                   }
+               } else if(columnIndex == 3) {
+            if(element instanceof SigningProfileItem) {
+                return ((SigningProfileItem)element).getRootCAPath();
+            }              
+               }
+               return Messages.ELEMENT_NOT_FOUND;
+       }
+}
+
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningPreferencePage.java b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningPreferencePage.java
new file mode 100755 (executable)
index 0000000..a345121
--- /dev/null
@@ -0,0 +1,1019 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jihoon Song <jihoon80.song@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.sign.preferences;
+
+import static org.tizen.common.util.StringUtil.EMPTY_STRING;
+import static org.tizen.common.util.StringUtil.isEmpty;
+import static org.tizen.common.util.StringUtil.trim;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.IFontProvider;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ControlAdapter;
+import org.eclipse.swt.events.ControlEvent;
+import org.eclipse.swt.events.ControlListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.ScrollBar;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.tizen.common.sign.Activator;
+import org.tizen.common.sign.model.Certification.KeyExtension;
+import org.tizen.common.sign.util.SigningProfileUtil;
+import org.tizen.common.util.FileUtil;
+
+public class SigningPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+    public static final String PREFERENCE_PAGE_ID = "org.tizen.common.sign.preferences.SigningPreferencePage"; //$NON-NLS-1$
+    List<SigningProfile> profileList;
+    private TableViewer authorTableViewer;
+    private TableViewer distributorTableViewer;
+    private TableViewer listViewer;
+    public static String defaultProfileKey = "defaultprofile"; //$NON-NLS-1$
+    public String defaultProfileString;
+    private Button addButton, removeButton;
+    private Button clearButton;
+    private Button distClearButton;
+
+    public static String testCertKey = "testCert"; //$NON-NLS-1$
+    private Button testCertButton;
+
+    private IPreferenceStore preferenceStore;
+    
+    public SigningPreferencePage() {
+       preferenceStore = Activator.getDefault().getPreferenceStore();
+       profileList = new ArrayList<SigningProfile>();
+    }
+
+    @Override
+    protected Control createContents(Composite parent) {
+        initializeDialogUnits(parent);
+        List<SigningProfile> _profileList = SigningProfileUtil.populateProfiles();
+        if(_profileList != null) {
+            profileList = _profileList;
+        }
+        Composite composite = new Composite(parent, SWT.NONE);
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 1;
+        layout.marginWidth = 0;
+        layout.marginHeight = 0;
+        composite.setLayout(layout);
+        composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+        createTestCertButton(composite);
+        createProfileListButtons(composite);
+        createProfileItemsTable(composite);
+        return parent;
+    }
+
+    @Override
+    public void createControl(Composite parent) {
+        super.createControl(parent);
+        Button defaultButton = getDefaultsButton();
+        if (defaultButton != null) {
+            defaultButton.setVisible(false);
+        }
+    }
+    
+    @Override
+    protected void contributeButtons(Composite parent) {
+        GridLayout layout = createGridLayout(3);
+        layout.makeColumnsEqualWidth = false;
+        parent.setLayout(layout);
+        GridData parentData = new GridData(GridData.FILL_BOTH);
+        parentData.grabExcessVerticalSpace = false;
+        parent.setLayoutData(parentData);
+        
+        Composite labelComposite = new Composite(parent, SWT.NONE);
+        GridLayout compLayout = new GridLayout();
+        compLayout.numColumns = 2;
+        
+        labelComposite.setLayout(compLayout);
+        GridData compData = new GridData(GridData.FILL_HORIZONTAL);
+        labelComposite.setLayoutData(compData);
+        
+//        final Label noteLabel = new Label(labelComposite, SWT.NONE);
+//        noteLabel.setText( Messages.NOTE_LABEL );
+//        noteLabel.setFont( new Font( getDisplay(), boldFont( noteLabel.getParent().getFont() ) ) );
+//        GridData noteData = new GridData();
+//        noteData.verticalAlignment = SWT.TOP;
+//        noteLabel.setLayoutData( noteData );
+        
+//        Label label = new Label(labelComposite, SWT.WRAP);
+//        Font smallFont = new Font(Display.getDefault(), smallFont(label.getParent().getFont()));
+//        label.setFont(smallFont);
+//        label.setText( Messages.NOTE_DESC );
+    }
+
+    private void createTestCertButton(Composite composite) {
+        this.testCertButton = new Button(composite, SWT.LEFT | SWT.CHECK);
+        this.testCertButton.setText( Messages.AUTOINSERT_BTN );
+        
+        // get preference value
+        //FIXME make default value false release a4 RC1
+       preferenceStore.setDefault( testCertKey, false );
+               testCertButton.setSelection(preferenceStore.getBoolean(testCertKey));
+               
+        this.testCertButton.addSelectionListener(new SelectionAdapter() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               preferenceStore.setValue(testCertKey, testCertButton.getSelection());
+                       }
+        });
+
+        GridData gridData = new GridData();
+        gridData.horizontalAlignment = GridData.FILL;
+        this.testCertButton.setLayoutData(gridData);
+        this.testCertButton.setFont( composite.getFont() );
+    }
+    
+    private void createProfileItemButtons(Composite composite) {
+        
+        //Add clear button
+        distClearButton = new Button(composite, SWT.NONE);
+        distClearButton.setText(UIMessages.getString("org.tizen.common.sign.profileitem.clear")); //$NON-NLS-1$
+        distClearButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        distClearButton.setEnabled(false);
+        distClearButton.addSelectionListener(new SelectionListener() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                Object distItem = distributorTableViewer.getElementAt(0);
+                if (distItem != null && distItem instanceof SigningProfileItem) {
+                    SigningProfileItem item = (SigningProfileItem)distItem;
+                    item.setIdentifier(EMPTY_STRING); //$NON-NLS-1$
+                    item.setKeyLocation(EMPTY_STRING); //$NON-NLS-1$
+                    item.setCAPath(EMPTY_STRING);
+                    item.setRootCAPath(EMPTY_STRING);
+                    item.setPassword(EMPTY_STRING.toCharArray());
+                    distributorTableViewer.refresh(true);
+                    validatePreferencePage();
+                } 
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        });
+        
+        //Add profile item button
+//        addButton = new Button(composite, SWT.NONE);
+//        addButton.setText( Messages.PROFILES_ADD_BTN );
+//        addButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+//        addButton.addSelectionListener(new SelectionListener() {
+//            @Override
+//            public void widgetSelected(SelectionEvent e) {
+//             final IStructuredSelection ss = (IStructuredSelection) listViewer.getSelection();
+//                if ( ss.isEmpty() )
+//                {
+//                     MessageDialog.openError( getActiveShell(), Messages.ERROR_DIALOG_TITLE, Messages.ERROR_DIALOG_NOT_SELECTED );
+//                     return ;
+//                }
+//                SigningProfileItem profileItem = new SigningProfileItem();
+//                profileItem.setAuthor(false);
+//                profileItem.setIdentifier("%a:%f:%w:%h:%t"); //$NON-NLS-1$
+//                profileItem.setKeyLocation(""); //$NON-NLS-1$
+//                Object input = distributorTableViewer.getInput();
+//                if (input instanceof SigningProfile) {
+//                     SigningProfile profile = (SigningProfile) input;
+//                     profile.addProfileItem(profileItem);
+//                     validatePreferencePage();
+//                }
+//                distributorTableViewer.add(profileItem);
+//            }
+//
+//            @Override
+//            public void widgetDefaultSelected(SelectionEvent e) {
+//            }
+//        });
+//        addButton.setEnabled(false);
+//        
+//        //remove profile item button
+//        removeButton = new Button(composite, SWT.NONE);
+//        removeButton.setText( Messages.PROFILES_REMOVE_BTN );
+//        removeButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+//        removeButton.addSelectionListener(new SelectionListener() {
+//            @Override
+//            public void widgetSelected(SelectionEvent e) {
+//                ISelection selection = distributorTableViewer.getSelection();
+//                if (selection instanceof IStructuredSelection) {
+//                    IStructuredSelection strSelection = (IStructuredSelection) selection;
+//                    Object selelement = strSelection.getFirstElement();
+//                    if (selelement instanceof SigningProfileItem) {
+//                        SigningProfileItem item = (SigningProfileItem) selelement;
+//                        distributorTableViewer.remove(item);
+//                        Object input = distributorTableViewer.getInput();
+//                        if (input instanceof SigningProfile) {
+//                            SigningProfile profile = (SigningProfile) input;
+//                            profile.removeProfileItem(item);
+//                            validatePreferencePage();
+//                        }
+//                    }
+//                }
+//            }
+//
+//            @Override
+//            public void widgetDefaultSelected(SelectionEvent e) {
+//            }
+//        });
+//        removeButton.setEnabled(false);
+    }
+
+    private void createProfileItemsTable(Composite composite) {
+        
+        Group profileItemComosite = new Group(composite, SWT.NONE);
+        profileItemComosite.setText(UIMessages.getString("org.tizen.common.sign.profileitemgrouptitle")); //$NON-NLS-1$
+        GridLayout profileItemLayout = new GridLayout();
+        profileItemLayout.numColumns = 1;
+        profileItemLayout.horizontalSpacing = 4;
+        profileItemComosite.setLayout(profileItemLayout);
+        GridData profileData = new GridData(GridData.FILL_BOTH);
+        profileItemComosite.setLayoutData(profileData);    
+        createAuthorSignatureComp(profileItemComosite);
+        createDistributorSignatureComp(profileItemComosite);
+    }
+    
+    private GridLayout createGridLayout(int numColumns) {
+        GridLayout layout = new GridLayout();
+        layout.numColumns = numColumns;
+        layout.marginHeight = 0;
+        layout.marginWidth = 0;
+        return layout;
+    }
+
+    private void createDistributorSignatureComp(Group profileItemComosite) {
+        Composite distributorComposite = new Composite(profileItemComosite, SWT.NONE);
+        distributorComposite.setLayout(createGridLayout(1));
+        distributorComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        
+        Label distributorLabel = new Label(distributorComposite, SWT.NONE);
+        distributorLabel.setText(UIMessages.getString("org.tizen.common.sign.distrisigtitle")); //$NON-NLS-1$
+        
+        final Composite composite = new Composite(distributorComposite, SWT.NONE);
+        composite.setLayout(createGridLayout(2));
+        composite.setLayoutData(new GridData(GridData.FILL_BOTH));
+    
+        final Composite profileItemTableComposite = new Composite(composite, SWT.NONE);
+        profileItemTableComposite.setLayout(createGridLayout(1));
+        profileItemTableComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+        final Table table = new Table(profileItemTableComposite, SWT.BORDER | SWT.FULL_SELECTION);
+        GridLayout layout = new GridLayout();
+        table.setLayout(layout);
+        table.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        
+        table.setHeaderVisible(true);
+        table.setLinesVisible(true);
+
+        final TableColumn column0 = new TableColumn(table, SWT.NONE, 0);
+        column0.setText( Messages.PROFILES_COLUMN1 ); //$NON-NLS-1$
+        column0.pack();
+
+        final TableColumn column1 = new TableColumn(table, SWT.NONE, 1);
+        column1.setText( Messages.PROFILES_COLUMN2 ); //$NON-NLS-1$
+        column1.pack();
+        
+        final TableColumn column2 = new TableColumn(table, SWT.NONE, 2);
+        column2.setText( Messages.PROFILES_COLUMN3 ); //$NON-NLS-1$
+        column2.pack();
+        
+        final TableColumn column3 = new TableColumn(table, SWT.NONE, 3);
+        column3.setText( Messages.PROFILES_COLUMN4 ); //$NON-NLS-1$
+        column3.pack();
+        
+        final CellEditor[] editors = new CellEditor[4];
+        editors[0] = new FileBrowserCellEditor(table);
+        editors[1] = new PasswordTextCellEditor(table);
+        editors[2] = new FileBrowserCellEditor(table) {
+            @Override
+            protected String[] getDialogFilter() {
+                return new String[]{"*.cer"};
+            }
+        };
+        editors[3] = new FileBrowserCellEditor(table) {
+            @Override
+            protected String[] getDialogFilter() {
+                return new String[]{"*.cer"};
+            }
+        };
+
+        distributorTableViewer = new TableViewer(table);
+        distributorTableViewer.setColumnProperties(new String[] { SigningProfileUtil.ITEM_ATTR_KEY, SigningProfileUtil.ITEM_ATTR_PASS, SigningProfileUtil.ITEM_ATTR_CA, SigningProfileUtil.ITEM_ATTR_ROOTCA });
+        distributorTableViewer.setCellEditors(editors);
+        distributorTableViewer.setCellModifier(new ProfileCellModifier(distributorTableViewer, this));
+        distributorTableViewer.setContentProvider(new ProfileItemContentProvider());
+        distributorTableViewer.setLabelProvider(new ProfileItemLabelProvider());
+        table.setEnabled(false);
+        
+        profileItemTableComposite.addControlListener(new ControlAdapter() {
+            public void controlResized(ControlEvent e) {
+                Rectangle area = profileItemTableComposite.getClientArea();
+                Point size = table.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+                ScrollBar vBar = table.getVerticalBar();
+                
+                int width = area.width  - vBar.getSize().x;
+                if (size.y > area.height + table.getHeaderHeight()) {
+                    Point vBarSize = vBar.getSize();
+                    width -= vBarSize.x;
+                }
+                Point oldSize = table.getSize();
+                int locWidth = (int)(width* .3);
+                int passWidth = width - (locWidth*3);
+                if (oldSize.x > area.width) {
+                    column0.setWidth(locWidth);
+                    column1.setWidth(passWidth);
+                    column2.setWidth(locWidth);
+                    column3.setWidth(locWidth);
+                    table.setSize(area.width, area.height);
+                } else {
+                    table.setSize(area.width, area.height);
+                    column0.setWidth(locWidth);
+                    column1.setWidth(passWidth);
+                    column2.setWidth(locWidth);
+                    column3.setWidth(locWidth);
+                }
+            }
+        });
+        
+        final Composite profileItemButtonComposite = new Composite(composite, SWT.NONE);
+        GridLayout profileItemButtonLayout = new GridLayout();
+        profileItemButtonLayout.numColumns = 1;
+        profileItemButtonLayout.marginWidth = 0;
+        profileItemButtonComposite.setLayout(profileItemButtonLayout);
+        GridData data = new GridData();
+        data.verticalAlignment = SWT.TOP;
+        profileItemButtonComposite.setLayoutData(data);
+        createProfileItemButtons(profileItemButtonComposite);
+        String defaultProfile = preferenceStore.getString(defaultProfileKey);
+        if (defaultProfile != null) {
+            for (SigningProfile profile : profileList) {
+                if (defaultProfile.equals(profile.getProfileName())) {
+                    if (addButton != null) {
+                        addButton.setEnabled(true);
+                    }
+                    if (removeButton != null) {
+                        removeButton.setEnabled(true);
+                    }
+                    if (clearButton != null) {
+                        clearButton.setEnabled(true);
+                    }
+                    if (distClearButton != null) {
+                        distClearButton.setEnabled(true);
+                    }
+                    distributorTableViewer.getTable().setEnabled(true);
+                    distributorTableViewer.setInput(profile);
+                    authorTableViewer.getTable().setEnabled(true);
+                    authorTableViewer.setInput(profile);
+                }
+            }
+        }
+        
+        if(distributorTableViewer.getTable().getItemCount() == 0) {
+            distributorTableViewer.add(new SigningProfileItem());
+        }
+        composite.addControlListener(new ControlListenerImpl(composite, profileItemTableComposite, profileItemButtonComposite));
+    }
+
+    private void createAuthorSignatureComp(final Group profileItemComosite) {
+        
+        //Create author signature group
+        Composite authorComposite = new Composite(profileItemComosite, SWT.NONE);
+        authorComposite.setLayout(createGridLayout(1));
+        authorComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        Label authorLabel = new Label(authorComposite, SWT.NONE);
+        authorLabel.setText(UIMessages.getString("org.tizen.common.sign.authorsigtitle")); //$NON-NLS-1$
+
+        final Composite composite = new Composite(authorComposite, SWT.NONE);
+        composite.setLayout(createGridLayout(2));
+        GridData data = new GridData(GridData.FILL_BOTH);
+        composite.setLayoutData(data);
+
+        final Composite authorItemTableComposite = new Composite(composite, SWT.NONE);
+        authorItemTableComposite.setLayout(createGridLayout(1));
+        GridData authorTableData = new GridData(GridData.FILL_BOTH);
+        authorItemTableComposite.setLayoutData(authorTableData);
+
+        final Table table = new Table(authorItemTableComposite, SWT.BORDER | SWT.FULL_SELECTION | SWT.NO_SCROLL);
+        GridLayout layout = new GridLayout();
+        table.setLayout(layout);
+        GridData tableData = new GridData(GridData.FILL_HORIZONTAL);
+        tableData.grabExcessVerticalSpace = false;
+        table.setLayoutData(tableData);
+        table.setHeaderVisible(true);
+        table.setLinesVisible(true);
+        
+        final TableColumn column0 = new TableColumn(table, SWT.NONE, 0);
+        column0.setText( Messages.PROFILES_COLUMN1 ); //$NON-NLS-1$
+        column0.pack();
+
+        final TableColumn column1 = new TableColumn(table, SWT.NONE, 1);
+        column1.setText( Messages.PROFILES_COLUMN2 ); //$NON-NLS-1$
+        column1.pack();
+        
+        final CellEditor[] editors = new CellEditor[2];
+        editors[0] = new FileBrowserCellEditor(table);
+        editors[1] = new PasswordTextCellEditor(table);
+
+        authorTableViewer = new TableViewer(table);
+        authorTableViewer.setColumnProperties(new String[] { SigningProfileUtil.ITEM_ATTR_KEY, SigningProfileUtil.ITEM_ATTR_PASS});
+        authorTableViewer.setCellEditors(editors);
+        authorTableViewer.setCellModifier(new ProfileCellModifier(authorTableViewer, this));
+        authorTableViewer.getTable().setEnabled(false);
+        authorTableViewer.setContentProvider(new IStructuredContentProvider() {
+            @Override
+            public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+            }
+
+            @Override
+            public void dispose() {
+            }
+
+            @Override
+            public Object[] getElements(Object inputElement) {
+                if (inputElement instanceof SigningProfile) {
+                    SigningProfile profile = (SigningProfile)inputElement;
+                    if (profile.getAuthorItem() != null) {
+                        return new SigningProfileItem[] {((SigningProfile)inputElement).getAuthorItem()};
+                    }
+                } 
+                return null;
+            }
+        });
+        authorTableViewer.setLabelProvider(new ProfileItemLabelProvider());
+        authorTableViewer.add(new SigningProfileItem());
+
+        authorItemTableComposite.addControlListener(new ControlAdapter() {
+            public void controlResized(ControlEvent e) {
+                Rectangle area = authorItemTableComposite.getClientArea();
+            
+                Point size = table.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+                int width = area.width - 15;
+                if (size.y > area.height + table.getHeaderHeight()) {
+                    width -= 15;
+                }
+                Point oldSize = table.getSize();
+                if (oldSize.x > area.width) {
+                    column0.setWidth((int) (width * .75));
+                    column1.setWidth(width - column0.getWidth());
+                    table.setSize(area.width, area.height);
+                } else {
+                    table.setSize(area.width, area.height);
+                    column0.setWidth((int) (width * .75));
+                    column1.setWidth(width - column0.getWidth());
+                }
+            }
+        });
+        
+        final Composite authorItemButtonComposite = new Composite(composite, SWT.NONE);
+        GridData clearButtonData = new GridData();
+        clearButtonData.verticalAlignment = SWT.TOP;
+        authorItemButtonComposite.setLayout(createGridLayout(1));
+        authorItemButtonComposite.setLayoutData(clearButtonData);
+
+        clearButton = new Button(authorItemButtonComposite, SWT.NONE);
+        clearButton.setText(UIMessages.getString("org.tizen.common.sign.profileitem.clear")); //$NON-NLS-1$
+        clearButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+        clearButton.setEnabled(false);
+        clearButton.addSelectionListener(new SelectionListener() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                Object authorItem = authorTableViewer.getElementAt(0);
+                if (authorItem != null && authorItem instanceof SigningProfileItem) {
+                    SigningProfileItem item = (SigningProfileItem)authorItem;
+                    item.setPassword(EMPTY_STRING.toCharArray()); //$NON-NLS-1$
+                    item.setKeyLocation(""); //$NON-NLS-1$
+                    authorTableViewer.refresh(true);
+                    validatePreferencePage();
+                } 
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        });
+
+        composite.addControlListener(new ControlListenerImpl(composite, authorItemTableComposite, authorItemButtonComposite));
+    }
+
+    private void createProfileListButtons(Composite composite) {
+        
+        final Group profileComposite = new Group(composite, SWT.NONE);
+        profileComposite.setText(UIMessages.getString("org.tizen.common.sign.profilegrouptitle")); //$NON-NLS-1$
+        GridLayout profileLayout = new GridLayout();
+        profileLayout.numColumns = 2;
+        profileLayout.makeColumnsEqualWidth = false;    
+        profileComposite.setLayout(profileLayout);
+        GridData profileData = new GridData(GridData.FILL_BOTH);
+        profileComposite.setLayoutData(profileData);
+    
+        final Composite profileListComposite = new Composite(profileComposite, SWT.NONE);
+        GridLayout profileListLayout = new GridLayout();
+        profileListLayout.numColumns = 1;
+        profileListLayout.marginWidth = 0;
+        profileListLayout.marginHeight = 3;
+        profileListComposite.setLayout(profileListLayout);    
+        GridData listCompositeData = new GridData(GridData.FILL_BOTH);
+        profileListComposite.setLayoutData(listCompositeData);
+        
+        final Composite profileButtonComposite = new Composite(profileComposite, SWT.NONE);
+        GridLayout profileButtonLayout = new GridLayout();
+        profileButtonLayout.numColumns = 1;
+        profileButtonLayout.marginWidth = 0;
+        profileButtonLayout.marginHeight = 3;
+        GridData data = new GridData();
+        data.verticalAlignment = SWT.TOP;
+        profileButtonComposite.setLayout(profileButtonLayout);
+        profileButtonComposite.setLayoutData(data);
+        
+        profileComposite.addControlListener(new ControlListenerImpl(profileComposite, profileListComposite, profileButtonComposite));
+        
+        final Button addProfileButton = new Button(profileButtonComposite, SWT.NONE);
+        addProfileButton.setText( Messages.PROFILES_ADD_BTN );
+        addProfileButton.setLayoutData(new GridData(GridData.FILL_BOTH));
+        addProfileButton.setToolTipText( Messages.PROFILES_ADD_TOOLTIP );
+        addProfileButton.addSelectionListener(new SelectionListener() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+               InputValidator validator = new InputValidator(profileList);
+                InputDialog dialog = new InputDialog(Display.getDefault().getActiveShell(), UIMessages.getString("org.tizen.common.sign.profilename"), UIMessages.getString("org.tizen.common.sign.entername"), "", validator); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                dialog.open();
+                if (dialog.getReturnCode() == Dialog.OK) {
+                    SigningProfile profile = new SigningProfile();
+                    profile.setProfileName(dialog.getValue().trim());
+                    SigningProfileItem authorProfileItem = new SigningProfileItem();
+                    authorProfileItem.setAuthor(true);
+                    authorProfileItem.setIdentifier(EMPTY_STRING); //$NON-NLS-1$
+                    authorProfileItem.setKeyLocation(EMPTY_STRING); //$NON-NLS-1$
+                    authorProfileItem.setCAPath( SigningProfileUtil.getAuthorCAPath() );
+                    authorProfileItem.setRootCAPath(EMPTY_STRING);
+                    profile.setAuthorItem(authorProfileItem);
+                    profileList.add(profile);
+                    if ("".equals(defaultProfileString) && profileList.size() == 1) { //$NON-NLS-1$
+                        defaultProfileString = dialog.getValue().trim();
+                    }
+                    listViewer.add(profile);
+                    listViewer.setSelection(new StructuredSelection(profile));
+                    validatePreferencePage();
+                }
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        });
+
+        Button modifyProfilesButton = new Button(profileButtonComposite, SWT.NONE);
+        modifyProfilesButton.setText(UIMessages.getString("org.tizen.common.sign.profile.modify")); //$NON-NLS-1$
+        modifyProfilesButton.setLayoutData(new GridData(GridData.FILL_BOTH));
+        modifyProfilesButton.setToolTipText(UIMessages.getString("org.tizen.common.sign.modifytooltip")); //$NON-NLS-1$
+        modifyProfilesButton.addSelectionListener(new SelectionListener() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                ISelection selection = listViewer.getSelection();
+                if (selection instanceof IStructuredSelection) {
+                    Object object = ((IStructuredSelection) selection).getFirstElement();
+                    if (object instanceof SigningProfile) {
+                        SigningProfile profile = (SigningProfile) object;
+                        InputValidator validator = new InputValidator(profileList, profile.getProfileName());
+                        InputDialog dialog = new InputDialog(Display.getDefault().getActiveShell(), UIMessages.getString("org.tizen.common.sign.profilename"), UIMessages.getString("org.tizen.common.sign.entername"), profile.getProfileName(), validator); //$NON-NLS-1$ //$NON-NLS-2$
+                        dialog.open();
+                        if (dialog.getReturnCode() == Dialog.OK) {
+                            if (((SigningProfile) object).getProfileName().compareTo(defaultProfileString) == 0) {
+                                defaultProfileString = dialog.getValue().trim();
+                            }                        
+                            ((SigningProfile) object).setProfileName(dialog.getValue().trim());
+                            listViewer.update(object, null);
+                        }
+                    }
+                }
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        });
+        
+        Button defaultProfileButton = new Button(profileButtonComposite, SWT.NONE);
+        defaultProfileButton.setText( Messages.PROFILES_SETACTIVE_BTN );
+        defaultProfileButton.setLayoutData(new GridData(GridData.FILL_BOTH));
+        defaultProfileButton.setToolTipText( Messages.PROFILES_SETACTIVE_TOOLTIP );
+        defaultProfileButton.addSelectionListener(new SelectionListener() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                ISelection selection = listViewer.getSelection();
+                if (selection instanceof IStructuredSelection) {
+                    Object object = ((IStructuredSelection) selection).getFirstElement();
+                    if (object instanceof SigningProfile) {
+                        defaultProfileString = ((SigningProfile) object).getProfileName();
+                        listViewer.refresh(true);
+                    }
+                }
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        });
+        
+        final Button removeProfileButton = new Button(profileButtonComposite, SWT.NONE);
+        removeProfileButton.setText( Messages.PROFILES_REMOVE_BTN );
+        removeProfileButton.setLayoutData(new GridData(GridData.FILL_BOTH));
+        removeProfileButton.setToolTipText( Messages.PROFILES_REMOVE_TOOLTIP );
+        removeProfileButton.addSelectionListener(new SelectionListener() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                ISelection selection = listViewer.getSelection();
+                if (selection instanceof IStructuredSelection) {
+                    Object object = ((IStructuredSelection) selection).getFirstElement();
+                    if (object instanceof SigningProfile) {
+                        profileList.remove(object);
+                        if (((SigningProfile) object).getProfileName().compareTo(defaultProfileString) == 0) {
+                            defaultProfileString = EMPTY_STRING;
+                        }    
+                        if (addButton != null) {
+                            addButton.setEnabled(false);
+                        }
+                        if (removeButton != null) {
+                            removeButton.setEnabled(false);
+                        }
+                        if (clearButton != null) {
+                            clearButton.setEnabled(false);
+                            authorTableViewer.getTable().setEnabled(false);
+                        }
+                        if (distClearButton != null) {
+                            distClearButton.setEnabled(true);
+                        }
+                        if (profileList.size() == 1) {
+                            SigningProfile profile = profileList.get(0);
+                            if (profile != null) {
+                                defaultProfileString = profile.getProfileName();
+                                listViewer.setSelection(new StructuredSelection(profile));
+                            } 
+                        } 
+                        listViewer.remove(object);
+                        listViewer.refresh(true);
+                        distributorTableViewer.remove(((SigningProfile) object).getProfileItemList().toArray());
+                        authorTableViewer.remove(((SigningProfile) object).getAuthorItem());
+                        validatePreferencePage();
+                    }
+                }
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        });
+        
+        listViewer = new TableViewer(profileListComposite);
+        GridData listData = new GridData(GridData.FILL_BOTH);
+        listViewer.getTable().setLayoutData(listData);
+        listViewer.setContentProvider(new ListViewerContentProvider(profileList));
+
+        class ListLabelProvider extends LabelProvider implements IFontProvider{
+            @Override
+            public Font getFont(Object element) {
+                if (element instanceof SigningProfile) {
+                    if (defaultProfileString != null && ((SigningProfile) element).profileName.compareTo(defaultProfileString) == 0) {
+                        return new Font(Display.getDefault(), boldFont(listViewer.getTable().getFont()));
+                    }
+                }
+                return null;
+            };
+            
+            public String getText(Object element) {
+                if (element instanceof SigningProfile) {
+                    if (defaultProfileString != null && ((SigningProfile) element).profileName.compareTo(defaultProfileString) == 0) {
+                        return ((SigningProfile) element).profileName + " (Active)"; //$NON-NLS-1$
+                    }
+                    return ((SigningProfile) element).profileName;
+                }
+                return null;
+            }
+            
+            @Override
+            public Image getImage(Object element) {
+                return super.getImage(element);
+            }
+        }
+        listViewer.setLabelProvider(new ListLabelProvider());
+
+        listViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+            @Override
+            public void selectionChanged(SelectionChangedEvent event) {
+                ISelection selection = event.getSelection();
+                if (selection instanceof IStructuredSelection) {
+                    StructuredSelection structuredSel = (StructuredSelection) selection;
+                    Object selElement = structuredSel.getFirstElement();
+                    if (selElement instanceof SigningProfile) {
+                        if (addButton != null) {
+                            addButton.setEnabled(true);
+                        }
+                        if (removeButton != null) {
+                            removeButton.setEnabled(true);
+                        }
+                        if (clearButton != null) {
+                            clearButton.setEnabled(true);
+                        }
+                        if (distClearButton != null) {
+                            distClearButton.setEnabled(true);
+                        }
+                        
+                        SigningProfile profile = (SigningProfile) selElement;
+                        if (distributorTableViewer != null) {
+                            distributorTableViewer.getTable().setEnabled(true);
+                            distributorTableViewer.setInput(profile);
+                        }
+                        if (authorTableViewer != null) {
+                            authorTableViewer.getTable().setEnabled(true);
+                            authorTableViewer.setInput(profile);
+                        }
+                        
+                        if(distributorTableViewer != null && distributorTableViewer.getTable().getItemCount() == 0) {
+                            SigningProfileItem profileItem = new SigningProfileItem();
+                            profileItem.setAuthor(false);
+                            profileItem.setIdentifier(EMPTY_STRING); //$NON-NLS-1$
+                            profileItem.setKeyLocation(EMPTY_STRING); //$NON-NLS-1$
+                            profileItem.setCAPath(EMPTY_STRING);
+                            profileItem.setRootCAPath(EMPTY_STRING);
+                            profile.addProfileItem(profileItem);
+                            validatePreferencePage();
+                            distributorTableViewer.add(profileItem);
+                        }
+                    }
+                }
+            }
+        });
+        defaultProfileString = preferenceStore.getString(defaultProfileKey);
+        listViewer.setInput("profile"); //$NON-NLS-1$
+        if (defaultProfileString != null) {
+            for (SigningProfile profile : profileList) {
+                if (defaultProfileString.equals(profile.getProfileName())) {
+                    listViewer.setSelection(new StructuredSelection(profile));
+                }
+            }
+        }
+    }
+
+    @Override
+    protected void performDefaults() {
+    }
+
+    private void checkFile(String filePath) {
+        if (filePath != null && filePath.trim().length() > 0) {
+            File file = new File(filePath);
+            boolean isValid = true;
+            if (!file.exists() || !file.isFile()) {
+                isValid = false;
+            } else {
+                String fileExtension = FileUtil.getFileExtension( filePath );
+                //isValid = KeyExtension.hasExtension( fileExtension ); // for Android keystore
+                isValid = KeyExtension.p12.name().equalsIgnoreCase( fileExtension );
+            }
+            if (!isValid) {
+                setValid(false);
+                setErrorMessage(filePath + ": " + UIMessages.getString("org.tizen.common.sign.entervalidp12"));
+            }
+        }
+    }
+
+    protected void validatePreferencePage() {
+        setValid(true);
+        setErrorMessage(null);
+        for (SigningProfile profile : profileList) {
+            if (profile == null)
+            {
+                continue;
+            }
+
+            List<SigningProfileItem> profileItemList = profile.getProfileItemList();
+            for (SigningProfileItem item : profileItemList) {
+                if (item == null)
+                {
+                    continue;
+                }
+
+                checkFile(item.getKeyLocation());
+            }
+            
+            SigningProfileItem authorItem = profile.getAuthorItem();
+            if (authorItem != null)
+            {
+                checkFile(authorItem.getKeyLocation());
+            }
+        } 
+    }
+
+    @Override
+    public void init(IWorkbench workbench) {
+    }
+
+    public FontData[] boldFont(Font font) {
+        FontData[] datas = font.getFontData();
+        for (FontData data : datas)
+        {
+            data.setStyle(SWT.BOLD);
+        }
+        return datas;
+    }
+
+    public FontData[] smallFont(Font font) {
+        FontData[] datas = font.getFontData();
+        for (FontData data : datas)
+            data.setHeight(data.getHeight() - 1);
+        return datas;
+    }
+
+    @Override
+    public boolean performOk() {
+       preferenceStore.setValue(defaultProfileKey, defaultProfileString);
+        SigningProfileUtil.writeProfilesAndProfileItems(this.profileList);
+        return super.performOk();
+    }
+    
+    public class PasswordTextCellEditor extends TextCellEditor {
+        
+        public PasswordTextCellEditor(Composite composite) {
+            super(composite);
+        }
+        
+        @Override
+        protected void doSetValue(Object value) {
+            String _value = null;
+            if(value == null) {
+                _value = "";
+            }
+            else if(value instanceof char[]) {
+                _value = new String((char[])value);
+            }
+            super.doSetValue(_value);
+        }
+        
+        @Override
+        public int getStyle() {
+            return super.getStyle() | SWT.PASSWORD;
+        }
+        
+    }
+}
+
+class ControlListenerImpl implements ControlListener {
+    Composite composite, authorItemTableComposite, authorItemButtonComposite;
+
+    ControlListenerImpl(Composite composite, Composite authorItemTableComposite, Composite authorItemButtonComposite) {
+        this.composite = composite;
+        this.authorItemTableComposite = authorItemTableComposite;
+        this.authorItemButtonComposite = authorItemButtonComposite;
+    }
+
+    @Override
+    public void controlResized(ControlEvent e) {
+        Rectangle area = composite.getClientArea();
+        int width85 = (int) (area.width * 0.85);
+        int width15 = (int) (area.width * 0.15);
+        
+        GridData listCompositeData = new GridData(GridData.FILL_BOTH);
+        listCompositeData.widthHint = width85;
+        authorItemTableComposite.setLayoutData(listCompositeData);
+        
+        GridData data = new GridData();
+        data.verticalAlignment = SWT.TOP;
+        data.widthHint = width15;
+        authorItemButtonComposite.setLayoutData(data);
+    }
+    
+    @Override
+    public void controlMoved(ControlEvent e) {
+    }
+}
+
+class ListViewerContentProvider implements IStructuredContentProvider {
+
+    private List<SigningProfile> list;
+
+    public ListViewerContentProvider(List<SigningProfile> list) {
+        this.list = list;
+    }
+    
+    @Override
+    public Object[] getElements(Object inputElement) {
+        if (inputElement instanceof String) {
+            SigningProfile[] profileItems = new SigningProfile[list.size()];
+            if (((String) inputElement).compareTo("profile") == 0) { //$NON-NLS-1$
+                for (int i=0;i<list.size();i++) {
+                    profileItems[i] = list.get(i);
+                }
+            }
+            return profileItems; 
+        }
+        return null;
+    }
+
+    @Override
+    public void dispose() {
+    }
+
+    @Override
+    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+    }
+}
+
+class InputValidator implements IInputValidator {
+    protected final String profileName;
+
+    protected final List<SigningProfile> list;
+
+    InputValidator(List<SigningProfile> profileList) {
+       this( profileList, null );
+    }
+
+    InputValidator(List<SigningProfile> profileList, final String profileName ) {
+       this.list = profileList;
+       this.profileName = profileName;
+    }
+    
+    public String isValid(String newText) {
+       if ( isEmpty( newText ) )
+       {
+               return EMPTY_STRING;
+       }
+       final String safeText = trim( newText );
+       
+       if ( null != profileName && profileName.equals( safeText ) )
+       {
+               return null;
+       }
+       if (checkForDuplicateProfile(newText.trim())) {
+               return UIMessages.getString("org.tizen.common.sign.profile") + " " + safeText + " " + UIMessages.getString("org.tizen.common.sign.aldreadyexists"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+       } else {
+               return null;
+       }
+    }
+
+    protected boolean checkForDuplicateProfile(String string) {
+        for (SigningProfile profile : list) {
+            if (profile.getProfileName().compareTo(string) == 0) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
+
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfile.java b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfile.java
new file mode 100644 (file)
index 0000000..339bbb2
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jihoon Song <jihoon80.song@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.sign.preferences;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+public class SigningProfile {
+
+       protected String profileName;
+       
+       ArrayList<SigningProfileItem> profileItemList = new ArrayList<SigningProfileItem>();
+       
+       SigningProfileItem authorItem = null;
+       
+       public String getProfileName() {
+               return profileName;
+       }
+       
+       public void setProfileName(String profileName) {
+               this.profileName = profileName;
+       }
+       
+       
+       public void addProfileItem(SigningProfileItem item){
+               profileItemList.add(item);
+       }
+       
+       public void removeProfileItem(SigningProfileItem item){
+               profileItemList.remove(item);
+       }
+       
+       public List<SigningProfileItem> getProfileItemList() {
+               return Collections.unmodifiableList( profileItemList );
+       }
+       
+       public void setAuthorItem(SigningProfileItem authorItem) {
+               this.authorItem = authorItem;
+       }
+       
+       public SigningProfileItem getAuthorItem() {
+               return authorItem;
+       }
+       
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfileItem.java b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfileItem.java
new file mode 100644 (file)
index 0000000..17b04e4
--- /dev/null
@@ -0,0 +1,282 @@
+/*
+ * Web IDE - sign
+ * 
+ * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jihoon Song <jihoon80.song@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * Bonyong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
+
+package org.tizen.common.sign.preferences;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+
+
+/**
+ * <p>
+ * SigningProfileItem.
+ * 
+ * Singing Profile Item information container
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+SigningProfileItem
+{
+    /**
+     * Key file path
+     */
+    protected String keyLocation;
+    
+    protected String caPath;
+    
+    protected String rootCAPath;
+    
+    /**
+     * Identifier
+     */
+    protected String id;
+    
+    /**
+     * Password if exists
+     */
+    protected char[] password;
+    
+    /**
+     * Flag if signature is for author
+     */
+    protected boolean bAuthor;
+    
+    public SigningProfileItem()
+    {
+        this("", "", false, "", "");
+    }
+    
+    public SigningProfileItem( final String keyLocation, final String id, final boolean bAuthor )
+    {
+        this( keyLocation, id, bAuthor, "", "");
+    }
+
+    public SigningProfileItem( final String keyLocation, final String id, final boolean bAuthor, final String caPath, final String rootCAPath ) {
+        this.keyLocation = keyLocation;
+        this.id = id;
+        this.bAuthor = bAuthor;
+        this.caPath = caPath;
+        this.rootCAPath = rootCAPath;
+        this.password = "".toCharArray();
+    }
+    
+    /**
+     * Return identifier
+     * 
+     * example - "%a:%f:%w:%h:%t"
+     * 
+     * @return identifier
+     * 
+     * @see #id
+     */
+    public
+    String
+    getIdentifier()
+    {
+        return this.id;
+    }
+    
+    /**
+     * Set identifier
+     * 
+     * @param id new identifier
+     * 
+     * @see #id
+     */
+    public
+    void
+    setIdentifier(
+        final String id
+    )
+    {
+        this.id = id;
+    }
+    
+    /**
+     * Return key location path
+     * 
+     * @return key location
+     */
+    public
+    String
+    getKeyLocation()
+    {
+        return this.keyLocation;
+    }
+    
+    /**
+     * Set key location path
+     * 
+     * @param keyLocation
+     */
+    public
+    void
+    setKeyLocation(
+        final String keyLocation
+    )
+    {
+        this.keyLocation = keyLocation;
+    }
+    
+    public String getCAPath() {
+        return caPath;
+    }
+
+    public void setCAPath(final String caPath) {
+        this.caPath = caPath;
+    }
+
+    public String getRootCAPath() {
+        return rootCAPath;
+    }
+
+    public void setRootCAPath(final String rootCAPath) {
+        this.rootCAPath = rootCAPath;
+    }
+
+    /**
+     * open {@link InputStream} for key file
+     * 
+     * @return {@link InputStream}
+     * 
+     * @throws IOException If exception occureed in open stream
+     */
+    public
+    InputStream
+    openKeyInputStream()
+    throws IOException
+    {
+        return new FileInputStream( this.keyLocation );
+    }
+    
+    /**
+     * Return flag if signing is for author or distributor
+     * 
+     * @return <code>true</code> if signing is for author
+     */
+    public
+    boolean
+    isAuthor()
+    {
+        return this.bAuthor;
+    }
+    
+    /**
+     * Set flag for author
+     * 
+     * @param isAuthor new flag
+     */
+    public
+    void
+    setAuthor(
+        final boolean isAuthor
+    )
+    {
+        this.bAuthor = isAuthor;
+    }
+    
+    /**
+     * Return password for certification file
+     * 
+     * @return password
+     */
+    public
+    char[] getPassword()
+    {
+        if ( null == this.password )
+        {
+            return null;
+        }
+        final char[] password = new char[this.password.length];
+        System.arraycopy( this.password, 0, password, 0, this.password.length );
+        
+        return password;
+    }
+    /**
+     * Set password for certification file
+     * 
+     * @param password password
+     */
+    public
+    void
+    setPassword(
+        final char[] password
+    )
+    {
+        if ( null == password )
+        {
+            this.password = password;
+            return ;
+        }
+        this.password = new char[password.length];
+        System.arraycopy( password, 0, this.password, 0, password.length );
+    }
+    
+    /* (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode() {
+        return new HashCodeBuilder()
+        .append( this.bAuthor )
+        .append( this.id )
+        .append( this.keyLocation )
+        .append( this.caPath )
+        .append( this.rootCAPath )
+        .toHashCode();
+    }
+    
+    /* (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public
+    boolean
+    equals(
+        final Object obj
+    )
+    {
+        if ( !( obj instanceof SigningProfileItem ) )
+        {
+            return false;
+        }
+        final SigningProfileItem profileItem = (SigningProfileItem) obj;
+        return new EqualsBuilder()
+        .append( this.bAuthor, profileItem.bAuthor )
+        .append( this.id, profileItem.id )
+        .append( this.keyLocation, profileItem.keyLocation )
+        .append( this.caPath, profileItem.caPath )
+        .append( this.rootCAPath, profileItem.rootCAPath )
+        .isEquals();
+    }
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfileItemFactory.java b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/SigningProfileItemFactory.java
new file mode 100644 (file)
index 0000000..01da031
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Web IDE - sign
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.sign.preferences;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.tizen.common.Factory;
+import org.tizen.common.core.application.InstallPathConfig;
+import org.tizen.common.sign.Activator;
+import org.tizen.common.util.StringUtil;
+import org.tizen.common.util.log.Logger;
+
+public class
+SigningProfileItemFactory
+implements Factory<SigningProfileItem>{
+
+    protected static final String DEVELOPER_KEY_PASSWORD = "tizenpkcs12passfordsigner"; //$NON-NLS-1$
+
+    /**
+     * Return {@link Activator}
+     * 
+     * @return {@link Activator}
+     * 
+     * @see #getActivator()
+     */
+    public Activator getActivator()
+    {
+        return Activator.getDefault();
+    }
+
+    protected String getDeveloperKeyPath() throws IOException
+    {
+        IPath sdkpath= new Path( InstallPathConfig.getSDKPath() )
+            .append( "tools" )
+            .append( "certificate-generator" )
+            .append( "certificates" )
+            .append( "distributor" )
+            .append( "tizen-distributor-signer.p12" );
+        return sdkpath.toOSString();
+    }
+
+    public SigningProfileItem create() {
+        final SigningProfileItem profileItem = new SigningProfileItem();
+
+        try {
+            profileItem.setKeyLocation( getDeveloperKeyPath() );
+            profileItem.setPassword( DEVELOPER_KEY_PASSWORD.toCharArray() );
+        } catch (IOException e) {
+            Logger.log(e);
+        }
+        profileItem.setIdentifier(StringUtil.EMPTY_STRING); //$NON-NLS-1$
+        profileItem.setAuthor(false);
+        profileItem.setCAPath(StringUtil.EMPTY_STRING);
+        profileItem.setRootCAPath(StringUtil.EMPTY_STRING);
+
+        return profileItem;
+    }
+
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/UIMessages.java b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/UIMessages.java
new file mode 100644 (file)
index 0000000..8c27bb0
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Web IDE - sign
+ * 
+ * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jihoon Song <jihoon80.song@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.
+ * 
+ * Contributors:
+ * - S-Core Co., Ltd
+ * 
+ */
+
+package org.tizen.common.sign.preferences;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class UIMessages {
+
+       private static final String BUNDLE_NAME = "org.tizen.common.sign.preferences.UIMessages"; //$NON-NLS-1$
+       private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+       
+       private UIMessages(){
+       }
+       
+       public static String getString(String key) {
+               try {
+                       return RESOURCE_BUNDLE.getString(key);
+               } catch (MissingResourceException e) {
+                       return '!' + key + '!';
+               }
+       }
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/preferences/UIMessages.properties b/org.tizen.common.sign/src/org/tizen/common/sign/preferences/UIMessages.properties
new file mode 100644 (file)
index 0000000..e755cb2
--- /dev/null
@@ -0,0 +1,31 @@
+#Signing
+org.tizen.common.sign.authorerrordialogtitle=Error generating Author Signature
+org.tizen.common.sign.distrierrordialogtitle=Error generating Distributor Signature
+org.tizen.common.sign.authcerterror=Problem generating Author signature. Aborting Author Signature generation.
+org.tizen.common.sign.checkauthorcertificate=Please check the signing configurations at
+org.tizen.common.sign.preference=Signing Preferences
+org.tizen.common.sign.authkeyerror=Problem loading Author private key. Aborting Author Signature generation.
+org.tizen.common.sign.authcertkeyerror=Problem generating Author Signature. Aborting Author Signature generation.
+org.tizen.common.sign.districerterror=Problem generating Distributor signature. Aborting Distributor Signature generation.
+org.tizen.common.sign.distrikeyerror=Problem loading Distributor private key. Aborting Distributor Signature generation.
+org.tizen.common.sign.districertkeyerror=Problem generating Distributor signature. Aborting Distributor Signature generation.
+org.tizen.common.sign.errorloadingkeystore=There was an error while loading certificate file 
+org.tizen.common.sign.authorsignaturegnerated=Author signature generated successfully
+org.tizen.common.sign.distributorsignaturegenerated=Distributor signature generated successfully
+org.tizen.common.sign.checkpassword=Please check the password.
+org.tizen.common.sign.profile=Profile
+org.tizen.common.sign.aldreadyexists=already exists
+org.tizen.common.sign.entervalidp12=Certificate file does not exist
+org.tizen.common.sign.profilename=Profile Name
+org.tizen.common.sign.entername=Enter profile name
+org.tizen.common.sign.modifytooltip=Edit profile name
+org.tizen.common.sign.profilegrouptitle=Profiles
+org.tizen.common.sign.profileitemgrouptitle=Profile Items
+org.tizen.common.sign.profile.modify=Rename
+org.tizen.common.sign.profileitem.clear=Clear
+org.tizen.common.sign.authorsigtitle=Author Certificate
+org.tizen.common.sign.distrisigtitle=Distributor Certificate (Optional)
+org.tizen.common.sign.certificatevalidityerror=There was an error in certificate validity. Aborting Signature generation.
+org.tizen.common.sign.certificatevaliditymessage1=The certificate corresponding to 
+org.tizen.common.sign.certificatevaliditymessage2=is not valid.\nThe certificate is not valid before
+org.tizen.common.sign.certificatevaliditymessage3=and after
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/signer/BuildNumber.java b/org.tizen.common.sign/src/org/tizen/common/sign/signer/BuildNumber.java
new file mode 100644 (file)
index 0000000..5e72951
--- /dev/null
@@ -0,0 +1,42 @@
+/*\r
+ * NativeAppCommon\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ *  \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+\r
+package org.tizen.common.sign.signer;\r
+\r
+public class BuildNumber {\r
+    static final String DESCRIPTION = "Tizen Signer";\r
+    static final String VERSION_NUMBER = "1.0.0";\r
+    private static final String BUILD_NUMBER = "0001";\r
+    private static final String RECENT_CHANGES = "initial commit";\r
+\r
+    private static final String LINE_SEPARATOR = System.getProperty("line.separator");\r
+    static final String MODULE_INFO =\r
+        DESCRIPTION + LINE_SEPARATOR + "Version: " + VERSION_NUMBER + " [" + BUILD_NUMBER + "]"\r
+            + LINE_SEPARATOR + "Changes: " + RECENT_CHANGES;\r
+\r
+    public static void main(String[] args) {\r
+        System.out.println(MODULE_INFO);\r
+    }\r
+}\r
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/signer/TizenSigner.java b/org.tizen.common.sign/src/org/tizen/common/sign/signer/TizenSigner.java
new file mode 100644 (file)
index 0000000..baf8cf3
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * NamKoong Ho <ho.namkoong@samsung.com>
+ *  
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.sign.signer;
+
+import hashsign.HashingSigning;
+
+import org.tizen.common.sign.util.SigningPathUtil;
+import org.tizen.common.util.StringUtil;
+
+public class TizenSigner {
+
+    public static void usage() {
+        System.out.println(BuildNumber.DESCRIPTION + " "
+                + BuildNumber.VERSION_NUMBER);
+        System.out.println("Usage:");
+        System.out
+                .println(" java org.tizen.common.sign.signer.TizenSigner targetDir authorCAPath authorP12Path authorPass dist1P12Path dist1Pass dist1CAPath dist2P12Path dist2Pass dist2CAPath dist2RootPath");
+        System.err
+        .println(" java org.tizen.common.sign.signer.TizenSigner targetDir authorCAPath authorP12Path authorPass dist1P12Path dist1Pass dist1CAPath dist2P12Path dist2Pass dist2CAPath dist2RootPath");
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        if (args.length != 11) {
+            usage();
+            return;
+        }
+
+        String targetDir = args[0];
+        String authorCAPath = args[1];
+        String authorP12Path = args[2];
+        String authorPass = args[3];
+        String dist1P12Path = args[4];
+        String dist1Pass = args[5];
+        String dist1CAPath = args[6];
+        String dist2P12Path = args[7];
+        String dist2Pass = args[8];
+        String dist2CAPath = args[9];
+        String dist2RootPath = args[10];
+        
+        if(StringUtil.isEmpty(authorCAPath)) {
+            authorCAPath = SigningPathUtil.getAuthorCAPath();
+            dist1P12Path = SigningPathUtil.getDeveloperKeyPath();
+            dist1Pass = SigningPathUtil.DISTRIBUTOR1_PWD;
+            dist1CAPath = SigningPathUtil.getDeveloperCAPath();
+        }
+        
+        authorSign(targetDir, authorP12Path, authorPass, authorCAPath, null);
+        distSign(targetDir, dist1P12Path, dist1Pass, dist1CAPath, null, 1);
+        dist2SignWithParameterCheck(targetDir, dist2P12Path, dist2Pass, dist2CAPath, dist2RootPath);
+    }
+    
+    public static void authorSign(String targetDir, String authorP12Path, String authorPass, String authorCAPath, String rootCaPath) throws Exception{
+        checkNullParameters(targetDir, authorP12Path, authorPass);
+        HashingSigning.AuthorSignature(targetDir, authorP12Path, authorPass, authorCAPath, null);
+    }
+    
+    public static void distSign(String targetDir, String distP12Path, String distPass, String distCAPath, String distRootPath, int distNumber) throws Exception{
+        checkNullParameters(targetDir, distP12Path, distPass);
+        HashingSigning.DistributorSignature(targetDir, distP12Path, distPass, distCAPath, distRootPath, distNumber);
+    }
+    
+    private static void checkNullParameters(String targetDir, String p12Path, String pass) throws IllegalArgumentException{
+        String emptyParameter = null;
+        if(StringUtil.isEmpty(targetDir)) {
+            emptyParameter = "target directory";
+        }
+        else if(StringUtil.isEmpty(p12Path)) {
+            emptyParameter = "certificate location";
+        }
+        else if(StringUtil.isEmpty(pass)) {
+            emptyParameter = "password";
+        }
+        else {
+            return;
+        }
+        throw new IllegalArgumentException(emptyParameter + " is empty");
+    }
+    
+    public static void dist2SignWithParameterCheck(String targetDir, String dist2P12Path, String dist2Pass, String dist2CAPath, String dist2RootPath) throws Exception{
+        if(!StringUtil.isEmpty(dist2P12Path) && !StringUtil.isEmpty(dist2Pass)) {
+            if(StringUtil.isEmpty(dist2CAPath) || StringUtil.isEmpty(dist2RootPath)) {
+                dist2CAPath = null;
+                dist2RootPath = null;
+            }
+            distSign(targetDir, dist2P12Path, dist2Pass, dist2CAPath, dist2RootPath, 2);
+        }
+    }
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/ui/Messages.java b/org.tizen.common.sign/src/org/tizen/common/sign/ui/Messages.java
new file mode 100644 (file)
index 0000000..8982699
--- /dev/null
@@ -0,0 +1,52 @@
+/*\r
+ * Common\r
+*\r
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact:\r
+* NamKoong Ho <ho.namkoong@samsung.com>\r
+*  \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+* Contributors:\r
+* - S-Core Co., Ltd\r
+*\r
+*/ \r
+\r
+package org.tizen.common.sign.ui;\r
+\r
+import org.eclipse.osgi.util.NLS;\r
+import org.tizen.common.sign.Activator;\r
+\r
+public final class Messages extends NLS {\r
+\r
+    private static final String BUNDLE_NAME = Activator.PLUGIN_ID + ".ui.messages";//$NON-NLS-1$\r
+    \r
+    private Messages() {\r
+        // Do not instantiate\r
+    }\r
+\r
+    public static String TizenSigningDialog_title;\r
+    public static String TizenSigningDIalog_messageAuthorPassEmpty;\r
+    public static String TizenSigningDIalog_passGroupLabel;\r
+    public static String TizenSigningDIalog_authorPassLabel;\r
+    public static String TizenSigningDIalog_distPassLabel;\r
+    public static String TizenSigningDIalog_authorPassTooltip;\r
+    public static String TizenSigningDIalog_distPassTooltip;\r
+    public static String TizenSigningDIalog_messageDistPassEmpty;\r
+    public static String TizenSigningDIalog_messageFirst;\r
+    \r
+    static {\r
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);\r
+    }\r
+}
\ No newline at end of file
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/ui/TizenSigningDialog.java b/org.tizen.common.sign/src/org/tizen/common/sign/ui/TizenSigningDialog.java
new file mode 100644 (file)
index 0000000..bbd1e77
--- /dev/null
@@ -0,0 +1,356 @@
+/*
+ * Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact:
+* NamKoong Ho <ho.namkoong@samsung.com>
+*  
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/ 
+
+package org.tizen.common.sign.ui;
+
+import java.util.List;
+
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.window.ApplicationWindow;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.tizen.common.sign.preferences.SigningProfile;
+import org.tizen.common.sign.preferences.SigningProfileItem;
+import org.tizen.common.sign.util.SigningProfileUtil;
+import org.tizen.common.util.SWTUtil;
+import org.tizen.common.util.StringUtil;
+
+public class TizenSigningDialog extends ApplicationWindow{
+
+    private final int GROUP_WIDTH = 500;
+    private final int GROUP_HEIGHT= 150;
+    private final int BUTTON_WIDTH = 70;
+    private boolean closedByOk = false;
+    private final ModifyListener callValidateDialogListener = new ModifyListener() {
+        @Override
+        public void modifyText(ModifyEvent e) {
+            if(validateDialog()) {
+                okButton.setEnabled(true);
+            }
+            else {
+                okButton.setEnabled(false);
+            }
+        }
+    };
+    private Text messageLabel;
+    private Text authorPassText ;
+    private Text distPassText;
+    private Button okButton;
+    private Button saveAuthorPassButton;
+    private Button saveDistPassButton;
+    
+    private String authorPass;
+    private String distPass;
+    private boolean isDistEnabled = false;
+    private boolean open = false;
+    
+    private List<SigningProfile> profileList;
+    private SigningProfile defaultProfile;
+    private SigningProfileItem distProfile;
+    private SigningProfileItem authorProfile;
+    
+    public  TizenSigningDialog(Shell parentShell, List<SigningProfile> profileList) {
+        super(parentShell);
+        
+        this.distPass = "";
+        this.authorPass = "";
+        this.profileList = profileList;
+        this.defaultProfile = SigningProfileUtil.getDefaultProfile(profileList);
+        this.authorProfile = this.defaultProfile.getAuthorItem();
+        char[] _authorPass = this.authorProfile.getPassword(); 
+        if(_authorPass.length == 0) {
+            this.authorPass = "";
+            this.open = true;
+        }
+        else {
+            this.authorPass = new String(_authorPass);
+        }
+        
+        List<SigningProfileItem> distProfileList = this.defaultProfile.getProfileItemList();
+        if(distProfileList.size() > 0) {
+            this.distProfile = distProfileList.get(0);
+            if(!StringUtil.isEmpty(distProfile.getKeyLocation())) {
+                this.isDistEnabled = true;
+                char[] _distPass = this.distProfile.getPassword();
+                if(_distPass.length == 0) {
+                    this.distPass = "";
+                    this.open = true;
+                }
+                else {
+                    this.distPass = new String(_distPass);
+                }
+            }
+        }
+        else {
+            this.distPass = "";
+        }
+    }
+    
+    public boolean isClosedByOk() {
+        return closedByOk;
+    }
+    
+    public boolean isDistEnabled() {
+        return isDistEnabled;
+    }
+    
+    public boolean isOpen() {
+        return open;
+    }
+    
+    protected boolean validateDialog() {
+        
+        String authorPass = this.authorPassText.getText();
+        if("".equals(authorPass)) {
+            setMessage(Messages.TizenSigningDIalog_messageAuthorPassEmpty);
+            return false;
+        }
+        
+        if(isDistEnabled) {
+            String distPass = this.distPassText.getText();
+            if("".equals(distPass)) {
+                setMessage(Messages.TizenSigningDIalog_messageDistPassEmpty);
+                return false;
+            }
+        }
+        
+        
+        setMessage(null);
+        return true;
+    }
+    
+    @Override
+    protected int getShellStyle() {
+        int style = super.getShellStyle();
+        style = style | SWT.APPLICATION_MODAL;
+        return style;
+    }
+    
+    private void setMessage(String message) {
+        if(message == null) {
+            this.messageLabel.setText("");
+            return;
+        }
+        this.messageLabel.setText(message);
+    }
+    
+    @Override
+    protected Control createContents(Composite parent) {
+        Composite mainComposite = new Composite(parent, SWT.NONE);
+        
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 1;
+        layout.marginWidth = 0;
+        layout.marginHeight = 0;
+        layout.marginLeft = 5;
+        layout.marginRight = 5;
+        layout.marginTop = 5;
+        layout.marginBottom = 5;
+        mainComposite.setLayout(layout);
+        SWTUtil.setGridLayoutData(mainComposite, 700, -1, -1, -1, SWT.NONE);
+        createMessageText(mainComposite);
+        createPassGroup(mainComposite);
+        createButtons(mainComposite);
+        this.getShell().setText(Messages.TizenSigningDialog_title);
+        addListeners();
+        
+        if(validateDialog()) {
+            okButton.setEnabled(true);
+        }
+
+        authorPassText.setFocus();
+        this.getShell().setDefaultButton(okButton);
+
+        return mainComposite;
+    }
+
+    private void createMessageText(Composite mainComposite) {
+        Color whiteColor = SWTUtil.getDisplay().getSystemColor(SWT.COLOR_WHITE);
+        
+        Composite msgComposite = new Composite(mainComposite, SWT.None);
+        GridLayout msgCompositeLayout = new GridLayout();
+        msgCompositeLayout.numColumns = 1;
+        msgCompositeLayout.makeColumnsEqualWidth = false;
+        msgCompositeLayout.marginBottom = 0;
+        msgCompositeLayout.marginHeight = 0;
+        msgCompositeLayout.marginLeft = 0;
+        msgCompositeLayout.marginRight = 0;
+        msgCompositeLayout.marginTop = 0;
+        msgCompositeLayout.marginWidth = 0;
+        SWTUtil.setGridLayoutData(msgComposite, -1, -1, -1, -1, GridData.FILL_BOTH);
+        msgComposite.setLayout(msgCompositeLayout);
+        msgComposite.setBackground(whiteColor);
+        Label titleLabel = new Label(msgComposite, SWT.LEFT);
+        titleLabel.setBackground(whiteColor);
+        titleLabel.setFont(JFaceResources.getBannerFont());
+        titleLabel.setText(Messages.TizenSigningDIalog_messageFirst);
+        SWTUtil.setGridLayoutData(titleLabel, -1, -1, -1, -1, GridData.FILL_BOTH);
+
+        messageLabel = new Text(msgComposite, SWT.WRAP | SWT.READ_ONLY);
+        messageLabel.setText(" \n "); // two lines//$NON-NLS-1$
+        messageLabel.setFont(JFaceResources.getDialogFont());
+        messageLabel.setBackground(whiteColor);
+        SWTUtil.setGridLayoutData(messageLabel, -1, -1, -1, -1, GridData.FILL_BOTH);
+    }
+
+    private void addListeners() {
+        this.authorPassText.addModifyListener(this.callValidateDialogListener);
+        this.distPassText.addModifyListener(this.callValidateDialogListener);
+        
+        okButton.addSelectionListener(new SelectionListener() {
+            
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                performOk();
+            }
+            
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        });
+    }
+
+    private void createButtons(Composite parent) {
+        Composite buttonComposite = new Composite(parent, SWT.None);
+        GridLayout buttonComositeLayout = new GridLayout();
+        buttonComositeLayout.numColumns = 3;
+        buttonComositeLayout.makeColumnsEqualWidth = false;
+        buttonComposite.setLayout(buttonComositeLayout);
+        SWTUtil.setGridLayoutData(buttonComposite, -1, -1, -1, -1, GridData.FILL_HORIZONTAL);
+        
+        Label emptyLabel = new Label(buttonComposite, SWT.None);
+        SWTUtil.setGridLayoutData(emptyLabel, -1, -1, -1, -1, GridData.FILL_HORIZONTAL);
+        
+        Button cancelButton = new Button(buttonComposite, SWT.PUSH | SWT.CENTER);
+        cancelButton.setText("Cancel");
+        SWTUtil.setGridLayoutData(cancelButton, -1, BUTTON_WIDTH, -1, -1, SWT.NONE);
+        cancelButton.addSelectionListener(new SelectionListener() {
+            
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                close();
+            }
+            
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        });
+        
+        okButton = new Button(buttonComposite, SWT.PUSH | SWT.CENTER);
+        okButton.setText("OK");
+        SWTUtil.setGridLayoutData(okButton, -1, BUTTON_WIDTH, -1, -1, SWT.NONE);
+        okButton.setEnabled(false);
+    }
+
+    private void createPassGroup(Composite parent) {
+        final Composite passComposite = new Composite(parent, SWT.NONE);
+        GridLayout authorGroupLayout = new GridLayout();
+        authorGroupLayout.numColumns = 2;
+        authorGroupLayout.makeColumnsEqualWidth = false;
+        passComposite.setLayout(authorGroupLayout);
+        
+        SWTUtil.setGridLayoutData(passComposite, GROUP_HEIGHT, GROUP_WIDTH, -1, -1, GridData.FILL_BOTH);
+        
+        Label authorPassLabel = new Label(passComposite, SWT.None);
+        authorPassLabel.setText(Messages.TizenSigningDIalog_authorPassLabel);
+        authorPassLabel.setToolTipText(Messages.TizenSigningDIalog_authorPassTooltip);
+        
+        authorPassText = new Text(passComposite, SWT.BORDER | SWT.PASSWORD);
+        SWTUtil.setGridLayoutData(authorPassText, -1, -1, -1, -1, GridData.FILL_HORIZONTAL);
+        authorPassText.setText(this.authorPass);
+        
+        saveAuthorPassButton = new Button(passComposite, SWT.CHECK);
+        
+        this.saveAuthorPassButton.setSelection(false);
+        SWTUtil.setGridLayoutData(saveAuthorPassButton, -1, -1, 2, -1, SWT.None);
+        saveAuthorPassButton.setText("Save author password");
+        
+        Label distPassLabel = new Label(passComposite, SWT.None);
+        distPassLabel.setText(Messages.TizenSigningDIalog_distPassLabel);
+        distPassLabel.setToolTipText(Messages.TizenSigningDIalog_distPassTooltip);
+        
+        distPassText = new Text(passComposite, SWT.BORDER | SWT.PASSWORD);
+        SWTUtil.setGridLayoutData(distPassText, -1, -1, -1, -1, GridData.FILL_HORIZONTAL);
+        distPassText.setText(this.distPass);
+        
+        saveDistPassButton = new Button(passComposite, SWT.CHECK);
+        this.saveDistPassButton.setSelection(false);
+        SWTUtil.setGridLayoutData(saveDistPassButton, -1, -1, 2, -1, SWT.None);
+        saveDistPassButton.setText("Save distributor password");
+        
+        if(!isDistEnabled) {
+            distPassText.setEnabled(false);
+            saveDistPassButton.setEnabled(false);
+            distPassLabel.setEnabled(false);
+        }
+    }
+    
+    private void performOk() {
+        
+        if(!validateDialog()) {
+            return;
+        }
+        
+        boolean save = false;
+        this.distPass = this.distPassText.getText();
+        this.authorPass = this.authorPassText.getText();
+        
+        if(this.saveAuthorPassButton.getSelection()) {
+            this.authorProfile.setPassword(this.authorPassText.getTextChars());
+            save = true;
+        }
+        if(this.saveDistPassButton.getSelection()) {
+            this.distProfile.setPassword(this.distPassText.getTextChars());
+            save = true;
+        }
+        
+        if(save) {
+            SigningProfileUtil.writeProfilesAndProfileItems(profileList);
+        }
+        
+        this.closedByOk = true;
+        this.close();
+    }
+    
+    public String getAuthorPass() {
+        return this.authorPass;
+    }
+    
+    public String getDistPass() {
+        return this.distPass;
+    }
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/ui/messages.properties b/org.tizen.common.sign/src/org/tizen/common/sign/ui/messages.properties
new file mode 100644 (file)
index 0000000..1bc7575
--- /dev/null
@@ -0,0 +1,9 @@
+TizenSigningDIalog_messageAuthorPassEmpty=Input author password.
+TizenSigningDIalog_messageDistPassEmpty=Input dist password.
+TizenSigningDialog_title=Sign Application
+TizenSigningDIalog_messageFirst=Sign your project
+TizenSigningDIalog_authorGroupLabel=Password
+TizenSigningDIalog_authorPassLabel=Author Password:
+TizenSigningDIalog_distPassLabel=Distributor Password:  
+TizenSigningDIalog_authorPassTooltip=Input Author Password
+TizenSigningDIalog_distPassTooltip=Input Distributor Password
\ No newline at end of file
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/util/SigningPathUtil.java b/org.tizen.common.sign/src/org/tizen/common/sign/util/SigningPathUtil.java
new file mode 100644 (file)
index 0000000..d4a0cd7
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Common - sign
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Ho Namkoong <ho.namkoong@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.sign.util;
+
+import org.tizen.common.core.application.InstallPathConfig;
+import org.tizen.common.util.FileUtil;
+
+public class SigningPathUtil {
+
+    public static final String CERTIFICATE_PATH = "/tools/certificate-generator/certificates/";
+    public static final String DEVELOPER = "developer";
+    public static final String DISTRIBUTOR = "distributor";
+    
+    public static final String AUTHOR_CA = "tizen-developer-ca.cer";
+    public static final String DISTRIBUTOR1_P12 = "tizen-distributor-signer.p12";
+    public static final String DISTRIBUTOR1_CA = "tizen-distributor-ca.cer";
+    public static final String DISTRIBUTOR1_PWD = "tizenpkcs12passfordsigner";
+    
+    public static String getAuthorCAPath() {
+        String result = FileUtil.appendPath(InstallPathConfig.getSDKPath(), CERTIFICATE_PATH);
+        result = FileUtil.appendPath(result, DEVELOPER);
+        result = FileUtil.appendPath(result, AUTHOR_CA);
+        return result;
+    }
+    
+    public static String getDeveloperKeyPath() {
+        String result = FileUtil.appendPath(InstallPathConfig.getSDKPath(), CERTIFICATE_PATH);
+        result = FileUtil.appendPath(result, DISTRIBUTOR);
+        result = FileUtil.appendPath(result, DISTRIBUTOR1_P12);
+        return result;
+    }
+    
+    public static String getDeveloperCAPath() {
+        String result = FileUtil.appendPath(InstallPathConfig.getSDKPath(), CERTIFICATE_PATH);
+        result = FileUtil.appendPath(result, DISTRIBUTOR);
+        result = FileUtil.appendPath(result, DISTRIBUTOR1_CA);
+        return result;
+    }
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/util/SigningProfileUtil.java b/org.tizen.common.sign/src/org/tizen/common/sign/util/SigningProfileUtil.java
new file mode 100644 (file)
index 0000000..93260bb
--- /dev/null
@@ -0,0 +1,578 @@
+/*
+ * Web IDE - sign
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.sign.util;
+
+import static org.tizen.common.util.StringUtil.isEmpty;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.InvalidKeyException;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.IllegalBlockSizeException;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.sign.Activator;
+import org.tizen.common.sign.preferences.SigningPreferencePage;
+import org.tizen.common.sign.preferences.SigningProfile;
+import org.tizen.common.sign.preferences.SigningProfileItem;
+import org.tizen.common.util.Assert;
+import org.tizen.common.util.CipherUtil;
+import org.tizen.common.util.IOUtil;
+import org.tizen.common.util.ObjectUtil;
+import org.tizen.common.util.ParsingUtil;
+import org.tizen.common.util.StringUtil;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+public class SigningProfileUtil
+{
+       protected static final String PROFILE_ATTR_NAME = "name"; //$NON-NLS-1$
+
+       protected static final String ELEMENT_PROFILE = "profile"; //$NON-NLS-1$
+       protected static final String PROFILE_ELEMENT_ITEM = "profileitem"; //$NON-NLS-1$
+       
+       public static final String ITEM_ATTR_KEY = "key"; //$NON-NLS-1$
+       public static final String ITEM_ATTR_AUTHOR = "author"; //$NON-NLS-1$
+       public static final String ITEM_ATTR_CA = "ca";  //$NON-NLS-1$
+       public static final String ITEM_ATTR_ROOTCA = "rootca";  //$NON-NLS-1$
+       public static final String ITEM_ATTR_PASS = "password";
+       
+       protected static final String PROFILES_FILE = "profiles.xml"; //$NON-NLS-1$
+       
+       protected static final Logger logger = LoggerFactory.getLogger( SigningProfileUtil.class );
+
+       public static SigningProfileItem createDeveloperItem() throws IOException {
+            final SigningProfileItem profileItem = new SigningProfileItem();
+            
+            profileItem.setKeyLocation( getDeveloperKeyPath() );
+            profileItem.setPassword( SigningPathUtil.DISTRIBUTOR1_PWD.toCharArray() );
+            profileItem.setIdentifier( StringUtil.EMPTY_STRING ); //$NON-NLS-1$
+            profileItem.setAuthor( false );
+            profileItem.setCAPath( SigningProfileUtil.getDeveloperCAPath() );
+            profileItem.setRootCAPath( StringUtil.EMPTY_STRING );
+            
+            return profileItem;
+           }
+       
+       protected static SigningProfileItem createItem( Node node )
+       {
+               if ( !(node instanceof Element ) )
+               {
+                       return null;
+               }
+                       
+               final SigningProfileItem profileItem = new SigningProfileItem();
+               
+               final Element itemElement = (Element) node;
+               
+               final String key = itemElement.getAttribute( ITEM_ATTR_KEY );
+               final String author = itemElement.getAttribute( ITEM_ATTR_AUTHOR );
+               final String ca = itemElement.getAttribute( ITEM_ATTR_CA );
+               final String rootca = itemElement.getAttribute( ITEM_ATTR_ROOTCA );
+               String tempPass = itemElement.getAttribute(ITEM_ATTR_PASS);
+               try {
+            tempPass = CipherUtil.getDecryptedString(tempPass);
+        }
+               catch ( Exception e)
+               {
+            logger.error("Exception occurred while decrypting signing password", e);
+        }
+               
+               final String pass = tempPass;
+               logger.trace( "item - key :{}, author :{}, ca :{}, rootca :{}, pass {}", new Object[] { key, author, ca, rootca, pass} );
+               
+               profileItem.setKeyLocation( key );
+               profileItem.setAuthor( ParsingUtil.parseBoolean( author, false ) );
+               profileItem.setCAPath( ca );
+               profileItem.setRootCAPath( rootca );
+               profileItem.setPassword( pass.toCharArray() );
+               
+               return profileItem;
+       }
+       
+       protected static SigningProfile create( final Node node )
+       {
+       if ( !( node instanceof Element ) )
+       {
+               return null;
+       }
+       
+       final SigningProfile profile = new SigningProfile();
+       final Element profileElement = (Element) node;
+       
+       final String profileName = profileElement.getAttribute( PROFILE_ATTR_NAME );
+       profile.setProfileName( profileName );
+       
+       final NodeList itemNodes = profileElement.getElementsByTagName( PROFILE_ELEMENT_ITEM );
+       for ( int i=0, n = itemNodes.getLength() ; i<n ; ++i )
+       {
+               
+               final SigningProfileItem item = createItem( itemNodes.item( i ) );
+               
+               if ( null == item )
+               {
+                       continue;
+               }
+               else if ( item.isAuthor() )
+               {
+                       profile.setAuthorItem( item );
+               }
+               else
+               {
+                       profile.addProfileItem( item );
+               }
+       }
+       
+       return profile;
+       }
+       
+    public static List<SigningProfile> populateProfiles( final InputStream in )
+    {
+        final List<SigningProfile> ret = new ArrayList<SigningProfile>();
+
+        try {
+            final Document document = XMLUtil.create( in );
+            final Node rootNode = document.getFirstChild();
+
+            if ( !( rootNode instanceof Element ) )
+            {
+               return ret;
+            }
+
+            final Element rootElement = (Element) rootNode;
+            final NodeList profileNodes = rootElement.getElementsByTagName( ELEMENT_PROFILE );
+            for ( int i = 0, n = profileNodes.getLength() ; i < n ; ++i )
+            {
+               final Node profileNode = profileNodes.item( i );
+               
+               SigningProfile profile = create( profileNode );
+               if ( null == profile )
+               {
+                       continue;
+               }
+               ret.add(profile);
+            }
+        } catch (ParserConfigurationException e) {
+            logger.error( "Can't parse xml", e );
+        } catch (SAXException e) {
+               logger.error( "Can't parse xml", e );
+        } catch (IOException e) {
+               logger.error( "Can't parse xml", e );
+        }
+        return ret;
+    }
+
+    public static SigningProfile extractProfile( final InputStream in, final String profileName )
+    {
+       if ( isEmpty( profileName ) )
+       {
+               return null;
+       }
+       
+        try {
+            final Document document = XMLUtil.create( in );
+            final Node rootNode = document.getFirstChild();
+
+            if ( !( rootNode instanceof Element ) )
+            {
+               return null;
+            }
+
+            final Element rootElement = (Element) rootNode;
+            final NodeList profileNodes = rootElement.getElementsByTagName( ELEMENT_PROFILE );
+            for ( int i = 0, n = profileNodes.getLength() ; i < n ; ++i )
+            {
+               final Node profileNode = profileNodes.item( i );
+               
+               final SigningProfile profile = create( profileNode );
+               if ( null == profile )
+               {
+                       continue;
+               }
+               if ( ObjectUtil.equals( profileName, profile.getProfileName()) )
+               {
+                       return profile;
+               }
+            }
+        } catch (ParserConfigurationException e) {
+            logger.error( "Can't parse xml", e );
+        } catch (SAXException e) {
+               logger.error( "Can't parse xml", e );
+        } catch (IOException e) {
+               logger.error( "Can't parse xml", e );
+        }
+        return null;
+    }
+    
+    
+       public static InputStream openProfileFile( File file )
+       {
+               try {
+                       if (!file.exists()) {
+                               return null;
+                       }
+                       
+                       return new FileInputStream( file );
+               }
+               catch ( final IllegalStateException e)
+               {
+                       logger.error( "Can't access state location", e );
+               }
+               catch ( final FileNotFoundException e )
+               {
+                       logger.debug( "Can't open profile", e );
+               }
+               
+               return null;
+       }
+       
+       public static List<SigningProfileItem> parseProfileFile( final InputStream in, final String profileName )
+       {
+               final ArrayList<SigningProfileItem> ret = new ArrayList<SigningProfileItem>();
+               if ( null == in )
+               {
+                       return ret;
+               }
+               
+               final SigningProfile profile = SigningProfileUtil.extractProfile( in, profileName );
+               if ( null == profile )
+               {
+                       return ret;
+               }
+               if ( null != profile.getAuthorItem() )
+               {
+                       ret.add( profile.getAuthorItem() );
+               }
+               ret.addAll( profile.getProfileItemList() );
+               return ret;
+       }
+
+       public static IPreferenceStore getPreferenceStore() {
+           return Activator.getDefault().getPreferenceStore();
+       }
+
+    public static String getProfilesPath() {
+        IPath location = Activator.getDefault().getStateLocation().append( PROFILES_FILE );
+        return location.toPortableString();
+    }
+    
+    public static void writeProfilesAndProfileItems(List<SigningProfile> profileList) {
+        IPath location = Activator.getDefault().getStateLocation();
+        IPath xmlFiePath = location.append("profiles.xml"); //$NON-NLS-1$
+        File file = new File(xmlFiePath.toOSString());
+
+        DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+        DocumentBuilder documentBuilder;
+        try {
+            documentBuilder = documentBuilderFactory.newDocumentBuilder();
+            Document document = documentBuilder.newDocument();
+            Element profilesElement = document.createElement("profiles"); //$NON-NLS-1$
+
+            for (SigningProfile profile : profileList) {
+                Element profileElement = document.createElement("profile"); //$NON-NLS-1$
+                Attr attribute = document.createAttribute("name"); //$NON-NLS-1$
+                attribute.setNodeValue(profile.getProfileName());
+                profileElement.setAttributeNode(attribute);
+                if (profile.getAuthorItem() != null) {
+                    SigningProfileItem authorItem = profile.getAuthorItem();
+                    profileElement.appendChild(createSigningProfileItem(document, authorItem, "true"));
+                }
+                List<SigningProfileItem> profileItemList = profile.getProfileItemList();
+                for (SigningProfileItem profileItem : profileItemList) {
+                    profileElement.appendChild(createSigningProfileItem(document, profileItem, new Boolean(profileItem.isAuthor()).toString()));
+                }
+                
+                profilesElement.appendChild(profileElement);
+            }
+            
+            document.appendChild(profilesElement);
+            TransformerFactory transformerFactory = TransformerFactory.newInstance();
+            Transformer transformer;
+            try {
+                transformer = transformerFactory.newTransformer();
+                DOMSource source = new DOMSource(document);
+                StreamResult result = new StreamResult(new FileOutputStream(file.getPath()));
+                transformer.transform(source, result);
+            } catch (TransformerConfigurationException e) {
+                logger.error( "Can't write a profile", e );
+            } catch (TransformerException e) {
+                logger.error( "Can't write a profile", e );
+            }
+            IFile xmlFile = ResourcesPlugin.getWorkspace().getRoot().getFile(location);
+            xmlFile.refreshLocal(IResource.DEPTH_INFINITE, null);
+        }
+        catch ( final ParserConfigurationException e )
+        {
+            logger.error( "Can't write a profile", e );
+        }
+        catch ( final FileNotFoundException e )
+        {
+            logger.error( "Can't write a profile", e );
+        }
+        catch ( final Exception e )
+        {
+            logger.error( "Can't write a profile", e );
+        }
+    }
+    
+    private static Element createSigningProfileItem(Document document, SigningProfileItem item, String author) {
+        Element profileItemElement = document.createElement("profileitem"); //$NON-NLS-1$
+        Attr keyAttr = document.createAttribute(SigningProfileUtil.ITEM_ATTR_KEY); //$NON-NLS-1$
+        keyAttr.setNodeValue(item.getKeyLocation());
+        Attr caAttr = document.createAttribute(SigningProfileUtil.ITEM_ATTR_CA);
+        caAttr.setNodeValue(item.getCAPath());
+        Attr rootCaAttr = document.createAttribute(SigningProfileUtil.ITEM_ATTR_ROOTCA);
+        rootCaAttr.setNodeValue(item.getRootCAPath());
+        Attr passAttr = document.createAttribute(SigningProfileUtil.ITEM_ATTR_PASS);
+        String pass = new String(item.getPassword());
+        try {
+            pass = CipherUtil.getEncryptedString(pass);
+        }
+        catch ( final Exception e )
+        {
+            logger.error("Exception occurred while encrypting signing password", e);
+        }
+        passAttr.setNodeValue(pass);
+        Attr authorAttr = document.createAttribute(SigningProfileUtil.ITEM_ATTR_AUTHOR); //$NON-NLS-1$
+        authorAttr.setNodeValue(author); //$NON-NLS-1$
+        profileItemElement.setAttributeNode(keyAttr);
+        profileItemElement.setAttributeNode(authorAttr);
+        profileItemElement.setAttributeNode(caAttr);
+        profileItemElement.setAttributeNode(rootCaAttr);
+        profileItemElement.setAttributeNode(passAttr);
+        return profileItemElement;
+    }
+    
+    public static List<SigningProfile> populateProfiles() {
+
+        List<SigningProfile> profileList = new ArrayList<SigningProfile>();
+        IPath location = Activator.getDefault().getStateLocation();
+        IPath filePath = location.append("profiles.xml"); //$NON-NLS-1$
+        File file = new File(filePath.toOSString());
+
+        if (!file.exists()) {
+            return profileList;
+        }
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        DocumentBuilder builder;
+        try {
+            builder = factory.newDocumentBuilder();
+            Document document = builder.parse(file);
+            Node rootNode = document.getFirstChild();
+
+            if (rootNode != null && rootNode instanceof Element) {
+                Element rootElement = (Element) rootNode;
+                NodeList profileNodes = rootElement.getElementsByTagName("profile"); //$NON-NLS-1$
+                for (int i = 0; i < profileNodes.getLength(); i++) {
+                    Node profileNode = profileNodes.item(i);
+                    if (profileNode instanceof Element) {
+                        SigningProfile profile = new SigningProfile();
+                        Element profileElement = (Element) profileNode;
+                        String profileName = profileElement.getAttribute("name"); //$NON-NLS-1$
+                        profile.setProfileName(profileName);
+                        NodeList profileItemNodes = profileElement.getElementsByTagName("profileitem"); //$NON-NLS-1$
+                        for (int j = 0; j < profileItemNodes.getLength(); j++) {
+                            Node profileItemNode = profileItemNodes.item(j);
+                            if (profileItemNode instanceof Element) {
+                                SigningProfileItem profileItem = new SigningProfileItem();
+                                Element profileItemElement = (Element) profileItemNode;
+                                String profileItemKey = profileItemElement.getAttribute("key"); //$NON-NLS-1$
+                                profileItem.setKeyLocation(profileItemKey);
+                                String profileItemIdentifier = profileItemElement.getAttribute("identifier"); //$NON-NLS-1$
+                                profileItem.setIdentifier(profileItemIdentifier);
+                                String ca = profileItemElement.getAttribute(SigningProfileUtil.ITEM_ATTR_CA);
+                                profileItem.setCAPath(ca);
+                                String pass = profileItemElement.getAttribute(SigningProfileUtil.ITEM_ATTR_PASS);
+                                try {
+                                    pass = CipherUtil.getDecryptedString(pass);
+                                }
+                                catch (Exception e)
+                                {
+                                    logger.error("Exception occurred while decrypting signing password", e);
+                                }
+                                profileItem.setPassword(pass.toCharArray());
+                                String rootCA = profileItemElement.getAttribute(SigningProfileUtil.ITEM_ATTR_ROOTCA);
+                                profileItem.setRootCAPath(rootCA);
+                                String profileItemAuthor = profileItemElement.getAttribute(SigningProfileUtil.ITEM_ATTR_AUTHOR); //$NON-NLS-1$
+                                if (profileItemAuthor.compareTo("true") == 0) { //$NON-NLS-1$
+                                    profileItem.setAuthor(true);
+                                    profile.setAuthorItem(profileItem);
+                                } else {
+                                    profileItem.setAuthor(false);
+                                    profile.addProfileItem(profileItem);
+                                }
+                            }
+                        }
+                        profileList.add(profile);
+                    }
+                }
+            }
+        } catch (ParserConfigurationException e) {
+            logger.error( "Can't read profiles", e );
+        } catch (SAXException e) {
+            logger.error( "Can't read profiles", e );
+        } catch (IOException e) {
+            logger.error( "Can't read profiles", e );
+        }
+        return profileList;
+    
+    }
+    
+    public static String getAuthorCAPath() {
+        return SigningPathUtil.getAuthorCAPath();
+    }
+    
+    public static String getDeveloperKeyPath() {
+        return SigningPathUtil.getDeveloperKeyPath(); 
+    }
+    
+    public static String getDeveloperCAPath() {
+        return SigningPathUtil.getDeveloperCAPath();
+    }
+    
+    public static SigningProfile getDefaultProfile(List<SigningProfile> profileList) {
+        IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore();
+        
+        String defaultProfile = preferenceStore.getString(SigningPreferencePage.defaultProfileKey);
+        
+        if(defaultProfile == null) {
+            return null;
+        }
+        for(SigningProfile profile: profileList) {
+            if(defaultProfile.equals(profile.getProfileName())) {
+                return profile;
+            }
+        }
+        return null;
+    }
+    
+    public static boolean hasKeyLocation( final SigningProfileItem item ) {
+        Assert.notNull( item );
+        
+        final String keyLocation = item.getKeyLocation();
+        
+        return ( keyLocation == null ) ? false : !keyLocation.trim().isEmpty();
+    }
+    
+    /**
+     * Whether a profile item has password or not 
+     * @param item {@link SigningProfileItem}
+     * @return If has password, return true. otherwise, return false.
+     */
+    public static boolean hasPassword( final SigningProfileItem item ) {
+        Assert.notNull( item );
+        
+        final char[] password = item.getPassword();
+        
+        return ( password == null ) ? false : !( new String( password ).trim().isEmpty() );
+    }
+    
+    /**
+     * Getter for element by profile name
+     * @param doc Document
+     * @param profileName profile name
+     * @return profile Element
+     */
+    protected static Element getProfileElement(Document doc, String profileName) {
+        Assert.notNull( doc );
+        Assert.notNull( profileName );
+        
+        NodeList profileNodeList = doc.getElementsByTagName( ELEMENT_PROFILE );
+        for ( int i = 0; i < profileNodeList.getLength(); i++ ) {
+            Node profileNode = profileNodeList.item( i );
+            boolean matched = XMLUtil.isElementByAttributeWithValue( profileNode, PROFILE_ATTR_NAME, profileName );
+            if ( matched ) {
+                return (Element) profileNode;
+            }
+        }
+        
+        return null;
+    }
+    
+    public static InputStream updateProfiles( InputStream in, final String profileName, final List<SigningProfileItem> items )
+            throws ParserConfigurationException, SAXException, IOException, TransformerException {
+        Assert.notNull( in );
+        Assert.notNull( profileName );
+        Assert.notNull( items );
+        
+        // read current model
+        Document doc = XMLUtil.create( in );
+        
+        // find profile
+        Element profileElement = getProfileElement( doc, profileName );
+        if ( profileElement == null ) {
+            // not found profile element. cannot update profile
+            return null;
+        }
+        
+        // remove old profile items
+        XMLUtil.removeChildElements( profileElement );
+        
+        // add new profile items
+        for ( SigningProfileItem item : items ) {
+            Element itemElement = createSigningProfileItem( doc, item, item.isAuthor() ? "true" : "false" );
+            profileElement.appendChild( itemElement );
+        }
+        
+        // get stream
+        // TODO: will improve to effective solution.
+        ByteArrayOutputStream outputStream = null;
+        try {
+            outputStream = XMLUtil.createOutputStreamFromDocument( doc );
+        } finally {
+            IOUtil.tryClose( outputStream );
+        }
+        
+        return new ByteArrayInputStream( outputStream.toByteArray() );
+    }
+}
diff --git a/org.tizen.common.sign/src/org/tizen/common/sign/util/XMLUtil.java b/org.tizen.common.sign/src/org/tizen/common/sign/util/XMLUtil.java
new file mode 100644 (file)
index 0000000..a1c01da
--- /dev/null
@@ -0,0 +1,228 @@
+/*
+ * Web IDE - sign
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.sign.util;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.tizen.common.util.Assert;
+import org.tizen.common.util.FileUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+/**
+ * <p>
+ * XMLUtil.
+ * 
+ * Util class for DOM
+ * 
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class XMLUtil
+{
+    
+    public static final String FILE_EXT_XML = "xml";
+    
+    /**
+     * Create {@link Document}
+     * 
+     * @param in {@link InputStream} to provide xml contents
+     * 
+     * @return {@link Document} to be created
+     * 
+     * @throws ParserConfigurationException When {@link DocumentBuilder} can't be created
+     * @throws SAXException When xml can't be parsed
+     * @throws IOException When <code>in</code> throw {@link IOException}
+     */
+    public static
+    Document
+    create(
+        final InputStream in
+    )
+    throws ParserConfigurationException, SAXException, IOException
+    {
+        final DocumentBuilderFactory factory =
+            DocumentBuilderFactory.newInstance();
+        
+        final DocumentBuilder builder = factory.newDocumentBuilder();
+        
+        return builder.parse( in );
+    }
+
+
+    /**
+     * Create empty {@link Document}
+     * 
+     * @return {@link Document} to be created
+     * 
+     * @throws ParserConfigurationException When {@link DocumentBuilder} can't be created
+     */
+    public static
+    Document
+    create()
+    throws ParserConfigurationException
+    {
+        final DocumentBuilderFactory factory =
+            DocumentBuilderFactory.newInstance();
+        
+        final DocumentBuilder builder = factory.newDocumentBuilder();
+        
+        return builder.newDocument();
+    }
+
+    /**
+     * All of the child nodes are removed.
+     * @param element
+     */
+    public static void removeChildElements(Element element) {
+        Assert.notNull( element );
+        
+        while ( element.hasChildNodes() ) {
+            element.removeChild( element.getFirstChild() );
+        }
+    }
+    
+    /**
+     * Whether element has attribute value with name
+     * @param node Element instance
+     * @param attributeName attribute name
+     * @param attributeValue attribute value
+     * @return
+     */
+    public static boolean isElementByAttributeWithValue(Node node, String attributeName, String attributeValue) {
+        Assert.notNull( node );
+        Assert.notNull( attributeName );
+        Assert.notNull( attributeValue );
+        
+        if ( node instanceof Element ) {
+            String attribute = ( (Element) node ).getAttribute( attributeName );
+            return attributeValue.equals( attribute );
+        }
+        
+        return false;
+    }
+    
+    /**
+     * Write stream from Document. and return this.
+     * @param doc Document
+     * @return a writed ByteArrayOutputStream
+     * @throws TransformerException
+     */
+    public static ByteArrayOutputStream createOutputStreamFromDocument(Document doc) throws TransformerException {
+        Assert.notNull( doc );
+        
+        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+        
+        TransformerFactory transformerFactory = TransformerFactory.newInstance();
+        Transformer transformer = transformerFactory.newTransformer();
+        
+        transformer.transform( new DOMSource( doc ), new StreamResult( outStream ) );
+        
+        return outStream;
+    }
+    
+    
+    /**
+     * 
+     * Get document root from file. return null if file is not xml.
+     * 
+     * @param file XML file.
+     * @return root element of the file
+     * @throws Exception
+     * @author ho.namkoong{@literal <ho.namkoong@samsung.com>}
+     */
+    public static Element getDocumentRootFromFile(File file) throws Exception {
+        Assert.notNull(file);
+        
+        if(!file.isFile() || !FileUtil.getFileExtension(file.getName()).equals(FILE_EXT_XML)) {
+            return null;
+        }
+        URL fileUrl = file.toURI().toURL();
+        InputStream in = fileUrl.openStream();
+        Document fileDoc = create(in);
+        return fileDoc.getDocumentElement();
+    }
+    
+    /**
+     * 
+     * Get child elements whose name is tag from the parent element.
+     * 
+     * @param parent parent element
+     * @param tag name of the child elements.
+     * @return
+     */
+    public static List<Element> getElementsByTag(Element parent, String tag) {
+        Assert.notNull(parent);
+        Assert.notNull(tag);
+        
+        List<Element> result = new ArrayList<Element>();
+        NodeList nodeList = parent.getElementsByTagName(tag);
+        for(int i=0; i<nodeList.getLength(); i++) {
+            Node node = nodeList.item(i);
+            if(node.getNodeType() == Node.ELEMENT_NODE) {
+            result.add((Element) node);
+            }
+        }
+        return result;
+    }
+    
+    /**
+     * Returns the Children of the Element.
+     * @param element
+     * @return List of the child elements
+     * 
+     * @since 4.0
+     */
+    public static List<Element> getChildrenOfElement(Element element) {
+        List<Element> list = new ArrayList<Element>();
+        NodeList children = element.getChildNodes();
+        for (int i = 0, l = children.getLength(); i < l; i++) {
+            Node child = children.item(i);
+            if (child.getNodeType() == Node.ELEMENT_NODE) {
+                list.add((Element) child);
+            }
+        }
+        return list;
+    }
+}
diff --git a/org.tizen.common.verrari.realm/.classpath b/org.tizen.common.verrari.realm/.classpath
new file mode 100755 (executable)
index 0000000..fa424aa
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<classpath>\r
+       <classpathentry exported="true" kind="lib" path="lib/jackson-core-lgpl-1.9.7.jar"/>\r
+       <classpathentry exported="true" kind="lib" path="lib/jackson-mapper-lgpl-1.9.7.jar"/>\r
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>\r
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>\r
+       <classpathentry kind="src" path="src"/>\r
+       <classpathentry kind="src" path="test/src"/>\r
+       <classpathentry kind="output" path="bin"/>\r
+</classpath>\r
diff --git a/org.tizen.common.verrari.realm/.project b/org.tizen.common.verrari.realm/.project
new file mode 100755 (executable)
index 0000000..c0eb45c
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+       <name>org.tizen.common.verrari.realm</name>\r
+       <comment></comment>\r
+       <projects>\r
+       </projects>\r
+       <buildSpec>\r
+               <buildCommand>\r
+                       <name>org.eclipse.jdt.core.javabuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.pde.ManifestBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+               <buildCommand>\r
+                       <name>org.eclipse.pde.SchemaBuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+       </buildSpec>\r
+       <natures>\r
+               <nature>org.eclipse.pde.PluginNature</nature>\r
+               <nature>org.eclipse.jdt.core.javanature</nature>\r
+       </natures>\r
+</projectDescription>\r
diff --git a/org.tizen.common.verrari.realm/.settings/org.eclipse.jdt.core.prefs b/org.tizen.common.verrari.realm/.settings/org.eclipse.jdt.core.prefs
new file mode 100755 (executable)
index 0000000..f287d53
--- /dev/null
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1\r
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled\r
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6\r
+org.eclipse.jdt.core.compiler.compliance=1.6\r
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error\r
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error\r
+org.eclipse.jdt.core.compiler.source=1.6\r
diff --git a/org.tizen.common.verrari.realm/META-INF/MANIFEST.MF b/org.tizen.common.verrari.realm/META-INF/MANIFEST.MF
new file mode 100755 (executable)
index 0000000..1e105c3
--- /dev/null
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.tizen.common.verrari.realm
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.tizen.common;bundle-version="1.0.0",
+ org.tizen.common.verrari;bundle-version="1.0.0"
+Bundle-ClassPath: lib/jackson-core-lgpl-1.9.7.jar,
+ lib/jackson-mapper-lgpl-1.9.7.jar,
+ .
+Export-Package: org.tizen.common.verrari,
+ org.tizen.common.verrari.realm,
+ org.tizen.common.verrari.storage,
+ org.tizen.common.verrari.template
diff --git a/org.tizen.common.verrari.realm/OSGI-INF/l10n/bundle.properties b/org.tizen.common.verrari.realm/OSGI-INF/l10n/bundle.properties
new file mode 100755 (executable)
index 0000000..154bf2e
--- /dev/null
@@ -0,0 +1,3 @@
+#Properties file for org.tizen.common.verrari
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen Verrari Client
\ No newline at end of file
diff --git a/org.tizen.common.verrari.realm/about.html b/org.tizen.common.verrari.realm/about.html
new file mode 100644 (file)
index 0000000..26afbd2
--- /dev/null
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May, 2011</p>
+<h3>Tizen SDK</h3>
+
+<p><a href="http://www.tizen.org/" target="_blank">Tizen SDK</a>
+is a set of Eclipse plug-ins that helps programmers to develop applications for
+the mobile platform.</p>
+
+<h3>License</h3>
+
+<p>See <a href="about_files/LICENSE-2.0.htm">Apache License, Version 2.0</a>.</p>
+
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as set out below. If you did not
+receive this Content directly from the Eclipse Foundation, the following is provided for informational
+purposes only, and you should look to the Redistributor's license for terms and conditions of use.</p>
+
+
+<h4>Jackson</h4>
+<p>
+High-performance JSON processor.
+</p>
+
+<p>
+A copy of the license is included in <a href="about_files/LGPL-2.1.txt">about_files/LGPL-2.1.txt</a>. The home page is located at:
+<ul>
+<a href="http://jackson.codehaus.org/">http://jackson.codehaus.org/</a>
+</ul>
+</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.common.verrari.realm/about_files/LGPL-2.1.txt b/org.tizen.common.verrari.realm/about_files/LGPL-2.1.txt
new file mode 100644 (file)
index 0000000..583509c
--- /dev/null
@@ -0,0 +1,504 @@
+          GNU LESSER GENERAL PUBLIC LICENSE
+               Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+                Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+\f
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+\f
+          GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+\f
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+\f
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+\f
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+\f
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+\f
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+\f
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+             END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/org.tizen.common.verrari.realm/about_files/LICENSE-2.0.htm b/org.tizen.common.verrari.realm/about_files/LICENSE-2.0.htm
new file mode 100644 (file)
index 0000000..ac23664
--- /dev/null
@@ -0,0 +1,187 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache License, Version 2.0</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+    <link rel="stylesheet" type="text/css" media="screen" href="/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="/css/code.css">
+
+    <script type="text/javascript" src="/js/jquery.js"></script>
+    <script type="text/javascript" src="/js/apache_boot.js"></script>
+
+    <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License.  You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License. -->
+  </head>
+
+  <body>
+    <div id="page" class="container_16">
+      <div id="header" class="grid_8">
+        <h1>The Apache Software Foundation</h1>
+        <h2>Apache License, Version 2.0</h2>
+      </div>
+
+      <div class="clear"></div>
+      <div id="content" class="grid_16"><div class="section-content"><p>Apache License<br></br>Version 2.0, January 2004<br></br>
+<a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a> </p>
+<p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p>
+<p><strong><a name="definitions">1. Definitions</a></strong>.</p>
+<p>"License" shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.</p>
+<p>"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.</p>
+<p>"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control with
+that entity. For the purposes of this definition, "control" means (i) the
+power, direct or indirect, to cause the direction or management of such
+entity, whether by contract or otherwise, or (ii) ownership of fifty
+percent (50%) or more of the outstanding shares, or (iii) beneficial
+ownership of such entity.</p>
+<p>"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.</p>
+<p>"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.</p>
+<p>"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media types.</p>
+<p>"Work" shall mean the work of authorship, whether in Source or Object form,
+made available under the License, as indicated by a copyright notice that
+is included in or attached to the work (an example is provided in the
+Appendix below).</p>
+<p>"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent, as
+a whole, an original work of authorship. For the purposes of this License,
+Derivative Works shall not include works that remain separable from, or
+merely link (or bind by name) to the interfaces of, the Work and Derivative
+Works thereof.</p>
+<p>"Contribution" shall mean any work of authorship, including the original
+version of the Work and any modifications or additions to that Work or
+Derivative Works thereof, that is intentionally submitted to Licensor for
+inclusion in the Work by the copyright owner or by an individual or Legal
+Entity authorized to submit on behalf of the copyright owner. For the
+purposes of this definition, "submitted" means any form of electronic,
+verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems that
+are managed by, or on behalf of, the Licensor for the purpose of discussing
+and improving the Work, but excluding communication that is conspicuously
+marked or otherwise designated in writing by the copyright owner as "Not a
+Contribution."</p>
+<p>"Contributor" shall mean Licensor and any individual or Legal Entity on
+behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.</p>
+<p><strong><a name="copyright">2. Grant of Copyright License</a></strong>. Subject to the
+terms and conditions of this License, each Contributor hereby grants to You
+a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of, publicly
+display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.</p>
+<p><strong><a name="patent">3. Grant of Patent License</a></strong>. Subject to the terms
+and conditions of this License, each Contributor hereby grants to You a
+perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made, use,
+offer to sell, sell, import, and otherwise transfer the Work, where such
+license applies only to those patent claims licensable by such Contributor
+that are necessarily infringed by their Contribution(s) alone or by
+combination of their Contribution(s) with the Work to which such
+Contribution(s) was submitted. If You institute patent litigation against
+any entity (including a cross-claim or counterclaim in a lawsuit) alleging
+that the Work or a Contribution incorporated within the Work constitutes
+direct or contributory patent infringement, then any patent licenses
+granted to You under this License for that Work shall terminate as of the
+date such litigation is filed.</p>
+<p><strong><a name="redistribution">4. Redistribution</a></strong>. You may reproduce and
+distribute copies of the Work or Derivative Works thereof in any medium,
+with or without modifications, and in Source or Object form, provided that
+You meet the following conditions:</p>
+<ol>
+<li>
+<p>You must give any other recipients of the Work or Derivative Works a
+copy of this License; and</p>
+</li>
+<li>
+<p>You must cause any modified files to carry prominent notices stating
+that You changed the files; and</p>
+</li>
+<li>
+<p>You must retain, in the Source form of any Derivative Works that You
+distribute, all copyright, patent, trademark, and attribution notices from
+the Source form of the Work, excluding those notices that do not pertain to
+any part of the Derivative Works; and</p>
+</li>
+<li>
+<p>If the Work includes a "NOTICE" text file as part of its distribution,
+then any Derivative Works that You distribute must include a readable copy
+of the attribution notices contained within such NOTICE file, excluding
+those notices that do not pertain to any part of the Derivative Works, in
+at least one of the following places: within a NOTICE text file distributed
+as part of the Derivative Works; within the Source form or documentation,
+if provided along with the Derivative Works; or, within a display generated
+by the Derivative Works, if and wherever such third-party notices normally
+appear. The contents of the NOTICE file are for informational purposes only
+and do not modify the License. You may add Your own attribution notices
+within Derivative Works that You distribute, alongside or as an addendum to
+the NOTICE text from the Work, provided that such additional attribution
+notices cannot be construed as modifying the License.
+You may add Your own copyright statement to Your modifications and may
+provide additional or different license terms and conditions for use,
+reproduction, or distribution of Your modifications, or for any such
+Derivative Works as a whole, provided Your use, reproduction, and
+distribution of the Work otherwise complies with the conditions stated in
+this License.</p>
+</li>
+</ol>
+<p><strong><a name="contributions">5. Submission of Contributions</a></strong>. Unless You
+explicitly state otherwise, any Contribution intentionally submitted for
+inclusion in the Work by You to the Licensor shall be under the terms and
+conditions of this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify the
+terms of any separate license agreement you may have executed with Licensor
+regarding such Contributions.</p>
+<p><strong><a name="trademarks">6. Trademarks</a></strong>. This License does not grant
+permission to use the trade names, trademarks, service marks, or product
+names of the Licensor, except as required for reasonable and customary use
+in describing the origin of the Work and reproducing the content of the
+NOTICE file.</p>
+<p><strong><a name="no-warranty">7. Disclaimer of Warranty</a></strong>. Unless required by
+applicable law or agreed to in writing, Licensor provides the Work (and
+each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
+without limitation, any warranties or conditions of TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You
+are solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your exercise
+of permissions under this License.</p>
+<p><strong><a name="no-liability">8. Limitation of Liability</a></strong>. In no event and
+under no legal theory, whether in tort (including negligence), contract, or
+otherwise, unless required by applicable law (such as deliberate and
+grossly negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a result
+of this License or out of the use or inability to use the Work (including
+but not limited to damages for loss of goodwill, work stoppage, computer
+failure or malfunction, or any and all other commercial damages or losses),
+even if such Contributor has been advised of the possibility of such
+damages.</p>
+<p><strong><a name="additional">9. Accepting Warranty or Additional Liability</a></strong>.
+While redistributing the Work or Derivative Works thereof, You may choose
+to offer, and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this License.
+However, in accepting such obligations, You may act only on Your own behalf
+and on Your sole responsibility, not on behalf of any other Contributor,
+and only if You agree to indemnify, defend, and hold each Contributor
+harmless for any liability incurred by, or claims asserted against, such
+Contributor by reason of your accepting any such warranty or additional
+liability.</p>
+<p>END OF TERMS AND CONDITIONS</p>
+
+    <div class="clear"></div>
+    </div>
+    <div id="copyright" class="container_16">
+      <p>Copyright &#169; 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+    </div>
+  </body>
+</html>
diff --git a/org.tizen.common.verrari.realm/build.properties b/org.tizen.common.verrari.realm/build.properties
new file mode 100755 (executable)
index 0000000..53214e1
--- /dev/null
@@ -0,0 +1,8 @@
+source.. = src/\r
+output.. = bin/\r
+bin.includes = META-INF/,\\r
+               .,\\r
+               about.html,\\r
+               about_files/,\\r
+               OSGI-INF/,\\r
+               lib/\r
diff --git a/org.tizen.common.verrari.realm/build.xml b/org.tizen.common.verrari.realm/build.xml
new file mode 100755 (executable)
index 0000000..3b46315
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<project name="org.tizen.common.verrari.realm" default="build-realm">\r
+    <target name="build-realm">\r
+       <jar destfile="test/src/org/tizen/common/verrari/realm.jar" manifest="test/doc/realm/META-INF/MANIFEST.MF">\r
+               <fileset dir="test/doc/realm"></fileset>\r
+       </jar>\r
+       <jar destfile="test/src/org/tizen/common/verrari/template/simple-template.jar" manifest="test/doc/simple_template/META-INF/MANIFEST.MF">\r
+               <fileset dir="test/doc/simple_template"></fileset>\r
+       </jar>\r
+       <jar destfile="test/src/org/tizen/common/verrari/template/complex-template.jar" manifest="test/doc/complex_template/META-INF/MANIFEST.MF">\r
+               <fileset dir="test/doc/complex_template"></fileset>\r
+       </jar>\r
+    </target>\r
+</project>\r
diff --git a/org.tizen.common.verrari.realm/lib/jackson-core-lgpl-1.9.7.jar b/org.tizen.common.verrari.realm/lib/jackson-core-lgpl-1.9.7.jar
new file mode 100755 (executable)
index 0000000..018d32f
Binary files /dev/null and b/org.tizen.common.verrari.realm/lib/jackson-core-lgpl-1.9.7.jar differ
diff --git a/org.tizen.common.verrari.realm/lib/jackson-mapper-lgpl-1.9.7.jar b/org.tizen.common.verrari.realm/lib/jackson-mapper-lgpl-1.9.7.jar
new file mode 100755 (executable)
index 0000000..dc38752
Binary files /dev/null and b/org.tizen.common.verrari.realm/lib/jackson-mapper-lgpl-1.9.7.jar differ
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/AttributeConfiguable.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/AttributeConfiguable.java
new file mode 100755 (executable)
index 0000000..88c42ef
--- /dev/null
@@ -0,0 +1,50 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+import java.util.Map;\r
+\r
+/**\r
+ * <p>\r
+ * AttributeConfiguable\r
+ * \r
+ * interface to configure attribute\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ */\r
+public interface\r
+AttributeConfiguable\r
+{\r
+    /**\r
+     * Set attribute set\r
+     * \r
+     * @param attrs attribute set\r
+     */\r
+    void setAttributes( Map<String, String> attrs );\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/AttributeContainer.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/AttributeContainer.java
new file mode 100755 (executable)
index 0000000..6b8ac77
--- /dev/null
@@ -0,0 +1,60 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+import java.util.Collection;\r
+\r
+\r
+/**\r
+ * <p>\r
+ * AttributeContainer\r
+ * \r
+ * interface to provide attibutes\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ */\r
+public interface\r
+AttributeContainer\r
+{\r
+    /**\r
+     * return attibutes' keys\r
+     * \r
+     * @return keys\r
+     */\r
+    Collection<String> getAttributeKeys();\r
+    \r
+    /**\r
+     * return attribute value for <code>key</code>\r
+     * \r
+     * @param key attribute key\r
+     * \r
+     * @return attribute value\r
+     */\r
+    String getAttribute( final String key );\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/Condition.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/Condition.java
new file mode 100755 (executable)
index 0000000..0df26fb
--- /dev/null
@@ -0,0 +1,135 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+import java.io.Serializable;\r
+\r
+\r
+\r
+/**\r
+ * <p>\r
+ * Condition\r
+ * \r
+ * search condition\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see SearchableRealm\r
+ */\r
+public class\r
+Condition\r
+implements Serializable\r
+{\r
+    private static final long serialVersionUID = -1254191699371474861L;\r
+    \r
+    /**\r
+     * Search condition's operation type\r
+     */\r
+    public enum Operation {\r
+        Equals,\r
+        Contains,\r
+        CaseInsensitiveContains\r
+    }\r
+\r
+    /**\r
+     * left object\r
+     */\r
+    protected Object left;\r
+    \r
+    /**\r
+     * right object\r
+     */\r
+    protected Object right;\r
+    \r
+    /**\r
+     * comparision operation\r
+     */\r
+    protected Operation operation;\r
+\r
+    /**\r
+     * constructor with operation, left operand and right operand\r
+     * \r
+     * @param op operation\r
+     * @param left left operand\r
+     * @param right right operand\r
+     */\r
+    public\r
+    Condition(\r
+        final Operation op,\r
+        final Object left,\r
+        final Object right\r
+    )\r
+    {\r
+        this.operation = op;\r
+        this.left = left;\r
+        this.right = right;\r
+    }\r
+    \r
+    /**\r
+     * constructor with operation and right operand\r
+     * \r
+     * @param op operation\r
+     * @param right right operand\r
+     */\r
+    public Condition( final Operation op, final String right )\r
+    {\r
+        this( op, null, right );\r
+    }\r
+    \r
+    /**\r
+     * return operation\r
+     * \r
+     * @return operation\r
+     */\r
+    public Operation getOperation()\r
+    {\r
+        return this.operation;\r
+    }\r
+    \r
+    /**\r
+     * return left operand\r
+     * \r
+     * @return left object\r
+     */\r
+    public Object getLeft() \r
+    {\r
+        return this.left;\r
+    }\r
+    \r
+    /**\r
+     * return right operand\r
+     * \r
+     * @return right object\r
+     */\r
+    public Object getRight()\r
+    {\r
+        return this.right;\r
+    }\r
+    \r
+    \r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/Realm.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/Realm.java
new file mode 100755 (executable)
index 0000000..1a3660b
--- /dev/null
@@ -0,0 +1,56 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+import java.io.IOException;\r
+\r
+\r
+/**\r
+ * <p>\r
+ * Realm\r
+ * \r
+ * repository for template\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public interface\r
+Realm\r
+extends AttributeContainer\r
+{\r
+    /**\r
+     * <p>\r
+     * return template for <code>id</code>\r
+     * </p>\r
+     * \r
+     * @param id template id\r
+     * \r
+     * @return template for id\r
+     * \r
+     * @throws IOException If template can't be accessible\r
+     */\r
+    Template getTemplate( String id ) throws IOException;\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/RealmFactory.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/RealmFactory.java
new file mode 100755 (executable)
index 0000000..55dcb9b
--- /dev/null
@@ -0,0 +1,294 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+import static org.tizen.common.util.IOUtil.getBytes;\r
+import static org.tizen.common.util.IOUtil.tryClose;\r
+import static org.tizen.common.util.StringUtil.nvl;\r
+import static org.tizen.common.util.StringUtil.trim;\r
+\r
+import java.io.ByteArrayInputStream;\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+import java.net.URL;\r
+import java.net.URLConnection;\r
+import java.util.Enumeration;\r
+import java.util.HashMap;\r
+import java.util.Iterator;\r
+import java.util.Map;\r
+import java.util.jar.Attributes;\r
+import java.util.jar.Manifest;\r
+\r
+import org.codehaus.jackson.JsonNode;\r
+import org.codehaus.jackson.map.ObjectMapper;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.tizen.common.FactoryWithArgument;\r
+import org.tizen.common.classloader.ClassSource;\r
+import org.tizen.common.classloader.CustomClassLoader;\r
+import org.tizen.common.classloader.JarClassSource;\r
+import org.tizen.common.verrari.realm.RealmConstants;\r
+import org.tizen.common.verrari.util.QueryFactory;\r
+\r
+/**\r
+ * <p>\r
+ * RealmFactory\r
+ * \r
+ * Factory to create {@link Realm} using realm definition\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class\r
+RealmFactory\r
+implements FactoryWithArgument<Realm, URL>\r
+{\r
+    /**\r
+     * singleton instance\r
+     */\r
+    protected static final RealmFactory instance = new RealmFactory();\r
+    \r
+    /**\r
+     * logger for this object\r
+     */\r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+    \r
+    /**\r
+     * access method for singleton object\r
+     * \r
+     * @return singleton instance\r
+     */\r
+    public static RealmFactory getInstance()\r
+    {\r
+        return instance;\r
+    }\r
+    \r
+    /**\r
+     * Read and parse realm definition from <code>in</code>\r
+     * \r
+     * @param in {@link InputStream} to provide realm definition\r
+     * @param contentType contents type of <code>in</code>\r
+     * \r
+     * @return attributes {@link Map}\r
+     * \r
+     * @throws IOException If can't read from <code>in</code>\r
+     */\r
+    protected\r
+    Map<String, String>\r
+    parseRealm(\r
+        final InputStream in,\r
+        final String contentType\r
+    ) throws IOException\r
+    {\r
+        HashMap<String, String> attrs = null;\r
+        \r
+        final byte[] bytes = getBytes( in );\r
+        logger.debug( "Realm config :\n{}", new String( bytes ) );\r
+        \r
+        \r
+        final ByteArrayInputStream byteIn = new ByteArrayInputStream( bytes );\r
+        \r
+        attrs = new HashMap<String, String>();\r
+        final ObjectMapper mapper = new ObjectMapper();\r
+        JsonNode node = mapper.readValue( byteIn, JsonNode.class );\r
+        \r
+        for ( final Iterator<String> iter = node.getFieldNames() ; iter.hasNext() ; )\r
+        {\r
+            final String key = iter.next();\r
+            attrs.put( key, node.get( key ).asText() );\r
+        }\r
+        logger.debug( "Realm Attributes :{}", attrs );\r
+\r
+        return attrs;\r
+    }\r
+    \r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.FactoryWithArgument#create(java.lang.Object)\r
+     */\r
+    @Override\r
+    public\r
+    Realm\r
+    create(\r
+        final URL url\r
+    ) {\r
+        \r
+        try\r
+        {\r
+            final URLConnection con = url.openConnection();\r
+            con.connect();\r
+            final InputStream in = con.getInputStream();\r
+            \r
+            try\r
+            {\r
+                \r
+                final String contentType =\r
+                    nvl( con.getContentType(), RealmConstants.MIME_JSON );\r
+                \r
+                logger.debug( "Contents mime :{}", contentType );\r
+\r
+                final Map<String, String> attrs = parseRealm( in, contentType );\r
+                \r
+                if ( null == attrs )\r
+                {\r
+                    throw new IllegalArgumentException( "Realm[" + url + "] not found" );\r
+                }\r
+                final String loader = QueryFactory.getInstance().query( attrs.get( RealmConstants.ATTR_LOADER ), new HashMap<String, Object>() );\r
+                logger.debug( "Loader :{}", loader );\r
+                final ClassSource source = new JarClassSource( loader );\r
+                logger.debug( "Source :{}", source );\r
+                final ClassLoader old = Thread.currentThread().getContextClassLoader();\r
+                logger.debug( "Context classloader :{}", old );\r
+                final CustomClassLoader cl = new CustomClassLoader( Thread.currentThread().getContextClassLoader(), source );\r
+                \r
+                Realm realm = load( cl, attrs );\r
+                \r
+                if ( null == realm )\r
+                {\r
+                    logger.warn( "Realm[{}] not found", loader );\r
+                }\r
+                return realm;\r
+                \r
+            }\r
+            finally\r
+            {\r
+                tryClose( in );\r
+            }\r
+        }\r
+        catch ( final IOException e )\r
+        {\r
+            throw new IllegalArgumentException( e );\r
+        }\r
+        catch ( final ClassNotFoundException e )\r
+        {\r
+            throw new IllegalStateException( e );\r
+        }\r
+        catch ( final InstantiationException e )\r
+        {\r
+            throw new IllegalStateException( e );\r
+        }\r
+        catch ( final IllegalAccessException e )\r
+        {\r
+            throw new IllegalStateException( e );\r
+        }\r
+    }\r
+    \r
+    /**\r
+     * Load realm from definition\r
+     * \r
+     * @param cl {@link ClassLoader} to load\r
+     * @param attrs realm attributes\r
+     * \r
+     * @return {@link Realm}\r
+     * \r
+     * @throws IOException If can't read info\r
+     * @throws ClassNotFoundException If can't load realm\r
+     * @throws InstantiationException If can't instantiate realm\r
+     * @throws IllegalAccessException If can't instantiate realm\r
+     */\r
+    protected\r
+    Realm\r
+    load(\r
+        final ClassLoader cl,\r
+        final Map<String, String> attrs\r
+    )\r
+    throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException\r
+    {\r
+        logger.trace( "ClassLoader :{}", cl );\r
+        final Enumeration<URL> manifestUrls = cl.getResources( "META-INF/MANIFEST.MF" );\r
+        \r
+        while ( manifestUrls.hasMoreElements() )\r
+        {\r
+            final URL url = manifestUrls.nextElement();\r
+\r
+            final InputStream manifestIn = url.openStream();\r
+            if ( null == manifestIn )\r
+            {\r
+                continue;\r
+            }\r
+            \r
+            try\r
+            {\r
+                final String realmName = getRealmName( manifestIn );\r
+                if ( null == realmName )\r
+                {\r
+                    continue;\r
+                }\r
+                final Class<?> clazz = cl.loadClass( realmName );\r
+                \r
+                final Realm realm = (Realm) clazz.newInstance();\r
+                \r
+                if ( realm instanceof AttributeConfiguable ) {\r
+                    ((AttributeConfiguable) realm).setAttributes( attrs );\r
+                }\r
+                \r
+                return realm;\r
+            }\r
+            finally\r
+            {\r
+                tryClose( manifestIn );\r
+            }\r
+        }\r
+\r
+        return null;\r
+    }\r
+    \r
+    /**\r
+     * Return realm name\r
+     * \r
+     * @param in realm difinition\r
+     * \r
+     * @return realm name\r
+     * \r
+     * @throws IOException If can't read from <code>in</code>\r
+     */\r
+    public\r
+    String\r
+    getRealmName(\r
+        final InputStream in\r
+    )\r
+    throws IOException\r
+    {\r
+        try\r
+        {\r
+            byte[] contents = getBytes( in );\r
+            final Manifest m = new Manifest( new ByteArrayInputStream( contents ) );\r
+            final Attributes attrs = m.getMainAttributes();\r
+            final String realmName = trim( attrs.getValue( RealmConstants.ATTR_REALM ) );\r
+            if ( null != realmName )\r
+            {\r
+                logger.info( "Realm name :{}", realmName );\r
+            }\r
+            return realmName;\r
+        }\r
+        finally\r
+        {\r
+            tryClose( in );\r
+        }\r
+        \r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/SearchableRealm.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/SearchableRealm.java
new file mode 100755 (executable)
index 0000000..dfa1f57
--- /dev/null
@@ -0,0 +1,55 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+import java.io.IOException;\r
+import java.util.Collection;\r
+\r
+/**\r
+ * <p>\r
+ * SearchableRealm\r
+ * \r
+ * {@link Realm} to enable to search\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ */\r
+public interface\r
+SearchableRealm\r
+{\r
+    /**\r
+     * Search template matching with condition\r
+     * \r
+     * @param condition search condition\r
+     * \r
+     * @return template list\r
+     * \r
+     * @throws IOException If can't access realm\r
+     */\r
+    Collection<AttributeContainer> search( Condition condition ) throws IOException;\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/Storage.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/Storage.java
new file mode 100755 (executable)
index 0000000..b4ca0d7
--- /dev/null
@@ -0,0 +1,65 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+import java.io.OutputStream;\r
+\r
+/**\r
+ * <p>\r
+ * Storage\r
+ * \r
+ * Interface to store data into any storage with key\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public interface\r
+Storage\r
+{\r
+    /**\r
+     * return target to write\r
+     * \r
+     * @param key key string for data\r
+     * \r
+     * @return {@link OutputStream} to write\r
+     * \r
+     * @throws IOException If target can't be accessible\r
+     */\r
+    OutputStream getTarget( String key ) throws IOException;\r
+    \r
+    /**\r
+     * return source to read\r
+     * \r
+     * @param key key string for data\r
+     * \r
+     * @return {@link InputStream} to read\r
+     * \r
+     * @throws IOException If source can't be accessible\r
+     */\r
+    InputStream getSource( String key ) throws IOException;\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/Template.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/Template.java
new file mode 100755 (executable)
index 0000000..615cd43
--- /dev/null
@@ -0,0 +1,55 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+\r
+\r
+/**\r
+ * <p>\r
+ * Template\r
+ * \r
+ * Interface of template\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public interface\r
+Template\r
+extends AttributeContainer\r
+{\r
+    /**\r
+     * apply model and generate result\r
+     * \r
+     * @param models {@link IModelProvider} to provider models\r
+     * @param storage storage to store result\r
+     * \r
+     * @throws TemplateException If process is break\r
+     * \r
+     * @see IModelProvider\r
+     * @see Storage\r
+     */\r
+    void template( IModelProvider models, Storage storage ) throws TemplateException;\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/exception/InvalidMapperException.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/exception/InvalidMapperException.java
new file mode 100755 (executable)
index 0000000..70a5b15
--- /dev/null
@@ -0,0 +1,72 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.exception;\r
+\r
+import org.tizen.common.verrari.TemplateException;\r
+\r
+/**\r
+ * <p>\r
+ * InvalidMapperException\r
+ * \r
+ * exception in case that mapper is invalid\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see TemplateException\r
+ */\r
+public class\r
+InvalidMapperException\r
+extends TemplateException\r
+{\r
+\r
+    /**\r
+     * serialVersionUID\r
+     */\r
+    private static final long serialVersionUID = 3697025810808668703L;\r
+    \r
+    /**\r
+     * default constructor\r
+     */\r
+    public InvalidMapperException()\r
+    {\r
+        super();\r
+    }\r
+    \r
+    /**\r
+     * constructor with message\r
+     * \r
+     * @param msg message\r
+     */\r
+    public\r
+    InvalidMapperException(\r
+        final String msg\r
+    )\r
+    {\r
+        super( msg );\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/exception/UnsupportedVersionException.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/exception/UnsupportedVersionException.java
new file mode 100755 (executable)
index 0000000..2c81828
--- /dev/null
@@ -0,0 +1,49 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.exception;\r
+\r
+import org.tizen.common.verrari.TemplateException;\r
+\r
+/**\r
+ * <p>\r
+ * UnsupportedVersionException\r
+ * \r
+ * exception in case that version is unsupported\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class\r
+UnsupportedVersionException\r
+extends TemplateException\r
+{\r
+\r
+    /**\r
+     * serialVersionUID\r
+     */\r
+    private static final long serialVersionUID = 6945520707261158918L;\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/CompositeRealm.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/CompositeRealm.java
new file mode 100755 (executable)
index 0000000..25d35b3
--- /dev/null
@@ -0,0 +1,115 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.realm;\r
+\r
+import java.io.IOException;\r
+import java.util.ArrayList;\r
+import java.util.Collection;\r
+\r
+import org.tizen.common.verrari.Realm;\r
+import org.tizen.common.verrari.Template;\r
+\r
+/**\r
+ * <p>\r
+ * CompositeRealm\r
+ * \r
+ * delegate multiple realms\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see Realm\r
+ */\r
+public class\r
+CompositeRealm\r
+implements Realm\r
+{\r
+    \r
+    /**\r
+     * realm chain\r
+     */\r
+    protected final ArrayList<Realm> chain = new ArrayList<Realm>();\r
+    \r
+    /**\r
+     * add new realm into realm chain\r
+     * \r
+     * @param realm new realm to add\r
+     */\r
+    public\r
+    void\r
+    addRealm(\r
+        final Realm realm\r
+    )\r
+    {\r
+        chain.add( realm );\r
+    }\r
+    \r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.AttributeContainer#getAttributeKeys()\r
+     */\r
+    @Override\r
+    public Collection<String> getAttributeKeys()\r
+    {\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.RealmInfo#getAttribute(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    String\r
+    getAttribute(\r
+        final String key\r
+    )\r
+    {\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.Realm#getTemplate(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    Template\r
+    getTemplate(\r
+        final String id\r
+    )\r
+    throws IOException\r
+    {\r
+        for ( final Realm realm : chain )\r
+        {\r
+            final Template template = realm.getTemplate( id );\r
+            \r
+            if ( null != template )\r
+            {\r
+                return template;\r
+            }\r
+        }\r
+        return null;\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/Query.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/Query.java
new file mode 100755 (executable)
index 0000000..53641c1
--- /dev/null
@@ -0,0 +1,51 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.realm;\r
+\r
+import java.util.Map;\r
+\r
+/**\r
+ * <p>\r
+ * Query\r
+ * \r
+ * object to make query string from argument\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ */\r
+public interface\r
+Query\r
+{\r
+    /**\r
+     * make query string from <code>args</code>\r
+     * \r
+     * @param args argument map\r
+     * \r
+     * @return query string\r
+     */\r
+    String query( Map<String, Object> args );\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/RealmConstants.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/RealmConstants.java
new file mode 100755 (executable)
index 0000000..5203877
--- /dev/null
@@ -0,0 +1,90 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.realm;\r
+\r
+\r
+/**\r
+ * <p>\r
+ * RealmConstants\r
+ * \r
+ * constant pool for realm\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ */\r
+public class\r
+RealmConstants\r
+{\r
+    /**\r
+     * Realm loader\r
+     */\r
+    public static final String ATTR_LOADER = "loader";\r
+    \r
+    /**\r
+     * json realm definition format\r
+     */\r
+    public static final String MIME_JSON = "application/json";\r
+    \r
+    /**\r
+     * Template realm\r
+     */\r
+    public static final String ATTR_REALM = "Tizen-Template-Realm";\r
+    \r
+\r
+    /**\r
+     * realm id\r
+     */\r
+    public static final String ATTR_ID = "id";\r
+    \r
+    /**\r
+     * how-to make template query\r
+     */\r
+    public static final String ATTR_TEMPLATE_TYPE = "template-query-type";\r
+    /**\r
+     * template query url\r
+     */\r
+    public static final String ATTR_TEMPLATE_URL = "template-query-url";\r
+    \r
+    /**\r
+     * how-to make search query\r
+     */\r
+    public static final String ATTR_SEARCH_TYPE = "search-query-type";\r
+    /**\r
+     * search query url\r
+     */\r
+    public static final String ATTR_SEARCH_URL = "search-query-url";\r
+    \r
+    /**\r
+     * directory search type\r
+     */\r
+    public static final String SEARCH_TYPE_DIR = "directory";\r
+    /**\r
+     * parameter search type\r
+     */\r
+    public static final String SEARCH_TYPE_PARAMETER = "parameter";// TODO Not implement\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/StandardRealm.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/StandardRealm.java
new file mode 100755 (executable)
index 0000000..4c5290d
--- /dev/null
@@ -0,0 +1,242 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.realm;\r
+\r
+import static org.tizen.common.util.IOUtil.getBytes;\r
+import static org.tizen.common.util.IOUtil.tryClose;\r
+\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+import java.net.URL;\r
+import java.util.Collection;\r
+import java.util.HashMap;\r
+import java.util.Map;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.tizen.common.core.command.UntrackedException;\r
+import org.tizen.common.util.MapUtil;\r
+import org.tizen.common.verrari.AttributeConfiguable;\r
+import org.tizen.common.verrari.Realm;\r
+import org.tizen.common.verrari.Template;\r
+import org.tizen.common.verrari.TemplateException;\r
+import org.tizen.common.verrari.template.StandardTemplate;\r
+import org.tizen.common.verrari.util.QueryFactory;\r
+\r
+/**\r
+ * <p>\r
+ * StandardRealm\r
+ * \r
+ * Built-in {@link Realm} to provide RI\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see Realm\r
+ * @see AttributeConfiguable\r
+ */\r
+public class\r
+StandardRealm\r
+implements Realm, AttributeConfiguable\r
+{\r
+    /**\r
+     * logger for this object\r
+     */\r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+    \r
+    /**\r
+     * attribute( ,metadata ) for realm\r
+     */\r
+    protected HashMap<String, String> attributes;\r
+    \r
+    \r
+\r
+    /**\r
+     * Separate arguemnt with semicolon\r
+     * \r
+     * @param value value to separate\r
+     * \r
+     * @return string array to be separated\r
+     */\r
+    public static\r
+    String[]\r
+    separate(\r
+        final String value\r
+    )\r
+    {\r
+        if ( null == value )\r
+        {\r
+            return null;\r
+        }\r
+        return value.split( ";" );\r
+    }\r
+\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.AttributeContainer#getAttributeKeys()\r
+     */\r
+    @Override\r
+    public Collection<String> getAttributeKeys()\r
+    {\r
+        return attributes.keySet();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.AttributeContainer#getAttribute(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    String\r
+    getAttribute(\r
+        final String key\r
+    )\r
+    {\r
+        final String value = attributes.get( key );\r
+        logger.debug( "Key :{}, Value :{}", key, value );\r
+        if ( null == value )\r
+        {\r
+            return null;\r
+        }\r
+        return QueryFactory.getInstance().query( value, new HashMap<String, Object>() );\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.AttributeConfiguable#setAttributes(java.util.Map)\r
+     */\r
+    @Override\r
+    public void setAttributes( final Map<String, String> attrs )\r
+    {\r
+        if ( null == this.attributes )\r
+        {\r
+            this.attributes = new HashMap<String, String>( attrs );\r
+        }\r
+        else\r
+        {\r
+            throw new IllegalStateException( "Setting attributes is duplicated" );\r
+        }\r
+        \r
+    }\r
+\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.Realm#getTemplate(java.lang.String)\r
+     */\r
+    @SuppressWarnings("unchecked")\r
+    @Override\r
+    public\r
+    Template\r
+    getTemplate(\r
+        final String id\r
+    ) throws IOException\r
+    {\r
+        final Query templateQuery = getTemplateQuery();\r
+        final Map<?, ?> modelMap = MapUtil.asMap( new Object[][] { new Object[] { "id", id } } );\r
+        logger.trace( "Map :{}", modelMap );\r
+        final String query = templateQuery.query( (Map<String, Object>) modelMap );\r
+        \r
+        logger.trace( "Query :{}", query );\r
+        final URL url = new URL( query );\r
+        \r
+        InputStream in = null;\r
+        \r
+        try\r
+        {\r
+            in = url.openStream();\r
+            if ( null == in )\r
+            {\r
+                throw new IOException( "Template[" + id + "] not found" );\r
+            }\r
+            \r
+            return getTemplate( in );\r
+        }\r
+        catch ( final IOException e )\r
+        {\r
+            throw new UntrackedException( "Template[" + id + "] not found", e );\r
+        }\r
+        finally\r
+        {\r
+            tryClose( in );\r
+        }\r
+    }\r
+    \r
+    /**\r
+     * extract template from {@link InputStream}\r
+     * \r
+     * @param in {@link InputStream} to read\r
+     * \r
+     * @return template to be extracted\r
+     * \r
+     * @throws IOException If <code>in</code> throw {@link IOException}\r
+     */\r
+    public\r
+    Template\r
+    getTemplate(\r
+        final InputStream in\r
+    )\r
+    throws IOException\r
+    {\r
+        \r
+        final byte[] bytes = getBytes( in );\r
+        \r
+        try\r
+        {\r
+            final StandardTemplate template = new StandardTemplate( bytes );\r
+            \r
+            return template;\r
+        }\r
+        catch ( final TemplateException e )\r
+        {\r
+            throw new IOException( e );\r
+        }\r
+        \r
+    }\r
+\r
+    /**\r
+     * make template query\r
+     * \r
+     * @return template query\r
+     * \r
+     * @see QueryFactory\r
+     */\r
+    protected\r
+    Query\r
+    getTemplateQuery()\r
+    {\r
+        final QueryFactory factory = QueryFactory.getInstance();\r
+        return factory.createTemplateQuery( this );\r
+    }\r
+    \r
+    /* (non-Javadoc)\r
+     * @see java.lang.Object#toString()\r
+     */\r
+    @Override\r
+    public String toString()\r
+    {\r
+        return attributes.get( RealmConstants.ATTR_ID ) + "@" + Realm.class.getSimpleName();\r
+    }\r
+    \r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/StandardSearchableRealm.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/realm/StandardSearchableRealm.java
new file mode 100755 (executable)
index 0000000..39648d6
--- /dev/null
@@ -0,0 +1,164 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.realm;\r
+\r
+import static org.tizen.common.util.IOUtil.tryClose;\r
+\r
+import java.io.File;\r
+import java.io.FileInputStream;\r
+import java.io.IOException;\r
+import java.net.MalformedURLException;\r
+import java.net.URL;\r
+import java.util.Collection;\r
+import java.util.HashSet;\r
+\r
+import org.tizen.common.verrari.AttributeContainer;\r
+import org.tizen.common.verrari.Condition;\r
+import org.tizen.common.verrari.Condition.Operation;\r
+import org.tizen.common.verrari.SearchableRealm;\r
+import org.tizen.common.verrari.Template;\r
+\r
+/**\r
+ * <p>\r
+ * StandardSearchableRealm\r
+ * \r
+ * Built-in {@link SearchableRealm} to provide RI\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see SearchableRealm\r
+ */\r
+public class\r
+StandardSearchableRealm\r
+extends StandardRealm\r
+implements SearchableRealm\r
+{\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.SearchableRealm#search(org.tizen.common.verrari.Condition)\r
+     */\r
+    @Override\r
+    public\r
+    Collection<AttributeContainer>\r
+    search(\r
+        final Condition condition\r
+    )\r
+    throws IOException\r
+    {\r
+        final HashSet<AttributeContainer> ret = new HashSet<AttributeContainer>();\r
+        \r
+        String type = getAttribute( RealmConstants.ATTR_SEARCH_TYPE );\r
+        String urlStr = getAttribute( RealmConstants.ATTR_SEARCH_URL );\r
+        logger.debug( "Type :{}, URL :{}", type, urlStr );\r
+        if ( RealmConstants.SEARCH_TYPE_DIR.equals( type ) )\r
+        {\r
+            URL url;\r
+            try\r
+            {\r
+                url = new URL( urlStr );\r
+            }\r
+            catch (\r
+                final MalformedURLException e\r
+            )\r
+            {\r
+                throw new IllegalArgumentException( "Invalid URL :" + urlStr, e );\r
+            }\r
+            if ( !"file".equals( url.getProtocol() ) ) \r
+            {\r
+                throw new UnsupportedOperationException( "Check search url. It must start with \"file://\"" );\r
+            }\r
+            \r
+            final Operation op = condition.getOperation();\r
+            final String keyword = (String) condition.getRight();\r
+            \r
+            final String path = url.getFile();\r
+            final File dir = new File( path );\r
+            logger.debug( "Path :{}", path );\r
+            final File[] files = dir.listFiles();\r
+            for ( final File file : files )\r
+            {\r
+                logger.debug( "File :{}", file.getCanonicalPath() );\r
+                switch ( op )\r
+                {\r
+                case Contains: {\r
+                    final FileInputStream fileIn = new FileInputStream( file );\r
+                    try\r
+                    {\r
+                        final Template template = getTemplate( fileIn );\r
+                        final Collection<String> keys = template.getAttributeKeys();\r
+                        for ( final String key : keys )\r
+                        {\r
+                            final String value = template.getAttribute( key );\r
+                            if ( value.contains( keyword ) )\r
+                            {\r
+                                ret.add( template );\r
+                                break;\r
+                            }\r
+                        }\r
+                    }\r
+                    finally\r
+                    {\r
+                        tryClose( fileIn );\r
+                    }\r
+                    \r
+                    break;\r
+                }\r
+                case CaseInsensitiveContains: {\r
+                    final FileInputStream fileIn = new FileInputStream( file );\r
+                    try\r
+                    {\r
+                        final Template template = getTemplate( fileIn );\r
+                        final Collection<String> keys = template.getAttributeKeys();\r
+                        for ( final String key : keys )\r
+                        {\r
+                            final String value = template.getAttribute( key );\r
+                            if ( value.toLowerCase().contains( keyword.toLowerCase() ) )\r
+                            {\r
+                                ret.add( template );\r
+                                break;\r
+                            }\r
+                        }\r
+                    }\r
+                    finally\r
+                    {\r
+                        tryClose( fileIn );\r
+                    }\r
+                    \r
+                    break;\r
+                }\r
+\r
+                default:\r
+                    break;\r
+                }\r
+            }\r
+            \r
+        }\r
+        \r
+        return ret;\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/storage/FileStorage.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/storage/FileStorage.java
new file mode 100755 (executable)
index 0000000..714d085
--- /dev/null
@@ -0,0 +1,129 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.storage;\r
+\r
+import static org.tizen.common.util.FilenameUtil.removeTailingPath;\r
+import static org.tizen.common.util.StringUtil.isEmpty;\r
+\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+import java.io.OutputStream;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.tizen.common.file.FileHandler;\r
+import org.tizen.common.util.Assert;\r
+import org.tizen.common.util.io.BufferInputStream;\r
+import org.tizen.common.util.io.BufferOutputStream;\r
+import org.tizen.common.verrari.Storage;\r
+import org.tizen.common.verrari.util.BufferFactory;\r
+\r
+/**\r
+ * <p>\r
+ * FileStorage\r
+ * \r
+ * {@link Storage} to store data in file\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see Storage\r
+ * @see FileHandler\r
+ */\r
+public class\r
+FileStorage\r
+implements Storage\r
+{\r
+    /**\r
+     * logger for this object\r
+     */\r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+    \r
+    /**\r
+     * {@link FileHandler} for file access\r
+     */\r
+    protected FileHandler handler = null;\r
+    \r
+    /**\r
+     * constructor with {@link FileHandler}\r
+     * \r
+     * @param handler {@link FileHandler}\r
+     */\r
+    public\r
+    FileStorage(\r
+        final FileHandler handler\r
+    )\r
+    {\r
+        Assert.notNull( handler );\r
+        this.handler = handler;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.Storage#getTarget(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    OutputStream\r
+    getTarget(\r
+        final String key\r
+    )\r
+    throws IOException\r
+    {\r
+        logger.trace( "Target :{}", key );\r
+        final BufferOutputStream bufferOut =\r
+            new BufferOutputStream( BufferFactory.getInstance().create() ) {\r
+            @Override\r
+            public void close() throws IOException\r
+            {\r
+                final String directory = removeTailingPath( key, 1 );\r
+                logger.trace( "Make directory :{}", directory );\r
+                if ( !isEmpty( directory ) )\r
+                {\r
+                    handler.makeDirectory( directory );\r
+                }\r
+                handler.write( key, new BufferInputStream( buffer ) );\r
+                super.close();\r
+            }\r
+        };\r
+        return bufferOut;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.Storage#getSource(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    InputStream\r
+    getSource(\r
+        final String key\r
+    )\r
+    throws IOException\r
+    {\r
+        logger.trace( "Source :{}", key );\r
+        return handler.read( key );\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/Mapper.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/Mapper.java
new file mode 100755 (executable)
index 0000000..2662f6d
--- /dev/null
@@ -0,0 +1,60 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+import java.util.Map;\r
+\r
+\r
+/**\r
+ * <p>\r
+ * Mapper\r
+ * \r
+ * interface to string mapping along mapping rule.\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ */\r
+public interface\r
+Mapper\r
+{\r
+    /**\r
+     * Configure mapping rule\r
+     * \r
+     * @param mappings mapping rule\r
+     */\r
+    void setMappings( Map<String, String> mappings );\r
+    \r
+    /**\r
+     * apply rule and generate result string for <code>value</code>\r
+     * \r
+     * @param value input strng\r
+     * \r
+     * @return output string\r
+     */\r
+    String map( String value );\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/StandardMapper.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/StandardMapper.java
new file mode 100755 (executable)
index 0000000..08d590b
--- /dev/null
@@ -0,0 +1,152 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+import static org.tizen.common.util.IOUtil.tryClose;\r
+\r
+import java.io.ByteArrayOutputStream;\r
+import java.util.Collections;\r
+import java.util.HashMap;\r
+import java.util.Map;\r
+import java.util.regex.Pattern;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.tizen.common.verrari.ITemplateEngine;\r
+import org.tizen.common.verrari.engine.TemplateEngineFactory;\r
+import org.tizen.common.verrari.model.ModelManager;\r
+import org.tizen.common.verrari.util.BufferFactory;\r
+\r
+\r
+/**\r
+ * <p>\r
+ * StandardMapper\r
+ * \r
+ * {@link Mapper} using regular expression\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see Mapper\r
+ */\r
+public class\r
+StandardMapper\r
+implements Mapper\r
+{\r
+    /**\r
+     * dummpy key for template engine\r
+     */\r
+    protected static final String PROP_KEY_TEMPLATE = "key";\r
+    \r
+    /**\r
+     * dummy value for template engine\r
+     */\r
+    protected static final String PROP_VALUE_TEMPLATE = "value";\r
+    \r
+    /**\r
+     * logger for this object\r
+     */\r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+    \r
+    /**\r
+     * mapping rule\r
+     */\r
+    protected Map<String, String> mappings = new HashMap<String, String>();\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.template.Mapper#setMappings(java.util.Map)\r
+     */\r
+    @Override\r
+    public\r
+    void\r
+    setMappings(\r
+        final Map<String, String> mappings\r
+    )\r
+    {\r
+        logger.info( "Mappings :{}", mappings );\r
+        this.mappings = Collections.unmodifiableMap( mappings );\r
+    }\r
+    \r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.template.Mapper#map(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    String\r
+    map(\r
+        final String value\r
+    )\r
+    {\r
+        for ( final String key : this.mappings.keySet() )\r
+        {\r
+            if ( !Pattern.matches( key, value ) )\r
+            {   // if this rule is not for value, skip to next\r
+                continue;\r
+            }\r
+            \r
+            final String target = this.mappings.get( key );\r
+            \r
+            // configure template engine\r
+            final ITemplateEngine engine = TemplateEngineFactory.getInstance().create();\r
+            final TemplateManager templates = new TemplateManager();\r
+            engine.setTemplateProvider( templates );\r
+            \r
+            InMemoryTemplate keyTemplate = null;\r
+            InMemoryTemplate valueTemplate = null;\r
+            try\r
+            {\r
+                keyTemplate = new InMemoryTemplate( key.getBytes(), "utf-8", BufferFactory.getInstance() );\r
+                valueTemplate = new InMemoryTemplate( target.getBytes(), "utf-8", BufferFactory.getInstance() );\r
+                templates.addTemplate( PROP_KEY_TEMPLATE, keyTemplate );\r
+                templates.addTemplate( PROP_VALUE_TEMPLATE, valueTemplate );\r
+                final ByteArrayOutputStream keyOut = new ByteArrayOutputStream();\r
+                engine.generate( PROP_KEY_TEMPLATE, new ModelManager(), keyOut );\r
+                final ByteArrayOutputStream valueOut = new ByteArrayOutputStream();\r
+                engine.generate( PROP_VALUE_TEMPLATE, new ModelManager(), valueOut );\r
+\r
+                final String keyStr = keyOut.toString();\r
+                final String valueStr = valueOut.toString();\r
+                \r
+                logger.info( "Key :{}, Value :{}", keyStr, valueStr );\r
+                return value.replaceAll( keyStr, valueStr );\r
+            }\r
+            catch\r
+            (\r
+                final Exception e\r
+            )\r
+            {\r
+                logger.error( "No effective mapping for {}", value, e );\r
+            }\r
+            finally\r
+            {\r
+                tryClose( keyTemplate, valueTemplate );\r
+            }\r
+        }\r
+        return value;\r
+    }\r
+\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/StandardTemplate.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/StandardTemplate.java
new file mode 100755 (executable)
index 0000000..d816cb0
--- /dev/null
@@ -0,0 +1,560 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+import static org.tizen.common.util.ArrayUtil.pickupFirst;\r
+import static org.tizen.common.util.IOUtil.getBytes;\r
+import static org.tizen.common.util.IOUtil.tryClose;\r
+import static org.tizen.common.util.StringUtil.nvl;\r
+import static org.tizen.common.verrari.template.TemplateConstants.ATTR_COPY;\r
+import static org.tizen.common.verrari.template.TemplateConstants.ATTR_EXCLUDE;\r
+import static org.tizen.common.verrari.template.TemplateConstants.ATTR_INCLUDE;\r
+import static org.tizen.common.verrari.template.TemplateConstants.ATTR_MAPPER;\r
+import static org.tizen.common.verrari.template.TemplateConstants.ATTR_MAPPING;\r
+import static org.tizen.common.verrari.template.TemplateConstants.ATTR_VERSION;\r
+import static org.tizen.common.verrari.template.TemplateConstants.DV_MAPPER;\r
+\r
+import java.io.BufferedReader;\r
+import java.io.ByteArrayInputStream;\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+import java.io.OutputStream;\r
+import java.io.StringReader;\r
+import java.util.Collection;\r
+import java.util.HashMap;\r
+import java.util.HashSet;\r
+import java.util.Locale;\r
+import java.util.PropertyResourceBundle;\r
+import java.util.ResourceBundle;\r
+import java.util.jar.Attributes;\r
+import java.util.jar.Attributes.Name;\r
+import java.util.jar.JarEntry;\r
+import java.util.jar.JarInputStream;\r
+import java.util.jar.Manifest;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.tizen.common.FactoryWithArgument;\r
+import org.tizen.common.core.command.ExecutionContext;\r
+import org.tizen.common.file.Filter;\r
+import org.tizen.common.file.SimpleFileFilter;\r
+import org.tizen.common.file.filter.WildCardFilterFactory;\r
+import org.tizen.common.util.IOUtil;\r
+import org.tizen.common.util.ReflectionUtil;\r
+import org.tizen.common.util.StringUtil;\r
+import org.tizen.common.verrari.IModelProvider;\r
+import org.tizen.common.verrari.ITemplateEngine;\r
+import org.tizen.common.verrari.Storage;\r
+import org.tizen.common.verrari.Template;\r
+import org.tizen.common.verrari.TemplateException;\r
+import org.tizen.common.verrari.engine.TemplateEngineFactory;\r
+import org.tizen.common.verrari.exception.InvalidMapperException;\r
+import org.tizen.common.verrari.exception.UnsupportedVersionException;\r
+import org.tizen.common.verrari.realm.StandardRealm;\r
+import org.tizen.common.verrari.util.BufferFactory;\r
+\r
+/**\r
+ * <p>\r
+ * StandardTemplate\r
+ * \r
+ * Built-in {@link Template} to provide RI\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see Template\r
+ */\r
+public class\r
+StandardTemplate\r
+implements Template\r
+{\r
+    protected static final ThreadLocal<StandardTemplate> context = new ThreadLocal<StandardTemplate>();\r
+    /**\r
+     * logger for this object\r
+     */\r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+    \r
+    /**\r
+     * attributes for template\r
+     */\r
+    protected final HashMap<String, String> attrs = new HashMap<String, String>();\r
+    \r
+    /**\r
+     * Dictionaries for i18n\r
+     */\r
+    protected final HashMap<Locale, ResourceBundle> bundles = new HashMap<Locale, ResourceBundle>();\r
+    \r
+    /**\r
+     * Default dictionary for i18n\r
+     */\r
+    protected ResourceBundle defaultBundle;\r
+    \r
+    /**\r
+     * Factory to create file name pattern filter\r
+     */\r
+    protected FactoryWithArgument<Filter, String> filterFactory = new WildCardFilterFactory();\r
+    \r
+    /**\r
+     * template engine\r
+     */\r
+    protected ITemplateEngine engine = null;\r
+    \r
+    /**\r
+     * template list to start\r
+     */\r
+    protected HashSet<String> templateNames = new HashSet<String>();\r
+    \r
+    /**\r
+     * list to copy\r
+     */\r
+    protected HashSet<String> copyNames = new HashSet<String>();\r
+    \r
+    /**\r
+     * name mapper\r
+     * \r
+     * @see Mapper\r
+     */\r
+    protected Mapper mapper = null;\r
+    \r
+    public static\r
+    StandardTemplate\r
+    getCurrentTemplate()\r
+    {\r
+        return context.get();\r
+    }\r
+\r
+    /**\r
+     * constructor with template contents in jar file format byte[]\r
+     * \r
+     * @param bytes template contents\r
+     * \r
+     * @throws IOException If <code>bytes</code> is invalid format\r
+     * @throws TemplateException If template mapping is invalid\r
+     */\r
+    public\r
+    StandardTemplate(\r
+        final byte[] bytes\r
+    )\r
+    throws IOException, TemplateException\r
+    {\r
+        preload( new JarInputStream( new ByteArrayInputStream( bytes ) ) );\r
+        load( new JarInputStream( new ByteArrayInputStream( bytes ) ) );\r
+    }\r
+    \r
+    \r
+    /**\r
+     * Set filter factory\r
+     * \r
+     * @param factory {@link FactoryWithArgument<Filter, String>}\r
+     * \r
+     * @see WildCardFilterFactory\r
+     */\r
+    public\r
+    void\r
+    setFilterFactory(\r
+        final FactoryWithArgument<Filter, String> factory\r
+    )\r
+    {\r
+        this.filterFactory = factory;\r
+        \r
+        logger.debug( "Configured filter factory :{}", factory );\r
+    }\r
+    \r
+    protected\r
+    void\r
+    preload( JarInputStream jarIn ) throws IOException, TemplateException\r
+    {\r
+        Manifest mf = jarIn.getManifest();\r
+        if ( null != mf )\r
+        {\r
+            Attributes attributes = mf.getMainAttributes();\r
+            for ( final Object key : attributes.keySet() )\r
+            {\r
+                Name name = (Name) key;\r
+                this.attrs.put( name.toString(), attributes.getValue( name ) );\r
+            }\r
+        }\r
+        JarEntry iter = null;\r
+        while ( null != ( iter = jarIn.getNextJarEntry() ) )\r
+        {\r
+            if ( iter.isDirectory() )\r
+            {\r
+                continue;\r
+            }\r
+\r
+            final String name = iter.getName();\r
+\r
+            if ( "META-INF/MANIFEST.MF".equals( name ) )\r
+            {\r
+                loadAttribute( jarIn );\r
+            }\r
+            if ( "META-INF/messages.properties".equals( name ) )\r
+            {\r
+                defaultBundle = new PropertyResourceBundle( jarIn );\r
+            }\r
+            else if ( name.startsWith( "META-INF/messages_" ) && name.endsWith( ".properties" ) )\r
+            {\r
+                final String localeStr = name.substring( "META-INF/messages_".length(), name.length() - ".properties".length() );\r
+                final String[] fragments = StringUtil.split( localeStr, "_" );\r
+                final String lang = pickupFirst( fragments );\r
+                final String country = (2==fragments.length)?fragments[1]:""; \r
+                \r
+                Locale locale = new Locale( lang, country );\r
+                final ResourceBundle bundle = new PropertyResourceBundle( jarIn );\r
+                bundles.put( locale, bundle );\r
+            }\r
+        }\r
+        \r
+        final String version = attrs.get( ATTR_VERSION );\r
+        \r
+        // Check version\r
+        checkVersion( version );\r
+        \r
+    }\r
+    \r
+    /**\r
+     * Read contents from <code>in</code> and make template info\r
+     * \r
+     * @param in {@link InputStream} to read\r
+     * \r
+     * @throws TemplateException If version or mapper is invalid\r
+     * @throws IOException If <code>in</code> is invalid\r
+     */\r
+    protected\r
+    void\r
+    load(\r
+        final JarInputStream in\r
+    )\r
+    throws TemplateException, IOException\r
+    {\r
+        this.engine = TemplateEngineFactory.getInstance().create();\r
+        TemplateManager templates = new TemplateManager();\r
+        \r
+        final String excludes = attrs.get( ATTR_EXCLUDE );\r
+        final String includes = attrs.get( ATTR_INCLUDE );\r
+        final String copies = attrs.get( ATTR_COPY );\r
+        final String mappings = attrs.get( ATTR_MAPPING );\r
+        this.mapper = getMapper( attrs.get( ATTR_MAPPER ), mappings );\r
+        \r
+        final Filter filter = createFilter( StandardRealm.separate( includes ), StandardRealm.separate( excludes ) );\r
+        \r
+        final Filter copyFilter = createFilter( StandardRealm.separate( copies ), null );\r
+        \r
+        // Process files\r
+        JarEntry iter = null;\r
+        while ( null != ( iter = in.getNextJarEntry() ) )\r
+        {\r
+            if ( iter.isDirectory() )\r
+            {\r
+                continue;\r
+            }\r
+            final String name = iter.getName();\r
+            logger.trace( "Name :{}", name );\r
+            final byte[] contents = getBytes( in );\r
+            \r
+            templates.addTemplate( name, new InMemoryTemplate(contents, "utf-8", BufferFactory.getInstance() ) );\r
+            if ( copyFilter.accept( "/", name ) )\r
+            {\r
+                logger.debug( "{} is copy target", name ); \r
+                this.copyNames.add( name );\r
+                continue;\r
+            }\r
+            else if ( !filter.accept( "/", name ) )\r
+            {\r
+                logger.info( "{} filtered", name );\r
+                continue;\r
+            }\r
+            else\r
+            {\r
+                this.templateNames.add( name );\r
+            }\r
+            \r
+        }\r
+        \r
+        engine.setTemplateProvider( templates );\r
+    }\r
+    \r
+    /**\r
+     * Load {@link Manifest} contents from {@link InputStream}\r
+     * \r
+     * @param in stream to read\r
+     * @throws IOException when can't read from <code>in</code>\r
+     */\r
+    protected\r
+    void\r
+    loadAttribute(\r
+        final InputStream in\r
+    )\r
+    throws IOException\r
+    {\r
+        final Manifest manifest = new Manifest( in );\r
+        final Attributes attributes = manifest.getMainAttributes();\r
+        \r
+        for ( final Object key : attributes.keySet() )\r
+        {\r
+            final Name name = (Name) key;\r
+            String keyStr = name.toString();\r
+            this.attrs.put( keyStr, attributes.getValue( name ) );\r
+        }\r
+        logger.info( "Attribute :{}", attrs );\r
+        \r
+    }\r
+\r
+    /**\r
+     * \r
+     * @param key\r
+     * @return\r
+     */\r
+    public\r
+    String\r
+    getMessage(\r
+        final String key\r
+    )\r
+    {\r
+        logger.trace( "Key :{}", key );\r
+        Locale locale = Locale.getDefault();\r
+        \r
+        ResourceBundle bundle = bundles.get( locale );\r
+        if ( null != bundle )\r
+        {\r
+            return getMessage( bundle, key );\r
+        }\r
+        locale = new Locale( locale.getLanguage(), "" );\r
+        bundle = bundles.get( locale );\r
+        if ( null != bundle )\r
+        {\r
+            return getMessage( bundle, key );\r
+        }\r
+        \r
+        if ( null != defaultBundle )\r
+        {\r
+            return getMessage( defaultBundle, key );\r
+        }\r
+        \r
+        return null;\r
+    }\r
+\r
+\r
+\r
+    protected String getMessage( final ResourceBundle bundle, final String key )\r
+    {\r
+        if ( !bundle.containsKey( key ) )\r
+        {\r
+            logger.info( "No message for {}", key );\r
+            return null;\r
+        }\r
+        \r
+        final String ret = bundle.getString( key );\r
+        logger.info( "Message for {} :{}", key, ret );\r
+        \r
+        return ret;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.Template#template(org.tizen.common.verrari.IModelProvider, org.tizen.common.verrari.Storage)\r
+     */\r
+    @Override\r
+    public\r
+    void\r
+    template(\r
+        final IModelProvider models,\r
+        final Storage storage\r
+    )\r
+    throws TemplateException\r
+    {\r
+        logger.info( "Start template process..." );\r
+        context.set( this );\r
+        try\r
+        {\r
+            for ( final String name : this.copyNames )\r
+            {\r
+                logger.trace( "Copy[{}] start", name );\r
+                final String target = nvl( this.mapper.map( name ), name );\r
+\r
+                InputStream in = null;\r
+                OutputStream out = null;\r
+                \r
+                try\r
+                {\r
+                    in = engine.getTemplateProvider().getTemplate( name ).open();\r
+                    out = storage.getTarget( target );\r
+                    ExecutionContext.getCurrentContext().getPrompter().notify( target + " created" );\r
+                    IOUtil.redirect( in , out );\r
+                    \r
+                }\r
+                finally\r
+                {\r
+                    tryClose( in, out );\r
+                }\r
+            }\r
+            for ( final String name : this.templateNames )\r
+            {\r
+                logger.trace( "Template[{}] start", name );\r
+                final String target = nvl( this.mapper.map( name ), name );\r
+\r
+                final OutputStream out = storage.getTarget( target );\r
+                \r
+                \r
+                try\r
+                {\r
+                    engine.generate( name, models, out );\r
+                    ExecutionContext.getCurrentContext().getPrompter().notify( target + " created" );\r
+                }\r
+                finally\r
+                {\r
+                    tryClose( out );\r
+                }\r
+            }\r
+        }\r
+        catch ( final IOException e )\r
+        {\r
+            throw new TemplateException( e );\r
+        }\r
+        catch ( final Exception e )\r
+        {\r
+            throw new TemplateException( e );\r
+        }\r
+        finally\r
+        {\r
+            context.remove();\r
+            logger.info( "End template process..." );\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Create and return mapper with <code>mapperName</code> and <code>mappings</code>\r
+     * \r
+     * @param mapperName mapper name( class qualified name )\r
+     * @param mappings mapper arguments\r
+     * \r
+     * @return {@link Mapper} to be created\r
+     * \r
+     * @throws InvalidMapperException If mapper name is invalid\r
+     */\r
+    private\r
+    Mapper\r
+    getMapper(\r
+        final String mapperName,\r
+        final String mappings\r
+    )\r
+    throws InvalidMapperException\r
+    {\r
+        final String safeMapperName = nvl( mapperName, DV_MAPPER );\r
+        final Mapper mapper = (Mapper) ReflectionUtil.tryNewInstance( safeMapperName );\r
+        if ( null == mapper )\r
+        {\r
+            throw new InvalidMapperException( "'" + safeMapperName + "' is invalide. check your class or config" );\r
+        }\r
+        \r
+        \r
+        final HashMap<String, String> mappingMap = new HashMap<String, String>();\r
+        if ( null != mappings )\r
+        {\r
+            final BufferedReader reader = new BufferedReader( new StringReader( mappings ) );\r
+            String line = null;\r
+            try\r
+            {\r
+                while ( null != ( line = reader.readLine() ) )\r
+                {\r
+                    String[] args = line.split( "/" );\r
+                    mappingMap.put( args[0], args[1] );\r
+                }\r
+            }\r
+            catch ( final IOException e )\r
+            {\r
+                logger.error( "Unreachable block" );\r
+            }\r
+        }\r
+        mapper.setMappings( mappingMap );\r
+        return mapper;\r
+    }\r
+\r
+    /**\r
+     * Create {@link Filter} with includes-list and excludes-list\r
+     * \r
+     * @param includes includes list\r
+     * @param excludes excludes list\r
+     * \r
+     * @return {@link Filter} to be configured\r
+     */\r
+    protected\r
+    Filter\r
+    createFilter(\r
+        final String[] includes,\r
+        final String[] excludes\r
+    )\r
+    {\r
+        final SimpleFileFilter filter = new SimpleFileFilter();\r
+        if ( null != includes )\r
+        {\r
+            for ( final String include : includes )\r
+            {\r
+                filter.addIncludes( filterFactory.create( include ) );\r
+            }\r
+        }\r
+        if ( null != excludes )\r
+        {\r
+            for ( final String exclude : excludes )\r
+            {\r
+                filter.addExcludes( filterFactory.create( exclude ) );\r
+            }\r
+        }\r
+        return filter;\r
+    }\r
+\r
+    /**\r
+     * Check template version\r
+     * \r
+     * @param version template version\r
+     * \r
+     * @throws UnsupportedVersionException If version is invalid in this template system\r
+     */\r
+    protected void checkVersion( String version ) throws UnsupportedVersionException\r
+    {\r
+        // TODO impl\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.AttributeContainer#getAttributeKeys()\r
+     */\r
+    @Override\r
+    public Collection<String> getAttributeKeys()\r
+    {\r
+        return this.attrs.keySet();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.AttributeContainer#getAttribute(java.lang.String)\r
+     */\r
+    @Override\r
+    public String getAttribute( final String key )\r
+    {\r
+        return attrs.get( key );\r
+    }\r
+\r
+\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/TemplateConstants.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/template/TemplateConstants.java
new file mode 100755 (executable)
index 0000000..0026045
--- /dev/null
@@ -0,0 +1,93 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+/**\r
+ * <p>\r
+ * TemplateConstants\r
+ * \r
+ * constant pool for template\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ */\r
+public class\r
+TemplateConstants\r
+{\r
+    /**\r
+     * template name( used as id )\r
+     */\r
+    public static final String ATTR_NAME = "Tizen-Template-Name";\r
+    /**\r
+     * template description\r
+     */\r
+    public static final String ATTR_DESCRIPTION = "Tizen-Template-Description";\r
+    \r
+    /**\r
+     * dependent templates\r
+     */\r
+    public static final String ATTR_DEPENDENCY = "Tizen-Template-Dependency";\r
+    /**\r
+     * template tags( used for searching )\r
+     */\r
+    public static final String ATTR_TAGS = "Tizen-Template-Tags";\r
+    \r
+    /**\r
+     * template version\r
+     */\r
+    public static final String ATTR_VERSION = "Tizen-Template-Version";\r
+    \r
+    /**\r
+     * list to exclude in template starting\r
+     */\r
+    public static final String ATTR_EXCLUDE = "Tizen-Template-Exclude";\r
+    /**\r
+     * list to include in template starging\r
+     */\r
+    public static final String ATTR_INCLUDE = "Tizen-Template-Include";\r
+    /**\r
+     * list not to apply template engine. just copy\r
+     */\r
+    public static final String ATTR_COPY = "Tizen-Template-Copy";\r
+    \r
+    /**\r
+     * file name mapper\r
+     */\r
+    public static final String ATTR_MAPPER = "Tizen-Template-Mapper";\r
+    /**\r
+     * default mapper\r
+     * \r
+     * @see StandardMapper\r
+     */\r
+    public static final String DV_MAPPER = StandardMapper.class.getName();\r
+    \r
+    /**\r
+     * mapping rule( mapper's argument )\r
+     */\r
+    public static final String ATTR_MAPPING = "Tizen-Template-Mapping";\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/util/QueryFactory.java b/org.tizen.common.verrari.realm/src/org/tizen/common/verrari/util/QueryFactory.java
new file mode 100755 (executable)
index 0000000..99f6b54
--- /dev/null
@@ -0,0 +1,209 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.util;\r
+\r
+import java.io.ByteArrayOutputStream;\r
+import java.util.Map;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.tizen.common.util.Assert;\r
+import org.tizen.common.verrari.ITemplateEngine;\r
+import org.tizen.common.verrari.Realm;\r
+import org.tizen.common.verrari.engine.TemplateEngineFactory;\r
+import org.tizen.common.verrari.model.ModelManager;\r
+import org.tizen.common.verrari.realm.RealmConstants;\r
+import org.tizen.common.verrari.realm.Query;\r
+import org.tizen.common.verrari.template.InMemoryTemplate;\r
+import org.tizen.common.verrari.template.TemplateManager;\r
+\r
+/**\r
+ * <p>\r
+ * QueryFactory\r
+ * \r
+ * Object to create template query\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ */\r
+public class\r
+QueryFactory\r
+{\r
+    /**\r
+     * Pattern type\r
+     */\r
+    protected static final String PATTERN_TYPE = "pattern";\r
+    \r
+    protected static final String STARTING_POINT = "_";\r
+\r
+    /**\r
+     * logger for this object\r
+     */\r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+    \r
+    /**\r
+     * Query to use pattern\r
+     * \r
+     * @see Query\r
+     *\r
+     */\r
+    class PatternQuery\r
+    implements Query\r
+    {\r
+        /**\r
+         * template engine\r
+         */\r
+        protected final ITemplateEngine engine;\r
+        \r
+        /**\r
+         * constructor with pattern\r
+         * \r
+         * @param pattern string to use in making query\r
+         */\r
+        public\r
+        PatternQuery(\r
+            final String pattern\r
+        )\r
+        {\r
+            this.engine = TemplateEngineFactory.getInstance().create();\r
+            final TemplateManager templateManager = new TemplateManager();\r
+            engine.setTemplateProvider( templateManager );\r
+            templateManager.addTemplate( STARTING_POINT, new InMemoryTemplate( pattern.getBytes(), "utf-8", BufferFactory.getInstance() ) );\r
+        }\r
+        \r
+        /* (non-Javadoc)\r
+         * @see org.tizen.common.verrari.realm.Query#query(java.util.Map)\r
+         */\r
+        @Override\r
+        public\r
+        String\r
+        query(\r
+            final Map<String, Object> args\r
+        )\r
+        {\r
+            try\r
+            {\r
+                final ModelManager manager = new ModelManager( args );\r
+                final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();\r
+                logger.debug( "Model :{}, Model Manager :{}", args, manager );\r
+                engine.generate( STARTING_POINT, manager, byteOut );\r
+                final String ret = new String( byteOut.toByteArray(), "utf-8" );\r
+                logger.info( "Query result :{}", ret );\r
+                \r
+                return ret;\r
+            }\r
+            catch ( final Throwable e )\r
+            {\r
+                throw new IllegalStateException( e );\r
+            }\r
+        }\r
+        \r
+    }\r
+    \r
+    /**\r
+     * Factory to create {@link Query}\r
+     */\r
+    protected static QueryFactory instance = new QueryFactory();\r
+    \r
+    /**\r
+     * return {@link QueryFactory}\r
+     * \r
+     * @return {@link QueryFactory}\r
+     */\r
+    public static\r
+    QueryFactory\r
+    getInstance()\r
+    {\r
+        if ( null == instance )\r
+        {\r
+            synchronized ( QueryFactory.class )\r
+            {\r
+                if ( null == instance )\r
+                {\r
+                    instance = new QueryFactory();\r
+                }\r
+            }\r
+        }\r
+        return instance;\r
+    }\r
+    \r
+    /**\r
+     * set {@link QueryFactory}\r
+     * @param factory\r
+     */\r
+    synchronized public static\r
+    void\r
+    setInstance(\r
+        final QueryFactory factory\r
+    )\r
+    {\r
+        instance = factory;\r
+    }\r
+    \r
+    /**\r
+     * create template query for realm\r
+     * \r
+     * @param realm {@link Realm} to apply\r
+     * \r
+     * @return template query\r
+     */\r
+    public\r
+    Query\r
+    createTemplateQuery(\r
+        final Realm realm\r
+    )\r
+    {\r
+        Assert.notNull( realm );\r
+        \r
+        final String templateType = realm.getAttribute( RealmConstants.ATTR_TEMPLATE_TYPE );\r
+        logger.debug( "Template type :{}", templateType );\r
+        final PatternQuery query = new PatternQuery( realm.getAttribute( RealmConstants.ATTR_TEMPLATE_URL ) );\r
+        \r
+        return query;\r
+    }\r
+\r
+    /**\r
+     * create template query for realm\r
+     * \r
+     * @param realm {@link Realm} to apply\r
+     * \r
+     * @return template query\r
+     */\r
+    public\r
+    String\r
+    query(\r
+        final String pattern,\r
+        final Map<String, Object> models\r
+    )\r
+    {\r
+        \r
+        final PatternQuery query = new PatternQuery( pattern );\r
+        return query.query( models );\r
+    }\r
+    \r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/test/doc/complex_template/META-INF/MANIFEST.MF b/org.tizen.common.verrari.realm/test/doc/complex_template/META-INF/MANIFEST.MF
new file mode 100755 (executable)
index 0000000..107fd2e
--- /dev/null
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Tizen-Template-Version: 0.1
+Tizen-Template-Exclude: META-INF/*.*
+Tizen-Template-Mapping: ^(.*)\.css$/${DIR_CSS}/$1.css
+ ^(.*)\.png$/${DIR_IMAGE}/$1.png,
+ ^(.*)\.html/${DIR_HTML}/$1.html,
+ ^(.*)\.htm -> <{&pref( 'DIR_HTML' )}>/$1.htm,
+ ^(.*)\.js -> <{&pref( 'DIR_JAVASCRIPT' )}>/$1.js,
diff --git a/org.tizen.common.verrari.realm/test/doc/complex_template/config.xml b/org.tizen.common.verrari.realm/test/doc/complex_template/config.xml
new file mode 100755 (executable)
index 0000000..9874127
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" version="1.0.0" viewmodes="maximized">
+    <icon src="<{&pref()}>/icon.png"/>
+    <content src="index.html"/>
+</widget>
\ No newline at end of file
diff --git a/org.tizen.common.verrari.realm/test/doc/complex_template/icon.png b/org.tizen.common.verrari.realm/test/doc/complex_template/icon.png
new file mode 100755 (executable)
index 0000000..b0979b1
Binary files /dev/null and b/org.tizen.common.verrari.realm/test/doc/complex_template/icon.png differ
diff --git a/org.tizen.common.verrari.realm/test/doc/complex_template/index.html b/org.tizen.common.verrari.realm/test/doc/complex_template/index.html
new file mode 100755 (executable)
index 0000000..00558a7
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+    <meta name="description" content="Tizen basic template generated by Tizen Web IDE"/>
+
+    <title>Tizen Web IDE - Tizen - Tizen basic Application</title>
+
+    <link rel="stylesheet" type="text/css" href="<{&path( "/style.css" ) }>"/>
+    <script src="<{&path( "/main.js" ) }>"></script>
+</head>
+
+<body>
+  <header>
+    <hgroup>
+      <h1>Tizen App</h1>
+      <h2>An empty template of Tizen</h2>
+    </hgroup>
+  </header>
+
+  <nav>
+    <ul>
+       <li><a href="#">Home</a></li>
+       <li><a href="#">About Us</a></li>
+       <li><a href="#">Contact Us</a></li>
+    </ul>
+  </nav>
+
+  <article>
+    <header>
+      <h1>
+        <img src="images/tizen_32.png" /> Application Name
+      </h1>
+    </header>
+    <p>This is an empty template of Tizen Web Application. Tizen will support multiple device categories:
+      <ul>
+        <li>smartphones, tablets and smart TVs
+        <li>netbooks, in-vehicle infotainment devices
+      </ul>
+    </p>
+    <section>
+      <p>This is a basic section of a document.</p>
+      <p>The following button displays a time using JavaScript.</p>
+      <div id="divbutton1">
+        <button onclick="startTime();">Clock</button>
+      </div>
+    </section>
+  </article>
+
+  <footer>
+    <p>&copy; 2012 Company Name. All rights reserved.</p>
+  </footer>    
+</body>
+</html>
diff --git a/org.tizen.common.verrari.realm/test/doc/complex_template/main.js b/org.tizen.common.verrari.realm/test/doc/complex_template/main.js
new file mode 100755 (executable)
index 0000000..31dd9ec
--- /dev/null
@@ -0,0 +1,29 @@
+var startTime;
+var checkTime;
+
+//Initialize function
+var init = function () {
+    // TODO:: Do your initialization job
+    console.log("init() called");
+};
+// window.onload can work without <body onload="">
+window.onload = init;
+
+function startTime() {
+    var today = new Date();
+    var h = today.getHours();
+
+    var m = today.getMinutes();
+    var s = today.getSeconds();
+    m = checkTime(m);
+    s = checkTime(s);
+    document.getElementById('divbutton1').innerHTML="Current time: " + h + ":" + m + ":" + s;
+    t = setTimeout(startTime, 250);
+}
+
+function checkTime(i) {
+    if (i < 10) {
+        i="0" + i;
+    }
+    return i;
+}
\ No newline at end of file
diff --git a/org.tizen.common.verrari.realm/test/doc/complex_template/style.css b/org.tizen.common.verrari.realm/test/doc/complex_template/style.css
new file mode 100755 (executable)
index 0000000..3f12cd3
--- /dev/null
@@ -0,0 +1,120 @@
+* {
+    font-family: Lucida Sans, Arial, Helvetica, sans-serif;
+}
+
+body {
+    margin: 0px auto;
+}
+
+header h1 {
+    font-size: 36px;
+    margin: 0px;
+}
+
+header h2 {
+    font-size: 18px;
+    margin: 0px;
+    color: #888;
+    font-style: italic;
+}
+
+nav ul {
+    list-style: none;
+    padding: 0px;
+    display: block;
+    clear: right;
+    background-color: #666;
+    padding-left: 4px;
+    height: 24px;
+}
+
+nav ul li {
+    display: inline;
+    padding: 0px 20px 5px 10px;
+    height: 24px;
+    border-right: 1px solid #ccc;
+}
+
+nav ul li a {
+    color: #EFD3D3;
+    text-decoration: none;
+    font-size: 13px;
+    font-weight: bold;
+}
+
+nav ul li a:hover {
+    color: #fff;
+}
+
+article > header h1 {
+    font-size: 20px;
+    margin-left: 14px;
+}
+
+article > header h1 a {
+    color: #993333;
+}
+
+article > header h1 img {
+    vertical-align:middle;
+}
+
+article > section header h1 {
+    font-size: 16px;
+}
+
+article p {
+    clear: both;
+}
+
+article > section video {
+    width: 480px;
+    height: 200px;
+}
+
+article > section div.no-html5-video,
+article > section div#no-canvas {
+    width: 480px;
+    height: 40px;
+    border: 1px solid #993333;
+    text-align: center;
+    color: #993333;
+    font-size: 13px;
+    font-style: italic;
+    background-color: #F7E9E9;
+}
+
+article > section div#no-canvas {
+    display: none;
+}
+
+article > section form {
+    border: 1px solid #888;
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    border-radius: 10px;    
+    -moz-box-shadow: 10px 10px 5px #888;
+    -webkit-box-shadow: 10px 10px 5px #888;
+    box-shadow: 10px 10px 5px #888;
+    background-color: #eee;
+    padding: 10px;
+    margin-bottom: 30px;
+}
+
+article > section label {
+    font-weight: bold;
+    font-size: 13px;
+}
+
+article > section input {
+    margin-bottom: 3px;
+    font-size: 13px;
+}
+
+footer p {
+    text-align: center;
+    font-size: 12px;
+    color: #888;
+    margin-top: 24px;
+}
+
diff --git a/org.tizen.common.verrari.realm/test/doc/complex_template/tizen_32.png b/org.tizen.common.verrari.realm/test/doc/complex_template/tizen_32.png
new file mode 100755 (executable)
index 0000000..a37c33e
Binary files /dev/null and b/org.tizen.common.verrari.realm/test/doc/complex_template/tizen_32.png differ
diff --git a/org.tizen.common.verrari.realm/test/doc/realm/META-INF/MANIFEST.MF b/org.tizen.common.verrari.realm/test/doc/realm/META-INF/MANIFEST.MF
new file mode 100755 (executable)
index 0000000..f4ebef0
--- /dev/null
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Tizen-Template-Realm: org.tizen.common.verrari.realm.StandardSearchableRealm
diff --git a/org.tizen.common.verrari.realm/test/doc/simple_template/META-INF/MANIFEST.MF b/org.tizen.common.verrari.realm/test/doc/simple_template/META-INF/MANIFEST.MF
new file mode 100755 (executable)
index 0000000..bfa010b
--- /dev/null
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Tizen-Template-Name: simple-tizen-project
+Tizen-Template-Tags: simple,tizen,project,basic
+Tizen-Template-Version: 0.1
+Tizen-Template-Exclude: META-INF/*.*
diff --git a/org.tizen.common.verrari.realm/test/doc/simple_template/META-INF/messages.properties b/org.tizen.common.verrari.realm/test/doc/simple_template/META-INF/messages.properties
new file mode 100755 (executable)
index 0000000..47fc0a7
--- /dev/null
@@ -0,0 +1 @@
+NAME=test
\ No newline at end of file
diff --git a/org.tizen.common.verrari.realm/test/doc/simple_template/config.xml b/org.tizen.common.verrari.realm/test/doc/simple_template/config.xml
new file mode 100755 (executable)
index 0000000..e21c6c9
--- /dev/null
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" version="1.0.0" viewmodes="maximized">
+    <icon src="icon.png"/>
+    <content src="index.html"/>
+</widget>
\ No newline at end of file
diff --git a/org.tizen.common.verrari.realm/test/doc/simple_template/css/style.css b/org.tizen.common.verrari.realm/test/doc/simple_template/css/style.css
new file mode 100755 (executable)
index 0000000..3f12cd3
--- /dev/null
@@ -0,0 +1,120 @@
+* {
+    font-family: Lucida Sans, Arial, Helvetica, sans-serif;
+}
+
+body {
+    margin: 0px auto;
+}
+
+header h1 {
+    font-size: 36px;
+    margin: 0px;
+}
+
+header h2 {
+    font-size: 18px;
+    margin: 0px;
+    color: #888;
+    font-style: italic;
+}
+
+nav ul {
+    list-style: none;
+    padding: 0px;
+    display: block;
+    clear: right;
+    background-color: #666;
+    padding-left: 4px;
+    height: 24px;
+}
+
+nav ul li {
+    display: inline;
+    padding: 0px 20px 5px 10px;
+    height: 24px;
+    border-right: 1px solid #ccc;
+}
+
+nav ul li a {
+    color: #EFD3D3;
+    text-decoration: none;
+    font-size: 13px;
+    font-weight: bold;
+}
+
+nav ul li a:hover {
+    color: #fff;
+}
+
+article > header h1 {
+    font-size: 20px;
+    margin-left: 14px;
+}
+
+article > header h1 a {
+    color: #993333;
+}
+
+article > header h1 img {
+    vertical-align:middle;
+}
+
+article > section header h1 {
+    font-size: 16px;
+}
+
+article p {
+    clear: both;
+}
+
+article > section video {
+    width: 480px;
+    height: 200px;
+}
+
+article > section div.no-html5-video,
+article > section div#no-canvas {
+    width: 480px;
+    height: 40px;
+    border: 1px solid #993333;
+    text-align: center;
+    color: #993333;
+    font-size: 13px;
+    font-style: italic;
+    background-color: #F7E9E9;
+}
+
+article > section div#no-canvas {
+    display: none;
+}
+
+article > section form {
+    border: 1px solid #888;
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    border-radius: 10px;    
+    -moz-box-shadow: 10px 10px 5px #888;
+    -webkit-box-shadow: 10px 10px 5px #888;
+    box-shadow: 10px 10px 5px #888;
+    background-color: #eee;
+    padding: 10px;
+    margin-bottom: 30px;
+}
+
+article > section label {
+    font-weight: bold;
+    font-size: 13px;
+}
+
+article > section input {
+    margin-bottom: 3px;
+    font-size: 13px;
+}
+
+footer p {
+    text-align: center;
+    font-size: 12px;
+    color: #888;
+    margin-top: 24px;
+}
+
diff --git a/org.tizen.common.verrari.realm/test/doc/simple_template/icon.png b/org.tizen.common.verrari.realm/test/doc/simple_template/icon.png
new file mode 100755 (executable)
index 0000000..b0979b1
Binary files /dev/null and b/org.tizen.common.verrari.realm/test/doc/simple_template/icon.png differ
diff --git a/org.tizen.common.verrari.realm/test/doc/simple_template/images/tizen_32.png b/org.tizen.common.verrari.realm/test/doc/simple_template/images/tizen_32.png
new file mode 100755 (executable)
index 0000000..a37c33e
Binary files /dev/null and b/org.tizen.common.verrari.realm/test/doc/simple_template/images/tizen_32.png differ
diff --git a/org.tizen.common.verrari.realm/test/doc/simple_template/index.html b/org.tizen.common.verrari.realm/test/doc/simple_template/index.html
new file mode 100755 (executable)
index 0000000..b15c728
--- /dev/null
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
+    <meta name="description" content="Tizen basic template generated by Tizen Web IDE"/>
+
+    <title>Tizen Web IDE - Tizen - Tizen basic Application</title>
+
+    <link rel="stylesheet" type="text/css" href="css/style.css"/>
+    <script src="js/main.js"></script>
+</head>
+
+<body>
+  <header>
+    <hgroup>
+      <h1>Tizen App</h1>
+      <h2>An empty template of Tizen</h2>
+    </hgroup>
+  </header>
+
+  <nav>
+    <ul>
+       <li><a href="#">Home</a></li>
+       <li><a href="#">About Us</a></li>
+       <li><a href="#">Contact Us</a></li>
+    </ul>
+  </nav>
+
+  <article>
+    <header>
+      <h1>
+        <img src="images/tizen_32.png" /> Application Name
+      </h1>
+    </header>
+    <p>This is an empty template of Tizen Web Application. Tizen will support multiple device categories:
+      <ul>
+        <li>smartphones, tablets and smart TVs
+        <li>netbooks, in-vehicle infotainment devices
+      </ul>
+    </p>
+    <section>
+      <p>This is a basic section of a document.</p>
+      <p>The following button displays a time using JavaScript.</p>
+      <div id="divbutton1">
+        <button onclick="startTime();">Clock</button>
+      </div>
+    </section>
+  </article>
+
+  <footer>
+    <p>&copy; 2012 Company Name. All rights reserved.</p>
+  </footer>    
+</body>
+</html>
diff --git a/org.tizen.common.verrari.realm/test/doc/simple_template/js/main.js b/org.tizen.common.verrari.realm/test/doc/simple_template/js/main.js
new file mode 100755 (executable)
index 0000000..31dd9ec
--- /dev/null
@@ -0,0 +1,29 @@
+var startTime;
+var checkTime;
+
+//Initialize function
+var init = function () {
+    // TODO:: Do your initialization job
+    console.log("init() called");
+};
+// window.onload can work without <body onload="">
+window.onload = init;
+
+function startTime() {
+    var today = new Date();
+    var h = today.getHours();
+
+    var m = today.getMinutes();
+    var s = today.getSeconds();
+    m = checkTime(m);
+    s = checkTime(s);
+    document.getElementById('divbutton1').innerHTML="Current time: " + h + ":" + m + ":" + s;
+    t = setTimeout(startTime, 250);
+}
+
+function checkTime(i) {
+    if (i < 10) {
+        i="0" + i;
+    }
+    return i;
+}
\ No newline at end of file
diff --git a/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/AbstractTestCase.java b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/AbstractTestCase.java
new file mode 100755 (executable)
index 0000000..2965a42
--- /dev/null
@@ -0,0 +1,94 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+import org.junit.After;\r
+import org.junit.Before;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.tizen.common.classloader.CustomClassLoader;\r
+import org.tizen.common.classloader.JarClassSource;\r
+\r
+/**\r
+ * AbstractTestCase.\r
+ *\r
+ * abstract class for test case\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ *\r
+ */\r
+public class\r
+AbstractTestCase\r
+{\r
+    /**\r
+     * logger for this object\r
+     */\r
+    protected Logger logger = LoggerFactory.getLogger( getClass() );\r
+    \r
+    /**\r
+     * old config value for url handler\r
+     */\r
+    protected String oldConfig;\r
+    \r
+    /**\r
+     * cloassloader to use in test case\r
+     */\r
+    protected CustomClassLoader cl;\r
+    \r
+    /**\r
+     * Initialize test case\r
+     * \r
+     * @throws Exception If initialization occur error\r
+     */\r
+    @Before\r
+    public void\r
+    setUp()\r
+    throws Exception\r
+    {\r
+        oldConfig = System.getProperty( "java.protocol.handler.pkgs" );\r
+        System.setProperty( "java.protocol.handler.pkgs", "org.tizen.common.util.url" );\r
+        final JarClassSource source = new JarClassSource( "cp:///" + getClass().getPackage().getName().replace( '.', '/' ) + "/realm.jar" );\r
+        cl = new CustomClassLoader( source );\r
+    }\r
+    \r
+    /**\r
+     * clean up test case\r
+     */\r
+    @After\r
+    public\r
+    void\r
+    tearDown()\r
+    {\r
+        if ( null == oldConfig )\r
+        {\r
+            System.clearProperty( "java.protocol.handler.pkgs" );\r
+        }\r
+        else\r
+        {\r
+            System.setProperty( "java.protocol.handler.pkgs", oldConfig );\r
+        }\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/MANIFEST.MF b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/MANIFEST.MF
new file mode 100755 (executable)
index 0000000..7406666
--- /dev/null
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+Tizen-Template-Realm: org.tizen.common.verrari.realm.StandardRealm
diff --git a/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/RealmFactoryTest.java b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/RealmFactoryTest.java
new file mode 100755 (executable)
index 0000000..3c59b64
--- /dev/null
@@ -0,0 +1,96 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+import static org.junit.Assert.assertEquals;\r
+import static org.tizen.common.util.IOUtil.tryClose;\r
+\r
+import java.io.InputStream;\r
+import java.net.URL;\r
+import java.util.Map;\r
+\r
+import org.junit.Test;\r
+import org.tizen.common.verrari.realm.StandardRealm;\r
+\r
+/**\r
+ * RealmFactoryTest.\r
+ *\r
+ * Test case for {@link RealmFactory}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ *\r
+ * @see RealmFactory\r
+ *\r
+ */\r
+public class\r
+RealmFactoryTest\r
+extends AbstractTestCase\r
+{\r
+    /**\r
+     * Test {@link RealmFactory#getRealmName(InputStream)}\r
+     *\r
+     * @throws Exception in case of failure in test\r
+     *\r
+     * @see RealmFactory#getRealmName(InputStream)\r
+     */\r
+    @Test\r
+    public\r
+    void\r
+    test_getRealmName()\r
+    throws Exception\r
+    {\r
+        final InputStream in =\r
+            getClass().getClassLoader().getResourceAsStream( getClass().getPackage().getName().replace( '.', '/' ) + "/MANIFEST.MF" );\r
+        try\r
+        {\r
+            assertEquals( StandardRealm.class.getName(), RealmFactory.getInstance().getRealmName( in ) );\r
+        }\r
+        finally\r
+        {\r
+            tryClose( in );\r
+        }\r
+        \r
+    }\r
+\r
+    /**\r
+     * Test {@link RealmFactory#load(ClassLoader, Map)}\r
+     *\r
+     * @throws Exception in case of failure in test\r
+     *\r
+     * @see RealmFactory#load(ClassLoader, Map)\r
+     */\r
+    @Test\r
+    public\r
+    void\r
+    test_load()\r
+    throws Exception\r
+    {\r
+        final Realm realm =\r
+            RealmFactory.getInstance().create( new URL( "cp:///" + getClass().getPackage().getName().replace( '.', '/' ) + "/config.json" ) );\r
+        \r
+        assertEquals( "tizen-standard-realm", realm.getAttribute( "id" ) );\r
+        \r
+    }\r
+}\r
diff --git a/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/config.json b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/config.json
new file mode 100755 (executable)
index 0000000..5defc36
--- /dev/null
@@ -0,0 +1,6 @@
+{\r
+    "id": "tizen-standard-realm",\r
+    "loader": "cp:///org/tizen/common/verrari/realm.jar",\r
+    "template-query-url": "cp:///org/tizen/common/verrari/template/<{id}>",\r
+    "category-query-url": "cp:///org/tizen/common/verrari/category/<{id}>"\r
+}
\ No newline at end of file
diff --git a/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/realm.jar b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/realm.jar
new file mode 100755 (executable)
index 0000000..6157c38
Binary files /dev/null and b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/realm.jar differ
diff --git a/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/realm/StandardRealmTest.java b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/realm/StandardRealmTest.java
new file mode 100755 (executable)
index 0000000..22662fe
--- /dev/null
@@ -0,0 +1,76 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.realm;\r
+\r
+import static org.junit.Assert.assertNotNull;\r
+\r
+import java.util.Map;\r
+\r
+import org.junit.Test;\r
+import org.tizen.common.util.MapUtil;\r
+import org.tizen.common.verrari.AbstractTestCase;\r
+import org.tizen.common.verrari.Template;\r
+\r
+/**\r
+ * StandardRealmTest.\r
+ *\r
+ * Test case for {@link StandardRealm}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ *\r
+ * @see MapUtil\r
+ *\r
+ */\r
+public class\r
+StandardRealmTest\r
+extends AbstractTestCase\r
+{\r
+    /**\r
+     * Test {@link StandardRealm#getTemplate(String)}\r
+     *\r
+     * @throws Exception in case of failure in test\r
+     *\r
+     * @see StandardRealm#getTemplate(String)\r
+     */\r
+    @SuppressWarnings("unchecked")\r
+    @Test\r
+    public void test_getTemplate() throws Exception\r
+    {\r
+        final StandardRealm realm = new StandardRealm();\r
+        final Map<?, ?> attrs = MapUtil.asMap( new Object[][] {\r
+            new Object[] { "id", "tizen-standard-realm" },\r
+                new Object[] { "loader", "cp:///org/tizen/common/verrari/realm.jar" },\r
+                new Object[] { "template-query-url", "cp:///org/tizen/common/verrari/template/${id}.jar" },\r
+                new Object[] { "search-query-url", "cp:///org/tizen/common/verrari/category" }\r
+        } );\r
+        realm.setAttributes( (Map<String, String>) attrs );\r
+        final Template simple = realm.getTemplate( "simple-template" );\r
+        assertNotNull( simple );\r
+        // TODO\r
+//        final Template complex = realm.getTemplate( "complex-template" );\r
+//        assertNotNull( complex );\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/StandardMapperTest.java b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/StandardMapperTest.java
new file mode 100755 (executable)
index 0000000..f5da9e3
--- /dev/null
@@ -0,0 +1,83 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+import static org.junit.Assert.assertEquals;\r
+\r
+import java.util.LinkedHashMap;\r
+import java.util.regex.Pattern;\r
+\r
+import org.junit.Test;\r
+import org.tizen.common.verrari.TemplateContext;\r
+import org.tizen.common.verrari.model.ModelManager;\r
+\r
+/**\r
+ * StandardMapperTest.\r
+ *\r
+ * Test case for {@link StandardMapper}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ *\r
+ * @see StandardMapper\r
+ *\r
+ */\r
+public class\r
+StandardMapperTest\r
+{\r
+\r
+    /**\r
+     * Test {@link StandardMapper#map(String)}\r
+     *\r
+     * @throws Exception in case of failure in test\r
+     *\r
+     * @see StandardMapper#map(String)\r
+     */\r
+    @Test\r
+    public void test_map()\r
+    {\r
+        final StandardMapper target = new StandardMapper();\r
+        final LinkedHashMap<String, String> mappings = new LinkedHashMap<String, String>();\r
+        mappings.put( "model\\.js", "${MODEL_NAME}.js" );\r
+        mappings.put( "([a-zA-Z]*)([0-9]?)\\.js$", "$1-$2.js" );\r
+        target.setMappings( mappings );\r
+        \r
+        ModelManager modelProvider = new ModelManager();\r
+        modelProvider.addModel( "MODEL_NAME", "Person" );\r
+        TemplateContext.getInstance().setModelProvider( modelProvider );\r
+        \r
+        System.out.println( Pattern.matches( "^([a-zA-Z]*)([0-9]?)\\.js$", "Abcdef9.js" ) );\r
+        System.out.println( "Abcdef9.js".replaceAll( "([a-zA-Z]*)([0-9]?)\\.js$", "$1-$2.js" ) );\r
+        try\r
+        {\r
+            assertEquals( "Person.js", target.map( "model.js" ) );\r
+            assertEquals( "Abcdef-9.js", target.map( "Abcdef9.js" ) );\r
+        }\r
+        finally\r
+        {\r
+            TemplateContext.clear();\r
+        }\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/StandardTemplateTest.java b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/StandardTemplateTest.java
new file mode 100755 (executable)
index 0000000..efdc0ad
--- /dev/null
@@ -0,0 +1,139 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+import static org.junit.Assert.assertEquals;\r
+import static org.junit.Assert.assertTrue;\r
+import static org.mockito.Matchers.anyString;\r
+import static org.mockito.Mockito.mock;\r
+import static org.mockito.Mockito.when;\r
+import static org.tizen.common.util.IOUtil.getBytes;\r
+\r
+import java.io.ByteArrayOutputStream;\r
+import java.io.InputStream;\r
+import java.net.URL;\r
+\r
+import org.junit.Test;\r
+import org.tizen.common.file.Filter;\r
+import org.tizen.common.verrari.AbstractTestCase;\r
+import org.tizen.common.verrari.IModelProvider;\r
+import org.tizen.common.verrari.Storage;\r
+import org.tizen.common.verrari.model.ModelManager;\r
+\r
+/**\r
+ * StandardTemplateTest.\r
+ *\r
+ * Test case for {@link StandardTemplate}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ *\r
+ * @see StandardTemplate\r
+ *\r
+ */\r
+public class StandardTemplateTest\r
+extends AbstractTestCase\r
+{\r
+\r
+    /**\r
+     * Test {@link StandardTemplate#template(IModelProvider, Storage)}\r
+     *\r
+     * @throws Exception in case of failure in test\r
+     *\r
+     * @see StandardTemplate#template(IModelProvider, Storage)\r
+     */\r
+    @Test\r
+    public\r
+    void\r
+    test_template()\r
+    throws Exception\r
+    {\r
+        {\r
+            final URL u = new URL( "cp:///simple-template.jar" );\r
+            final InputStream in = u.openStream();\r
+\r
+            StandardTemplate template = new StandardTemplate( getBytes( in, true ) );\r
+\r
+            Storage storageMock = mock( Storage.class );\r
+            when( storageMock.getTarget( anyString() ) ).thenReturn( new ByteArrayOutputStream() );\r
+            ModelManager models = new ModelManager();\r
+            template.template( models, storageMock );\r
+        }\r
+\r
+        {\r
+            final URL u = new URL( "cp:///tizen-web-project.jar" );\r
+            final InputStream in = u.openStream();\r
+\r
+            StandardTemplate template = new StandardTemplate( getBytes( in, true ) );\r
+\r
+            Storage storageMock = mock( Storage.class );\r
+            when( storageMock.getTarget( anyString() ) ).thenReturn( new ByteArrayOutputStream() );\r
+            ModelManager models = new ModelManager();\r
+            models.addModel( "SITE_DOMAIN", "mysite.com" );\r
+            models.addModel( "APP_ICON", "icon.ico" );\r
+            models.addModel( "START_PAGE", "index.html" );\r
+            models.addModel( "APP_NAME", "test" );\r
+            models.addModel( "APP_ID", "12345678" );\r
+            template.template( models, storageMock );\r
+\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Test {@link StandardTemplate#template(IModelProvider, Storage)}\r
+     *\r
+     * @throws Exception in case of failure in test\r
+     *\r
+     * @see StandardTemplate#template(IModelProvider, Storage)\r
+     */\r
+    @Test\r
+    public\r
+    void\r
+    test_createFilter()\r
+    throws Exception\r
+    {\r
+        StandardTemplate target = new StandardTemplate( new byte[0] );\r
+        Filter filter = target.createFilter( new String[] { "tizen-web-ui-fw/*" }, null );\r
+        \r
+        assertTrue( filter.accept( "/", "tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" ) );\r
+    }\r
+    \r
+    /**\r
+     * Test {@link StandardTemplate#template(IModelProvider, Storage)}\r
+     *\r
+     * @throws Exception in case of failure in test\r
+     *\r
+     * @see StandardTemplate#template(IModelProvider, Storage)\r
+     */\r
+    @Test\r
+    public\r
+    void\r
+    test_loadMessage()\r
+    throws Exception\r
+    {\r
+        final URL u = new URL( "cp:///simple-template.jar" );\r
+        StandardTemplate target = new StandardTemplate( getBytes( u.openStream(), true ) );\r
+        assertEquals( "test", target.getMessage( "NAME" ) );\r
+    }\r
+}\r
diff --git a/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/complex-template.jar b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/complex-template.jar
new file mode 100755 (executable)
index 0000000..f1707b1
Binary files /dev/null and b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/complex-template.jar differ
diff --git a/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/simple-template.jar b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/simple-template.jar
new file mode 100755 (executable)
index 0000000..a3d2157
Binary files /dev/null and b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/simple-template.jar differ
diff --git a/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/tizen-web-project.jar b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/tizen-web-project.jar
new file mode 100755 (executable)
index 0000000..de3a4c1
Binary files /dev/null and b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/template/tizen-web-project.jar differ
diff --git a/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/util/QueryFactoryTest.java b/org.tizen.common.verrari.realm/test/src/org/tizen/common/verrari/util/QueryFactoryTest.java
new file mode 100755 (executable)
index 0000000..ace754c
--- /dev/null
@@ -0,0 +1,76 @@
+/*\r
+ *  Verrari - Realm\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.util;\r
+\r
+import static org.junit.Assert.assertEquals;\r
+import static org.mockito.Mockito.mock;\r
+import static org.mockito.Mockito.when;\r
+\r
+import java.util.HashMap;\r
+\r
+import org.junit.Test;\r
+import org.tizen.common.verrari.Realm;\r
+import org.tizen.common.verrari.realm.Query;\r
+import org.tizen.common.verrari.realm.RealmConstants;\r
+\r
+/**\r
+ * QueryFactoryTest.\r
+ *\r
+ * Test case for {@link QueryFactory}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ *\r
+ * @see QueryFactory\r
+ *\r
+ */\r
+public class\r
+QueryFactoryTest\r
+{\r
+\r
+    /**\r
+     * Test {@link QueryFactory.PatternQuery#query(java.util.Map)}\r
+     *\r
+     * @throws Exception in case of failure in test\r
+     *\r
+     * @see QueryFactory.PatternQuery#query(java.util.Map)\r
+     */\r
+    @Test\r
+    public\r
+    void\r
+    test_PatternQuery()\r
+    {\r
+        Realm realm = mock( Realm.class );\r
+        when( realm.getAttribute( RealmConstants.ATTR_TEMPLATE_URL ) )\r
+        .thenReturn( "file://$${CLI_HOME}/realm/template/$${id}.jar" );\r
+        Query q = QueryFactory.getInstance().createTemplateQuery( realm );\r
+        HashMap<String, Object> models = new HashMap<String, Object>();\r
+        models.put( "CLI_HOME", "aaa" );\r
+        models.put( "id", "fjdkjfdk" );\r
+        final String result = q.query( models );\r
+        \r
+        assertEquals( "file://aaa/realm/template/fjdkjfdk.jar", result );\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari/.classpath b/org.tizen.common.verrari/.classpath
new file mode 100644 (file)
index 0000000..a885b9b
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry exported="true" kind="lib" path="lib/jsoup-1.6.3.jar"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="src" path="test/src"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.tizen.common.verrari/.project b/org.tizen.common.verrari/.project
new file mode 100644 (file)
index 0000000..6b5e763
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.tizen.common.verrari</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.tizen.common.verrari/.settings/org.eclipse.jdt.core.prefs b/org.tizen.common.verrari/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..c3c3ee1
--- /dev/null
@@ -0,0 +1,8 @@
+#Tue Jul 24 20:15:30 KST 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/org.tizen.common.verrari/META-INF/MANIFEST.MF b/org.tizen.common.verrari/META-INF/MANIFEST.MF
new file mode 100755 (executable)
index 0000000..7755341
--- /dev/null
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.tizen.common.verrari
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.tizen.common.verrari.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.tizen.common
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: lib/jsoup-1.6.3.jar,
+ .
+Export-Package: org.jsoup,
+ org.jsoup.examples,
+ org.jsoup.helper,
+ org.jsoup.nodes,
+ org.jsoup.parser,
+ org.jsoup.safety,
+ org.jsoup.select,
+ org.tizen.common.verrari,
+ org.tizen.common.verrari.engine,
+ org.tizen.common.verrari.engine.freemarker,
+ org.tizen.common.verrari.engine.jsoup,
+ org.tizen.common.verrari.model,
+ org.tizen.common.verrari.model.jsoup,
+ org.tizen.common.verrari.template,
+ org.tizen.common.verrari.util
diff --git a/org.tizen.common.verrari/OSGI-INF/l10n/bundle.properties b/org.tizen.common.verrari/OSGI-INF/l10n/bundle.properties
new file mode 100644 (file)
index 0000000..8b37436
--- /dev/null
@@ -0,0 +1,3 @@
+#Properties file for org.tizen.common.verrari
+Bundle-Vendor = The Linux Foundation
+Bundle-Name = Tizen Verrari - Template Engine
\ No newline at end of file
diff --git a/org.tizen.common.verrari/about.html b/org.tizen.common.verrari/about.html
new file mode 100644 (file)
index 0000000..e96d835
--- /dev/null
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May, 2011</p>
+<h3>Tizen SDK</h3>
+
+<p><a href="http://www.tizen.org/" target="_blank">Tizen SDK</a> 
+is a set of Eclipse plug-ins that helps programmers to develop applications for 
+the mobile platform.</p>
+
+<h3>License</h3>
+
+<p>See <a href="about_files/LICENSE-2.0.htm">Apache License, Version 2.0</a>.</p>
+
+<h3>Third Party Content</h3>
+
+<p>The Content includes items that have been sourced from third parties as set out below. If you did not
+receive this Content directly from the Eclipse Foundation, the following is provided for informational
+purposes only, and you should look to the Redistributor's license for terms and conditions of use.</p>
+
+<h4>jsoup</h4>
+<p>
+jsoup is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods
+</p>
+
+<p>
+A copy of the license is included in <a href="about_files/jsoup-LICENSE.txt">about_files/jsoup-LICENSE.txt</a>. The home page is located at:
+<ul>
+<a href="http://jsoup.org/">http://jsoup.org/</a>
+</ul>
+</p>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.common.verrari/about_files/LICENSE-2.0.htm b/org.tizen.common.verrari/about_files/LICENSE-2.0.htm
new file mode 100644 (file)
index 0000000..f7ca656
--- /dev/null
@@ -0,0 +1,191 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache License, Version 2.0</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+    <link rel="stylesheet" type="text/css" media="screen" href="/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="/css/code.css">
+
+    <script type="text/javascript" src="/js/jquery.js"></script>
+    <script type="text/javascript" src="/js/apache_boot.js"></script>
+
+    
+
+    
+    <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License.  You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License. -->
+  </head>
+
+  <body>
+    <div id="page" class="container_16">
+      <div id="header" class="grid_8">
+        <h1>The Apache Software Foundation</h1>
+        <h2>Apache License, Version 2.0</h2>
+      </div>
+
+      <div class="clear"></div>
+      <div id="content" class="grid_16"><div class="section-content"><p>Apache License<br></br>Version 2.0, January 2004<br></br>
+<a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a> </p>
+<p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p>
+<p><strong><a name="definitions">1. Definitions</a></strong>.</p>
+<p>"License" shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.</p>
+<p>"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.</p>
+<p>"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control with
+that entity. For the purposes of this definition, "control" means (i) the
+power, direct or indirect, to cause the direction or management of such
+entity, whether by contract or otherwise, or (ii) ownership of fifty
+percent (50%) or more of the outstanding shares, or (iii) beneficial
+ownership of such entity.</p>
+<p>"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.</p>
+<p>"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.</p>
+<p>"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media types.</p>
+<p>"Work" shall mean the work of authorship, whether in Source or Object form,
+made available under the License, as indicated by a copyright notice that
+is included in or attached to the work (an example is provided in the
+Appendix below).</p>
+<p>"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent, as
+a whole, an original work of authorship. For the purposes of this License,
+Derivative Works shall not include works that remain separable from, or
+merely link (or bind by name) to the interfaces of, the Work and Derivative
+Works thereof.</p>
+<p>"Contribution" shall mean any work of authorship, including the original
+version of the Work and any modifications or additions to that Work or
+Derivative Works thereof, that is intentionally submitted to Licensor for
+inclusion in the Work by the copyright owner or by an individual or Legal
+Entity authorized to submit on behalf of the copyright owner. For the
+purposes of this definition, "submitted" means any form of electronic,
+verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems that
+are managed by, or on behalf of, the Licensor for the purpose of discussing
+and improving the Work, but excluding communication that is conspicuously
+marked or otherwise designated in writing by the copyright owner as "Not a
+Contribution."</p>
+<p>"Contributor" shall mean Licensor and any individual or Legal Entity on
+behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.</p>
+<p><strong><a name="copyright">2. Grant of Copyright License</a></strong>. Subject to the
+terms and conditions of this License, each Contributor hereby grants to You
+a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of, publicly
+display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.</p>
+<p><strong><a name="patent">3. Grant of Patent License</a></strong>. Subject to the terms
+and conditions of this License, each Contributor hereby grants to You a
+perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made, use,
+offer to sell, sell, import, and otherwise transfer the Work, where such
+license applies only to those patent claims licensable by such Contributor
+that are necessarily infringed by their Contribution(s) alone or by
+combination of their Contribution(s) with the Work to which such
+Contribution(s) was submitted. If You institute patent litigation against
+any entity (including a cross-claim or counterclaim in a lawsuit) alleging
+that the Work or a Contribution incorporated within the Work constitutes
+direct or contributory patent infringement, then any patent licenses
+granted to You under this License for that Work shall terminate as of the
+date such litigation is filed.</p>
+<p><strong><a name="redistribution">4. Redistribution</a></strong>. You may reproduce and
+distribute copies of the Work or Derivative Works thereof in any medium,
+with or without modifications, and in Source or Object form, provided that
+You meet the following conditions:</p>
+<ol>
+<li>
+<p>You must give any other recipients of the Work or Derivative Works a
+copy of this License; and</p>
+</li>
+<li>
+<p>You must cause any modified files to carry prominent notices stating
+that You changed the files; and</p>
+</li>
+<li>
+<p>You must retain, in the Source form of any Derivative Works that You
+distribute, all copyright, patent, trademark, and attribution notices from
+the Source form of the Work, excluding those notices that do not pertain to
+any part of the Derivative Works; and</p>
+</li>
+<li>
+<p>If the Work includes a "NOTICE" text file as part of its distribution,
+then any Derivative Works that You distribute must include a readable copy
+of the attribution notices contained within such NOTICE file, excluding
+those notices that do not pertain to any part of the Derivative Works, in
+at least one of the following places: within a NOTICE text file distributed
+as part of the Derivative Works; within the Source form or documentation,
+if provided along with the Derivative Works; or, within a display generated
+by the Derivative Works, if and wherever such third-party notices normally
+appear. The contents of the NOTICE file are for informational purposes only
+and do not modify the License. You may add Your own attribution notices
+within Derivative Works that You distribute, alongside or as an addendum to
+the NOTICE text from the Work, provided that such additional attribution
+notices cannot be construed as modifying the License.
+You may add Your own copyright statement to Your modifications and may
+provide additional or different license terms and conditions for use,
+reproduction, or distribution of Your modifications, or for any such
+Derivative Works as a whole, provided Your use, reproduction, and
+distribution of the Work otherwise complies with the conditions stated in
+this License.</p>
+</li>
+</ol>
+<p><strong><a name="contributions">5. Submission of Contributions</a></strong>. Unless You
+explicitly state otherwise, any Contribution intentionally submitted for
+inclusion in the Work by You to the Licensor shall be under the terms and
+conditions of this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify the
+terms of any separate license agreement you may have executed with Licensor
+regarding such Contributions.</p>
+<p><strong><a name="trademarks">6. Trademarks</a></strong>. This License does not grant
+permission to use the trade names, trademarks, service marks, or product
+names of the Licensor, except as required for reasonable and customary use
+in describing the origin of the Work and reproducing the content of the
+NOTICE file.</p>
+<p><strong><a name="no-warranty">7. Disclaimer of Warranty</a></strong>. Unless required by
+applicable law or agreed to in writing, Licensor provides the Work (and
+each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
+without limitation, any warranties or conditions of TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You
+are solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your exercise
+of permissions under this License.</p>
+<p><strong><a name="no-liability">8. Limitation of Liability</a></strong>. In no event and
+under no legal theory, whether in tort (including negligence), contract, or
+otherwise, unless required by applicable law (such as deliberate and
+grossly negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a result
+of this License or out of the use or inability to use the Work (including
+but not limited to damages for loss of goodwill, work stoppage, computer
+failure or malfunction, or any and all other commercial damages or losses),
+even if such Contributor has been advised of the possibility of such
+damages.</p>
+<p><strong><a name="additional">9. Accepting Warranty or Additional Liability</a></strong>.
+While redistributing the Work or Derivative Works thereof, You may choose
+to offer, and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this License.
+However, in accepting such obligations, You may act only on Your own behalf
+and on Your sole responsibility, not on behalf of any other Contributor,
+and only if You agree to indemnify, defend, and hold each Contributor
+harmless for any liability incurred by, or claims asserted against, such
+Contributor by reason of your accepting any such warranty or additional
+liability.</p>
+<p>END OF TERMS AND CONDITIONS</p>
+
+    <div class="clear"></div>
+    
+    </div>
+    <div id="copyright" class="container_16">
+      <p>Copyright &#169; 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+    </div>
+  </body>
+</html>
diff --git a/org.tizen.common.verrari/about_files/jsoup-LICENSE.txt b/org.tizen.common.verrari/about_files/jsoup-LICENSE.txt
new file mode 100644 (file)
index 0000000..fda732e
--- /dev/null
@@ -0,0 +1,21 @@
+The MIT License\r
+\r
+Copyright (c) 2009, 2010, 2011, 2012 Jonathan Hedley <jonathan@hedley.net>\r
+\r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in\r
+all copies or substantial portions of the Software.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
+THE SOFTWARE.
\ No newline at end of file
diff --git a/org.tizen.common.verrari/build.properties b/org.tizen.common.verrari/build.properties
new file mode 100644 (file)
index 0000000..5fa4ce5
--- /dev/null
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               about.html,\
+               about_files/,\
+               OSGI-INF/,\
+               lib/jsoup-1.6.3.jar,\
+               templates/jar/,\
+               templates/engine/
diff --git a/org.tizen.common.verrari/doc/spec.txt b/org.tizen.common.verrari/doc/spec.txt
new file mode 100755 (executable)
index 0000000..e87a54d
--- /dev/null
@@ -0,0 +1,21 @@
+Directive : Instruction for template engine\r
+- Applied at loading-time not run-time\r
+- Rarely used notation( for avoid to complict with other template engine )\r
+- Type\r
+ * Comment\r
+ * Transform\r
+ * Expression\r
+ * Escape character\r
+- Example\r
+ * Line Comment : #\r
+ * Block comment : <[ ]>\r
+ * Transform : <{@name}> => ${name}\r
+ * Expression : <{&now}> => current date, <{id:&uuid(8)}> => assign new uuid composed of 8 characters to varialbe id\r
+\r
+- Process\r
+ * Template Engine Initialize\r
+   * Comment Striping\r
+   * Transform\r
+ * Execution of templating\r
+   * Pre-execution( if needed )\r
+   * Delegate templaing to implmentaion engine( ex. freemarker )
\ No newline at end of file
diff --git a/org.tizen.common.verrari/lib/jsoup-1.6.3.jar b/org.tizen.common.verrari/lib/jsoup-1.6.3.jar
new file mode 100644 (file)
index 0000000..b3421d5
Binary files /dev/null and b/org.tizen.common.verrari/lib/jsoup-1.6.3.jar differ
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/Activator.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/Activator.java
new file mode 100644 (file)
index 0000000..590aabf
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.verrari;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.tizen.common.verrari"; //$NON-NLS-1$
+
+    // The shared instance
+    private static Activator plugin;
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance
+     *
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
+
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/IModelManager.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/IModelManager.java
new file mode 100755 (executable)
index 0000000..9828ab0
--- /dev/null
@@ -0,0 +1,56 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+\r
+/**\r
+ * IModelManager.\r
+ *\r
+ * Interface to add and remove model\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public interface\r
+IModelManager\r
+extends IModelProvider\r
+{\r
+    /**\r
+     * add model\r
+     * \r
+     * @param key key to indicate model\r
+     * @param model model to be indicated by <code>key</code>\r
+     */\r
+    void addModel( String key, Object model );\r
+    \r
+    /**\r
+     * remove model\r
+     * \r
+     * @param key key to indicate model\r
+     */\r
+    void removeModel( String key );\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/IModelProvider.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/IModelProvider.java
new file mode 100755 (executable)
index 0000000..def0bf9
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.verrari;
+
+import java.util.Collection;
+
+
+/**
+ * IModelProvider.
+ *
+ * Interface to provide models.
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public interface
+IModelProvider
+{
+
+    /**
+     * Check if no model
+     * 
+     * @return flag if no model
+     */
+    boolean isEmpty();
+    
+    /**
+     * Reteurn keys for models
+     * 
+     * @return keys
+     */
+    Collection<String> keys();
+    
+    /**
+     * Return model to be indicated by <code>key</code>
+     * 
+     * @param key key
+     * 
+     * @return model
+     */
+    Object getModel(String key);
+    
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/ITemplate.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/ITemplate.java
new file mode 100755 (executable)
index 0000000..b06d78c
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.verrari;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * ITemplate.
+ *
+ * Common Template Interface
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public interface
+ITemplate
+{
+    /**
+     * Return encoding for this template
+     * 
+     * @return encoding
+     */
+    String getEncoding();
+    
+    /**
+     * Open and return {@link InputStream} for template
+     * 
+     * @return {@link InputStream}
+     * 
+     * @throws IOException if template can't be read
+     */
+    InputStream open() throws IOException;
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/ITemplateEngine.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/ITemplateEngine.java
new file mode 100755 (executable)
index 0000000..2649d36
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.verrari;
+
+import java.io.OutputStream;
+
+
+/**
+ * ITemplateEngine.
+ *
+ * Template Engine Interface
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public interface ITemplateEngine {
+
+    /**
+     * Return engine version
+     * 
+     * @return version
+     */
+    String getEngineVersion();
+    
+    /**
+     * Return template provider used in engine
+     * 
+     * @return {@link ITemplateProvider}
+     */
+    ITemplateProvider getTemplateProvider();
+    
+    /**
+     * Set template provider to be used in engine
+     * 
+     * @param provider {@link ITemplateProvider}
+     */
+    void setTemplateProvider( ITemplateProvider provider );
+
+    /**
+     * Generate result for <code>templateKey</code> and write to <code>output</code> with <code>modelProvider</code>
+     * 
+     * @param templateKey key of template to apply
+     * @param modelProvider model set
+     * @param output {@link OutputStream} to write
+     * 
+     * @throws Exception If It can't create result
+     */
+    void generate( String templateKey, IModelProvider modelProvider, OutputStream output ) throws Exception;
+
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/ITemplateManager.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/ITemplateManager.java
new file mode 100755 (executable)
index 0000000..a0d1de9
--- /dev/null
@@ -0,0 +1,56 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+\r
+/**\r
+ * ITemplateManager.\r
+ *\r
+ * Interface to add and remove template.\r
+ *\r
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)\r
+ */\r
+public interface\r
+ITemplateManager\r
+{\r
+    /**\r
+     * add template with key\r
+     * \r
+     * @param key key to indicate template\r
+     * @param template template to add\r
+     */\r
+    void addTemplate( String key, ITemplate template );\r
+\r
+    /**\r
+     * remove template being indicated by <code>key</code>\r
+     * \r
+     * @param key key to indicate template\r
+     */\r
+    void removeTemplate( String key );\r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/ITemplateProvider.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/ITemplateProvider.java
new file mode 100755 (executable)
index 0000000..80748a8
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.verrari;
+
+import java.util.Collection;
+
+import org.tizen.common.verrari.template.TemplateTransformer;
+
+
+/**
+ * ITemplateProvider.
+ *
+ * Interface to provide templates.
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public interface ITemplateProvider {
+    
+    void setTransformer( TemplateTransformer transformer );
+    
+    /**
+     * Check if no template
+     * 
+     * @return flag if no template
+     */
+    boolean isEmpty();
+    
+    /**
+     * Reteurn keys for templates
+     * 
+     * @return keys
+     */
+    Collection<String> keys();
+
+    /**
+     * Return template to be indicated by <code>key</code>
+     * 
+     * @param key key
+     * 
+     * @return {@link ITemplate}
+     */
+    ITemplate getTemplate(String key);
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/TemplateContext.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/TemplateContext.java
new file mode 100755 (executable)
index 0000000..87bfa21
--- /dev/null
@@ -0,0 +1,105 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+import java.util.HashMap;\r
+\r
+import org.tizen.common.verrari.model.ModelManager;\r
+\r
+public class TemplateContext\r
+{\r
+    protected static ThreadLocal<TemplateContext> cabinet = new ThreadLocal<TemplateContext>() {\r
+        @Override\r
+        protected TemplateContext initialValue()\r
+        {\r
+            return new TemplateContext();\r
+        }\r
+    };\r
+    \r
+    protected IModelProvider provider = new ModelManager();\r
+    \r
+    protected HashMap<String, Object> key2value = new HashMap<String, Object>();\r
+    \r
+    public static final TemplateContext getInstance()\r
+    {\r
+        return cabinet.get();\r
+    }\r
+    \r
+    public static\r
+    void\r
+    clear()\r
+    {\r
+        cabinet.remove();\r
+    }\r
+    \r
+    public static\r
+    void\r
+    set( TemplateContext context )\r
+    {\r
+        cabinet.set( context );\r
+    }\r
+    \r
+    public static\r
+    Object\r
+    get(\r
+        final String key\r
+    ) \r
+    {\r
+        return getInstance().getModelProvider().getModel( key );\r
+    }\r
+    \r
+    public\r
+    IModelProvider\r
+    getModelProvider()\r
+    {\r
+        return this.provider;\r
+    }\r
+    \r
+    public\r
+    void\r
+    setModelProvider( final IModelProvider provider )\r
+    {\r
+        this.provider = provider;\r
+    }\r
+    \r
+    public\r
+    Object\r
+    getData( final String key )\r
+    {\r
+        return this.key2value.get( key );\r
+    }\r
+    \r
+    public\r
+    void\r
+    setData( final String key, final Object data )\r
+    {\r
+        key2value.put( key, data );\r
+    }\r
+    \r
+    \r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/TemplateException.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/TemplateException.java
new file mode 100755 (executable)
index 0000000..127890f
--- /dev/null
@@ -0,0 +1,57 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari;\r
+\r
+\r
+public class\r
+TemplateException\r
+extends Exception\r
+{\r
+    private static final long serialVersionUID = 7233052548712665806L;\r
+\r
+    public TemplateException()\r
+    {\r
+        \r
+    }\r
+    \r
+    public TemplateException( final String msg )\r
+    {\r
+        super( msg );\r
+    }\r
+    \r
+    public TemplateException( final Throwable cause )\r
+    {\r
+        super( cause );\r
+    }\r
+    \r
+    public TemplateException( final String msg, final Throwable cause )\r
+    {\r
+        super( msg, cause );\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/AbstractTemplateEngine.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/AbstractTemplateEngine.java
new file mode 100755 (executable)
index 0000000..e04eed8
--- /dev/null
@@ -0,0 +1,116 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.verrari.engine;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.verrari.ITemplate;
+import org.tizen.common.verrari.ITemplateEngine;
+import org.tizen.common.verrari.ITemplateProvider;
+import org.tizen.common.verrari.template.TemplateManager;
+import org.tizen.common.verrari.template.TemplateProvider;
+
+/**
+ * AbstractTemplateEngine.
+ *
+ * common template engine
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public abstract class
+AbstractTemplateEngine
+implements ITemplateEngine
+{
+    /**
+     * Logger for this instance
+     */
+    protected final Logger logger =  LoggerFactory.getLogger( getClass() );
+
+    /**
+     * {@link TemplateProvider} for this template engine
+     */
+    protected ITemplateProvider templateProvider;
+    
+    public
+    AbstractTemplateEngine()
+    {
+        this( new TemplateManager() );
+    }
+    
+    /**
+     * Constructor with {@link TemplateProvider}
+     * @param templateProvider
+     */
+    public
+    AbstractTemplateEngine(
+        final ITemplateProvider templateProvider
+    )
+    {
+        setTemplateProvider( templateProvider );
+    }
+    
+    /* (non-Javadoc)
+     * @see org.tizen.common.verrari.ITemplateEngine#getTemplateProvider()
+     */
+    @Override
+    public
+    ITemplateProvider
+    getTemplateProvider() {
+        return templateProvider;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.tizen.common.verrari.ITemplateEngine#setTemplateProvider(org.tizen.common.verrari.ITemplateProvider)
+     */
+    @Override
+    public
+    void
+    setTemplateProvider(
+        final ITemplateProvider provider
+    )
+    {
+        this.templateProvider = provider;
+    }
+
+    /**
+     * Return {@link ITemplate} for <code>key</code>
+     * 
+     * @param key string to indicate template
+     * 
+     * @return {@link ITemplate} to be indicated by <code>key</code>
+     */
+    protected
+    ITemplate
+    getTemplate(
+        final String key
+    )
+    {
+        return templateProvider.getTemplate( key );
+    }
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/TemplateEngineFactory.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/TemplateEngineFactory.java
new file mode 100755 (executable)
index 0000000..38b8735
--- /dev/null
@@ -0,0 +1,128 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.verrari.engine;
+
+import org.apache.commons.lang3.ClassUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.Factory;
+import org.tizen.common.FactoryWithArgument;
+import org.tizen.common.util.io.BufferPool;
+import org.tizen.common.verrari.ITemplateEngine;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateEngine;
+
+/**
+ * TemplateEngineFactory.
+ *
+ * Create to template engine.
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public class
+TemplateEngineFactory
+implements Factory<ITemplateEngine> ,FactoryWithArgument<ITemplateEngine, Class<?>>
+{
+
+    /**
+     * Singline instance
+     */
+    protected static TemplateEngineFactory instance = new TemplateEngineFactory();
+    
+    /**
+     * Logger for this instance
+     */
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );
+    
+    /**
+     * Buffer pool for template. Support high performance in/out
+     */
+    protected final BufferPool bufferPool = new BufferPool();
+
+    /**
+     * get template engine factory instance.
+     *
+     * @return TemplateEngineFactory
+     */
+    public static
+    TemplateEngineFactory
+    getInstance() {
+        return instance;
+    }
+    
+    /**
+     * Default constructor for child class
+     */
+    protected TemplateEngineFactory() { }
+
+    /**
+     * Create Default template engine
+     *
+     * @return ITemplateEngine {@link ITemplateEngine}
+     */
+    @Override
+    public ITemplateEngine create() {
+        return new FreemarkerTemplateEngine();
+    }
+
+    /**
+     * Create template engine
+     *
+     * @param engineClass TemplateEngineClass
+     * @return ITemplateEngine {@link ITemplateEngine}
+     */
+    @Override
+    public
+    ITemplateEngine
+    create(
+        final Class<?> engineClass
+    )
+    {
+        if ( null == engineClass )
+        {
+            return null;
+        }
+        if ( ClassUtils.isAssignable( engineClass, ITemplateEngine.class ) ) 
+        {
+            try
+            {
+                return (ITemplateEngine) engineClass.newInstance();
+            }
+            catch ( final InstantiationException e )
+            {
+                logger.warn( "Engine class can't be instantiated:", e );
+            }
+            catch ( final IllegalAccessException e )
+            {
+                logger.warn( "Engine class can't be accessible:", e );
+            }
+        }
+        return null;
+    }
+
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerModelManager.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerModelManager.java
new file mode 100755 (executable)
index 0000000..a721d75
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.engine.freemarker;
+
+import java.util.HashMap;
+
+import org.tizen.common.verrari.IModelManager;
+import org.tizen.common.verrari.IModelProvider;
+import org.tizen.common.verrari.engine.freemarker.method.FreemarkerTemplateEngineMethod;
+
+/**
+ * FreemarkerModelManager.
+ *
+ * Manage the freemarker models.
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public class
+FreemarkerModelManager
+extends FreemarkerModelProvider
+implements IModelManager
+{
+    protected HashMap<String, Object> cache = new HashMap<String, Object>();
+
+    public FreemarkerModelManager(final IModelProvider modelProvider) {
+        super( modelProvider );
+        new FreemarkerTemplateEngineMethod().reigister( this );
+    }
+
+    @Override
+    public void addModel(String key, Object model)
+    {
+        cache.put( key, model );
+        
+    }
+
+    @Override
+    public void removeModel(String key)
+    {
+        cache.remove( key );
+    }
+
+    @Override
+    public Object getModel(String key)
+    {
+        logger.debug( "Key :{}", key );
+        Object ret = cache.get( key );
+        if ( null != ret )
+        {
+            return ret;
+        }
+        logger.info( "Delegate to {}", modelProvider );
+        return this.modelProvider.getModel( key );
+    }
+
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerModelProvider.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerModelProvider.java
new file mode 100755 (executable)
index 0000000..0db4431
--- /dev/null
@@ -0,0 +1,75 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.engine.freemarker;\r
+\r
+import org.tizen.common.verrari.IModelProvider;\r
+import org.tizen.common.verrari.model.ModelProviderDelegate;\r
+\r
+/**\r
+ * FreemarkerModelProvider.\r
+ *\r
+ * adapter between {@link IModelProvider} and Bean for freemarker.\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see ModelProviderDelegate\r
+ */\r
+public class\r
+FreemarkerModelProvider\r
+extends ModelProviderDelegate\r
+{\r
+    /**\r
+     * Constructor with delegate\r
+     * \r
+     * @param modelProvider {@link IModelProvider}\r
+     */\r
+    public\r
+    FreemarkerModelProvider(\r
+        final IModelProvider modelProvider\r
+    )\r
+    {\r
+        super( modelProvider );\r
+    }\r
+\r
+    /**\r
+     * getter for freemarker engine\r
+     * \r
+     * @param key key for model\r
+     * \r
+     * @return model to be indicate by <code>key</code>\r
+     */\r
+    public\r
+    Object\r
+    get(\r
+        final String key\r
+    )\r
+    {\r
+        return getModel( key );\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateEngine.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateEngine.java
new file mode 100755 (executable)
index 0000000..65b5374
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.verrari.engine.freemarker;
+
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+
+import org.tizen.common.util.Assert;
+import org.tizen.common.util.FreeMarkerUtil;
+import org.tizen.common.verrari.IModelProvider;
+import org.tizen.common.verrari.ITemplateProvider;
+import org.tizen.common.verrari.engine.AbstractTemplateEngine;
+
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+
+
+/**
+ * FreemarkerTemplateEngine.
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public class FreemarkerTemplateEngine extends AbstractTemplateEngine {
+
+    /**
+     * Freemarker configuration
+     */
+    protected final Configuration cfg = FreeMarkerUtil.getDefaultConfiguration();
+    
+    public FreemarkerTemplateEngine() {
+        super();
+        cfg.setTemplateLoader( new FreemarkerTemplateProvider( getTemplateProvider() ) );
+    }
+
+    /* (non-Javadoc)
+     * @see org.tizen.common.verrari.engine.AbstractTemplateEngine#setTemplateProvider(org.tizen.common.verrari.ITemplateProvider)
+     */
+    @Override
+    public void setTemplateProvider(
+        final ITemplateProvider provider
+    )
+    {
+        super.setTemplateProvider( provider );
+        if ( null != cfg )
+        {
+            cfg.setTemplateLoader( new FreemarkerTemplateProvider( provider ) );
+        }
+    }
+
+    /**
+     * return {@link Configuration} for freemarker engine
+     * 
+     * @return {@link Configuration}
+     */
+    public
+    Configuration
+    getConfiguration()
+    {
+        return cfg;
+    }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.verrari.ITemplateEngine#getEngineVersion()
+        */
+       @Override
+    public
+    String
+    getEngineVersion()
+       {
+        return Configuration.getVersionNumber();
+    }
+
+    /* (non-Javadoc)
+     * @see org.tizen.common.verrari.ITemplateEngine#generate(java.lang.String, org.tizen.common.verrari.IModelProvider, java.io.OutputStream)
+     */
+    @Override
+    public
+    void
+    generate(
+        final String templateKey,
+        final IModelProvider modelProvider,
+        final OutputStream output
+    )
+    throws Exception
+    {
+        final Template freemarkerTemplate = cfg.getTemplate( templateKey );
+        Assert.notNull( freemarkerTemplate, "Template is null for " + templateKey );
+        
+        final IModelProvider adapter = new FreemarkerModelManager( modelProvider );
+        freemarkerTemplate.process( adapter, new OutputStreamWriter( output ) );
+    }
+
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateProvider.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateProvider.java
new file mode 100755 (executable)
index 0000000..203715f
--- /dev/null
@@ -0,0 +1,180 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.engine.freemarker;\r
+\r
+import static org.tizen.common.util.IOUtil.getString;\r
+import static org.tizen.common.util.IOUtil.tryClose;\r
+import static org.tizen.common.util.StringUtil.nvl;\r
+\r
+import java.io.IOException;\r
+import java.io.InputStreamReader;\r
+import java.io.Reader;\r
+import java.io.StringReader;\r
+import java.util.HashMap;\r
+\r
+import org.tizen.common.verrari.ITemplate;\r
+import org.tizen.common.verrari.ITemplateProvider;\r
+import org.tizen.common.verrari.template.TemplateProviderDelegate;\r
+import org.tizen.common.verrari.template.TemplateTransformer;\r
+import org.tizen.common.verrari.template.TransformableTemplate;\r
+\r
+import freemarker.cache.TemplateLoader;\r
+\r
+/**\r
+ * FreemarkerTemplateProvider.\r
+ * \r
+ * adapter between {@link ITemplateProvider} and {@link TemplateLoader}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class\r
+FreemarkerTemplateProvider\r
+extends TemplateProviderDelegate\r
+implements TemplateLoader\r
+{\r
+    /**\r
+     * Not closed reader\r
+     */\r
+    protected HashMap<Object, Reader> key2reader = new HashMap<Object, Reader>();\r
+\r
+    protected TemplateTransformer transformer;\r
+    /**\r
+     * Constructor with {@link ITemplateProvider}\r
+     * \r
+     * @param provider real {@link ITemplateProvider}\r
+     */\r
+    public\r
+    FreemarkerTemplateProvider(\r
+        final ITemplateProvider provider\r
+    )\r
+    {\r
+        super( provider );\r
+\r
+        this.transformer = new FreemarkerTemplateTransformer();\r
+    }\r
+    \r
+    @Override\r
+    public void setTransformer(TemplateTransformer transformer)\r
+    {\r
+        this.transformer = transformer;\r
+    }\r
+    \r
+    @Override\r
+    public ITemplate getTemplate(String key)\r
+    {\r
+        final ITemplate raw = super.getTemplate( key );\r
+        if ( null == raw )\r
+        {\r
+            return raw;\r
+        }\r
+        return new TransformableTemplate( this.transformer, raw );\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see freemarker.cache.TemplateLoader#findTemplateSource(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    Object\r
+    findTemplateSource(\r
+        final String key\r
+    )\r
+    throws IOException\r
+    {\r
+        logger.info( "Find template source for {}", key );\r
+        final ITemplate template = getTemplate( key );\r
+        return template;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see freemarker.cache.TemplateLoader#getLastModified(java.lang.Object)\r
+     */\r
+    @Override\r
+    public\r
+    long\r
+    getLastModified(\r
+        final Object key\r
+    )\r
+    {\r
+        // Not support in case of dynamic change\r
+        return 0;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see freemarker.cache.TemplateLoader#getReader(java.lang.Object, java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    Reader\r
+    getReader(\r
+        final Object templateObj,\r
+        final String encoding\r
+    )\r
+    throws IOException\r
+    {\r
+        logger.info( "Open template source for {}", templateObj );\r
+        \r
+        final ITemplate template = (ITemplate) templateObj;\r
+        \r
+        Reader ret = new InputStreamReader( template.open(), nvl( template.getEncoding(), encoding ) );\r
+        try\r
+        {\r
+            if ( logger.isTraceEnabled() )\r
+            {\r
+                final String contents = getString( ret );\r
+                logger.trace( "{} Template :{}", templateObj, contents );\r
+                tryClose( ret );\r
+                return new StringReader( contents );\r
+\r
+            }\r
+            return ret;\r
+        }\r
+        finally\r
+        {\r
+            tryClose( key2reader.put( templateObj, ret ) );\r
+        }\r
+        \r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see freemarker.cache.TemplateLoader#closeTemplateSource(java.lang.Object)\r
+     */\r
+    @Override\r
+    public\r
+    void\r
+    closeTemplateSource(\r
+        final Object templateObj\r
+    )\r
+    throws IOException\r
+    {\r
+        logger.info( "Close template source for {}", templateObj );\r
+        tryClose( key2reader.remove( templateObj ) );\r
+    }\r
+    \r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateTransformer.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateTransformer.java
new file mode 100644 (file)
index 0000000..efe7a19
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.engine.freemarker;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.tizen.common.verrari.template.TemplateTransformer;
+
+/**
+ * FreemarkerTemplateTransformer
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public class FreemarkerTemplateTransformer extends TemplateTransformer {
+
+    @Override
+    public String translateTransform(String contents) {
+        // $${HtmlTitle|'Title'}  -->   ${HtmlTitle!'Title'}
+        Pattern pattern = Pattern.compile(REGEX_TRANSFORM);
+        Matcher matcher = pattern.matcher(contents);
+        String translatedContents = contents;
+        while (matcher.find()) {
+            translatedContents = translatedContents.replace(matcher.group(), matcher.group().replace("$$", "$").replace('|', '!')); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+        }
+        return translatedContents;
+    }
+
+    @Override
+    public String translateFunction(String contents) {
+        // $@{ApplicationID()}  ---> ${ApplicationID()}
+        Pattern pattern = Pattern.compile(REGEX_FUNCTION);
+        Matcher matcher = pattern.matcher(contents);
+        String translatedContents = contents;
+        while (matcher.find()) {
+            translatedContents = translatedContents.replace(matcher.group(), matcher.group().replace("$@", "$")); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+        return translatedContents;
+    }
+
+    @Override
+    public String translateInclude(String contents) {
+        // $$include{"HTMLDescription"} --> <#include "HTMLDescription">
+        Pattern pattern = Pattern.compile(REGEX_INCLUDE);
+        Matcher matcher = pattern.matcher(contents);
+        String translatedContents = contents;
+        while (matcher.find()) {
+            translatedContents = translatedContents.replace(matcher.group(), matcher.group().replace("$$", "<#").replace("{", " ").replace('}', '>')); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+        }
+        return translatedContents;
+    }
+
+    @Override
+    public String translateIf(String contents) {
+        // $$if{HTMLDescription}     --> <#if HTMLDescription?exists>
+        // $$elseif{HTMLDescription} --> <#elseif HTMLDescription?exists>
+        // $$else                    --> <#else>
+        // $$endif                   --> </#if>
+        Pattern pattern = Pattern.compile(REGEX_IF);
+        Matcher matcher = pattern.matcher(contents);
+        String translatedContents = contents;
+        while (matcher.find()) {
+            translatedContents = translatedContents.replace(matcher.group(), matcher.group().replace("$$", "<#").replace("{", " ").replace("}", "").trim().concat("?exists>")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+        }
+
+        pattern = Pattern.compile(REGEX_ELSEIF);
+        matcher = pattern.matcher(translatedContents);
+        while (matcher.find()) {
+            translatedContents = translatedContents.replace(matcher.group(), matcher.group().replace("$$", "<#").replace("{", " ").replace("}", "").trim().concat("?exists>")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
+        }
+
+        pattern = Pattern.compile(REGEX_ELSE);
+        matcher = pattern.matcher(translatedContents);
+        while (matcher.find()) {
+            translatedContents = translatedContents.replace(matcher.group(), matcher.group().replace("$$else", "<#else>")); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+
+        pattern = Pattern.compile(REGEX_ENDIF);
+        matcher = pattern.matcher(translatedContents);
+        while (matcher.find()) {
+            translatedContents = translatedContents.replace(matcher.group(), matcher.group().replace("$$endif", "</#if>")); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+        return translatedContents;
+    }
+
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/method/FreemarkerTemplateEngineMethod.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/freemarker/method/FreemarkerTemplateEngineMethod.java
new file mode 100644 (file)
index 0000000..0f0d801
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.engine.freemarker.method;
+
+import java.util.List;
+
+import org.tizen.common.verrari.engine.method.AbstractTemplateEngineMethod;
+
+import freemarker.template.TemplateMethodModel;
+import freemarker.template.TemplateModelException;
+
+/**
+ * FreemarkerTemplateEngineMethod.
+ *
+ * Freemarker Template Engine Built-in Reference.
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public class FreemarkerTemplateEngineMethod extends AbstractTemplateEngineMethod {
+
+    public class Year implements TemplateMethodModel {
+        @SuppressWarnings("rawtypes")
+        @Override
+        public String exec(List arg0) throws TemplateModelException {
+            return AbstractTemplateEngineMethod.getYear();
+        }
+    }
+
+    public class Date implements TemplateMethodModel {
+        @SuppressWarnings("rawtypes")
+        @Override
+        public String exec(List arg0) throws TemplateModelException {
+            return AbstractTemplateEngineMethod.getDate();
+        }
+    }
+
+    public class Time implements TemplateMethodModel {
+        @SuppressWarnings("rawtypes")
+        @Override
+        public String exec(List arg0) throws TemplateModelException {
+            return AbstractTemplateEngineMethod.getTime();
+        }
+    }
+
+    public class User implements TemplateMethodModel {
+        @SuppressWarnings("rawtypes")
+        @Override
+        public String exec(List arg0) throws TemplateModelException {
+            return AbstractTemplateEngineMethod.getUser();
+        }
+    }
+
+    public class ApplicationID implements TemplateMethodModel {
+        @SuppressWarnings("rawtypes")
+        @Override
+        public String exec(List arg0) throws TemplateModelException {
+            return AbstractTemplateEngineMethod.getApplicationID();
+        }
+    }
+
+    @Override
+    public Object getYearWrapper() {
+        return this.new Year();
+    }
+
+    @Override
+    public Object getDateWrapper() {
+        return this.new Date();
+    }
+
+    @Override
+    public Object getTimeWrapper() {
+        return this.new Time();
+    }
+
+    @Override
+    public Object getUserWrapper() {
+        return this.new User();
+    }
+
+    @Override
+    public Object getApplicationIDWrapper() {
+        return this.new ApplicationID();
+    }
+
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/jsoup/JsoupTemplateEngine.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/jsoup/JsoupTemplateEngine.java
new file mode 100755 (executable)
index 0000000..059c9d1
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.verrari.engine.jsoup;
+
+import java.io.OutputStream;
+
+import org.jsoup.Jsoup;
+import org.jsoup.nodes.Attribute;
+import org.jsoup.nodes.Attributes;
+import org.jsoup.nodes.Document;
+import org.jsoup.nodes.Element;
+import org.jsoup.select.Elements;
+import org.tizen.common.util.Assert;
+import org.tizen.common.verrari.IModelProvider;
+import org.tizen.common.verrari.ITemplate;
+import org.tizen.common.verrari.engine.AbstractTemplateEngine;
+
+/**
+ * JsoupTemplateEngine.
+ * 
+ * HTML Parser.
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public class
+JsoupTemplateEngine
+extends AbstractTemplateEngine
+{
+    /**
+     * dummy base uri for HTML dom
+     */
+    protected static final String BASE_URI = "http://www.tizen.org/sdk/ide/verrari";
+    public static String DEFAULT_ENCODING = "UTF-8";
+
+    /* (non-Javadoc)
+     * @see org.tizen.common.verrari.ITemplateEngine#getEngineVersion()
+     */
+    @Override
+    public
+    String
+    getEngineVersion()
+    {
+        // FIXME::
+        // Platform.getBundle("org.jsoup").getHeaders().get("Bundle-Version");
+        return "1.6.3";
+    }
+
+    /* (non-Javadoc)
+     * @see org.tizen.common.verrari.ITemplateEngine#generate(java.lang.String, org.tizen.common.verrari.IModelProvider, java.io.OutputStream)
+     */
+    @Override
+    public void generate(
+        String templateKey,
+        IModelProvider modelProvider,
+        OutputStream output
+    ) throws Exception
+    {
+        logger.trace( "Template Key :{}, Models :{}", templateKey, modelProvider );
+        final ITemplate template = getTemplate( templateKey );
+        logger.debug( "Template :{}", template );
+        
+        Assert.notNull( template, "Template is null for " + templateKey );
+
+        String encoding = template.getEncoding();
+        if (encoding == null) {
+            encoding = DEFAULT_ENCODING;
+        }
+        final Document doc = Jsoup.parse( template.open(), encoding, BASE_URI );
+
+        for ( String key : modelProvider.keys() ) {
+            Elements elements = doc.select( key );
+            if (!elements.isEmpty()) {
+                Element element = elements.get(0);
+                
+                Object attr = modelProvider.getModel( key );
+                if (attr instanceof Attribute) {
+                    element.attr(((Attribute) attr).getKey(), ((Attribute) attr).getValue());
+                } else if (attr instanceof Attributes){
+                    Attributes attributes = (Attributes) attr;
+                    for (Attribute attribute : attributes) {
+                        element.attr(attribute.getKey(), attribute.getValue());
+                    }
+                } else {
+                    element.attr( key, (String)attr);
+                }
+            }
+        }
+
+        output.write( doc.html().getBytes(encoding) );
+        output.flush();
+    }
+
+}
\ No newline at end of file
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/method/AbstractTemplateEngineMethod.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/engine/method/AbstractTemplateEngineMethod.java
new file mode 100755 (executable)
index 0000000..a869fea
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.engine.method;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.tizen.common.AppIdGenerator;
+import org.tizen.common.verrari.IModelManager;
+
+/**
+ * AbstractTemplateEngineMethod.
+ *
+ * Template Engine Built-in Reference.
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public abstract class AbstractTemplateEngineMethod {
+
+    public AbstractTemplateEngineMethod() {
+    }
+
+    public void reigister(IModelManager manager) {
+        manager.addModel("YEAR", getYearWrapper());
+        manager.addModel("DATE", getDateWrapper());
+        manager.addModel("TIME", getTimeWrapper());
+        manager.addModel("USER", getUserWrapper());
+        manager.addModel("APPLICATIONID", getApplicationIDWrapper());
+    }
+
+    /* Implementation by Template Engine */
+    abstract public Object getYearWrapper();
+    abstract public Object getDateWrapper();
+    abstract public Object getTimeWrapper();
+    abstract public Object getUserWrapper();
+    abstract public Object getApplicationIDWrapper();
+
+    /* Default Implementation */
+    public static String getYear() {
+      SimpleDateFormat yearFormat = new SimpleDateFormat("yyyy");
+      return yearFormat.format(new Date());
+    }
+
+    public static String getDate() {
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd");
+        return dateFormat.format(new Date());
+    }
+
+    public static String getTime() {
+        SimpleDateFormat timeFormat = new SimpleDateFormat("k:mm:ss");
+        return timeFormat.format(new Date());
+    }
+
+    public static String getUser() {
+        return System.getProperty("user.name");
+    }
+
+    public static String getApplicationID() {
+        return AppIdGenerator.getInstance().create();
+    }
+
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/model/ModelManager.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/model/ModelManager.java
new file mode 100755 (executable)
index 0000000..b193a9d
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.verrari.model;
+
+import java.util.Map;
+
+import org.tizen.common.verrari.IModelManager;
+
+
+/**
+ * ModelManager.
+ *
+ * Manage the models.
+ *
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+ModelManager
+extends ModelProvider
+implements IModelManager
+{
+    /**
+     * Default constructor
+     */
+    public
+    ModelManager()
+    {
+        super();
+    }
+    
+    /**
+     * Constructor with {@link Map} containing model infos
+     * 
+     * @param models {@link Map}
+     */
+    public
+    ModelManager(
+        final Map<String, Object> models
+    )
+    {
+        super( models );
+    }
+
+    
+    /* (non-Javadoc)
+     * @see org.tizen.common.verrari.IModelManager#addModel(java.lang.String, java.lang.Object)
+     */
+    @Override
+    public void addModel( final String key, final Object model )
+    {
+        this.models.put( key, model );
+        
+    }
+
+    /* (non-Javadoc)
+     * @see org.tizen.common.verrari.IModelManager#removeModel(java.lang.String)
+     */
+    @Override
+    public void removeModel( final String key )
+    {
+        this.models.remove( key );
+        
+    }
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/model/ModelManagerDelegate.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/model/ModelManagerDelegate.java
new file mode 100755 (executable)
index 0000000..3652aa7
--- /dev/null
@@ -0,0 +1,129 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.model;\r
+\r
+import java.util.Collection;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+\r
+public class ModelManagerDelegate\r
+extends ModelManager\r
+{\r
+    /**\r
+     * logger for this object\r
+     */\r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+\r
+    protected final ModelManager modelManager;\r
+    \r
+    public ModelManagerDelegate( final ModelManager modelManager )\r
+    {\r
+        this.modelManager = modelManager;\r
+    }\r
+\r
+    /**\r
+     * @param key\r
+     * @param model\r
+     * @see org.tizen.common.verrari.model.ModelManager#addModel(java.lang.String, java.lang.Object)\r
+     */\r
+    public void addModel(String key, Object model)\r
+    {\r
+        modelManager.addModel(key, model);\r
+    }\r
+\r
+    /**\r
+     * @return\r
+     * @see java.lang.Object#hashCode()\r
+     */\r
+    public int hashCode()\r
+    {\r
+        return modelManager.hashCode();\r
+    }\r
+\r
+    /**\r
+     * @param key\r
+     * @see org.tizen.common.verrari.model.ModelManager#removeModel(java.lang.String)\r
+     */\r
+    public void removeModel(String key)\r
+    {\r
+        modelManager.removeModel(key);\r
+    }\r
+\r
+    /**\r
+     * @param key\r
+     * @return\r
+     * @see org.tizen.common.verrari.model.ModelProvider#getModel(java.lang.String)\r
+     */\r
+    public Object getModel(String key)\r
+    {\r
+        return modelManager.getModel(key);\r
+    }\r
+\r
+    /**\r
+     * @return\r
+     * @see org.tizen.common.verrari.model.ModelProvider#isEmpty()\r
+     */\r
+    public boolean isEmpty()\r
+    {\r
+        return modelManager.isEmpty();\r
+    }\r
+\r
+    /**\r
+     * @return\r
+     * @see org.tizen.common.verrari.model.ModelProvider#keys()\r
+     */\r
+    public Collection<String> keys()\r
+    {\r
+        return modelManager.keys();\r
+    }\r
+\r
+    /**\r
+     * @param obj\r
+     * @return\r
+     * @see java.lang.Object#equals(java.lang.Object)\r
+     */\r
+    public boolean equals(Object obj)\r
+    {\r
+        return modelManager.equals(obj);\r
+    }\r
+\r
+    /**\r
+     * @return\r
+     * @see java.lang.Object#toString()\r
+     */\r
+    public String toString()\r
+    {\r
+        return modelManager.toString();\r
+    }\r
+    \r
+    \r
+    \r
+    \r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/model/ModelProvider.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/model/ModelProvider.java
new file mode 100755 (executable)
index 0000000..225b176
--- /dev/null
@@ -0,0 +1,132 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.model;\r
+\r
+import java.util.Collection;\r
+import java.util.Collections;\r
+import java.util.HashMap;\r
+import java.util.Map;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.tizen.common.config.Preference;\r
+import org.tizen.common.verrari.IModelProvider;\r
+import org.tizen.common.verrari.TemplateContext;\r
+\r
+/**\r
+ * ModelProvider.\r
+ *\r
+ * Simple implementation for {@link IModelProvider}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class\r
+ModelProvider\r
+implements IModelProvider\r
+{\r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+    /**\r
+     * model container\r
+     */\r
+    protected Map<String, Object> models = new HashMap<String, Object>();\r
+    \r
+    /**\r
+     * Default constructor\r
+     */\r
+    public\r
+    ModelProvider()\r
+    {\r
+        this( new HashMap<String, Object>() );\r
+    }\r
+    \r
+    /**\r
+     * Constructor with {@link Map} containing model infos\r
+     * \r
+     * @param models {@link Map}\r
+     */\r
+    public\r
+    ModelProvider(\r
+        final Map<String, Object> models\r
+    )\r
+    {\r
+        this.models = models;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.IModelProvider#getModel(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    Object\r
+    getModel(\r
+        final String key\r
+    )\r
+    {\r
+        if ( models.containsKey( key ) )\r
+        {\r
+            return models.get( key );\r
+        }\r
+        logger.debug( "Model doesn't exist for {} :{}", key, models );\r
+        \r
+        if ( this != TemplateContext.getInstance().getModelProvider() ) \r
+        {\r
+            Object obj = TemplateContext.get( key );\r
+            \r
+            if ( null != obj )\r
+            {\r
+                return obj;\r
+            }\r
+        }\r
+        \r
+        \r
+        return Preference.getValue( key, null );\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.IModelProvider#isEmpty()\r
+     */\r
+    @Override\r
+    public\r
+    boolean\r
+    isEmpty()\r
+    {\r
+        return models.isEmpty();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.IModelProvider#keys()\r
+     */\r
+    @Override\r
+    public\r
+    Collection<String>\r
+    keys()\r
+    {\r
+        return Collections.unmodifiableCollection( models.keySet() );\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/model/ModelProviderDelegate.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/model/ModelProviderDelegate.java
new file mode 100755 (executable)
index 0000000..ecdc4aa
--- /dev/null
@@ -0,0 +1,101 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.model;\r
+\r
+import java.util.Collection;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.tizen.common.verrari.IModelProvider;\r
+\r
+/**\r
+ * ModelProviderDelegate.\r
+ *\r
+ * Delegate object of {@link IModelProvider}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class\r
+ModelProviderDelegate\r
+implements IModelProvider\r
+{\r
+    \r
+    /**\r
+     * logger for this object\r
+     */\r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+    \r
+    /**\r
+     * real {@link IModelProvider}\r
+     */\r
+    protected IModelProvider modelProvider;\r
+    \r
+    /**\r
+     * Construcotor with real object\r
+     * \r
+     * @param modelProvider real {@link IModelProvider}\r
+     */\r
+    protected\r
+    ModelProviderDelegate(\r
+        final IModelProvider modelProvider\r
+    )\r
+    {\r
+        this.modelProvider = modelProvider;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.IModelProvider#isEmpty()\r
+     */\r
+    @Override\r
+    public boolean isEmpty()\r
+    {\r
+        return this.modelProvider.isEmpty();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.IModelProvider#keys()\r
+     */\r
+    @Override\r
+    public Collection<String> keys()\r
+    {\r
+        logger.trace( "Keys" );\r
+        return this.modelProvider.keys();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.IModelProvider#getModel(java.lang.String)\r
+     */\r
+    @Override\r
+    public Object getModel(String key)\r
+    {\r
+        logger.trace( "Key :{}", key );\r
+        return this.modelProvider.getModel( key );\r
+    }\r
+\r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/model/jsoup/JsoupModel.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/model/jsoup/JsoupModel.java
new file mode 100644 (file)
index 0000000..b2a47fb
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.model.jsoup;
+
+import org.jsoup.nodes.Attribute;
+import org.tizen.common.verrari.model.ModelManager;
+
+public class JsoupModel extends ModelManager {
+
+    protected void setOption(String selector, String attribute, String attributeValue) {
+        setOption(selector, new Attribute(attribute, attributeValue));
+    }
+
+    protected void setOption(String selector, Attribute attribute) {
+        addModel(selector, attribute);
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/template/AbstractTemplate.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/template/AbstractTemplate.java
new file mode 100755 (executable)
index 0000000..e801c4f
--- /dev/null
@@ -0,0 +1,88 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.tizen.common.config.Preference;\r
+import org.tizen.common.verrari.ITemplate;\r
+\r
+\r
+/**\r
+ * AbstractTemplate.\r
+ *\r
+ * Common template for {@link ITemplate}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+abstract public class\r
+AbstractTemplate\r
+implements ITemplate\r
+{\r
+    \r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+    /**\r
+     * encoding for this template\r
+     */\r
+    protected String encoding;\r
+    \r
+    /**\r
+     * Default constructor\r
+     */\r
+    public\r
+    AbstractTemplate()\r
+    {\r
+        this( Preference.getValue( "file.encoding", "UTF-8" ) ); //$NON-NLS-1$ //$NON-NLS-2$\r
+    }\r
+    \r
+    /**\r
+     * Constructor with encoding\r
+     * \r
+     * @param encoding encoding for this template\r
+     */\r
+    public\r
+    AbstractTemplate(\r
+        final String encoding\r
+    )\r
+    {\r
+        this.encoding = encoding;\r
+    }\r
+    \r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplate#getEncoding()\r
+     */\r
+    @Override\r
+    public\r
+    String\r
+    getEncoding()\r
+    {\r
+        return encoding;\r
+    }\r
+\r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/template/ClasspathResourceTemplate.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/template/ClasspathResourceTemplate.java
new file mode 100755 (executable)
index 0000000..8ab5ac4
--- /dev/null
@@ -0,0 +1,105 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+\r
+import org.tizen.common.util.Assert;\r
+import org.tizen.common.verrari.ITemplate;\r
+\r
+/**\r
+ * ClasspathResourceTemplate.\r
+ *\r
+ * {@link ITemplate} to load from classpath resource\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class\r
+ClasspathResourceTemplate\r
+extends AbstractTemplate\r
+implements ITemplate\r
+{\r
+    /**\r
+     * relative path from classpath root\r
+     */\r
+    protected final String path;\r
+    \r
+    /**\r
+     * {@link ClassLoader} to search in\r
+     */\r
+    protected final ClassLoader loader;\r
+    \r
+    /**\r
+     * Constructor with resource path and class\r
+     * \r
+     * @param path resource path relative to classpath root\r
+     * @param clazz class to search in\r
+     * \r
+     * @see #ClasspathResourceTemplate(String, ClassLoader)\r
+     */\r
+    public\r
+    ClasspathResourceTemplate(\r
+        final String path,\r
+        final Class<?> clazz\r
+    )\r
+    {\r
+        this( path, clazz.getClassLoader() );\r
+    }\r
+    \r
+    /**\r
+     * Constructor with resource path and classloader\r
+     * \r
+     * @param path resource path relative to classpath root\r
+     * @param loader classloader to search in\r
+     */\r
+    public\r
+    ClasspathResourceTemplate(\r
+        final String path,\r
+        final ClassLoader loader\r
+    )\r
+    {\r
+        Assert.notNull( path );\r
+        Assert.notNull( loader );\r
+        this.path = path;\r
+        this.loader = loader;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplate#open()\r
+     */\r
+    @Override\r
+    public\r
+    InputStream\r
+    open()\r
+    throws IOException\r
+    {\r
+        return loader.getResourceAsStream( path );\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/template/FileTemplate.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/template/FileTemplate.java
new file mode 100755 (executable)
index 0000000..13ad78b
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.verrari.template;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.tizen.common.verrari.ITemplate;
+
+/**
+ * FileTemplate.
+ *
+ * ITemplate implementation by file.
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public class FileTemplate
+extends AbstractTemplate
+implements ITemplate {
+
+    /**
+     * File to load template from
+     */
+    protected File file;
+
+    public
+    FileTemplate(
+        final File file
+    )
+    {
+        this.file = file;
+    }
+
+    /* (non-Javadoc)
+     * @see org.tizen.common.verrari.ITemplate#open()
+     */
+    @Override
+    public
+    InputStream
+    open()
+    throws IOException
+    {
+        return new FileInputStream(file);
+    }
+
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/template/FileTemplateProvider.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/template/FileTemplateProvider.java
new file mode 100755 (executable)
index 0000000..7170620
--- /dev/null
@@ -0,0 +1,134 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+import static org.tizen.common.util.ArrayUtil.size;\r
+\r
+import java.io.File;\r
+import java.util.Collection;\r
+\r
+import org.tizen.common.verrari.ITemplate;\r
+import org.tizen.common.verrari.ITemplateProvider;\r
+\r
+/**\r
+ * FileTemplateProvider.\r
+ *\r
+ * {@link ITemplateProvider} to provide file template using root {@link File}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class\r
+FileTemplateProvider\r
+implements ITemplateProvider\r
+{\r
+    protected TemplateTransformer transformer;\r
+    \r
+    /**\r
+     * root {@link File}\r
+     */\r
+    protected File root;\r
+    \r
+    /**\r
+     * Default constructor\r
+     */\r
+    public\r
+    FileTemplateProvider()\r
+    {\r
+        this( new File( "." ) );\r
+    }\r
+    \r
+    /**\r
+     * Constructor with root {@link File}\r
+     * \r
+     * @param root root {@link File}\r
+     */\r
+    public\r
+    FileTemplateProvider(\r
+        final File root\r
+    )\r
+    {\r
+        this.root = root;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplateProvider#isEmpty()\r
+     */\r
+    @Override\r
+    public boolean isEmpty()\r
+    {\r
+        return 0 == size( root.list() );\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplateProvider#keys()\r
+     */\r
+    @Override\r
+    public\r
+    Collection<String>\r
+    keys()\r
+    {\r
+        // File tree iteration costs too heavy load\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplateProvider#getTemplate(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    ITemplate\r
+    getTemplate(\r
+        final String key\r
+    )\r
+    {\r
+        final File file = new File( key );\r
+        FileTemplate template = null;\r
+        if ( file.isAbsolute() ) \r
+        {\r
+             template = new FileTemplate( file );\r
+        }\r
+        else\r
+        {\r
+            template = new FileTemplate( new File( root, key ) );\r
+        }\r
+        \r
+        return new TransformableTemplate( this.transformer, template );\r
+    }\r
+\r
+    @Override\r
+    public\r
+    void\r
+    setTransformer(\r
+        final TemplateTransformer transformer\r
+    )\r
+    {\r
+        this.transformer = transformer;\r
+        \r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/template/InMemoryTemplate.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/template/InMemoryTemplate.java
new file mode 100755 (executable)
index 0000000..f3c3939
--- /dev/null
@@ -0,0 +1,92 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+import java.io.Closeable;\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+\r
+import org.tizen.common.FactoryWithArgument;\r
+import org.tizen.common.util.io.Buffer;\r
+import org.tizen.common.util.io.BufferInputStream;\r
+import org.tizen.common.verrari.ITemplate;\r
+\r
+/**\r
+ * InMemoryTemplate.\r
+ *\r
+ * {@link ITemplate} to load from memory\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class\r
+InMemoryTemplate\r
+extends AbstractTemplate\r
+implements ITemplate, Closeable\r
+{\r
+    /**\r
+     * contents buffer\r
+     */\r
+    protected Buffer buffer;\r
+    \r
+    /**\r
+     * Constructor with contents, encoding and buffer factory\r
+     * \r
+     * @param contents byte[] to store\r
+     * @param encoding encoding of <code>contents</code>\r
+     * @param bufferFactory buffer factory\r
+     */\r
+    public\r
+    InMemoryTemplate(\r
+        final byte[] contents,\r
+        final String encoding,\r
+        FactoryWithArgument<Buffer, byte[]> bufferFactory\r
+    )\r
+    {\r
+        super( encoding );\r
+        buffer = bufferFactory.create( contents );\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplate#open()\r
+     */\r
+    @Override\r
+    public\r
+    InputStream\r
+    open()\r
+    throws IOException\r
+    {\r
+        return new BufferInputStream( buffer );\r
+    }\r
+    \r
+    @Override\r
+    public void close() throws IOException\r
+    {\r
+        buffer.close();\r
+    }\r
+    \r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/template/TemplateManager.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/template/TemplateManager.java
new file mode 100755 (executable)
index 0000000..8bf890a
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.verrari.template;
+
+import org.tizen.common.verrari.ITemplate;
+import org.tizen.common.verrari.ITemplateManager;
+
+
+/**
+ * StaticTemplateProvider.
+ *
+ * Manage the templates.
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public class TemplateManager
+extends TemplateProvider
+implements ITemplateManager
+{
+    
+    @Override
+    public void addTemplate( final String key, final ITemplate template )
+    {
+        if ( this.templates.containsKey( key ) )
+        {
+            throw new IllegalArgumentException( key + " is duplicated" );
+        }
+        this.templates.put( key, template );
+    }
+
+    @Override
+    public void removeTemplate( final String key )
+    {
+        this.templates.remove( key );
+    }
+
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/template/TemplateProvider.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/template/TemplateProvider.java
new file mode 100755 (executable)
index 0000000..7da0909
--- /dev/null
@@ -0,0 +1,143 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+import static org.tizen.common.util.IOUtil.tryClose;\r
+\r
+import java.io.Closeable;\r
+import java.io.IOException;\r
+import java.util.Collection;\r
+import java.util.Collections;\r
+import java.util.HashMap;\r
+import java.util.Map;\r
+\r
+import org.tizen.common.util.Assert;\r
+import org.tizen.common.verrari.ITemplate;\r
+import org.tizen.common.verrari.ITemplateProvider;\r
+\r
+/**\r
+ * TemplateProvider.\r
+ *\r
+ * Simple implementation for {@link ITemplateProvider}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class\r
+TemplateProvider\r
+implements ITemplateProvider, Closeable\r
+{\r
+    \r
+    /**\r
+     * TODO transformer chain\r
+     */\r
+    protected TemplateTransformer transformer;\r
+\r
+    /**\r
+     * template container\r
+     */\r
+    protected Map<String, ITemplate> templates;\r
+    \r
+    /**\r
+     * Default constructor\r
+     */\r
+    public\r
+    TemplateProvider()\r
+    {\r
+        this( new HashMap<String, ITemplate>() );\r
+    }\r
+    \r
+    /**\r
+     * Constructor with {@link Map} containing template info\r
+     * \r
+     * @param templates {@link Map}\r
+     */\r
+    public\r
+    TemplateProvider(\r
+        final Map<String, ITemplate> templates\r
+    )\r
+    {\r
+        Assert.notNull( templates );\r
+        this.templates = templates;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplateProvider#getTemplate(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    ITemplate\r
+    getTemplate(String key)\r
+    {\r
+\r
+        final ITemplate template = this.templates.get( key );\r
+        if ( null == template )\r
+        {\r
+            return null;\r
+        }\r
+        if ( null != transformer )\r
+        {\r
+            return new TransformableTemplate( this.transformer, template );\r
+        }\r
+        return template;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplateProvider#isEmpty()\r
+     */\r
+    @Override\r
+    public\r
+    boolean\r
+    isEmpty()\r
+    {\r
+        return templates.isEmpty();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplateProvider#keys()\r
+     */\r
+    @Override\r
+    public\r
+    Collection<String>\r
+    keys()\r
+    {\r
+        return Collections.unmodifiableCollection( templates.keySet() );\r
+    }\r
+    \r
+    @Override\r
+    public void close() throws IOException\r
+    {\r
+        tryClose( templates.values().toArray() );\r
+    }\r
+\r
+    @Override\r
+    public void setTransformer(TemplateTransformer transformer)\r
+    {\r
+        this.transformer = transformer;\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/template/TemplateProviderDelegate.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/template/TemplateProviderDelegate.java
new file mode 100755 (executable)
index 0000000..3d0e1f9
--- /dev/null
@@ -0,0 +1,117 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+import java.util.Collection;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.tizen.common.util.Assert;\r
+import org.tizen.common.verrari.ITemplate;\r
+import org.tizen.common.verrari.ITemplateProvider;\r
+\r
+/**\r
+ * TemplateProviderDelegate.\r
+ *\r
+ * delegate of {@link ITemplateProvider}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class\r
+TemplateProviderDelegate\r
+implements ITemplateProvider\r
+{\r
+    /**\r
+     * Logger for this instance\r
+     */\r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+\r
+    /**\r
+     * reald {@link ITemplateProvider}\r
+     */\r
+    protected final ITemplateProvider provider;\r
+    \r
+    /**\r
+     * Constructor with real object\r
+     * \r
+     * @param provider real {@link ITemplateProvider}\r
+     */\r
+    protected\r
+    TemplateProviderDelegate(\r
+        final ITemplateProvider provider\r
+    )\r
+    {\r
+        Assert.notNull( provider );\r
+        this.provider = provider;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplateProvider#getTemplate(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    ITemplate\r
+    getTemplate(\r
+        final String key\r
+    )\r
+    {\r
+        return provider.getTemplate(key);\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplateProvider#isEmpty()\r
+     */\r
+    @Override\r
+    public\r
+    boolean\r
+    isEmpty()\r
+    {\r
+        return provider.isEmpty();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplateProvider#keys()\r
+     */\r
+    @Override\r
+    public\r
+    Collection<String>\r
+    keys()\r
+    {\r
+        return provider.keys();\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplateProvider#setTransformer(org.tizen.common.verrari.template.TemplateTransformer)\r
+     */\r
+    @Override\r
+    public void setTransformer(TemplateTransformer transformer)\r
+    {\r
+        provider.setTransformer( transformer );\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/template/TemplateTransformer.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/template/TemplateTransformer.java
new file mode 100644 (file)
index 0000000..0a06e2c
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.template;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * TemplateTransfer
+ *
+ * @author ChangHyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public abstract class TemplateTransformer {
+
+    // Template Common Notation
+       // $# line comment
+    public static final String REGEX_LINECOMMENT = "(\\$\\#).*"; //$NON-NLS-1$
+    // $${key|"default"}
+    public static final String REGEX_TRANSFORM = "(\\$\\$\\{)(.*?)(\\})"; //$NON-NLS-1$
+    // $@{fun()}
+    public static final String REGEX_FUNCTION = "(\\$\\@\\{)(.*?)(\\})"; //$NON-NLS-1$
+    // $$include{templateKey}
+    public static final String REGEX_INCLUDE = "(\\$\\$include)(.*?)(\\})"; //$NON-NLS-1$
+    // $$if{key}
+    public static final String REGEX_IF = "(\\$\\$if)(.*?)(\\})"; //$NON-NLS-1$
+    // $$elseif{key}
+    public static final String REGEX_ELSEIF = "(\\$\\$elseif)(.*?)(\\})"; //$NON-NLS-1$
+    // $$else
+    public static final String REGEX_ELSE = "(\\$\\$else)"; //$NON-NLS-1$
+    // $$endif
+    public static final String REGEX_ENDIF = "(\\$\\$endif)"; //$NON-NLS-1$
+
+    public TemplateTransformer() {
+    }
+
+    public String templateTranslate(String contents) {
+        return translateIf(translateFunction(translateInclude(translateTransform(translateLineComment(contents)))));
+    }
+
+    public String translateLineComment(String contents) {
+        Pattern pattern = Pattern.compile(REGEX_LINECOMMENT);
+        Matcher matcher = pattern.matcher(contents);
+        return matcher.replaceAll(""); //$NON-NLS-1$
+    }
+
+    abstract public String translateTransform(String contents);
+    abstract public String translateFunction(String contents);
+    abstract public String translateInclude(String contents);
+    abstract public String translateIf(String contents);
+
+}
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/template/TransformableTemplate.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/template/TransformableTemplate.java
new file mode 100755 (executable)
index 0000000..6d8901b
--- /dev/null
@@ -0,0 +1,71 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+import java.io.ByteArrayInputStream;\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+\r
+import org.tizen.common.util.Assert;\r
+import org.tizen.common.util.IOUtil;\r
+import org.tizen.common.verrari.ITemplate;\r
+\r
+public class TransformableTemplate\r
+extends AbstractTemplate\r
+implements ITemplate\r
+{\r
+    protected final TemplateTransformer transformer;\r
+    protected final ITemplate template;\r
+    \r
+    public\r
+    TransformableTemplate(\r
+        final TemplateTransformer transformer,\r
+        final ITemplate template\r
+    )\r
+    {\r
+        Assert.notNull( template );\r
+        this.transformer = transformer;\r
+        this.template = template;\r
+    }\r
+\r
+    @Override\r
+    public InputStream open() throws IOException\r
+    {\r
+        if ( null == this.transformer )\r
+        {\r
+            return template.open();\r
+        }\r
+        final String raw = IOUtil.getString( template.open(), true );\r
+        final String contents = this.transformer.templateTranslate( raw );\r
+        logger.info( "Transfor From :\n{}\n===>\n{}", raw, contents );\r
+        final InputStream in = new ByteArrayInputStream( contents.getBytes() );\r
+        logger.info( "Input Stream :{}", in );\r
+        return in;\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/template/URLTemplate.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/template/URLTemplate.java
new file mode 100755 (executable)
index 0000000..5f1c5a0
--- /dev/null
@@ -0,0 +1,118 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.template;\r
+\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+import java.net.MalformedURLException;\r
+import java.net.URL;\r
+\r
+import org.tizen.common.util.Assert;\r
+import org.tizen.common.verrari.ITemplate;\r
+\r
+/**\r
+ * URLTemplate.\r
+ *\r
+ * {@link ITemplate} to load using {@link URL}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class\r
+URLTemplate\r
+extends AbstractTemplate\r
+implements ITemplate\r
+{\r
+    /**\r
+     * {@link URL} to indicate template location\r
+     */\r
+    protected final URL url;\r
+    \r
+    /**\r
+     * Consructor with url string\r
+     * \r
+     * @param url url string\r
+     * \r
+     * @throws MalformedURLException if <code>url</code> is invalid\r
+     * \r
+     * @see #URLTemplate(URL)\r
+     */\r
+    public\r
+    URLTemplate(\r
+        final String url\r
+    )\r
+    throws MalformedURLException\r
+    {\r
+        this( new URL( url ) );\r
+    }\r
+    \r
+    /**\r
+     * Constructor with url\r
+     * \r
+     * @param url {@link URL}\r
+     * \r
+     * @see #URLTemplate(URL, String)\r
+     */\r
+    public\r
+    URLTemplate(\r
+        final URL url\r
+    )\r
+    {\r
+        this( url, null );\r
+    }\r
+    \r
+    /**\r
+     * Constructor with url and encoding\r
+     * \r
+     * @param url {@link URL}\r
+     * @param encoding encoding\r
+     */\r
+    public\r
+    URLTemplate(\r
+        final URL url,\r
+        final String encoding\r
+    )\r
+    {\r
+        super( encoding );\r
+        Assert.notNull( url );\r
+        this.url = url;\r
+    }\r
+    \r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.verrari.ITemplate#open()\r
+     */\r
+    @Override\r
+    public\r
+    InputStream\r
+    open()\r
+    throws IOException\r
+    {\r
+        return url.openStream();\r
+    }\r
+    \r
+\r
+}\r
diff --git a/org.tizen.common.verrari/src/org/tizen/common/verrari/util/BufferFactory.java b/org.tizen.common.verrari/src/org/tizen/common/verrari/util/BufferFactory.java
new file mode 100755 (executable)
index 0000000..be33dd1
--- /dev/null
@@ -0,0 +1,98 @@
+/*\r
+ * Verrari - TemplateEngine\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.verrari.util;\r
+\r
+import java.io.IOException;\r
+\r
+import org.tizen.common.Factory;\r
+import org.tizen.common.FactoryWithArgument;\r
+import org.tizen.common.util.io.Buffer;\r
+import org.tizen.common.util.io.BufferPool;\r
+\r
+/**\r
+ * BufferFactory.\r
+ *\r
+ * Factory to create {@link Buffer}\r
+ *\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class\r
+BufferFactory\r
+extends BufferPool\r
+implements Factory<Buffer>, FactoryWithArgument<Buffer, byte[]>\r
+{\r
+    /**\r
+     * Singleton instance\r
+     */\r
+    protected static BufferFactory instance = new BufferFactory();\r
+    \r
+    /**\r
+     * singleton interface\r
+     * \r
+     * @return singleton instance\r
+     */\r
+    public static BufferFactory getInstance()\r
+    {\r
+        return instance;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.FactoryWithArgument#create(java.lang.Object)\r
+     */\r
+    @Override\r
+    public\r
+    Buffer\r
+    create(\r
+        final byte[] arg\r
+    )\r
+    {\r
+        try\r
+        {\r
+            final Buffer buffer = create();\r
+            buffer.write( arg );\r
+            \r
+            return buffer;\r
+        }\r
+        catch ( final IOException e )\r
+        {\r
+            throw new IllegalStateException( e );\r
+        }\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.Factory#create()\r
+     */\r
+    @Override\r
+    public\r
+    Buffer\r
+    create()\r
+    {\r
+        return new Buffer( this );\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common.verrari/templates/build.xml b/org.tizen.common.verrari/templates/build.xml
new file mode 100644 (file)
index 0000000..5dfb387
--- /dev/null
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- ====================================================================== 
+     @since Dec 7, 2012 10:25:35 AM
+
+     tizen web template
+
+     1.Make jar
+
+     Changhyun Lee <changhyun1.lee@samsung.com>
+
+     ====================================================================== -->
+<project name="tizen web template" default="build">
+    <description>
+         This build script is for tizen web template jar
+    </description>
+
+    <property file="./build.properties" />
+    <property name="jar.dir" location="./jar"/>
+    <property name="cli.dir" location="./cli"/>
+
+    <property name="common-resources" location="${cli.dir}/common-resources"/>
+    <property name="jqm-common-resources" location="${cli.dir}/jqm-common-resources"/>
+    <property name="tizenwebuifw-common-resources" location="${cli.dir}/tizenwebuifw-common-resources"/>
+
+    <property name="tizen-basic" location="${cli.dir}/tizen-basic"/>
+    <property name="jqm-singlepage" location="${cli.dir}/jqm-singlepage"/>
+    <property name="jqm-multipage" location="${cli.dir}/jqm-multipage"/>
+    <property name="jqm-masterdetail" location="${cli.dir}/jqm-masterdetail"/>
+    <property name="jqm-navigation" location="${cli.dir}/jqm-navigation"/>
+
+    <property name="tizenwebuifw-singlepage" location="${cli.dir}/tizenwebuifw-singlepage"/>
+    <property name="tizenwebuifw-multipage" location="${cli.dir}/tizenwebuifw-multipage"/>
+    <property name="tizenwebuifw-masterdetail" location="${cli.dir}/tizenwebuifw-masterdetail"/>
+    <property name="tizenwebuifw-navigation" location="${cli.dir}/tizenwebuifw-navigation"/>
+
+    <!-- =================================
+          target: tizen web template
+         ================================= -->
+    <target name="build" >
+        <echo>============= Start : Make jar ==================</echo>
+        <antcall target="clean"/>
+        <antcall target="jar"/>
+        <echo>============= Success : Make jar ==================</echo>
+    </target>
+
+    <target name="clean" >
+        <delete verbose="true" dir="${jar.dir}"/>
+    </target>
+
+    <target name="jar">
+        <jar destfile="${jar.dir}/common-resources.jar" basedir="${cli.dir}/common-resources" manifest="${cli.dir}/common-resources/META-INF/MANIFEST.MF"></jar>
+        <jar destfile="${jar.dir}/jqm-common-resources.jar" basedir="${cli.dir}/jqm-common-resources" manifest="${cli.dir}/jqm-common-resources/META-INF/MANIFEST.MF"></jar>
+        <jar destfile="${jar.dir}/tizenwebuifw-common-resources.jar" basedir="${cli.dir}/tizenwebuifw-common-resources" manifest="${cli.dir}/tizenwebuifw-common-resources/META-INF/MANIFEST.MF"></jar>
+        <jar destfile="${jar.dir}/tizen-basic.jar" basedir="${cli.dir}/tizen-basic" manifest="${cli.dir}/tizen-basic/META-INF/MANIFEST.MF"></jar>
+        <jar destfile="${jar.dir}/jqm-singlepage.jar" basedir="${cli.dir}/jqm-singlepage" manifest="${cli.dir}/jqm-singlepage/META-INF/MANIFEST.MF"></jar>
+        <jar destfile="${jar.dir}/jqm-multipage.jar" basedir="${cli.dir}/jqm-multipage" manifest="${cli.dir}/jqm-multipage/META-INF/MANIFEST.MF"></jar>
+        <jar destfile="${jar.dir}/jqm-masterdetail.jar" basedir="${cli.dir}/jqm-masterdetail" manifest="${cli.dir}/jqm-masterdetail/META-INF/MANIFEST.MF"></jar>
+        <jar destfile="${jar.dir}/jqm-navigation.jar" basedir="${cli.dir}/jqm-navigation" manifest="${cli.dir}/jqm-navigation/META-INF/MANIFEST.MF"></jar>
+        <jar destfile="${jar.dir}/tizenwebuifw-singlepage.jar" basedir="${cli.dir}/tizenwebuifw-singlepage" manifest="${cli.dir}/tizenwebuifw-singlepage/META-INF/MANIFEST.MF"></jar>
+        <jar destfile="${jar.dir}/tizenwebuifw-multipage.jar" basedir="${cli.dir}/tizenwebuifw-multipage" manifest="${cli.dir}/tizenwebuifw-multipage/META-INF/MANIFEST.MF"></jar>
+        <jar destfile="${jar.dir}/tizenwebuifw-masterdetail.jar" basedir="${cli.dir}/tizenwebuifw-masterdetail" manifest="${cli.dir}/tizenwebuifw-masterdetail/META-INF/MANIFEST.MF"></jar>
+        <jar destfile="${jar.dir}/tizenwebuifw-navigation.jar" basedir="${cli.dir}/tizenwebuifw-navigation" manifest="${cli.dir}/tizenwebuifw-navigation/META-INF/MANIFEST.MF"></jar>
+    </target>
+
+</project>
diff --git a/org.tizen.common.verrari/templates/cli/common-resources/META-INF/MANIFEST.MF b/org.tizen.common.verrari/templates/cli/common-resources/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..e970722
--- /dev/null
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Tizen-Template-Name: common-resources
+Tizen-Template-Description: common resources
+Tizen-Template-Tags: resource,icon.png
+Tizen-Template-Version: 0.1
+Tizen-Template-Copy: icon.png
+Tizen-Template-Exclude: META-INF/*
diff --git a/org.tizen.common.verrari/templates/cli/common-resources/META-INF/messages.properties b/org.tizen.common.verrari/templates/cli/common-resources/META-INF/messages.properties
new file mode 100644 (file)
index 0000000..eb255c3
--- /dev/null
@@ -0,0 +1,2 @@
+#Properties file for common-resources.jar
+WidgetID = * Widget Name [string]
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/cli/common-resources/config.xml b/org.tizen.common.verrari/templates/cli/common-resources/config.xml
new file mode 100644 (file)
index 0000000..e1c2bca
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/$${WidgetID|"WidgetID"}" version="1.0.0" viewmodes="maximized">
+    <tizen:application id="$@{APPLICATIONID()}" required_version="1.0"/>
+    <content src="index.html"/>
+    <icon src="icon.png"/>
+    <name>$${WidgetID|"WidgetID"}</name>
+</widget>
diff --git a/org.tizen.common.verrari/templates/cli/common-resources/icon.png b/org.tizen.common.verrari/templates/cli/common-resources/icon.png
new file mode 100644 (file)
index 0000000..983c883
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/common-resources/icon.png differ
diff --git a/org.tizen.common.verrari/templates/cli/jqm-common-resources/META-INF/MANIFEST.MF b/org.tizen.common.verrari/templates/cli/jqm-common-resources/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..a67634b
--- /dev/null
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Tizen-Template-Name: jqm-common-resources
+Tizen-Template-Description: jQuery Mobile - common resources
+Tizen-Template-Tags: jquery,jqm
+Tizen-Template-Version: 0.1
+Tizen-Template-Copy: css/images/*;css/jquery*;js/jquery*
+Tizen-Template-Exclude: META-INF/*
diff --git a/org.tizen.common.verrari/templates/cli/jqm-common-resources/META-INF/messages.properties b/org.tizen.common.verrari/templates/cli/jqm-common-resources/META-INF/messages.properties
new file mode 100644 (file)
index 0000000..bee946a
--- /dev/null
@@ -0,0 +1 @@
+#Properties file for jqm-common-resources.jar
diff --git a/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/ajax-loader.gif b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/ajax-loader.gif
new file mode 100644 (file)
index 0000000..fd1a189
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/ajax-loader.gif differ
diff --git a/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/ajax-loader.png b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/ajax-loader.png
new file mode 100644 (file)
index 0000000..13b208d
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/ajax-loader.png differ
diff --git a/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-18-black.png b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-18-black.png
new file mode 100644 (file)
index 0000000..ce1b758
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-18-black.png differ
diff --git a/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-18-white.png b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-18-white.png
new file mode 100644 (file)
index 0000000..1ab0127
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-18-white.png differ
diff --git a/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-36-black.png b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-36-black.png
new file mode 100644 (file)
index 0000000..1a59d7c
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-36-black.png differ
diff --git a/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-36-white.png b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-36-white.png
new file mode 100644 (file)
index 0000000..5647bdc
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/images/icons-36-white.png differ
diff --git a/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/jquery.mobile-1.1.0.css b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/jquery.mobile-1.1.0.css
new file mode 100644 (file)
index 0000000..06dbf8f
--- /dev/null
@@ -0,0 +1,2053 @@
+/*
+* jQuery Mobile Framework 1.1.0 db342b1f315c282692791aa870455901fdb46a55
+* http://jquerymobile.com
+*
+* Copyright 2011 (c) jQuery Project
+* Dual licensed under the MIT or GPL Version 2 licenses.
+* http://jquery.org/license
+*
+*/
+/* Swatches */
+/* A
+-----------------------------------------------------------------------------------------------------------*/
+.ui-bar-a {
+       border: 1px solid               #333 /*{a-bar-border}*/;
+       background:                     #111111 /*{a-bar-background-color}*/;
+       color:                                  #ffffff /*{a-bar-color}*/;
+       font-weight: bold;
+       text-shadow: 0 /*{a-bar-shadow-x}*/ -1px /*{a-bar-shadow-y}*/ 1px /*{a-bar-shadow-radius}*/ #000000 /*{a-bar-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #3c3c3c /*{a-bar-background-start}*/), to( #111 /*{a-bar-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #3c3c3c /*{a-bar-background-start}*/, #111 /*{a-bar-background-end}*/);
+}
+.ui-bar-a, 
+.ui-bar-a input, 
+.ui-bar-a select, 
+.ui-bar-a textarea, 
+.ui-bar-a button {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-bar-a .ui-link-inherit {
+       color: #fff /*{a-bar-color}*/;
+}
+.ui-bar-a .ui-link {
+       color: #7cc4e7 /*{a-bar-link-color}*/;
+       font-weight: bold;
+}
+.ui-bar-a .ui-link:hover {
+       color: #2489CE /*{a-bar-link-hover}*/;
+}
+.ui-bar-a .ui-link:active {
+       color: #2489CE /*{a-bar-link-active}*/;
+}
+.ui-bar-a .ui-link:visited {
+    color: #2489CE /*{a-bar-link-visited}*/;
+}
+.ui-body-a,
+.ui-overlay-a {
+       border: 1px solid               #444 /*{a-body-border}*/;
+       background:                     #222 /*{a-body-background-color}*/;
+       color:                                  #fff /*{a-body-color}*/;
+       text-shadow: 0 /*{a-body-shadow-x}*/ 1px /*{a-body-shadow-y}*/ 1px /*{a-body-shadow-radius}*/ #111 /*{a-body-shadow-color}*/;
+       font-weight: normal;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #444 /*{a-body-background-start}*/), to( #222 /*{a-body-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #444 /*{a-body-background-start}*/, #222 /*{a-body-background-end}*/);       
+}
+.ui-overlay-a {
+       background-image: none;
+       border-width: 0;
+}
+.ui-body-a,
+.ui-body-a input,
+.ui-body-a select,
+.ui-body-a textarea,
+.ui-body-a button {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-body-a .ui-link-inherit {
+       color:  #fff /*{a-body-color}*/;
+}
+.ui-body-a .ui-link {
+       color: #2489CE /*{a-body-link-color}*/;
+       font-weight: bold;
+}
+.ui-body-a .ui-link:hover {
+       color: #2489CE /*{a-body-link-hover}*/;
+}
+.ui-body-a .ui-link:active {
+       color: #2489CE /*{a-body-link-active}*/;
+}
+.ui-body-a .ui-link:visited {
+    color: #2489CE /*{a-body-link-visited}*/;
+}
+.ui-btn-up-a {
+       border: 1px solid               #111 /*{a-bup-border}*/;
+       background:                     #333 /*{a-bup-background-color}*/;
+       font-weight: bold;
+       color:                                  #fff /*{a-bup-color}*/;
+       text-shadow: 0 /*{a-bup-shadow-x}*/ 1px /*{a-bup-shadow-y}*/ 1px /*{a-bup-shadow-radius}*/ #111 /*{a-bup-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #444444 /*{a-bup-background-start}*/), to( #2d2d2d /*{a-bup-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #444444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #444444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #444444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #444444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #444444 /*{a-bup-background-start}*/, #2d2d2d /*{a-bup-background-end}*/);
+}
+.ui-btn-up-a a.ui-link-inherit {
+       color:                                  #fff /*{a-bup-color}*/;
+}
+.ui-btn-hover-a {
+       border: 1px solid               #000 /*{a-bhover-border}*/;
+       background:                     #444444 /*{a-bhover-background-color}*/;
+       font-weight: bold;
+       color:                                  #fff /*{a-bhover-color}*/;
+       text-shadow: 0 /*{a-bhover-shadow-x}*/ 1px /*{a-bhover-shadow-y}*/ 1px /*{a-bhover-shadow-radius}*/ #111 /*{a-bhover-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #555555 /*{a-bhover-background-start}*/), to( #383838 /*{a-bhover-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #555555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #555555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #555555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #555555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #555555 /*{a-bhover-background-start}*/, #383838 /*{a-bhover-background-end}*/);
+}
+.ui-btn-hover-a a.ui-link-inherit {
+       color:                                  #fff /*{a-bhover-color}*/;
+}
+.ui-btn-down-a {
+       border: 1px solid               #000 /*{a-bdown-border}*/;
+       background:                     #222 /*{a-bdown-background-color}*/;
+       font-weight: bold;
+       color:                                  #fff /*{a-bdown-color}*/;
+       text-shadow: 0 /*{a-bdown-shadow-x}*/ 1px /*{a-bdown-shadow-y}*/ 1px /*{a-bdown-shadow-radius}*/ #111 /*{a-bdown-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #202020 /*{a-bdown-background-start}*/), to( #2c2c2c /*{a-bdown-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #202020 /*{a-bdown-background-start}*/, #2c2c2c /*{a-bdown-background-end}*/);
+}
+.ui-btn-down-a a.ui-link-inherit {
+       color:                                  #fff /*{a-bdown-color}*/;
+}
+.ui-btn-up-a,
+.ui-btn-hover-a,
+.ui-btn-down-a {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+       text-decoration: none;
+}
+/* B
+-----------------------------------------------------------------------------------------------------------*/
+.ui-bar-b {
+       border: 1px solid               #456f9a /*{b-bar-border}*/;
+       background:                     #5e87b0 /*{b-bar-background-color}*/;
+       color:                                  #fff /*{b-bar-color}*/;
+       font-weight: bold;
+       text-shadow: 0 /*{b-bar-shadow-x}*/ 1px /*{b-bar-shadow-y}*/ 1px /*{b-bar-shadow-radius}*/ #3e6790 /*{b-bar-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #6facd5 /*{b-bar-background-start}*/), to( #497bae /*{b-bar-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #6facd5 /*{b-bar-background-start}*/, #497bae /*{b-bar-background-end}*/);
+}
+.ui-bar-b,
+.ui-bar-b input,
+.ui-bar-b select,
+.ui-bar-b textarea,
+.ui-bar-b button {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-bar-b .ui-link-inherit {
+       color:  #fff /*{b-bar-color}*/;
+}
+.ui-bar-b .ui-link {
+       color: #ddf0f8 /*{b-bar-link-color}*/;
+       font-weight: bold;
+}
+.ui-bar-b .ui-link:hover {
+       color: #ddf0f8 /*{b-bar-link-hover}*/;
+}
+.ui-bar-b .ui-link:active {
+       color: #ddf0f8 /*{b-bar-link-active}*/;
+}
+.ui-bar-b .ui-link:visited {
+    color: #ddf0f8 /*{b-bar-link-visited}*/;
+}
+.ui-body-b,
+.ui-overlay-b {
+       border: 1px solid               #999 /*{b-body-border}*/;
+       background:                     #f3f3f3 /*{b-body-background-color}*/;
+       color:                                  #222222 /*{b-body-color}*/;
+       text-shadow: 0 /*{b-body-shadow-x}*/ 1px /*{b-body-shadow-y}*/ 0 /*{b-body-shadow-radius}*/ #fff /*{b-body-shadow-color}*/;
+       font-weight: normal;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #ddd /*{b-body-background-start}*/), to( #ccc /*{b-body-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #ddd /*{b-body-background-start}*/, #ccc /*{b-body-background-end}*/);
+}
+.ui-overlay-b {
+       background-image: none;
+       border-width: 0;
+}
+.ui-body-b,
+.ui-body-b input,
+.ui-body-b select,
+.ui-body-b textarea,
+.ui-body-b button {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-body-b .ui-link-inherit {
+       color:  #333333 /*{b-body-color}*/;
+}
+.ui-body-b .ui-link {
+       color: #2489CE /*{b-body-link-color}*/;
+       font-weight: bold;
+}
+.ui-body-b .ui-link:hover {
+       color: #2489CE /*{b-body-link-hover}*/;
+}
+.ui-body-b .ui-link:active {
+       color: #2489CE /*{b-body-link-active}*/;
+}
+.ui-body-b .ui-link:visited {
+    color: #2489CE /*{b-body-link-visited}*/;
+}
+.ui-btn-up-b {
+       border: 1px solid               #044062 /*{b-bup-border}*/;
+       background:                     #396b9e /*{b-bup-background-color}*/;
+       font-weight: bold;
+       color:                                  #fff /*{b-bup-color}*/;
+       text-shadow: 0 /*{b-bup-shadow-x}*/ 1px /*{b-bup-shadow-y}*/ 1px /*{b-bup-shadow-radius}*/ #194b7e /*{b-bup-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #5f9cc5 /*{b-bup-background-start}*/), to( #396b9e /*{b-bup-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #5f9cc5 /*{b-bup-background-start}*/, #396b9e /*{b-bup-background-end}*/);
+}
+.ui-btn-up-b a.ui-link-inherit {
+       color:                                  #fff /*{b-bup-color}*/;
+}
+.ui-btn-hover-b {
+       border: 1px solid               #00415e /*{b-bhover-border}*/;
+       background:                     #4b88b6 /*{b-bhover-background-color}*/;
+       font-weight: bold;
+       color:                                  #fff /*{b-bhover-color}*/;
+       text-shadow: 0 /*{b-bhover-shadow-x}*/ 1px /*{b-bhover-shadow-y}*/ 1px /*{b-bhover-shadow-radius}*/ #194b7e /*{b-bhover-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #6facd5 /*{b-bhover-background-start}*/), to( #4272a4 /*{b-bhover-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #6facd5 /*{b-bhover-background-start}*/, #4272a4 /*{b-bhover-background-end}*/);
+}
+.ui-btn-hover-b a.ui-link-inherit {
+       color:                                  #fff /*{b-bhover-color}*/;
+}
+.ui-btn-down-b {
+       border: 1px solid               #225377 /*{b-bdown-border}*/;
+       background:                     #4e89c5 /*{b-bdown-background-color}*/;
+       font-weight: bold;
+       color:                                  #fff /*{b-bdown-color}*/;
+       text-shadow: 0 /*{b-bdown-shadow-x}*/ 1px /*{b-bdown-shadow-y}*/ 1px /*{b-bdown-shadow-radius}*/ #194b7e /*{b-bdown-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #295b8e /*{b-bdown-background-start}*/), to( #3e79b5 /*{b-bdown-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #295b8e /*{b-bdown-background-start}*/, #3e79b5 /*{b-bdown-background-end}*/);
+}
+.ui-btn-down-b a.ui-link-inherit {
+       color:                                  #fff /*{b-bdown-color}*/;
+}
+.ui-btn-up-b,
+.ui-btn-hover-b,
+.ui-btn-down-b {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+       text-decoration: none;
+}
+/* C
+-----------------------------------------------------------------------------------------------------------*/
+.ui-bar-c {
+       border: 1px solid               #B3B3B3 /*{c-bar-border}*/;
+       background:                     #eeeeee /*{c-bar-background-color}*/;
+       color:                                  #3E3E3E /*{c-bar-color}*/;
+       font-weight: bold;
+       text-shadow: 0 /*{c-bar-shadow-x}*/ 1px /*{c-bar-shadow-y}*/ 1px /*{c-bar-shadow-radius}*/      #fff /*{c-bar-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #f0f0f0 /*{c-bar-background-start}*/), to( #ddd /*{c-bar-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #f0f0f0 /*{c-bar-background-start}*/, #ddd /*{c-bar-background-end}*/);
+}
+.ui-bar-c .ui-link-inherit {
+       color:  #3E3E3E /*{c-bar-color}*/;
+}
+.ui-bar-c .ui-link {
+       color: #7cc4e7 /*{c-bar-link-color}*/;
+       font-weight: bold;
+}
+.ui-bar-c .ui-link:hover {
+       color: #2489CE /*{c-bar-link-hover}*/;
+}
+.ui-bar-c .ui-link:active {
+       color: #2489CE /*{c-bar-link-active}*/;
+}
+.ui-bar-c .ui-link:visited {
+    color: #2489CE /*{c-bar-link-visited}*/;
+}
+.ui-bar-c,
+.ui-bar-c input,
+.ui-bar-c select,
+.ui-bar-c textarea,
+.ui-bar-c button {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-body-c,
+.ui-overlay-c {
+       border: 1px solid               #aaa /*{c-body-border}*/;
+       color:                                  #333333 /*{c-body-color}*/;
+       text-shadow: 0 /*{c-body-shadow-x}*/ 1px /*{c-body-shadow-y}*/ 0 /*{c-body-shadow-radius}*/ #fff /*{c-body-shadow-color}*/;
+       background:                     #f9f9f9 /*{c-body-background-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #f9f9f9 /*{c-body-background-start}*/), to( #eeeeee /*{c-body-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eeeeee /*{c-body-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eeeeee /*{c-body-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eeeeee /*{c-body-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eeeeee /*{c-body-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #f9f9f9 /*{c-body-background-start}*/, #eeeeee /*{c-body-background-end}*/);
+}
+.ui-overlay-c {
+       background-image: none;
+       border-width: 0;
+}
+.ui-body-c,
+.ui-body-c input,
+.ui-body-c select,
+.ui-body-c textarea,
+.ui-body-c button {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-body-c .ui-link-inherit {
+       color:  #333333 /*{c-body-color}*/;
+}
+.ui-body-c .ui-link {
+       color: #2489CE /*{c-body-link-color}*/;
+       font-weight: bold;
+}
+.ui-body-c .ui-link:hover {
+       color: #2489CE /*{c-body-link-hover}*/;
+}
+.ui-body-c .ui-link:active {
+       color: #2489CE /*{c-body-link-active}*/;
+}
+.ui-body-c .ui-link:visited {
+    color: #2489CE /*{c-body-link-visited}*/;
+}
+.ui-btn-up-c {
+       border: 1px solid               #ccc /*{c-bup-border}*/;
+       background:                     #eee /*{c-bup-background-color}*/;
+       font-weight: bold;
+       color:                                  #222 /*{c-bup-color}*/;
+       text-shadow: 0 /*{c-bup-shadow-x}*/ 1px /*{c-bup-shadow-y}*/ 0 /*{c-bup-shadow-radius}*/ #ffffff /*{c-bup-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #ffffff /*{c-bup-background-start}*/), to( #f1f1f1 /*{c-bup-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #ffffff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #ffffff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #ffffff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #ffffff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #ffffff /*{c-bup-background-start}*/, #f1f1f1 /*{c-bup-background-end}*/);
+}
+.ui-btn-up-c a.ui-link-inherit {
+       color:                                  #2F3E46 /*{c-bup-color}*/;
+}
+.ui-btn-hover-c {
+       border: 1px solid               #bbb /*{c-bhover-border}*/;
+       background:                     #dfdfdf /*{c-bhover-background-color}*/;
+       font-weight: bold;
+       color:                                  #222 /*{c-bhover-color}*/;
+       text-shadow: 0 /*{c-bhover-shadow-x}*/ 1px /*{c-bhover-shadow-y}*/ 0 /*{c-bhover-shadow-radius}*/ #ffffff /*{c-bhover-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #f6f6f6 /*{c-bhover-background-start}*/), to( #e0e0e0 /*{c-bhover-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #f9f9f9 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #f6f6f6 /*{c-bhover-background-start}*/, #e0e0e0 /*{c-bhover-background-end}*/);
+}
+.ui-btn-hover-c a.ui-link-inherit {
+       color:                                  #2F3E46 /*{c-bhover-color}*/;
+}
+.ui-btn-down-c {
+       border: 1px solid               #bbb /*{c-bdown-border}*/;
+       background:                     #d6d6d6 /*{c-bdown-background-color}*/;
+       font-weight: bold;
+       color:                                  #222 /*{c-bdown-color}*/;
+       text-shadow: 0 /*{c-bdown-shadow-x}*/ 1px /*{c-bdown-shadow-y}*/ 0 /*{c-bdown-shadow-radius}*/ #ffffff /*{c-bdown-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #d0d0d0 /*{c-bdown-background-start}*/), to( #dfdfdf /*{c-bdown-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #d0d0d0 /*{c-bdown-background-start}*/, #dfdfdf /*{c-bdown-background-end}*/);
+}
+.ui-btn-down-c a.ui-link-inherit {
+       color:                                  #2F3E46 /*{c-bdown-color}*/;
+}
+.ui-btn-up-c,
+.ui-btn-hover-c,
+.ui-btn-down-c {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+       text-decoration: none;
+}
+/* D
+-----------------------------------------------------------------------------------------------------------*/
+.ui-bar-d {
+       border: 1px solid               #bbb /*{d-bar-border}*/;
+       background:                     #bbb /*{d-bar-background-color}*/;
+       color:                                  #333 /*{d-bar-color}*/;
+       text-shadow: 0 /*{d-bar-shadow-x}*/ 1px /*{d-bar-shadow-y}*/ 0 /*{d-bar-shadow-radius}*/ #eee /*{d-bar-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #ddd /*{d-bar-background-start}*/), to( #bbb /*{d-bar-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #ddd /*{d-bar-background-start}*/, #bbb /*{d-bar-background-end}*/);
+}
+.ui-bar-d,
+.ui-bar-d input,
+.ui-bar-d select,
+.ui-bar-d textarea,
+.ui-bar-d button {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-bar-d .ui-link-inherit {
+       color:  #333333 /*{d-bar-color}*/;
+}
+.ui-bar-d .ui-link {
+       color: #2489CE /*{d-bar-link-color}*/;
+       font-weight: bold;
+}
+.ui-bar-d .ui-link:hover {
+       color: #2489CE /*{d-bar-link-hover}*/;
+}
+.ui-bar-d .ui-link:active {
+       color: #2489CE /*{d-bar-link-active}*/;
+}
+.ui-bar-d .ui-link:visited {
+    color: #2489CE /*{d-bar-link-visited}*/;
+}
+.ui-body-d,
+.ui-overlay-d {
+       border: 1px solid               #bbb /*{d-body-border}*/;
+       color:                                  #333333 /*{d-body-color}*/;
+       text-shadow: 0 /*{d-body-shadow-x}*/ 1px /*{d-body-shadow-y}*/ 0 /*{d-body-shadow-radius}*/     #fff /*{d-body-shadow-color}*/;
+       background:                     #ffffff /*{d-body-background-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #fff), to( #fff /*{d-body-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #fff /*{d-body-background-start}*/, #fff /*{d-body-background-end}*/);
+}
+.ui-overlay-d {
+       background-image: none;
+       border-width: 0;
+}
+.ui-body-d,
+.ui-body-d input,
+.ui-body-d select,
+.ui-body-d textarea,
+.ui-body-d button {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-body-d .ui-link-inherit {
+       color:  #333333 /*{d-body-color}*/;
+}
+.ui-body-d .ui-link {
+       color: #2489CE /*{d-body-link-color}*/;
+       font-weight: bold;
+}
+.ui-body-d .ui-link:hover {
+       color: #2489CE /*{d-body-link-hover}*/;
+}
+.ui-body-d .ui-link:active {
+       color: #2489CE /*{d-body-link-active}*/;
+}
+.ui-body-d .ui-link:visited {
+    color: #2489CE /*{d-body-link-visited}*/;
+}
+.ui-btn-up-d {
+       border: 1px solid               #bbb /*{d-bup-border}*/;
+       background:                     #fff /*{d-bup-background-color}*/;
+       font-weight: bold;
+       color:                                  #333 /*{d-bup-color}*/;
+       text-shadow: 0 /*{d-bup-shadow-x}*/ 1px /*{d-bup-shadow-y}*/ 0 /*{d-bup-shadow-radius}*/ #fff /*{d-bup-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #fafafa), to( #f6f6f6 /*{d-bup-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #fafafa /*{d-bup-background-start}*/, #f6f6f6 /*{d-bup-background-end}*/);
+}
+.ui-btn-up-d a.ui-link-inherit {
+       color:                                  #333 /*{d-bup-color}*/;
+}
+.ui-btn-hover-d {
+       border: 1px solid               #aaa /*{d-bhover-border}*/;
+       background:                     #eeeeee /*{d-bhover-background-color}*/;
+       font-weight: bold;
+       color:                                  #333 /*{d-bhover-color}*/;
+       cursor: pointer;
+       text-shadow: 0 /*{d-bhover-shadow-x}*/ 1px /*{d-bhover-shadow-y}*/ 0 /*{d-bhover-shadow-radius}*/       #fff /*{d-bhover-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #eee), to( #fff /*{d-bhover-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #eee /*{d-bhover-background-start}*/, #fff /*{d-bhover-background-end}*/);
+}
+.ui-btn-hover-d a.ui-link-inherit {
+       color:                                  #333 /*{d-bhover-color}*/;
+}
+.ui-btn-down-d {
+       border: 1px solid               #aaa /*{d-bdown-border}*/;
+       background:                     #eee /*{d-bdown-background-color}*/;
+       font-weight: bold;
+       color:                                  #333 /*{d-bdown-color}*/;
+       text-shadow: 0 /*{d-bdown-shadow-x}*/ 1px /*{d-bdown-shadow-y}*/ 0 /*{d-bdown-shadow-radius}*/  #ffffff /*{d-bdown-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #e5e5e5 /*{d-bdown-background-start}*/), to( #f2f2f2 /*{d-bdown-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #e5e5e5 /*{d-bdown-background-start}*/, #f2f2f2 /*{d-bdown-background-end}*/);
+}
+.ui-btn-down-d a.ui-link-inherit {
+       color:                                  #333 /*{d-bdown-color}*/;
+}
+.ui-btn-up-d,
+.ui-btn-hover-d,
+.ui-btn-down-d {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+       text-decoration: none;
+}
+/* E
+-----------------------------------------------------------------------------------------------------------*/
+.ui-bar-e {
+       border: 1px solid               #F7C942 /*{e-bar-border}*/;
+       background:                     #fadb4e /*{e-bar-background-color}*/;
+       color:                                  #333 /*{e-bar-color}*/;
+       text-shadow: 0 /*{e-bar-shadow-x}*/ 1px /*{e-bar-shadow-y}*/ 0 /*{e-bar-shadow-radius}*/        #fff /*{e-bar-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #fceda7 /*{e-bar-background-start}*/), to( #fbef7e /*{e-bar-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #fceda7 /*{e-bar-background-start}*/, #fbef7e /*{e-bar-background-end}*/);
+}
+.ui-bar-e,
+.ui-bar-e input,
+.ui-bar-e select,
+.ui-bar-e textarea,
+.ui-bar-e button {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-bar-e .ui-link-inherit {
+       color:  #333333 /*{e-bar-color}*/;
+}
+.ui-bar-e .ui-link {
+       color: #2489CE /*{e-bar-link-color}*/;
+       font-weight: bold;
+}
+.ui-bar-e .ui-link:hover {
+       color: #2489CE /*{e-bar-link-hover}*/;
+}
+.ui-bar-e .ui-link:active {
+       color: #2489CE /*{e-bar-link-active}*/;
+}
+.ui-bar-e .ui-link:visited {
+    color: #2489CE /*{e-bar-link-visited}*/;
+}
+.ui-body-e,
+.ui-overlay-e {
+       border: 1px solid               #F7C942 /*{e-body-border}*/;
+       color:                                  #222222 /*{e-body-color}*/;
+       text-shadow: 0 /*{e-body-shadow-x}*/ 1px /*{e-body-shadow-y}*/ 0 /*{e-body-shadow-radius}*/     #fff /*{e-body-shadow-color}*/;
+       background:                     #fff9df /*{e-body-background-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #fffadf /*{e-body-background-start}*/), to( #fff3a5 /*{e-body-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #fffadf /*{e-body-background-start}*/, #fff3a5 /*{e-body-background-end}*/);
+}
+.ui-overlay-e {
+       background-image: none;
+       border-width: 0;
+}
+.ui-body-e,
+.ui-body-e input,
+.ui-body-e select,
+.ui-body-e textarea,
+.ui-body-e button {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-body-e .ui-link-inherit {
+       color:  #333333 /*{e-body-color}*/;
+}
+.ui-body-e .ui-link {
+       color: #2489CE /*{e-body-link-color}*/;
+       font-weight: bold;
+}
+.ui-body-e .ui-link:hover {
+       color: #2489CE /*{e-body-link-hover}*/;
+}
+.ui-body-e .ui-link:active {
+       color: #2489CE /*{e-body-link-active}*/;
+}
+.ui-body-e .ui-link:visited {
+    color: #2489CE /*{e-body-link-visited}*/;
+}
+.ui-btn-up-e {
+       border: 1px solid               #F4C63f /*{e-bup-border}*/;
+       background:                     #fadb4e /*{e-bup-background-color}*/;
+       font-weight: bold;
+       color:                                  #222 /*{e-bup-color}*/;
+       text-shadow: 0 /*{e-bup-shadow-x}*/ 1px /*{e-bup-shadow-y}*/ 0 /*{e-bup-shadow-radius}*/        #fff /*{e-bup-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #ffefaa /*{e-bup-background-start}*/), to( #ffe155 /*{e-bup-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #ffefaa /*{e-bup-background-start}*/, #ffe155 /*{e-bup-background-end}*/);
+}
+.ui-btn-up-e a.ui-link-inherit {
+       color:                                  #222 /*{e-bup-color}*/;
+}
+.ui-btn-hover-e {
+       border: 1px solid               #F2C43d /*{e-bhover-border}*/;
+       background:                     #fbe26f /*{e-bhover-background-color}*/;
+       font-weight: bold;
+       color:                                  #111 /*{e-bhover-color}*/;
+       text-shadow: 0 /*{e-bhover-shadow-x}*/ 1px /*{e-bhover-shadow-y}*/ 0 /*{e-bhover-shadow-radius}*/       #fff /*{e-bhover-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #fff5ba /*{e-bhover-background-start}*/), to( #fbdd52 /*{e-bhover-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #fff5ba /*{e-bhover-background-start}*/, #fbdd52 /*{e-bhover-background-end}*/);
+}
+.ui-btn-hover-e a.ui-link-inherit {
+       color:                                  #333 /*{e-bhover-color}*/;
+}
+.ui-btn-down-e {
+       border: 1px solid               #F2C43d /*{e-bdown-border}*/;
+       background:                     #fceda7 /*{e-bdown-background-color}*/;
+       font-weight: bold;
+       color:                                  #111 /*{e-bdown-color}*/;
+       text-shadow: 0 /*{e-bdown-shadow-x}*/ 1px /*{e-bdown-shadow-y}*/ 0 /*{e-bdown-shadow-radius}*/  #ffffff /*{e-bdown-shadow-color}*/;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #f8d94c /*{e-bdown-background-start}*/), to( #fadb4e /*{e-bdown-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #f8d94c /*{e-bdown-background-start}*/, #fadb4e /*{e-bdown-background-end}*/);
+}
+.ui-btn-down-e a.ui-link-inherit {
+       color:                                  #333 /*{e-bdown-color}*/;
+}
+.ui-btn-up-e,
+.ui-btn-hover-e,
+.ui-btn-down-e {
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+       text-decoration: none;
+}
+/* Structure */
+/* links within "buttons" 
+-----------------------------------------------------------------------------------------------------------*/
+a.ui-link-inherit {
+       text-decoration: none !important;
+}
+/* Active class used as the "on" state across all themes
+-----------------------------------------------------------------------------------------------------------*/
+.ui-btn-active {
+       border: 1px solid               #2373a5 /*{global-active-border}*/;
+       background:                     #5393c5 /*{global-active-background-color}*/;
+       font-weight: bold;
+       color:                                  #fff /*{global-active-color}*/;
+       cursor: pointer;
+       text-shadow: 0 /*{global-active-shadow-x}*/ 1px /*{global-active-shadow-y}*/ 1px /*{global-active-shadow-radius}*/ #3373a5 /*{global-active-shadow-color}*/;
+       text-decoration: none;
+       background-image: -webkit-gradient(linear, left top, left bottom, from( #5393c5 /*{global-active-background-start}*/), to( #6facd5 /*{global-active-background-end}*/)); /* Saf4+, Chrome */
+       background-image: -webkit-linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); /* Chrome 10+, Saf5.1+ */
+       background-image:    -moz-linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); /* FF3.6 */
+       background-image:     -ms-linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); /* IE10 */
+       background-image:      -o-linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/); /* Opera 11.10+ */
+       background-image:         linear-gradient( #5393c5 /*{global-active-background-start}*/, #6facd5 /*{global-active-background-end}*/);
+       font-family: Helvetica, Arial, sans-serif /*{global-font-family}*/;
+}
+.ui-btn-active a.ui-link-inherit {
+       color:                                  #fff /*{global-active-color}*/;
+}
+/* button inner top highlight
+-----------------------------------------------------------------------------------------------------------*/
+.ui-btn-inner {
+       border-top: 1px solid   #fff;
+       border-color:                   rgba(255,255,255,.3);
+}
+/* corner rounding classes
+-----------------------------------------------------------------------------------------------------------*/
+.ui-corner-tl {
+       -moz-border-radius-topleft:             .6em /*{global-radii-blocks}*/;
+       -webkit-border-top-left-radius:         .6em /*{global-radii-blocks}*/;
+       border-top-left-radius:                         .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-tr {
+       -moz-border-radius-topright:            .6em /*{global-radii-blocks}*/;
+       -webkit-border-top-right-radius:        .6em /*{global-radii-blocks}*/;
+       border-top-right-radius:                        .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-bl {
+       -moz-border-radius-bottomleft:          .6em /*{global-radii-blocks}*/;
+       -webkit-border-bottom-left-radius:      .6em /*{global-radii-blocks}*/;
+       border-bottom-left-radius:                      .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-br {
+       -moz-border-radius-bottomright:         .6em /*{global-radii-blocks}*/;
+       -webkit-border-bottom-right-radius: .6em /*{global-radii-blocks}*/;
+       border-bottom-right-radius:             .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-top {
+       -moz-border-radius-topleft:             .6em /*{global-radii-blocks}*/;
+       -webkit-border-top-left-radius:         .6em /*{global-radii-blocks}*/;
+       border-top-left-radius:                         .6em /*{global-radii-blocks}*/;
+       -moz-border-radius-topright:            .6em /*{global-radii-blocks}*/;
+       -webkit-border-top-right-radius:        .6em /*{global-radii-blocks}*/;
+       border-top-right-radius:                        .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-bottom {
+       -moz-border-radius-bottomleft:          .6em /*{global-radii-blocks}*/;
+       -webkit-border-bottom-left-radius:      .6em /*{global-radii-blocks}*/;
+       border-bottom-left-radius:                      .6em /*{global-radii-blocks}*/;
+       -moz-border-radius-bottomright:         .6em /*{global-radii-blocks}*/;
+       -webkit-border-bottom-right-radius: .6em /*{global-radii-blocks}*/;
+       border-bottom-right-radius:             .6em /*{global-radii-blocks}*/;
+       }
+.ui-corner-right {
+       -moz-border-radius-topright:            .6em /*{global-radii-blocks}*/;
+       -webkit-border-top-right-radius:        .6em /*{global-radii-blocks}*/;
+       border-top-right-radius:                        .6em /*{global-radii-blocks}*/;
+       -moz-border-radius-bottomright:         .6em /*{global-radii-blocks}*/;
+       -webkit-border-bottom-right-radius: .6em /*{global-radii-blocks}*/;
+       border-bottom-right-radius:             .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-left {
+       -moz-border-radius-topleft:             .6em /*{global-radii-blocks}*/;
+       -webkit-border-top-left-radius:         .6em /*{global-radii-blocks}*/;
+       border-top-left-radius:                         .6em /*{global-radii-blocks}*/;
+       -moz-border-radius-bottomleft:          .6em /*{global-radii-blocks}*/;
+       -webkit-border-bottom-left-radius:      .6em /*{global-radii-blocks}*/;
+       border-bottom-left-radius:                      .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-all {
+       -moz-border-radius:                             .6em /*{global-radii-blocks}*/;
+       -webkit-border-radius:                          .6em /*{global-radii-blocks}*/;
+       border-radius:                                          .6em /*{global-radii-blocks}*/;
+}
+.ui-corner-none {
+       -moz-border-radius:                                0;
+       -webkit-border-radius:                             0;
+       border-radius:                                             0;
+}
+/* Form field separator
+-----------------------------------------------------------------------------------------------------------*/
+.ui-br {
+       border-bottom: rgb(130,130,130);
+       border-bottom: rgba(130,130,130,.3);
+       border-bottom-width: 1px;
+       border-bottom-style: solid;
+}
+/* Interaction cues
+-----------------------------------------------------------------------------------------------------------*/
+.ui-disabled {
+       opacity:                                                        .3;
+}
+.ui-disabled,
+.ui-disabled a {
+       cursor: default !important;
+       pointer-events: none;
+}
+.ui-disabled .ui-btn-text {
+       -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=30)";
+       filter: alpha(opacity=30);
+       zoom: 1;
+}
+/* Icons
+-----------------------------------------------------------------------------------------------------------*/
+.ui-icon,
+.ui-icon-searchfield:after {
+       background:                                             #666 /*{global-icon-color}*/;
+       background:                                             rgba(0,0,0,.4) /*{global-icon-disc}*/;
+       background-image: url(images/icons-18-white.png) /*{global-icon-set}*/;
+       background-repeat: no-repeat;
+       -moz-border-radius:                             9px;
+       -webkit-border-radius:                          9px;
+       border-radius:                                          9px;
+}
+/* Alt icon color
+-----------------------------------------------------------------------------------------------------------*/
+.ui-icon-alt {
+       background:                                             #fff;
+       background:                                             rgba(255,255,255,.3);
+       background-image: url(images/icons-18-black.png);
+       background-repeat: no-repeat;
+}
+/* HD/"retina" sprite
+-----------------------------------------------------------------------------------------------------------*/
+@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
+       only screen and (min--moz-device-pixel-ratio: 1.5),
+       only screen and (min-resolution: 240dpi) {
+       
+       .ui-icon-plus, .ui-icon-minus, .ui-icon-delete, .ui-icon-arrow-r,
+       .ui-icon-arrow-l, .ui-icon-arrow-u, .ui-icon-arrow-d, .ui-icon-check,
+       .ui-icon-gear, .ui-icon-refresh, .ui-icon-forward, .ui-icon-back,
+       .ui-icon-grid, .ui-icon-star, .ui-icon-alert, .ui-icon-info, .ui-icon-home, .ui-icon-search, .ui-icon-searchfield:after, 
+       .ui-icon-checkbox-off, .ui-icon-checkbox-on, .ui-icon-radio-off, .ui-icon-radio-on {
+               background-image: url(images/icons-36-white.png);
+               -moz-background-size: 776px 18px;
+               -o-background-size: 776px 18px;
+               -webkit-background-size: 776px 18px;
+               background-size: 776px 18px;
+       }
+       .ui-icon-alt {
+               background-image: url(images/icons-36-black.png);
+       }
+}
+/* plus minus */
+.ui-icon-plus {
+       background-position:    -0 50%;
+}
+.ui-icon-minus {
+       background-position:    -36px 50%;
+}
+/* delete/close */
+.ui-icon-delete {
+       background-position:    -72px 50%;
+}
+/* arrows */
+.ui-icon-arrow-r {
+       background-position:    -108px 50%;
+}
+.ui-icon-arrow-l {
+       background-position:    -144px 50%;
+}
+.ui-icon-arrow-u {
+       background-position:    -180px 50%;
+}
+.ui-icon-arrow-d {
+       background-position:    -216px 50%;
+}
+/* misc */
+.ui-icon-check {
+       background-position:    -252px 50%;
+}
+.ui-icon-gear {
+       background-position:    -288px 50%;
+}
+.ui-icon-refresh {
+       background-position:    -324px 50%;
+}
+.ui-icon-forward {
+       background-position:    -360px 50%;
+}
+.ui-icon-back {
+       background-position:    -396px 50%;
+}
+.ui-icon-grid {
+       background-position:    -432px 50%;
+}
+.ui-icon-star {
+       background-position:    -468px 50%;
+}
+.ui-icon-alert {
+       background-position:    -504px 50%;
+}
+.ui-icon-info {
+       background-position:    -540px 50%;
+}
+.ui-icon-home {
+       background-position:    -576px 50%;
+}
+.ui-icon-search,
+.ui-icon-searchfield:after {
+       background-position:    -612px 50%;
+}
+.ui-icon-checkbox-off {
+       background-position:    -684px 50%;
+}
+.ui-icon-checkbox-on {
+       background-position:    -648px 50%;
+}
+.ui-icon-radio-off {
+       background-position:    -756px 50%;
+}
+.ui-icon-radio-on {
+       background-position:    -720px 50%;
+}
+/* checks,radios */
+.ui-checkbox .ui-icon {
+       -moz-border-radius: 3px;
+       -webkit-border-radius: 3px;
+       border-radius: 3px;
+}
+.ui-icon-checkbox-off,
+.ui-icon-radio-off {
+       background-color: transparent;  
+}
+.ui-checkbox-on .ui-icon,
+.ui-radio-on .ui-icon {
+       background-color: #4596ce /*{global-active-background-color}*/; /* NOTE: this hex should match the active state color. It's repeated here for cascade */
+}
+/* loading icon */
+.ui-icon-loading {
+       background: url(images/ajax-loader.gif);
+       background-size: 46px 46px;
+}
+/* Button corner classes
+-----------------------------------------------------------------------------------------------------------*/
+.ui-btn-corner-tl {
+       -moz-border-radius-topleft:             1em /*{global-radii-buttons}*/;
+       -webkit-border-top-left-radius:         1em /*{global-radii-buttons}*/;
+       border-top-left-radius:                         1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-tr {
+       -moz-border-radius-topright:            1em /*{global-radii-buttons}*/;
+       -webkit-border-top-right-radius:        1em /*{global-radii-buttons}*/;
+       border-top-right-radius:                        1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-bl {
+       -moz-border-radius-bottomleft:          1em /*{global-radii-buttons}*/;
+       -webkit-border-bottom-left-radius:      1em /*{global-radii-buttons}*/;
+       border-bottom-left-radius:                      1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-br {
+       -moz-border-radius-bottomright:         1em /*{global-radii-buttons}*/;
+       -webkit-border-bottom-right-radius: 1em /*{global-radii-buttons}*/;
+       border-bottom-right-radius:             1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-top {
+       -moz-border-radius-topleft:             1em /*{global-radii-buttons}*/;
+       -webkit-border-top-left-radius:         1em /*{global-radii-buttons}*/;
+       border-top-left-radius:                         1em /*{global-radii-buttons}*/;
+       -moz-border-radius-topright:            1em /*{global-radii-buttons}*/;
+       -webkit-border-top-right-radius:        1em /*{global-radii-buttons}*/;
+       border-top-right-radius:                        1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-bottom {
+       -moz-border-radius-bottomleft:          1em /*{global-radii-buttons}*/;
+       -webkit-border-bottom-left-radius:      1em /*{global-radii-buttons}*/;
+       border-bottom-left-radius:                      1em /*{global-radii-buttons}*/;
+       -moz-border-radius-bottomright:         1em /*{global-radii-buttons}*/;
+       -webkit-border-bottom-right-radius: 1em /*{global-radii-buttons}*/;
+       border-bottom-right-radius:             1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-right {
+        -moz-border-radius-topright:           1em /*{global-radii-buttons}*/;
+       -webkit-border-top-right-radius:        1em /*{global-radii-buttons}*/;
+       border-top-right-radius:                        1em /*{global-radii-buttons}*/;
+       -moz-border-radius-bottomright:         1em /*{global-radii-buttons}*/;
+       -webkit-border-bottom-right-radius: 1em /*{global-radii-buttons}*/;
+       border-bottom-right-radius:             1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-left {
+       -moz-border-radius-topleft:             1em /*{global-radii-buttons}*/;
+       -webkit-border-top-left-radius:         1em /*{global-radii-buttons}*/;
+       border-top-left-radius:                         1em /*{global-radii-buttons}*/;
+       -moz-border-radius-bottomleft:          1em /*{global-radii-buttons}*/;
+       -webkit-border-bottom-left-radius:      1em /*{global-radii-buttons}*/;
+       border-bottom-left-radius:                      1em /*{global-radii-buttons}*/;
+}
+.ui-btn-corner-all {
+       -moz-border-radius:                             1em /*{global-radii-buttons}*/;
+       -webkit-border-radius:                          1em /*{global-radii-buttons}*/;
+       border-radius:                                          1em /*{global-radii-buttons}*/;
+}
+/* radius clip workaround for cleaning up corner trapping */
+.ui-corner-tl,
+.ui-corner-tr,
+.ui-corner-bl, 
+.ui-corner-br,
+.ui-corner-top,
+.ui-corner-bottom, 
+.ui-corner-right,
+.ui-corner-left,
+.ui-corner-all,
+.ui-btn-corner-tl,
+.ui-btn-corner-tr,
+.ui-btn-corner-bl, 
+.ui-btn-corner-br,
+.ui-btn-corner-top,
+.ui-btn-corner-bottom, 
+.ui-btn-corner-right,
+.ui-btn-corner-left,
+.ui-btn-corner-all {
+  -webkit-background-clip: padding-box;
+     -moz-background-clip: padding;
+          background-clip: padding-box;
+}
+/* Overlay / modal
+-----------------------------------------------------------------------------------------------------------*/
+.ui-overlay {
+       background: #666;
+       opacity: .5;
+       filter: Alpha(Opacity=50);
+       position: absolute;
+       width: 100%;
+       height: 100%;
+}
+.ui-overlay-shadow {
+       -moz-box-shadow: 0px 0px 12px                   rgba(0,0,0,.6);
+       -webkit-box-shadow: 0px 0px 12px                rgba(0,0,0,.6);
+       box-shadow: 0px 0px 12px                                rgba(0,0,0,.6);
+}
+.ui-shadow {
+       -moz-box-shadow: 0px 1px 4px /*{global-box-shadow-size}*/                       rgba(0,0,0,.3) /*{global-box-shadow-color}*/;
+       -webkit-box-shadow: 0px 1px 4px /*{global-box-shadow-size}*/            rgba(0,0,0,.3) /*{global-box-shadow-color}*/;
+       box-shadow: 0px 1px 4px /*{global-box-shadow-size}*/                            rgba(0,0,0,.3) /*{global-box-shadow-color}*/;
+}
+.ui-bar-a .ui-shadow,
+.ui-bar-b .ui-shadow ,
+.ui-bar-c .ui-shadow  {
+       -moz-box-shadow: 0px 1px 0                              rgba(255,255,255,.3);
+       -webkit-box-shadow: 0px 1px 0                   rgba(255,255,255,.3);
+       box-shadow: 0px 1px 0                                   rgba(255,255,255,.3);
+}
+.ui-shadow-inset {
+       -moz-box-shadow: inset 0px 1px 4px              rgba(0,0,0,.2);
+       -webkit-box-shadow: inset 0px 1px 4px   rgba(0,0,0,.2);
+       box-shadow: inset 0px 1px 4px                   rgba(0,0,0,.2);
+}
+.ui-icon-shadow {
+       -moz-box-shadow: 0px 1px 0                              rgba(255,255,255,.4) /*{global-icon-shadow}*/;
+       -webkit-box-shadow: 0px 1px 0                   rgba(255,255,255,.4) /*{global-icon-shadow}*/;
+       box-shadow: 0px 1px 0                                   rgba(255,255,255,.4) /*{global-icon-shadow}*/;
+}
+/* Focus state - set here for specificity (note: these classes are added by JavaScript)
+-----------------------------------------------------------------------------------------------------------*/
+.ui-btn:focus {
+       outline: 0;
+}
+.ui-focus,
+.ui-btn:focus {
+       -moz-box-shadow: 0px 0px 12px           #387bbe /*{global-active-background-color}*/;
+       -webkit-box-shadow: 0px 0px 12px        #387bbe /*{global-active-background-color}*/;
+       box-shadow: 0px 0px 12px                        #387bbe /*{global-active-background-color}*/;
+}
+/* unset box shadow in browsers that don't do it right
+-----------------------------------------------------------------------------------------------------------*/
+.ui-mobile-nosupport-boxshadow * {
+       -moz-box-shadow: none !important;
+       -webkit-box-shadow: none !important;
+       box-shadow: none !important;
+}
+/* ...and bring back focus */
+.ui-mobile-nosupport-boxshadow .ui-focus,
+.ui-mobile-nosupport-boxshadow .ui-btn:focus {
+       outline-width: 1px;
+       outline-style: dotted;
+}
+/* some unsets - more probably needed */
+.ui-mobile, .ui-mobile body { height: 99.9%; }
+.ui-mobile fieldset, .ui-page { padding: 0; margin: 0; }
+.ui-mobile a img, .ui-mobile fieldset { border-width: 0; }
+/* responsive page widths */
+.ui-mobile-viewport {  margin: 0; overflow-x: visible; -webkit-text-size-adjust: none; -ms-text-size-adjust:none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
+/* Issue #2066 */
+body.ui-mobile-viewport,
+div.ui-mobile-viewport { overflow-x: hidden; }
+/* "page" containers - full-screen views, one should always be in view post-pageload */
+.ui-mobile [data-role=page], .ui-mobile [data-role=dialog], .ui-page { top: 0; left: 0; width: 100%; min-height: 100%; position: absolute; display: none; border: 0; }
+.ui-mobile .ui-page-active { display: block; overflow: visible; }
+/* on ios4, setting focus on the page element causes flashing during transitions when there is an outline, so we turn off outlines */
+.ui-page { outline: none; }
+/*orientations from js are available */
+@media screen and (orientation: portrait){
+.ui-mobile, .ui-mobile .ui-page { min-height: 420px; }
+}
+@media screen and (orientation: landscape){
+.ui-mobile, .ui-mobile .ui-page { min-height: 300px; }
+}
+/* loading screen */
+.ui-loading .ui-loader { display: block; }
+.ui-loader { display: none; z-index: 9999999; position: fixed; top: 50%; box-shadow: 0 1px 1px -1px #fff; left: 50%; border:0; }
+.ui-loader-default { background: none; opacity: .18; width: 46px; height: 46px; margin-left: -23px; margin-top: -23px; }
+.ui-loader-verbose { width: 200px; opacity: .88; height: auto; margin-left: -110px; margin-top: -43px; padding: 10px; }
+.ui-loader-default h1 { font-size: 0; width: 0; height: 0; overflow: hidden; }
+.ui-loader-verbose h1 { font-size: 16px; margin: 0; text-align: center; }
+.ui-loader .ui-icon { background-color: #000; display: block; margin: 0; width: 44px; height: 44px; padding: 1px; -webkit-border-radius: 36px; -moz-border-radius: 36px; border-radius: 36px; }
+.ui-loader-verbose .ui-icon { margin: 0 auto 10px; opacity: .75; }
+.ui-loader-textonly { padding: 15px; margin-left: -115px;  }
+.ui-loader-textonly .ui-icon { display: none; }
+.ui-loader-fakefix { position: absolute; }
+/*fouc*/
+.ui-mobile-rendering > * { visibility: hidden; }
+/*headers, content panels*/
+.ui-bar, .ui-body { position: relative; padding: .4em 15px;  overflow: hidden; display: block;  clear:both;  }
+.ui-bar { font-size: 16px; margin: 0; }
+.ui-bar h1, .ui-bar h2, .ui-bar h3, .ui-bar h4, .ui-bar h5, .ui-bar h6 { margin: 0; padding: 0; font-size: 16px; display: inline-block; }
+.ui-header, .ui-footer { position: relative; border-left-width: 0; border-right-width: 0; }
+.ui-header .ui-btn-left,
+.ui-header .ui-btn-right,
+.ui-footer .ui-btn-left,
+.ui-footer .ui-btn-right { position: absolute; top: 3px; }
+.ui-header .ui-btn-left,
+.ui-footer .ui-btn-left { left: 5px; }
+.ui-header .ui-btn-right,
+.ui-footer .ui-btn-right { right: 5px; }
+.ui-footer .ui-btn-icon-notext,
+.ui-header .ui-btn-icon-notext { top: 6px; }
+.ui-header .ui-title, .ui-footer .ui-title { min-height: 1.1em; text-align: center; font-size: 16px; display: block; margin: .6em 30% .8em;  padding: 0;  text-overflow: ellipsis; overflow: hidden; white-space: nowrap; outline: 0 !important; }
+.ui-footer .ui-title { margin: .6em 15px .8em;  }
+/*content area*/
+.ui-content { border-width: 0; overflow: visible; overflow-x: hidden; padding: 15px; }
+/* icons sizing */
+.ui-icon { width: 18px; height: 18px; }
+/* non-js content hiding */
+.ui-nojs { position: absolute; left: -9999px; }
+/* accessible content hiding */
+.ui-hide-label label,
+.ui-hidden-accessible { position: absolute !important; left: -9999px; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
+/* Transitions originally inspired by those from jQtouch, nice work, folks */
+.ui-mobile-viewport-transitioning,
+.ui-mobile-viewport-transitioning .ui-page {
+       width: 100%;
+       height: 100%;
+       overflow: hidden;
+}
+.in {
+       -webkit-animation-timing-function: ease-out;
+       -webkit-animation-duration: 350ms;
+       -moz-animation-timing-function: ease-out;
+       -moz-animation-duration: 350ms;
+}
+.out {
+       -webkit-animation-timing-function: ease-in;
+       -webkit-animation-duration: 225ms;
+       -moz-animation-timing-function: ease-in;
+       -moz-animation-duration: 225;
+}
+@-webkit-keyframes fadein {
+    from { opacity: 0; }
+    to { opacity: 1; }
+}
+@-moz-keyframes fadein {
+    from { opacity: 0; }
+    to { opacity: 1; }
+}
+@-webkit-keyframes fadeout {
+    from { opacity: 1; }
+    to { opacity: 0; }
+}
+@-moz-keyframes fadeout {
+    from { opacity: 1; }
+    to { opacity: 0; }
+}
+.fade.out {
+       opacity: 0;
+       -webkit-animation-duration: 125ms;
+       -webkit-animation-name: fadeout;
+       -moz-animation-duration: 125ms;
+       -moz-animation-name: fadeout;
+}
+.fade.in {
+       opacity: 1;
+       -webkit-animation-duration: 225ms;
+       -webkit-animation-name: fadein;
+       -moz-animation-duration: 225ms;
+       -moz-animation-name: fadein;
+}
+.pop {
+       -webkit-transform-origin: 50% 50%;
+       -moz-transform-origin: 50% 50%;
+}
+.pop.in {
+       -webkit-transform: scale(1);
+       -moz-transform: scale(1);
+    opacity: 1;
+       -webkit-animation-name: popin;
+       -moz-animation-name: popin;
+       -webkit-animation-duration: 350ms;
+       -moz-animation-duration: 350ms;
+}
+.pop.out {
+       -webkit-animation-name: fadeout;
+       -moz-animation-name: fadeout;
+       opacity: 0;
+       -webkit-animation-duration: 100ms;
+       -moz-animation-duration: 100ms;
+}
+.pop.in.reverse {
+       -webkit-animation-name: fadein;
+       -moz-animation-name: fadein;
+}
+.pop.out.reverse {
+       -webkit-transform: scale(.8);
+       -moz-transform: scale(.8);
+       -webkit-animation-name: popout;
+       -moz-animation-name: popout;
+}
+@-webkit-keyframes popin {
+    from {
+        -webkit-transform: scale(.8);
+        opacity: 0;
+    }
+    to {
+        -webkit-transform: scale(1);
+        opacity: 1;
+    }
+}
+@-moz-keyframes popin {
+    from {
+        -moz-transform: scale(.8);
+        opacity: 0;
+    }
+    to {
+        -moz-transform: scale(1);
+        opacity: 1;
+    }
+}
+@-webkit-keyframes popout {
+    from {
+        -webkit-transform: scale(1);
+        opacity: 1;
+    }
+    to {
+        -webkit-transform: scale(.8);
+        opacity: 0;
+    }
+}
+@-moz-keyframes popout {
+    from {
+        -moz-transform: scale(1);
+        opacity: 1;
+    }
+    to {
+        -moz-transform: scale(.8);
+        opacity: 0;
+    }
+}
+/* keyframes for slidein from sides */
+@-webkit-keyframes slideinfromright {
+    from { -webkit-transform: translateX(100%); }
+    to { -webkit-transform: translateX(0); }
+}
+@-moz-keyframes slideinfromright {
+    from { -moz-transform: translateX(100%); }
+    to { -moz-transform: translateX(0); }
+}
+@-webkit-keyframes slideinfromleft {
+    from { -webkit-transform: translateX(-100%); }
+    to { -webkit-transform: translateX(0); }
+}
+@-moz-keyframes slideinfromleft {
+    from { -moz-transform: translateX(-100%); }
+    to { -moz-transform: translateX(0); }
+}
+/* keyframes for slideout to sides */
+@-webkit-keyframes slideouttoleft {
+    from { -webkit-transform: translateX(0); }
+    to { -webkit-transform: translateX(-100%); }
+}
+@-moz-keyframes slideouttoleft {
+    from { -moz-transform: translateX(0); }
+    to { -moz-transform: translateX(-100%); }
+}
+@-webkit-keyframes slideouttoright {
+    from { -webkit-transform: translateX(0); }
+    to { -webkit-transform: translateX(100%); }
+}
+@-moz-keyframes slideouttoright {
+    from { -moz-transform: translateX(0); }
+    to { -moz-transform: translateX(100%); }
+}
+.slide.out, .slide.in {
+       -webkit-animation-timing-function: ease-out;
+       -webkit-animation-duration: 350ms;
+       -moz-animation-timing-function: ease-out;
+       -moz-animation-duration: 350ms;
+}
+.slide.out {
+       -webkit-transform: translateX(-100%);
+       -webkit-animation-name: slideouttoleft;
+       -moz-transform: translateX(-100%);
+       -moz-animation-name: slideouttoleft;
+}
+.slide.in {
+       -webkit-transform: translateX(0);
+       -webkit-animation-name: slideinfromright;
+       -moz-transform: translateX(0);
+       -moz-animation-name: slideinfromright;
+}
+.slide.out.reverse {
+       -webkit-transform: translateX(100%);
+       -webkit-animation-name: slideouttoright;
+       -moz-transform: translateX(100%);
+       -moz-animation-name: slideouttoright;
+}
+.slide.in.reverse {
+       -webkit-transform: translateX(0);
+       -webkit-animation-name: slideinfromleft;
+       -moz-transform: translateX(0);
+       -moz-animation-name: slideinfromleft;
+}
+.slidefade.out {
+       -webkit-transform: translateX(-100%);
+       -webkit-animation-name: slideouttoleft;
+       -moz-transform: translateX(-100%);
+       -moz-animation-name: slideouttoleft;
+       -webkit-animation-duration: 225ms;
+       -moz-animation-duration: 225ms;
+}
+.slidefade.in {
+       -webkit-transform: translateX(0);
+       -webkit-animation-name: fadein;
+       -moz-transform: translateX(0);
+       -moz-animation-name: fadein;
+       -webkit-animation-duration: 200ms;
+       -moz-animation-duration: 200ms;
+}
+.slidefade.out.reverse {
+       -webkit-transform: translateX(100%);
+       -webkit-animation-name: slideouttoright;
+       -moz-transform: translateX(100%);
+       -moz-animation-name: slideouttoright;
+       -webkit-animation-duration: 200ms;
+       -moz-animation-duration: 200ms;
+}
+.slidefade.in.reverse {
+       -webkit-transform: translateX(0);
+       -webkit-animation-name: fadein;
+       -moz-transform: translateX(0);
+       -moz-animation-name: fadein;
+       -webkit-animation-duration: 200ms;
+       -moz-animation-duration: 200ms;
+}
+/* slide down */
+.slidedown.out {
+       -webkit-animation-name: fadeout;
+       -moz-animation-name: fadeout;
+       -webkit-animation-duration: 100ms;
+       -moz-animation-duration: 100ms;
+}
+.slidedown.in {
+       -webkit-transform: translateY(0);
+       -webkit-animation-name: slideinfromtop;
+       -moz-transform: translateY(0);
+       -moz-animation-name: slideinfromtop;
+       -webkit-animation-duration: 250ms;
+       -moz-animation-duration: 250ms;
+}
+.slidedown.in.reverse {
+       -webkit-animation-name: fadein;
+       -moz-animation-name: fadein;
+       -webkit-animation-duration: 150ms;
+       -moz-animation-duration: 150ms;
+}
+.slidedown.out.reverse {
+       -webkit-transform: translateY(-100%);
+       -moz-transform: translateY(-100%);
+       -webkit-animation-name: slideouttotop;
+       -moz-animation-name: slideouttotop;
+       -webkit-animation-duration: 200ms;
+       -moz-animation-duration: 200ms;
+}
+@-webkit-keyframes slideinfromtop {
+    from { -webkit-transform: translateY(-100%); }
+    to { -webkit-transform: translateY(0); }
+}
+@-moz-keyframes slideinfromtop {
+    from { -moz-transform: translateY(-100%); }
+    to { -moz-transform: translateY(0); }
+}
+@-webkit-keyframes slideouttotop {
+    from { -webkit-transform: translateY(0); }
+    to { -webkit-transform: translateY(-100%); }
+}
+@-moz-keyframes slideouttotop {
+    from { -moz-transform: translateY(0); }
+    to { -moz-transform: translateY(-100%); }
+}
+/* slide up */
+.slideup.out {
+       -webkit-animation-name: fadeout;
+       -moz-animation-name: fadeout;
+       -webkit-animation-duration: 100ms;
+       -moz-animation-duration: 100ms;
+}
+.slideup.in {
+       -webkit-transform: translateY(0);
+       -webkit-animation-name: slideinfrombottom;
+       -moz-transform: translateY(0);
+       -moz-animation-name: slideinfrombottom;
+       -webkit-animation-duration: 250ms;
+       -moz-animation-duration: 250ms;
+}
+.slideup.in.reverse {
+       -webkit-animation-name: fadein;
+       -moz-animation-name: fadein;
+       -webkit-animation-duration: 150ms;
+       -moz-animation-duration: 150ms;
+}
+.slideup.out.reverse {
+       -webkit-transform: translateY(100%);
+       -moz-transform: translateY(100%);
+       -webkit-animation-name: slideouttobottom;
+       -moz-animation-name: slideouttobottom;
+       -webkit-animation-duration: 200ms;
+       -moz-animation-duration: 200ms;
+}
+@-webkit-keyframes slideinfrombottom {
+    from { -webkit-transform: translateY(100%); }
+    to { -webkit-transform: translateY(0); }
+}
+@-moz-keyframes slideinfrombottom {
+    from { -moz-transform: translateY(100%); }
+    to { -moz-transform: translateY(0); }
+}
+@-webkit-keyframes slideouttobottom {
+    from { -webkit-transform: translateY(0); }
+    to { -webkit-transform: translateY(100%); }
+}
+@-moz-keyframes slideouttobottom {
+    from { -moz-transform: translateY(0); }
+    to { -moz-transform: translateY(100%); }
+}
+/* The properties in this rule are only necessary for the 'flip' transition.
+ * We need specify the perspective to create a projection matrix. This will add
+ * some depth as the element flips. The depth number represents the distance of
+ * the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate
+ * value.
+ */
+.viewport-flip {
+       -webkit-perspective: 1000;
+       -moz-perspective: 1000;
+       position: absolute;
+}
+.flip {
+       -webkit-backface-visibility:hidden;
+       -webkit-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */
+       -moz-backface-visibility:hidden;
+       -moz-transform:translateX(0);
+}
+.flip.out {
+       -webkit-transform: rotateY(-90deg) scale(.9);
+       -webkit-animation-name: flipouttoleft;
+       -webkit-animation-duration: 175ms;
+       -moz-transform: rotateY(-90deg) scale(.9);
+       -moz-animation-name: flipouttoleft;
+       -moz-animation-duration: 175ms;
+}
+.flip.in {
+       -webkit-animation-name: flipintoright;
+       -webkit-animation-duration: 225ms;
+       -moz-animation-name: flipintoright;
+       -moz-animation-duration: 225ms;
+}
+.flip.out.reverse {
+       -webkit-transform: rotateY(90deg) scale(.9);
+       -webkit-animation-name: flipouttoright;
+       -moz-transform: rotateY(90deg) scale(.9);
+       -moz-animation-name: flipouttoright;
+}
+.flip.in.reverse {
+       -webkit-animation-name: flipintoleft;
+       -moz-animation-name: flipintoleft;
+}
+@-webkit-keyframes flipouttoleft {
+    from { -webkit-transform: rotateY(0); }
+    to { -webkit-transform: rotateY(-90deg) scale(.9); }
+}
+@-moz-keyframes flipouttoleft {
+    from { -moz-transform: rotateY(0); }
+    to { -moz-transform: rotateY(-90deg) scale(.9); }
+}
+@-webkit-keyframes flipouttoright {
+    from { -webkit-transform: rotateY(0) ; }
+    to { -webkit-transform: rotateY(90deg) scale(.9); }
+}
+@-moz-keyframes flipouttoright {
+    from { -moz-transform: rotateY(0); }
+    to { -moz-transform: rotateY(90deg) scale(.9); }
+}
+@-webkit-keyframes flipintoleft {
+    from { -webkit-transform: rotateY(-90deg) scale(.9); }
+    to { -webkit-transform: rotateY(0); }
+}
+@-moz-keyframes flipintoleft {
+    from { -moz-transform: rotateY(-90deg) scale(.9); }
+    to { -moz-transform: rotateY(0); }
+}
+@-webkit-keyframes flipintoright {
+    from { -webkit-transform: rotateY(90deg) scale(.9); }
+    to { -webkit-transform: rotateY(0); }
+}
+@-moz-keyframes flipintoright {
+    from { -moz-transform: rotateY(90deg) scale(.9); }
+    to { -moz-transform: rotateY(0); }
+}
+/* The properties in this rule are only necessary for the 'flip' transition.
+ * We need specify the perspective to create a projection matrix. This will add
+ * some depth as the element flips. The depth number represents the distance of
+ * the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate
+ * value.
+ */
+.viewport-turn {
+       -webkit-perspective: 1000;
+       -moz-perspective: 1000;
+       position: absolute;
+}
+.turn {
+       -webkit-backface-visibility:hidden;
+       -webkit-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */
+       -webkit-transform-origin: 0;
+       
+       -moz-backface-visibility:hidden;
+       -moz-transform:translateX(0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */
+       -moz-transform-origin: 0;
+}
+.turn.out {
+       -webkit-transform: rotateY(-90deg) scale(.9);
+       -webkit-animation-name: flipouttoleft;
+       -moz-transform: rotateY(-90deg) scale(.9);
+       -moz-animation-name: flipouttoleft;
+       -webkit-animation-duration: 125ms;
+       -moz-animation-duration: 125ms;
+}
+.turn.in {
+       -webkit-animation-name: flipintoright;
+       -moz-animation-name: flipintoright;
+       -webkit-animation-duration: 250ms;
+       -moz-animation-duration: 250ms;
+       
+}
+.turn.out.reverse {
+       -webkit-transform: rotateY(90deg) scale(.9);
+       -webkit-animation-name: flipouttoright;
+       -moz-transform: rotateY(90deg) scale(.9);
+       -moz-animation-name: flipouttoright;
+}
+.turn.in.reverse {
+       -webkit-animation-name: flipintoleft;
+       -moz-animation-name: flipintoleft;
+}
+@-webkit-keyframes flipouttoleft {
+    from { -webkit-transform: rotateY(0); }
+    to { -webkit-transform: rotateY(-90deg) scale(.9); }
+}
+@-moz-keyframes flipouttoleft {
+    from { -moz-transform: rotateY(0); }
+    to { -moz-transform: rotateY(-90deg) scale(.9); }
+}
+@-webkit-keyframes flipouttoright {
+    from { -webkit-transform: rotateY(0) ; }
+    to { -webkit-transform: rotateY(90deg) scale(.9); }
+}
+@-moz-keyframes flipouttoright {
+    from { -moz-transform: rotateY(0); }
+    to { -moz-transform: rotateY(90deg) scale(.9); }
+}
+@-webkit-keyframes flipintoleft {
+    from { -webkit-transform: rotateY(-90deg) scale(.9); }
+    to { -webkit-transform: rotateY(0); }
+}
+@-moz-keyframes flipintoleft {
+    from { -moz-transform: rotateY(-90deg) scale(.9); }
+    to { -moz-transform: rotateY(0); }
+}
+@-webkit-keyframes flipintoright {
+    from { -webkit-transform: rotateY(90deg) scale(.9); }
+    to { -webkit-transform: rotateY(0); }
+}
+@-moz-keyframes flipintoright {
+    from { -moz-transform: rotateY(90deg) scale(.9); }
+    to { -moz-transform: rotateY(0); }
+}
+/* flow transition */
+.flow {
+       -webkit-transform-origin: 50% 30%;
+       -moz-transform-origin: 50% 30%; 
+       -webkit-box-shadow: 0 0 20px rgba(0,0,0,.4);
+       -moz-box-shadow: 0 0 20px rgba(0,0,0,.4);
+}
+.ui-dialog.flow {
+       -webkit-transform-origin: none;
+       -moz-transform-origin: none;    
+       -webkit-box-shadow: none;
+       -moz-box-shadow: none;
+}
+.flow.out {
+       -webkit-transform: translateX(-100%) scale(.7);
+       -webkit-animation-name: flowouttoleft;
+       -webkit-animation-timing-function: ease;
+       -webkit-animation-duration: 350ms;
+       -moz-transform: translateX(-100%) scale(.7);
+       -moz-animation-name: flowouttoleft;
+       -moz-animation-timing-function: ease;
+       -moz-animation-duration: 350ms;
+}
+.flow.in {
+       -webkit-transform: translateX(0) scale(1);
+       -webkit-animation-name: flowinfromright;
+       -webkit-animation-timing-function: ease;
+       -webkit-animation-duration: 350ms;
+       -moz-transform: translateX(0) scale(1);
+       -moz-animation-name: flowinfromright;
+       -moz-animation-timing-function: ease;
+       -moz-animation-duration: 350ms;
+}
+.flow.out.reverse {
+       -webkit-transform: translateX(100%);
+       -webkit-animation-name: flowouttoright;
+       -moz-transform: translateX(100%);
+       -moz-animation-name: flowouttoright;
+}
+.flow.in.reverse {
+       -webkit-animation-name: flowinfromleft;
+       -moz-animation-name: flowinfromleft;
+}
+@-webkit-keyframes flowouttoleft {
+    0% { -webkit-transform: translateX(0) scale(1); }
+       60%, 70% { -webkit-transform: translateX(0) scale(.7); }
+    100% { -webkit-transform: translateX(-100%) scale(.7); }
+}
+@-moz-keyframes flowouttoleft {
+    0% { -moz-transform: translateX(0) scale(1); }
+       60%, 70% { -moz-transform: translateX(0) scale(.7); }
+    100% { -moz-transform:  translateX(-100%) scale(.7); }
+}
+@-webkit-keyframes flowouttoright {
+    0% { -webkit-transform: translateX(0) scale(1); }
+       60%, 70% { -webkit-transform: translateX(0) scale(.7); }
+    100% { -webkit-transform:  translateX(100%) scale(.7); }
+}
+@-moz-keyframes flowouttoright {
+    0% { -moz-transform: translateX(0) scale(1); }
+       60%, 70% { -moz-transform: translateX(0) scale(.7); }
+    100% { -moz-transform:  translateX(100%) scale(.7); }
+}
+@-webkit-keyframes flowinfromleft {
+    0% { -webkit-transform: translateX(-100%) scale(.7); }
+       30%, 40% { -webkit-transform: translateX(0) scale(.7); }
+    100% { -webkit-transform: translateX(0) scale(1); }
+}
+@-moz-keyframes flowinfromleft {
+    0% { -moz-transform: translateX(-100%) scale(.7); }
+       30%, 40% { -moz-transform: translateX(0) scale(.7); }
+    100% { -moz-transform: translateX(0) scale(1); }
+}
+@-webkit-keyframes flowinfromright {
+    0% { -webkit-transform: translateX(100%) scale(.7); }
+       30%, 40% { -webkit-transform: translateX(0) scale(.7); }
+    100% { -webkit-transform: translateX(0) scale(1); }
+}
+@-moz-keyframes flowinfromright {
+    0% { -moz-transform: translateX(100%) scale(.7); }
+       30%, 40% { -moz-transform: translateX(0) scale(.7); }
+    100% { -moz-transform: translateX(0) scale(1); }
+}
+/* content configurations. */
+.ui-grid-a, .ui-grid-b, .ui-grid-c, .ui-grid-d { overflow: hidden; }
+.ui-block-a, .ui-block-b, .ui-block-c, .ui-block-d, .ui-block-e { margin: 0; padding: 0; border: 0; float: left; min-height:1px;}
+/* grid solo: 100 - single item fallback */
+.ui-grid-solo .ui-block-a { width: 100%; float: none; }
+/* grid a: 50/50 */
+.ui-grid-a .ui-block-a, .ui-grid-a .ui-block-b { width: 50%; }
+.ui-grid-a .ui-block-a { clear: left; }
+/* grid b: 33/33/33 */
+.ui-grid-b .ui-block-a, .ui-grid-b .ui-block-b, .ui-grid-b .ui-block-c { width: 33.333%; }
+.ui-grid-b .ui-block-a { clear: left; }
+/* grid c: 25/25/25/25 */
+.ui-grid-c .ui-block-a, .ui-grid-c .ui-block-b, .ui-grid-c .ui-block-c, .ui-grid-c .ui-block-d { width: 25%; }
+.ui-grid-c .ui-block-a { clear: left; }
+/* grid d: 20/20/20/20/20 */
+.ui-grid-d .ui-block-a, .ui-grid-d .ui-block-b, .ui-grid-d .ui-block-c, .ui-grid-d .ui-block-d, .ui-grid-d .ui-block-e { width: 20%; }
+.ui-grid-d .ui-block-a { clear: left; }
+/* fixed page header & footer configuration */
+.ui-header-fixed,
+.ui-footer-fixed {
+       left: 0;
+       right: 0;
+       width: 100%;
+       position: fixed;
+       z-index: 1000;
+}
+.ui-header-fixed {
+       top: 0;
+}
+.ui-footer-fixed {
+       bottom: 0;
+}
+.ui-header-fullscreen,
+.ui-footer-fullscreen {
+       opacity: .9;
+}
+.ui-page-header-fixed {
+       padding-top: 2.5em;
+}
+.ui-page-footer-fixed {
+       padding-bottom: 3em;
+}
+.ui-page-header-fullscreen .ui-content,
+.ui-page-footer-fullscreen .ui-content {
+       padding: 0;
+}
+.ui-fixed-hidden {
+       position: absolute;
+}
+.ui-page-header-fullscreen .ui-fixed-hidden,
+.ui-page-footer-fullscreen .ui-fixed-hidden {
+       left: -99999em;
+}
+.ui-header-fixed .ui-btn,
+.ui-footer-fixed .ui-btn { 
+       z-index: 10;
+}
+.ui-navbar { overflow: hidden;  }
+.ui-navbar ul, .ui-navbar-expanded ul { list-style:none; padding: 0; margin: 0; position: relative; display: block; border: 0;}
+.ui-navbar-collapsed ul { float: left; width: 75%; margin-right: -2px; }
+.ui-navbar-collapsed .ui-navbar-toggle { float: left; width: 25%; }
+.ui-navbar li.ui-navbar-truncate { position: absolute; left: -9999px; top: -9999px; }
+.ui-navbar li .ui-btn, .ui-navbar .ui-navbar-toggle .ui-btn { display: block; font-size: 12px; text-align: center; margin: 0; border-right-width: 0; max-width: 100%; }
+.ui-navbar li .ui-btn {  margin-right: -1px; }
+.ui-navbar li .ui-btn:last-child { margin-right: 0; }
+.ui-header .ui-navbar li .ui-btn, .ui-header .ui-navbar .ui-navbar-toggle .ui-btn,
+.ui-footer .ui-navbar li .ui-btn, .ui-footer .ui-navbar .ui-navbar-toggle .ui-btn { border-top-width: 0; border-bottom-width: 0; }
+.ui-navbar .ui-btn-inner { padding-left: 2px; padding-right: 2px; }
+.ui-navbar-noicons li .ui-btn .ui-btn-inner, .ui-navbar-noicons .ui-navbar-toggle .ui-btn-inner { padding-top: .8em; padding-bottom: .9em; }
+/*expanded page styles*/
+.ui-navbar-expanded .ui-btn { margin: 0; font-size: 14px; }
+.ui-navbar-expanded .ui-btn-inner { padding-left: 5px; padding-right: 5px;  }
+.ui-navbar-expanded .ui-btn-icon-top .ui-btn-inner { padding: 45px 5px 15px; text-align: center; }
+.ui-navbar-expanded .ui-btn-icon-top .ui-icon { top: 15px; }
+.ui-navbar-expanded .ui-btn-icon-bottom .ui-btn-inner { padding: 15px 5px 45px; text-align: center; }
+.ui-navbar-expanded .ui-btn-icon-bottom .ui-icon { bottom: 15px; }
+.ui-navbar-expanded li .ui-btn .ui-btn-inner { min-height: 2.5em; }
+.ui-navbar-expanded .ui-navbar-noicons .ui-btn .ui-btn-inner { padding-top: 1.8em; padding-bottom: 1.9em; }
+.ui-btn { display: block; text-align: center; cursor:pointer;  position: relative; margin: .5em 5px; padding: 0; }
+.ui-mini { margin: .25em 5px; }
+.ui-btn-inner { padding: .6em 20px; min-width: .75em; display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; position: relative; zoom: 1; }
+.ui-btn input, .ui-btn button { z-index: 2; }
+.ui-btn-left, .ui-btn-right, .ui-btn-inline { display: inline-block; }
+.ui-btn-block { display: block; }
+.ui-header .ui-btn,
+.ui-footer .ui-btn { display: inline-block; margin: 0; }
+.ui-header .ui-btn-inner,
+.ui-footer .ui-btn-inner,
+.ui-mini .ui-btn-inner { font-size: 12.5px; padding: .55em 11px .5em; }
+.ui-header .ui-fullsize .ui-btn-inner,
+.ui-footer .ui-fullsize .ui-btn-inner { font-size: 16px; padding: .6em 25px; }
+.ui-btn-icon-notext { width: 24px; height: 24px; }
+.ui-btn-icon-notext .ui-btn-inner { padding: 0; height: 100%; }
+.ui-btn-icon-notext .ui-btn-inner .ui-icon { margin: 2px 1px 2px 3px; }
+.ui-btn-text { position: relative; z-index: 1; width: 100%; }
+.ui-btn-icon-notext .ui-btn-text { position: absolute; left: -9999px; }
+.ui-btn-icon-left .ui-btn-inner { padding-left: 40px; }
+.ui-btn-icon-right .ui-btn-inner { padding-right: 40px; }
+.ui-btn-icon-top .ui-btn-inner { padding-top: 40px; }
+.ui-btn-icon-bottom .ui-btn-inner { padding-bottom: 40px; }
+.ui-header .ui-btn-icon-left .ui-btn-inner,
+.ui-footer .ui-btn-icon-left .ui-btn-inner,
+.ui-mini .ui-btn-icon-left .ui-btn-inner { padding-left: 30px; }
+.ui-header .ui-btn-icon-right .ui-btn-inner,
+.ui-footer .ui-btn-icon-right .ui-btn-inner,
+.ui-mini .ui-btn-icon-right .ui-btn-inner { padding-right: 30px; }
+.ui-header .ui-btn-icon-top .ui-btn-inner,
+.ui-footer .ui-btn-icon-top .ui-btn-inner,
+.ui-mini .ui-btn-icon-top .ui-btn-inner { padding: 30px 3px .5em 3px; }
+.ui-header .ui-btn-icon-bottom .ui-btn-inner,
+.ui-footer .ui-btn-icon-bottom .ui-btn-inner,
+.ui-mini .ui-btn-icon-bottom .ui-btn-inner { padding: .55em 3px 30px 3px; }
+/*btn icon positioning*/
+.ui-btn-icon-notext .ui-icon { display: block; z-index: 0;}
+.ui-btn-icon-left .ui-btn-inner .ui-icon, .ui-btn-icon-right .ui-btn-inner .ui-icon { position: absolute; top: 50%; margin-top: -9px; }
+.ui-btn-icon-top .ui-btn-inner .ui-icon, .ui-btn-icon-bottom .ui-btn-inner .ui-icon { position: absolute; left: 50%;  margin-left: -9px; }
+.ui-btn-icon-left .ui-icon { left: 10px; }
+.ui-btn-icon-right .ui-icon { right: 10px; }
+.ui-btn-icon-top .ui-icon { top: 10px; }
+.ui-btn-icon-bottom .ui-icon { top: auto; bottom: 10px; }
+.ui-header .ui-btn-icon-left .ui-icon,
+.ui-footer .ui-btn-icon-left .ui-icon,
+.ui-mini.ui-btn-icon-left .ui-icon,
+.ui-mini .ui-btn-icon-left .ui-icon { left: 5px; }
+.ui-header .ui-btn-icon-right .ui-icon,
+.ui-footer .ui-btn-icon-right .ui-icon,
+.ui-mini.ui-btn-icon-right .ui-icon,
+.ui-mini .ui-btn-icon-right .ui-icon { right: 5px; }
+.ui-header .ui-btn-icon-top .ui-icon,
+.ui-footer .ui-btn-icon-top .ui-icon,
+.ui-mini.ui-btn-icon-top .ui-icon,
+.ui-mini .ui-btn-icon-top .ui-icon { top: 5px; }
+.ui-header .ui-btn-icon-bottom .ui-icon,
+.ui-footer .ui-btn-icon-bottom .ui-icon,
+.ui-mini.ui-btn-icon-bottom .ui-icon,
+.ui-mini .ui-btn-icon-bottom .ui-icon { bottom: 5px; }
+/*hiding native button,inputs */
+.ui-btn-hidden { position: absolute; top: 0; left: 0; width: 100%; height: 100%; -webkit-appearance: button; opacity: .1; cursor: pointer; background: #fff; background: rgba(255,255,255,0); filter: Alpha(Opacity=.0001); font-size: 1px; border: none; text-indent: -9999px; }
+.ui-collapsible { margin: .5em 0; }
+.ui-collapsible-heading { font-size: 16px; display: block; margin: 0 -8px; padding: 0; border-width: 0 0 1px 0; position: relative; }
+.ui-collapsible-heading a { text-align: left; margin: 0;  }
+.ui-collapsible-heading .ui-btn-inner,
+.ui-collapsible-heading .ui-btn-icon-left .ui-btn-inner { padding-left: 40px; }
+.ui-collapsible-heading .ui-btn-icon-right .ui-btn-inner { padding-left: 12px; padding-right: 40px; }
+.ui-collapsible-heading .ui-btn-icon-top .ui-btn-inner,
+.ui-collapsible-heading .ui-btn-icon-bottom .ui-btn-inner { padding-right: 40px; text-align: center; }
+.ui-collapsible-heading a span.ui-btn { position: absolute; left: 6px; top: 50%; margin: -12px 0 0 0; width: 20px; height: 20px; padding: 1px 0px 1px 2px; text-indent: -9999px; }
+.ui-collapsible-heading a span.ui-btn .ui-btn-inner { padding: 10px 0; }
+.ui-collapsible-heading a span.ui-btn .ui-icon { left: 0; margin-top: -10px; }
+.ui-collapsible-heading-status { position: absolute; top: -9999px; left:0px; }
+.ui-collapsible-content {
+       display: block;
+       margin:  0 -8px;
+       padding: 10px 16px;
+       border-top:  none;      /* Overrides ui-btn-up-* */
+       background-image: none; /* Overrides ui-btn-up-* */
+       font-weight: normal;    /* Overrides ui-btn-up-* */
+}
+.ui-collapsible-content-collapsed { display: none; }
+.ui-collapsible-set { margin: .5em 0; }
+.ui-collapsible-set .ui-collapsible { margin: -1px 0 0; }
+.ui-controlgroup, fieldset.ui-controlgroup { padding: 0; margin: 0em 0 .5em; zoom: 1; }
+.ui-bar .ui-controlgroup { margin: 0 .3em; }
+.ui-controlgroup-label { font-size: 16px; line-height: 1.4; font-weight: normal; margin: 0 0 .4em; }
+.ui-controlgroup-controls { display: block; width: 100%;}
+.ui-controlgroup li { list-style: none; }
+.ui-controlgroup-vertical .ui-btn,
+.ui-controlgroup-vertical .ui-checkbox, .ui-controlgroup-vertical .ui-radio { margin: 0; border-bottom-width: 0;  }
+.ui-controlgroup-controls label.ui-select { position: absolute; left: -9999px; }
+.ui-controlgroup-vertical .ui-controlgroup-last { border-bottom-width: 1px; }
+.ui-controlgroup-horizontal { padding: 0; }
+.ui-controlgroup-horizontal .ui-btn-inner { text-align:center; }
+.ui-controlgroup-horizontal .ui-btn, .ui-controlgroup-horizontal .ui-select { display: inline-block; margin: 0 -6px 0 0; }
+.ui-controlgroup-horizontal .ui-checkbox, .ui-controlgroup-horizontal .ui-radio { float: left; clear: none; margin: 0 -1px 0 0; }
+.ui-controlgroup-horizontal .ui-checkbox .ui-btn, .ui-controlgroup-horizontal .ui-radio .ui-btn,
+.ui-controlgroup-horizontal .ui-checkbox:last-child, .ui-controlgroup-horizontal .ui-radio:last-child { margin-right: 0; }
+.ui-controlgroup-horizontal .ui-controlgroup-last { margin-right: 0; }
+.ui-controlgroup .ui-checkbox label, .ui-controlgroup .ui-radio label { font-size: 16px;  }
+/* conflicts with listview..
+.ui-controlgroup .ui-btn-icon-notext { width: 30px; height: 30px; text-indent: -9999px; }
+.ui-controlgroup .ui-btn-icon-notext .ui-btn-inner {  padding: 5px 6px 5px 5px; }
+*/
+@media all and (min-width: 450px){
+       .ui-field-contain .ui-controlgroup-label { vertical-align: top; display: inline-block;  width: 20%;  margin: 0 2% 0 0;  }
+       .ui-field-contain .ui-controlgroup-controls { width: 60%; display: inline-block; }
+       .ui-field-contain .ui-controlgroup .ui-select { width: 100%; } 
+       .ui-field-contain .ui-controlgroup-horizontal .ui-select { width: auto; }
+}      
+.ui-dialog {
+        background: none !important; /* this is to ensure that dialog theming does not apply (by default at least) on the page div */
+}
+.ui-dialog-contain { width: 92.5%; max-width: 500px; margin: 10% auto 15px auto; padding: 0; }
+.ui-dialog .ui-header {
+       margin-top: 15%;
+       border: none;
+       overflow: hidden;
+}
+.ui-dialog .ui-header, 
+.ui-dialog .ui-content, 
+.ui-dialog .ui-footer { 
+       display: block;
+       position: relative; 
+       width: auto;
+}
+.ui-dialog .ui-header, 
+.ui-dialog .ui-footer  { 
+       z-index: 10; 
+       padding: 0;
+}
+.ui-dialog .ui-footer {
+       padding: 0 15px; 
+}
+.ui-dialog .ui-content { 
+       padding: 15px; 
+}
+.ui-dialog { 
+       margin-top: -15px;  
+}
+.ui-checkbox, .ui-radio { position: relative; clear: both; margin: .2em 0 .5em; z-index: 1;  }
+.ui-checkbox .ui-btn, .ui-radio .ui-btn { margin: 0; text-align: left; z-index: 2; }
+.ui-checkbox .ui-btn-inner, .ui-radio .ui-btn-inner { white-space: normal; }
+.ui-checkbox .ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-btn-icon-left .ui-btn-inner { padding-left: 45px; }
+.ui-checkbox .ui-mini.ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-mini.ui-btn-icon-left .ui-btn-inner { padding-left: 36px; }
+.ui-checkbox .ui-btn-icon-right .ui-btn-inner, .ui-radio .ui-btn-icon-right .ui-btn-inner { padding-right: 45px; }
+.ui-checkbox .ui-mini.ui-btn-icon-right .ui-btn-inner, .ui-radio .ui-mini.ui-btn-icon-right .ui-btn-inner { padding-right: 36px; }
+.ui-checkbox .ui-btn-icon-top .ui-btn-inner,.ui-radio .ui-btn-icon-top .ui-btn-inner { padding-right: 0; padding-left: 0; text-align: center; }
+.ui-checkbox .ui-btn-icon-bottom .ui-btn-inner, .ui-radio .ui-btn-icon-bottom .ui-btn-inner { padding-right: 0; padding-left: 0; text-align: center; }
+.ui-checkbox .ui-icon, .ui-radio .ui-icon { top: 1.1em; }
+.ui-checkbox .ui-btn-icon-left .ui-icon, .ui-radio .ui-btn-icon-left .ui-icon { left: 15px; }
+.ui-checkbox .ui-mini.ui-btn-icon-left .ui-icon, .ui-radio .ui-mini.ui-btn-icon-left .ui-icon { left: 9px; }
+.ui-checkbox .ui-btn-icon-right .ui-icon, .ui-radio .ui-btn-icon-right .ui-icon { right: 15px; }
+.ui-checkbox .ui-mini.ui-btn-icon-right .ui-icon, .ui-radio .ui-mini.ui-btn-icon-right .ui-icon { right: 9px; }
+.ui-checkbox .ui-btn-icon-top .ui-icon, .ui-radio .ui-btn-icon-top .ui-icon { top: 10px; }
+.ui-checkbox .ui-btn-icon-bottom .ui-icon, .ui-radio .ui-btn-icon-bottom .ui-icon { top: auto; bottom: 10px; }
+.ui-checkbox .ui-btn-icon-right .ui-icon, .ui-radio .ui-btn-icon-right .ui-icon { right: 15px; }
+.ui-checkbox .ui-mini.ui-btn-icon-right .ui-icon, .ui-radio .ui-mini.ui-btn-icon-right .ui-icon { right: 9px; }
+/* input, label positioning */
+.ui-checkbox input,.ui-radio input { position:absolute; left:20px; top:50%; width: 10px; height: 10px;  margin:-5px 0 0 0; outline: 0 !important; z-index: 1; }
+.ui-field-contain, fieldset.ui-field-contain { padding: .8em 0; margin: 0; border-width: 0 0 1px 0; overflow: visible; }
+.ui-field-contain:first-child { border-top-width: 0; }
+.ui-header .ui-field-contain-left,
+.ui-header .ui-field-contain-right {
+       position: absolute;
+       top: 0;
+       width: 25%;
+}
+.ui-header .ui-field-contain-left {
+       left: 1em;
+}
+.ui-header .ui-field-contain-right {
+       right: 1em;
+}
+@media all and (min-width: 450px){
+       .ui-field-contain, .ui-mobile fieldset.ui-field-contain { border-width: 0; padding: 0; margin: 1em 0; }
+}
+.ui-select { display: block; position: relative; }
+.ui-select select { position: absolute; left: -9999px; top: -9999px; }
+.ui-select .ui-btn { overflow: hidden; opacity: 1; margin: 0; }
+/* Fixes #2588 — When Windows Phone 7.5 (Mango) tries to calculate a numeric opacity for a select—including “inherit”—without explicitly specifying an opacity on the parent to give it context, a bug appears where clicking elsewhere on the page after opening the select will open the select again. */
+.ui-select .ui-btn select { cursor: pointer; -webkit-appearance: button; left: 0; top:0; width: 100%;  min-height: 1.5em; min-height: 100%; height: 3em; max-height: 100%; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); z-index: 2; }
+.ui-select .ui-disabled { opacity: .3; }
+@-moz-document url-prefix() {.ui-select .ui-btn select { opacity: 0.0001; }}
+.ui-select .ui-btn select.ui-select-nativeonly { opacity: 1; text-indent: 0; }
+.ui-select .ui-btn-icon-right .ui-btn-inner { padding-right: 45px; } 
+.ui-select .ui-btn-icon-right .ui-icon { right: 15px;  }
+.ui-select .ui-mini.ui-btn-icon-right .ui-icon { right: 7px;  }
+/* labels */
+label.ui-select { font-size: 16px; line-height: 1.4;  font-weight: normal; margin: 0 0 .3em; display: block; }
+/*listbox*/
+.ui-select .ui-btn-text, .ui-selectmenu .ui-btn-text { display: block; min-height: 1em; overflow: hidden !important;
+/* This !important is required for iPad Safari specifically. See https://github.com/jquery/jquery-mobile/issues/2647 */ }
+.ui-select .ui-btn-text { text-overflow: ellipsis; }
+.ui-selectmenu { position: absolute; padding: 0; z-index: 1100 !important; width: 80%; max-width: 350px; padding: 6px; }
+.ui-selectmenu .ui-listview { margin: 0; }
+.ui-selectmenu .ui-btn.ui-li-divider { cursor: default; }
+.ui-selectmenu-hidden { top: -9999px; left: -9999px; }
+.ui-selectmenu-screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%;  z-index: 99; }
+.ui-screen-hidden, .ui-selectmenu-list .ui-li .ui-icon { display: none; }
+.ui-selectmenu-list .ui-li .ui-icon { display: block; }
+.ui-li.ui-selectmenu-placeholder { display: none; }
+.ui-selectmenu .ui-header .ui-title { margin: 0.6em 46px 0.8em; }
+@media all and (min-width: 450px){     
+       .ui-field-contain label.ui-select { vertical-align: top;  display: inline-block;  width: 20%;  margin: 0 2% 0 0; }
+       .ui-field-contain .ui-select { width: 60%; display: inline-block; }
+}      
+/* when no placeholder is defined in a multiple select, the header height doesn't even extend past the close button.  this shim's content in there */
+.ui-selectmenu .ui-header h1:after { content: '.'; visibility: hidden; }
+label.ui-input-text { font-size: 16px; line-height: 1.4; display: block; font-weight: normal; margin: 0 0 .3em; }
+input.ui-input-text, textarea.ui-input-text { background-image: none; padding: .4em; line-height: 1.4; font-size: 16px; display: block; width: 97%; outline: 0; }
+.ui-header input.ui-input-text,
+.ui-footer input.ui-input-text { margin-left: 1.25%; padding: .4em 1%; width: 95.5% } /* Note that padding left/right on text inputs is factored into how the element is displayed in Firefox, but does not actually pad the text inside it. */
+ input.ui-input-text { -webkit-appearance: none; }
+textarea.ui-input-text { height: 50px; -webkit-transition: height 200ms linear; -moz-transition: height 200ms linear; -o-transition: height 200ms linear; transition: height 200ms linear; }
+.ui-input-search { padding: 0 30px; background-image: none; position: relative; }
+.ui-icon-searchfield:after { position: absolute; left: 7px; top: 50%; margin-top: -9px; content: ""; width: 18px; height: 18px; opacity: .5; }
+.ui-input-search input.ui-input-text { border: none; width: 98%; padding: .4em 0; margin: 0; display: block; background: transparent none; outline: 0 !important; }
+.ui-input-search .ui-input-clear { position: absolute; right: 0; top: 50%; margin-top: -13px; }
+.ui-mini .ui-input-clear { right: -3px; }
+.ui-input-search .ui-input-clear-hidden { display: none; }
+input.ui-mini, .ui-mini input, textarea.ui-mini { font-size: 14px; }
+textarea.ui-mini { height: 45px; }
+/* orientation adjustments - incomplete!*/
+@media all and (min-width: 450px){
+       .ui-field-contain label.ui-input-text  { vertical-align: top; display: inline-block;  width: 20%;  margin: 0 2% 0 0 }
+       .ui-field-contain input.ui-input-text, 
+       .ui-field-contain textarea.ui-input-text, 
+       .ui-field-contain .ui-input-search { width: 60%; display: inline-block; } 
+       .ui-field-contain .ui-input-search { width: 50%; }
+       .ui-hide-label input.ui-input-text, 
+       .ui-hide-label textarea.ui-input-text, 
+       .ui-hide-label .ui-input-search { padding: .4em; width: 97%; } 
+       .ui-input-search input.ui-input-text { width: 98%; /*echos rule from above*/ }
+}
+.ui-listview { margin: 0; counter-reset: listnumbering; }
+.ui-content .ui-listview { margin: -15px; }
+.ui-content .ui-listview-inset { margin: 1em 0;  }
+.ui-listview, .ui-li { list-style:none; padding:0; }
+.ui-li, .ui-li.ui-field-contain { display: block; margin:0; position: relative; overflow: visible; text-align: left; border-width: 0; border-top-width: 1px; }
+.ui-li .ui-btn-text a.ui-link-inherit { text-overflow: ellipsis; overflow: hidden; white-space: nowrap;  }
+.ui-li-divider, .ui-li-static { padding: .5em 15px; font-size: 14px; font-weight: bold;  }
+.ui-li-divider { counter-reset: listnumbering;  }
+ol.ui-listview .ui-link-inherit:before, ol.ui-listview .ui-li-static:before, .ui-li-dec { font-size: .8em; display: inline-block; padding-right: .3em; font-weight: normal;counter-increment: listnumbering; content: counter(listnumbering) ". "; }
+ol.ui-listview .ui-li-jsnumbering:before { content: "" !important; } /* to avoid chance of duplication */
+.ui-listview-inset .ui-li { border-right-width: 1px; border-left-width: 1px; }
+.ui-li:last-child, .ui-li.ui-field-contain:last-child { border-bottom-width: 1px; }
+.ui-li>.ui-btn-inner { display: block; position: relative; padding: 0; }
+.ui-li .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li { padding: .7em 15px .7em 15px; display: block; }
+.ui-li-has-thumb .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-thumb  { min-height: 60px; padding-left: 100px; }
+.ui-li-has-icon .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-icon {  min-height: 20px; padding-left: 40px; }
+.ui-li-has-count .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-count { padding-right: 45px; }
+.ui-li-has-arrow .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-arrow { padding-right: 30px; }
+.ui-li-has-arrow.ui-li-has-count .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-arrow.ui-li-has-count { padding-right: 75px; }
+.ui-li-has-count .ui-btn-text { padding-right: 15px; }
+.ui-li-heading { font-size: 16px; font-weight: bold; display: block; margin: .6em 0; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;  }
+.ui-li-desc {  font-size: 12px; font-weight: normal; display: block; margin: -.5em 0 .6em; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
+.ui-li-thumb, .ui-listview .ui-li-icon { position: absolute; left: 1px; top: 0; max-height: 80px; max-width: 80px; }
+.ui-listview .ui-li-icon { max-height: 40px; max-width: 40px; left: 10px; top: .9em; }
+.ui-li-thumb, .ui-listview .ui-li-icon, .ui-li-content { float: left; margin-right: 10px; }
+.ui-li-aside { float: right; width: 50%; text-align: right; margin: .3em 0; }
+@media all and (min-width: 480px){
+        .ui-li-aside { width: 45%; }
+}       
+.ui-li-divider { cursor: default; }
+.ui-li-has-alt .ui-btn-inner a.ui-link-inherit, .ui-li-static.ui-li-has-alt { padding-right: 95px; }
+.ui-li-has-count .ui-li-count { position: absolute; font-size: 11px; font-weight: bold; padding: .2em .5em; top: 50%; margin-top: -.9em; right: 48px; }
+.ui-li-divider .ui-li-count, .ui-li-static .ui-li-count { right: 10px; }
+.ui-li-has-alt .ui-li-count { right: 55px; }
+.ui-li-link-alt { position: absolute; width: 40px; height: 100%; border-width: 0; border-left-width: 1px; top: 0; right: 0; margin: 0; padding: 0; z-index: 2; }
+.ui-li-link-alt .ui-btn { overflow: hidden; position: absolute; right: 8px; top: 50%; margin: -11px 0 0 0; border-bottom-width: 1px; z-index: -1;}
+.ui-li-link-alt .ui-btn-inner { padding: 0; height: 100%; position: absolute; width: 100%; top: 0; left: 0;}
+.ui-li-link-alt .ui-btn .ui-icon { right: 50%; margin-right: -9px;  }
+.ui-listview * .ui-btn-inner > .ui-btn > .ui-btn-inner { border-top: 0px; }
+.ui-listview-filter { border-width: 0; overflow: hidden; margin: -15px -15px 15px -15px }
+.ui-listview-filter .ui-input-search { margin: 5px; width: auto; display: block; }
+.ui-listview-filter-inset { margin: -15px -5px -15px -5px; background: transparent; }
+.ui-li.ui-screen-hidden{display:none;}
+/* Odd iPad positioning issue. */
+@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
+    .ui-li .ui-btn-text { overflow:  visible; }
+}
+label.ui-slider { font-size: 16px; line-height: 1.4;  font-weight: normal; margin: 0 0 .3em; display: block; }
+input.ui-slider-input,
+.ui-field-contain input.ui-slider-input { display: inline-block; width: 50px; }
+select.ui-slider-switch { display: none; }
+div.ui-slider { position: relative; display: inline-block; overflow: visible; height: 15px; padding: 0; margin: 0 2% 0 20px; top: 4px; width: 65%; }
+div.ui-slider-mini { height: 12px; margin-left: 10px; }
+div.ui-slider-bg { border: none; height: 100%; padding-right: 8px; }
+.ui-controlgroup a.ui-slider-handle, a.ui-slider-handle { position: absolute; z-index: 1;  top: 50%; width: 28px; height: 28px; margin-top: -15px; margin-left: -15px; outline: 0; }
+a.ui-slider-handle .ui-btn-inner { padding: 0; height: 100%; }
+div.ui-slider-mini a.ui-slider-handle { height: 14px; width: 14px; margin: -8px 0 0 -7px; }
+div.ui-slider-mini a.ui-slider-handle .ui-btn-inner { height: 30px; width: 30px; padding: 0; margin: -9px 0 0 -9px; }
+@media all and (min-width: 450px){
+       .ui-field-contain label.ui-slider { vertical-align: top; display: inline-block; width: 20%; margin: 0 2% 0 0; }
+       .ui-field-contain div.ui-slider { width: 43%; }
+       .ui-field-contain div.ui-slider-switch { width: 5.5em; }
+}      
+div.ui-slider-switch { height: 32px; margin-left: 0; width: 5.8em; }
+a.ui-slider-handle-snapping { -webkit-transition: left 70ms linear; -moz-transition: left 70ms linear; }
+div.ui-slider-switch .ui-slider-handle {  margin-top: 1px;  }
+.ui-slider-inneroffset { margin: 0 16px; position: relative; z-index: 1; }
+div.ui-slider-switch.ui-slider-mini { width: 5em; height: 29px; }
+div.ui-slider-switch.ui-slider-mini .ui-slider-inneroffset { margin: 0 15px 0 14px; }
+div.ui-slider-switch.ui-slider-mini .ui-slider-handle { width: 25px; height: 25px; margin: 1px 0 0 -13px; }
+div.ui-slider-switch.ui-slider-mini a.ui-slider-handle .ui-btn-inner { height: 30px; width: 30px; padding: 0; margin: 0; }
+span.ui-slider-label { position: absolute; text-align: center; width: 100%; overflow: hidden; font-size: 16px; top: 0; line-height: 2; min-height: 100%; border-width: 0; white-space: nowrap; }
+.ui-slider-mini span.ui-slider-label { font-size: 14px; }
+span.ui-slider-label-a { z-index: 1; left: 0; text-indent: -1.5em; }
+span.ui-slider-label-b { z-index: 0; right: 0; text-indent: 1.5em;}
+.ui-slider-inline { width: 120px; display: inline-block; }
diff --git a/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/style.css b/org.tizen.common.verrari/templates/cli/jqm-common-resources/css/style.css
new file mode 100644 (file)
index 0000000..9a4c48c
--- /dev/null
@@ -0,0 +1,4 @@
+/* Copyright $@{YEAR()} $@{USER()} All rights reserved. */
+
+body {
+}
diff --git a/org.tizen.common.verrari/templates/cli/jqm-common-resources/js/jquery-1.7.1.js b/org.tizen.common.verrari/templates/cli/jqm-common-resources/js/jquery-1.7.1.js
new file mode 100644 (file)
index 0000000..8ccd0ea
--- /dev/null
@@ -0,0 +1,9266 @@
+/*!
+ * jQuery JavaScript Library v1.7.1
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon Nov 21 21:11:03 2011 -0500
+ */
+(function( window, undefined ) {
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document,
+       navigator = window.navigator,
+       location = window.location;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+               // The jQuery object is actually just the init constructor 'enhanced'
+               return new jQuery.fn.init( selector, context, rootjQuery );
+       },
+
+       // Map over jQuery in case of overwrite
+       _jQuery = window.jQuery,
+
+       // Map over the $ in case of overwrite
+       _$ = window.$,
+
+       // A central reference to the root jQuery(document)
+       rootjQuery,
+
+       // A simple way to check for HTML strings or ID strings
+       // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+       quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+       // Check if a string has a non-whitespace character in it
+       rnotwhite = /\S/,
+
+       // Used for trimming whitespace
+       trimLeft = /^\s+/,
+       trimRight = /\s+$/,
+
+       // Match a standalone tag
+       rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+       // JSON RegExp
+       rvalidchars = /^[\],:{}\s]*$/,
+       rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+       rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+       rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+       // Useragent RegExp
+       rwebkit = /(webkit)[ \/]([\w.]+)/,
+       ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+       rmsie = /(msie) ([\w.]+)/,
+       rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+       // Matches dashed string for camelizing
+       rdashAlpha = /-([a-z]|[0-9])/ig,
+       rmsPrefix = /^-ms-/,
+
+       // Used by jQuery.camelCase as callback to replace()
+       fcamelCase = function( all, letter ) {
+               return ( letter + "" ).toUpperCase();
+       },
+
+       // Keep a UserAgent string for use with jQuery.browser
+       userAgent = navigator.userAgent,
+
+       // For matching the engine and version of the browser
+       browserMatch,
+
+       // The deferred used on DOM ready
+       readyList,
+
+       // The ready event handler
+       DOMContentLoaded,
+
+       // Save a reference to some core methods
+       toString = Object.prototype.toString,
+       hasOwn = Object.prototype.hasOwnProperty,
+       push = Array.prototype.push,
+       slice = Array.prototype.slice,
+       trim = String.prototype.trim,
+       indexOf = Array.prototype.indexOf,
+
+       // [[Class]] -> type pairs
+       class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+       constructor: jQuery,
+       init: function( selector, context, rootjQuery ) {
+               var match, elem, ret, doc;
+
+               // Handle $(""), $(null), or $(undefined)
+               if ( !selector ) {
+                       return this;
+               }
+
+               // Handle $(DOMElement)
+               if ( selector.nodeType ) {
+                       this.context = this[0] = selector;
+                       this.length = 1;
+                       return this;
+               }
+
+               // The body element only exists once, optimize finding it
+               if ( selector === "body" && !context && document.body ) {
+                       this.context = document;
+                       this[0] = document.body;
+                       this.selector = selector;
+                       this.length = 1;
+                       return this;
+               }
+
+               // Handle HTML strings
+               if ( typeof selector === "string" ) {
+                       // Are we dealing with HTML string or an ID?
+                       if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+                               // Assume that strings that start and end with <> are HTML and skip the regex check
+                               match = [ null, selector, null ];
+
+                       } else {
+                               match = quickExpr.exec( selector );
+                       }
+
+                       // Verify a match, and that no context was specified for #id
+                       if ( match && (match[1] || !context) ) {
+
+                               // HANDLE: $(html) -> $(array)
+                               if ( match[1] ) {
+                                       context = context instanceof jQuery ? context[0] : context;
+                                       doc = ( context ? context.ownerDocument || context : document );
+
+                                       // If a single string is passed in and it's a single tag
+                                       // just do a createElement and skip the rest
+                                       ret = rsingleTag.exec( selector );
+
+                                       if ( ret ) {
+                                               if ( jQuery.isPlainObject( context ) ) {
+                                                       selector = [ document.createElement( ret[1] ) ];
+                                                       jQuery.fn.attr.call( selector, context, true );
+
+                                               } else {
+                                                       selector = [ doc.createElement( ret[1] ) ];
+                                               }
+
+                                       } else {
+                                               ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+                                               selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
+                                       }
+
+                                       return jQuery.merge( this, selector );
+
+                               // HANDLE: $("#id")
+                               } else {
+                                       elem = document.getElementById( match[2] );
+
+                                       // Check parentNode to catch when Blackberry 4.6 returns
+                                       // nodes that are no longer in the document #6963
+                                       if ( elem && elem.parentNode ) {
+                                               // Handle the case where IE and Opera return items
+                                               // by name instead of ID
+                                               if ( elem.id !== match[2] ) {
+                                                       return rootjQuery.find( selector );
+                                               }
+
+                                               // Otherwise, we inject the element directly into the jQuery object
+                                               this.length = 1;
+                                               this[0] = elem;
+                                       }
+
+                                       this.context = document;
+                                       this.selector = selector;
+                                       return this;
+                               }
+
+                       // HANDLE: $(expr, $(...))
+                       } else if ( !context || context.jquery ) {
+                               return ( context || rootjQuery ).find( selector );
+
+                       // HANDLE: $(expr, context)
+                       // (which is just equivalent to: $(context).find(expr)
+                       } else {
+                               return this.constructor( context ).find( selector );
+                       }
+
+               // HANDLE: $(function)
+               // Shortcut for document ready
+               } else if ( jQuery.isFunction( selector ) ) {
+                       return rootjQuery.ready( selector );
+               }
+
+               if ( selector.selector !== undefined ) {
+                       this.selector = selector.selector;
+                       this.context = selector.context;
+               }
+
+               return jQuery.makeArray( selector, this );
+       },
+
+       // Start with an empty selector
+       selector: "",
+
+       // The current version of jQuery being used
+       jquery: "1.7.1",
+
+       // The default length of a jQuery object is 0
+       length: 0,
+
+       // The number of elements contained in the matched element set
+       size: function() {
+               return this.length;
+       },
+
+       toArray: function() {
+               return slice.call( this, 0 );
+       },
+
+       // Get the Nth element in the matched element set OR
+       // Get the whole matched element set as a clean array
+       get: function( num ) {
+               return num == null ?
+
+                       // Return a 'clean' array
+                       this.toArray() :
+
+                       // Return just the object
+                       ( num < 0 ? this[ this.length + num ] : this[ num ] );
+       },
+
+       // Take an array of elements and push it onto the stack
+       // (returning the new matched element set)
+       pushStack: function( elems, name, selector ) {
+               // Build a new jQuery matched element set
+               var ret = this.constructor();
+
+               if ( jQuery.isArray( elems ) ) {
+                       push.apply( ret, elems );
+
+               } else {
+                       jQuery.merge( ret, elems );
+               }
+
+               // Add the old object onto the stack (as a reference)
+               ret.prevObject = this;
+
+               ret.context = this.context;
+
+               if ( name === "find" ) {
+                       ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+               } else if ( name ) {
+                       ret.selector = this.selector + "." + name + "(" + selector + ")";
+               }
+
+               // Return the newly-formed element set
+               return ret;
+       },
+
+       // Execute a callback for every element in the matched set.
+       // (You can seed the arguments with an array of args, but this is
+       // only used internally.)
+       each: function( callback, args ) {
+               return jQuery.each( this, callback, args );
+       },
+
+       ready: function( fn ) {
+               // Attach the listeners
+               jQuery.bindReady();
+
+               // Add the callback
+               readyList.add( fn );
+
+               return this;
+       },
+
+       eq: function( i ) {
+               i = +i;
+               return i === -1 ?
+                       this.slice( i ) :
+                       this.slice( i, i + 1 );
+       },
+
+       first: function() {
+               return this.eq( 0 );
+       },
+
+       last: function() {
+               return this.eq( -1 );
+       },
+
+       slice: function() {
+               return this.pushStack( slice.apply( this, arguments ),
+                       "slice", slice.call(arguments).join(",") );
+       },
+
+       map: function( callback ) {
+               return this.pushStack( jQuery.map(this, function( elem, i ) {
+                       return callback.call( elem, i, elem );
+               }));
+       },
+
+       end: function() {
+               return this.prevObject || this.constructor(null);
+       },
+
+       // For internal use only.
+       // Behaves like an Array's method, not like a jQuery method.
+       push: push,
+       sort: [].sort,
+       splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+       var options, name, src, copy, copyIsArray, clone,
+               target = arguments[0] || {},
+               i = 1,
+               length = arguments.length,
+               deep = false;
+
+       // Handle a deep copy situation
+       if ( typeof target === "boolean" ) {
+               deep = target;
+               target = arguments[1] || {};
+               // skip the boolean and the target
+               i = 2;
+       }
+
+       // Handle case when target is a string or something (possible in deep copy)
+       if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+               target = {};
+       }
+
+       // extend jQuery itself if only one argument is passed
+       if ( length === i ) {
+               target = this;
+               --i;
+       }
+
+       for ( ; i < length; i++ ) {
+               // Only deal with non-null/undefined values
+               if ( (options = arguments[ i ]) != null ) {
+                       // Extend the base object
+                       for ( name in options ) {
+                               src = target[ name ];
+                               copy = options[ name ];
+
+                               // Prevent never-ending loop
+                               if ( target === copy ) {
+                                       continue;
+                               }
+
+                               // Recurse if we're merging plain objects or arrays
+                               if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+                                       if ( copyIsArray ) {
+                                               copyIsArray = false;
+                                               clone = src && jQuery.isArray(src) ? src : [];
+
+                                       } else {
+                                               clone = src && jQuery.isPlainObject(src) ? src : {};
+                                       }
+
+                                       // Never move original objects, clone them
+                                       target[ name ] = jQuery.extend( deep, clone, copy );
+
+                               // Don't bring in undefined values
+                               } else if ( copy !== undefined ) {
+                                       target[ name ] = copy;
+                               }
+                       }
+               }
+       }
+
+       // Return the modified object
+       return target;
+};
+
+jQuery.extend({
+       noConflict: function( deep ) {
+               if ( window.$ === jQuery ) {
+                       window.$ = _$;
+               }
+
+               if ( deep && window.jQuery === jQuery ) {
+                       window.jQuery = _jQuery;
+               }
+
+               return jQuery;
+       },
+
+       // Is the DOM ready to be used? Set to true once it occurs.
+       isReady: false,
+
+       // A counter to track how many items to wait for before
+       // the ready event fires. See #6781
+       readyWait: 1,
+
+       // Hold (or release) the ready event
+       holdReady: function( hold ) {
+               if ( hold ) {
+                       jQuery.readyWait++;
+               } else {
+                       jQuery.ready( true );
+               }
+       },
+
+       // Handle when the DOM is ready
+       ready: function( wait ) {
+               // Either a released hold or an DOMready/load event and not yet ready
+               if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
+                       // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+                       if ( !document.body ) {
+                               return setTimeout( jQuery.ready, 1 );
+                       }
+
+                       // Remember that the DOM is ready
+                       jQuery.isReady = true;
+
+                       // If a normal DOM Ready event fired, decrement, and wait if need be
+                       if ( wait !== true && --jQuery.readyWait > 0 ) {
+                               return;
+                       }
+
+                       // If there are functions bound, to execute
+                       readyList.fireWith( document, [ jQuery ] );
+
+                       // Trigger any bound ready events
+                       if ( jQuery.fn.trigger ) {
+                               jQuery( document ).trigger( "ready" ).off( "ready" );
+                       }
+               }
+       },
+
+       bindReady: function() {
+               if ( readyList ) {
+                       return;
+               }
+
+               readyList = jQuery.Callbacks( "once memory" );
+
+               // Catch cases where $(document).ready() is called after the
+               // browser event has already occurred.
+               if ( document.readyState === "complete" ) {
+                       // Handle it asynchronously to allow scripts the opportunity to delay ready
+                       return setTimeout( jQuery.ready, 1 );
+               }
+
+               // Mozilla, Opera and webkit nightlies currently support this event
+               if ( document.addEventListener ) {
+                       // Use the handy event callback
+                       document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+                       // A fallback to window.onload, that will always work
+                       window.addEventListener( "load", jQuery.ready, false );
+
+               // If IE event model is used
+               } else if ( document.attachEvent ) {
+                       // ensure firing before onload,
+                       // maybe late but safe also for iframes
+                       document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+                       // A fallback to window.onload, that will always work
+                       window.attachEvent( "onload", jQuery.ready );
+
+                       // If IE and not a frame
+                       // continually check to see if the document is ready
+                       var toplevel = false;
+
+                       try {
+                               toplevel = window.frameElement == null;
+                       } catch(e) {}
+
+                       if ( document.documentElement.doScroll && toplevel ) {
+                               doScrollCheck();
+                       }
+               }
+       },
+
+       // See test/unit/core.js for details concerning isFunction.
+       // Since version 1.3, DOM methods and functions like alert
+       // aren't supported. They return false on IE (#2968).
+       isFunction: function( obj ) {
+               return jQuery.type(obj) === "function";
+       },
+
+       isArray: Array.isArray || function( obj ) {
+               return jQuery.type(obj) === "array";
+       },
+
+       // A crude way of determining if an object is a window
+       isWindow: function( obj ) {
+               return obj && typeof obj === "object" && "setInterval" in obj;
+       },
+
+       isNumeric: function( obj ) {
+               return !isNaN( parseFloat(obj) ) && isFinite( obj );
+       },
+
+       type: function( obj ) {
+               return obj == null ?
+                       String( obj ) :
+                       class2type[ toString.call(obj) ] || "object";
+       },
+
+       isPlainObject: function( obj ) {
+               // Must be an Object.
+               // Because of IE, we also have to check the presence of the constructor property.
+               // Make sure that DOM nodes and window objects don't pass through, as well
+               if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+                       return false;
+               }
+
+               try {
+                       // Not own constructor property must be Object
+                       if ( obj.constructor &&
+                               !hasOwn.call(obj, "constructor") &&
+                               !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+                               return false;
+                       }
+               } catch ( e ) {
+                       // IE8,9 Will throw exceptions on certain host objects #9897
+                       return false;
+               }
+
+               // Own properties are enumerated firstly, so to speed up,
+               // if last one is own, then all properties are own.
+
+               var key;
+               for ( key in obj ) {}
+
+               return key === undefined || hasOwn.call( obj, key );
+       },
+
+       isEmptyObject: function( obj ) {
+               for ( var name in obj ) {
+                       return false;
+               }
+               return true;
+       },
+
+       error: function( msg ) {
+               throw new Error( msg );
+       },
+
+       parseJSON: function( data ) {
+               if ( typeof data !== "string" || !data ) {
+                       return null;
+               }
+
+               // Make sure leading/trailing whitespace is removed (IE can't handle it)
+               data = jQuery.trim( data );
+
+               // Attempt to parse using the native JSON parser first
+               if ( window.JSON && window.JSON.parse ) {
+                       return window.JSON.parse( data );
+               }
+
+               // Make sure the incoming data is actual JSON
+               // Logic borrowed from http://json.org/json2.js
+               if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+                       .replace( rvalidtokens, "]" )
+                       .replace( rvalidbraces, "")) ) {
+
+                       return ( new Function( "return " + data ) )();
+
+               }
+               jQuery.error( "Invalid JSON: " + data );
+       },
+
+       // Cross-browser xml parsing
+       parseXML: function( data ) {
+               var xml, tmp;
+               try {
+                       if ( window.DOMParser ) { // Standard
+                               tmp = new DOMParser();
+                               xml = tmp.parseFromString( data , "text/xml" );
+                       } else { // IE
+                               xml = new ActiveXObject( "Microsoft.XMLDOM" );
+                               xml.async = "false";
+                               xml.loadXML( data );
+                       }
+               } catch( e ) {
+                       xml = undefined;
+               }
+               if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+                       jQuery.error( "Invalid XML: " + data );
+               }
+               return xml;
+       },
+
+       noop: function() {},
+
+       // Evaluates a script in a global context
+       // Workarounds based on findings by Jim Driscoll
+       // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+       globalEval: function( data ) {
+               if ( data && rnotwhite.test( data ) ) {
+                       // We use execScript on Internet Explorer
+                       // We use an anonymous function so that context is window
+                       // rather than jQuery in Firefox
+                       ( window.execScript || function( data ) {
+                               window[ "eval" ].call( window, data );
+                       } )( data );
+               }
+       },
+
+       // Convert dashed to camelCase; used by the css and data modules
+       // Microsoft forgot to hump their vendor prefix (#9572)
+       camelCase: function( string ) {
+               return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+       },
+
+       nodeName: function( elem, name ) {
+               return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
+       },
+
+       // args is for internal usage only
+       each: function( object, callback, args ) {
+               var name, i = 0,
+                       length = object.length,
+                       isObj = length === undefined || jQuery.isFunction( object );
+
+               if ( args ) {
+                       if ( isObj ) {
+                               for ( name in object ) {
+                                       if ( callback.apply( object[ name ], args ) === false ) {
+                                               break;
+                                       }
+                               }
+                       } else {
+                               for ( ; i < length; ) {
+                                       if ( callback.apply( object[ i++ ], args ) === false ) {
+                                               break;
+                                       }
+                               }
+                       }
+
+               // A special, fast, case for the most common use of each
+               } else {
+                       if ( isObj ) {
+                               for ( name in object ) {
+                                       if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+                                               break;
+                                       }
+                               }
+                       } else {
+                               for ( ; i < length; ) {
+                                       if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
+                                               break;
+                                       }
+                               }
+                       }
+               }
+
+               return object;
+       },
+
+       // Use native String.trim function wherever possible
+       trim: trim ?
+               function( text ) {
+                       return text == null ?
+                               "" :
+                               trim.call( text );
+               } :
+
+               // Otherwise use our own trimming functionality
+               function( text ) {
+                       return text == null ?
+                               "" :
+                               text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+               },
+
+       // results is for internal usage only
+       makeArray: function( array, results ) {
+               var ret = results || [];
+
+               if ( array != null ) {
+                       // The window, strings (and functions) also have 'length'
+                       // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+                       var type = jQuery.type( array );
+
+                       if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+                               push.call( ret, array );
+                       } else {
+                               jQuery.merge( ret, array );
+                       }
+               }
+
+               return ret;
+       },
+
+       inArray: function( elem, array, i ) {
+               var len;
+
+               if ( array ) {
+                       if ( indexOf ) {
+                               return indexOf.call( array, elem, i );
+                       }
+
+                       len = array.length;
+                       i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+                       for ( ; i < len; i++ ) {
+                               // Skip accessing in sparse arrays
+                               if ( i in array && array[ i ] === elem ) {
+                                       return i;
+                               }
+                       }
+               }
+
+               return -1;
+       },
+
+       merge: function( first, second ) {
+               var i = first.length,
+                       j = 0;
+
+               if ( typeof second.length === "number" ) {
+                       for ( var l = second.length; j < l; j++ ) {
+                               first[ i++ ] = second[ j ];
+                       }
+
+               } else {
+                       while ( second[j] !== undefined ) {
+                               first[ i++ ] = second[ j++ ];
+                       }
+               }
+
+               first.length = i;
+
+               return first;
+       },
+
+       grep: function( elems, callback, inv ) {
+               var ret = [], retVal;
+               inv = !!inv;
+
+               // Go through the array, only saving the items
+               // that pass the validator function
+               for ( var i = 0, length = elems.length; i < length; i++ ) {
+                       retVal = !!callback( elems[ i ], i );
+                       if ( inv !== retVal ) {
+                               ret.push( elems[ i ] );
+                       }
+               }
+
+               return ret;
+       },
+
+       // arg is for internal usage only
+       map: function( elems, callback, arg ) {
+               var value, key, ret = [],
+                       i = 0,
+                       length = elems.length,
+                       // jquery objects are treated as arrays
+                       isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+               // Go through the array, translating each of the items to their
+               if ( isArray ) {
+                       for ( ; i < length; i++ ) {
+                               value = callback( elems[ i ], i, arg );
+
+                               if ( value != null ) {
+                                       ret[ ret.length ] = value;
+                               }
+                       }
+
+               // Go through every key on the object,
+               } else {
+                       for ( key in elems ) {
+                               value = callback( elems[ key ], key, arg );
+
+                               if ( value != null ) {
+                                       ret[ ret.length ] = value;
+                               }
+                       }
+               }
+
+               // Flatten any nested arrays
+               return ret.concat.apply( [], ret );
+       },
+
+       // A global GUID counter for objects
+       guid: 1,
+
+       // Bind a function to a context, optionally partially applying any
+       // arguments.
+       proxy: function( fn, context ) {
+               if ( typeof context === "string" ) {
+                       var tmp = fn[ context ];
+                       context = fn;
+                       fn = tmp;
+               }
+
+               // Quick check to determine if target is callable, in the spec
+               // this throws a TypeError, but we will just return undefined.
+               if ( !jQuery.isFunction( fn ) ) {
+                       return undefined;
+               }
+
+               // Simulated bind
+               var args = slice.call( arguments, 2 ),
+                       proxy = function() {
+                               return fn.apply( context, args.concat( slice.call( arguments ) ) );
+                       };
+
+               // Set the guid of unique handler to the same of original handler, so it can be removed
+               proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
+
+               return proxy;
+       },
+
+       // Mutifunctional method to get and set values to a collection
+       // The value/s can optionally be executed if it's a function
+       access: function( elems, key, value, exec, fn, pass ) {
+               var length = elems.length;
+
+               // Setting many attributes
+               if ( typeof key === "object" ) {
+                       for ( var k in key ) {
+                               jQuery.access( elems, k, key[k], exec, fn, value );
+                       }
+                       return elems;
+               }
+
+               // Setting one attribute
+               if ( value !== undefined ) {
+                       // Optionally, function values get executed if exec is true
+                       exec = !pass && exec && jQuery.isFunction(value);
+
+                       for ( var i = 0; i < length; i++ ) {
+                               fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+                       }
+
+                       return elems;
+               }
+
+               // Getting an attribute
+               return length ? fn( elems[0], key ) : undefined;
+       },
+
+       now: function() {
+               return ( new Date() ).getTime();
+       },
+
+       // Use of jQuery.browser is frowned upon.
+       // More details: http://docs.jquery.com/Utilities/jQuery.browser
+       uaMatch: function( ua ) {
+               ua = ua.toLowerCase();
+
+               var match = rwebkit.exec( ua ) ||
+                       ropera.exec( ua ) ||
+                       rmsie.exec( ua ) ||
+                       ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+                       [];
+
+               return { browser: match[1] || "", version: match[2] || "0" };
+       },
+
+       sub: function() {
+               function jQuerySub( selector, context ) {
+                       return new jQuerySub.fn.init( selector, context );
+               }
+               jQuery.extend( true, jQuerySub, this );
+               jQuerySub.superclass = this;
+               jQuerySub.fn = jQuerySub.prototype = this();
+               jQuerySub.fn.constructor = jQuerySub;
+               jQuerySub.sub = this.sub;
+               jQuerySub.fn.init = function init( selector, context ) {
+                       if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+                               context = jQuerySub( context );
+                       }
+
+                       return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+               };
+               jQuerySub.fn.init.prototype = jQuerySub.fn;
+               var rootjQuerySub = jQuerySub(document);
+               return jQuerySub;
+       },
+
+       browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+       class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+       jQuery.browser[ browserMatch.browser ] = true;
+       jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+       jQuery.browser.safari = true;
+}
+
+// IE doesn't match non-breaking spaces with \s
+if ( rnotwhite.test( "\xA0" ) ) {
+       trimLeft = /^[\s\xA0]+/;
+       trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+       DOMContentLoaded = function() {
+               document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+               jQuery.ready();
+       };
+
+} else if ( document.attachEvent ) {
+       DOMContentLoaded = function() {
+               // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+               if ( document.readyState === "complete" ) {
+                       document.detachEvent( "onreadystatechange", DOMContentLoaded );
+                       jQuery.ready();
+               }
+       };
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+       if ( jQuery.isReady ) {
+               return;
+       }
+
+       try {
+               // If IE is used, use the trick by Diego Perini
+               // http://javascript.nwbox.com/IEContentLoaded/
+               document.documentElement.doScroll("left");
+       } catch(e) {
+               setTimeout( doScrollCheck, 1 );
+               return;
+       }
+
+       // and execute any waiting functions
+       jQuery.ready();
+}
+
+return jQuery;
+
+})();
+
+
+// String to Object flags format cache
+var flagsCache = {};
+
+// Convert String-formatted flags into Object-formatted ones and store in cache
+function createFlags( flags ) {
+       var object = flagsCache[ flags ] = {},
+               i, length;
+       flags = flags.split( /\s+/ );
+       for ( i = 0, length = flags.length; i < length; i++ ) {
+               object[ flags[i] ] = true;
+       }
+       return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *     flags:  an optional list of space-separated flags that will change how
+ *                     the callback list behaves
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible flags:
+ *
+ *     once:                   will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *     memory:                 will keep track of previous values and will call any callback added
+ *                                     after the list has been fired right away with the latest "memorized"
+ *                                     values (like a Deferred)
+ *
+ *     unique:                 will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *     stopOnFalse:    interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( flags ) {
+
+       // Convert flags from String-formatted to Object-formatted
+       // (we check in cache first)
+       flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
+
+       var // Actual callback list
+               list = [],
+               // Stack of fire calls for repeatable lists
+               stack = [],
+               // Last fire value (for non-forgettable lists)
+               memory,
+               // Flag to know if list is currently firing
+               firing,
+               // First callback to fire (used internally by add and fireWith)
+               firingStart,
+               // End of the loop when firing
+               firingLength,
+               // Index of currently firing callback (modified by remove if needed)
+               firingIndex,
+               // Add one or several callbacks to the list
+               add = function( args ) {
+                       var i,
+                               length,
+                               elem,
+                               type,
+                               actual;
+                       for ( i = 0, length = args.length; i < length; i++ ) {
+                               elem = args[ i ];
+                               type = jQuery.type( elem );
+                               if ( type === "array" ) {
+                                       // Inspect recursively
+                                       add( elem );
+                               } else if ( type === "function" ) {
+                                       // Add if not in unique mode and callback is not in
+                                       if ( !flags.unique || !self.has( elem ) ) {
+                                               list.push( elem );
+                                       }
+                               }
+                       }
+               },
+               // Fire callbacks
+               fire = function( context, args ) {
+                       args = args || [];
+                       memory = !flags.memory || [ context, args ];
+                       firing = true;
+                       firingIndex = firingStart || 0;
+                       firingStart = 0;
+                       firingLength = list.length;
+                       for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+                               if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
+                                       memory = true; // Mark as halted
+                                       break;
+                               }
+                       }
+                       firing = false;
+                       if ( list ) {
+                               if ( !flags.once ) {
+                                       if ( stack && stack.length ) {
+                                               memory = stack.shift();
+                                               self.fireWith( memory[ 0 ], memory[ 1 ] );
+                                       }
+                               } else if ( memory === true ) {
+                                       self.disable();
+                               } else {
+                                       list = [];
+                               }
+                       }
+               },
+               // Actual Callbacks object
+               self = {
+                       // Add a callback or a collection of callbacks to the list
+                       add: function() {
+                               if ( list ) {
+                                       var length = list.length;
+                                       add( arguments );
+                                       // Do we need to add the callbacks to the
+                                       // current firing batch?
+                                       if ( firing ) {
+                                               firingLength = list.length;
+                                       // With memory, if we're not firing then
+                                       // we should call right away, unless previous
+                                       // firing was halted (stopOnFalse)
+                                       } else if ( memory && memory !== true ) {
+                                               firingStart = length;
+                                               fire( memory[ 0 ], memory[ 1 ] );
+                                       }
+                               }
+                               return this;
+                       },
+                       // Remove a callback from the list
+                       remove: function() {
+                               if ( list ) {
+                                       var args = arguments,
+                                               argIndex = 0,
+                                               argLength = args.length;
+                                       for ( ; argIndex < argLength ; argIndex++ ) {
+                                               for ( var i = 0; i < list.length; i++ ) {
+                                                       if ( args[ argIndex ] === list[ i ] ) {
+                                                               // Handle firingIndex and firingLength
+                                                               if ( firing ) {
+                                                                       if ( i <= firingLength ) {
+                                                                               firingLength--;
+                                                                               if ( i <= firingIndex ) {
+                                                                                       firingIndex--;
+                                                                               }
+                                                                       }
+                                                               }
+                                                               // Remove the element
+                                                               list.splice( i--, 1 );
+                                                               // If we have some unicity property then
+                                                               // we only need to do this once
+                                                               if ( flags.unique ) {
+                                                                       break;
+                                                               }
+                                                       }
+                                               }
+                                       }
+                               }
+                               return this;
+                       },
+                       // Control if a given callback is in the list
+                       has: function( fn ) {
+                               if ( list ) {
+                                       var i = 0,
+                                               length = list.length;
+                                       for ( ; i < length; i++ ) {
+                                               if ( fn === list[ i ] ) {
+                                                       return true;
+                                               }
+                                       }
+                               }
+                               return false;
+                       },
+                       // Remove all callbacks from the list
+                       empty: function() {
+                               list = [];
+                               return this;
+                       },
+                       // Have the list do nothing anymore
+                       disable: function() {
+                               list = stack = memory = undefined;
+                               return this;
+                       },
+                       // Is it disabled?
+                       disabled: function() {
+                               return !list;
+                       },
+                       // Lock the list in its current state
+                       lock: function() {
+                               stack = undefined;
+                               if ( !memory || memory === true ) {
+                                       self.disable();
+                               }
+                               return this;
+                       },
+                       // Is it locked?
+                       locked: function() {
+                               return !stack;
+                       },
+                       // Call all callbacks with the given context and arguments
+                       fireWith: function( context, args ) {
+                               if ( stack ) {
+                                       if ( firing ) {
+                                               if ( !flags.once ) {
+                                                       stack.push( [ context, args ] );
+                                               }
+                                       } else if ( !( flags.once && memory ) ) {
+                                               fire( context, args );
+                                       }
+                               }
+                               return this;
+                       },
+                       // Call all the callbacks with the given arguments
+                       fire: function() {
+                               self.fireWith( this, arguments );
+                               return this;
+                       },
+                       // To know if the callbacks have already been called at least once
+                       fired: function() {
+                               return !!memory;
+                       }
+               };
+
+       return self;
+};
+
+
+
+
+var // Static reference to slice
+       sliceDeferred = [].slice;
+
+jQuery.extend({
+
+       Deferred: function( func ) {
+               var doneList = jQuery.Callbacks( "once memory" ),
+                       failList = jQuery.Callbacks( "once memory" ),
+                       progressList = jQuery.Callbacks( "memory" ),
+                       state = "pending",
+                       lists = {
+                               resolve: doneList,
+                               reject: failList,
+                               notify: progressList
+                       },
+                       promise = {
+                               done: doneList.add,
+                               fail: failList.add,
+                               progress: progressList.add,
+
+                               state: function() {
+                                       return state;
+                               },
+
+                               // Deprecated
+                               isResolved: doneList.fired,
+                               isRejected: failList.fired,
+
+                               then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
+                                       deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
+                                       return this;
+                               },
+                               always: function() {
+                                       deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
+                                       return this;
+                               },
+                               pipe: function( fnDone, fnFail, fnProgress ) {
+                                       return jQuery.Deferred(function( newDefer ) {
+                                               jQuery.each( {
+                                                       done: [ fnDone, "resolve" ],
+                                                       fail: [ fnFail, "reject" ],
+                                                       progress: [ fnProgress, "notify" ]
+                                               }, function( handler, data ) {
+                                                       var fn = data[ 0 ],
+                                                               action = data[ 1 ],
+                                                               returned;
+                                                       if ( jQuery.isFunction( fn ) ) {
+                                                               deferred[ handler ](function() {
+                                                                       returned = fn.apply( this, arguments );
+                                                                       if ( returned && jQuery.isFunction( returned.promise ) ) {
+                                                                               returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
+                                                                       } else {
+                                                                               newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
+                                                                       }
+                                                               });
+                                                       } else {
+                                                               deferred[ handler ]( newDefer[ action ] );
+                                                       }
+                                               });
+                                       }).promise();
+                               },
+                               // Get a promise for this deferred
+                               // If obj is provided, the promise aspect is added to the object
+                               promise: function( obj ) {
+                                       if ( obj == null ) {
+                                               obj = promise;
+                                       } else {
+                                               for ( var key in promise ) {
+                                                       obj[ key ] = promise[ key ];
+                                               }
+                                       }
+                                       return obj;
+                               }
+                       },
+                       deferred = promise.promise({}),
+                       key;
+
+               for ( key in lists ) {
+                       deferred[ key ] = lists[ key ].fire;
+                       deferred[ key + "With" ] = lists[ key ].fireWith;
+               }
+
+               // Handle state
+               deferred.done( function() {
+                       state = "resolved";
+               }, failList.disable, progressList.lock ).fail( function() {
+                       state = "rejected";
+               }, doneList.disable, progressList.lock );
+
+               // Call given func if any
+               if ( func ) {
+                       func.call( deferred, deferred );
+               }
+
+               // All done!
+               return deferred;
+       },
+
+       // Deferred helper
+       when: function( firstParam ) {
+               var args = sliceDeferred.call( arguments, 0 ),
+                       i = 0,
+                       length = args.length,
+                       pValues = new Array( length ),
+                       count = length,
+                       pCount = length,
+                       deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
+                               firstParam :
+                               jQuery.Deferred(),
+                       promise = deferred.promise();
+               function resolveFunc( i ) {
+                       return function( value ) {
+                               args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+                               if ( !( --count ) ) {
+                                       deferred.resolveWith( deferred, args );
+                               }
+                       };
+               }
+               function progressFunc( i ) {
+                       return function( value ) {
+                               pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+                               deferred.notifyWith( promise, pValues );
+                       };
+               }
+               if ( length > 1 ) {
+                       for ( ; i < length; i++ ) {
+                               if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
+                                       args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
+                               } else {
+                                       --count;
+                               }
+                       }
+                       if ( !count ) {
+                               deferred.resolveWith( deferred, args );
+                       }
+               } else if ( deferred !== firstParam ) {
+                       deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
+               }
+               return promise;
+       }
+});
+
+
+
+
+jQuery.support = (function() {
+
+       var support,
+               all,
+               a,
+               select,
+               opt,
+               input,
+               marginDiv,
+               fragment,
+               tds,
+               events,
+               eventName,
+               i,
+               isSupported,
+               div = document.createElement( "div" ),
+               documentElement = document.documentElement;
+
+       // Preliminary tests
+       div.setAttribute("className", "t");
+       div.innerHTML = "   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+       all = div.getElementsByTagName( "*" );
+       a = div.getElementsByTagName( "a" )[ 0 ];
+
+       // Can't get basic test support
+       if ( !all || !all.length || !a ) {
+               return {};
+       }
+
+       // First batch of supports tests
+       select = document.createElement( "select" );
+       opt = select.appendChild( document.createElement("option") );
+       input = div.getElementsByTagName( "input" )[ 0 ];
+
+       support = {
+               // IE strips leading whitespace when .innerHTML is used
+               leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+               // Make sure that tbody elements aren't automatically inserted
+               // IE will insert them into empty tables
+               tbody: !div.getElementsByTagName("tbody").length,
+
+               // Make sure that link elements get serialized correctly by innerHTML
+               // This requires a wrapper element in IE
+               htmlSerialize: !!div.getElementsByTagName("link").length,
+
+               // Get the style information from getAttribute
+               // (IE uses .cssText instead)
+               style: /top/.test( a.getAttribute("style") ),
+
+               // Make sure that URLs aren't manipulated
+               // (IE normalizes it by default)
+               hrefNormalized: ( a.getAttribute("href") === "/a" ),
+
+               // Make sure that element opacity exists
+               // (IE uses filter instead)
+               // Use a regex to work around a WebKit issue. See #5145
+               opacity: /^0.55/.test( a.style.opacity ),
+
+               // Verify style float existence
+               // (IE uses styleFloat instead of cssFloat)
+               cssFloat: !!a.style.cssFloat,
+
+               // Make sure that if no value is specified for a checkbox
+               // that it defaults to "on".
+               // (WebKit defaults to "" instead)
+               checkOn: ( input.value === "on" ),
+
+               // Make sure that a selected-by-default option has a working selected property.
+               // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+               optSelected: opt.selected,
+
+               // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+               getSetAttribute: div.className !== "t",
+
+               // Tests for enctype support on a form(#6743)
+               enctype: !!document.createElement("form").enctype,
+
+               // Makes sure cloning an html5 element does not cause problems
+               // Where outerHTML is undefined, this still works
+               html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
+
+               // Will be defined later
+               submitBubbles: true,
+               changeBubbles: true,
+               focusinBubbles: false,
+               deleteExpando: true,
+               noCloneEvent: true,
+               inlineBlockNeedsLayout: false,
+               shrinkWrapBlocks: false,
+               reliableMarginRight: true
+       };
+
+       // Make sure checked status is properly cloned
+       input.checked = true;
+       support.noCloneChecked = input.cloneNode( true ).checked;
+
+       // Make sure that the options inside disabled selects aren't marked as disabled
+       // (WebKit marks them as disabled)
+       select.disabled = true;
+       support.optDisabled = !opt.disabled;
+
+       // Test to see if it's possible to delete an expando from an element
+       // Fails in Internet Explorer
+       try {
+               delete div.test;
+       } catch( e ) {
+               support.deleteExpando = false;
+       }
+
+       if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+               div.attachEvent( "onclick", function() {
+                       // Cloning a node shouldn't copy over any
+                       // bound event handlers (IE does this)
+                       support.noCloneEvent = false;
+               });
+               div.cloneNode( true ).fireEvent( "onclick" );
+       }
+
+       // Check if a radio maintains its value
+       // after being appended to the DOM
+       input = document.createElement("input");
+       input.value = "t";
+       input.setAttribute("type", "radio");
+       support.radioValue = input.value === "t";
+
+       input.setAttribute("checked", "checked");
+       div.appendChild( input );
+       fragment = document.createDocumentFragment();
+       fragment.appendChild( div.lastChild );
+
+       // WebKit doesn't clone checked state correctly in fragments
+       support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+       // Check if a disconnected checkbox will retain its checked
+       // value of true after appended to the DOM (IE6/7)
+       support.appendChecked = input.checked;
+
+       fragment.removeChild( input );
+       fragment.appendChild( div );
+
+       div.innerHTML = "";
+
+       // Check if div with explicit width and no margin-right incorrectly
+       // gets computed margin-right based on width of container. For more
+       // info see bug #3333
+       // Fails in WebKit before Feb 2011 nightlies
+       // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+       if ( window.getComputedStyle ) {
+               marginDiv = document.createElement( "div" );
+               marginDiv.style.width = "0";
+               marginDiv.style.marginRight = "0";
+               div.style.width = "2px";
+               div.appendChild( marginDiv );
+               support.reliableMarginRight =
+                       ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
+       }
+
+       // Technique from Juriy Zaytsev
+       // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+       // We only care about the case where non-standard event systems
+       // are used, namely in IE. Short-circuiting here helps us to
+       // avoid an eval call (in setAttribute) which can cause CSP
+       // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+       if ( div.attachEvent ) {
+               for( i in {
+                       submit: 1,
+                       change: 1,
+                       focusin: 1
+               }) {
+                       eventName = "on" + i;
+                       isSupported = ( eventName in div );
+                       if ( !isSupported ) {
+                               div.setAttribute( eventName, "return;" );
+                               isSupported = ( typeof div[ eventName ] === "function" );
+                       }
+                       support[ i + "Bubbles" ] = isSupported;
+               }
+       }
+
+       fragment.removeChild( div );
+
+       // Null elements to avoid leaks in IE
+       fragment = select = opt = marginDiv = div = input = null;
+
+       // Run tests that need a body at doc ready
+       jQuery(function() {
+               var container, outer, inner, table, td, offsetSupport,
+                       conMarginTop, ptlm, vb, style, html,
+                       body = document.getElementsByTagName("body")[0];
+
+               if ( !body ) {
+                       // Return for frameset docs that don't have a body
+                       return;
+               }
+
+               conMarginTop = 1;
+               ptlm = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";
+               vb = "visibility:hidden;border:0;";
+               style = "style='" + ptlm + "border:5px solid #000;padding:0;'";
+               html = "<div " + style + "><div></div></div>" +
+                       "<table " + style + " cellpadding='0' cellspacing='0'>" +
+                       "<tr><td></td></tr></table>";
+
+               container = document.createElement("div");
+               container.style.cssText = vb + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
+               body.insertBefore( container, body.firstChild );
+
+               // Construct the test element
+               div = document.createElement("div");
+               container.appendChild( div );
+
+               // Check if table cells still have offsetWidth/Height when they are set
+               // to display:none and there are still other visible table cells in a
+               // table row; if so, offsetWidth/Height are not reliable for use when
+               // determining if an element has been hidden directly using
+               // display:none (it is still safe to use offsets if a parent element is
+               // hidden; don safety goggles and see bug #4512 for more information).
+               // (only IE 8 fails this test)
+               div.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>";
+               tds = div.getElementsByTagName( "td" );
+               isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+               tds[ 0 ].style.display = "";
+               tds[ 1 ].style.display = "none";
+
+               // Check if empty table cells still have offsetWidth/Height
+               // (IE <= 8 fail this test)
+               support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+               // Figure out if the W3C box model works as expected
+               div.innerHTML = "";
+               div.style.width = div.style.paddingLeft = "1px";
+               jQuery.boxModel = support.boxModel = div.offsetWidth === 2;
+
+               if ( typeof div.style.zoom !== "undefined" ) {
+                       // Check if natively block-level elements act like inline-block
+                       // elements when setting their display to 'inline' and giving
+                       // them layout
+                       // (IE < 8 does this)
+                       div.style.display = "inline";
+                       div.style.zoom = 1;
+                       support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 );
+
+                       // Check if elements with layout shrink-wrap their children
+                       // (IE 6 does this)
+                       div.style.display = "";
+                       div.innerHTML = "<div style='width:4px;'></div>";
+                       support.shrinkWrapBlocks = ( div.offsetWidth !== 2 );
+               }
+
+               div.style.cssText = ptlm + vb;
+               div.innerHTML = html;
+
+               outer = div.firstChild;
+               inner = outer.firstChild;
+               td = outer.nextSibling.firstChild.firstChild;
+
+               offsetSupport = {
+                       doesNotAddBorder: ( inner.offsetTop !== 5 ),
+                       doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
+               };
+
+               inner.style.position = "fixed";
+               inner.style.top = "20px";
+
+               // safari subtracts parent border width here which is 5px
+               offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
+               inner.style.position = inner.style.top = "";
+
+               outer.style.overflow = "hidden";
+               outer.style.position = "relative";
+
+               offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
+               offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
+
+               body.removeChild( container );
+               div  = container = null;
+
+               jQuery.extend( support, offsetSupport );
+       });
+
+       return support;
+})();
+
+
+
+
+var rbrace = /^(?:\{.*\}|\[.*\])$/,
+       rmultiDash = /([A-Z])/g;
+
+jQuery.extend({
+       cache: {},
+
+       // Please use with caution
+       uuid: 0,
+
+       // Unique for each copy of jQuery on the page
+       // Non-digits removed to match rinlinejQuery
+       expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+       // The following elements throw uncatchable exceptions if you
+       // attempt to add expando properties to them.
+       noData: {
+               "embed": true,
+               // Ban all objects except for Flash (which handle expandos)
+               "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+               "applet": true
+       },
+
+       hasData: function( elem ) {
+               elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+               return !!elem && !isEmptyDataObject( elem );
+       },
+
+       data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+               if ( !jQuery.acceptData( elem ) ) {
+                       return;
+               }
+
+               var privateCache, thisCache, ret,
+                       internalKey = jQuery.expando,
+                       getByName = typeof name === "string",
+
+                       // We have to handle DOM nodes and JS objects differently because IE6-7
+                       // can't GC object references properly across the DOM-JS boundary
+                       isNode = elem.nodeType,
+
+                       // Only DOM nodes need the global jQuery cache; JS object data is
+                       // attached directly to the object so GC can occur automatically
+                       cache = isNode ? jQuery.cache : elem,
+
+                       // Only defining an ID for JS objects if its cache already exists allows
+                       // the code to shortcut on the same path as a DOM node with no cache
+                       id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey,
+                       isEvents = name === "events";
+
+               // Avoid doing any more work than we need to when trying to get data on an
+               // object that has no data at all
+               if ( (!id || !cache[id] || (!isEvents && !pvt && !cache[id].data)) && getByName && data === undefined ) {
+                       return;
+               }
+
+               if ( !id ) {
+                       // Only DOM nodes need a new unique ID for each element since their data
+                       // ends up in the global cache
+                       if ( isNode ) {
+                               elem[ internalKey ] = id = ++jQuery.uuid;
+                       } else {
+                               id = internalKey;
+                       }
+               }
+
+               if ( !cache[ id ] ) {
+                       cache[ id ] = {};
+
+                       // Avoids exposing jQuery metadata on plain JS objects when the object
+                       // is serialized using JSON.stringify
+                       if ( !isNode ) {
+                               cache[ id ].toJSON = jQuery.noop;
+                       }
+               }
+
+               // An object can be passed to jQuery.data instead of a key/value pair; this gets
+               // shallow copied over onto the existing cache
+               if ( typeof name === "object" || typeof name === "function" ) {
+                       if ( pvt ) {
+                               cache[ id ] = jQuery.extend( cache[ id ], name );
+                       } else {
+                               cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+                       }
+               }
+
+               privateCache = thisCache = cache[ id ];
+
+               // jQuery data() is stored in a separate object inside the object's internal data
+               // cache in order to avoid key collisions between internal data and user-defined
+               // data.
+               if ( !pvt ) {
+                       if ( !thisCache.data ) {
+                               thisCache.data = {};
+                       }
+
+                       thisCache = thisCache.data;
+               }
+
+               if ( data !== undefined ) {
+                       thisCache[ jQuery.camelCase( name ) ] = data;
+               }
+
+               // Users should not attempt to inspect the internal events object using jQuery.data,
+               // it is undocumented and subject to change. But does anyone listen? No.
+               if ( isEvents && !thisCache[ name ] ) {
+                       return privateCache.events;
+               }
+
+               // Check for both converted-to-camel and non-converted data property names
+               // If a data property was specified
+               if ( getByName ) {
+
+                       // First Try to find as-is property data
+                       ret = thisCache[ name ];
+
+                       // Test for null|undefined property data
+                       if ( ret == null ) {
+
+                               // Try to find the camelCased property
+                               ret = thisCache[ jQuery.camelCase( name ) ];
+                       }
+               } else {
+                       ret = thisCache;
+               }
+
+               return ret;
+       },
+
+       removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+               if ( !jQuery.acceptData( elem ) ) {
+                       return;
+               }
+
+               var thisCache, i, l,
+
+                       // Reference to internal data cache key
+                       internalKey = jQuery.expando,
+
+                       isNode = elem.nodeType,
+
+                       // See jQuery.data for more information
+                       cache = isNode ? jQuery.cache : elem,
+
+                       // See jQuery.data for more information
+                       id = isNode ? elem[ internalKey ] : internalKey;
+
+               // If there is already no cache entry for this object, there is no
+               // purpose in continuing
+               if ( !cache[ id ] ) {
+                       return;
+               }
+
+               if ( name ) {
+
+                       thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+                       if ( thisCache ) {
+
+                               // Support array or space separated string names for data keys
+                               if ( !jQuery.isArray( name ) ) {
+
+                                       // try the string as a key before any manipulation
+                                       if ( name in thisCache ) {
+                                               name = [ name ];
+                                       } else {
+
+                                               // split the camel cased version by spaces unless a key with the spaces exists
+                                               name = jQuery.camelCase( name );
+                                               if ( name in thisCache ) {
+                                                       name = [ name ];
+                                               } else {
+                                                       name = name.split( " " );
+                                               }
+                                       }
+                               }
+
+                               for ( i = 0, l = name.length; i < l; i++ ) {
+                                       delete thisCache[ name[i] ];
+                               }
+
+                               // If there is no data left in the cache, we want to continue
+                               // and let the cache object itself get destroyed
+                               if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+                                       return;
+                               }
+                       }
+               }
+
+               // See jQuery.data for more information
+               if ( !pvt ) {
+                       delete cache[ id ].data;
+
+                       // Don't destroy the parent cache unless the internal data object
+                       // had been the only thing left in it
+                       if ( !isEmptyDataObject(cache[ id ]) ) {
+                               return;
+                       }
+               }
+
+               // Browsers that fail expando deletion also refuse to delete expandos on
+               // the window, but it will allow it on all other JS objects; other browsers
+               // don't care
+               // Ensure that `cache` is not a window object #10080
+               if ( jQuery.support.deleteExpando || !cache.setInterval ) {
+                       delete cache[ id ];
+               } else {
+                       cache[ id ] = null;
+               }
+
+               // We destroyed the cache and need to eliminate the expando on the node to avoid
+               // false lookups in the cache for entries that no longer exist
+               if ( isNode ) {
+                       // IE does not allow us to delete expando properties from nodes,
+                       // nor does it have a removeAttribute function on Document nodes;
+                       // we must handle all of these cases
+                       if ( jQuery.support.deleteExpando ) {
+                               delete elem[ internalKey ];
+                       } else if ( elem.removeAttribute ) {
+                               elem.removeAttribute( internalKey );
+                       } else {
+                               elem[ internalKey ] = null;
+                       }
+               }
+       },
+
+       // For internal use only.
+       _data: function( elem, name, data ) {
+               return jQuery.data( elem, name, data, true );
+       },
+
+       // A method for determining if a DOM node can handle the data expando
+       acceptData: function( elem ) {
+               if ( elem.nodeName ) {
+                       var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+                       if ( match ) {
+                               return !(match === true || elem.getAttribute("classid") !== match);
+                       }
+               }
+
+               return true;
+       }
+});
+
+jQuery.fn.extend({
+       data: function( key, value ) {
+               var parts, attr, name,
+                       data = null;
+
+               if ( typeof key === "undefined" ) {
+                       if ( this.length ) {
+                               data = jQuery.data( this[0] );
+
+                               if ( this[0].nodeType === 1 && !jQuery._data( this[0], "parsedAttrs" ) ) {
+                                       attr = this[0].attributes;
+                                       for ( var i = 0, l = attr.length; i < l; i++ ) {
+                                               name = attr[i].name;
+
+                                               if ( name.indexOf( "data-" ) === 0 ) {
+                                                       name = jQuery.camelCase( name.substring(5) );
+
+                                                       dataAttr( this[0], name, data[ name ] );
+                                               }
+                                       }
+                                       jQuery._data( this[0], "parsedAttrs", true );
+                               }
+                       }
+
+                       return data;
+
+               } else if ( typeof key === "object" ) {
+                       return this.each(function() {
+                               jQuery.data( this, key );
+                       });
+               }
+
+               parts = key.split(".");
+               parts[1] = parts[1] ? "." + parts[1] : "";
+
+               if ( value === undefined ) {
+                       data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
+
+                       // Try to fetch any internally stored data first
+                       if ( data === undefined && this.length ) {
+                               data = jQuery.data( this[0], key );
+                               data = dataAttr( this[0], key, data );
+                       }
+
+                       return data === undefined && parts[1] ?
+                               this.data( parts[0] ) :
+                               data;
+
+               } else {
+                       return this.each(function() {
+                               var self = jQuery( this ),
+                                       args = [ parts[0], value ];
+
+                               self.triggerHandler( "setData" + parts[1] + "!", args );
+                               jQuery.data( this, key, value );
+                               self.triggerHandler( "changeData" + parts[1] + "!", args );
+                       });
+               }
+       },
+
+       removeData: function( key ) {
+               return this.each(function() {
+                       jQuery.removeData( this, key );
+               });
+       }
+});
+
+function dataAttr( elem, key, data ) {
+       // If nothing was found internally, try to fetch any
+       // data from the HTML5 data-* attribute
+       if ( data === undefined && elem.nodeType === 1 ) {
+
+               var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+               data = elem.getAttribute( name );
+
+               if ( typeof data === "string" ) {
+                       try {
+                               data = data === "true" ? true :
+                               data === "false" ? false :
+                               data === "null" ? null :
+                               jQuery.isNumeric( data ) ? parseFloat( data ) :
+                                       rbrace.test( data ) ? jQuery.parseJSON( data ) :
+                                       data;
+                       } catch( e ) {}
+
+                       // Make sure we set the data so it isn't changed later
+                       jQuery.data( elem, key, data );
+
+               } else {
+                       data = undefined;
+               }
+       }
+
+       return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+       for ( var name in obj ) {
+
+               // if the public data object is empty, the private is still empty
+               if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+                       continue;
+               }
+               if ( name !== "toJSON" ) {
+                       return false;
+               }
+       }
+
+       return true;
+}
+
+
+
+
+function handleQueueMarkDefer( elem, type, src ) {
+       var deferDataKey = type + "defer",
+               queueDataKey = type + "queue",
+               markDataKey = type + "mark",
+               defer = jQuery._data( elem, deferDataKey );
+       if ( defer &&
+               ( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
+               ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
+               // Give room for hard-coded callbacks to fire first
+               // and eventually mark/queue something else on the element
+               setTimeout( function() {
+                       if ( !jQuery._data( elem, queueDataKey ) &&
+                               !jQuery._data( elem, markDataKey ) ) {
+                               jQuery.removeData( elem, deferDataKey, true );
+                               defer.fire();
+                       }
+               }, 0 );
+       }
+}
+
+jQuery.extend({
+
+       _mark: function( elem, type ) {
+               if ( elem ) {
+                       type = ( type || "fx" ) + "mark";
+                       jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
+               }
+       },
+
+       _unmark: function( force, elem, type ) {
+               if ( force !== true ) {
+                       type = elem;
+                       elem = force;
+                       force = false;
+               }
+               if ( elem ) {
+                       type = type || "fx";
+                       var key = type + "mark",
+                               count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
+                       if ( count ) {
+                               jQuery._data( elem, key, count );
+                       } else {
+                               jQuery.removeData( elem, key, true );
+                               handleQueueMarkDefer( elem, type, "mark" );
+                       }
+               }
+       },
+
+       queue: function( elem, type, data ) {
+               var q;
+               if ( elem ) {
+                       type = ( type || "fx" ) + "queue";
+                       q = jQuery._data( elem, type );
+
+                       // Speed up dequeue by getting out quickly if this is just a lookup
+                       if ( data ) {
+                               if ( !q || jQuery.isArray(data) ) {
+                                       q = jQuery._data( elem, type, jQuery.makeArray(data) );
+                               } else {
+                                       q.push( data );
+                               }
+                       }
+                       return q || [];
+               }
+       },
+
+       dequeue: function( elem, type ) {
+               type = type || "fx";
+
+               var queue = jQuery.queue( elem, type ),
+                       fn = queue.shift(),
+                       hooks = {};
+
+               // If the fx queue is dequeued, always remove the progress sentinel
+               if ( fn === "inprogress" ) {
+                       fn = queue.shift();
+               }
+
+               if ( fn ) {
+                       // Add a progress sentinel to prevent the fx queue from being
+                       // automatically dequeued
+                       if ( type === "fx" ) {
+                               queue.unshift( "inprogress" );
+                       }
+
+                       jQuery._data( elem, type + ".run", hooks );
+                       fn.call( elem, function() {
+                               jQuery.dequeue( elem, type );
+                       }, hooks );
+               }
+
+               if ( !queue.length ) {
+                       jQuery.removeData( elem, type + "queue " + type + ".run", true );
+                       handleQueueMarkDefer( elem, type, "queue" );
+               }
+       }
+});
+
+jQuery.fn.extend({
+       queue: function( type, data ) {
+               if ( typeof type !== "string" ) {
+                       data = type;
+                       type = "fx";
+               }
+
+               if ( data === undefined ) {
+                       return jQuery.queue( this[0], type );
+               }
+               return this.each(function() {
+                       var queue = jQuery.queue( this, type, data );
+
+                       if ( type === "fx" && queue[0] !== "inprogress" ) {
+                               jQuery.dequeue( this, type );
+                       }
+               });
+       },
+       dequeue: function( type ) {
+               return this.each(function() {
+                       jQuery.dequeue( this, type );
+               });
+       },
+       // Based off of the plugin by Clint Helfers, with permission.
+       // http://blindsignals.com/index.php/2009/07/jquery-delay/
+       delay: function( time, type ) {
+               time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+               type = type || "fx";
+
+               return this.queue( type, function( next, hooks ) {
+                       var timeout = setTimeout( next, time );
+                       hooks.stop = function() {
+                               clearTimeout( timeout );
+                       };
+               });
+       },
+       clearQueue: function( type ) {
+               return this.queue( type || "fx", [] );
+       },
+       // Get a promise resolved when queues of a certain type
+       // are emptied (fx is the type by default)
+       promise: function( type, object ) {
+               if ( typeof type !== "string" ) {
+                       object = type;
+                       type = undefined;
+               }
+               type = type || "fx";
+               var defer = jQuery.Deferred(),
+                       elements = this,
+                       i = elements.length,
+                       count = 1,
+                       deferDataKey = type + "defer",
+                       queueDataKey = type + "queue",
+                       markDataKey = type + "mark",
+                       tmp;
+               function resolve() {
+                       if ( !( --count ) ) {
+                               defer.resolveWith( elements, [ elements ] );
+                       }
+               }
+               while( i-- ) {
+                       if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
+                                       ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
+                                               jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
+                                       jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
+                               count++;
+                               tmp.add( resolve );
+                       }
+               }
+               resolve();
+               return defer.promise();
+       }
+});
+
+
+
+
+var rclass = /[\n\t\r]/g,
+       rspace = /\s+/,
+       rreturn = /\r/g,
+       rtype = /^(?:button|input)$/i,
+       rfocusable = /^(?:button|input|object|select|textarea)$/i,
+       rclickable = /^a(?:rea)?$/i,
+       rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+       getSetAttribute = jQuery.support.getSetAttribute,
+       nodeHook, boolHook, fixSpecified;
+
+jQuery.fn.extend({
+       attr: function( name, value ) {
+               return jQuery.access( this, name, value, true, jQuery.attr );
+       },
+
+       removeAttr: function( name ) {
+               return this.each(function() {
+                       jQuery.removeAttr( this, name );
+               });
+       },
+
+       prop: function( name, value ) {
+               return jQuery.access( this, name, value, true, jQuery.prop );
+       },
+
+       removeProp: function( name ) {
+               name = jQuery.propFix[ name ] || name;
+               return this.each(function() {
+                       // try/catch handles cases where IE balks (such as removing a property on window)
+                       try {
+                               this[ name ] = undefined;
+                               delete this[ name ];
+                       } catch( e ) {}
+               });
+       },
+
+       addClass: function( value ) {
+               var classNames, i, l, elem,
+                       setClass, c, cl;
+
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each(function( j ) {
+                               jQuery( this ).addClass( value.call(this, j, this.className) );
+                       });
+               }
+
+               if ( value && typeof value === "string" ) {
+                       classNames = value.split( rspace );
+
+                       for ( i = 0, l = this.length; i < l; i++ ) {
+                               elem = this[ i ];
+
+                               if ( elem.nodeType === 1 ) {
+                                       if ( !elem.className && classNames.length === 1 ) {
+                                               elem.className = value;
+
+                                       } else {
+                                               setClass = " " + elem.className + " ";
+
+                                               for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+                                                       if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
+                                                               setClass += classNames[ c ] + " ";
+                                                       }
+                                               }
+                                               elem.className = jQuery.trim( setClass );
+                                       }
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       removeClass: function( value ) {
+               var classNames, i, l, elem, className, c, cl;
+
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each(function( j ) {
+                               jQuery( this ).removeClass( value.call(this, j, this.className) );
+                       });
+               }
+
+               if ( (value && typeof value === "string") || value === undefined ) {
+                       classNames = ( value || "" ).split( rspace );
+
+                       for ( i = 0, l = this.length; i < l; i++ ) {
+                               elem = this[ i ];
+
+                               if ( elem.nodeType === 1 && elem.className ) {
+                                       if ( value ) {
+                                               className = (" " + elem.className + " ").replace( rclass, " " );
+                                               for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+                                                       className = className.replace(" " + classNames[ c ] + " ", " ");
+                                               }
+                                               elem.className = jQuery.trim( className );
+
+                                       } else {
+                                               elem.className = "";
+                                       }
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       toggleClass: function( value, stateVal ) {
+               var type = typeof value,
+                       isBool = typeof stateVal === "boolean";
+
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each(function( i ) {
+                               jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+                       });
+               }
+
+               return this.each(function() {
+                       if ( type === "string" ) {
+                               // toggle individual class names
+                               var className,
+                                       i = 0,
+                                       self = jQuery( this ),
+                                       state = stateVal,
+                                       classNames = value.split( rspace );
+
+                               while ( (className = classNames[ i++ ]) ) {
+                                       // check each className given, space seperated list
+                                       state = isBool ? state : !self.hasClass( className );
+                                       self[ state ? "addClass" : "removeClass" ]( className );
+                               }
+
+                       } else if ( type === "undefined" || type === "boolean" ) {
+                               if ( this.className ) {
+                                       // store className if set
+                                       jQuery._data( this, "__className__", this.className );
+                               }
+
+                               // toggle whole className
+                               this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+                       }
+               });
+       },
+
+       hasClass: function( selector ) {
+               var className = " " + selector + " ",
+                       i = 0,
+                       l = this.length;
+               for ( ; i < l; i++ ) {
+                       if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
+                               return true;
+                       }
+               }
+
+               return false;
+       },
+
+       val: function( value ) {
+               var hooks, ret, isFunction,
+                       elem = this[0];
+
+               if ( !arguments.length ) {
+                       if ( elem ) {
+                               hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ];
+
+                               if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+                                       return ret;
+                               }
+
+                               ret = elem.value;
+
+                               return typeof ret === "string" ?
+                                       // handle most common string cases
+                                       ret.replace(rreturn, "") :
+                                       // handle cases where value is null/undef or number
+                                       ret == null ? "" : ret;
+                       }
+
+                       return;
+               }
+
+               isFunction = jQuery.isFunction( value );
+
+               return this.each(function( i ) {
+                       var self = jQuery(this), val;
+
+                       if ( this.nodeType !== 1 ) {
+                               return;
+                       }
+
+                       if ( isFunction ) {
+                               val = value.call( this, i, self.val() );
+                       } else {
+                               val = value;
+                       }
+
+                       // Treat null/undefined as ""; convert numbers to string
+                       if ( val == null ) {
+                               val = "";
+                       } else if ( typeof val === "number" ) {
+                               val += "";
+                       } else if ( jQuery.isArray( val ) ) {
+                               val = jQuery.map(val, function ( value ) {
+                                       return value == null ? "" : value + "";
+                               });
+                       }
+
+                       hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ];
+
+                       // If set returns undefined, fall back to normal setting
+                       if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+                               this.value = val;
+                       }
+               });
+       }
+});
+
+jQuery.extend({
+       valHooks: {
+               option: {
+                       get: function( elem ) {
+                               // attributes.value is undefined in Blackberry 4.7 but
+                               // uses .value. See #6932
+                               var val = elem.attributes.value;
+                               return !val || val.specified ? elem.value : elem.text;
+                       }
+               },
+               select: {
+                       get: function( elem ) {
+                               var value, i, max, option,
+                                       index = elem.selectedIndex,
+                                       values = [],
+                                       options = elem.options,
+                                       one = elem.type === "select-one";
+
+                               // Nothing was selected
+                               if ( index < 0 ) {
+                                       return null;
+                               }
+
+                               // Loop through all the selected options
+                               i = one ? index : 0;
+                               max = one ? index + 1 : options.length;
+                               for ( ; i < max; i++ ) {
+                                       option = options[ i ];
+
+                                       // Don't return options that are disabled or in a disabled optgroup
+                                       if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+                                                       (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+                                               // Get the specific value for the option
+                                               value = jQuery( option ).val();
+
+                                               // We don't need an array for one selects
+                                               if ( one ) {
+                                                       return value;
+                                               }
+
+                                               // Multi-Selects return an array
+                                               values.push( value );
+                                       }
+                               }
+
+                               // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
+                               if ( one && !values.length && options.length ) {
+                                       return jQuery( options[ index ] ).val();
+                               }
+
+                               return values;
+                       },
+
+                       set: function( elem, value ) {
+                               var values = jQuery.makeArray( value );
+
+                               jQuery(elem).find("option").each(function() {
+                                       this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+                               });
+
+                               if ( !values.length ) {
+                                       elem.selectedIndex = -1;
+                               }
+                               return values;
+                       }
+               }
+       },
+
+       attrFn: {
+               val: true,
+               css: true,
+               html: true,
+               text: true,
+               data: true,
+               width: true,
+               height: true,
+               offset: true
+       },
+
+       attr: function( elem, name, value, pass ) {
+               var ret, hooks, notxml,
+                       nType = elem.nodeType;
+
+               // don't get/set attributes on text, comment and attribute nodes
+               if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+                       return;
+               }
+
+               if ( pass && name in jQuery.attrFn ) {
+                       return jQuery( elem )[ name ]( value );
+               }
+
+               // Fallback to prop when attributes are not supported
+               if ( typeof elem.getAttribute === "undefined" ) {
+                       return jQuery.prop( elem, name, value );
+               }
+
+               notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+               // All attributes are lowercase
+               // Grab necessary hook if one is defined
+               if ( notxml ) {
+                       name = name.toLowerCase();
+                       hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+               }
+
+               if ( value !== undefined ) {
+
+                       if ( value === null ) {
+                               jQuery.removeAttr( elem, name );
+                               return;
+
+                       } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+                               return ret;
+
+                       } else {
+                               elem.setAttribute( name, "" + value );
+                               return value;
+                       }
+
+               } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+                       return ret;
+
+               } else {
+
+                       ret = elem.getAttribute( name );
+
+                       // Non-existent attributes return null, we normalize to undefined
+                       return ret === null ?
+                               undefined :
+                               ret;
+               }
+       },
+
+       removeAttr: function( elem, value ) {
+               var propName, attrNames, name, l,
+                       i = 0;
+
+               if ( value && elem.nodeType === 1 ) {
+                       attrNames = value.toLowerCase().split( rspace );
+                       l = attrNames.length;
+
+                       for ( ; i < l; i++ ) {
+                               name = attrNames[ i ];
+
+                               if ( name ) {
+                                       propName = jQuery.propFix[ name ] || name;
+
+                                       // See #9699 for explanation of this approach (setting first, then removal)
+                                       jQuery.attr( elem, name, "" );
+                                       elem.removeAttribute( getSetAttribute ? name : propName );
+
+                                       // Set corresponding property to false for boolean attributes
+                                       if ( rboolean.test( name ) && propName in elem ) {
+                                               elem[ propName ] = false;
+                                       }
+                               }
+                       }
+               }
+       },
+
+       attrHooks: {
+               type: {
+                       set: function( elem, value ) {
+                               // We can't allow the type property to be changed (since it causes problems in IE)
+                               if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+                                       jQuery.error( "type property can't be changed" );
+                               } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+                                       // Setting the type on a radio button after the value resets the value in IE6-9
+                                       // Reset value to it's default in case type is set after value
+                                       // This is for element creation
+                                       var val = elem.value;
+                                       elem.setAttribute( "type", value );
+                                       if ( val ) {
+                                               elem.value = val;
+                                       }
+                                       return value;
+                               }
+                       }
+               },
+               // Use the value property for back compat
+               // Use the nodeHook for button elements in IE6/7 (#1954)
+               value: {
+                       get: function( elem, name ) {
+                               if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+                                       return nodeHook.get( elem, name );
+                               }
+                               return name in elem ?
+                                       elem.value :
+                                       null;
+                       },
+                       set: function( elem, value, name ) {
+                               if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+                                       return nodeHook.set( elem, value, name );
+                               }
+                               // Does not return so that setAttribute is also used
+                               elem.value = value;
+                       }
+               }
+       },
+
+       propFix: {
+               tabindex: "tabIndex",
+               readonly: "readOnly",
+               "for": "htmlFor",
+               "class": "className",
+               maxlength: "maxLength",
+               cellspacing: "cellSpacing",
+               cellpadding: "cellPadding",
+               rowspan: "rowSpan",
+               colspan: "colSpan",
+               usemap: "useMap",
+               frameborder: "frameBorder",
+               contenteditable: "contentEditable"
+       },
+
+       prop: function( elem, name, value ) {
+               var ret, hooks, notxml,
+                       nType = elem.nodeType;
+
+               // don't get/set properties on text, comment and attribute nodes
+               if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+                       return;
+               }
+
+               notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+               if ( notxml ) {
+                       // Fix name and attach hooks
+                       name = jQuery.propFix[ name ] || name;
+                       hooks = jQuery.propHooks[ name ];
+               }
+
+               if ( value !== undefined ) {
+                       if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+                               return ret;
+
+                       } else {
+                               return ( elem[ name ] = value );
+                       }
+
+               } else {
+                       if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+                               return ret;
+
+                       } else {
+                               return elem[ name ];
+                       }
+               }
+       },
+
+       propHooks: {
+               tabIndex: {
+                       get: function( elem ) {
+                               // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+                               // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+                               var attributeNode = elem.getAttributeNode("tabindex");
+
+                               return attributeNode && attributeNode.specified ?
+                                       parseInt( attributeNode.value, 10 ) :
+                                       rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+                                               0 :
+                                               undefined;
+                       }
+               }
+       }
+});
+
+// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
+jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
+
+// Hook for boolean attributes
+boolHook = {
+       get: function( elem, name ) {
+               // Align boolean attributes with corresponding properties
+               // Fall back to attribute presence where some booleans are not supported
+               var attrNode,
+                       property = jQuery.prop( elem, name );
+               return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
+                       name.toLowerCase() :
+                       undefined;
+       },
+       set: function( elem, value, name ) {
+               var propName;
+               if ( value === false ) {
+                       // Remove boolean attributes when set to false
+                       jQuery.removeAttr( elem, name );
+               } else {
+                       // value is true since we know at this point it's type boolean and not false
+                       // Set boolean attributes to the same name and set the DOM property
+                       propName = jQuery.propFix[ name ] || name;
+                       if ( propName in elem ) {
+                               // Only set the IDL specifically if it already exists on the element
+                               elem[ propName ] = true;
+                       }
+
+                       elem.setAttribute( name, name.toLowerCase() );
+               }
+               return name;
+       }
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+       fixSpecified = {
+               name: true,
+               id: true
+       };
+
+       // Use this for any attribute in IE6/7
+       // This fixes almost every IE6/7 issue
+       nodeHook = jQuery.valHooks.button = {
+               get: function( elem, name ) {
+                       var ret;
+                       ret = elem.getAttributeNode( name );
+                       return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
+                               ret.nodeValue :
+                               undefined;
+               },
+               set: function( elem, value, name ) {
+                       // Set the existing or create a new attribute node
+                       var ret = elem.getAttributeNode( name );
+                       if ( !ret ) {
+                               ret = document.createAttribute( name );
+                               elem.setAttributeNode( ret );
+                       }
+                       return ( ret.nodeValue = value + "" );
+               }
+       };
+
+       // Apply the nodeHook to tabindex
+       jQuery.attrHooks.tabindex.set = nodeHook.set;
+
+       // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+       // This is for removals
+       jQuery.each([ "width", "height" ], function( i, name ) {
+               jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+                       set: function( elem, value ) {
+                               if ( value === "" ) {
+                                       elem.setAttribute( name, "auto" );
+                                       return value;
+                               }
+                       }
+               });
+       });
+
+       // Set contenteditable to false on removals(#10429)
+       // Setting to empty string throws an error as an invalid value
+       jQuery.attrHooks.contenteditable = {
+               get: nodeHook.get,
+               set: function( elem, value, name ) {
+                       if ( value === "" ) {
+                               value = "false";
+                       }
+                       nodeHook.set( elem, value, name );
+               }
+       };
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+       jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+               jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+                       get: function( elem ) {
+                               var ret = elem.getAttribute( name, 2 );
+                               return ret === null ? undefined : ret;
+                       }
+               });
+       });
+}
+
+if ( !jQuery.support.style ) {
+       jQuery.attrHooks.style = {
+               get: function( elem ) {
+                       // Return undefined in the case of empty string
+                       // Normalize to lowercase since IE uppercases css property names
+                       return elem.style.cssText.toLowerCase() || undefined;
+               },
+               set: function( elem, value ) {
+                       return ( elem.style.cssText = "" + value );
+               }
+       };
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+       jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+               get: function( elem ) {
+                       var parent = elem.parentNode;
+
+                       if ( parent ) {
+                               parent.selectedIndex;
+
+                               // Make sure that it also works with optgroups, see #5701
+                               if ( parent.parentNode ) {
+                                       parent.parentNode.selectedIndex;
+                               }
+                       }
+                       return null;
+               }
+       });
+}
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+       jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+       jQuery.each([ "radio", "checkbox" ], function() {
+               jQuery.valHooks[ this ] = {
+                       get: function( elem ) {
+                               // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+                               return elem.getAttribute("value") === null ? "on" : elem.value;
+                       }
+               };
+       });
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+       jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+               set: function( elem, value ) {
+                       if ( jQuery.isArray( value ) ) {
+                               return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+                       }
+               }
+       });
+});
+
+
+
+
+var rformElems = /^(?:textarea|input|select)$/i,
+       rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
+       rhoverHack = /\bhover(\.\S+)?\b/,
+       rkeyEvent = /^key/,
+       rmouseEvent = /^(?:mouse|contextmenu)|click/,
+       rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+       rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
+       quickParse = function( selector ) {
+               var quick = rquickIs.exec( selector );
+               if ( quick ) {
+                       //   0  1    2   3
+                       // [ _, tag, id, class ]
+                       quick[1] = ( quick[1] || "" ).toLowerCase();
+                       quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
+               }
+               return quick;
+       },
+       quickIs = function( elem, m ) {
+               var attrs = elem.attributes || {};
+               return (
+                       (!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
+                       (!m[2] || (attrs.id || {}).value === m[2]) &&
+                       (!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
+               );
+       },
+       hoverHack = function( events ) {
+               return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
+       };
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+       add: function( elem, types, handler, data, selector ) {
+
+               var elemData, eventHandle, events,
+                       t, tns, type, namespaces, handleObj,
+                       handleObjIn, quick, handlers, special;
+
+               // Don't attach events to noData or text/comment nodes (allow plain objects tho)
+               if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
+                       return;
+               }
+
+               // Caller can pass in an object of custom data in lieu of the handler
+               if ( handler.handler ) {
+                       handleObjIn = handler;
+                       handler = handleObjIn.handler;
+               }
+
+               // Make sure that the handler has a unique ID, used to find/remove it later
+               if ( !handler.guid ) {
+                       handler.guid = jQuery.guid++;
+               }
+
+               // Init the element's event structure and main handler, if this is the first
+               events = elemData.events;
+               if ( !events ) {
+                       elemData.events = events = {};
+               }
+               eventHandle = elemData.handle;
+               if ( !eventHandle ) {
+                       elemData.handle = eventHandle = function( e ) {
+                               // Discard the second event of a jQuery.event.trigger() and
+                               // when an event is called after a page has unloaded
+                               return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+                                       jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+                                       undefined;
+                       };
+                       // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+                       eventHandle.elem = elem;
+               }
+
+               // Handle multiple events separated by a space
+               // jQuery(...).bind("mouseover mouseout", fn);
+               types = jQuery.trim( hoverHack(types) ).split( " " );
+               for ( t = 0; t < types.length; t++ ) {
+
+                       tns = rtypenamespace.exec( types[t] ) || [];
+                       type = tns[1];
+                       namespaces = ( tns[2] || "" ).split( "." ).sort();
+
+                       // If event changes its type, use the special event handlers for the changed type
+                       special = jQuery.event.special[ type ] || {};
+
+                       // If selector defined, determine special event api type, otherwise given type
+                       type = ( selector ? special.delegateType : special.bindType ) || type;
+
+                       // Update special based on newly reset type
+                       special = jQuery.event.special[ type ] || {};
+
+                       // handleObj is passed to all event handlers
+                       handleObj = jQuery.extend({
+                               type: type,
+                               origType: tns[1],
+                               data: data,
+                               handler: handler,
+                               guid: handler.guid,
+                               selector: selector,
+                               quick: quickParse( selector ),
+                               namespace: namespaces.join(".")
+                       }, handleObjIn );
+
+                       // Init the event handler queue if we're the first
+                       handlers = events[ type ];
+                       if ( !handlers ) {
+                               handlers = events[ type ] = [];
+                               handlers.delegateCount = 0;
+
+                               // Only use addEventListener/attachEvent if the special events handler returns false
+                               if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+                                       // Bind the global event handler to the element
+                                       if ( elem.addEventListener ) {
+                                               elem.addEventListener( type, eventHandle, false );
+
+                                       } else if ( elem.attachEvent ) {
+                                               elem.attachEvent( "on" + type, eventHandle );
+                                       }
+                               }
+                       }
+
+                       if ( special.add ) {
+                               special.add.call( elem, handleObj );
+
+                               if ( !handleObj.handler.guid ) {
+                                       handleObj.handler.guid = handler.guid;
+                               }
+                       }
+
+                       // Add to the element's handler list, delegates in front
+                       if ( selector ) {
+                               handlers.splice( handlers.delegateCount++, 0, handleObj );
+                       } else {
+                               handlers.push( handleObj );
+                       }
+
+                       // Keep track of which events have ever been used, for event optimization
+                       jQuery.event.global[ type ] = true;
+               }
+
+               // Nullify elem to prevent memory leaks in IE
+               elem = null;
+       },
+
+       global: {},
+
+       // Detach an event or set of events from an element
+       remove: function( elem, types, handler, selector, mappedTypes ) {
+
+               var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
+                       t, tns, type, origType, namespaces, origCount,
+                       j, events, special, handle, eventType, handleObj;
+
+               if ( !elemData || !(events = elemData.events) ) {
+                       return;
+               }
+
+               // Once for each type.namespace in types; type may be omitted
+               types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
+               for ( t = 0; t < types.length; t++ ) {
+                       tns = rtypenamespace.exec( types[t] ) || [];
+                       type = origType = tns[1];
+                       namespaces = tns[2];
+
+                       // Unbind all events (on this namespace, if provided) for the element
+                       if ( !type ) {
+                               for ( type in events ) {
+                                       jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+                               }
+                               continue;
+                       }
+
+                       special = jQuery.event.special[ type ] || {};
+                       type = ( selector? special.delegateType : special.bindType ) || type;
+                       eventType = events[ type ] || [];
+                       origCount = eventType.length;
+                       namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+
+                       // Remove matching events
+                       for ( j = 0; j < eventType.length; j++ ) {
+                               handleObj = eventType[ j ];
+
+                               if ( ( mappedTypes || origType === handleObj.origType ) &&
+                                        ( !handler || handler.guid === handleObj.guid ) &&
+                                        ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
+                                        ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+                                       eventType.splice( j--, 1 );
+
+                                       if ( handleObj.selector ) {
+                                               eventType.delegateCount--;
+                                       }
+                                       if ( special.remove ) {
+                                               special.remove.call( elem, handleObj );
+                                       }
+                               }
+                       }
+
+                       // Remove generic event handler if we removed something and no more handlers exist
+                       // (avoids potential for endless recursion during removal of special event handlers)
+                       if ( eventType.length === 0 && origCount !== eventType.length ) {
+                               if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+                                       jQuery.removeEvent( elem, type, elemData.handle );
+                               }
+
+                               delete events[ type ];
+                       }
+               }
+
+               // Remove the expando if it's no longer used
+               if ( jQuery.isEmptyObject( events ) ) {
+                       handle = elemData.handle;
+                       if ( handle ) {
+                               handle.elem = null;
+                       }
+
+                       // removeData also checks for emptiness and clears the expando if empty
+                       // so use it instead of delete
+                       jQuery.removeData( elem, [ "events", "handle" ], true );
+               }
+       },
+
+       // Events that are safe to short-circuit if no handlers are attached.
+       // Native DOM events should not be added, they may have inline handlers.
+       customEvent: {
+               "getData": true,
+               "setData": true,
+               "changeData": true
+       },
+
+       trigger: function( event, data, elem, onlyHandlers ) {
+               // Don't do events on text and comment nodes
+               if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
+                       return;
+               }
+
+               // Event object or event type
+               var type = event.type || event,
+                       namespaces = [],
+                       cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
+
+               // focus/blur morphs to focusin/out; ensure we're not firing them right now
+               if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+                       return;
+               }
+
+               if ( type.indexOf( "!" ) >= 0 ) {
+                       // Exclusive events trigger only for the exact event (no namespaces)
+                       type = type.slice(0, -1);
+                       exclusive = true;
+               }
+
+               if ( type.indexOf( "." ) >= 0 ) {
+                       // Namespaced trigger; create a regexp to match event type in handle()
+                       namespaces = type.split(".");
+                       type = namespaces.shift();
+                       namespaces.sort();
+               }
+
+               if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+                       // No jQuery handlers for this event type, and it can't have inline handlers
+                       return;
+               }
+
+               // Caller can pass in an Event, Object, or just an event type string
+               event = typeof event === "object" ?
+                       // jQuery.Event object
+                       event[ jQuery.expando ] ? event :
+                       // Object literal
+                       new jQuery.Event( type, event ) :
+                       // Just the event type (string)
+                       new jQuery.Event( type );
+
+               event.type = type;
+               event.isTrigger = true;
+               event.exclusive = exclusive;
+               event.namespace = namespaces.join( "." );
+               event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+               ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
+
+               // Handle a global trigger
+               if ( !elem ) {
+
+                       // TODO: Stop taunting the data cache; remove global events and always attach to document
+                       cache = jQuery.cache;
+                       for ( i in cache ) {
+                               if ( cache[ i ].events && cache[ i ].events[ type ] ) {
+                                       jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
+                               }
+                       }
+                       return;
+               }
+
+               // Clean up the event in case it is being reused
+               event.result = undefined;
+               if ( !event.target ) {
+                       event.target = elem;
+               }
+
+               // Clone any incoming data and prepend the event, creating the handler arg list
+               data = data != null ? jQuery.makeArray( data ) : [];
+               data.unshift( event );
+
+               // Allow special events to draw outside the lines
+               special = jQuery.event.special[ type ] || {};
+               if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
+                       return;
+               }
+
+               // Determine event propagation path in advance, per W3C events spec (#9951)
+               // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+               eventPath = [[ elem, special.bindType || type ]];
+               if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+                       bubbleType = special.delegateType || type;
+                       cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
+                       old = null;
+                       for ( ; cur; cur = cur.parentNode ) {
+                               eventPath.push([ cur, bubbleType ]);
+                               old = cur;
+                       }
+
+                       // Only add window if we got to document (e.g., not plain obj or detached DOM)
+                       if ( old && old === elem.ownerDocument ) {
+                               eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
+                       }
+               }
+
+               // Fire handlers on the event path
+               for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
+
+                       cur = eventPath[i][0];
+                       event.type = eventPath[i][1];
+
+                       handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+                       if ( handle ) {
+                               handle.apply( cur, data );
+                       }
+                       // Note that this is a bare JS function and not a jQuery handler
+                       handle = ontype && cur[ ontype ];
+                       if ( handle && jQuery.acceptData( cur ) && handle.apply( cur, data ) === false ) {
+                               event.preventDefault();
+                       }
+               }
+               event.type = type;
+
+               // If nobody prevented the default action, do it now
+               if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+                       if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
+                               !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+                               // Call a native DOM method on the target with the same name name as the event.
+                               // Can't use an .isFunction() check here because IE6/7 fails that test.
+                               // Don't do default actions on window, that's where global variables be (#6170)
+                               // IE<9 dies on focus/blur to hidden element (#1486)
+                               if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
+
+                                       // Don't re-trigger an onFOO event when we call its FOO() method
+                                       old = elem[ ontype ];
+
+                                       if ( old ) {
+                                               elem[ ontype ] = null;
+                                       }
+
+                                       // Prevent re-triggering of the same event, since we already bubbled it above
+                                       jQuery.event.triggered = type;
+                                       elem[ type ]();
+                                       jQuery.event.triggered = undefined;
+
+                                       if ( old ) {
+                                               elem[ ontype ] = old;
+                                       }
+                               }
+                       }
+               }
+
+               return event.result;
+       },
+
+       dispatch: function( event ) {
+
+               // Make a writable jQuery.Event from the native event object
+               event = jQuery.event.fix( event || window.event );
+
+               var handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
+                       delegateCount = handlers.delegateCount,
+                       args = [].slice.call( arguments, 0 ),
+                       run_all = !event.exclusive && !event.namespace,
+                       handlerQueue = [],
+                       i, j, cur, jqcur, ret, selMatch, matched, matches, handleObj, sel, related;
+
+               // Use the fix-ed jQuery.Event rather than the (read-only) native event
+               args[0] = event;
+               event.delegateTarget = this;
+
+               // Determine handlers that should run if there are delegated events
+               // Avoid disabled elements in IE (#6911) and non-left-click bubbling in Firefox (#3861)
+               if ( delegateCount && !event.target.disabled && !(event.button && event.type === "click") ) {
+
+                       // Pregenerate a single jQuery object for reuse with .is()
+                       jqcur = jQuery(this);
+                       jqcur.context = this.ownerDocument || this;
+
+                       for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
+                               selMatch = {};
+                               matches = [];
+                               jqcur[0] = cur;
+                               for ( i = 0; i < delegateCount; i++ ) {
+                                       handleObj = handlers[ i ];
+                                       sel = handleObj.selector;
+
+                                       if ( selMatch[ sel ] === undefined ) {
+                                               selMatch[ sel ] = (
+                                                       handleObj.quick ? quickIs( cur, handleObj.quick ) : jqcur.is( sel )
+                                               );
+                                       }
+                                       if ( selMatch[ sel ] ) {
+                                               matches.push( handleObj );
+                                       }
+                               }
+                               if ( matches.length ) {
+                                       handlerQueue.push({ elem: cur, matches: matches });
+                               }
+                       }
+               }
+
+               // Add the remaining (directly-bound) handlers
+               if ( handlers.length > delegateCount ) {
+                       handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
+               }
+
+               // Run delegates first; they may want to stop propagation beneath us
+               for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
+                       matched = handlerQueue[ i ];
+                       event.currentTarget = matched.elem;
+
+                       for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
+                               handleObj = matched.matches[ j ];
+
+                               // Triggered event must either 1) be non-exclusive and have no namespace, or
+                               // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+                               if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
+
+                                       event.data = handleObj.data;
+                                       event.handleObj = handleObj;
+
+                                       ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+                                                       .apply( matched.elem, args );
+
+                                       if ( ret !== undefined ) {
+                                               event.result = ret;
+                                               if ( ret === false ) {
+                                                       event.preventDefault();
+                                                       event.stopPropagation();
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               return event.result;
+       },
+
+       // Includes some event props shared by KeyEvent and MouseEvent
+       // *** attrChange attrName relatedNode srcElement  are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
+       props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+       fixHooks: {},
+
+       keyHooks: {
+               props: "char charCode key keyCode".split(" "),
+               filter: function( event, original ) {
+
+                       // Add which for key events
+                       if ( event.which == null ) {
+                               event.which = original.charCode != null ? original.charCode : original.keyCode;
+                       }
+
+                       return event;
+               }
+       },
+
+       mouseHooks: {
+               props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+               filter: function( event, original ) {
+                       var eventDoc, doc, body,
+                               button = original.button,
+                               fromElement = original.fromElement;
+
+                       // Calculate pageX/Y if missing and clientX/Y available
+                       if ( event.pageX == null && original.clientX != null ) {
+                               eventDoc = event.target.ownerDocument || document;
+                               doc = eventDoc.documentElement;
+                               body = eventDoc.body;
+
+                               event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+                               event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
+                       }
+
+                       // Add relatedTarget, if necessary
+                       if ( !event.relatedTarget && fromElement ) {
+                               event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+                       }
+
+                       // Add which for click: 1 === left; 2 === middle; 3 === right
+                       // Note: button is not normalized, so don't use it
+                       if ( !event.which && button !== undefined ) {
+                               event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+                       }
+
+                       return event;
+               }
+       },
+
+       fix: function( event ) {
+               if ( event[ jQuery.expando ] ) {
+                       return event;
+               }
+
+               // Create a writable copy of the event object and normalize some properties
+               var i, prop,
+                       originalEvent = event,
+                       fixHook = jQuery.event.fixHooks[ event.type ] || {},
+                       copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+               event = jQuery.Event( originalEvent );
+
+               for ( i = copy.length; i; ) {
+                       prop = copy[ --i ];
+                       event[ prop ] = originalEvent[ prop ];
+               }
+
+               // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
+               if ( !event.target ) {
+                       event.target = originalEvent.srcElement || document;
+               }
+
+               // Target should not be a text node (#504, Safari)
+               if ( event.target.nodeType === 3 ) {
+                       event.target = event.target.parentNode;
+               }
+
+               // For mouse/key events; add metaKey if it's not there (#3368, IE6/7/8)
+               if ( event.metaKey === undefined ) {
+                       event.metaKey = event.ctrlKey;
+               }
+
+               return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
+       },
+
+       special: {
+               ready: {
+                       // Make sure the ready event is setup
+                       setup: jQuery.bindReady
+               },
+
+               load: {
+                       // Prevent triggered image.load events from bubbling to window.load
+                       noBubble: true
+               },
+
+               focus: {
+                       delegateType: "focusin"
+               },
+               blur: {
+                       delegateType: "focusout"
+               },
+
+               beforeunload: {
+                       setup: function( data, namespaces, eventHandle ) {
+                               // We only want to do this special case on windows
+                               if ( jQuery.isWindow( this ) ) {
+                                       this.onbeforeunload = eventHandle;
+                               }
+                       },
+
+                       teardown: function( namespaces, eventHandle ) {
+                               if ( this.onbeforeunload === eventHandle ) {
+                                       this.onbeforeunload = null;
+                               }
+                       }
+               }
+       },
+
+       simulate: function( type, elem, event, bubble ) {
+               // Piggyback on a donor event to simulate a different one.
+               // Fake originalEvent to avoid donor's stopPropagation, but if the
+               // simulated event prevents default then we do the same on the donor.
+               var e = jQuery.extend(
+                       new jQuery.Event(),
+                       event,
+                       { type: type,
+                               isSimulated: true,
+                               originalEvent: {}
+                       }
+               );
+               if ( bubble ) {
+                       jQuery.event.trigger( e, null, elem );
+               } else {
+                       jQuery.event.dispatch.call( elem, e );
+               }
+               if ( e.isDefaultPrevented() ) {
+                       event.preventDefault();
+               }
+       }
+};
+
+// Some plugins are using, but it's undocumented/deprecated and will be removed.
+// The 1.7 special event interface should provide all the hooks needed now.
+jQuery.event.handle = jQuery.event.dispatch;
+
+jQuery.removeEvent = document.removeEventListener ?
+       function( elem, type, handle ) {
+               if ( elem.removeEventListener ) {
+                       elem.removeEventListener( type, handle, false );
+               }
+       } :
+       function( elem, type, handle ) {
+               if ( elem.detachEvent ) {
+                       elem.detachEvent( "on" + type, handle );
+               }
+       };
+
+jQuery.Event = function( src, props ) {
+       // Allow instantiation without the 'new' keyword
+       if ( !(this instanceof jQuery.Event) ) {
+               return new jQuery.Event( src, props );
+       }
+
+       // Event object
+       if ( src && src.type ) {
+               this.originalEvent = src;
+               this.type = src.type;
+
+               // Events bubbling up the document may have been marked as prevented
+               // by a handler lower down the tree; reflect the correct value.
+               this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+                       src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+       // Event type
+       } else {
+               this.type = src;
+       }
+
+       // Put explicitly provided properties onto the event object
+       if ( props ) {
+               jQuery.extend( this, props );
+       }
+
+       // Create a timestamp if incoming event doesn't have one
+       this.timeStamp = src && src.timeStamp || jQuery.now();
+
+       // Mark it as fixed
+       this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+       return false;
+}
+function returnTrue() {
+       return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+       preventDefault: function() {
+               this.isDefaultPrevented = returnTrue;
+
+               var e = this.originalEvent;
+               if ( !e ) {
+                       return;
+               }
+
+               // if preventDefault exists run it on the original event
+               if ( e.preventDefault ) {
+                       e.preventDefault();
+
+               // otherwise set the returnValue property of the original event to false (IE)
+               } else {
+                       e.returnValue = false;
+               }
+       },
+       stopPropagation: function() {
+               this.isPropagationStopped = returnTrue;
+
+               var e = this.originalEvent;
+               if ( !e ) {
+                       return;
+               }
+               // if stopPropagation exists run it on the original event
+               if ( e.stopPropagation ) {
+                       e.stopPropagation();
+               }
+               // otherwise set the cancelBubble property of the original event to true (IE)
+               e.cancelBubble = true;
+       },
+       stopImmediatePropagation: function() {
+               this.isImmediatePropagationStopped = returnTrue;
+               this.stopPropagation();
+       },
+       isDefaultPrevented: returnFalse,
+       isPropagationStopped: returnFalse,
+       isImmediatePropagationStopped: returnFalse
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+       mouseenter: "mouseover",
+       mouseleave: "mouseout"
+}, function( orig, fix ) {
+       jQuery.event.special[ orig ] = {
+               delegateType: fix,
+               bindType: fix,
+
+               handle: function( event ) {
+                       var target = this,
+                               related = event.relatedTarget,
+                               handleObj = event.handleObj,
+                               selector = handleObj.selector,
+                               ret;
+
+                       // For mousenter/leave call the handler if related is outside the target.
+                       // NB: No relatedTarget if the mouse left/entered the browser window
+                       if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+                               event.type = handleObj.origType;
+                               ret = handleObj.handler.apply( this, arguments );
+                               event.type = fix;
+                       }
+                       return ret;
+               }
+       };
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+       jQuery.event.special.submit = {
+               setup: function() {
+                       // Only need this for delegated form submit events
+                       if ( jQuery.nodeName( this, "form" ) ) {
+                               return false;
+                       }
+
+                       // Lazy-add a submit handler when a descendant form may potentially be submitted
+                       jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+                               // Node name check avoids a VML-related crash in IE (#9807)
+                               var elem = e.target,
+                                       form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+                               if ( form && !form._submit_attached ) {
+                                       jQuery.event.add( form, "submit._submit", function( event ) {
+                                               // If form was submitted by the user, bubble the event up the tree
+                                               if ( this.parentNode && !event.isTrigger ) {
+                                                       jQuery.event.simulate( "submit", this.parentNode, event, true );
+                                               }
+                                       });
+                                       form._submit_attached = true;
+                               }
+                       });
+                       // return undefined since we don't need an event listener
+               },
+
+               teardown: function() {
+                       // Only need this for delegated form submit events
+                       if ( jQuery.nodeName( this, "form" ) ) {
+                               return false;
+                       }
+
+                       // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+                       jQuery.event.remove( this, "._submit" );
+               }
+       };
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+       jQuery.event.special.change = {
+
+               setup: function() {
+
+                       if ( rformElems.test( this.nodeName ) ) {
+                               // IE doesn't fire change on a check/radio until blur; trigger it on click
+                               // after a propertychange. Eat the blur-change in special.change.handle.
+                               // This still fires onchange a second time for check/radio after blur.
+                               if ( this.type === "checkbox" || this.type === "radio" ) {
+                                       jQuery.event.add( this, "propertychange._change", function( event ) {
+                                               if ( event.originalEvent.propertyName === "checked" ) {
+                                                       this._just_changed = true;
+                                               }
+                                       });
+                                       jQuery.event.add( this, "click._change", function( event ) {
+                                               if ( this._just_changed && !event.isTrigger ) {
+                                                       this._just_changed = false;
+                                                       jQuery.event.simulate( "change", this, event, true );
+                                               }
+                                       });
+                               }
+                               return false;
+                       }
+                       // Delegated event; lazy-add a change handler on descendant inputs
+                       jQuery.event.add( this, "beforeactivate._change", function( e ) {
+                               var elem = e.target;
+
+                               if ( rformElems.test( elem.nodeName ) && !elem._change_attached ) {
+                                       jQuery.event.add( elem, "change._change", function( event ) {
+                                               if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+                                                       jQuery.event.simulate( "change", this.parentNode, event, true );
+                                               }
+                                       });
+                                       elem._change_attached = true;
+                               }
+                       });
+               },
+
+               handle: function( event ) {
+                       var elem = event.target;
+
+                       // Swallow native change events from checkbox/radio, we already triggered them above
+                       if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+                               return event.handleObj.handler.apply( this, arguments );
+                       }
+               },
+
+               teardown: function() {
+                       jQuery.event.remove( this, "._change" );
+
+                       return rformElems.test( this.nodeName );
+               }
+       };
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+       jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+               // Attach a single capturing handler while someone wants focusin/focusout
+               var attaches = 0,
+                       handler = function( event ) {
+                               jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+                       };
+
+               jQuery.event.special[ fix ] = {
+                       setup: function() {
+                               if ( attaches++ === 0 ) {
+                                       document.addEventListener( orig, handler, true );
+                               }
+                       },
+                       teardown: function() {
+                               if ( --attaches === 0 ) {
+                                       document.removeEventListener( orig, handler, true );
+                               }
+                       }
+               };
+       });
+}
+
+jQuery.fn.extend({
+
+       on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+               var origFn, type;
+
+               // Types can be a map of types/handlers
+               if ( typeof types === "object" ) {
+                       // ( types-Object, selector, data )
+                       if ( typeof selector !== "string" ) {
+                               // ( types-Object, data )
+                               data = selector;
+                               selector = undefined;
+                       }
+                       for ( type in types ) {
+                               this.on( type, selector, data, types[ type ], one );
+                       }
+                       return this;
+               }
+
+               if ( data == null && fn == null ) {
+                       // ( types, fn )
+                       fn = selector;
+                       data = selector = undefined;
+               } else if ( fn == null ) {
+                       if ( typeof selector === "string" ) {
+                               // ( types, selector, fn )
+                               fn = data;
+                               data = undefined;
+                       } else {
+                               // ( types, data, fn )
+                               fn = data;
+                               data = selector;
+                               selector = undefined;
+                       }
+               }
+               if ( fn === false ) {
+                       fn = returnFalse;
+               } else if ( !fn ) {
+                       return this;
+               }
+
+               if ( one === 1 ) {
+                       origFn = fn;
+                       fn = function( event ) {
+                               // Can use an empty set, since event contains the info
+                               jQuery().off( event );
+                               return origFn.apply( this, arguments );
+                       };
+                       // Use same guid so caller can remove using origFn
+                       fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+               }
+               return this.each( function() {
+                       jQuery.event.add( this, types, fn, data, selector );
+               });
+       },
+       one: function( types, selector, data, fn ) {
+               return this.on.call( this, types, selector, data, fn, 1 );
+       },
+       off: function( types, selector, fn ) {
+               if ( types && types.preventDefault && types.handleObj ) {
+                       // ( event )  dispatched jQuery.Event
+                       var handleObj = types.handleObj;
+                       jQuery( types.delegateTarget ).off(
+                               handleObj.namespace? handleObj.type + "." + handleObj.namespace : handleObj.type,
+                               handleObj.selector,
+                               handleObj.handler
+                       );
+                       return this;
+               }
+               if ( typeof types === "object" ) {
+                       // ( types-object [, selector] )
+                       for ( var type in types ) {
+                               this.off( type, selector, types[ type ] );
+                       }
+                       return this;
+               }
+               if ( selector === false || typeof selector === "function" ) {
+                       // ( types [, fn] )
+                       fn = selector;
+                       selector = undefined;
+               }
+               if ( fn === false ) {
+                       fn = returnFalse;
+               }
+               return this.each(function() {
+                       jQuery.event.remove( this, types, fn, selector );
+               });
+       },
+
+       bind: function( types, data, fn ) {
+               return this.on( types, null, data, fn );
+       },
+       unbind: function( types, fn ) {
+               return this.off( types, null, fn );
+       },
+
+       live: function( types, data, fn ) {
+               jQuery( this.context ).on( types, this.selector, data, fn );
+               return this;
+       },
+       die: function( types, fn ) {
+               jQuery( this.context ).off( types, this.selector || "**", fn );
+               return this;
+       },
+
+       delegate: function( selector, types, data, fn ) {
+               return this.on( types, selector, data, fn );
+       },
+       undelegate: function( selector, types, fn ) {
+               // ( namespace ) or ( selector, types [, fn] )
+               return arguments.length == 1? this.off( selector, "**" ) : this.off( types, selector, fn );
+       },
+
+       trigger: function( type, data ) {
+               return this.each(function() {
+                       jQuery.event.trigger( type, data, this );
+               });
+       },
+       triggerHandler: function( type, data ) {
+               if ( this[0] ) {
+                       return jQuery.event.trigger( type, data, this[0], true );
+               }
+       },
+
+       toggle: function( fn ) {
+               // Save reference to arguments for access in closure
+               var args = arguments,
+                       guid = fn.guid || jQuery.guid++,
+                       i = 0,
+                       toggler = function( event ) {
+                               // Figure out which function to execute
+                               var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+                               jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+                               // Make sure that clicks stop
+                               event.preventDefault();
+
+                               // and execute the function
+                               return args[ lastToggle ].apply( this, arguments ) || false;
+                       };
+
+               // link all the functions, so any of them can unbind this click handler
+               toggler.guid = guid;
+               while ( i < args.length ) {
+                       args[ i++ ].guid = guid;
+               }
+
+               return this.click( toggler );
+       },
+
+       hover: function( fnOver, fnOut ) {
+               return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+       }
+});
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+       "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+       "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+       // Handle event binding
+       jQuery.fn[ name ] = function( data, fn ) {
+               if ( fn == null ) {
+                       fn = data;
+                       data = null;
+               }
+
+               return arguments.length > 0 ?
+                       this.on( name, null, data, fn ) :
+                       this.trigger( name );
+       };
+
+       if ( jQuery.attrFn ) {
+               jQuery.attrFn[ name ] = true;
+       }
+
+       if ( rkeyEvent.test( name ) ) {
+               jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
+       }
+
+       if ( rmouseEvent.test( name ) ) {
+               jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
+       }
+});
+
+
+
+/*!
+ * Sizzle CSS Selector Engine
+ *  Copyright 2011, The Dojo Foundation
+ *  Released under the MIT, BSD, and GPL Licenses.
+ *  More information: http://sizzlejs.com/
+ */
+(function(){
+
+var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+       expando = "sizcache" + (Math.random() + '').replace('.', ''),
+       done = 0,
+       toString = Object.prototype.toString,
+       hasDuplicate = false,
+       baseHasDuplicate = true,
+       rBackslash = /\\/g,
+       rReturn = /\r\n/g,
+       rNonWord = /\W/;
+
+// Here we check if the JavaScript engine is using some sort of
+// optimization where it does not always call our comparision
+// function. If that is the case, discard the hasDuplicate value.
+//   Thus far that includes Google Chrome.
+[0, 0].sort(function() {
+       baseHasDuplicate = false;
+       return 0;
+});
+
+var Sizzle = function( selector, context, results, seed ) {
+       results = results || [];
+       context = context || document;
+
+       var origContext = context;
+
+       if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
+               return [];
+       }
+       
+       if ( !selector || typeof selector !== "string" ) {
+               return results;
+       }
+
+       var m, set, checkSet, extra, ret, cur, pop, i,
+               prune = true,
+               contextXML = Sizzle.isXML( context ),
+               parts = [],
+               soFar = selector;
+       
+       // Reset the position of the chunker regexp (start from head)
+       do {
+               chunker.exec( "" );
+               m = chunker.exec( soFar );
+
+               if ( m ) {
+                       soFar = m[3];
+               
+                       parts.push( m[1] );
+               
+                       if ( m[2] ) {
+                               extra = m[3];
+                               break;
+                       }
+               }
+       } while ( m );
+
+       if ( parts.length > 1 && origPOS.exec( selector ) ) {
+
+               if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
+                       set = posProcess( parts[0] + parts[1], context, seed );
+
+               } else {
+                       set = Expr.relative[ parts[0] ] ?
+                               [ context ] :
+                               Sizzle( parts.shift(), context );
+
+                       while ( parts.length ) {
+                               selector = parts.shift();
+
+                               if ( Expr.relative[ selector ] ) {
+                                       selector += parts.shift();
+                               }
+                               
+                               set = posProcess( selector, set, seed );
+                       }
+               }
+
+       } else {
+               // Take a shortcut and set the context if the root selector is an ID
+               // (but not if it'll be faster if the inner selector is an ID)
+               if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
+                               Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
+
+                       ret = Sizzle.find( parts.shift(), context, contextXML );
+                       context = ret.expr ?
+                               Sizzle.filter( ret.expr, ret.set )[0] :
+                               ret.set[0];
+               }
+
+               if ( context ) {
+                       ret = seed ?
+                               { expr: parts.pop(), set: makeArray(seed) } :
+                               Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
+
+                       set = ret.expr ?
+                               Sizzle.filter( ret.expr, ret.set ) :
+                               ret.set;
+
+                       if ( parts.length > 0 ) {
+                               checkSet = makeArray( set );
+
+                       } else {
+                               prune = false;
+                       }
+
+                       while ( parts.length ) {
+                               cur = parts.pop();
+                               pop = cur;
+
+                               if ( !Expr.relative[ cur ] ) {
+                                       cur = "";
+                               } else {
+                                       pop = parts.pop();
+                               }
+
+                               if ( pop == null ) {
+                                       pop = context;
+                               }
+
+                               Expr.relative[ cur ]( checkSet, pop, contextXML );
+                       }
+
+               } else {
+                       checkSet = parts = [];
+               }
+       }
+
+       if ( !checkSet ) {
+               checkSet = set;
+       }
+
+       if ( !checkSet ) {
+               Sizzle.error( cur || selector );
+       }
+
+       if ( toString.call(checkSet) === "[object Array]" ) {
+               if ( !prune ) {
+                       results.push.apply( results, checkSet );
+
+               } else if ( context && context.nodeType === 1 ) {
+                       for ( i = 0; checkSet[i] != null; i++ ) {
+                               if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
+                                       results.push( set[i] );
+                               }
+                       }
+
+               } else {
+                       for ( i = 0; checkSet[i] != null; i++ ) {
+                               if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
+                                       results.push( set[i] );
+                               }
+                       }
+               }
+
+       } else {
+               makeArray( checkSet, results );
+       }
+
+       if ( extra ) {
+               Sizzle( extra, origContext, results, seed );
+               Sizzle.uniqueSort( results );
+       }
+
+       return results;
+};
+
+Sizzle.uniqueSort = function( results ) {
+       if ( sortOrder ) {
+               hasDuplicate = baseHasDuplicate;
+               results.sort( sortOrder );
+
+               if ( hasDuplicate ) {
+                       for ( var i = 1; i < results.length; i++ ) {
+                               if ( results[i] === results[ i - 1 ] ) {
+                                       results.splice( i--, 1 );
+                               }
+                       }
+               }
+       }
+
+       return results;
+};
+
+Sizzle.matches = function( expr, set ) {
+       return Sizzle( expr, null, null, set );
+};
+
+Sizzle.matchesSelector = function( node, expr ) {
+       return Sizzle( expr, null, null, [node] ).length > 0;
+};
+
+Sizzle.find = function( expr, context, isXML ) {
+       var set, i, len, match, type, left;
+
+       if ( !expr ) {
+               return [];
+       }
+
+       for ( i = 0, len = Expr.order.length; i < len; i++ ) {
+               type = Expr.order[i];
+               
+               if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
+                       left = match[1];
+                       match.splice( 1, 1 );
+
+                       if ( left.substr( left.length - 1 ) !== "\\" ) {
+                               match[1] = (match[1] || "").replace( rBackslash, "" );
+                               set = Expr.find[ type ]( match, context, isXML );
+
+                               if ( set != null ) {
+                                       expr = expr.replace( Expr.match[ type ], "" );
+                                       break;
+                               }
+                       }
+               }
+       }
+
+       if ( !set ) {
+               set = typeof context.getElementsByTagName !== "undefined" ?
+                       context.getElementsByTagName( "*" ) :
+                       [];
+       }
+
+       return { set: set, expr: expr };
+};
+
+Sizzle.filter = function( expr, set, inplace, not ) {
+       var match, anyFound,
+               type, found, item, filter, left,
+               i, pass,
+               old = expr,
+               result = [],
+               curLoop = set,
+               isXMLFilter = set && set[0] && Sizzle.isXML( set[0] );
+
+       while ( expr && set.length ) {
+               for ( type in Expr.filter ) {
+                       if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
+                               filter = Expr.filter[ type ];
+                               left = match[1];
+
+                               anyFound = false;
+
+                               match.splice(1,1);
+
+                               if ( left.substr( left.length - 1 ) === "\\" ) {
+                                       continue;
+                               }
+
+                               if ( curLoop === result ) {
+                                       result = [];
+                               }
+
+                               if ( Expr.preFilter[ type ] ) {
+                                       match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
+
+                                       if ( !match ) {
+                                               anyFound = found = true;
+
+                                       } else if ( match === true ) {
+                                               continue;
+                                       }
+                               }
+
+                               if ( match ) {
+                                       for ( i = 0; (item = curLoop[i]) != null; i++ ) {
+                                               if ( item ) {
+                                                       found = filter( item, match, i, curLoop );
+                                                       pass = not ^ found;
+
+                                                       if ( inplace && found != null ) {
+                                                               if ( pass ) {
+                                                                       anyFound = true;
+
+                                                               } else {
+                                                                       curLoop[i] = false;
+                                                               }
+
+                                                       } else if ( pass ) {
+                                                               result.push( item );
+                                                               anyFound = true;
+                                                       }
+                                               }
+                                       }
+                               }
+
+                               if ( found !== undefined ) {
+                                       if ( !inplace ) {
+                                               curLoop = result;
+                                       }
+
+                                       expr = expr.replace( Expr.match[ type ], "" );
+
+                                       if ( !anyFound ) {
+                                               return [];
+                                       }
+
+                                       break;
+                               }
+                       }
+               }
+
+               // Improper expression
+               if ( expr === old ) {
+                       if ( anyFound == null ) {
+                               Sizzle.error( expr );
+
+                       } else {
+                               break;
+                       }
+               }
+
+               old = expr;
+       }
+
+       return curLoop;
+};
+
+Sizzle.error = function( msg ) {
+       throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Utility function for retreiving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+var getText = Sizzle.getText = function( elem ) {
+    var i, node,
+               nodeType = elem.nodeType,
+               ret = "";
+
+       if ( nodeType ) {
+               if ( nodeType === 1 || nodeType === 9 ) {
+                       // Use textContent || innerText for elements
+                       if ( typeof elem.textContent === 'string' ) {
+                               return elem.textContent;
+                       } else if ( typeof elem.innerText === 'string' ) {
+                               // Replace IE's carriage returns
+                               return elem.innerText.replace( rReturn, '' );
+                       } else {
+                               // Traverse it's children
+                               for ( elem = elem.firstChild; elem; elem = elem.nextSibling) {
+                                       ret += getText( elem );
+                               }
+                       }
+               } else if ( nodeType === 3 || nodeType === 4 ) {
+                       return elem.nodeValue;
+               }
+       } else {
+
+               // If no nodeType, this is expected to be an array
+               for ( i = 0; (node = elem[i]); i++ ) {
+                       // Do not traverse comment nodes
+                       if ( node.nodeType !== 8 ) {
+                               ret += getText( node );
+                       }
+               }
+       }
+       return ret;
+};
+
+var Expr = Sizzle.selectors = {
+       order: [ "ID", "NAME", "TAG" ],
+
+       match: {
+               ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+               CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
+               NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
+               ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
+               TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
+               CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
+               POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
+               PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
+       },
+
+       leftMatch: {},
+
+       attrMap: {
+               "class": "className",
+               "for": "htmlFor"
+       },
+
+       attrHandle: {
+               href: function( elem ) {
+                       return elem.getAttribute( "href" );
+               },
+               type: function( elem ) {
+                       return elem.getAttribute( "type" );
+               }
+       },
+
+       relative: {
+               "+": function(checkSet, part){
+                       var isPartStr = typeof part === "string",
+                               isTag = isPartStr && !rNonWord.test( part ),
+                               isPartStrNotTag = isPartStr && !isTag;
+
+                       if ( isTag ) {
+                               part = part.toLowerCase();
+                       }
+
+                       for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
+                               if ( (elem = checkSet[i]) ) {
+                                       while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
+
+                                       checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
+                                               elem || false :
+                                               elem === part;
+                               }
+                       }
+
+                       if ( isPartStrNotTag ) {
+                               Sizzle.filter( part, checkSet, true );
+                       }
+               },
+
+               ">": function( checkSet, part ) {
+                       var elem,
+                               isPartStr = typeof part === "string",
+                               i = 0,
+                               l = checkSet.length;
+
+                       if ( isPartStr && !rNonWord.test( part ) ) {
+                               part = part.toLowerCase();
+
+                               for ( ; i < l; i++ ) {
+                                       elem = checkSet[i];
+
+                                       if ( elem ) {
+                                               var parent = elem.parentNode;
+                                               checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
+                                       }
+                               }
+
+                       } else {
+                               for ( ; i < l; i++ ) {
+                                       elem = checkSet[i];
+
+                                       if ( elem ) {
+                                               checkSet[i] = isPartStr ?
+                                                       elem.parentNode :
+                                                       elem.parentNode === part;
+                                       }
+                               }
+
+                               if ( isPartStr ) {
+                                       Sizzle.filter( part, checkSet, true );
+                               }
+                       }
+               },
+
+               "": function(checkSet, part, isXML){
+                       var nodeCheck,
+                               doneName = done++,
+                               checkFn = dirCheck;
+
+                       if ( typeof part === "string" && !rNonWord.test( part ) ) {
+                               part = part.toLowerCase();
+                               nodeCheck = part;
+                               checkFn = dirNodeCheck;
+                       }
+
+                       checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML );
+               },
+
+               "~": function( checkSet, part, isXML ) {
+                       var nodeCheck,
+                               doneName = done++,
+                               checkFn = dirCheck;
+
+                       if ( typeof part === "string" && !rNonWord.test( part ) ) {
+                               part = part.toLowerCase();
+                               nodeCheck = part;
+                               checkFn = dirNodeCheck;
+                       }
+
+                       checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML );
+               }
+       },
+
+       find: {
+               ID: function( match, context, isXML ) {
+                       if ( typeof context.getElementById !== "undefined" && !isXML ) {
+                               var m = context.getElementById(match[1]);
+                               // Check parentNode to catch when Blackberry 4.6 returns
+                               // nodes that are no longer in the document #6963
+                               return m && m.parentNode ? [m] : [];
+                       }
+               },
+
+               NAME: function( match, context ) {
+                       if ( typeof context.getElementsByName !== "undefined" ) {
+                               var ret = [],
+                                       results = context.getElementsByName( match[1] );
+
+                               for ( var i = 0, l = results.length; i < l; i++ ) {
+                                       if ( results[i].getAttribute("name") === match[1] ) {
+                                               ret.push( results[i] );
+                                       }
+                               }
+
+                               return ret.length === 0 ? null : ret;
+                       }
+               },
+
+               TAG: function( match, context ) {
+                       if ( typeof context.getElementsByTagName !== "undefined" ) {
+                               return context.getElementsByTagName( match[1] );
+                       }
+               }
+       },
+       preFilter: {
+               CLASS: function( match, curLoop, inplace, result, not, isXML ) {
+                       match = " " + match[1].replace( rBackslash, "" ) + " ";
+
+                       if ( isXML ) {
+                               return match;
+                       }
+
+                       for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
+                               if ( elem ) {
+                                       if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) {
+                                               if ( !inplace ) {
+                                                       result.push( elem );
+                                               }
+
+                                       } else if ( inplace ) {
+                                               curLoop[i] = false;
+                                       }
+                               }
+                       }
+
+                       return false;
+               },
+
+               ID: function( match ) {
+                       return match[1].replace( rBackslash, "" );
+               },
+
+               TAG: function( match, curLoop ) {
+                       return match[1].replace( rBackslash, "" ).toLowerCase();
+               },
+
+               CHILD: function( match ) {
+                       if ( match[1] === "nth" ) {
+                               if ( !match[2] ) {
+                                       Sizzle.error( match[0] );
+                               }
+
+                               match[2] = match[2].replace(/^\+|\s*/g, '');
+
+                               // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
+                               var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(
+                                       match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
+                                       !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
+
+                               // calculate the numbers (first)n+(last) including if they are negative
+                               match[2] = (test[1] + (test[2] || 1)) - 0;
+                               match[3] = test[3] - 0;
+                       }
+                       else if ( match[2] ) {
+                               Sizzle.error( match[0] );
+                       }
+
+                       // TODO: Move to normal caching system
+                       match[0] = done++;
+
+                       return match;
+               },
+
+               ATTR: function( match, curLoop, inplace, result, not, isXML ) {
+                       var name = match[1] = match[1].replace( rBackslash, "" );
+                       
+                       if ( !isXML && Expr.attrMap[name] ) {
+                               match[1] = Expr.attrMap[name];
+                       }
+
+                       // Handle if an un-quoted value was used
+                       match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" );
+
+                       if ( match[2] === "~=" ) {
+                               match[4] = " " + match[4] + " ";
+                       }
+
+                       return match;
+               },
+
+               PSEUDO: function( match, curLoop, inplace, result, not ) {
+                       if ( match[1] === "not" ) {
+                               // If we're dealing with a complex expression, or a simple one
+                               if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
+                                       match[3] = Sizzle(match[3], null, null, curLoop);
+
+                               } else {
+                                       var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
+
+                                       if ( !inplace ) {
+                                               result.push.apply( result, ret );
+                                       }
+
+                                       return false;
+                               }
+
+                       } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
+                               return true;
+                       }
+                       
+                       return match;
+               },
+
+               POS: function( match ) {
+                       match.unshift( true );
+
+                       return match;
+               }
+       },
+       
+       filters: {
+               enabled: function( elem ) {
+                       return elem.disabled === false && elem.type !== "hidden";
+               },
+
+               disabled: function( elem ) {
+                       return elem.disabled === true;
+               },
+
+               checked: function( elem ) {
+                       return elem.checked === true;
+               },
+               
+               selected: function( elem ) {
+                       // Accessing this property makes selected-by-default
+                       // options in Safari work properly
+                       if ( elem.parentNode ) {
+                               elem.parentNode.selectedIndex;
+                       }
+                       
+                       return elem.selected === true;
+               },
+
+               parent: function( elem ) {
+                       return !!elem.firstChild;
+               },
+
+               empty: function( elem ) {
+                       return !elem.firstChild;
+               },
+
+               has: function( elem, i, match ) {
+                       return !!Sizzle( match[3], elem ).length;
+               },
+
+               header: function( elem ) {
+                       return (/h\d/i).test( elem.nodeName );
+               },
+
+               text: function( elem ) {
+                       var attr = elem.getAttribute( "type" ), type = elem.type;
+                       // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) 
+                       // use getAttribute instead to test this case
+                       return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
+               },
+
+               radio: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
+               },
+
+               checkbox: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
+               },
+
+               file: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
+               },
+
+               password: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
+               },
+
+               submit: function( elem ) {
+                       var name = elem.nodeName.toLowerCase();
+                       return (name === "input" || name === "button") && "submit" === elem.type;
+               },
+
+               image: function( elem ) {
+                       return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
+               },
+
+               reset: function( elem ) {
+                       var name = elem.nodeName.toLowerCase();
+                       return (name === "input" || name === "button") && "reset" === elem.type;
+               },
+
+               button: function( elem ) {
+                       var name = elem.nodeName.toLowerCase();
+                       return name === "input" && "button" === elem.type || name === "button";
+               },
+
+               input: function( elem ) {
+                       return (/input|select|textarea|button/i).test( elem.nodeName );
+               },
+
+               focus: function( elem ) {
+                       return elem === elem.ownerDocument.activeElement;
+               }
+       },
+       setFilters: {
+               first: function( elem, i ) {
+                       return i === 0;
+               },
+
+               last: function( elem, i, match, array ) {
+                       return i === array.length - 1;
+               },
+
+               even: function( elem, i ) {
+                       return i % 2 === 0;
+               },
+
+               odd: function( elem, i ) {
+                       return i % 2 === 1;
+               },
+
+               lt: function( elem, i, match ) {
+                       return i < match[3] - 0;
+               },
+
+               gt: function( elem, i, match ) {
+                       return i > match[3] - 0;
+               },
+
+               nth: function( elem, i, match ) {
+                       return match[3] - 0 === i;
+               },
+
+               eq: function( elem, i, match ) {
+                       return match[3] - 0 === i;
+               }
+       },
+       filter: {
+               PSEUDO: function( elem, match, i, array ) {
+                       var name = match[1],
+                               filter = Expr.filters[ name ];
+
+                       if ( filter ) {
+                               return filter( elem, i, match, array );
+
+                       } else if ( name === "contains" ) {
+                               return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
+
+                       } else if ( name === "not" ) {
+                               var not = match[3];
+
+                               for ( var j = 0, l = not.length; j < l; j++ ) {
+                                       if ( not[j] === elem ) {
+                                               return false;
+                                       }
+                               }
+
+                               return true;
+
+                       } else {
+                               Sizzle.error( name );
+                       }
+               },
+
+               CHILD: function( elem, match ) {
+                       var first, last,
+                               doneName, parent, cache,
+                               count, diff,
+                               type = match[1],
+                               node = elem;
+
+                       switch ( type ) {
+                               case "only":
+                               case "first":
+                                       while ( (node = node.previousSibling) )  {
+                                               if ( node.nodeType === 1 ) { 
+                                                       return false; 
+                                               }
+                                       }
+
+                                       if ( type === "first" ) { 
+                                               return true; 
+                                       }
+
+                                       node = elem;
+
+                               case "last":
+                                       while ( (node = node.nextSibling) )      {
+                                               if ( node.nodeType === 1 ) { 
+                                                       return false; 
+                                               }
+                                       }
+
+                                       return true;
+
+                               case "nth":
+                                       first = match[2];
+                                       last = match[3];
+
+                                       if ( first === 1 && last === 0 ) {
+                                               return true;
+                                       }
+                                       
+                                       doneName = match[0];
+                                       parent = elem.parentNode;
+       
+                                       if ( parent && (parent[ expando ] !== doneName || !elem.nodeIndex) ) {
+                                               count = 0;
+                                               
+                                               for ( node = parent.firstChild; node; node = node.nextSibling ) {
+                                                       if ( node.nodeType === 1 ) {
+                                                               node.nodeIndex = ++count;
+                                                       }
+                                               } 
+
+                                               parent[ expando ] = doneName;
+                                       }
+                                       
+                                       diff = elem.nodeIndex - last;
+
+                                       if ( first === 0 ) {
+                                               return diff === 0;
+
+                                       } else {
+                                               return ( diff % first === 0 && diff / first >= 0 );
+                                       }
+                       }
+               },
+
+               ID: function( elem, match ) {
+                       return elem.nodeType === 1 && elem.getAttribute("id") === match;
+               },
+
+               TAG: function( elem, match ) {
+                       return (match === "*" && elem.nodeType === 1) || !!elem.nodeName && elem.nodeName.toLowerCase() === match;
+               },
+               
+               CLASS: function( elem, match ) {
+                       return (" " + (elem.className || elem.getAttribute("class")) + " ")
+                               .indexOf( match ) > -1;
+               },
+
+               ATTR: function( elem, match ) {
+                       var name = match[1],
+                               result = Sizzle.attr ?
+                                       Sizzle.attr( elem, name ) :
+                                       Expr.attrHandle[ name ] ?
+                                       Expr.attrHandle[ name ]( elem ) :
+                                       elem[ name ] != null ?
+                                               elem[ name ] :
+                                               elem.getAttribute( name ),
+                               value = result + "",
+                               type = match[2],
+                               check = match[4];
+
+                       return result == null ?
+                               type === "!=" :
+                               !type && Sizzle.attr ?
+                               result != null :
+                               type === "=" ?
+                               value === check :
+                               type === "*=" ?
+                               value.indexOf(check) >= 0 :
+                               type === "~=" ?
+                               (" " + value + " ").indexOf(check) >= 0 :
+                               !check ?
+                               value && result !== false :
+                               type === "!=" ?
+                               value !== check :
+                               type === "^=" ?
+                               value.indexOf(check) === 0 :
+                               type === "$=" ?
+                               value.substr(value.length - check.length) === check :
+                               type === "|=" ?
+                               value === check || value.substr(0, check.length + 1) === check + "-" :
+                               false;
+               },
+
+               POS: function( elem, match, i, array ) {
+                       var name = match[2],
+                               filter = Expr.setFilters[ name ];
+
+                       if ( filter ) {
+                               return filter( elem, i, match, array );
+                       }
+               }
+       }
+};
+
+var origPOS = Expr.match.POS,
+       fescape = function(all, num){
+               return "\\" + (num - 0 + 1);
+       };
+
+for ( var type in Expr.match ) {
+       Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) );
+       Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) );
+}
+
+var makeArray = function( array, results ) {
+       array = Array.prototype.slice.call( array, 0 );
+
+       if ( results ) {
+               results.push.apply( results, array );
+               return results;
+       }
+       
+       return array;
+};
+
+// Perform a simple check to determine if the browser is capable of
+// converting a NodeList to an array using builtin methods.
+// Also verifies that the returned array holds DOM nodes
+// (which is not the case in the Blackberry browser)
+try {
+       Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType;
+
+// Provide a fallback method if it does not work
+} catch( e ) {
+       makeArray = function( array, results ) {
+               var i = 0,
+                       ret = results || [];
+
+               if ( toString.call(array) === "[object Array]" ) {
+                       Array.prototype.push.apply( ret, array );
+
+               } else {
+                       if ( typeof array.length === "number" ) {
+                               for ( var l = array.length; i < l; i++ ) {
+                                       ret.push( array[i] );
+                               }
+
+                       } else {
+                               for ( ; array[i]; i++ ) {
+                                       ret.push( array[i] );
+                               }
+                       }
+               }
+
+               return ret;
+       };
+}
+
+var sortOrder, siblingCheck;
+
+if ( document.documentElement.compareDocumentPosition ) {
+       sortOrder = function( a, b ) {
+               if ( a === b ) {
+                       hasDuplicate = true;
+                       return 0;
+               }
+
+               if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
+                       return a.compareDocumentPosition ? -1 : 1;
+               }
+
+               return a.compareDocumentPosition(b) & 4 ? -1 : 1;
+       };
+
+} else {
+       sortOrder = function( a, b ) {
+               // The nodes are identical, we can exit early
+               if ( a === b ) {
+                       hasDuplicate = true;
+                       return 0;
+
+               // Fallback to using sourceIndex (in IE) if it's available on both nodes
+               } else if ( a.sourceIndex && b.sourceIndex ) {
+                       return a.sourceIndex - b.sourceIndex;
+               }
+
+               var al, bl,
+                       ap = [],
+                       bp = [],
+                       aup = a.parentNode,
+                       bup = b.parentNode,
+                       cur = aup;
+
+               // If the nodes are siblings (or identical) we can do a quick check
+               if ( aup === bup ) {
+                       return siblingCheck( a, b );
+
+               // If no parents were found then the nodes are disconnected
+               } else if ( !aup ) {
+                       return -1;
+
+               } else if ( !bup ) {
+                       return 1;
+               }
+
+               // Otherwise they're somewhere else in the tree so we need
+               // to build up a full list of the parentNodes for comparison
+               while ( cur ) {
+                       ap.unshift( cur );
+                       cur = cur.parentNode;
+               }
+
+               cur = bup;
+
+               while ( cur ) {
+                       bp.unshift( cur );
+                       cur = cur.parentNode;
+               }
+
+               al = ap.length;
+               bl = bp.length;
+
+               // Start walking down the tree looking for a discrepancy
+               for ( var i = 0; i < al && i < bl; i++ ) {
+                       if ( ap[i] !== bp[i] ) {
+                               return siblingCheck( ap[i], bp[i] );
+                       }
+               }
+
+               // We ended someplace up the tree so do a sibling check
+               return i === al ?
+                       siblingCheck( a, bp[i], -1 ) :
+                       siblingCheck( ap[i], b, 1 );
+       };
+
+       siblingCheck = function( a, b, ret ) {
+               if ( a === b ) {
+                       return ret;
+               }
+
+               var cur = a.nextSibling;
+
+               while ( cur ) {
+                       if ( cur === b ) {
+                               return -1;
+                       }
+
+                       cur = cur.nextSibling;
+               }
+
+               return 1;
+       };
+}
+
+// Check to see if the browser returns elements by name when
+// querying by getElementById (and provide a workaround)
+(function(){
+       // We're going to inject a fake input element with a specified name
+       var form = document.createElement("div"),
+               id = "script" + (new Date()).getTime(),
+               root = document.documentElement;
+
+       form.innerHTML = "<a name='" + id + "'/>";
+
+       // Inject it into the root element, check its status, and remove it quickly
+       root.insertBefore( form, root.firstChild );
+
+       // The workaround has to do additional checks after a getElementById
+       // Which slows things down for other browsers (hence the branching)
+       if ( document.getElementById( id ) ) {
+               Expr.find.ID = function( match, context, isXML ) {
+                       if ( typeof context.getElementById !== "undefined" && !isXML ) {
+                               var m = context.getElementById(match[1]);
+
+                               return m ?
+                                       m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ?
+                                               [m] :
+                                               undefined :
+                                       [];
+                       }
+               };
+
+               Expr.filter.ID = function( elem, match ) {
+                       var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
+
+                       return elem.nodeType === 1 && node && node.nodeValue === match;
+               };
+       }
+
+       root.removeChild( form );
+
+       // release memory in IE
+       root = form = null;
+})();
+
+(function(){
+       // Check to see if the browser returns only elements
+       // when doing getElementsByTagName("*")
+
+       // Create a fake element
+       var div = document.createElement("div");
+       div.appendChild( document.createComment("") );
+
+       // Make sure no comments are found
+       if ( div.getElementsByTagName("*").length > 0 ) {
+               Expr.find.TAG = function( match, context ) {
+                       var results = context.getElementsByTagName( match[1] );
+
+                       // Filter out possible comments
+                       if ( match[1] === "*" ) {
+                               var tmp = [];
+
+                               for ( var i = 0; results[i]; i++ ) {
+                                       if ( results[i].nodeType === 1 ) {
+                                               tmp.push( results[i] );
+                                       }
+                               }
+
+                               results = tmp;
+                       }
+
+                       return results;
+               };
+       }
+
+       // Check to see if an attribute returns normalized href attributes
+       div.innerHTML = "<a href='#'></a>";
+
+       if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
+                       div.firstChild.getAttribute("href") !== "#" ) {
+
+               Expr.attrHandle.href = function( elem ) {
+                       return elem.getAttribute( "href", 2 );
+               };
+       }
+
+       // release memory in IE
+       div = null;
+})();
+
+if ( document.querySelectorAll ) {
+       (function(){
+               var oldSizzle = Sizzle,
+                       div = document.createElement("div"),
+                       id = "__sizzle__";
+
+               div.innerHTML = "<p class='TEST'></p>";
+
+               // Safari can't handle uppercase or unicode characters when
+               // in quirks mode.
+               if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
+                       return;
+               }
+       
+               Sizzle = function( query, context, extra, seed ) {
+                       context = context || document;
+
+                       // Only use querySelectorAll on non-XML documents
+                       // (ID selectors don't work in non-HTML documents)
+                       if ( !seed && !Sizzle.isXML(context) ) {
+                               // See if we find a selector to speed up
+                               var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query );
+                               
+                               if ( match && (context.nodeType === 1 || context.nodeType === 9) ) {
+                                       // Speed-up: Sizzle("TAG")
+                                       if ( match[1] ) {
+                                               return makeArray( context.getElementsByTagName( query ), extra );
+                                       
+                                       // Speed-up: Sizzle(".CLASS")
+                                       } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) {
+                                               return makeArray( context.getElementsByClassName( match[2] ), extra );
+                                       }
+                               }
+                               
+                               if ( context.nodeType === 9 ) {
+                                       // Speed-up: Sizzle("body")
+                                       // The body element only exists once, optimize finding it
+                                       if ( query === "body" && context.body ) {
+                                               return makeArray( [ context.body ], extra );
+                                               
+                                       // Speed-up: Sizzle("#ID")
+                                       } else if ( match && match[3] ) {
+                                               var elem = context.getElementById( match[3] );
+
+                                               // Check parentNode to catch when Blackberry 4.6 returns
+                                               // nodes that are no longer in the document #6963
+                                               if ( elem && elem.parentNode ) {
+                                                       // Handle the case where IE and Opera return items
+                                                       // by name instead of ID
+                                                       if ( elem.id === match[3] ) {
+                                                               return makeArray( [ elem ], extra );
+                                                       }
+                                                       
+                                               } else {
+                                                       return makeArray( [], extra );
+                                               }
+                                       }
+                                       
+                                       try {
+                                               return makeArray( context.querySelectorAll(query), extra );
+                                       } catch(qsaError) {}
+
+                               // qSA works strangely on Element-rooted queries
+                               // We can work around this by specifying an extra ID on the root
+                               // and working up from there (Thanks to Andrew Dupont for the technique)
+                               // IE 8 doesn't work on object elements
+                               } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+                                       var oldContext = context,
+                                               old = context.getAttribute( "id" ),
+                                               nid = old || id,
+                                               hasParent = context.parentNode,
+                                               relativeHierarchySelector = /^\s*[+~]/.test( query );
+
+                                       if ( !old ) {
+                                               context.setAttribute( "id", nid );
+                                       } else {
+                                               nid = nid.replace( /'/g, "\\$&" );
+                                       }
+                                       if ( relativeHierarchySelector && hasParent ) {
+                                               context = context.parentNode;
+                                       }
+
+                                       try {
+                                               if ( !relativeHierarchySelector || hasParent ) {
+                                                       return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra );
+                                               }
+
+                                       } catch(pseudoError) {
+                                       } finally {
+                                               if ( !old ) {
+                                                       oldContext.removeAttribute( "id" );
+                                               }
+                                       }
+                               }
+                       }
+               
+                       return oldSizzle(query, context, extra, seed);
+               };
+
+               for ( var prop in oldSizzle ) {
+                       Sizzle[ prop ] = oldSizzle[ prop ];
+               }
+
+               // release memory in IE
+               div = null;
+       })();
+}
+
+(function(){
+       var html = document.documentElement,
+               matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector;
+
+       if ( matches ) {
+               // Check to see if it's possible to do matchesSelector
+               // on a disconnected node (IE 9 fails this)
+               var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ),
+                       pseudoWorks = false;
+
+               try {
+                       // This should fail with an exception
+                       // Gecko does not error, returns false instead
+                       matches.call( document.documentElement, "[test!='']:sizzle" );
+       
+               } catch( pseudoError ) {
+                       pseudoWorks = true;
+               }
+
+               Sizzle.matchesSelector = function( node, expr ) {
+                       // Make sure that attribute selectors are quoted
+                       expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
+
+                       if ( !Sizzle.isXML( node ) ) {
+                               try { 
+                                       if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) {
+                                               var ret = matches.call( node, expr );
+
+                                               // IE 9's matchesSelector returns false on disconnected nodes
+                                               if ( ret || !disconnectedMatch ||
+                                                               // As well, disconnected nodes are said to be in a document
+                                                               // fragment in IE 9, so check for that
+                                                               node.document && node.document.nodeType !== 11 ) {
+                                                       return ret;
+                                               }
+                                       }
+                               } catch(e) {}
+                       }
+
+                       return Sizzle(expr, null, null, [node]).length > 0;
+               };
+       }
+})();
+
+(function(){
+       var div = document.createElement("div");
+
+       div.innerHTML = "<div class='test e'></div><div class='test'></div>";
+
+       // Opera can't find a second classname (in 9.6)
+       // Also, make sure that getElementsByClassName actually exists
+       if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
+               return;
+       }
+
+       // Safari caches class attributes, doesn't catch changes (in 3.2)
+       div.lastChild.className = "e";
+
+       if ( div.getElementsByClassName("e").length === 1 ) {
+               return;
+       }
+       
+       Expr.order.splice(1, 0, "CLASS");
+       Expr.find.CLASS = function( match, context, isXML ) {
+               if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
+                       return context.getElementsByClassName(match[1]);
+               }
+       };
+
+       // release memory in IE
+       div = null;
+})();
+
+function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+       for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+               var elem = checkSet[i];
+
+               if ( elem ) {
+                       var match = false;
+
+                       elem = elem[dir];
+
+                       while ( elem ) {
+                               if ( elem[ expando ] === doneName ) {
+                                       match = checkSet[elem.sizset];
+                                       break;
+                               }
+
+                               if ( elem.nodeType === 1 && !isXML ){
+                                       elem[ expando ] = doneName;
+                                       elem.sizset = i;
+                               }
+
+                               if ( elem.nodeName.toLowerCase() === cur ) {
+                                       match = elem;
+                                       break;
+                               }
+
+                               elem = elem[dir];
+                       }
+
+                       checkSet[i] = match;
+               }
+       }
+}
+
+function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
+       for ( var i = 0, l = checkSet.length; i < l; i++ ) {
+               var elem = checkSet[i];
+
+               if ( elem ) {
+                       var match = false;
+                       
+                       elem = elem[dir];
+
+                       while ( elem ) {
+                               if ( elem[ expando ] === doneName ) {
+                                       match = checkSet[elem.sizset];
+                                       break;
+                               }
+
+                               if ( elem.nodeType === 1 ) {
+                                       if ( !isXML ) {
+                                               elem[ expando ] = doneName;
+                                               elem.sizset = i;
+                                       }
+
+                                       if ( typeof cur !== "string" ) {
+                                               if ( elem === cur ) {
+                                                       match = true;
+                                                       break;
+                                               }
+
+                                       } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
+                                               match = elem;
+                                               break;
+                                       }
+                               }
+
+                               elem = elem[dir];
+                       }
+
+                       checkSet[i] = match;
+               }
+       }
+}
+
+if ( document.documentElement.contains ) {
+       Sizzle.contains = function( a, b ) {
+               return a !== b && (a.contains ? a.contains(b) : true);
+       };
+
+} else if ( document.documentElement.compareDocumentPosition ) {
+       Sizzle.contains = function( a, b ) {
+               return !!(a.compareDocumentPosition(b) & 16);
+       };
+
+} else {
+       Sizzle.contains = function() {
+               return false;
+       };
+}
+
+Sizzle.isXML = function( elem ) {
+       // documentElement is verified for cases where it doesn't yet exist
+       // (such as loading iframes in IE - #4833) 
+       var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
+
+       return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+var posProcess = function( selector, context, seed ) {
+       var match,
+               tmpSet = [],
+               later = "",
+               root = context.nodeType ? [context] : context;
+
+       // Position selectors must be done after the filter
+       // And so must :not(positional) so we move all PSEUDOs to the end
+       while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
+               later += match[0];
+               selector = selector.replace( Expr.match.PSEUDO, "" );
+       }
+
+       selector = Expr.relative[selector] ? selector + "*" : selector;
+
+       for ( var i = 0, l = root.length; i < l; i++ ) {
+               Sizzle( selector, root[i], tmpSet, seed );
+       }
+
+       return Sizzle.filter( later, tmpSet );
+};
+
+// EXPOSE
+// Override sizzle attribute retrieval
+Sizzle.attr = jQuery.attr;
+Sizzle.selectors.attrMap = {};
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.filters;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})();
+
+
+var runtil = /Until$/,
+       rparentsprev = /^(?:parents|prevUntil|prevAll)/,
+       // Note: This RegExp should be improved, or likely pulled from Sizzle
+       rmultiselector = /,/,
+       isSimple = /^.[^:#\[\.,]*$/,
+       slice = Array.prototype.slice,
+       POS = jQuery.expr.match.POS,
+       // methods guaranteed to produce a unique set when starting from a unique set
+       guaranteedUnique = {
+               children: true,
+               contents: true,
+               next: true,
+               prev: true
+       };
+
+jQuery.fn.extend({
+       find: function( selector ) {
+               var self = this,
+                       i, l;
+
+               if ( typeof selector !== "string" ) {
+                       return jQuery( selector ).filter(function() {
+                               for ( i = 0, l = self.length; i < l; i++ ) {
+                                       if ( jQuery.contains( self[ i ], this ) ) {
+                                               return true;
+                                       }
+                               }
+                       });
+               }
+
+               var ret = this.pushStack( "", "find", selector ),
+                       length, n, r;
+
+               for ( i = 0, l = this.length; i < l; i++ ) {
+                       length = ret.length;
+                       jQuery.find( selector, this[i], ret );
+
+                       if ( i > 0 ) {
+                               // Make sure that the results are unique
+                               for ( n = length; n < ret.length; n++ ) {
+                                       for ( r = 0; r < length; r++ ) {
+                                               if ( ret[r] === ret[n] ) {
+                                                       ret.splice(n--, 1);
+                                                       break;
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               return ret;
+       },
+
+       has: function( target ) {
+               var targets = jQuery( target );
+               return this.filter(function() {
+                       for ( var i = 0, l = targets.length; i < l; i++ ) {
+                               if ( jQuery.contains( this, targets[i] ) ) {
+                                       return true;
+                               }
+                       }
+               });
+       },
+
+       not: function( selector ) {
+               return this.pushStack( winnow(this, selector, false), "not", selector);
+       },
+
+       filter: function( selector ) {
+               return this.pushStack( winnow(this, selector, true), "filter", selector );
+       },
+
+       is: function( selector ) {
+               return !!selector && ( 
+                       typeof selector === "string" ?
+                               // If this is a positional selector, check membership in the returned set
+                               // so $("p:first").is("p:last") won't return true for a doc with two "p".
+                               POS.test( selector ) ? 
+                                       jQuery( selector, this.context ).index( this[0] ) >= 0 :
+                                       jQuery.filter( selector, this ).length > 0 :
+                               this.filter( selector ).length > 0 );
+       },
+
+       closest: function( selectors, context ) {
+               var ret = [], i, l, cur = this[0];
+               
+               // Array (deprecated as of jQuery 1.7)
+               if ( jQuery.isArray( selectors ) ) {
+                       var level = 1;
+
+                       while ( cur && cur.ownerDocument && cur !== context ) {
+                               for ( i = 0; i < selectors.length; i++ ) {
+
+                                       if ( jQuery( cur ).is( selectors[ i ] ) ) {
+                                               ret.push({ selector: selectors[ i ], elem: cur, level: level });
+                                       }
+                               }
+
+                               cur = cur.parentNode;
+                               level++;
+                       }
+
+                       return ret;
+               }
+
+               // String
+               var pos = POS.test( selectors ) || typeof selectors !== "string" ?
+                               jQuery( selectors, context || this.context ) :
+                               0;
+
+               for ( i = 0, l = this.length; i < l; i++ ) {
+                       cur = this[i];
+
+                       while ( cur ) {
+                               if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+                                       ret.push( cur );
+                                       break;
+
+                               } else {
+                                       cur = cur.parentNode;
+                                       if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) {
+                                               break;
+                                       }
+                               }
+                       }
+               }
+
+               ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
+
+               return this.pushStack( ret, "closest", selectors );
+       },
+
+       // Determine the position of an element within
+       // the matched set of elements
+       index: function( elem ) {
+
+               // No argument, return index in parent
+               if ( !elem ) {
+                       return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
+               }
+
+               // index in selector
+               if ( typeof elem === "string" ) {
+                       return jQuery.inArray( this[0], jQuery( elem ) );
+               }
+
+               // Locate the position of the desired element
+               return jQuery.inArray(
+                       // If it receives a jQuery object, the first element is used
+                       elem.jquery ? elem[0] : elem, this );
+       },
+
+       add: function( selector, context ) {
+               var set = typeof selector === "string" ?
+                               jQuery( selector, context ) :
+                               jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+                       all = jQuery.merge( this.get(), set );
+
+               return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+                       all :
+                       jQuery.unique( all ) );
+       },
+
+       andSelf: function() {
+               return this.add( this.prevObject );
+       }
+});
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+       return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+jQuery.each({
+       parent: function( elem ) {
+               var parent = elem.parentNode;
+               return parent && parent.nodeType !== 11 ? parent : null;
+       },
+       parents: function( elem ) {
+               return jQuery.dir( elem, "parentNode" );
+       },
+       parentsUntil: function( elem, i, until ) {
+               return jQuery.dir( elem, "parentNode", until );
+       },
+       next: function( elem ) {
+               return jQuery.nth( elem, 2, "nextSibling" );
+       },
+       prev: function( elem ) {
+               return jQuery.nth( elem, 2, "previousSibling" );
+       },
+       nextAll: function( elem ) {
+               return jQuery.dir( elem, "nextSibling" );
+       },
+       prevAll: function( elem ) {
+               return jQuery.dir( elem, "previousSibling" );
+       },
+       nextUntil: function( elem, i, until ) {
+               return jQuery.dir( elem, "nextSibling", until );
+       },
+       prevUntil: function( elem, i, until ) {
+               return jQuery.dir( elem, "previousSibling", until );
+       },
+       siblings: function( elem ) {
+               return jQuery.sibling( elem.parentNode.firstChild, elem );
+       },
+       children: function( elem ) {
+               return jQuery.sibling( elem.firstChild );
+       },
+       contents: function( elem ) {
+               return jQuery.nodeName( elem, "iframe" ) ?
+                       elem.contentDocument || elem.contentWindow.document :
+                       jQuery.makeArray( elem.childNodes );
+       }
+}, function( name, fn ) {
+       jQuery.fn[ name ] = function( until, selector ) {
+               var ret = jQuery.map( this, fn, until );
+
+               if ( !runtil.test( name ) ) {
+                       selector = until;
+               }
+
+               if ( selector && typeof selector === "string" ) {
+                       ret = jQuery.filter( selector, ret );
+               }
+
+               ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+               if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
+                       ret = ret.reverse();
+               }
+
+               return this.pushStack( ret, name, slice.call( arguments ).join(",") );
+       };
+});
+
+jQuery.extend({
+       filter: function( expr, elems, not ) {
+               if ( not ) {
+                       expr = ":not(" + expr + ")";
+               }
+
+               return elems.length === 1 ?
+                       jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+                       jQuery.find.matches(expr, elems);
+       },
+
+       dir: function( elem, dir, until ) {
+               var matched = [],
+                       cur = elem[ dir ];
+
+               while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+                       if ( cur.nodeType === 1 ) {
+                               matched.push( cur );
+                       }
+                       cur = cur[dir];
+               }
+               return matched;
+       },
+
+       nth: function( cur, result, dir, elem ) {
+               result = result || 1;
+               var num = 0;
+
+               for ( ; cur; cur = cur[dir] ) {
+                       if ( cur.nodeType === 1 && ++num === result ) {
+                               break;
+                       }
+               }
+
+               return cur;
+       },
+
+       sibling: function( n, elem ) {
+               var r = [];
+
+               for ( ; n; n = n.nextSibling ) {
+                       if ( n.nodeType === 1 && n !== elem ) {
+                               r.push( n );
+                       }
+               }
+
+               return r;
+       }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+       // Can't pass null or undefined to indexOf in Firefox 4
+       // Set to 0 to skip string check
+       qualifier = qualifier || 0;
+
+       if ( jQuery.isFunction( qualifier ) ) {
+               return jQuery.grep(elements, function( elem, i ) {
+                       var retVal = !!qualifier.call( elem, i, elem );
+                       return retVal === keep;
+               });
+
+       } else if ( qualifier.nodeType ) {
+               return jQuery.grep(elements, function( elem, i ) {
+                       return ( elem === qualifier ) === keep;
+               });
+
+       } else if ( typeof qualifier === "string" ) {
+               var filtered = jQuery.grep(elements, function( elem ) {
+                       return elem.nodeType === 1;
+               });
+
+               if ( isSimple.test( qualifier ) ) {
+                       return jQuery.filter(qualifier, filtered, !keep);
+               } else {
+                       qualifier = jQuery.filter( qualifier, filtered );
+               }
+       }
+
+       return jQuery.grep(elements, function( elem, i ) {
+               return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
+       });
+}
+
+
+
+
+function createSafeFragment( document ) {
+       var list = nodeNames.split( "|" ),
+       safeFrag = document.createDocumentFragment();
+
+       if ( safeFrag.createElement ) {
+               while ( list.length ) {
+                       safeFrag.createElement(
+                               list.pop()
+                       );
+               }
+       }
+       return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|" +
+               "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+       rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
+       rleadingWhitespace = /^\s+/,
+       rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
+       rtagName = /<([\w:]+)/,
+       rtbody = /<tbody/i,
+       rhtml = /<|&#?\w+;/,
+       rnoInnerhtml = /<(?:script|style)/i,
+       rnocache = /<(?:script|object|embed|option|style)/i,
+       rnoshimcache = new RegExp("<(?:" + nodeNames + ")", "i"),
+       // checked="checked" or checked
+       rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+       rscriptType = /\/(java|ecma)script/i,
+       rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)/,
+       wrapMap = {
+               option: [ 1, "<select multiple='multiple'>", "</select>" ],
+               legend: [ 1, "<fieldset>", "</fieldset>" ],
+               thead: [ 1, "<table>", "</table>" ],
+               tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+               td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+               col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+               area: [ 1, "<map>", "</map>" ],
+               _default: [ 0, "", "" ]
+       },
+       safeFragment = createSafeFragment( document );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE can't serialize <link> and <script> tags normally
+if ( !jQuery.support.htmlSerialize ) {
+       wrapMap._default = [ 1, "div<div>", "</div>" ];
+}
+
+jQuery.fn.extend({
+       text: function( text ) {
+               if ( jQuery.isFunction(text) ) {
+                       return this.each(function(i) {
+                               var self = jQuery( this );
+
+                               self.text( text.call(this, i, self.text()) );
+                       });
+               }
+
+               if ( typeof text !== "object" && text !== undefined ) {
+                       return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
+               }
+
+               return jQuery.text( this );
+       },
+
+       wrapAll: function( html ) {
+               if ( jQuery.isFunction( html ) ) {
+                       return this.each(function(i) {
+                               jQuery(this).wrapAll( html.call(this, i) );
+                       });
+               }
+
+               if ( this[0] ) {
+                       // The elements to wrap the target around
+                       var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+                       if ( this[0].parentNode ) {
+                               wrap.insertBefore( this[0] );
+                       }
+
+                       wrap.map(function() {
+                               var elem = this;
+
+                               while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+                                       elem = elem.firstChild;
+                               }
+
+                               return elem;
+                       }).append( this );
+               }
+
+               return this;
+       },
+
+       wrapInner: function( html ) {
+               if ( jQuery.isFunction( html ) ) {
+                       return this.each(function(i) {
+                               jQuery(this).wrapInner( html.call(this, i) );
+                       });
+               }
+
+               return this.each(function() {
+                       var self = jQuery( this ),
+                               contents = self.contents();
+
+                       if ( contents.length ) {
+                               contents.wrapAll( html );
+
+                       } else {
+                               self.append( html );
+                       }
+               });
+       },
+
+       wrap: function( html ) {
+               var isFunction = jQuery.isFunction( html );
+
+               return this.each(function(i) {
+                       jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+               });
+       },
+
+       unwrap: function() {
+               return this.parent().each(function() {
+                       if ( !jQuery.nodeName( this, "body" ) ) {
+                               jQuery( this ).replaceWith( this.childNodes );
+                       }
+               }).end();
+       },
+
+       append: function() {
+               return this.domManip(arguments, true, function( elem ) {
+                       if ( this.nodeType === 1 ) {
+                               this.appendChild( elem );
+                       }
+               });
+       },
+
+       prepend: function() {
+               return this.domManip(arguments, true, function( elem ) {
+                       if ( this.nodeType === 1 ) {
+                               this.insertBefore( elem, this.firstChild );
+                       }
+               });
+       },
+
+       before: function() {
+               if ( this[0] && this[0].parentNode ) {
+                       return this.domManip(arguments, false, function( elem ) {
+                               this.parentNode.insertBefore( elem, this );
+                       });
+               } else if ( arguments.length ) {
+                       var set = jQuery.clean( arguments );
+                       set.push.apply( set, this.toArray() );
+                       return this.pushStack( set, "before", arguments );
+               }
+       },
+
+       after: function() {
+               if ( this[0] && this[0].parentNode ) {
+                       return this.domManip(arguments, false, function( elem ) {
+                               this.parentNode.insertBefore( elem, this.nextSibling );
+                       });
+               } else if ( arguments.length ) {
+                       var set = this.pushStack( this, "after", arguments );
+                       set.push.apply( set, jQuery.clean(arguments) );
+                       return set;
+               }
+       },
+
+       // keepData is for internal use only--do not document
+       remove: function( selector, keepData ) {
+               for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+                       if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+                               if ( !keepData && elem.nodeType === 1 ) {
+                                       jQuery.cleanData( elem.getElementsByTagName("*") );
+                                       jQuery.cleanData( [ elem ] );
+                               }
+
+                               if ( elem.parentNode ) {
+                                       elem.parentNode.removeChild( elem );
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       empty: function() {
+               for ( var i = 0, elem; (elem = this[i]) != null; i++ ) {
+                       // Remove element nodes and prevent memory leaks
+                       if ( elem.nodeType === 1 ) {
+                               jQuery.cleanData( elem.getElementsByTagName("*") );
+                       }
+
+                       // Remove any remaining nodes
+                       while ( elem.firstChild ) {
+                               elem.removeChild( elem.firstChild );
+                       }
+               }
+
+               return this;
+       },
+
+       clone: function( dataAndEvents, deepDataAndEvents ) {
+               dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+               deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+               return this.map( function () {
+                       return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+               });
+       },
+
+       html: function( value ) {
+               if ( value === undefined ) {
+                       return this[0] && this[0].nodeType === 1 ?
+                               this[0].innerHTML.replace(rinlinejQuery, "") :
+                               null;
+
+               // See if we can take a shortcut and just use innerHTML
+               } else if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+                       (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
+                       !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
+
+                       value = value.replace(rxhtmlTag, "<$1></$2>");
+
+                       try {
+                               for ( var i = 0, l = this.length; i < l; i++ ) {
+                                       // Remove element nodes and prevent memory leaks
+                                       if ( this[i].nodeType === 1 ) {
+                                               jQuery.cleanData( this[i].getElementsByTagName("*") );
+                                               this[i].innerHTML = value;
+                                       }
+                               }
+
+                       // If using innerHTML throws an exception, use the fallback method
+                       } catch(e) {
+                               this.empty().append( value );
+                       }
+
+               } else if ( jQuery.isFunction( value ) ) {
+                       this.each(function(i){
+                               var self = jQuery( this );
+
+                               self.html( value.call(this, i, self.html()) );
+                       });
+
+               } else {
+                       this.empty().append( value );
+               }
+
+               return this;
+       },
+
+       replaceWith: function( value ) {
+               if ( this[0] && this[0].parentNode ) {
+                       // Make sure that the elements are removed from the DOM before they are inserted
+                       // this can help fix replacing a parent with child elements
+                       if ( jQuery.isFunction( value ) ) {
+                               return this.each(function(i) {
+                                       var self = jQuery(this), old = self.html();
+                                       self.replaceWith( value.call( this, i, old ) );
+                               });
+                       }
+
+                       if ( typeof value !== "string" ) {
+                               value = jQuery( value ).detach();
+                       }
+
+                       return this.each(function() {
+                               var next = this.nextSibling,
+                                       parent = this.parentNode;
+
+                               jQuery( this ).remove();
+
+                               if ( next ) {
+                                       jQuery(next).before( value );
+                               } else {
+                                       jQuery(parent).append( value );
+                               }
+                       });
+               } else {
+                       return this.length ?
+                               this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
+                               this;
+               }
+       },
+
+       detach: function( selector ) {
+               return this.remove( selector, true );
+       },
+
+       domManip: function( args, table, callback ) {
+               var results, first, fragment, parent,
+                       value = args[0],
+                       scripts = [];
+
+               // We can't cloneNode fragments that contain checked, in WebKit
+               if ( !jQuery.support.checkClone && arguments.length === 3 && typeof value === "string" && rchecked.test( value ) ) {
+                       return this.each(function() {
+                               jQuery(this).domManip( args, table, callback, true );
+                       });
+               }
+
+               if ( jQuery.isFunction(value) ) {
+                       return this.each(function(i) {
+                               var self = jQuery(this);
+                               args[0] = value.call(this, i, table ? self.html() : undefined);
+                               self.domManip( args, table, callback );
+                       });
+               }
+
+               if ( this[0] ) {
+                       parent = value && value.parentNode;
+
+                       // If we're in a fragment, just use that instead of building a new one
+                       if ( jQuery.support.parentNode && parent && parent.nodeType === 11 && parent.childNodes.length === this.length ) {
+                               results = { fragment: parent };
+
+                       } else {
+                               results = jQuery.buildFragment( args, this, scripts );
+                       }
+
+                       fragment = results.fragment;
+
+                       if ( fragment.childNodes.length === 1 ) {
+                               first = fragment = fragment.firstChild;
+                       } else {
+                               first = fragment.firstChild;
+                       }
+
+                       if ( first ) {
+                               table = table && jQuery.nodeName( first, "tr" );
+
+                               for ( var i = 0, l = this.length, lastIndex = l - 1; i < l; i++ ) {
+                                       callback.call(
+                                               table ?
+                                                       root(this[i], first) :
+                                                       this[i],
+                                               // Make sure that we do not leak memory by inadvertently discarding
+                                               // the original fragment (which might have attached data) instead of
+                                               // using it; in addition, use the original fragment object for the last
+                                               // item instead of first because it can end up being emptied incorrectly
+                                               // in certain situations (Bug #8070).
+                                               // Fragments from the fragment cache must always be cloned and never used
+                                               // in place.
+                                               results.cacheable || ( l > 1 && i < lastIndex ) ?
+                                                       jQuery.clone( fragment, true, true ) :
+                                                       fragment
+                                       );
+                               }
+                       }
+
+                       if ( scripts.length ) {
+                               jQuery.each( scripts, evalScript );
+                       }
+               }
+
+               return this;
+       }
+});
+
+function root( elem, cur ) {
+       return jQuery.nodeName(elem, "table") ?
+               (elem.getElementsByTagName("tbody")[0] ||
+               elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
+               elem;
+}
+
+function cloneCopyEvent( src, dest ) {
+
+       if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+               return;
+       }
+
+       var type, i, l,
+               oldData = jQuery._data( src ),
+               curData = jQuery._data( dest, oldData ),
+               events = oldData.events;
+
+       if ( events ) {
+               delete curData.handle;
+               curData.events = {};
+
+               for ( type in events ) {
+                       for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+                               jQuery.event.add( dest, type + ( events[ type ][ i ].namespace ? "." : "" ) + events[ type ][ i ].namespace, events[ type ][ i ], events[ type ][ i ].data );
+                       }
+               }
+       }
+
+       // make the cloned public data object a copy from the original
+       if ( curData.data ) {
+               curData.data = jQuery.extend( {}, curData.data );
+       }
+}
+
+function cloneFixAttributes( src, dest ) {
+       var nodeName;
+
+       // We do not need to do anything for non-Elements
+       if ( dest.nodeType !== 1 ) {
+               return;
+       }
+
+       // clearAttributes removes the attributes, which we don't want,
+       // but also removes the attachEvent events, which we *do* want
+       if ( dest.clearAttributes ) {
+               dest.clearAttributes();
+       }
+
+       // mergeAttributes, in contrast, only merges back on the
+       // original attributes, not the events
+       if ( dest.mergeAttributes ) {
+               dest.mergeAttributes( src );
+       }
+
+       nodeName = dest.nodeName.toLowerCase();
+
+       // IE6-8 fail to clone children inside object elements that use
+       // the proprietary classid attribute value (rather than the type
+       // attribute) to identify the type of content to display
+       if ( nodeName === "object" ) {
+               dest.outerHTML = src.outerHTML;
+
+       } else if ( nodeName === "input" && (src.type === "checkbox" || src.type === "radio") ) {
+               // IE6-8 fails to persist the checked state of a cloned checkbox
+               // or radio button. Worse, IE6-7 fail to give the cloned element
+               // a checked appearance if the defaultChecked value isn't also set
+               if ( src.checked ) {
+                       dest.defaultChecked = dest.checked = src.checked;
+               }
+
+               // IE6-7 get confused and end up setting the value of a cloned
+               // checkbox/radio button to an empty string instead of "on"
+               if ( dest.value !== src.value ) {
+                       dest.value = src.value;
+               }
+
+       // IE6-8 fails to return the selected option to the default selected
+       // state when cloning options
+       } else if ( nodeName === "option" ) {
+               dest.selected = src.defaultSelected;
+
+       // IE6-8 fails to set the defaultValue to the correct value when
+       // cloning other types of input fields
+       } else if ( nodeName === "input" || nodeName === "textarea" ) {
+               dest.defaultValue = src.defaultValue;
+       }
+
+       // Event data gets referenced instead of copied if the expando
+       // gets copied too
+       dest.removeAttribute( jQuery.expando );
+}
+
+jQuery.buildFragment = function( args, nodes, scripts ) {
+       var fragment, cacheable, cacheresults, doc,
+       first = args[ 0 ];
+
+       // nodes may contain either an explicit document object,
+       // a jQuery collection or context object.
+       // If nodes[0] contains a valid object to assign to doc
+       if ( nodes && nodes[0] ) {
+               doc = nodes[0].ownerDocument || nodes[0];
+       }
+
+       // Ensure that an attr object doesn't incorrectly stand in as a document object
+       // Chrome and Firefox seem to allow this to occur and will throw exception
+       // Fixes #8950
+       if ( !doc.createDocumentFragment ) {
+               doc = document;
+       }
+
+       // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
+       // Cloning options loses the selected state, so don't cache them
+       // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
+       // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+       // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
+       if ( args.length === 1 && typeof first === "string" && first.length < 512 && doc === document &&
+               first.charAt(0) === "<" && !rnocache.test( first ) &&
+               (jQuery.support.checkClone || !rchecked.test( first )) &&
+               (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
+
+               cacheable = true;
+
+               cacheresults = jQuery.fragments[ first ];
+               if ( cacheresults && cacheresults !== 1 ) {
+                       fragment = cacheresults;
+               }
+       }
+
+       if ( !fragment ) {
+               fragment = doc.createDocumentFragment();
+               jQuery.clean( args, doc, fragment, scripts );
+       }
+
+       if ( cacheable ) {
+               jQuery.fragments[ first ] = cacheresults ? fragment : 1;
+       }
+
+       return { fragment: fragment, cacheable: cacheable };
+};
+
+jQuery.fragments = {};
+
+jQuery.each({
+       appendTo: "append",
+       prependTo: "prepend",
+       insertBefore: "before",
+       insertAfter: "after",
+       replaceAll: "replaceWith"
+}, function( name, original ) {
+       jQuery.fn[ name ] = function( selector ) {
+               var ret = [],
+                       insert = jQuery( selector ),
+                       parent = this.length === 1 && this[0].parentNode;
+
+               if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
+                       insert[ original ]( this[0] );
+                       return this;
+
+               } else {
+                       for ( var i = 0, l = insert.length; i < l; i++ ) {
+                               var elems = ( i > 0 ? this.clone(true) : this ).get();
+                               jQuery( insert[i] )[ original ]( elems );
+                               ret = ret.concat( elems );
+                       }
+
+                       return this.pushStack( ret, name, insert.selector );
+               }
+       };
+});
+
+function getAll( elem ) {
+       if ( typeof elem.getElementsByTagName !== "undefined" ) {
+               return elem.getElementsByTagName( "*" );
+
+       } else if ( typeof elem.querySelectorAll !== "undefined" ) {
+               return elem.querySelectorAll( "*" );
+
+       } else {
+               return [];
+       }
+}
+
+// Used in clean, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+       if ( elem.type === "checkbox" || elem.type === "radio" ) {
+               elem.defaultChecked = elem.checked;
+       }
+}
+// Finds all inputs and passes them to fixDefaultChecked
+function findInputs( elem ) {
+       var nodeName = ( elem.nodeName || "" ).toLowerCase();
+       if ( nodeName === "input" ) {
+               fixDefaultChecked( elem );
+       // Skip scripts, get other children
+       } else if ( nodeName !== "script" && typeof elem.getElementsByTagName !== "undefined" ) {
+               jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
+       }
+}
+
+// Derived From: http://www.iecss.com/shimprove/javascript/shimprove.1-0-1.js
+function shimCloneNode( elem ) {
+       var div = document.createElement( "div" );
+       safeFragment.appendChild( div );
+
+       div.innerHTML = elem.outerHTML;
+       return div.firstChild;
+}
+
+jQuery.extend({
+       clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+               var srcElements,
+                       destElements,
+                       i,
+                       // IE<=8 does not properly clone detached, unknown element nodes
+                       clone = jQuery.support.html5Clone || !rnoshimcache.test( "<" + elem.nodeName ) ?
+                               elem.cloneNode( true ) :
+                               shimCloneNode( elem );
+
+               if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+                               (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+                       // IE copies events bound via attachEvent when using cloneNode.
+                       // Calling detachEvent on the clone will also remove the events
+                       // from the original. In order to get around this, we use some
+                       // proprietary methods to clear the events. Thanks to MooTools
+                       // guys for this hotness.
+
+                       cloneFixAttributes( elem, clone );
+
+                       // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
+                       srcElements = getAll( elem );
+                       destElements = getAll( clone );
+
+                       // Weird iteration because IE will replace the length property
+                       // with an element if you are cloning the body and one of the
+                       // elements on the page has a name or id of "length"
+                       for ( i = 0; srcElements[i]; ++i ) {
+                               // Ensure that the destination node is not null; Fixes #9587
+                               if ( destElements[i] ) {
+                                       cloneFixAttributes( srcElements[i], destElements[i] );
+                               }
+                       }
+               }
+
+               // Copy the events from the original to the clone
+               if ( dataAndEvents ) {
+                       cloneCopyEvent( elem, clone );
+
+                       if ( deepDataAndEvents ) {
+                               srcElements = getAll( elem );
+                               destElements = getAll( clone );
+
+                               for ( i = 0; srcElements[i]; ++i ) {
+                                       cloneCopyEvent( srcElements[i], destElements[i] );
+                               }
+                       }
+               }
+
+               srcElements = destElements = null;
+
+               // Return the cloned set
+               return clone;
+       },
+
+       clean: function( elems, context, fragment, scripts ) {
+               var checkScriptType;
+
+               context = context || document;
+
+               // !context.createElement fails in IE with an error but returns typeof 'object'
+               if ( typeof context.createElement === "undefined" ) {
+                       context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
+               }
+
+               var ret = [], j;
+
+               for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+                       if ( typeof elem === "number" ) {
+                               elem += "";
+                       }
+
+                       if ( !elem ) {
+                               continue;
+                       }
+
+                       // Convert html string into DOM nodes
+                       if ( typeof elem === "string" ) {
+                               if ( !rhtml.test( elem ) ) {
+                                       elem = context.createTextNode( elem );
+                               } else {
+                                       // Fix "XHTML"-style tags in all browsers
+                                       elem = elem.replace(rxhtmlTag, "<$1></$2>");
+
+                                       // Trim whitespace, otherwise indexOf won't work as expected
+                                       var tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(),
+                                               wrap = wrapMap[ tag ] || wrapMap._default,
+                                               depth = wrap[0],
+                                               div = context.createElement("div");
+
+                                       // Append wrapper element to unknown element safe doc fragment
+                                       if ( context === document ) {
+                                               // Use the fragment we've already created for this document
+                                               safeFragment.appendChild( div );
+                                       } else {
+                                               // Use a fragment created with the owner document
+                                               createSafeFragment( context ).appendChild( div );
+                                       }
+
+                                       // Go to html and back, then peel off extra wrappers
+                                       div.innerHTML = wrap[1] + elem + wrap[2];
+
+                                       // Move to the right depth
+                                       while ( depth-- ) {
+                                               div = div.lastChild;
+                                       }
+
+                                       // Remove IE's autoinserted <tbody> from table fragments
+                                       if ( !jQuery.support.tbody ) {
+
+                                               // String was a <table>, *may* have spurious <tbody>
+                                               var hasBody = rtbody.test(elem),
+                                                       tbody = tag === "table" && !hasBody ?
+                                                               div.firstChild && div.firstChild.childNodes :
+
+                                                               // String was a bare <thead> or <tfoot>
+                                                               wrap[1] === "<table>" && !hasBody ?
+                                                                       div.childNodes :
+                                                                       [];
+
+                                               for ( j = tbody.length - 1; j >= 0 ; --j ) {
+                                                       if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+                                                               tbody[ j ].parentNode.removeChild( tbody[ j ] );
+                                                       }
+                                               }
+                                       }
+
+                                       // IE completely kills leading whitespace when innerHTML is used
+                                       if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+                                               div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+                                       }
+
+                                       elem = div.childNodes;
+                               }
+                       }
+
+                       // Resets defaultChecked for any radios and checkboxes
+                       // about to be appended to the DOM in IE 6/7 (#8060)
+                       var len;
+                       if ( !jQuery.support.appendChecked ) {
+                               if ( elem[0] && typeof (len = elem.length) === "number" ) {
+                                       for ( j = 0; j < len; j++ ) {
+                                               findInputs( elem[j] );
+                                       }
+                               } else {
+                                       findInputs( elem );
+                               }
+                       }
+
+                       if ( elem.nodeType ) {
+                               ret.push( elem );
+                       } else {
+                               ret = jQuery.merge( ret, elem );
+                       }
+               }
+
+               if ( fragment ) {
+                       checkScriptType = function( elem ) {
+                               return !elem.type || rscriptType.test( elem.type );
+                       };
+                       for ( i = 0; ret[i]; i++ ) {
+                               if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
+                                       scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
+
+                               } else {
+                                       if ( ret[i].nodeType === 1 ) {
+                                               var jsTags = jQuery.grep( ret[i].getElementsByTagName( "script" ), checkScriptType );
+
+                                               ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+                                       }
+                                       fragment.appendChild( ret[i] );
+                               }
+                       }
+               }
+
+               return ret;
+       },
+
+       cleanData: function( elems ) {
+               var data, id,
+                       cache = jQuery.cache,
+                       special = jQuery.event.special,
+                       deleteExpando = jQuery.support.deleteExpando;
+
+               for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+                       if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
+                               continue;
+                       }
+
+                       id = elem[ jQuery.expando ];
+
+                       if ( id ) {
+                               data = cache[ id ];
+
+                               if ( data && data.events ) {
+                                       for ( var type in data.events ) {
+                                               if ( special[ type ] ) {
+                                                       jQuery.event.remove( elem, type );
+
+                                               // This is a shortcut to avoid jQuery.event.remove's overhead
+                                               } else {
+                                                       jQuery.removeEvent( elem, type, data.handle );
+                                               }
+                                       }
+
+                                       // Null the DOM reference to avoid IE6/7/8 leak (#7054)
+                                       if ( data.handle ) {
+                                               data.handle.elem = null;
+                                       }
+                               }
+
+                               if ( deleteExpando ) {
+                                       delete elem[ jQuery.expando ];
+
+                               } else if ( elem.removeAttribute ) {
+                                       elem.removeAttribute( jQuery.expando );
+                               }
+
+                               delete cache[ id ];
+                       }
+               }
+       }
+});
+
+function evalScript( i, elem ) {
+       if ( elem.src ) {
+               jQuery.ajax({
+                       url: elem.src,
+                       async: false,
+                       dataType: "script"
+               });
+       } else {
+               jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
+       }
+
+       if ( elem.parentNode ) {
+               elem.parentNode.removeChild( elem );
+       }
+}
+
+
+
+
+var ralpha = /alpha\([^)]*\)/i,
+       ropacity = /opacity=([^)]*)/,
+       // fixed for IE9, see #8346
+       rupper = /([A-Z]|^ms)/g,
+       rnumpx = /^-?\d+(?:px)?$/i,
+       rnum = /^-?\d/,
+       rrelNum = /^([\-+])=([\-+.\de]+)/,
+
+       cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+       cssWidth = [ "Left", "Right" ],
+       cssHeight = [ "Top", "Bottom" ],
+       curCSS,
+
+       getComputedStyle,
+       currentStyle;
+
+jQuery.fn.css = function( name, value ) {
+       // Setting 'undefined' is a no-op
+       if ( arguments.length === 2 && value === undefined ) {
+               return this;
+       }
+
+       return jQuery.access( this, name, value, true, function( elem, name, value ) {
+               return value !== undefined ?
+                       jQuery.style( elem, name, value ) :
+                       jQuery.css( elem, name );
+       });
+};
+
+jQuery.extend({
+       // Add in style property hooks for overriding the default
+       // behavior of getting and setting a style property
+       cssHooks: {
+               opacity: {
+                       get: function( elem, computed ) {
+                               if ( computed ) {
+                                       // We should always get a number back from opacity
+                                       var ret = curCSS( elem, "opacity", "opacity" );
+                                       return ret === "" ? "1" : ret;
+
+                               } else {
+                                       return elem.style.opacity;
+                               }
+                       }
+               }
+       },
+
+       // Exclude the following css properties to add px
+       cssNumber: {
+               "fillOpacity": true,
+               "fontWeight": true,
+               "lineHeight": true,
+               "opacity": true,
+               "orphans": true,
+               "widows": true,
+               "zIndex": true,
+               "zoom": true
+       },
+
+       // Add in properties whose names you wish to fix before
+       // setting or getting the value
+       cssProps: {
+               // normalize float css property
+               "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+       },
+
+       // Get and set the style property on a DOM Node
+       style: function( elem, name, value, extra ) {
+               // Don't set styles on text and comment nodes
+               if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+                       return;
+               }
+
+               // Make sure that we're working with the right name
+               var ret, type, origName = jQuery.camelCase( name ),
+                       style = elem.style, hooks = jQuery.cssHooks[ origName ];
+
+               name = jQuery.cssProps[ origName ] || origName;
+
+               // Check if we're setting a value
+               if ( value !== undefined ) {
+                       type = typeof value;
+
+                       // convert relative number strings (+= or -=) to relative numbers. #7345
+                       if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+                               value = ( +( ret[1] + 1) * +ret[2] ) + parseFloat( jQuery.css( elem, name ) );
+                               // Fixes bug #9237
+                               type = "number";
+                       }
+
+                       // Make sure that NaN and null values aren't set. See: #7116
+                       if ( value == null || type === "number" && isNaN( value ) ) {
+                               return;
+                       }
+
+                       // If a number was passed in, add 'px' to the (except for certain CSS properties)
+                       if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+                               value += "px";
+                       }
+
+                       // If a hook was provided, use that value, otherwise just set the specified value
+                       if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value )) !== undefined ) {
+                               // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+                               // Fixes bug #5509
+                               try {
+                                       style[ name ] = value;
+                               } catch(e) {}
+                       }
+
+               } else {
+                       // If a hook was provided get the non-computed value from there
+                       if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+                               return ret;
+                       }
+
+                       // Otherwise just get the value from the style object
+                       return style[ name ];
+               }
+       },
+
+       css: function( elem, name, extra ) {
+               var ret, hooks;
+
+               // Make sure that we're working with the right name
+               name = jQuery.camelCase( name );
+               hooks = jQuery.cssHooks[ name ];
+               name = jQuery.cssProps[ name ] || name;
+
+               // cssFloat needs a special treatment
+               if ( name === "cssFloat" ) {
+                       name = "float";
+               }
+
+               // If a hook was provided get the computed value from there
+               if ( hooks && "get" in hooks && (ret = hooks.get( elem, true, extra )) !== undefined ) {
+                       return ret;
+
+               // Otherwise, if a way to get the computed value exists, use that
+               } else if ( curCSS ) {
+                       return curCSS( elem, name );
+               }
+       },
+
+       // A method for quickly swapping in/out CSS properties to get correct calculations
+       swap: function( elem, options, callback ) {
+               var old = {};
+
+               // Remember the old values, and insert the new ones
+               for ( var name in options ) {
+                       old[ name ] = elem.style[ name ];
+                       elem.style[ name ] = options[ name ];
+               }
+
+               callback.call( elem );
+
+               // Revert the old values
+               for ( name in options ) {
+                       elem.style[ name ] = old[ name ];
+               }
+       }
+});
+
+// DEPRECATED, Use jQuery.css() instead
+jQuery.curCSS = jQuery.css;
+
+jQuery.each(["height", "width"], function( i, name ) {
+       jQuery.cssHooks[ name ] = {
+               get: function( elem, computed, extra ) {
+                       var val;
+
+                       if ( computed ) {
+                               if ( elem.offsetWidth !== 0 ) {
+                                       return getWH( elem, name, extra );
+                               } else {
+                                       jQuery.swap( elem, cssShow, function() {
+                                               val = getWH( elem, name, extra );
+                                       });
+                               }
+
+                               return val;
+                       }
+               },
+
+               set: function( elem, value ) {
+                       if ( rnumpx.test( value ) ) {
+                               // ignore negative width and height values #1599
+                               value = parseFloat( value );
+
+                               if ( value >= 0 ) {
+                                       return value + "px";
+                               }
+
+                       } else {
+                               return value;
+                       }
+               }
+       };
+});
+
+if ( !jQuery.support.opacity ) {
+       jQuery.cssHooks.opacity = {
+               get: function( elem, computed ) {
+                       // IE uses filters for opacity
+                       return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+                               ( parseFloat( RegExp.$1 ) / 100 ) + "" :
+                               computed ? "1" : "";
+               },
+
+               set: function( elem, value ) {
+                       var style = elem.style,
+                               currentStyle = elem.currentStyle,
+                               opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+                               filter = currentStyle && currentStyle.filter || style.filter || "";
+
+                       // IE has trouble with opacity if it does not have layout
+                       // Force it by setting the zoom level
+                       style.zoom = 1;
+
+                       // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+                       if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" ) {
+
+                               // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+                               // if "filter:" is present at all, clearType is disabled, we want to avoid this
+                               // style.removeAttribute is IE Only, but so apparently is this code path...
+                               style.removeAttribute( "filter" );
+
+                               // if there there is no filter style applied in a css rule, we are done
+                               if ( currentStyle && !currentStyle.filter ) {
+                                       return;
+                               }
+                       }
+
+                       // otherwise, set new filter values
+                       style.filter = ralpha.test( filter ) ?
+                               filter.replace( ralpha, opacity ) :
+                               filter + " " + opacity;
+               }
+       };
+}
+
+jQuery(function() {
+       // This hook cannot be added until DOM ready because the support test
+       // for it is not run until after DOM ready
+       if ( !jQuery.support.reliableMarginRight ) {
+               jQuery.cssHooks.marginRight = {
+                       get: function( elem, computed ) {
+                               // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+                               // Work around by temporarily setting element display to inline-block
+                               var ret;
+                               jQuery.swap( elem, { "display": "inline-block" }, function() {
+                                       if ( computed ) {
+                                               ret = curCSS( elem, "margin-right", "marginRight" );
+                                       } else {
+                                               ret = elem.style.marginRight;
+                                       }
+                               });
+                               return ret;
+                       }
+               };
+       }
+});
+
+if ( document.defaultView && document.defaultView.getComputedStyle ) {
+       getComputedStyle = function( elem, name ) {
+               var ret, defaultView, computedStyle;
+
+               name = name.replace( rupper, "-$1" ).toLowerCase();
+
+               if ( (defaultView = elem.ownerDocument.defaultView) &&
+                               (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
+                       ret = computedStyle.getPropertyValue( name );
+                       if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
+                               ret = jQuery.style( elem, name );
+                       }
+               }
+
+               return ret;
+       };
+}
+
+if ( document.documentElement.currentStyle ) {
+       currentStyle = function( elem, name ) {
+               var left, rsLeft, uncomputed,
+                       ret = elem.currentStyle && elem.currentStyle[ name ],
+                       style = elem.style;
+
+               // Avoid setting ret to empty string here
+               // so we don't default to auto
+               if ( ret === null && style && (uncomputed = style[ name ]) ) {
+                       ret = uncomputed;
+               }
+
+               // From the awesome hack by Dean Edwards
+               // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+               // If we're not dealing with a regular pixel number
+               // but a number that has a weird ending, we need to convert it to pixels
+               if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
+
+                       // Remember the original values
+                       left = style.left;
+                       rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
+
+                       // Put in the new values to get a computed value out
+                       if ( rsLeft ) {
+                               elem.runtimeStyle.left = elem.currentStyle.left;
+                       }
+                       style.left = name === "fontSize" ? "1em" : ( ret || 0 );
+                       ret = style.pixelLeft + "px";
+
+                       // Revert the changed values
+                       style.left = left;
+                       if ( rsLeft ) {
+                               elem.runtimeStyle.left = rsLeft;
+                       }
+               }
+
+               return ret === "" ? "auto" : ret;
+       };
+}
+
+curCSS = getComputedStyle || currentStyle;
+
+function getWH( elem, name, extra ) {
+
+       // Start with offset property
+       var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+               which = name === "width" ? cssWidth : cssHeight,
+               i = 0,
+               len = which.length;
+
+       if ( val > 0 ) {
+               if ( extra !== "border" ) {
+                       for ( ; i < len; i++ ) {
+                               if ( !extra ) {
+                                       val -= parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
+                               }
+                               if ( extra === "margin" ) {
+                                       val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
+                               } else {
+                                       val -= parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
+                               }
+                       }
+               }
+
+               return val + "px";
+       }
+
+       // Fall back to computed then uncomputed css if necessary
+       val = curCSS( elem, name, name );
+       if ( val < 0 || val == null ) {
+               val = elem.style[ name ] || 0;
+       }
+       // Normalize "", auto, and prepare for extra
+       val = parseFloat( val ) || 0;
+
+       // Add padding, border, margin
+       if ( extra ) {
+               for ( ; i < len; i++ ) {
+                       val += parseFloat( jQuery.css( elem, "padding" + which[ i ] ) ) || 0;
+                       if ( extra !== "padding" ) {
+                               val += parseFloat( jQuery.css( elem, "border" + which[ i ] + "Width" ) ) || 0;
+                       }
+                       if ( extra === "margin" ) {
+                               val += parseFloat( jQuery.css( elem, extra + which[ i ] ) ) || 0;
+                       }
+               }
+       }
+
+       return val + "px";
+}
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+       jQuery.expr.filters.hidden = function( elem ) {
+               var width = elem.offsetWidth,
+                       height = elem.offsetHeight;
+
+               return ( width === 0 && height === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
+       };
+
+       jQuery.expr.filters.visible = function( elem ) {
+               return !jQuery.expr.filters.hidden( elem );
+       };
+}
+
+
+
+
+var r20 = /%20/g,
+       rbracket = /\[\]$/,
+       rCRLF = /\r?\n/g,
+       rhash = /#.*$/,
+       rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+       rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+       // #7653, #8125, #8152: local protocol detection
+       rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
+       rnoContent = /^(?:GET|HEAD)$/,
+       rprotocol = /^\/\//,
+       rquery = /\?/,
+       rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+       rselectTextarea = /^(?:select|textarea)/i,
+       rspacesAjax = /\s+/,
+       rts = /([?&])_=[^&]*/,
+       rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
+
+       // Keep a copy of the old load method
+       _load = jQuery.fn.load,
+
+       /* Prefilters
+        * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+        * 2) These are called:
+        *    - BEFORE asking for a transport
+        *    - AFTER param serialization (s.data is a string if s.processData is true)
+        * 3) key is the dataType
+        * 4) the catchall symbol "*" can be used
+        * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+        */
+       prefilters = {},
+
+       /* Transports bindings
+        * 1) key is the dataType
+        * 2) the catchall symbol "*" can be used
+        * 3) selection will start with transport dataType and THEN go to "*" if needed
+        */
+       transports = {},
+
+       // Document location
+       ajaxLocation,
+
+       // Document location segments
+       ajaxLocParts,
+
+       // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+       allTypes = ["*/"] + ["*"];
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+       ajaxLocation = location.href;
+} catch( e ) {
+       // Use the href attribute of an A element
+       // since IE will modify it given document.location
+       ajaxLocation = document.createElement( "a" );
+       ajaxLocation.href = "";
+       ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+       // dataTypeExpression is optional and defaults to "*"
+       return function( dataTypeExpression, func ) {
+
+               if ( typeof dataTypeExpression !== "string" ) {
+                       func = dataTypeExpression;
+                       dataTypeExpression = "*";
+               }
+
+               if ( jQuery.isFunction( func ) ) {
+                       var dataTypes = dataTypeExpression.toLowerCase().split( rspacesAjax ),
+                               i = 0,
+                               length = dataTypes.length,
+                               dataType,
+                               list,
+                               placeBefore;
+
+                       // For each dataType in the dataTypeExpression
+                       for ( ; i < length; i++ ) {
+                               dataType = dataTypes[ i ];
+                               // We control if we're asked to add before
+                               // any existing element
+                               placeBefore = /^\+/.test( dataType );
+                               if ( placeBefore ) {
+                                       dataType = dataType.substr( 1 ) || "*";
+                               }
+                               list = structure[ dataType ] = structure[ dataType ] || [];
+                               // then we add to the structure accordingly
+                               list[ placeBefore ? "unshift" : "push" ]( func );
+                       }
+               }
+       };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
+               dataType /* internal */, inspected /* internal */ ) {
+
+       dataType = dataType || options.dataTypes[ 0 ];
+       inspected = inspected || {};
+
+       inspected[ dataType ] = true;
+
+       var list = structure[ dataType ],
+               i = 0,
+               length = list ? list.length : 0,
+               executeOnly = ( structure === prefilters ),
+               selection;
+
+       for ( ; i < length && ( executeOnly || !selection ); i++ ) {
+               selection = list[ i ]( options, originalOptions, jqXHR );
+               // If we got redirected to another dataType
+               // we try there if executing only and not done already
+               if ( typeof selection === "string" ) {
+                       if ( !executeOnly || inspected[ selection ] ) {
+                               selection = undefined;
+                       } else {
+                               options.dataTypes.unshift( selection );
+                               selection = inspectPrefiltersOrTransports(
+                                               structure, options, originalOptions, jqXHR, selection, inspected );
+                       }
+               }
+       }
+       // If we're only executing or nothing was selected
+       // we try the catchall dataType if not done already
+       if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
+               selection = inspectPrefiltersOrTransports(
+                               structure, options, originalOptions, jqXHR, "*", inspected );
+       }
+       // unnecessary when only executing (prefilters)
+       // but it'll be ignored by the caller in that case
+       return selection;
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+       var key, deep,
+               flatOptions = jQuery.ajaxSettings.flatOptions || {};
+       for ( key in src ) {
+               if ( src[ key ] !== undefined ) {
+                       ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
+               }
+       }
+       if ( deep ) {
+               jQuery.extend( true, target, deep );
+       }
+}
+
+jQuery.fn.extend({
+       load: function( url, params, callback ) {
+               if ( typeof url !== "string" && _load ) {
+                       return _load.apply( this, arguments );
+
+               // Don't do a request if no elements are being requested
+               } else if ( !this.length ) {
+                       return this;
+               }
+
+               var off = url.indexOf( " " );
+               if ( off >= 0 ) {
+                       var selector = url.slice( off, url.length );
+                       url = url.slice( 0, off );
+               }
+
+               // Default to a GET request
+               var type = "GET";
+
+               // If the second parameter was provided
+               if ( params ) {
+                       // If it's a function
+                       if ( jQuery.isFunction( params ) ) {
+                               // We assume that it's the callback
+                               callback = params;
+                               params = undefined;
+
+                       // Otherwise, build a param string
+                       } else if ( typeof params === "object" ) {
+                               params = jQuery.param( params, jQuery.ajaxSettings.traditional );
+                               type = "POST";
+                       }
+               }
+
+               var self = this;
+
+               // Request the remote document
+               jQuery.ajax({
+                       url: url,
+                       type: type,
+                       dataType: "html",
+                       data: params,
+                       // Complete callback (responseText is used internally)
+                       complete: function( jqXHR, status, responseText ) {
+                               // Store the response as specified by the jqXHR object
+                               responseText = jqXHR.responseText;
+                               // If successful, inject the HTML into all the matched elements
+                               if ( jqXHR.isResolved() ) {
+                                       // #4825: Get the actual response in case
+                                       // a dataFilter is present in ajaxSettings
+                                       jqXHR.done(function( r ) {
+                                               responseText = r;
+                                       });
+                                       // See if a selector was specified
+                                       self.html( selector ?
+                                               // Create a dummy div to hold the results
+                                               jQuery("<div>")
+                                                       // inject the contents of the document in, removing the scripts
+                                                       // to avoid any 'Permission Denied' errors in IE
+                                                       .append(responseText.replace(rscript, ""))
+
+                                                       // Locate the specified elements
+                                                       .find(selector) :
+
+                                               // If not, just inject the full result
+                                               responseText );
+                               }
+
+                               if ( callback ) {
+                                       self.each( callback, [ responseText, status, jqXHR ] );
+                               }
+                       }
+               });
+
+               return this;
+       },
+
+       serialize: function() {
+               return jQuery.param( this.serializeArray() );
+       },
+
+       serializeArray: function() {
+               return this.map(function(){
+                       return this.elements ? jQuery.makeArray( this.elements ) : this;
+               })
+               .filter(function(){
+                       return this.name && !this.disabled &&
+                               ( this.checked || rselectTextarea.test( this.nodeName ) ||
+                                       rinput.test( this.type ) );
+               })
+               .map(function( i, elem ){
+                       var val = jQuery( this ).val();
+
+                       return val == null ?
+                               null :
+                               jQuery.isArray( val ) ?
+                                       jQuery.map( val, function( val, i ){
+                                               return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+                                       }) :
+                                       { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+               }).get();
+       }
+});
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
+       jQuery.fn[ o ] = function( f ){
+               return this.on( o, f );
+       };
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+       jQuery[ method ] = function( url, data, callback, type ) {
+               // shift arguments if data argument was omitted
+               if ( jQuery.isFunction( data ) ) {
+                       type = type || callback;
+                       callback = data;
+                       data = undefined;
+               }
+
+               return jQuery.ajax({
+                       type: method,
+                       url: url,
+                       data: data,
+                       success: callback,
+                       dataType: type
+               });
+       };
+});
+
+jQuery.extend({
+
+       getScript: function( url, callback ) {
+               return jQuery.get( url, undefined, callback, "script" );
+       },
+
+       getJSON: function( url, data, callback ) {
+               return jQuery.get( url, data, callback, "json" );
+       },
+
+       // Creates a full fledged settings object into target
+       // with both ajaxSettings and settings fields.
+       // If target is omitted, writes into ajaxSettings.
+       ajaxSetup: function( target, settings ) {
+               if ( settings ) {
+                       // Building a settings object
+                       ajaxExtend( target, jQuery.ajaxSettings );
+               } else {
+                       // Extending ajaxSettings
+                       settings = target;
+                       target = jQuery.ajaxSettings;
+               }
+               ajaxExtend( target, settings );
+               return target;
+       },
+
+       ajaxSettings: {
+               url: ajaxLocation,
+               isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+               global: true,
+               type: "GET",
+               contentType: "application/x-www-form-urlencoded",
+               processData: true,
+               async: true,
+               /*
+               timeout: 0,
+               data: null,
+               dataType: null,
+               username: null,
+               password: null,
+               cache: null,
+               traditional: false,
+               headers: {},
+               */
+
+               accepts: {
+                       xml: "application/xml, text/xml",
+                       html: "text/html",
+                       text: "text/plain",
+                       json: "application/json, text/javascript",
+                       "*": allTypes
+               },
+
+               contents: {
+                       xml: /xml/,
+                       html: /html/,
+                       json: /json/
+               },
+
+               responseFields: {
+                       xml: "responseXML",
+                       text: "responseText"
+               },
+
+               // List of data converters
+               // 1) key format is "source_type destination_type" (a single space in-between)
+               // 2) the catchall symbol "*" can be used for source_type
+               converters: {
+
+                       // Convert anything to text
+                       "* text": window.String,
+
+                       // Text to html (true = no transformation)
+                       "text html": true,
+
+                       // Evaluate text as a json expression
+                       "text json": jQuery.parseJSON,
+
+                       // Parse text as xml
+                       "text xml": jQuery.parseXML
+               },
+
+               // For options that shouldn't be deep extended:
+               // you can add your own custom options here if
+               // and when you create one that shouldn't be
+               // deep extended (see ajaxExtend)
+               flatOptions: {
+                       context: true,
+                       url: true
+               }
+       },
+
+       ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+       ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+       // Main method
+       ajax: function( url, options ) {
+
+               // If url is an object, simulate pre-1.5 signature
+               if ( typeof url === "object" ) {
+                       options = url;
+                       url = undefined;
+               }
+
+               // Force options to be an object
+               options = options || {};
+
+               var // Create the final options object
+                       s = jQuery.ajaxSetup( {}, options ),
+                       // Callbacks context
+                       callbackContext = s.context || s,
+                       // Context for global events
+                       // It's the callbackContext if one was provided in the options
+                       // and if it's a DOM node or a jQuery collection
+                       globalEventContext = callbackContext !== s &&
+                               ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
+                                               jQuery( callbackContext ) : jQuery.event,
+                       // Deferreds
+                       deferred = jQuery.Deferred(),
+                       completeDeferred = jQuery.Callbacks( "once memory" ),
+                       // Status-dependent callbacks
+                       statusCode = s.statusCode || {},
+                       // ifModified key
+                       ifModifiedKey,
+                       // Headers (they are sent all at once)
+                       requestHeaders = {},
+                       requestHeadersNames = {},
+                       // Response headers
+                       responseHeadersString,
+                       responseHeaders,
+                       // transport
+                       transport,
+                       // timeout handle
+                       timeoutTimer,
+                       // Cross-domain detection vars
+                       parts,
+                       // The jqXHR state
+                       state = 0,
+                       // To know if global events are to be dispatched
+                       fireGlobals,
+                       // Loop variable
+                       i,
+                       // Fake xhr
+                       jqXHR = {
+
+                               readyState: 0,
+
+                               // Caches the header
+                               setRequestHeader: function( name, value ) {
+                                       if ( !state ) {
+                                               var lname = name.toLowerCase();
+                                               name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+                                               requestHeaders[ name ] = value;
+                                       }
+                                       return this;
+                               },
+
+                               // Raw string
+                               getAllResponseHeaders: function() {
+                                       return state === 2 ? responseHeadersString : null;
+                               },
+
+                               // Builds headers hashtable if needed
+                               getResponseHeader: function( key ) {
+                                       var match;
+                                       if ( state === 2 ) {
+                                               if ( !responseHeaders ) {
+                                                       responseHeaders = {};
+                                                       while( ( match = rheaders.exec( responseHeadersString ) ) ) {
+                                                               responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+                                                       }
+                                               }
+                                               match = responseHeaders[ key.toLowerCase() ];
+                                       }
+                                       return match === undefined ? null : match;
+                               },
+
+                               // Overrides response content-type header
+                               overrideMimeType: function( type ) {
+                                       if ( !state ) {
+                                               s.mimeType = type;
+                                       }
+                                       return this;
+                               },
+
+                               // Cancel the request
+                               abort: function( statusText ) {
+                                       statusText = statusText || "abort";
+                                       if ( transport ) {
+                                               transport.abort( statusText );
+                                       }
+                                       done( 0, statusText );
+                                       return this;
+                               }
+                       };
+
+               // Callback for when everything is done
+               // It is defined here because jslint complains if it is declared
+               // at the end of the function (which would be more logical and readable)
+               function done( status, nativeStatusText, responses, headers ) {
+
+                       // Called once
+                       if ( state === 2 ) {
+                               return;
+                       }
+
+                       // State is "done" now
+                       state = 2;
+
+                       // Clear timeout if it exists
+                       if ( timeoutTimer ) {
+                               clearTimeout( timeoutTimer );
+                       }
+
+                       // Dereference transport for early garbage collection
+                       // (no matter how long the jqXHR object will be used)
+                       transport = undefined;
+
+                       // Cache response headers
+                       responseHeadersString = headers || "";
+
+                       // Set readyState
+                       jqXHR.readyState = status > 0 ? 4 : 0;
+
+                       var isSuccess,
+                               success,
+                               error,
+                               statusText = nativeStatusText,
+                               response = responses ? ajaxHandleResponses( s, jqXHR, responses ) : undefined,
+                               lastModified,
+                               etag;
+
+                       // If successful, handle type chaining
+                       if ( status >= 200 && status < 300 || status === 304 ) {
+
+                               // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+                               if ( s.ifModified ) {
+
+                                       if ( ( lastModified = jqXHR.getResponseHeader( "Last-Modified" ) ) ) {
+                                               jQuery.lastModified[ ifModifiedKey ] = lastModified;
+                                       }
+                                       if ( ( etag = jqXHR.getResponseHeader( "Etag" ) ) ) {
+                                               jQuery.etag[ ifModifiedKey ] = etag;
+                                       }
+                               }
+
+                               // If not modified
+                               if ( status === 304 ) {
+
+                                       statusText = "notmodified";
+                                       isSuccess = true;
+
+                               // If we have data
+                               } else {
+
+                                       try {
+                                               success = ajaxConvert( s, response );
+                                               statusText = "success";
+                                               isSuccess = true;
+                                       } catch(e) {
+                                               // We have a parsererror
+                                               statusText = "parsererror";
+                                               error = e;
+                                       }
+                               }
+                       } else {
+                               // We extract error from statusText
+                               // then normalize statusText and status for non-aborts
+                               error = statusText;
+                               if ( !statusText || status ) {
+                                       statusText = "error";
+                                       if ( status < 0 ) {
+                                               status = 0;
+                                       }
+                               }
+                       }
+
+                       // Set data for the fake xhr object
+                       jqXHR.status = status;
+                       jqXHR.statusText = "" + ( nativeStatusText || statusText );
+
+                       // Success/Error
+                       if ( isSuccess ) {
+                               deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+                       } else {
+                               deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+                       }
+
+                       // Status-dependent callbacks
+                       jqXHR.statusCode( statusCode );
+                       statusCode = undefined;
+
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
+                                               [ jqXHR, s, isSuccess ? success : error ] );
+                       }
+
+                       // Complete
+                       completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+                               // Handle the global AJAX counter
+                               if ( !( --jQuery.active ) ) {
+                                       jQuery.event.trigger( "ajaxStop" );
+                               }
+                       }
+               }
+
+               // Attach deferreds
+               deferred.promise( jqXHR );
+               jqXHR.success = jqXHR.done;
+               jqXHR.error = jqXHR.fail;
+               jqXHR.complete = completeDeferred.add;
+
+               // Status-dependent callbacks
+               jqXHR.statusCode = function( map ) {
+                       if ( map ) {
+                               var tmp;
+                               if ( state < 2 ) {
+                                       for ( tmp in map ) {
+                                               statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
+                                       }
+                               } else {
+                                       tmp = map[ jqXHR.status ];
+                                       jqXHR.then( tmp, tmp );
+                               }
+                       }
+                       return this;
+               };
+
+               // Remove hash character (#7531: and string promotion)
+               // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+               // We also use the url parameter if available
+               s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+               // Extract dataTypes list
+               s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( rspacesAjax );
+
+               // Determine if a cross-domain request is in order
+               if ( s.crossDomain == null ) {
+                       parts = rurl.exec( s.url.toLowerCase() );
+                       s.crossDomain = !!( parts &&
+                               ( parts[ 1 ] != ajaxLocParts[ 1 ] || parts[ 2 ] != ajaxLocParts[ 2 ] ||
+                                       ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
+                                               ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
+                       );
+               }
+
+               // Convert data if not already a string
+               if ( s.data && s.processData && typeof s.data !== "string" ) {
+                       s.data = jQuery.param( s.data, s.traditional );
+               }
+
+               // Apply prefilters
+               inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+               // If request was aborted inside a prefiler, stop there
+               if ( state === 2 ) {
+                       return false;
+               }
+
+               // We can fire global events as of now if asked to
+               fireGlobals = s.global;
+
+               // Uppercase the type
+               s.type = s.type.toUpperCase();
+
+               // Determine if request has content
+               s.hasContent = !rnoContent.test( s.type );
+
+               // Watch for a new set of requests
+               if ( fireGlobals && jQuery.active++ === 0 ) {
+                       jQuery.event.trigger( "ajaxStart" );
+               }
+
+               // More options handling for requests with no content
+               if ( !s.hasContent ) {
+
+                       // If data is available, append data to url
+                       if ( s.data ) {
+                               s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
+                               // #9682: remove data so that it's not used in an eventual retry
+                               delete s.data;
+                       }
+
+                       // Get ifModifiedKey before adding the anti-cache parameter
+                       ifModifiedKey = s.url;
+
+                       // Add anti-cache in url if needed
+                       if ( s.cache === false ) {
+
+                               var ts = jQuery.now(),
+                                       // try replacing _= if it is there
+                                       ret = s.url.replace( rts, "$1_=" + ts );
+
+                               // if nothing was replaced, add timestamp to the end
+                               s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
+                       }
+               }
+
+               // Set the correct header, if data is being sent
+               if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+                       jqXHR.setRequestHeader( "Content-Type", s.contentType );
+               }
+
+               // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+               if ( s.ifModified ) {
+                       ifModifiedKey = ifModifiedKey || s.url;
+                       if ( jQuery.lastModified[ ifModifiedKey ] ) {
+                               jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
+                       }
+                       if ( jQuery.etag[ ifModifiedKey ] ) {
+                               jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
+                       }
+               }
+
+               // Set the Accepts header for the server, depending on the dataType
+               jqXHR.setRequestHeader(
+                       "Accept",
+                       s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+                               s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+                               s.accepts[ "*" ]
+               );
+
+               // Check for headers option
+               for ( i in s.headers ) {
+                       jqXHR.setRequestHeader( i, s.headers[ i ] );
+               }
+
+               // Allow custom headers/mimetypes and early abort
+               if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+                               // Abort if not done already
+                               jqXHR.abort();
+                               return false;
+
+               }
+
+               // Install callbacks on deferreds
+               for ( i in { success: 1, error: 1, complete: 1 } ) {
+                       jqXHR[ i ]( s[ i ] );
+               }
+
+               // Get transport
+               transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+               // If no transport, we auto-abort
+               if ( !transport ) {
+                       done( -1, "No Transport" );
+               } else {
+                       jqXHR.readyState = 1;
+                       // Send global event
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+                       }
+                       // Timeout
+                       if ( s.async && s.timeout > 0 ) {
+                               timeoutTimer = setTimeout( function(){
+                                       jqXHR.abort( "timeout" );
+                               }, s.timeout );
+                       }
+
+                       try {
+                               state = 1;
+                               transport.send( requestHeaders, done );
+                       } catch (e) {
+                               // Propagate exception as error if not done
+                               if ( state < 2 ) {
+                                       done( -1, e );
+                               // Simply rethrow otherwise
+                               } else {
+                                       throw e;
+                               }
+                       }
+               }
+
+               return jqXHR;
+       },
+
+       // Serialize an array of form elements or a set of
+       // key/values into a query string
+       param: function( a, traditional ) {
+               var s = [],
+                       add = function( key, value ) {
+                               // If value is a function, invoke it and return its value
+                               value = jQuery.isFunction( value ) ? value() : value;
+                               s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+                       };
+
+               // Set traditional to true for jQuery <= 1.3.2 behavior.
+               if ( traditional === undefined ) {
+                       traditional = jQuery.ajaxSettings.traditional;
+               }
+
+               // If an array was passed in, assume that it is an array of form elements.
+               if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+                       // Serialize the form elements
+                       jQuery.each( a, function() {
+                               add( this.name, this.value );
+                       });
+
+               } else {
+                       // If traditional, encode the "old" way (the way 1.3.2 or older
+                       // did it), otherwise encode params recursively.
+                       for ( var prefix in a ) {
+                               buildParams( prefix, a[ prefix ], traditional, add );
+                       }
+               }
+
+               // Return the resulting serialization
+               return s.join( "&" ).replace( r20, "+" );
+       }
+});
+
+function buildParams( prefix, obj, traditional, add ) {
+       if ( jQuery.isArray( obj ) ) {
+               // Serialize array item.
+               jQuery.each( obj, function( i, v ) {
+                       if ( traditional || rbracket.test( prefix ) ) {
+                               // Treat each array item as a scalar.
+                               add( prefix, v );
+
+                       } else {
+                               // If array item is non-scalar (array or object), encode its
+                               // numeric index to resolve deserialization ambiguity issues.
+                               // Note that rack (as of 1.0.0) can't currently deserialize
+                               // nested arrays properly, and attempting to do so may cause
+                               // a server error. Possible fixes are to modify rack's
+                               // deserialization algorithm or to provide an option or flag
+                               // to force array serialization to be shallow.
+                               buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v, traditional, add );
+                       }
+               });
+
+       } else if ( !traditional && obj != null && typeof obj === "object" ) {
+               // Serialize object item.
+               for ( var name in obj ) {
+                       buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+               }
+
+       } else {
+               // Serialize scalar item.
+               add( prefix, obj );
+       }
+}
+
+// This is still on the jQuery object... for now
+// Want to move this to jQuery.ajax some day
+jQuery.extend({
+
+       // Counter for holding the number of active queries
+       active: 0,
+
+       // Last-Modified header cache for next request
+       lastModified: {},
+       etag: {}
+
+});
+
+/* Handles responses to an ajax request:
+ * - sets all responseXXX fields accordingly
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+       var contents = s.contents,
+               dataTypes = s.dataTypes,
+               responseFields = s.responseFields,
+               ct,
+               type,
+               finalDataType,
+               firstDataType;
+
+       // Fill responseXXX fields
+       for ( type in responseFields ) {
+               if ( type in responses ) {
+                       jqXHR[ responseFields[type] ] = responses[ type ];
+               }
+       }
+
+       // Remove auto dataType and get content-type in the process
+       while( dataTypes[ 0 ] === "*" ) {
+               dataTypes.shift();
+               if ( ct === undefined ) {
+                       ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
+               }
+       }
+
+       // Check if we're dealing with a known content-type
+       if ( ct ) {
+               for ( type in contents ) {
+                       if ( contents[ type ] && contents[ type ].test( ct ) ) {
+                               dataTypes.unshift( type );
+                               break;
+                       }
+               }
+       }
+
+       // Check to see if we have a response for the expected dataType
+       if ( dataTypes[ 0 ] in responses ) {
+               finalDataType = dataTypes[ 0 ];
+       } else {
+               // Try convertible dataTypes
+               for ( type in responses ) {
+                       if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+                               finalDataType = type;
+                               break;
+                       }
+                       if ( !firstDataType ) {
+                               firstDataType = type;
+                       }
+               }
+               // Or just use first one
+               finalDataType = finalDataType || firstDataType;
+       }
+
+       // If we found a dataType
+       // We add the dataType to the list if needed
+       // and return the corresponding response
+       if ( finalDataType ) {
+               if ( finalDataType !== dataTypes[ 0 ] ) {
+                       dataTypes.unshift( finalDataType );
+               }
+               return responses[ finalDataType ];
+       }
+}
+
+// Chain conversions given the request and the original response
+function ajaxConvert( s, response ) {
+
+       // Apply the dataFilter if provided
+       if ( s.dataFilter ) {
+               response = s.dataFilter( response, s.dataType );
+       }
+
+       var dataTypes = s.dataTypes,
+               converters = {},
+               i,
+               key,
+               length = dataTypes.length,
+               tmp,
+               // Current and previous dataTypes
+               current = dataTypes[ 0 ],
+               prev,
+               // Conversion expression
+               conversion,
+               // Conversion function
+               conv,
+               // Conversion functions (transitive conversion)
+               conv1,
+               conv2;
+
+       // For each dataType in the chain
+       for ( i = 1; i < length; i++ ) {
+
+               // Create converters map
+               // with lowercased keys
+               if ( i === 1 ) {
+                       for ( key in s.converters ) {
+                               if ( typeof key === "string" ) {
+                                       converters[ key.toLowerCase() ] = s.converters[ key ];
+                               }
+                       }
+               }
+
+               // Get the dataTypes
+               prev = current;
+               current = dataTypes[ i ];
+
+               // If current is auto dataType, update it to prev
+               if ( current === "*" ) {
+                       current = prev;
+               // If no auto and dataTypes are actually different
+               } else if ( prev !== "*" && prev !== current ) {
+
+                       // Get the converter
+                       conversion = prev + " " + current;
+                       conv = converters[ conversion ] || converters[ "* " + current ];
+
+                       // If there is no direct converter, search transitively
+                       if ( !conv ) {
+                               conv2 = undefined;
+                               for ( conv1 in converters ) {
+                                       tmp = conv1.split( " " );
+                                       if ( tmp[ 0 ] === prev || tmp[ 0 ] === "*" ) {
+                                               conv2 = converters[ tmp[1] + " " + current ];
+                                               if ( conv2 ) {
+                                                       conv1 = converters[ conv1 ];
+                                                       if ( conv1 === true ) {
+                                                               conv = conv2;
+                                                       } else if ( conv2 === true ) {
+                                                               conv = conv1;
+                                                       }
+                                                       break;
+                                               }
+                                       }
+                               }
+                       }
+                       // If we found no converter, dispatch an error
+                       if ( !( conv || conv2 ) ) {
+                               jQuery.error( "No conversion from " + conversion.replace(" "," to ") );
+                       }
+                       // If found converter is not an equivalence
+                       if ( conv !== true ) {
+                               // Convert with 1 or 2 converters accordingly
+                               response = conv ? conv( response ) : conv2( conv1(response) );
+                       }
+               }
+       }
+       return response;
+}
+
+
+
+
+var jsc = jQuery.now(),
+       jsre = /(\=)\?(&|$)|\?\?/i;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+       jsonp: "callback",
+       jsonpCallback: function() {
+               return jQuery.expando + "_" + ( jsc++ );
+       }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+       var inspectData = s.contentType === "application/x-www-form-urlencoded" &&
+               ( typeof s.data === "string" );
+
+       if ( s.dataTypes[ 0 ] === "jsonp" ||
+               s.jsonp !== false && ( jsre.test( s.url ) ||
+                               inspectData && jsre.test( s.data ) ) ) {
+
+               var responseContainer,
+                       jsonpCallback = s.jsonpCallback =
+                               jQuery.isFunction( s.jsonpCallback ) ? s.jsonpCallback() : s.jsonpCallback,
+                       previous = window[ jsonpCallback ],
+                       url = s.url,
+                       data = s.data,
+                       replace = "$1" + jsonpCallback + "$2";
+
+               if ( s.jsonp !== false ) {
+                       url = url.replace( jsre, replace );
+                       if ( s.url === url ) {
+                               if ( inspectData ) {
+                                       data = data.replace( jsre, replace );
+                               }
+                               if ( s.data === data ) {
+                                       // Add callback manually
+                                       url += (/\?/.test( url ) ? "&" : "?") + s.jsonp + "=" + jsonpCallback;
+                               }
+                       }
+               }
+
+               s.url = url;
+               s.data = data;
+
+               // Install callback
+               window[ jsonpCallback ] = function( response ) {
+                       responseContainer = [ response ];
+               };
+
+               // Clean-up function
+               jqXHR.always(function() {
+                       // Set callback back to previous value
+                       window[ jsonpCallback ] = previous;
+                       // Call if it was a function and we have a response
+                       if ( responseContainer && jQuery.isFunction( previous ) ) {
+                               window[ jsonpCallback ]( responseContainer[ 0 ] );
+                       }
+               });
+
+               // Use data converter to retrieve json after script execution
+               s.converters["script json"] = function() {
+                       if ( !responseContainer ) {
+                               jQuery.error( jsonpCallback + " was not called" );
+                       }
+                       return responseContainer[ 0 ];
+               };
+
+               // force json dataType
+               s.dataTypes[ 0 ] = "json";
+
+               // Delegate to script
+               return "script";
+       }
+});
+
+
+
+
+// Install script dataType
+jQuery.ajaxSetup({
+       accepts: {
+               script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+       },
+       contents: {
+               script: /javascript|ecmascript/
+       },
+       converters: {
+               "text script": function( text ) {
+                       jQuery.globalEval( text );
+                       return text;
+               }
+       }
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+       if ( s.cache === undefined ) {
+               s.cache = false;
+       }
+       if ( s.crossDomain ) {
+               s.type = "GET";
+               s.global = false;
+       }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+       // This transport only deals with cross domain requests
+       if ( s.crossDomain ) {
+
+               var script,
+                       head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
+
+               return {
+
+                       send: function( _, callback ) {
+
+                               script = document.createElement( "script" );
+
+                               script.async = "async";
+
+                               if ( s.scriptCharset ) {
+                                       script.charset = s.scriptCharset;
+                               }
+
+                               script.src = s.url;
+
+                               // Attach handlers for all browsers
+                               script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+                                       if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+                                               // Handle memory leak in IE
+                                               script.onload = script.onreadystatechange = null;
+
+                                               // Remove the script
+                                               if ( head && script.parentNode ) {
+                                                       head.removeChild( script );
+                                               }
+
+                                               // Dereference the script
+                                               script = undefined;
+
+                                               // Callback if not abort
+                                               if ( !isAbort ) {
+                                                       callback( 200, "success" );
+                                               }
+                                       }
+                               };
+                               // Use insertBefore instead of appendChild  to circumvent an IE6 bug.
+                               // This arises when a base node is used (#2709 and #4378).
+                               head.insertBefore( script, head.firstChild );
+                       },
+
+                       abort: function() {
+                               if ( script ) {
+                                       script.onload( 0, 1 );
+                               }
+                       }
+               };
+       }
+});
+
+
+
+
+var // #5280: Internet Explorer will keep connections alive if we don't abort on unload
+       xhrOnUnloadAbort = window.ActiveXObject ? function() {
+               // Abort all pending requests
+               for ( var key in xhrCallbacks ) {
+                       xhrCallbacks[ key ]( 0, 1 );
+               }
+       } : false,
+       xhrId = 0,
+       xhrCallbacks;
+
+// Functions to create xhrs
+function createStandardXHR() {
+       try {
+               return new window.XMLHttpRequest();
+       } catch( e ) {}
+}
+
+function createActiveXHR() {
+       try {
+               return new window.ActiveXObject( "Microsoft.XMLHTTP" );
+       } catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+       /* Microsoft failed to properly
+        * implement the XMLHttpRequest in IE7 (can't request local files),
+        * so we use the ActiveXObject when it is available
+        * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+        * we need a fallback.
+        */
+       function() {
+               return !this.isLocal && createStandardXHR() || createActiveXHR();
+       } :
+       // For all other browsers, use the standard XMLHttpRequest object
+       createStandardXHR;
+
+// Determine support properties
+(function( xhr ) {
+       jQuery.extend( jQuery.support, {
+               ajax: !!xhr,
+               cors: !!xhr && ( "withCredentials" in xhr )
+       });
+})( jQuery.ajaxSettings.xhr() );
+
+// Create transport if the browser can provide an xhr
+if ( jQuery.support.ajax ) {
+
+       jQuery.ajaxTransport(function( s ) {
+               // Cross domain only allowed if supported through XMLHttpRequest
+               if ( !s.crossDomain || jQuery.support.cors ) {
+
+                       var callback;
+
+                       return {
+                               send: function( headers, complete ) {
+
+                                       // Get a new xhr
+                                       var xhr = s.xhr(),
+                                               handle,
+                                               i;
+
+                                       // Open the socket
+                                       // Passing null username, generates a login popup on Opera (#2865)
+                                       if ( s.username ) {
+                                               xhr.open( s.type, s.url, s.async, s.username, s.password );
+                                       } else {
+                                               xhr.open( s.type, s.url, s.async );
+                                       }
+
+                                       // Apply custom fields if provided
+                                       if ( s.xhrFields ) {
+                                               for ( i in s.xhrFields ) {
+                                                       xhr[ i ] = s.xhrFields[ i ];
+                                               }
+                                       }
+
+                                       // Override mime type if needed
+                                       if ( s.mimeType && xhr.overrideMimeType ) {
+                                               xhr.overrideMimeType( s.mimeType );
+                                       }
+
+                                       // X-Requested-With header
+                                       // For cross-domain requests, seeing as conditions for a preflight are
+                                       // akin to a jigsaw puzzle, we simply never set it to be sure.
+                                       // (it can always be set on a per-request basis or even using ajaxSetup)
+                                       // For same-domain requests, won't change header if already provided.
+                                       if ( !s.crossDomain && !headers["X-Requested-With"] ) {
+                                               headers[ "X-Requested-With" ] = "XMLHttpRequest";
+                                       }
+
+                                       // Need an extra try/catch for cross domain requests in Firefox 3
+                                       try {
+                                               for ( i in headers ) {
+                                                       xhr.setRequestHeader( i, headers[ i ] );
+                                               }
+                                       } catch( _ ) {}
+
+                                       // Do send the request
+                                       // This may raise an exception which is actually
+                                       // handled in jQuery.ajax (so no try/catch here)
+                                       xhr.send( ( s.hasContent && s.data ) || null );
+
+                                       // Listener
+                                       callback = function( _, isAbort ) {
+
+                                               var status,
+                                                       statusText,
+                                                       responseHeaders,
+                                                       responses,
+                                                       xml;
+
+                                               // Firefox throws exceptions when accessing properties
+                                               // of an xhr when a network error occured
+                                               // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+                                               try {
+
+                                                       // Was never called and is aborted or complete
+                                                       if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+                                                               // Only called once
+                                                               callback = undefined;
+
+                                                               // Do not keep as active anymore
+                                                               if ( handle ) {
+                                                                       xhr.onreadystatechange = jQuery.noop;
+                                                                       if ( xhrOnUnloadAbort ) {
+                                                                               delete xhrCallbacks[ handle ];
+                                                                       }
+                                                               }
+
+                                                               // If it's an abort
+                                                               if ( isAbort ) {
+                                                                       // Abort it manually if needed
+                                                                       if ( xhr.readyState !== 4 ) {
+                                                                               xhr.abort();
+                                                                       }
+                                                               } else {
+                                                                       status = xhr.status;
+                                                                       responseHeaders = xhr.getAllResponseHeaders();
+                                                                       responses = {};
+                                                                       xml = xhr.responseXML;
+
+                                                                       // Construct response list
+                                                                       if ( xml && xml.documentElement /* #4958 */ ) {
+                                                                               responses.xml = xml;
+                                                                       }
+                                                                       responses.text = xhr.responseText;
+
+                                                                       // Firefox throws an exception when accessing
+                                                                       // statusText for faulty cross-domain requests
+                                                                       try {
+                                                                               statusText = xhr.statusText;
+                                                                       } catch( e ) {
+                                                                               // We normalize with Webkit giving an empty statusText
+                                                                               statusText = "";
+                                                                       }
+
+                                                                       // Filter status for non standard behaviors
+
+                                                                       // If the request is local and we have data: assume a success
+                                                                       // (success with no data won't get notified, that's the best we
+                                                                       // can do given current implementations)
+                                                                       if ( !status && s.isLocal && !s.crossDomain ) {
+                                                                               status = responses.text ? 200 : 404;
+                                                                       // IE - #1450: sometimes returns 1223 when it should be 204
+                                                                       } else if ( status === 1223 ) {
+                                                                               status = 204;
+                                                                       }
+                                                               }
+                                                       }
+                                               } catch( firefoxAccessException ) {
+                                                       if ( !isAbort ) {
+                                                               complete( -1, firefoxAccessException );
+                                                       }
+                                               }
+
+                                               // Call complete if needed
+                                               if ( responses ) {
+                                                       complete( status, statusText, responses, responseHeaders );
+                                               }
+                                       };
+
+                                       // if we're in sync mode or it's in cache
+                                       // and has been retrieved directly (IE6 & IE7)
+                                       // we need to manually fire the callback
+                                       if ( !s.async || xhr.readyState === 4 ) {
+                                               callback();
+                                       } else {
+                                               handle = ++xhrId;
+                                               if ( xhrOnUnloadAbort ) {
+                                                       // Create the active xhrs callbacks list if needed
+                                                       // and attach the unload handler
+                                                       if ( !xhrCallbacks ) {
+                                                               xhrCallbacks = {};
+                                                               jQuery( window ).unload( xhrOnUnloadAbort );
+                                                       }
+                                                       // Add to list of active xhrs callbacks
+                                                       xhrCallbacks[ handle ] = callback;
+                                               }
+                                               xhr.onreadystatechange = callback;
+                                       }
+                               },
+
+                               abort: function() {
+                                       if ( callback ) {
+                                               callback(0,1);
+                                       }
+                               }
+                       };
+               }
+       });
+}
+
+
+
+
+var elemdisplay = {},
+       iframe, iframeDoc,
+       rfxtypes = /^(?:toggle|show|hide)$/,
+       rfxnum = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
+       timerId,
+       fxAttrs = [
+               // height animations
+               [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
+               // width animations
+               [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
+               // opacity animations
+               [ "opacity" ]
+       ],
+       fxNow;
+
+jQuery.fn.extend({
+       show: function( speed, easing, callback ) {
+               var elem, display;
+
+               if ( speed || speed === 0 ) {
+                       return this.animate( genFx("show", 3), speed, easing, callback );
+
+               } else {
+                       for ( var i = 0, j = this.length; i < j; i++ ) {
+                               elem = this[ i ];
+
+                               if ( elem.style ) {
+                                       display = elem.style.display;
+
+                                       // Reset the inline display of this element to learn if it is
+                                       // being hidden by cascaded rules or not
+                                       if ( !jQuery._data(elem, "olddisplay") && display === "none" ) {
+                                               display = elem.style.display = "";
+                                       }
+
+                                       // Set elements which have been overridden with display: none
+                                       // in a stylesheet to whatever the default browser style is
+                                       // for such an element
+                                       if ( display === "" && jQuery.css(elem, "display") === "none" ) {
+                                               jQuery._data( elem, "olddisplay", defaultDisplay(elem.nodeName) );
+                                       }
+                               }
+                       }
+
+                       // Set the display of most of the elements in a second loop
+                       // to avoid the constant reflow
+                       for ( i = 0; i < j; i++ ) {
+                               elem = this[ i ];
+
+                               if ( elem.style ) {
+                                       display = elem.style.display;
+
+                                       if ( display === "" || display === "none" ) {
+                                               elem.style.display = jQuery._data( elem, "olddisplay" ) || "";
+                                       }
+                               }
+                       }
+
+                       return this;
+               }
+       },
+
+       hide: function( speed, easing, callback ) {
+               if ( speed || speed === 0 ) {
+                       return this.animate( genFx("hide", 3), speed, easing, callback);
+
+               } else {
+                       var elem, display,
+                               i = 0,
+                               j = this.length;
+
+                       for ( ; i < j; i++ ) {
+                               elem = this[i];
+                               if ( elem.style ) {
+                                       display = jQuery.css( elem, "display" );
+
+                                       if ( display !== "none" && !jQuery._data( elem, "olddisplay" ) ) {
+                                               jQuery._data( elem, "olddisplay", display );
+                                       }
+                               }
+                       }
+
+                       // Set the display of the elements in a second loop
+                       // to avoid the constant reflow
+                       for ( i = 0; i < j; i++ ) {
+                               if ( this[i].style ) {
+                                       this[i].style.display = "none";
+                               }
+                       }
+
+                       return this;
+               }
+       },
+
+       // Save the old toggle function
+       _toggle: jQuery.fn.toggle,
+
+       toggle: function( fn, fn2, callback ) {
+               var bool = typeof fn === "boolean";
+
+               if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
+                       this._toggle.apply( this, arguments );
+
+               } else if ( fn == null || bool ) {
+                       this.each(function() {
+                               var state = bool ? fn : jQuery(this).is(":hidden");
+                               jQuery(this)[ state ? "show" : "hide" ]();
+                       });
+
+               } else {
+                       this.animate(genFx("toggle", 3), fn, fn2, callback);
+               }
+
+               return this;
+       },
+
+       fadeTo: function( speed, to, easing, callback ) {
+               return this.filter(":hidden").css("opacity", 0).show().end()
+                                       .animate({opacity: to}, speed, easing, callback);
+       },
+
+       animate: function( prop, speed, easing, callback ) {
+               var optall = jQuery.speed( speed, easing, callback );
+
+               if ( jQuery.isEmptyObject( prop ) ) {
+                       return this.each( optall.complete, [ false ] );
+               }
+
+               // Do not change referenced properties as per-property easing will be lost
+               prop = jQuery.extend( {}, prop );
+
+               function doAnimation() {
+                       // XXX 'this' does not always have a nodeName when running the
+                       // test suite
+
+                       if ( optall.queue === false ) {
+                               jQuery._mark( this );
+                       }
+
+                       var opt = jQuery.extend( {}, optall ),
+                               isElement = this.nodeType === 1,
+                               hidden = isElement && jQuery(this).is(":hidden"),
+                               name, val, p, e,
+                               parts, start, end, unit,
+                               method;
+
+                       // will store per property easing and be used to determine when an animation is complete
+                       opt.animatedProperties = {};
+
+                       for ( p in prop ) {
+
+                               // property name normalization
+                               name = jQuery.camelCase( p );
+                               if ( p !== name ) {
+                                       prop[ name ] = prop[ p ];
+                                       delete prop[ p ];
+                               }
+
+                               val = prop[ name ];
+
+                               // easing resolution: per property > opt.specialEasing > opt.easing > 'swing' (default)
+                               if ( jQuery.isArray( val ) ) {
+                                       opt.animatedProperties[ name ] = val[ 1 ];
+                                       val = prop[ name ] = val[ 0 ];
+                               } else {
+                                       opt.animatedProperties[ name ] = opt.specialEasing && opt.specialEasing[ name ] || opt.easing || 'swing';
+                               }
+
+                               if ( val === "hide" && hidden || val === "show" && !hidden ) {
+                                       return opt.complete.call( this );
+                               }
+
+                               if ( isElement && ( name === "height" || name === "width" ) ) {
+                                       // Make sure that nothing sneaks out
+                                       // Record all 3 overflow attributes because IE does not
+                                       // change the overflow attribute when overflowX and
+                                       // overflowY are set to the same value
+                                       opt.overflow = [ this.style.overflow, this.style.overflowX, this.style.overflowY ];
+
+                                       // Set display property to inline-block for height/width
+                                       // animations on inline elements that are having width/height animated
+                                       if ( jQuery.css( this, "display" ) === "inline" &&
+                                                       jQuery.css( this, "float" ) === "none" ) {
+
+                                               // inline-level elements accept inline-block;
+                                               // block-level elements need to be inline with layout
+                                               if ( !jQuery.support.inlineBlockNeedsLayout || defaultDisplay( this.nodeName ) === "inline" ) {
+                                                       this.style.display = "inline-block";
+
+                                               } else {
+                                                       this.style.zoom = 1;
+                                               }
+                                       }
+                               }
+                       }
+
+                       if ( opt.overflow != null ) {
+                               this.style.overflow = "hidden";
+                       }
+
+                       for ( p in prop ) {
+                               e = new jQuery.fx( this, opt, p );
+                               val = prop[ p ];
+
+                               if ( rfxtypes.test( val ) ) {
+
+                                       // Tracks whether to show or hide based on private
+                                       // data attached to the element
+                                       method = jQuery._data( this, "toggle" + p ) || ( val === "toggle" ? hidden ? "show" : "hide" : 0 );
+                                       if ( method ) {
+                                               jQuery._data( this, "toggle" + p, method === "show" ? "hide" : "show" );
+                                               e[ method ]();
+                                       } else {
+                                               e[ val ]();
+                                       }
+
+                               } else {
+                                       parts = rfxnum.exec( val );
+                                       start = e.cur();
+
+                                       if ( parts ) {
+                                               end = parseFloat( parts[2] );
+                                               unit = parts[3] || ( jQuery.cssNumber[ p ] ? "" : "px" );
+
+                                               // We need to compute starting value
+                                               if ( unit !== "px" ) {
+                                                       jQuery.style( this, p, (end || 1) + unit);
+                                                       start = ( (end || 1) / e.cur() ) * start;
+                                                       jQuery.style( this, p, start + unit);
+                                               }
+
+                                               // If a +=/-= token was provided, we're doing a relative animation
+                                               if ( parts[1] ) {
+                                                       end = ( (parts[ 1 ] === "-=" ? -1 : 1) * end ) + start;
+                                               }
+
+                                               e.custom( start, end, unit );
+
+                                       } else {
+                                               e.custom( start, val, "" );
+                                       }
+                               }
+                       }
+
+                       // For JS strict compliance
+                       return true;
+               }
+
+               return optall.queue === false ?
+                       this.each( doAnimation ) :
+                       this.queue( optall.queue, doAnimation );
+       },
+
+       stop: function( type, clearQueue, gotoEnd ) {
+               if ( typeof type !== "string" ) {
+                       gotoEnd = clearQueue;
+                       clearQueue = type;
+                       type = undefined;
+               }
+               if ( clearQueue && type !== false ) {
+                       this.queue( type || "fx", [] );
+               }
+
+               return this.each(function() {
+                       var index,
+                               hadTimers = false,
+                               timers = jQuery.timers,
+                               data = jQuery._data( this );
+
+                       // clear marker counters if we know they won't be
+                       if ( !gotoEnd ) {
+                               jQuery._unmark( true, this );
+                       }
+
+                       function stopQueue( elem, data, index ) {
+                               var hooks = data[ index ];
+                               jQuery.removeData( elem, index, true );
+                               hooks.stop( gotoEnd );
+                       }
+
+                       if ( type == null ) {
+                               for ( index in data ) {
+                                       if ( data[ index ] && data[ index ].stop && index.indexOf(".run") === index.length - 4 ) {
+                                               stopQueue( this, data, index );
+                                       }
+                               }
+                       } else if ( data[ index = type + ".run" ] && data[ index ].stop ){
+                               stopQueue( this, data, index );
+                       }
+
+                       for ( index = timers.length; index--; ) {
+                               if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+                                       if ( gotoEnd ) {
+
+                                               // force the next step to be the last
+                                               timers[ index ]( true );
+                                       } else {
+                                               timers[ index ].saveState();
+                                       }
+                                       hadTimers = true;
+                                       timers.splice( index, 1 );
+                               }
+                       }
+
+                       // start the next in the queue if the last step wasn't forced
+                       // timers currently will call their complete callbacks, which will dequeue
+                       // but only if they were gotoEnd
+                       if ( !( gotoEnd && hadTimers ) ) {
+                               jQuery.dequeue( this, type );
+                       }
+               });
+       }
+
+});
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+       setTimeout( clearFxNow, 0 );
+       return ( fxNow = jQuery.now() );
+}
+
+function clearFxNow() {
+       fxNow = undefined;
+}
+
+// Generate parameters to create a standard animation
+function genFx( type, num ) {
+       var obj = {};
+
+       jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice( 0, num )), function() {
+               obj[ this ] = type;
+       });
+
+       return obj;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+       slideDown: genFx( "show", 1 ),
+       slideUp: genFx( "hide", 1 ),
+       slideToggle: genFx( "toggle", 1 ),
+       fadeIn: { opacity: "show" },
+       fadeOut: { opacity: "hide" },
+       fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+       jQuery.fn[ name ] = function( speed, easing, callback ) {
+               return this.animate( props, speed, easing, callback );
+       };
+});
+
+jQuery.extend({
+       speed: function( speed, easing, fn ) {
+               var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+                       complete: fn || !fn && easing ||
+                               jQuery.isFunction( speed ) && speed,
+                       duration: speed,
+                       easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+               };
+
+               opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+                       opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+               // normalize opt.queue - true/undefined/null -> "fx"
+               if ( opt.queue == null || opt.queue === true ) {
+                       opt.queue = "fx";
+               }
+
+               // Queueing
+               opt.old = opt.complete;
+
+               opt.complete = function( noUnmark ) {
+                       if ( jQuery.isFunction( opt.old ) ) {
+                               opt.old.call( this );
+                       }
+
+                       if ( opt.queue ) {
+                               jQuery.dequeue( this, opt.queue );
+                       } else if ( noUnmark !== false ) {
+                               jQuery._unmark( this );
+                       }
+               };
+
+               return opt;
+       },
+
+       easing: {
+               linear: function( p, n, firstNum, diff ) {
+                       return firstNum + diff * p;
+               },
+               swing: function( p, n, firstNum, diff ) {
+                       return ( ( -Math.cos( p*Math.PI ) / 2 ) + 0.5 ) * diff + firstNum;
+               }
+       },
+
+       timers: [],
+
+       fx: function( elem, options, prop ) {
+               this.options = options;
+               this.elem = elem;
+               this.prop = prop;
+
+               options.orig = options.orig || {};
+       }
+
+});
+
+jQuery.fx.prototype = {
+       // Simple function for setting a style value
+       update: function() {
+               if ( this.options.step ) {
+                       this.options.step.call( this.elem, this.now, this );
+               }
+
+               ( jQuery.fx.step[ this.prop ] || jQuery.fx.step._default )( this );
+       },
+
+       // Get the current size
+       cur: function() {
+               if ( this.elem[ this.prop ] != null && (!this.elem.style || this.elem.style[ this.prop ] == null) ) {
+                       return this.elem[ this.prop ];
+               }
+
+               var parsed,
+                       r = jQuery.css( this.elem, this.prop );
+               // Empty strings, null, undefined and "auto" are converted to 0,
+               // complex values such as "rotate(1rad)" are returned as is,
+               // simple values such as "10px" are parsed to Float.
+               return isNaN( parsed = parseFloat( r ) ) ? !r || r === "auto" ? 0 : r : parsed;
+       },
+
+       // Start an animation from one number to another
+       custom: function( from, to, unit ) {
+               var self = this,
+                       fx = jQuery.fx;
+
+               this.startTime = fxNow || createFxNow();
+               this.end = to;
+               this.now = this.start = from;
+               this.pos = this.state = 0;
+               this.unit = unit || this.unit || ( jQuery.cssNumber[ this.prop ] ? "" : "px" );
+
+               function t( gotoEnd ) {
+                       return self.step( gotoEnd );
+               }
+
+               t.queue = this.options.queue;
+               t.elem = this.elem;
+               t.saveState = function() {
+                       if ( self.options.hide && jQuery._data( self.elem, "fxshow" + self.prop ) === undefined ) {
+                               jQuery._data( self.elem, "fxshow" + self.prop, self.start );
+                       }
+               };
+
+               if ( t() && jQuery.timers.push(t) && !timerId ) {
+                       timerId = setInterval( fx.tick, fx.interval );
+               }
+       },
+
+       // Simple 'show' function
+       show: function() {
+               var dataShow = jQuery._data( this.elem, "fxshow" + this.prop );
+
+               // Remember where we started, so that we can go back to it later
+               this.options.orig[ this.prop ] = dataShow || jQuery.style( this.elem, this.prop );
+               this.options.show = true;
+
+               // Begin the animation
+               // Make sure that we start at a small width/height to avoid any flash of content
+               if ( dataShow !== undefined ) {
+                       // This show is picking up where a previous hide or show left off
+                       this.custom( this.cur(), dataShow );
+               } else {
+                       this.custom( this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur() );
+               }
+
+               // Start by showing the element
+               jQuery( this.elem ).show();
+       },
+
+       // Simple 'hide' function
+       hide: function() {
+               // Remember where we started, so that we can go back to it later
+               this.options.orig[ this.prop ] = jQuery._data( this.elem, "fxshow" + this.prop ) || jQuery.style( this.elem, this.prop );
+               this.options.hide = true;
+
+               // Begin the animation
+               this.custom( this.cur(), 0 );
+       },
+
+       // Each step of an animation
+       step: function( gotoEnd ) {
+               var p, n, complete,
+                       t = fxNow || createFxNow(),
+                       done = true,
+                       elem = this.elem,
+                       options = this.options;
+
+               if ( gotoEnd || t >= options.duration + this.startTime ) {
+                       this.now = this.end;
+                       this.pos = this.state = 1;
+                       this.update();
+
+                       options.animatedProperties[ this.prop ] = true;
+
+                       for ( p in options.animatedProperties ) {
+                               if ( options.animatedProperties[ p ] !== true ) {
+                                       done = false;
+                               }
+                       }
+
+                       if ( done ) {
+                               // Reset the overflow
+                               if ( options.overflow != null && !jQuery.support.shrinkWrapBlocks ) {
+
+                                       jQuery.each( [ "", "X", "Y" ], function( index, value ) {
+                                               elem.style[ "overflow" + value ] = options.overflow[ index ];
+                                       });
+                               }
+
+                               // Hide the element if the "hide" operation was done
+                               if ( options.hide ) {
+                                       jQuery( elem ).hide();
+                               }
+
+                               // Reset the properties, if the item has been hidden or shown
+                               if ( options.hide || options.show ) {
+                                       for ( p in options.animatedProperties ) {
+                                               jQuery.style( elem, p, options.orig[ p ] );
+                                               jQuery.removeData( elem, "fxshow" + p, true );
+                                               // Toggle data is no longer needed
+                                               jQuery.removeData( elem, "toggle" + p, true );
+                                       }
+                               }
+
+                               // Execute the complete function
+                               // in the event that the complete function throws an exception
+                               // we must ensure it won't be called twice. #5684
+
+                               complete = options.complete;
+                               if ( complete ) {
+
+                                       options.complete = false;
+                                       complete.call( elem );
+                               }
+                       }
+
+                       return false;
+
+               } else {
+                       // classical easing cannot be used with an Infinity duration
+                       if ( options.duration == Infinity ) {
+                               this.now = t;
+                       } else {
+                               n = t - this.startTime;
+                               this.state = n / options.duration;
+
+                               // Perform the easing function, defaults to swing
+                               this.pos = jQuery.easing[ options.animatedProperties[this.prop] ]( this.state, n, 0, 1, options.duration );
+                               this.now = this.start + ( (this.end - this.start) * this.pos );
+                       }
+                       // Perform the next step of the animation
+                       this.update();
+               }
+
+               return true;
+       }
+};
+
+jQuery.extend( jQuery.fx, {
+       tick: function() {
+               var timer,
+                       timers = jQuery.timers,
+                       i = 0;
+
+               for ( ; i < timers.length; i++ ) {
+                       timer = timers[ i ];
+                       // Checks the timer has not already been removed
+                       if ( !timer() && timers[ i ] === timer ) {
+                               timers.splice( i--, 1 );
+                       }
+               }
+
+               if ( !timers.length ) {
+                       jQuery.fx.stop();
+               }
+       },
+
+       interval: 13,
+
+       stop: function() {
+               clearInterval( timerId );
+               timerId = null;
+       },
+
+       speeds: {
+               slow: 600,
+               fast: 200,
+               // Default speed
+               _default: 400
+       },
+
+       step: {
+               opacity: function( fx ) {
+                       jQuery.style( fx.elem, "opacity", fx.now );
+               },
+
+               _default: function( fx ) {
+                       if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
+                               fx.elem.style[ fx.prop ] = fx.now + fx.unit;
+                       } else {
+                               fx.elem[ fx.prop ] = fx.now;
+                       }
+               }
+       }
+});
+
+// Adds width/height step functions
+// Do not set anything below 0
+jQuery.each([ "width", "height" ], function( i, prop ) {
+       jQuery.fx.step[ prop ] = function( fx ) {
+               jQuery.style( fx.elem, prop, Math.max(0, fx.now) + fx.unit );
+       };
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+       jQuery.expr.filters.animated = function( elem ) {
+               return jQuery.grep(jQuery.timers, function( fn ) {
+                       return elem === fn.elem;
+               }).length;
+       };
+}
+
+// Try to restore the default display value of an element
+function defaultDisplay( nodeName ) {
+
+       if ( !elemdisplay[ nodeName ] ) {
+
+               var body = document.body,
+                       elem = jQuery( "<" + nodeName + ">" ).appendTo( body ),
+                       display = elem.css( "display" );
+               elem.remove();
+
+               // If the simple way fails,
+               // get element's real default display by attaching it to a temp iframe
+               if ( display === "none" || display === "" ) {
+                       // No iframe to use yet, so create it
+                       if ( !iframe ) {
+                               iframe = document.createElement( "iframe" );
+                               iframe.frameBorder = iframe.width = iframe.height = 0;
+                       }
+
+                       body.appendChild( iframe );
+
+                       // Create a cacheable copy of the iframe document on first call.
+                       // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
+                       // document to it; WebKit & Firefox won't allow reusing the iframe document.
+                       if ( !iframeDoc || !iframe.createElement ) {
+                               iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
+                               iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
+                               iframeDoc.close();
+                       }
+
+                       elem = iframeDoc.createElement( nodeName );
+
+                       iframeDoc.body.appendChild( elem );
+
+                       display = jQuery.css( elem, "display" );
+                       body.removeChild( iframe );
+               }
+
+               // Store the correct default display
+               elemdisplay[ nodeName ] = display;
+       }
+
+       return elemdisplay[ nodeName ];
+}
+
+
+
+
+var rtable = /^t(?:able|d|h)$/i,
+       rroot = /^(?:body|html)$/i;
+
+if ( "getBoundingClientRect" in document.documentElement ) {
+       jQuery.fn.offset = function( options ) {
+               var elem = this[0], box;
+
+               if ( options ) {
+                       return this.each(function( i ) {
+                               jQuery.offset.setOffset( this, options, i );
+                       });
+               }
+
+               if ( !elem || !elem.ownerDocument ) {
+                       return null;
+               }
+
+               if ( elem === elem.ownerDocument.body ) {
+                       return jQuery.offset.bodyOffset( elem );
+               }
+
+               try {
+                       box = elem.getBoundingClientRect();
+               } catch(e) {}
+
+               var doc = elem.ownerDocument,
+                       docElem = doc.documentElement;
+
+               // Make sure we're not dealing with a disconnected DOM node
+               if ( !box || !jQuery.contains( docElem, elem ) ) {
+                       return box ? { top: box.top, left: box.left } : { top: 0, left: 0 };
+               }
+
+               var body = doc.body,
+                       win = getWindow(doc),
+                       clientTop  = docElem.clientTop  || body.clientTop  || 0,
+                       clientLeft = docElem.clientLeft || body.clientLeft || 0,
+                       scrollTop  = win.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop,
+                       scrollLeft = win.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft,
+                       top  = box.top  + scrollTop  - clientTop,
+                       left = box.left + scrollLeft - clientLeft;
+
+               return { top: top, left: left };
+       };
+
+} else {
+       jQuery.fn.offset = function( options ) {
+               var elem = this[0];
+
+               if ( options ) {
+                       return this.each(function( i ) {
+                               jQuery.offset.setOffset( this, options, i );
+                       });
+               }
+
+               if ( !elem || !elem.ownerDocument ) {
+                       return null;
+               }
+
+               if ( elem === elem.ownerDocument.body ) {
+                       return jQuery.offset.bodyOffset( elem );
+               }
+
+               var computedStyle,
+                       offsetParent = elem.offsetParent,
+                       prevOffsetParent = elem,
+                       doc = elem.ownerDocument,
+                       docElem = doc.documentElement,
+                       body = doc.body,
+                       defaultView = doc.defaultView,
+                       prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
+                       top = elem.offsetTop,
+                       left = elem.offsetLeft;
+
+               while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
+                       if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
+                               break;
+                       }
+
+                       computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
+                       top  -= elem.scrollTop;
+                       left -= elem.scrollLeft;
+
+                       if ( elem === offsetParent ) {
+                               top  += elem.offsetTop;
+                               left += elem.offsetLeft;
+
+                               if ( jQuery.support.doesNotAddBorder && !(jQuery.support.doesAddBorderForTableAndCells && rtable.test(elem.nodeName)) ) {
+                                       top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+                                       left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+                               }
+
+                               prevOffsetParent = offsetParent;
+                               offsetParent = elem.offsetParent;
+                       }
+
+                       if ( jQuery.support.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
+                               top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
+                               left += parseFloat( computedStyle.borderLeftWidth ) || 0;
+                       }
+
+                       prevComputedStyle = computedStyle;
+               }
+
+               if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
+                       top  += body.offsetTop;
+                       left += body.offsetLeft;
+               }
+
+               if ( jQuery.support.fixedPosition && prevComputedStyle.position === "fixed" ) {
+                       top  += Math.max( docElem.scrollTop, body.scrollTop );
+                       left += Math.max( docElem.scrollLeft, body.scrollLeft );
+               }
+
+               return { top: top, left: left };
+       };
+}
+
+jQuery.offset = {
+
+       bodyOffset: function( body ) {
+               var top = body.offsetTop,
+                       left = body.offsetLeft;
+
+               if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
+                       top  += parseFloat( jQuery.css(body, "marginTop") ) || 0;
+                       left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
+               }
+
+               return { top: top, left: left };
+       },
+
+       setOffset: function( elem, options, i ) {
+               var position = jQuery.css( elem, "position" );
+
+               // set position first, in-case top/left are set even on static elem
+               if ( position === "static" ) {
+                       elem.style.position = "relative";
+               }
+
+               var curElem = jQuery( elem ),
+                       curOffset = curElem.offset(),
+                       curCSSTop = jQuery.css( elem, "top" ),
+                       curCSSLeft = jQuery.css( elem, "left" ),
+                       calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+                       props = {}, curPosition = {}, curTop, curLeft;
+
+               // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+               if ( calculatePosition ) {
+                       curPosition = curElem.position();
+                       curTop = curPosition.top;
+                       curLeft = curPosition.left;
+               } else {
+                       curTop = parseFloat( curCSSTop ) || 0;
+                       curLeft = parseFloat( curCSSLeft ) || 0;
+               }
+
+               if ( jQuery.isFunction( options ) ) {
+                       options = options.call( elem, i, curOffset );
+               }
+
+               if ( options.top != null ) {
+                       props.top = ( options.top - curOffset.top ) + curTop;
+               }
+               if ( options.left != null ) {
+                       props.left = ( options.left - curOffset.left ) + curLeft;
+               }
+
+               if ( "using" in options ) {
+                       options.using.call( elem, props );
+               } else {
+                       curElem.css( props );
+               }
+       }
+};
+
+
+jQuery.fn.extend({
+
+       position: function() {
+               if ( !this[0] ) {
+                       return null;
+               }
+
+               var elem = this[0],
+
+               // Get *real* offsetParent
+               offsetParent = this.offsetParent(),
+
+               // Get correct offsets
+               offset       = this.offset(),
+               parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+
+               // Subtract element margins
+               // note: when an element has margin: auto the offsetLeft and marginLeft
+               // are the same in Safari causing offset.left to incorrectly be 0
+               offset.top  -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
+               offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
+
+               // Add offsetParent borders
+               parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
+               parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
+
+               // Subtract the two offsets
+               return {
+                       top:  offset.top  - parentOffset.top,
+                       left: offset.left - parentOffset.left
+               };
+       },
+
+       offsetParent: function() {
+               return this.map(function() {
+                       var offsetParent = this.offsetParent || document.body;
+                       while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
+                               offsetParent = offsetParent.offsetParent;
+                       }
+                       return offsetParent;
+               });
+       }
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( ["Left", "Top"], function( i, name ) {
+       var method = "scroll" + name;
+
+       jQuery.fn[ method ] = function( val ) {
+               var elem, win;
+
+               if ( val === undefined ) {
+                       elem = this[ 0 ];
+
+                       if ( !elem ) {
+                               return null;
+                       }
+
+                       win = getWindow( elem );
+
+                       // Return the scroll offset
+                       return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
+                               jQuery.support.boxModel && win.document.documentElement[ method ] ||
+                                       win.document.body[ method ] :
+                               elem[ method ];
+               }
+
+               // Set the scroll offset
+               return this.each(function() {
+                       win = getWindow( this );
+
+                       if ( win ) {
+                               win.scrollTo(
+                                       !i ? val : jQuery( win ).scrollLeft(),
+                                        i ? val : jQuery( win ).scrollTop()
+                               );
+
+                       } else {
+                               this[ method ] = val;
+                       }
+               });
+       };
+});
+
+function getWindow( elem ) {
+       return jQuery.isWindow( elem ) ?
+               elem :
+               elem.nodeType === 9 ?
+                       elem.defaultView || elem.parentWindow :
+                       false;
+}
+
+
+
+
+// Create width, height, innerHeight, innerWidth, outerHeight and outerWidth methods
+jQuery.each([ "Height", "Width" ], function( i, name ) {
+
+       var type = name.toLowerCase();
+
+       // innerHeight and innerWidth
+       jQuery.fn[ "inner" + name ] = function() {
+               var elem = this[0];
+               return elem ?
+                       elem.style ?
+                       parseFloat( jQuery.css( elem, type, "padding" ) ) :
+                       this[ type ]() :
+                       null;
+       };
+
+       // outerHeight and outerWidth
+       jQuery.fn[ "outer" + name ] = function( margin ) {
+               var elem = this[0];
+               return elem ?
+                       elem.style ?
+                       parseFloat( jQuery.css( elem, type, margin ? "margin" : "border" ) ) :
+                       this[ type ]() :
+                       null;
+       };
+
+       jQuery.fn[ type ] = function( size ) {
+               // Get window width or height
+               var elem = this[0];
+               if ( !elem ) {
+                       return size == null ? null : this;
+               }
+
+               if ( jQuery.isFunction( size ) ) {
+                       return this.each(function( i ) {
+                               var self = jQuery( this );
+                               self[ type ]( size.call( this, i, self[ type ]() ) );
+                       });
+               }
+
+               if ( jQuery.isWindow( elem ) ) {
+                       // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
+                       // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
+                       var docElemProp = elem.document.documentElement[ "client" + name ],
+                               body = elem.document.body;
+                       return elem.document.compatMode === "CSS1Compat" && docElemProp ||
+                               body && body[ "client" + name ] || docElemProp;
+
+               // Get document width or height
+               } else if ( elem.nodeType === 9 ) {
+                       // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+                       return Math.max(
+                               elem.documentElement["client" + name],
+                               elem.body["scroll" + name], elem.documentElement["scroll" + name],
+                               elem.body["offset" + name], elem.documentElement["offset" + name]
+                       );
+
+               // Get or set width or height on the element
+               } else if ( size === undefined ) {
+                       var orig = jQuery.css( elem, type ),
+                               ret = parseFloat( orig );
+
+                       return jQuery.isNumeric( ret ) ? ret : orig;
+
+               // Set the width or height on the element (default to pixels if value is unitless)
+               } else {
+                       return this.css( type, typeof size === "string" ? size : size + "px" );
+               }
+       };
+
+});
+
+
+
+
+// Expose jQuery to the global object
+window.jQuery = window.$ = jQuery;
+
+// Expose jQuery as an AMD module, but only for AMD loaders that
+// understand the issues with loading multiple versions of jQuery
+// in a page that all might call define(). The loader will indicate
+// they have special allowances for multiple jQuery versions by
+// specifying define.amd.jQuery = true. Register as a named module,
+// since jQuery can be concatenated with other files that may use define,
+// but not use a proper concatenation script that understands anonymous
+// AMD modules. A named AMD is safest and most robust way to register.
+// Lowercase jquery is used because AMD module names are derived from
+// file names, and jQuery is normally delivered in a lowercase file name.
+// Do this after creating the global so that if an AMD module wants to call
+// noConflict to hide this version of jQuery, it will work.
+if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
+       define( "jquery", [], function () { return jQuery; } );
+}
+
+
+
+})( window );
diff --git a/org.tizen.common.verrari/templates/cli/jqm-common-resources/js/jquery.mobile-1.1.0.js b/org.tizen.common.verrari/templates/cli/jqm-common-resources/js/jquery.mobile-1.1.0.js
new file mode 100644 (file)
index 0000000..c12426c
--- /dev/null
@@ -0,0 +1,7551 @@
+/*
+* jQuery Mobile Framework 1.1.0 db342b1f315c282692791aa870455901fdb46a55
+* http://jquerymobile.com
+*
+* Copyright 2011 (c) jQuery Project
+* Dual licensed under the MIT or GPL Version 2 licenses.
+* http://jquery.org/license
+*
+*/
+(function ( root, doc, factory ) {
+       if ( typeof define === "function" && define.amd ) {
+               // AMD. Register as an anonymous module.
+               define( [ "jquery" ], function ( $ ) {
+                       factory( $, root, doc );
+                       return $.mobile;
+               });
+       } else {
+               // Browser globals
+               factory( root.jQuery, root, doc );
+       }
+}( this, document, function ( $, window, document, undefined ) {
+
+
+// This plugin is an experiment for abstracting away the touch and mouse
+// events so that developers don't have to worry about which method of input
+// the device their document is loaded on supports.
+//
+// The idea here is to allow the developer to register listeners for the
+// basic mouse events, such as mousedown, mousemove, mouseup, and click,
+// and the plugin will take care of registering the correct listeners
+// behind the scenes to invoke the listener at the fastest possible time
+// for that device, while still retaining the order of event firing in
+// the traditional mouse environment, should multiple handlers be registered
+// on the same element for different events.
+//
+// The current version exposes the following virtual events to jQuery bind methods:
+// "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel"
+
+(function( $, window, document, undefined ) {
+
+var dataPropertyName = "virtualMouseBindings",
+       touchTargetPropertyName = "virtualTouchID",
+       virtualEventNames = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split( " " ),
+       touchEventProps = "clientX clientY pageX pageY screenX screenY".split( " " ),
+       mouseHookProps = $.event.mouseHooks ? $.event.mouseHooks.props : [],
+       mouseEventProps = $.event.props.concat( mouseHookProps ),
+       activeDocHandlers = {},
+       resetTimerID = 0,
+       startX = 0,
+       startY = 0,
+       didScroll = false,
+       clickBlockList = [],
+       blockMouseTriggers = false,
+       blockTouchTriggers = false,
+       eventCaptureSupported = "addEventListener" in document,
+       $document = $( document ),
+       nextTouchID = 1,
+       lastTouchID = 0;
+
+$.vmouse = {
+       moveDistanceThreshold: 10,
+       clickDistanceThreshold: 10,
+       resetTimerDuration: 1500
+};
+
+function getNativeEvent( event ) {
+
+       while ( event && typeof event.originalEvent !== "undefined" ) {
+               event = event.originalEvent;
+       }
+       return event;
+}
+
+function createVirtualEvent( event, eventType ) {
+
+       var t = event.type,
+               oe, props, ne, prop, ct, touch, i, j;
+
+       event = $.Event(event);
+       event.type = eventType;
+
+       oe = event.originalEvent;
+       props = $.event.props;
+
+       // addresses separation of $.event.props in to $.event.mouseHook.props and Issue 3280
+       // https://github.com/jquery/jquery-mobile/issues/3280
+       if ( t.search( /^(mouse|click)/ ) > -1 ) {
+               props = mouseEventProps;
+       }
+
+       // copy original event properties over to the new event
+       // this would happen if we could call $.event.fix instead of $.Event
+       // but we don't have a way to force an event to be fixed multiple times
+       if ( oe ) {
+               for ( i = props.length, prop; i; ) {
+                       prop = props[ --i ];
+                       event[ prop ] = oe[ prop ];
+               }
+       }
+
+       // make sure that if the mouse and click virtual events are generated
+       // without a .which one is defined
+       if ( t.search(/mouse(down|up)|click/) > -1 && !event.which ){
+               event.which = 1;
+       }
+
+       if ( t.search(/^touch/) !== -1 ) {
+               ne = getNativeEvent( oe );
+               t = ne.touches;
+               ct = ne.changedTouches;
+               touch = ( t && t.length ) ? t[0] : ( (ct && ct.length) ? ct[ 0 ] : undefined );
+
+               if ( touch ) {
+                       for ( j = 0, len = touchEventProps.length; j < len; j++){
+                               prop = touchEventProps[ j ];
+                               event[ prop ] = touch[ prop ];
+                       }
+               }
+       }
+
+       return event;
+}
+
+function getVirtualBindingFlags( element ) {
+
+       var flags = {},
+               b, k;
+
+       while ( element ) {
+
+               b = $.data( element, dataPropertyName );
+
+               for (  k in b ) {
+                       if ( b[ k ] ) {
+                               flags[ k ] = flags.hasVirtualBinding = true;
+                       }
+               }
+               element = element.parentNode;
+       }
+       return flags;
+}
+
+function getClosestElementWithVirtualBinding( element, eventType ) {
+       var b;
+       while ( element ) {
+
+               b = $.data( element, dataPropertyName );
+
+               if ( b && ( !eventType || b[ eventType ] ) ) {
+                       return element;
+               }
+               element = element.parentNode;
+       }
+       return null;
+}
+
+function enableTouchBindings() {
+       blockTouchTriggers = false;
+}
+
+function disableTouchBindings() {
+       blockTouchTriggers = true;
+}
+
+function enableMouseBindings() {
+       lastTouchID = 0;
+       clickBlockList.length = 0;
+       blockMouseTriggers = false;
+
+       // When mouse bindings are enabled, our
+       // touch bindings are disabled.
+       disableTouchBindings();
+}
+
+function disableMouseBindings() {
+       // When mouse bindings are disabled, our
+       // touch bindings are enabled.
+       enableTouchBindings();
+}
+
+function startResetTimer() {
+       clearResetTimer();
+       resetTimerID = setTimeout(function(){
+               resetTimerID = 0;
+               enableMouseBindings();
+       }, $.vmouse.resetTimerDuration );
+}
+
+function clearResetTimer() {
+       if ( resetTimerID ){
+               clearTimeout( resetTimerID );
+               resetTimerID = 0;
+       }
+}
+
+function triggerVirtualEvent( eventType, event, flags ) {
+       var ve;
+
+       if ( ( flags && flags[ eventType ] ) ||
+                               ( !flags && getClosestElementWithVirtualBinding( event.target, eventType ) ) ) {
+
+               ve = createVirtualEvent( event, eventType );
+
+               $( event.target).trigger( ve );
+       }
+
+       return ve;
+}
+
+function mouseEventCallback( event ) {
+       var touchID = $.data(event.target, touchTargetPropertyName);
+
+       if ( !blockMouseTriggers && ( !lastTouchID || lastTouchID !== touchID ) ){
+               var ve = triggerVirtualEvent( "v" + event.type, event );
+               if ( ve ) {
+                       if ( ve.isDefaultPrevented() ) {
+                               event.preventDefault();
+                       }
+                       if ( ve.isPropagationStopped() ) {
+                               event.stopPropagation();
+                       }
+                       if ( ve.isImmediatePropagationStopped() ) {
+                               event.stopImmediatePropagation();
+                       }
+               }
+       }
+}
+
+function handleTouchStart( event ) {
+
+       var touches = getNativeEvent( event ).touches,
+               target, flags;
+
+       if ( touches && touches.length === 1 ) {
+
+               target = event.target;
+               flags = getVirtualBindingFlags( target );
+
+               if ( flags.hasVirtualBinding ) {
+
+                       lastTouchID = nextTouchID++;
+                       $.data( target, touchTargetPropertyName, lastTouchID );
+
+                       clearResetTimer();
+
+                       disableMouseBindings();
+                       didScroll = false;
+
+                       var t = getNativeEvent( event ).touches[ 0 ];
+                       startX = t.pageX;
+                       startY = t.pageY;
+
+                       triggerVirtualEvent( "vmouseover", event, flags );
+                       triggerVirtualEvent( "vmousedown", event, flags );
+               }
+       }
+}
+
+function handleScroll( event ) {
+       if ( blockTouchTriggers ) {
+               return;
+       }
+
+       if ( !didScroll ) {
+               triggerVirtualEvent( "vmousecancel", event, getVirtualBindingFlags( event.target ) );
+       }
+
+       didScroll = true;
+       startResetTimer();
+}
+
+function handleTouchMove( event ) {
+       if ( blockTouchTriggers ) {
+               return;
+       }
+
+       var t = getNativeEvent( event ).touches[ 0 ],
+               didCancel = didScroll,
+               moveThreshold = $.vmouse.moveDistanceThreshold;
+               didScroll = didScroll ||
+                       ( Math.abs(t.pageX - startX) > moveThreshold ||
+                               Math.abs(t.pageY - startY) > moveThreshold ),
+               flags = getVirtualBindingFlags( event.target );
+
+       if ( didScroll && !didCancel ) {
+               triggerVirtualEvent( "vmousecancel", event, flags );
+       }
+
+       triggerVirtualEvent( "vmousemove", event, flags );
+       startResetTimer();
+}
+
+function handleTouchEnd( event ) {
+       if ( blockTouchTriggers ) {
+               return;
+       }
+
+       disableTouchBindings();
+
+       var flags = getVirtualBindingFlags( event.target ),
+               t;
+       triggerVirtualEvent( "vmouseup", event, flags );
+
+       if ( !didScroll ) {
+               var ve = triggerVirtualEvent( "vclick", event, flags );
+               if ( ve && ve.isDefaultPrevented() ) {
+                       // The target of the mouse events that follow the touchend
+                       // event don't necessarily match the target used during the
+                       // touch. This means we need to rely on coordinates for blocking
+                       // any click that is generated.
+                       t = getNativeEvent( event ).changedTouches[ 0 ];
+                       clickBlockList.push({
+                               touchID: lastTouchID,
+                               x: t.clientX,
+                               y: t.clientY
+                       });
+
+                       // Prevent any mouse events that follow from triggering
+                       // virtual event notifications.
+                       blockMouseTriggers = true;
+               }
+       }
+       triggerVirtualEvent( "vmouseout", event, flags);
+       didScroll = false;
+
+       startResetTimer();
+}
+
+function hasVirtualBindings( ele ) {
+       var bindings = $.data( ele, dataPropertyName ),
+               k;
+
+       if ( bindings ) {
+               for ( k in bindings ) {
+                       if ( bindings[ k ] ) {
+                               return true;
+                       }
+               }
+       }
+       return false;
+}
+
+function dummyMouseHandler(){}
+
+function getSpecialEventObject( eventType ) {
+       var realType = eventType.substr( 1 );
+
+       return {
+               setup: function( data, namespace ) {
+                       // If this is the first virtual mouse binding for this element,
+                       // add a bindings object to its data.
+
+                       if ( !hasVirtualBindings( this ) ) {
+                               $.data( this, dataPropertyName, {});
+                       }
+
+                       // If setup is called, we know it is the first binding for this
+                       // eventType, so initialize the count for the eventType to zero.
+                       var bindings = $.data( this, dataPropertyName );
+                       bindings[ eventType ] = true;
+
+                       // If this is the first virtual mouse event for this type,
+                       // register a global handler on the document.
+
+                       activeDocHandlers[ eventType ] = ( activeDocHandlers[ eventType ] || 0 ) + 1;
+
+                       if ( activeDocHandlers[ eventType ] === 1 ) {
+                               $document.bind( realType, mouseEventCallback );
+                       }
+
+                       // Some browsers, like Opera Mini, won't dispatch mouse/click events
+                       // for elements unless they actually have handlers registered on them.
+                       // To get around this, we register dummy handlers on the elements.
+
+                       $( this ).bind( realType, dummyMouseHandler );
+
+                       // For now, if event capture is not supported, we rely on mouse handlers.
+                       if ( eventCaptureSupported ) {
+                               // If this is the first virtual mouse binding for the document,
+                               // register our touchstart handler on the document.
+
+                               activeDocHandlers[ "touchstart" ] = ( activeDocHandlers[ "touchstart" ] || 0) + 1;
+
+                               if (activeDocHandlers[ "touchstart" ] === 1) {
+                                       $document.bind( "touchstart", handleTouchStart )
+                                               .bind( "touchend", handleTouchEnd )
+
+                                               // On touch platforms, touching the screen and then dragging your finger
+                                               // causes the window content to scroll after some distance threshold is
+                                               // exceeded. On these platforms, a scroll prevents a click event from being
+                                               // dispatched, and on some platforms, even the touchend is suppressed. To
+                                               // mimic the suppression of the click event, we need to watch for a scroll
+                                               // event. Unfortunately, some platforms like iOS don't dispatch scroll
+                                               // events until *AFTER* the user lifts their finger (touchend). This means
+                                               // we need to watch both scroll and touchmove events to figure out whether
+                                               // or not a scroll happenens before the touchend event is fired.
+
+                                               .bind( "touchmove", handleTouchMove )
+                                               .bind( "scroll", handleScroll );
+                               }
+                       }
+               },
+
+               teardown: function( data, namespace ) {
+                       // If this is the last virtual binding for this eventType,
+                       // remove its global handler from the document.
+
+                       --activeDocHandlers[ eventType ];
+
+                       if ( !activeDocHandlers[ eventType ] ) {
+                               $document.unbind( realType, mouseEventCallback );
+                       }
+
+                       if ( eventCaptureSupported ) {
+                               // If this is the last virtual mouse binding in existence,
+                               // remove our document touchstart listener.
+
+                               --activeDocHandlers[ "touchstart" ];
+
+                               if ( !activeDocHandlers[ "touchstart" ] ) {
+                                       $document.unbind( "touchstart", handleTouchStart )
+                                               .unbind( "touchmove", handleTouchMove )
+                                               .unbind( "touchend", handleTouchEnd )
+                                               .unbind( "scroll", handleScroll );
+                               }
+                       }
+
+                       var $this = $( this ),
+                               bindings = $.data( this, dataPropertyName );
+
+                       // teardown may be called when an element was
+                       // removed from the DOM. If this is the case,
+                       // jQuery core may have already stripped the element
+                       // of any data bindings so we need to check it before
+                       // using it.
+                       if ( bindings ) {
+                               bindings[ eventType ] = false;
+                       }
+
+                       // Unregister the dummy event handler.
+
+                       $this.unbind( realType, dummyMouseHandler );
+
+                       // If this is the last virtual mouse binding on the
+                       // element, remove the binding data from the element.
+
+                       if ( !hasVirtualBindings( this ) ) {
+                               $this.removeData( dataPropertyName );
+                       }
+               }
+       };
+}
+
+// Expose our custom events to the jQuery bind/unbind mechanism.
+
+for ( var i = 0; i < virtualEventNames.length; i++ ){
+       $.event.special[ virtualEventNames[ i ] ] = getSpecialEventObject( virtualEventNames[ i ] );
+}
+
+// Add a capture click handler to block clicks.
+// Note that we require event capture support for this so if the device
+// doesn't support it, we punt for now and rely solely on mouse events.
+if ( eventCaptureSupported ) {
+       document.addEventListener( "click", function( e ){
+               var cnt = clickBlockList.length,
+                       target = e.target,
+                       x, y, ele, i, o, touchID;
+
+               if ( cnt ) {
+                       x = e.clientX;
+                       y = e.clientY;
+                       threshold = $.vmouse.clickDistanceThreshold;
+
+                       // The idea here is to run through the clickBlockList to see if
+                       // the current click event is in the proximity of one of our
+                       // vclick events that had preventDefault() called on it. If we find
+                       // one, then we block the click.
+                       //
+                       // Why do we have to rely on proximity?
+                       //
+                       // Because the target of the touch event that triggered the vclick
+                       // can be different from the target of the click event synthesized
+                       // by the browser. The target of a mouse/click event that is syntehsized
+                       // from a touch event seems to be implementation specific. For example,
+                       // some browsers will fire mouse/click events for a link that is near
+                       // a touch event, even though the target of the touchstart/touchend event
+                       // says the user touched outside the link. Also, it seems that with most
+                       // browsers, the target of the mouse/click event is not calculated until the
+                       // time it is dispatched, so if you replace an element that you touched
+                       // with another element, the target of the mouse/click will be the new
+                       // element underneath that point.
+                       //
+                       // Aside from proximity, we also check to see if the target and any
+                       // of its ancestors were the ones that blocked a click. This is necessary
+                       // because of the strange mouse/click target calculation done in the
+                       // Android 2.1 browser, where if you click on an element, and there is a
+                       // mouse/click handler on one of its ancestors, the target will be the
+                       // innermost child of the touched element, even if that child is no where
+                       // near the point of touch.
+
+                       ele = target;
+
+                       while ( ele ) {
+                               for ( i = 0; i < cnt; i++ ) {
+                                       o = clickBlockList[ i ];
+                                       touchID = 0;
+
+                                       if ( ( ele === target && Math.abs( o.x - x ) < threshold && Math.abs( o.y - y ) < threshold ) ||
+                                                               $.data( ele, touchTargetPropertyName ) === o.touchID ) {
+                                               // XXX: We may want to consider removing matches from the block list
+                                               //      instead of waiting for the reset timer to fire.
+                                               e.preventDefault();
+                                               e.stopPropagation();
+                                               return;
+                                       }
+                               }
+                               ele = ele.parentNode;
+                       }
+               }
+       }, true);
+}
+})( jQuery, window, document );
+
+
+
+// Script: jQuery hashchange event
+// 
+// *Version: 1.3, Last updated: 7/21/2010*
+// 
+// Project Home - http://benalman.com/projects/jquery-hashchange-plugin/
+// GitHub       - http://github.com/cowboy/jquery-hashchange/
+// Source       - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js
+// (Minified)   - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js (0.8kb gzipped)
+// 
+// About: License
+// 
+// Copyright (c) 2010 "Cowboy" Ben Alman,
+// Dual licensed under the MIT and GPL licenses.
+// http://benalman.com/about/license/
+// 
+// About: Examples
+// 
+// These working examples, complete with fully commented code, illustrate a few
+// ways in which this plugin can be used.
+// 
+// hashchange event - http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/
+// document.domain - http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/
+// 
+// About: Support and Testing
+// 
+// Information about what version or versions of jQuery this plugin has been
+// tested with, what browsers it has been tested in, and where the unit tests
+// reside (so you can test it yourself).
+// 
+// jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2
+// Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 3.2-5,
+//                   Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 4.6-5.
+// Unit Tests      - http://benalman.com/code/projects/jquery-hashchange/unit/
+// 
+// About: Known issues
+// 
+// While this jQuery hashchange event implementation is quite stable and
+// robust, there are a few unfortunate browser bugs surrounding expected
+// hashchange event-based behaviors, independent of any JavaScript
+// window.onhashchange abstraction. See the following examples for more
+// information:
+// 
+// Chrome: Back Button - http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/
+// Firefox: Remote XMLHttpRequest - http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/
+// WebKit: Back Button in an Iframe - http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/
+// Safari: Back Button from a different domain - http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/
+// 
+// Also note that should a browser natively support the window.onhashchange 
+// event, but not report that it does, the fallback polling loop will be used.
+// 
+// About: Release History
+// 
+// 1.3   - (7/21/2010) Reorganized IE6/7 Iframe code to make it more
+//         "removable" for mobile-only development. Added IE6/7 document.title
+//         support. Attempted to make Iframe as hidden as possible by using
+//         techniques from http://www.paciellogroup.com/blog/?p=604. Added 
+//         support for the "shortcut" format $(window).hashchange( fn ) and
+//         $(window).hashchange() like jQuery provides for built-in events.
+//         Renamed jQuery.hashchangeDelay to <jQuery.fn.hashchange.delay> and
+//         lowered its default value to 50. Added <jQuery.fn.hashchange.domain>
+//         and <jQuery.fn.hashchange.src> properties plus document-domain.html
+//         file to address access denied issues when setting document.domain in
+//         IE6/7.
+// 1.2   - (2/11/2010) Fixed a bug where coming back to a page using this plugin
+//         from a page on another domain would cause an error in Safari 4. Also,
+//         IE6/7 Iframe is now inserted after the body (this actually works),
+//         which prevents the page from scrolling when the event is first bound.
+//         Event can also now be bound before DOM ready, but it won't be usable
+//         before then in IE6/7.
+// 1.1   - (1/21/2010) Incorporated document.documentMode test to fix IE8 bug
+//         where browser version is incorrectly reported as 8.0, despite
+//         inclusion of the X-UA-Compatible IE=EmulateIE7 meta tag.
+// 1.0   - (1/9/2010) Initial Release. Broke out the jQuery BBQ event.special
+//         window.onhashchange functionality into a separate plugin for users
+//         who want just the basic event & back button support, without all the
+//         extra awesomeness that BBQ provides. This plugin will be included as
+//         part of jQuery BBQ, but also be available separately.
+
+(function($,window,undefined){
+  // Reused string.
+  var str_hashchange = 'hashchange',
+    
+    // Method / object references.
+    doc = document,
+    fake_onhashchange,
+    special = $.event.special,
+    
+    // Does the browser support window.onhashchange? Note that IE8 running in
+    // IE7 compatibility mode reports true for 'onhashchange' in window, even
+    // though the event isn't supported, so also test document.documentMode.
+    doc_mode = doc.documentMode,
+    supports_onhashchange = 'on' + str_hashchange in window && ( doc_mode === undefined || doc_mode > 7 );
+  
+  // Get location.hash (or what you'd expect location.hash to be) sans any
+  // leading #. Thanks for making this necessary, Firefox!
+  function get_fragment( url ) {
+    url = url || location.href;
+    return '#' + url.replace( /^[^#]*#?(.*)$/, '$1' );
+  };
+  
+  // Method: jQuery.fn.hashchange
+  // 
+  // Bind a handler to the window.onhashchange event or trigger all bound
+  // window.onhashchange event handlers. This behavior is consistent with
+  // jQuery's built-in event handlers.
+  // 
+  // Usage:
+  // 
+  // > jQuery(window).hashchange( [ handler ] );
+  // 
+  // Arguments:
+  // 
+  //  handler - (Function) Optional handler to be bound to the hashchange
+  //    event. This is a "shortcut" for the more verbose form:
+  //    jQuery(window).bind( 'hashchange', handler ). If handler is omitted,
+  //    all bound window.onhashchange event handlers will be triggered. This
+  //    is a shortcut for the more verbose
+  //    jQuery(window).trigger( 'hashchange' ). These forms are described in
+  //    the <hashchange event> section.
+  // 
+  // Returns:
+  // 
+  //  (jQuery) The initial jQuery collection of elements.
+  
+  // Allow the "shortcut" format $(elem).hashchange( fn ) for binding and
+  // $(elem).hashchange() for triggering, like jQuery does for built-in events.
+  $.fn[ str_hashchange ] = function( fn ) {
+    return fn ? this.bind( str_hashchange, fn ) : this.trigger( str_hashchange );
+  };
+  
+  // Property: jQuery.fn.hashchange.delay
+  // 
+  // The numeric interval (in milliseconds) at which the <hashchange event>
+  // polling loop executes. Defaults to 50.
+  
+  // Property: jQuery.fn.hashchange.domain
+  // 
+  // If you're setting document.domain in your JavaScript, and you want hash
+  // history to work in IE6/7, not only must this property be set, but you must
+  // also set document.domain BEFORE jQuery is loaded into the page. This
+  // property is only applicable if you are supporting IE6/7 (or IE8 operating
+  // in "IE7 compatibility" mode).
+  // 
+  // In addition, the <jQuery.fn.hashchange.src> property must be set to the
+  // path of the included "document-domain.html" file, which can be renamed or
+  // modified if necessary (note that the document.domain specified must be the
+  // same in both your main JavaScript as well as in this file).
+  // 
+  // Usage:
+  // 
+  // jQuery.fn.hashchange.domain = document.domain;
+  
+  // Property: jQuery.fn.hashchange.src
+  // 
+  // If, for some reason, you need to specify an Iframe src file (for example,
+  // when setting document.domain as in <jQuery.fn.hashchange.domain>), you can
+  // do so using this property. Note that when using this property, history
+  // won't be recorded in IE6/7 until the Iframe src file loads. This property
+  // is only applicable if you are supporting IE6/7 (or IE8 operating in "IE7
+  // compatibility" mode).
+  // 
+  // Usage:
+  // 
+  // jQuery.fn.hashchange.src = 'path/to/file.html';
+  
+  $.fn[ str_hashchange ].delay = 50;
+  /*
+  $.fn[ str_hashchange ].domain = null;
+  $.fn[ str_hashchange ].src = null;
+  */
+  
+  // Event: hashchange event
+  // 
+  // Fired when location.hash changes. In browsers that support it, the native
+  // HTML5 window.onhashchange event is used, otherwise a polling loop is
+  // initialized, running every <jQuery.fn.hashchange.delay> milliseconds to
+  // see if the hash has changed. In IE6/7 (and IE8 operating in "IE7
+  // compatibility" mode), a hidden Iframe is created to allow the back button
+  // and hash-based history to work.
+  // 
+  // Usage as described in <jQuery.fn.hashchange>:
+  // 
+  // > // Bind an event handler.
+  // > jQuery(window).hashchange( function(e) {
+  // >   var hash = location.hash;
+  // >   ...
+  // > });
+  // > 
+  // > // Manually trigger the event handler.
+  // > jQuery(window).hashchange();
+  // 
+  // A more verbose usage that allows for event namespacing:
+  // 
+  // > // Bind an event handler.
+  // > jQuery(window).bind( 'hashchange', function(e) {
+  // >   var hash = location.hash;
+  // >   ...
+  // > });
+  // > 
+  // > // Manually trigger the event handler.
+  // > jQuery(window).trigger( 'hashchange' );
+  // 
+  // Additional Notes:
+  // 
+  // * The polling loop and Iframe are not created until at least one handler
+  //   is actually bound to the 'hashchange' event.
+  // * If you need the bound handler(s) to execute immediately, in cases where
+  //   a location.hash exists on page load, via bookmark or page refresh for
+  //   example, use jQuery(window).hashchange() or the more verbose 
+  //   jQuery(window).trigger( 'hashchange' ).
+  // * The event can be bound before DOM ready, but since it won't be usable
+  //   before then in IE6/7 (due to the necessary Iframe), recommended usage is
+  //   to bind it inside a DOM ready handler.
+  
+  // Override existing $.event.special.hashchange methods (allowing this plugin
+  // to be defined after jQuery BBQ in BBQ's source code).
+  special[ str_hashchange ] = $.extend( special[ str_hashchange ], {
+    
+    // Called only when the first 'hashchange' event is bound to window.
+    setup: function() {
+      // If window.onhashchange is supported natively, there's nothing to do..
+      if ( supports_onhashchange ) { return false; }
+      
+      // Otherwise, we need to create our own. And we don't want to call this
+      // until the user binds to the event, just in case they never do, since it
+      // will create a polling loop and possibly even a hidden Iframe.
+      $( fake_onhashchange.start );
+    },
+    
+    // Called only when the last 'hashchange' event is unbound from window.
+    teardown: function() {
+      // If window.onhashchange is supported natively, there's nothing to do..
+      if ( supports_onhashchange ) { return false; }
+      
+      // Otherwise, we need to stop ours (if possible).
+      $( fake_onhashchange.stop );
+    }
+    
+  });
+  
+  // fake_onhashchange does all the work of triggering the window.onhashchange
+  // event for browsers that don't natively support it, including creating a
+  // polling loop to watch for hash changes and in IE 6/7 creating a hidden
+  // Iframe to enable back and forward.
+  fake_onhashchange = (function(){
+    var self = {},
+      timeout_id,
+      
+      // Remember the initial hash so it doesn't get triggered immediately.
+      last_hash = get_fragment(),
+      
+      fn_retval = function(val){ return val; },
+      history_set = fn_retval,
+      history_get = fn_retval;
+    
+    // Start the polling loop.
+    self.start = function() {
+      timeout_id || poll();
+    };
+    
+    // Stop the polling loop.
+    self.stop = function() {
+      timeout_id && clearTimeout( timeout_id );
+      timeout_id = undefined;
+    };
+    
+    // This polling loop checks every $.fn.hashchange.delay milliseconds to see
+    // if location.hash has changed, and triggers the 'hashchange' event on
+    // window when necessary.
+    function poll() {
+      var hash = get_fragment(),
+        history_hash = history_get( last_hash );
+      
+      if ( hash !== last_hash ) {
+        history_set( last_hash = hash, history_hash );
+        
+        $(window).trigger( str_hashchange );
+        
+      } else if ( history_hash !== last_hash ) {
+        location.href = location.href.replace( /#.*/, '' ) + history_hash;
+      }
+      
+      timeout_id = setTimeout( poll, $.fn[ str_hashchange ].delay );
+    };
+    
+    // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+    // vvvvvvvvvvvvvvvvvvv REMOVE IF NOT SUPPORTING IE6/7/8 vvvvvvvvvvvvvvvvvvv
+    // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+    $.browser.msie && !supports_onhashchange && (function(){
+      // Not only do IE6/7 need the "magical" Iframe treatment, but so does IE8
+      // when running in "IE7 compatibility" mode.
+      
+      var iframe,
+        iframe_src;
+      
+      // When the event is bound and polling starts in IE 6/7, create a hidden
+      // Iframe for history handling.
+      self.start = function(){
+        if ( !iframe ) {
+          iframe_src = $.fn[ str_hashchange ].src;
+          iframe_src = iframe_src && iframe_src + get_fragment();
+          
+          // Create hidden Iframe. Attempt to make Iframe as hidden as possible
+          // by using techniques from http://www.paciellogroup.com/blog/?p=604.
+          iframe = $('<iframe tabindex="-1" title="empty"/>').hide()
+            
+            // When Iframe has completely loaded, initialize the history and
+            // start polling.
+            .one( 'load', function(){
+              iframe_src || history_set( get_fragment() );
+              poll();
+            })
+            
+            // Load Iframe src if specified, otherwise nothing.
+            .attr( 'src', iframe_src || 'javascript:0' )
+            
+            // Append Iframe after the end of the body to prevent unnecessary
+            // initial page scrolling (yes, this works).
+            .insertAfter( 'body' )[0].contentWindow;
+          
+          // Whenever `document.title` changes, update the Iframe's title to
+          // prettify the back/next history menu entries. Since IE sometimes
+          // errors with "Unspecified error" the very first time this is set
+          // (yes, very useful) wrap this with a try/catch block.
+          doc.onpropertychange = function(){
+            try {
+              if ( event.propertyName === 'title' ) {
+                iframe.document.title = doc.title;
+              }
+            } catch(e) {}
+          };
+          
+        }
+      };
+      
+      // Override the "stop" method since an IE6/7 Iframe was created. Even
+      // if there are no longer any bound event handlers, the polling loop
+      // is still necessary for back/next to work at all!
+      self.stop = fn_retval;
+      
+      // Get history by looking at the hidden Iframe's location.hash.
+      history_get = function() {
+        return get_fragment( iframe.location.href );
+      };
+      
+      // Set a new history item by opening and then closing the Iframe
+      // document, *then* setting its location.hash. If document.domain has
+      // been set, update that as well.
+      history_set = function( hash, history_hash ) {
+        var iframe_doc = iframe.document,
+          domain = $.fn[ str_hashchange ].domain;
+        
+        if ( hash !== history_hash ) {
+          // Update Iframe with any initial `document.title` that might be set.
+          iframe_doc.title = doc.title;
+          
+          // Opening the Iframe's document after it has been closed is what
+          // actually adds a history entry.
+          iframe_doc.open();
+          
+          // Set document.domain for the Iframe document as well, if necessary.
+          domain && iframe_doc.write( '<script>document.domain="' + domain + '"</script>' );
+          
+          iframe_doc.close();
+          
+          // Update the Iframe's hash, for great justice.
+          iframe.location.hash = hash;
+        }
+      };
+      
+    })();
+    // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // ^^^^^^^^^^^^^^^^^^^ REMOVE IF NOT SUPPORTING IE6/7/8 ^^^^^^^^^^^^^^^^^^^
+    // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    
+    return self;
+  })();
+  
+})(jQuery,this);
+
+/*!
+ * jQuery UI Widget @VERSION
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+
+(function( $, undefined ) {
+
+// jQuery 1.4+
+if ( $.cleanData ) {
+       var _cleanData = $.cleanData;
+       $.cleanData = function( elems ) {
+               for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+                       $( elem ).triggerHandler( "remove" );
+               }
+               _cleanData( elems );
+       };
+} else {
+       var _remove = $.fn.remove;
+       $.fn.remove = function( selector, keepData ) {
+               return this.each(function() {
+                       if ( !keepData ) {
+                               if ( !selector || $.filter( selector, [ this ] ).length ) {
+                                       $( "*", this ).add( [ this ] ).each(function() {
+                                               $( this ).triggerHandler( "remove" );
+                                       });
+                               }
+                       }
+                       return _remove.call( $(this), selector, keepData );
+               });
+       };
+}
+
+$.widget = function( name, base, prototype ) {
+       var namespace = name.split( "." )[ 0 ],
+               fullName;
+       name = name.split( "." )[ 1 ];
+       fullName = namespace + "-" + name;
+
+       if ( !prototype ) {
+               prototype = base;
+               base = $.Widget;
+       }
+
+       // create selector for plugin
+       $.expr[ ":" ][ fullName ] = function( elem ) {
+               return !!$.data( elem, name );
+       };
+
+       $[ namespace ] = $[ namespace ] || {};
+       $[ namespace ][ name ] = function( options, element ) {
+               // allow instantiation without initializing for simple inheritance
+               if ( arguments.length ) {
+                       this._createWidget( options, element );
+               }
+       };
+
+       var basePrototype = new base();
+       // we need to make the options hash a property directly on the new instance
+       // otherwise we'll modify the options hash on the prototype that we're
+       // inheriting from
+//     $.each( basePrototype, function( key, val ) {
+//             if ( $.isPlainObject(val) ) {
+//                     basePrototype[ key ] = $.extend( {}, val );
+//             }
+//     });
+       basePrototype.options = $.extend( true, {}, basePrototype.options );
+       $[ namespace ][ name ].prototype = $.extend( true, basePrototype, {
+               namespace: namespace,
+               widgetName: name,
+               widgetEventPrefix: $[ namespace ][ name ].prototype.widgetEventPrefix || name,
+               widgetBaseClass: fullName
+       }, prototype );
+
+       $.widget.bridge( name, $[ namespace ][ name ] );
+};
+
+$.widget.bridge = function( name, object ) {
+       $.fn[ name ] = function( options ) {
+               var isMethodCall = typeof options === "string",
+                       args = Array.prototype.slice.call( arguments, 1 ),
+                       returnValue = this;
+
+               // allow multiple hashes to be passed on init
+               options = !isMethodCall && args.length ?
+                       $.extend.apply( null, [ true, options ].concat(args) ) :
+                       options;
+
+               // prevent calls to internal methods
+               if ( isMethodCall && options.charAt( 0 ) === "_" ) {
+                       return returnValue;
+               }
+
+               if ( isMethodCall ) {
+                       this.each(function() {
+                               var instance = $.data( this, name );
+                               if ( !instance ) {
+                                       throw "cannot call methods on " + name + " prior to initialization; " +
+                                               "attempted to call method '" + options + "'";
+                               }
+                               if ( !$.isFunction( instance[options] ) ) {
+                                       throw "no such method '" + options + "' for " + name + " widget instance";
+                               }
+                               var methodValue = instance[ options ].apply( instance, args );
+                               if ( methodValue !== instance && methodValue !== undefined ) {
+                                       returnValue = methodValue;
+                                       return false;
+                               }
+                       });
+               } else {
+                       this.each(function() {
+                               var instance = $.data( this, name );
+                               if ( instance ) {
+                                       instance.option( options || {} )._init();
+                               } else {
+                                       $.data( this, name, new object( options, this ) );
+                               }
+                       });
+               }
+
+               return returnValue;
+       };
+};
+
+$.Widget = function( options, element ) {
+       // allow instantiation without initializing for simple inheritance
+       if ( arguments.length ) {
+               this._createWidget( options, element );
+       }
+};
+
+$.Widget.prototype = {
+       widgetName: "widget",
+       widgetEventPrefix: "",
+       options: {
+               disabled: false
+       },
+       _createWidget: function( options, element ) {
+               // $.widget.bridge stores the plugin instance, but we do it anyway
+               // so that it's stored even before the _create function runs
+               $.data( element, this.widgetName, this );
+               this.element = $( element );
+               this.options = $.extend( true, {},
+                       this.options,
+                       this._getCreateOptions(),
+                       options );
+
+               var self = this;
+               this.element.bind( "remove." + this.widgetName, function() {
+                       self.destroy();
+               });
+
+               this._create();
+               this._trigger( "create" );
+               this._init();
+       },
+       _getCreateOptions: function() {
+               var options = {};
+               if ( $.metadata ) {
+                       options = $.metadata.get( element )[ this.widgetName ];
+               }
+               return options;
+       },
+       _create: function() {},
+       _init: function() {},
+
+       destroy: function() {
+               this.element
+                       .unbind( "." + this.widgetName )
+                       .removeData( this.widgetName );
+               this.widget()
+                       .unbind( "." + this.widgetName )
+                       .removeAttr( "aria-disabled" )
+                       .removeClass(
+                               this.widgetBaseClass + "-disabled " +
+                               "ui-state-disabled" );
+       },
+
+       widget: function() {
+               return this.element;
+       },
+
+       option: function( key, value ) {
+               var options = key;
+
+               if ( arguments.length === 0 ) {
+                       // don't return a reference to the internal hash
+                       return $.extend( {}, this.options );
+               }
+
+               if  (typeof key === "string" ) {
+                       if ( value === undefined ) {
+                               return this.options[ key ];
+                       }
+                       options = {};
+                       options[ key ] = value;
+               }
+
+               this._setOptions( options );
+
+               return this;
+       },
+       _setOptions: function( options ) {
+               var self = this;
+               $.each( options, function( key, value ) {
+                       self._setOption( key, value );
+               });
+
+               return this;
+       },
+       _setOption: function( key, value ) {
+               this.options[ key ] = value;
+
+               if ( key === "disabled" ) {
+                       this.widget()
+                               [ value ? "addClass" : "removeClass"](
+                                       this.widgetBaseClass + "-disabled" + " " +
+                                       "ui-state-disabled" )
+                               .attr( "aria-disabled", value );
+               }
+
+               return this;
+       },
+
+       enable: function() {
+               return this._setOption( "disabled", false );
+       },
+       disable: function() {
+               return this._setOption( "disabled", true );
+       },
+
+       _trigger: function( type, event, data ) {
+               var callback = this.options[ type ];
+
+               event = $.Event( event );
+               event.type = ( type === this.widgetEventPrefix ?
+                       type :
+                       this.widgetEventPrefix + type ).toLowerCase();
+               data = data || {};
+
+               // copy original event properties over to the new event
+               // this would happen if we could call $.event.fix instead of $.Event
+               // but we don't have a way to force an event to be fixed multiple times
+               if ( event.originalEvent ) {
+                       for ( var i = $.event.props.length, prop; i; ) {
+                               prop = $.event.props[ --i ];
+                               event[ prop ] = event.originalEvent[ prop ];
+                       }
+               }
+
+               this.element.trigger( event, data );
+
+               return !( $.isFunction(callback) &&
+                       callback.call( this.element[0], event, data ) === false ||
+                       event.isDefaultPrevented() );
+       }
+};
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.widget", {
+       // decorate the parent _createWidget to trigger `widgetinit` for users
+       // who wish to do post post `widgetcreate` alterations/additions
+       //
+       // TODO create a pull request for jquery ui to trigger this event
+       // in the original _createWidget
+       _createWidget: function() {
+               $.Widget.prototype._createWidget.apply( this, arguments );
+               this._trigger( 'init' );
+       },
+
+       _getCreateOptions: function() {
+
+               var elem = this.element,
+                       options = {};
+
+               $.each( this.options, function( option ) {
+
+                       var value = elem.jqmData( option.replace( /[A-Z]/g, function( c ) {
+                                                       return "-" + c.toLowerCase();
+                                               })
+                                       );
+
+                       if ( value !== undefined ) {
+                               options[ option ] = value;
+                       }
+               });
+
+               return options;
+       },
+
+       enhanceWithin: function( target, useKeepNative ) {
+               this.enhance( $( this.options.initSelector, $( target )), useKeepNative );
+       },
+
+       enhance: function( targets, useKeepNative ) {
+               var page, keepNative, $widgetElements = $( targets ), self = this;
+
+               // if ignoreContentEnabled is set to true the framework should
+               // only enhance the selected elements when they do NOT have a
+               // parent with the data-namespace-ignore attribute
+               $widgetElements = $.mobile.enhanceable( $widgetElements );
+
+               if ( useKeepNative && $widgetElements.length ) {
+                       // TODO remove dependency on the page widget for the keepNative.
+                       // Currently the keepNative value is defined on the page prototype so
+                       // the method is as well
+                       page = $.mobile.closestPageData( $widgetElements );
+                       keepNative = (page && page.keepNativeSelector()) || "";
+
+                       $widgetElements = $widgetElements.not( keepNative );
+               }
+
+               $widgetElements[ this.widgetName ]();
+       },
+
+       raise: function( msg ) {
+               throw "Widget [" + this.widgetName + "]: " + msg;
+       }
+});
+
+})( jQuery );
+
+(function( $, window, undefined ) {
+
+       var nsNormalizeDict = {};
+
+       // jQuery.mobile configurable options
+       $.mobile = $.extend( {}, {
+
+               // Version of the jQuery Mobile Framework
+               version: "1.1.0",
+
+               // Namespace used framework-wide for data-attrs. Default is no namespace
+               ns: "",
+
+               // Define the url parameter used for referencing widget-generated sub-pages.
+               // Translates to to example.html&ui-page=subpageIdentifier
+               // hash segment before &ui-page= is used to make Ajax request
+               subPageUrlKey: "ui-page",
+
+               // Class assigned to page currently in view, and during transitions
+               activePageClass: "ui-page-active",
+
+               // Class used for "active" button state, from CSS framework
+               activeBtnClass: "ui-btn-active",
+
+               // Class used for "focus" form element state, from CSS framework
+               focusClass: "ui-focus",
+
+               // Automatically handle clicks and form submissions through Ajax, when same-domain
+               ajaxEnabled: true,
+
+               // Automatically load and show pages based on location.hash
+               hashListeningEnabled: true,
+
+               // disable to prevent jquery from bothering with links
+               linkBindingEnabled: true,
+
+               // Set default page transition - 'none' for no transitions
+               defaultPageTransition: "fade",
+
+               // Set maximum window width for transitions to apply - 'false' for no limit
+               maxTransitionWidth: false,
+
+               // Minimum scroll distance that will be remembered when returning to a page
+               minScrollBack: 250,
+
+               // DEPRECATED: the following property is no longer in use, but defined until 2.0 to prevent conflicts
+               touchOverflowEnabled: false,
+
+               // Set default dialog transition - 'none' for no transitions
+               defaultDialogTransition: "pop",
+
+               // Show loading message during Ajax requests
+               // if false, message will not appear, but loading classes will still be toggled on html el
+               loadingMessage: "loading",
+
+               // Error response message - appears when an Ajax page request fails
+               pageLoadErrorMessage: "Error Loading Page",
+
+               // Should the text be visble in the loading message?
+               loadingMessageTextVisible: false,
+
+               // When the text is visible, what theme does the loading box use?
+               loadingMessageTheme: "a",
+
+               // For error messages, which theme does the box uses?
+               pageLoadErrorMessageTheme: "e",
+
+               //automatically initialize the DOM when it's ready
+               autoInitializePage: true,
+
+               pushStateEnabled: true,
+
+               // allows users to opt in to ignoring content by marking a parent element as
+               // data-ignored
+               ignoreContentEnabled: false,
+
+               // turn of binding to the native orientationchange due to android orientation behavior
+               orientationChangeEnabled: true,
+
+               buttonMarkup: {
+                       hoverDelay: 200
+               },
+
+               // TODO might be useful upstream in jquery itself ?
+               keyCode: {
+                       ALT: 18,
+                       BACKSPACE: 8,
+                       CAPS_LOCK: 20,
+                       COMMA: 188,
+                       COMMAND: 91,
+                       COMMAND_LEFT: 91, // COMMAND
+                       COMMAND_RIGHT: 93,
+                       CONTROL: 17,
+                       DELETE: 46,
+                       DOWN: 40,
+                       END: 35,
+                       ENTER: 13,
+                       ESCAPE: 27,
+                       HOME: 36,
+                       INSERT: 45,
+                       LEFT: 37,
+                       MENU: 93, // COMMAND_RIGHT
+                       NUMPAD_ADD: 107,
+                       NUMPAD_DECIMAL: 110,
+                       NUMPAD_DIVIDE: 111,
+                       NUMPAD_ENTER: 108,
+                       NUMPAD_MULTIPLY: 106,
+                       NUMPAD_SUBTRACT: 109,
+                       PAGE_DOWN: 34,
+                       PAGE_UP: 33,
+                       PERIOD: 190,
+                       RIGHT: 39,
+                       SHIFT: 16,
+                       SPACE: 32,
+                       TAB: 9,
+                       UP: 38,
+                       WINDOWS: 91 // COMMAND
+               },
+
+               // Scroll page vertically: scroll to 0 to hide iOS address bar, or pass a Y value
+               silentScroll: function( ypos ) {
+                       if ( $.type( ypos ) !== "number" ) {
+                               ypos = $.mobile.defaultHomeScroll;
+                       }
+
+                       // prevent scrollstart and scrollstop events
+                       $.event.special.scrollstart.enabled = false;
+
+                       setTimeout(function() {
+                               window.scrollTo( 0, ypos );
+                               $( document ).trigger( "silentscroll", { x: 0, y: ypos });
+                       }, 20 );
+
+                       setTimeout(function() {
+                               $.event.special.scrollstart.enabled = true;
+                       }, 150 );
+               },
+
+               // Expose our cache for testing purposes.
+               nsNormalizeDict: nsNormalizeDict,
+
+               // Take a data attribute property, prepend the namespace
+               // and then camel case the attribute string. Add the result
+               // to our nsNormalizeDict so we don't have to do this again.
+               nsNormalize: function( prop ) {
+                       if ( !prop ) {
+                               return;
+                       }
+
+                       return nsNormalizeDict[ prop ] || ( nsNormalizeDict[ prop ] = $.camelCase( $.mobile.ns + prop ) );
+               },
+
+               getInheritedTheme: function( el, defaultTheme ) {
+
+                       // Find the closest parent with a theme class on it. Note that
+                       // we are not using $.fn.closest() on purpose here because this
+                       // method gets called quite a bit and we need it to be as fast
+                       // as possible.
+
+                       var e = el[ 0 ],
+                               ltr = "",
+                               re = /ui-(bar|body|overlay)-([a-z])\b/,
+                               c, m;
+
+                       while ( e ) {
+                               var c = e.className || "";
+                               if ( ( m = re.exec( c ) ) && ( ltr = m[ 2 ] ) ) {
+                                       // We found a parent with a theme class
+                                       // on it so bail from this loop.
+                                       break;
+                               }
+                               e = e.parentNode;
+                       }
+
+                       // Return the theme letter we found, if none, return the
+                       // specified default.
+
+                       return ltr || defaultTheme || "a";
+               },
+
+               // TODO the following $ and $.fn extensions can/probably should be moved into jquery.mobile.core.helpers
+               //
+               // Find the closest javascript page element to gather settings data jsperf test
+               // http://jsperf.com/single-complex-selector-vs-many-complex-selectors/edit
+               // possibly naive, but it shows that the parsing overhead for *just* the page selector vs
+               // the page and dialog selector is negligable. This could probably be speed up by
+               // doing a similar parent node traversal to the one found in the inherited theme code above
+               closestPageData: function( $target ) {
+                       return $target
+                               .closest(':jqmData(role="page"), :jqmData(role="dialog")')
+                               .data("page");
+               },
+
+               enhanceable: function( $set ) {
+                       return this.haveParents( $set, "enhance" );
+               },
+
+               hijackable: function( $set ) {
+                       return this.haveParents( $set, "ajax" );
+               },
+
+               haveParents: function( $set, attr ) {
+                       if( !$.mobile.ignoreContentEnabled ){
+                               return $set;
+                       }
+
+                       var count = $set.length,
+                               $newSet = $(),
+                               e, $element, excluded;
+
+                       for ( var i = 0; i < count; i++ ) {
+                               $element = $set.eq( i );
+                               excluded = false;
+                               e = $set[ i ];
+
+                               while ( e ) {
+                                       var c = e.getAttribute ? e.getAttribute( "data-" + $.mobile.ns + attr ) : "";
+
+                                       if ( c === "false" ) {
+                                               excluded = true;
+                                               break;
+                                       }
+
+                                       e = e.parentNode;
+                               }
+
+                               if ( !excluded ) {
+                                       $newSet = $newSet.add( $element );
+                               }
+                       }
+
+                       return $newSet;
+               }
+       }, $.mobile );
+
+       // Mobile version of data and removeData and hasData methods
+       // ensures all data is set and retrieved using jQuery Mobile's data namespace
+       $.fn.jqmData = function( prop, value ) {
+               var result;
+               if ( typeof prop != "undefined" ) {
+                       if ( prop ) {
+                               prop = $.mobile.nsNormalize( prop );
+                       }
+                       result = this.data.apply( this, arguments.length < 2 ? [ prop ] : [ prop, value ] );
+               }
+               return result;
+       };
+
+       $.jqmData = function( elem, prop, value ) {
+               var result;
+               if ( typeof prop != "undefined" ) {
+                       result = $.data( elem, prop ? $.mobile.nsNormalize( prop ) : prop, value );
+               }
+               return result;
+       };
+
+       $.fn.jqmRemoveData = function( prop ) {
+               return this.removeData( $.mobile.nsNormalize( prop ) );
+       };
+
+       $.jqmRemoveData = function( elem, prop ) {
+               return $.removeData( elem, $.mobile.nsNormalize( prop ) );
+       };
+
+       $.fn.removeWithDependents = function() {
+               $.removeWithDependents( this );
+       };
+
+       $.removeWithDependents = function( elem ) {
+               var $elem = $( elem );
+
+               ( $elem.jqmData('dependents') || $() ).remove();
+               $elem.remove();
+       };
+
+       $.fn.addDependents = function( newDependents ) {
+               $.addDependents( $(this), newDependents );
+       };
+
+       $.addDependents = function( elem, newDependents ) {
+               var dependents = $(elem).jqmData( 'dependents' ) || $();
+
+               $(elem).jqmData( 'dependents', $.merge(dependents, newDependents) );
+       };
+
+       // note that this helper doesn't attempt to handle the callback
+       // or setting of an html elements text, its only purpose is
+       // to return the html encoded version of the text in all cases. (thus the name)
+       $.fn.getEncodedText = function() {
+               return $( "<div/>" ).text( $(this).text() ).html();
+       };
+
+       // fluent helper function for the mobile namespaced equivalent
+       $.fn.jqmEnhanceable = function() {
+               return $.mobile.enhanceable( this );
+       };
+
+       $.fn.jqmHijackable = function() {
+               return $.mobile.hijackable( this );
+       };
+
+       // Monkey-patching Sizzle to filter the :jqmData selector
+       var oldFind = $.find,
+               jqmDataRE = /:jqmData\(([^)]*)\)/g;
+
+       $.find = function( selector, context, ret, extra ) {
+               selector = selector.replace( jqmDataRE, "[data-" + ( $.mobile.ns || "" ) + "$1]" );
+
+               return oldFind.call( this, selector, context, ret, extra );
+       };
+
+       $.extend( $.find, oldFind );
+
+       $.find.matches = function( expr, set ) {
+               return $.find( expr, null, null, set );
+       };
+
+       $.find.matchesSelector = function( node, expr ) {
+               return $.find( expr, null, null, [ node ] ).length > 0;
+       };
+})( jQuery, this );
+
+
+(function( $, undefined ) {
+
+var $window = $( window ),
+       $html = $( "html" );
+
+/* $.mobile.media method: pass a CSS media type or query and get a bool return
+       note: this feature relies on actual media query support for media queries, though types will work most anywhere
+       examples:
+               $.mobile.media('screen') // tests for screen media type
+               $.mobile.media('screen and (min-width: 480px)') // tests for screen media type with window width > 480px
+               $.mobile.media('@media screen and (-webkit-min-device-pixel-ratio: 2)') // tests for webkit 2x pixel ratio (iPhone 4)
+*/
+$.mobile.media = (function() {
+       // TODO: use window.matchMedia once at least one UA implements it
+       var cache = {},
+               testDiv = $( "<div id='jquery-mediatest'>" ),
+               fakeBody = $( "<body>" ).append( testDiv );
+
+       return function( query ) {
+               if ( !( query in cache ) ) {
+                       var styleBlock = document.createElement( "style" ),
+                               cssrule = "@media " + query + " { #jquery-mediatest { position:absolute; } }";
+
+                       //must set type for IE!
+                       styleBlock.type = "text/css";
+
+                       if ( styleBlock.styleSheet  ){
+                               styleBlock.styleSheet.cssText = cssrule;
+                       } else {
+                               styleBlock.appendChild( document.createTextNode(cssrule) );
+                       }
+
+                       $html.prepend( fakeBody ).prepend( styleBlock );
+                       cache[ query ] = testDiv.css( "position" ) === "absolute";
+                       fakeBody.add( styleBlock ).remove();
+               }
+               return cache[ query ];
+       };
+})();
+
+})(jQuery);
+
+(function( $, undefined ) {
+
+var fakeBody = $( "<body>" ).prependTo( "html" ),
+       fbCSS = fakeBody[ 0 ].style,
+       vendors = [ "Webkit", "Moz", "O" ],
+       webos = "palmGetResource" in window, //only used to rule out scrollTop
+       operamini = window.operamini && ({}).toString.call( window.operamini ) === "[object OperaMini]",
+       bb = window.blackberry; //only used to rule out box shadow, as it's filled opaque on BB
+
+// thx Modernizr
+function propExists( prop ) {
+       var uc_prop = prop.charAt( 0 ).toUpperCase() + prop.substr( 1 ),
+               props = ( prop + " " + vendors.join( uc_prop + " " ) + uc_prop ).split( " " );
+
+       for ( var v in props ){
+               if ( fbCSS[ props[ v ] ] !== undefined ) {
+                       return true;
+               }
+       }
+}
+
+function validStyle( prop, value, check_vend ) {
+       var div = document.createElement('div'),
+               uc = function( txt ) {
+                       return txt.charAt( 0 ).toUpperCase() + txt.substr( 1 )
+               },
+               vend_pref = function( vend ) {
+                       return  "-" + vend.charAt( 0 ).toLowerCase() + vend.substr( 1 ) + "-";
+               },
+               check_style = function( vend ) {
+                       var vend_prop = vend_pref( vend ) + prop + ": " + value + ";",
+                               uc_vend = uc( vend ),
+                               propStyle = uc_vend + uc( prop );
+               
+                       div.setAttribute( "style", vend_prop );
+               
+                       if( !!div.style[ propStyle ] ) {
+                               ret = true;
+                       }
+               },
+               check_vends = check_vend ? [ check_vend ] : vendors,
+               ret;
+
+       for( i = 0; i < check_vends.length; i++ ) {
+               check_style( check_vends[i] );
+       }
+       return !!ret;
+}
+
+// Thanks to Modernizr src for this test idea. `perspective` check is limited to Moz to prevent a false positive for 3D transforms on Android.
+function transform3dTest() {
+       var prop = "transform-3d";
+       return validStyle( 'perspective', '10px', 'moz' ) || $.mobile.media( "(-" + vendors.join( "-" + prop + "),(-" ) + "-" + prop + "),(" + prop + ")" );
+}
+
+// Test for dynamic-updating base tag support ( allows us to avoid href,src attr rewriting )
+function baseTagTest() {
+       var fauxBase = location.protocol + "//" + location.host + location.pathname + "ui-dir/",
+               base = $( "head base" ),
+               fauxEle = null,
+               href = "",
+               link, rebase;
+
+       if ( !base.length ) {
+               base = fauxEle = $( "<base>", { "href": fauxBase }).appendTo( "head" );
+       } else {
+               href = base.attr( "href" );
+       }
+
+       link = $( "<a href='testurl' />" ).prependTo( fakeBody );
+       rebase = link[ 0 ].href;
+       base[ 0 ].href = href || location.pathname;
+
+       if ( fauxEle ) {
+               fauxEle.remove();
+       }
+       return rebase.indexOf( fauxBase ) === 0;
+}
+
+
+// non-UA-based IE version check by James Padolsey, modified by jdalton - from http://gist.github.com/527683
+// allows for inclusion of IE 6+, including Windows Mobile 7
+$.extend( $.mobile, { browser: {} } );
+$.mobile.browser.ie = (function() {
+       var v = 3,
+       div = document.createElement( "div" ),
+       a = div.all || [];
+
+       // added {} to silence closure compiler warnings. registering my dislike of all things
+       // overly clever here for future reference
+       while ( div.innerHTML = "<!--[if gt IE " + ( ++v ) + "]><br><![endif]-->", a[ 0 ] ){};
+
+       return v > 4 ? v : !v;
+})();
+
+
+$.extend( $.support, {
+       orientation: "orientation" in window && "onorientationchange" in window,
+       touch: "ontouchend" in document,
+       cssTransitions: "WebKitTransitionEvent" in window || validStyle( 'transition', 'height 100ms linear' ),
+       pushState: "pushState" in history && "replaceState" in history,
+       mediaquery: $.mobile.media( "only all" ),
+       cssPseudoElement: !!propExists( "content" ),
+       touchOverflow: !!propExists( "overflowScrolling" ),
+       cssTransform3d: transform3dTest(),
+       boxShadow: !!propExists( "boxShadow" ) && !bb,
+       scrollTop: ( "pageXOffset" in window || "scrollTop" in document.documentElement || "scrollTop" in fakeBody[ 0 ] ) && !webos && !operamini,
+       dynamicBaseTag: baseTagTest()
+});
+
+fakeBody.remove();
+
+
+// $.mobile.ajaxBlacklist is used to override ajaxEnabled on platforms that have known conflicts with hash history updates (BB5, Symbian)
+// or that generally work better browsing in regular http for full page refreshes (Opera Mini)
+// Note: This detection below is used as a last resort.
+// We recommend only using these detection methods when all other more reliable/forward-looking approaches are not possible
+var nokiaLTE7_3 = (function(){
+
+       var ua = window.navigator.userAgent;
+
+       //The following is an attempt to match Nokia browsers that are running Symbian/s60, with webkit, version 7.3 or older
+       return ua.indexOf( "Nokia" ) > -1 &&
+                       ( ua.indexOf( "Symbian/3" ) > -1 || ua.indexOf( "Series60/5" ) > -1 ) &&
+                       ua.indexOf( "AppleWebKit" ) > -1 &&
+                       ua.match( /(BrowserNG|NokiaBrowser)\/7\.[0-3]/ );
+})();
+
+// Support conditions that must be met in order to proceed
+// default enhanced qualifications are media query support OR IE 7+
+$.mobile.gradeA = function(){
+       return $.support.mediaquery || $.mobile.browser.ie && $.mobile.browser.ie >= 7;
+};
+
+$.mobile.ajaxBlacklist =
+                       // BlackBerry browsers, pre-webkit
+                       window.blackberry && !window.WebKitPoint ||
+                       // Opera Mini
+                       operamini ||
+                       // Symbian webkits pre 7.3
+                       nokiaLTE7_3;
+
+// Lastly, this workaround is the only way we've found so far to get pre 7.3 Symbian webkit devices
+// to render the stylesheets when they're referenced before this script, as we'd recommend doing.
+// This simply reappends the CSS in place, which for some reason makes it apply
+if ( nokiaLTE7_3 ) {
+       $(function() {
+               $( "head link[rel='stylesheet']" ).attr( "rel", "alternate stylesheet" ).attr( "rel", "stylesheet" );
+       });
+}
+
+// For ruling out shadows via css
+if ( !$.support.boxShadow ) {
+       $( "html" ).addClass( "ui-mobile-nosupport-boxshadow" );
+}
+
+})( jQuery );
+
+(function( $, window, undefined ) {
+
+// add new event shortcuts
+$.each( ( "touchstart touchmove touchend orientationchange throttledresize " +
+                                       "tap taphold swipe swipeleft swiperight scrollstart scrollstop" ).split( " " ), function( i, name ) {
+
+       $.fn[ name ] = function( fn ) {
+               return fn ? this.bind( name, fn ) : this.trigger( name );
+       };
+
+       $.attrFn[ name ] = true;
+});
+
+var supportTouch = $.support.touch,
+       scrollEvent = "touchmove scroll",
+       touchStartEvent = supportTouch ? "touchstart" : "mousedown",
+       touchStopEvent = supportTouch ? "touchend" : "mouseup",
+       touchMoveEvent = supportTouch ? "touchmove" : "mousemove";
+
+function triggerCustomEvent( obj, eventType, event ) {
+       var originalType = event.type;
+       event.type = eventType;
+       $.event.handle.call( obj, event );
+       event.type = originalType;
+}
+
+// also handles scrollstop
+$.event.special.scrollstart = {
+
+       enabled: true,
+
+       setup: function() {
+
+               var thisObject = this,
+                       $this = $( thisObject ),
+                       scrolling,
+                       timer;
+
+               function trigger( event, state ) {
+                       scrolling = state;
+                       triggerCustomEvent( thisObject, scrolling ? "scrollstart" : "scrollstop", event );
+               }
+
+               // iPhone triggers scroll after a small delay; use touchmove instead
+               $this.bind( scrollEvent, function( event ) {
+
+                       if ( !$.event.special.scrollstart.enabled ) {
+                               return;
+                       }
+
+                       if ( !scrolling ) {
+                               trigger( event, true );
+                       }
+
+                       clearTimeout( timer );
+                       timer = setTimeout(function() {
+                               trigger( event, false );
+                       }, 50 );
+               });
+       }
+};
+
+// also handles taphold
+$.event.special.tap = {
+       setup: function() {
+               var thisObject = this,
+                       $this = $( thisObject );
+
+               $this.bind( "vmousedown", function( event ) {
+
+                       if ( event.which && event.which !== 1 ) {
+                               return false;
+                       }
+
+                       var origTarget = event.target,
+                               origEvent = event.originalEvent,
+                               timer;
+
+                       function clearTapTimer() {
+                               clearTimeout( timer );
+                       }
+
+                       function clearTapHandlers() {
+                               clearTapTimer();
+
+                               $this.unbind( "vclick", clickHandler )
+                                       .unbind( "vmouseup", clearTapTimer );
+                               $( document ).unbind( "vmousecancel", clearTapHandlers );
+                       }
+
+                       function clickHandler(event) {
+                               clearTapHandlers();
+
+                               // ONLY trigger a 'tap' event if the start target is
+                               // the same as the stop target.
+                               if ( origTarget == event.target ) {
+                                       triggerCustomEvent( thisObject, "tap", event );
+                               }
+                       }
+
+                       $this.bind( "vmouseup", clearTapTimer )
+                               .bind( "vclick", clickHandler );
+                       $( document ).bind( "vmousecancel", clearTapHandlers );
+
+                       timer = setTimeout(function() {
+                                       triggerCustomEvent( thisObject, "taphold", $.Event( "taphold", { target: origTarget } ) );
+                       }, 750 );
+               });
+       }
+};
+
+// also handles swipeleft, swiperight
+$.event.special.swipe = {
+       scrollSupressionThreshold: 10, // More than this horizontal displacement, and we will suppress scrolling.
+
+       durationThreshold: 1000, // More time than this, and it isn't a swipe.
+
+       horizontalDistanceThreshold: 30,  // Swipe horizontal displacement must be more than this.
+
+       verticalDistanceThreshold: 75,  // Swipe vertical displacement must be less than this.
+
+       setup: function() {
+               var thisObject = this,
+                       $this = $( thisObject );
+
+               $this.bind( touchStartEvent, function( event ) {
+                       var data = event.originalEvent.touches ?
+                                                               event.originalEvent.touches[ 0 ] : event,
+                               start = {
+                                       time: ( new Date() ).getTime(),
+                                       coords: [ data.pageX, data.pageY ],
+                                       origin: $( event.target )
+                               },
+                               stop;
+
+                       function moveHandler( event ) {
+
+                               if ( !start ) {
+                                       return;
+                               }
+
+                               var data = event.originalEvent.touches ?
+                                               event.originalEvent.touches[ 0 ] : event;
+
+                               stop = {
+                                       time: ( new Date() ).getTime(),
+                                       coords: [ data.pageX, data.pageY ]
+                               };
+
+                               // prevent scrolling
+                               if ( Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.scrollSupressionThreshold ) {
+                                       event.preventDefault();
+                               }
+                       }
+
+                       $this.bind( touchMoveEvent, moveHandler )
+                               .one( touchStopEvent, function( event ) {
+                                       $this.unbind( touchMoveEvent, moveHandler );
+
+                                       if ( start && stop ) {
+                                               if ( stop.time - start.time < $.event.special.swipe.durationThreshold &&
+                                                               Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.horizontalDistanceThreshold &&
+                                                               Math.abs( start.coords[ 1 ] - stop.coords[ 1 ] ) < $.event.special.swipe.verticalDistanceThreshold ) {
+
+                                                       start.origin.trigger( "swipe" )
+                                                               .trigger( start.coords[0] > stop.coords[ 0 ] ? "swipeleft" : "swiperight" );
+                                               }
+                                       }
+                                       start = stop = undefined;
+                               });
+               });
+       }
+};
+
+(function( $, window ) {
+       // "Cowboy" Ben Alman
+
+       var win = $( window ),
+               special_event,
+               get_orientation,
+               last_orientation,
+               initial_orientation_is_landscape,
+               initial_orientation_is_default,
+               portrait_map = { "0": true, "180": true };
+
+       // It seems that some device/browser vendors use window.orientation values 0 and 180 to
+       // denote the "default" orientation. For iOS devices, and most other smart-phones tested,
+       // the default orientation is always "portrait", but in some Android and RIM based tablets,
+       // the default orientation is "landscape". The following code attempts to use the window
+       // dimensions to figure out what the current orientation is, and then makes adjustments
+       // to the to the portrait_map if necessary, so that we can properly decode the
+       // window.orientation value whenever get_orientation() is called.
+       //
+       // Note that we used to use a media query to figure out what the orientation the browser
+       // thinks it is in:
+       //
+       //     initial_orientation_is_landscape = $.mobile.media("all and (orientation: landscape)");
+       //
+       // but there was an iPhone/iPod Touch bug beginning with iOS 4.2, up through iOS 5.1,
+       // where the browser *ALWAYS* applied the landscape media query. This bug does not
+       // happen on iPad.
+
+       if ( $.support.orientation ) {
+
+               // Check the window width and height to figure out what the current orientation
+               // of the device is at this moment. Note that we've initialized the portrait map
+               // values to 0 and 180, *AND* we purposely check for landscape so that if we guess
+               // wrong, , we default to the assumption that portrait is the default orientation.
+               // We use a threshold check below because on some platforms like iOS, the iPhone
+               // form-factor can report a larger width than height if the user turns on the
+               // developer console. The actual threshold value is somewhat arbitrary, we just
+               // need to make sure it is large enough to exclude the developer console case.
+
+               var ww = window.innerWidth || $( window ).width(),
+                       wh = window.innerHeight || $( window ).height(),
+                       landscape_threshold = 50;
+
+               initial_orientation_is_landscape = ww > wh && ( ww - wh ) > landscape_threshold;
+
+
+               // Now check to see if the current window.orientation is 0 or 180.
+               initial_orientation_is_default = portrait_map[ window.orientation ];
+
+               // If the initial orientation is landscape, but window.orientation reports 0 or 180, *OR*
+               // if the initial orientation is portrait, but window.orientation reports 90 or -90, we
+               // need to flip our portrait_map values because landscape is the default orientation for
+               // this device/browser.
+               if ( ( initial_orientation_is_landscape && initial_orientation_is_default ) || ( !initial_orientation_is_landscape && !initial_orientation_is_default ) ) {
+                       portrait_map = { "-90": true, "90": true };
+               }
+       }
+
+       $.event.special.orientationchange = special_event = {
+               setup: function() {
+                       // If the event is supported natively, return false so that jQuery
+                       // will bind to the event using DOM methods.
+                       if ( $.support.orientation && $.mobile.orientationChangeEnabled ) {
+                               return false;
+                       }
+
+                       // Get the current orientation to avoid initial double-triggering.
+                       last_orientation = get_orientation();
+
+                       // Because the orientationchange event doesn't exist, simulate the
+                       // event by testing window dimensions on resize.
+                       win.bind( "throttledresize", handler );
+               },
+               teardown: function(){
+                       // If the event is not supported natively, return false so that
+                       // jQuery will unbind the event using DOM methods.
+                       if ( $.support.orientation && $.mobile.orientationChangeEnabled ) {
+                               return false;
+                       }
+
+                       // Because the orientationchange event doesn't exist, unbind the
+                       // resize event handler.
+                       win.unbind( "throttledresize", handler );
+               },
+               add: function( handleObj ) {
+                       // Save a reference to the bound event handler.
+                       var old_handler = handleObj.handler;
+
+
+                       handleObj.handler = function( event ) {
+                               // Modify event object, adding the .orientation property.
+                               event.orientation = get_orientation();
+
+                               // Call the originally-bound event handler and return its result.
+                               return old_handler.apply( this, arguments );
+                       };
+               }
+       };
+
+       // If the event is not supported natively, this handler will be bound to
+       // the window resize event to simulate the orientationchange event.
+       function handler() {
+               // Get the current orientation.
+               var orientation = get_orientation();
+
+               if ( orientation !== last_orientation ) {
+                       // The orientation has changed, so trigger the orientationchange event.
+                       last_orientation = orientation;
+                       win.trigger( "orientationchange" );
+               }
+       }
+
+       // Get the current page orientation. This method is exposed publicly, should it
+       // be needed, as jQuery.event.special.orientationchange.orientation()
+       $.event.special.orientationchange.orientation = get_orientation = function() {
+               var isPortrait = true, elem = document.documentElement;
+
+               // prefer window orientation to the calculation based on screensize as
+               // the actual screen resize takes place before or after the orientation change event
+               // has been fired depending on implementation (eg android 2.3 is before, iphone after).
+               // More testing is required to determine if a more reliable method of determining the new screensize
+               // is possible when orientationchange is fired. (eg, use media queries + element + opacity)
+               if ( $.support.orientation ) {
+                       // if the window orientation registers as 0 or 180 degrees report
+                       // portrait, otherwise landscape
+                       isPortrait = portrait_map[ window.orientation ];
+               } else {
+                       isPortrait = elem && elem.clientWidth / elem.clientHeight < 1.1;
+               }
+
+               return isPortrait ? "portrait" : "landscape";
+       };
+
+})( jQuery, window );
+
+
+// throttled resize event
+(function() {
+
+       $.event.special.throttledresize = {
+               setup: function() {
+                       $( this ).bind( "resize", handler );
+               },
+               teardown: function(){
+                       $( this ).unbind( "resize", handler );
+               }
+       };
+
+       var throttle = 250,
+               handler = function() {
+                       curr = ( new Date() ).getTime();
+                       diff = curr - lastCall;
+
+                       if ( diff >= throttle ) {
+
+                               lastCall = curr;
+                               $( this ).trigger( "throttledresize" );
+
+                       } else {
+
+                               if ( heldCall ) {
+                                       clearTimeout( heldCall );
+                               }
+
+                               // Promise a held call will still execute
+                               heldCall = setTimeout( handler, throttle - diff );
+                       }
+               },
+               lastCall = 0,
+               heldCall,
+               curr,
+               diff;
+})();
+
+
+$.each({
+       scrollstop: "scrollstart",
+       taphold: "tap",
+       swipeleft: "swipe",
+       swiperight: "swipe"
+}, function( event, sourceEvent ) {
+
+       $.event.special[ event ] = {
+               setup: function() {
+                       $( this ).bind( sourceEvent, $.noop );
+               }
+       };
+});
+
+})( jQuery, this );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.page", $.mobile.widget, {
+       options: {
+               theme: "c",
+               domCache: false,
+               keepNativeDefault: ":jqmData(role='none'), :jqmData(role='nojs')"
+       },
+
+       _create: function() {
+               
+               var self = this;
+               
+               // if false is returned by the callbacks do not create the page
+               if( self._trigger( "beforecreate" ) === false ){
+                       return false;
+               }
+
+               self.element
+                       .attr( "tabindex", "0" )
+                       .addClass( "ui-page ui-body-" + self.options.theme )
+                       .bind( "pagebeforehide", function(){
+                               self.removeContainerBackground();
+                       } )
+                       .bind( "pagebeforeshow", function(){
+                               self.setContainerBackground();
+                       } );
+
+       },
+       
+       removeContainerBackground: function(){
+               $.mobile.pageContainer.removeClass( "ui-overlay-" + $.mobile.getInheritedTheme( this.element.parent() ) );
+       },
+       
+       // set the page container background to the page theme
+       setContainerBackground: function( theme ){
+               if( this.options.theme ){
+                       $.mobile.pageContainer.addClass( "ui-overlay-" + ( theme || this.options.theme ) );
+               }
+       },
+
+       keepNativeSelector: function() {
+               var options = this.options,
+                       keepNativeDefined = options.keepNative && $.trim(options.keepNative);
+
+               if( keepNativeDefined && options.keepNative !== options.keepNativeDefault ){
+                       return [options.keepNative, options.keepNativeDefault].join(", ");
+               }
+
+               return options.keepNativeDefault;
+       }
+});
+})( jQuery );
+
+
+(function( $, window, undefined ) {
+
+var createHandler = function( sequential ){
+       
+       // Default to sequential
+       if( sequential === undefined ){
+               sequential = true;
+       }
+       
+       return function( name, reverse, $to, $from ) {
+
+               var deferred = new $.Deferred(),
+                       reverseClass = reverse ? " reverse" : "",
+                       active  = $.mobile.urlHistory.getActive(),
+                       toScroll = active.lastScroll || $.mobile.defaultHomeScroll,
+                       screenHeight = $.mobile.getScreenHeight(),
+                       maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $( window ).width() > $.mobile.maxTransitionWidth,
+                       none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none",
+                       toggleViewportClass = function(){
+                               $.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + name );
+                       },
+                       scrollPage = function(){
+                               // By using scrollTo instead of silentScroll, we can keep things better in order
+                               // Just to be precautios, disable scrollstart listening like silentScroll would
+                               $.event.special.scrollstart.enabled = false;
+                               
+                               window.scrollTo( 0, toScroll );
+                               
+                               // reenable scrollstart listening like silentScroll would
+                               setTimeout(function() {
+                                       $.event.special.scrollstart.enabled = true;
+                               }, 150 );
+                       },
+                       cleanFrom = function(){
+                               $from
+                                       .removeClass( $.mobile.activePageClass + " out in reverse " + name )
+                                       .height( "" );
+                       },
+                       startOut = function(){
+                               // if it's not sequential, call the doneOut transition to start the TO page animating in simultaneously
+                               if( !sequential ){
+                                       doneOut();
+                               }
+                               else {
+                                       $from.animationComplete( doneOut );     
+                               }
+                               
+                               // Set the from page's height and start it transitioning out
+                               // Note: setting an explicit height helps eliminate tiling in the transitions
+                               $from
+                                       .height( screenHeight + $(window ).scrollTop() )
+                                       .addClass( name + " out" + reverseClass );
+                       },
+                       
+                       doneOut = function() {
+
+                               if ( $from && sequential ) {
+                                       cleanFrom();
+                               }
+                               
+                               startIn();
+                       },
+                       
+                       startIn = function(){   
+                       
+                               $to.addClass( $.mobile.activePageClass );                               
+                       
+                               // Send focus to page as it is now display: block
+                               $.mobile.focusPage( $to );
+
+                               // Set to page height
+                               $to.height( screenHeight + toScroll );
+                               
+                               scrollPage();
+                               
+                               if( !none ){
+                                       $to.animationComplete( doneIn );
+                               }
+                               
+                               $to.addClass( name + " in" + reverseClass );
+                               
+                               if( none ){
+                                       doneIn();
+                               }
+                               
+                       },
+               
+                       doneIn = function() {
+                       
+                               if ( !sequential ) {
+                                       
+                                       if( $from ){
+                                               cleanFrom();
+                                       }
+                               }
+                       
+                               $to
+                                       .removeClass( "out in reverse " + name )
+                                       .height( "" );
+                               
+                               toggleViewportClass();
+                               
+                               // In some browsers (iOS5), 3D transitions block the ability to scroll to the desired location during transition
+                               // This ensures we jump to that spot after the fact, if we aren't there already.
+                               if( $( window ).scrollTop() !== toScroll ){
+                                       scrollPage();
+                               }
+
+                               deferred.resolve( name, reverse, $to, $from, true );
+                       };
+
+               toggleViewportClass();
+       
+               if ( $from && !none ) {
+                       startOut();
+               }
+               else {
+                       doneOut();
+               }
+
+               return deferred.promise();
+       };
+}
+
+// generate the handlers from the above
+var sequentialHandler = createHandler(),
+       simultaneousHandler = createHandler( false );
+
+// Make our transition handler the public default.
+$.mobile.defaultTransitionHandler = sequentialHandler;
+
+//transition handler dictionary for 3rd party transitions
+$.mobile.transitionHandlers = {
+       "default": $.mobile.defaultTransitionHandler,
+       "sequential": sequentialHandler,
+       "simultaneous": simultaneousHandler
+};
+
+$.mobile.transitionFallbacks = {};
+
+})( jQuery, this );
+
+( function( $, undefined ) {
+
+       //define vars for interal use
+       var $window = $( window ),
+               $html = $( 'html' ),
+               $head = $( 'head' ),
+
+               //url path helpers for use in relative url management
+               path = {
+
+                       // This scary looking regular expression parses an absolute URL or its relative
+                       // variants (protocol, site, document, query, and hash), into the various
+                       // components (protocol, host, path, query, fragment, etc that make up the
+                       // URL as well as some other commonly used sub-parts. When used with RegExp.exec()
+                       // or String.match, it parses the URL into a results array that looks like this:
+                       //
+                       //     [0]: http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234&type=unread#msg-content
+                       //     [1]: http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234&type=unread
+                       //     [2]: http://jblas:password@mycompany.com:8080/mail/inbox
+                       //     [3]: http://jblas:password@mycompany.com:8080
+                       //     [4]: http:
+                       //     [5]: //
+                       //     [6]: jblas:password@mycompany.com:8080
+                       //     [7]: jblas:password
+                       //     [8]: jblas
+                       //     [9]: password
+                       //    [10]: mycompany.com:8080
+                       //    [11]: mycompany.com
+                       //    [12]: 8080
+                       //    [13]: /mail/inbox
+                       //    [14]: /mail/
+                       //    [15]: inbox
+                       //    [16]: ?msg=1234&type=unread
+                       //    [17]: #msg-content
+                       //
+                       urlParseRE: /^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,
+
+                       //Parse a URL into a structure that allows easy access to
+                       //all of the URL components by name.
+                       parseUrl: function( url ) {
+                               // If we're passed an object, we'll assume that it is
+                               // a parsed url object and just return it back to the caller.
+                               if ( $.type( url ) === "object" ) {
+                                       return url;
+                               }
+
+                               var matches = path.urlParseRE.exec( url || "" ) || [];
+
+                                       // Create an object that allows the caller to access the sub-matches
+                                       // by name. Note that IE returns an empty string instead of undefined,
+                                       // like all other browsers do, so we normalize everything so its consistent
+                                       // no matter what browser we're running on.
+                                       return {
+                                               href:         matches[  0 ] || "",
+                                               hrefNoHash:   matches[  1 ] || "",
+                                               hrefNoSearch: matches[  2 ] || "",
+                                               domain:       matches[  3 ] || "",
+                                               protocol:     matches[  4 ] || "",
+                                               doubleSlash:  matches[  5 ] || "",
+                                               authority:    matches[  6 ] || "",
+                                               username:     matches[  8 ] || "",
+                                               password:     matches[  9 ] || "",
+                                               host:         matches[ 10 ] || "",
+                                               hostname:     matches[ 11 ] || "",
+                                               port:         matches[ 12 ] || "",
+                                               pathname:     matches[ 13 ] || "",
+                                               directory:    matches[ 14 ] || "",
+                                               filename:     matches[ 15 ] || "",
+                                               search:       matches[ 16 ] || "",
+                                               hash:         matches[ 17 ] || ""
+                                       };
+                       },
+
+                       //Turn relPath into an asbolute path. absPath is
+                       //an optional absolute path which describes what
+                       //relPath is relative to.
+                       makePathAbsolute: function( relPath, absPath ) {
+                               if ( relPath && relPath.charAt( 0 ) === "/" ) {
+                                       return relPath;
+                               }
+
+                               relPath = relPath || "";
+                               absPath = absPath ? absPath.replace( /^\/|(\/[^\/]*|[^\/]+)$/g, "" ) : "";
+
+                               var absStack = absPath ? absPath.split( "/" ) : [],
+                                       relStack = relPath.split( "/" );
+                               for ( var i = 0; i < relStack.length; i++ ) {
+                                       var d = relStack[ i ];
+                                       switch ( d ) {
+                                               case ".":
+                                                       break;
+                                               case "..":
+                                                       if ( absStack.length ) {
+                                                               absStack.pop();
+                                                       }
+                                                       break;
+                                               default:
+                                                       absStack.push( d );
+                                                       break;
+                                       }
+                               }
+                               return "/" + absStack.join( "/" );
+                       },
+
+                       //Returns true if both urls have the same domain.
+                       isSameDomain: function( absUrl1, absUrl2 ) {
+                               return path.parseUrl( absUrl1 ).domain === path.parseUrl( absUrl2 ).domain;
+                       },
+
+                       //Returns true for any relative variant.
+                       isRelativeUrl: function( url ) {
+                               // All relative Url variants have one thing in common, no protocol.
+                               return path.parseUrl( url ).protocol === "";
+                       },
+
+                       //Returns true for an absolute url.
+                       isAbsoluteUrl: function( url ) {
+                               return path.parseUrl( url ).protocol !== "";
+                       },
+
+                       //Turn the specified realtive URL into an absolute one. This function
+                       //can handle all relative variants (protocol, site, document, query, fragment).
+                       makeUrlAbsolute: function( relUrl, absUrl ) {
+                               if ( !path.isRelativeUrl( relUrl ) ) {
+                                       return relUrl;
+                               }
+
+                               var relObj = path.parseUrl( relUrl ),
+                                       absObj = path.parseUrl( absUrl ),
+                                       protocol = relObj.protocol || absObj.protocol,
+                                       doubleSlash = relObj.protocol ? relObj.doubleSlash : ( relObj.doubleSlash || absObj.doubleSlash ),
+                                       authority = relObj.authority || absObj.authority,
+                                       hasPath = relObj.pathname !== "",
+                                       pathname = path.makePathAbsolute( relObj.pathname || absObj.filename, absObj.pathname ),
+                                       search = relObj.search || ( !hasPath && absObj.search ) || "",
+                                       hash = relObj.hash;
+
+                               return protocol + doubleSlash + authority + pathname + search + hash;
+                       },
+
+                       //Add search (aka query) params to the specified url.
+                       addSearchParams: function( url, params ) {
+                               var u = path.parseUrl( url ),
+                                       p = ( typeof params === "object" ) ? $.param( params ) : params,
+                                       s = u.search || "?";
+                               return u.hrefNoSearch + s + ( s.charAt( s.length - 1 ) !== "?" ? "&" : "" ) + p + ( u.hash || "" );
+                       },
+
+                       convertUrlToDataUrl: function( absUrl ) {
+                               var u = path.parseUrl( absUrl );
+                               if ( path.isEmbeddedPage( u ) ) {
+                                   // For embedded pages, remove the dialog hash key as in getFilePath(),
+                                   // otherwise the Data Url won't match the id of the embedded Page.
+                                       return u.hash.split( dialogHashKey )[0].replace( /^#/, "" );
+                               } else if ( path.isSameDomain( u, documentBase ) ) {
+                                       return u.hrefNoHash.replace( documentBase.domain, "" );
+                               }
+                               return absUrl;
+                       },
+
+                       //get path from current hash, or from a file path
+                       get: function( newPath ) {
+                               if( newPath === undefined ) {
+                                       newPath = location.hash;
+                               }
+                               return path.stripHash( newPath ).replace( /[^\/]*\.[^\/*]+$/, '' );
+                       },
+
+                       //return the substring of a filepath before the sub-page key, for making a server request
+                       getFilePath: function( path ) {
+                               var splitkey = '&' + $.mobile.subPageUrlKey;
+                               return path && path.split( splitkey )[0].split( dialogHashKey )[0];
+                       },
+
+                       //set location hash to path
+                       set: function( path ) {
+                               location.hash = path;
+                       },
+
+                       //test if a given url (string) is a path
+                       //NOTE might be exceptionally naive
+                       isPath: function( url ) {
+                               return ( /\// ).test( url );
+                       },
+
+                       //return a url path with the window's location protocol/hostname/pathname removed
+                       clean: function( url ) {
+                               return url.replace( documentBase.domain, "" );
+                       },
+
+                       //just return the url without an initial #
+                       stripHash: function( url ) {
+                               return url.replace( /^#/, "" );
+                       },
+
+                       //remove the preceding hash, any query params, and dialog notations
+                       cleanHash: function( hash ) {
+                               return path.stripHash( hash.replace( /\?.*$/, "" ).replace( dialogHashKey, "" ) );
+                       },
+
+                       //check whether a url is referencing the same domain, or an external domain or different protocol
+                       //could be mailto, etc
+                       isExternal: function( url ) {
+                               var u = path.parseUrl( url );
+                               return u.protocol && u.domain !== documentUrl.domain ? true : false;
+                       },
+
+                       hasProtocol: function( url ) {
+                               return ( /^(:?\w+:)/ ).test( url );
+                       },
+
+                       //check if the specified url refers to the first page in the main application document.
+                       isFirstPageUrl: function( url ) {
+                               // We only deal with absolute paths.
+                               var u = path.parseUrl( path.makeUrlAbsolute( url, documentBase ) ),
+
+                                       // Does the url have the same path as the document?
+                                       samePath = u.hrefNoHash === documentUrl.hrefNoHash || ( documentBaseDiffers && u.hrefNoHash === documentBase.hrefNoHash ),
+
+                                       // Get the first page element.
+                                       fp = $.mobile.firstPage,
+
+                                       // Get the id of the first page element if it has one.
+                                       fpId = fp && fp[0] ? fp[0].id : undefined;
+
+                                       // The url refers to the first page if the path matches the document and
+                                       // it either has no hash value, or the hash is exactly equal to the id of the
+                                       // first page element.
+                                       return samePath && ( !u.hash || u.hash === "#" || ( fpId && u.hash.replace( /^#/, "" ) === fpId ) );
+                       },
+
+                       isEmbeddedPage: function( url ) {
+                               var u = path.parseUrl( url );
+
+                               //if the path is absolute, then we need to compare the url against
+                               //both the documentUrl and the documentBase. The main reason for this
+                               //is that links embedded within external documents will refer to the
+                               //application document, whereas links embedded within the application
+                               //document will be resolved against the document base.
+                               if ( u.protocol !== "" ) {
+                                       return ( u.hash && ( u.hrefNoHash === documentUrl.hrefNoHash || ( documentBaseDiffers && u.hrefNoHash === documentBase.hrefNoHash ) ) );
+                               }
+                               return (/^#/).test( u.href );
+                       }
+               },
+
+               //will be defined when a link is clicked and given an active class
+               $activeClickedLink = null,
+
+               //urlHistory is purely here to make guesses at whether the back or forward button was clicked
+               //and provide an appropriate transition
+               urlHistory = {
+                       // Array of pages that are visited during a single page load.
+                       // Each has a url and optional transition, title, and pageUrl (which represents the file path, in cases where URL is obscured, such as dialogs)
+                       stack: [],
+
+                       //maintain an index number for the active page in the stack
+                       activeIndex: 0,
+
+                       //get active
+                       getActive: function() {
+                               return urlHistory.stack[ urlHistory.activeIndex ];
+                       },
+
+                       getPrev: function() {
+                               return urlHistory.stack[ urlHistory.activeIndex - 1 ];
+                       },
+
+                       getNext: function() {
+                               return urlHistory.stack[ urlHistory.activeIndex + 1 ];
+                       },
+
+                       // addNew is used whenever a new page is added
+                       addNew: function( url, transition, title, pageUrl, role ) {
+                               //if there's forward history, wipe it
+                               if( urlHistory.getNext() ) {
+                                       urlHistory.clearForward();
+                               }
+
+                               urlHistory.stack.push( {url : url, transition: transition, title: title, pageUrl: pageUrl, role: role } );
+
+                               urlHistory.activeIndex = urlHistory.stack.length - 1;
+                       },
+
+                       //wipe urls ahead of active index
+                       clearForward: function() {
+                               urlHistory.stack = urlHistory.stack.slice( 0, urlHistory.activeIndex + 1 );
+                       },
+
+                       directHashChange: function( opts ) {
+                               var back , forward, newActiveIndex, prev = this.getActive();
+
+                               // check if url isp in history and if it's ahead or behind current page
+                               $.each( urlHistory.stack, function( i, historyEntry ) {
+
+                                       //if the url is in the stack, it's a forward or a back
+                                       if( opts.currentUrl === historyEntry.url ) {
+                                               //define back and forward by whether url is older or newer than current page
+                                               back = i < urlHistory.activeIndex;
+                                               forward = !back;
+                                               newActiveIndex = i;
+                                       }
+                               });
+
+                               // save new page index, null check to prevent falsey 0 result
+                               this.activeIndex = newActiveIndex !== undefined ? newActiveIndex : this.activeIndex;
+
+                               if( back ) {
+                                       ( opts.either || opts.isBack )( true );
+                               } else if( forward ) {
+                                       ( opts.either || opts.isForward )( false );
+                               }
+                       },
+
+                       //disable hashchange event listener internally to ignore one change
+                       //toggled internally when location.hash is updated to match the url of a successful page load
+                       ignoreNextHashChange: false
+               },
+
+               //define first selector to receive focus when a page is shown
+               focusable = "[tabindex],a,button:visible,select:visible,input",
+
+               //queue to hold simultanious page transitions
+               pageTransitionQueue = [],
+
+               //indicates whether or not page is in process of transitioning
+               isPageTransitioning = false,
+
+               //nonsense hash change key for dialogs, so they create a history entry
+               dialogHashKey = "&ui-state=dialog",
+
+               //existing base tag?
+               $base = $head.children( "base" ),
+
+               //tuck away the original document URL minus any fragment.
+               documentUrl = path.parseUrl( location.href ),
+
+               //if the document has an embedded base tag, documentBase is set to its
+               //initial value. If a base tag does not exist, then we default to the documentUrl.
+               documentBase = $base.length ? path.parseUrl( path.makeUrlAbsolute( $base.attr( "href" ), documentUrl.href ) ) : documentUrl,
+
+               //cache the comparison once.
+               documentBaseDiffers = ( documentUrl.hrefNoHash !== documentBase.hrefNoHash );
+
+               //base element management, defined depending on dynamic base tag support
+               var base = $.support.dynamicBaseTag ? {
+
+                       //define base element, for use in routing asset urls that are referenced in Ajax-requested markup
+                       element: ( $base.length ? $base : $( "<base>", { href: documentBase.hrefNoHash } ).prependTo( $head ) ),
+
+                       //set the generated BASE element's href attribute to a new page's base path
+                       set: function( href ) {
+                               base.element.attr( "href", path.makeUrlAbsolute( href, documentBase ) );
+                       },
+
+                       //set the generated BASE element's href attribute to a new page's base path
+                       reset: function() {
+                               base.element.attr( "href", documentBase.hrefNoHash );
+                       }
+
+               } : undefined;
+
+/*
+       internal utility functions
+--------------------------------------*/
+
+
+       //direct focus to the page title, or otherwise first focusable element
+       $.mobile.focusPage = function ( page ) {
+               var autofocus = page.find("[autofocus]"),
+                       pageTitle = page.find( ".ui-title:eq(0)" );
+
+               if( autofocus.length ) {
+                       autofocus.focus();
+                       return;
+               }
+
+               if( pageTitle.length ) {
+                       pageTitle.focus();
+               }
+               else{
+                       page.focus();
+               }
+       }
+
+       //remove active classes after page transition or error
+       function removeActiveLinkClass( forceRemoval ) {
+               if( !!$activeClickedLink && ( !$activeClickedLink.closest( '.ui-page-active' ).length || forceRemoval ) ) {
+                       $activeClickedLink.removeClass( $.mobile.activeBtnClass );
+               }
+               $activeClickedLink = null;
+       }
+
+       function releasePageTransitionLock() {
+               isPageTransitioning = false;
+               if( pageTransitionQueue.length > 0 ) {
+                       $.mobile.changePage.apply( null, pageTransitionQueue.pop() );
+               }
+       }
+
+       // Save the last scroll distance per page, before it is hidden
+       var setLastScrollEnabled = true,
+               setLastScroll, delayedSetLastScroll;
+
+       setLastScroll = function() {
+               // this barrier prevents setting the scroll value based on the browser
+               // scrolling the window based on a hashchange
+               if( !setLastScrollEnabled ) {
+                       return;
+               }
+
+               var active = $.mobile.urlHistory.getActive();
+
+               if( active ) {
+                       var lastScroll = $window.scrollTop();
+
+                       // Set active page's lastScroll prop.
+                       // If the location we're scrolling to is less than minScrollBack, let it go.
+                       active.lastScroll = lastScroll < $.mobile.minScrollBack ? $.mobile.defaultHomeScroll : lastScroll;
+               }
+       };
+
+       // bind to scrollstop to gather scroll position. The delay allows for the hashchange
+       // event to fire and disable scroll recording in the case where the browser scrolls
+       // to the hash targets location (sometimes the top of the page). once pagechange fires
+       // getLastScroll is again permitted to operate
+       delayedSetLastScroll = function() {
+               setTimeout( setLastScroll, 100 );
+       };
+
+       // disable an scroll setting when a hashchange has been fired, this only works
+       // because the recording of the scroll position is delayed for 100ms after
+       // the browser might have changed the position because of the hashchange
+       $window.bind( $.support.pushState ? "popstate" : "hashchange", function() {
+               setLastScrollEnabled = false;
+       });
+
+       // handle initial hashchange from chrome :(
+       $window.one( $.support.pushState ? "popstate" : "hashchange", function() {
+               setLastScrollEnabled = true;
+       });
+
+       // wait until the mobile page container has been determined to bind to pagechange
+       $window.one( "pagecontainercreate", function(){
+               // once the page has changed, re-enable the scroll recording
+               $.mobile.pageContainer.bind( "pagechange", function() {
+
+                       setLastScrollEnabled = true;
+
+                       // remove any binding that previously existed on the get scroll
+                       // which may or may not be different than the scroll element determined for
+                       // this page previously
+                       $window.unbind( "scrollstop", delayedSetLastScroll );
+
+                       // determine and bind to the current scoll element which may be the window
+                       // or in the case of touch overflow the element with touch overflow
+                       $window.bind( "scrollstop", delayedSetLastScroll );
+               });
+       });
+
+       // bind to scrollstop for the first page as "pagechange" won't be fired in that case
+       $window.bind( "scrollstop", delayedSetLastScroll );
+
+       //function for transitioning between two existing pages
+       function transitionPages( toPage, fromPage, transition, reverse ) {
+
+               if( fromPage ) {
+                       //trigger before show/hide events
+                       fromPage.data( "page" )._trigger( "beforehide", null, { nextPage: toPage } );
+               }
+
+               toPage.data( "page" )._trigger( "beforeshow", null, { prevPage: fromPage || $( "" ) } );
+
+               //clear page loader
+               $.mobile.hidePageLoadingMsg();
+               
+               // If transition is defined, check if css 3D transforms are supported, and if not, if a fallback is specified
+               if( transition && !$.support.cssTransform3d && $.mobile.transitionFallbacks[ transition ] ){
+                       transition = $.mobile.transitionFallbacks[ transition ];
+               }
+               
+               //find the transition handler for the specified transition. If there
+               //isn't one in our transitionHandlers dictionary, use the default one.
+               //call the handler immediately to kick-off the transition.
+               var th = $.mobile.transitionHandlers[ transition || "default" ] || $.mobile.defaultTransitionHandler,
+                       promise = th( transition, reverse, toPage, fromPage );
+
+               promise.done(function() {
+
+                       //trigger show/hide events
+                       if( fromPage ) {
+                               fromPage.data( "page" )._trigger( "hide", null, { nextPage: toPage } );
+                       }
+
+                       //trigger pageshow, define prevPage as either fromPage or empty jQuery obj
+                       toPage.data( "page" )._trigger( "show", null, { prevPage: fromPage || $( "" ) } );
+               });
+
+               return promise;
+       }
+
+       //simply set the active page's minimum height to screen height, depending on orientation
+       function getScreenHeight(){
+               // Native innerHeight returns more accurate value for this across platforms, 
+               // jQuery version is here as a normalized fallback for platforms like Symbian
+               return window.innerHeight || $( window ).height();
+       }
+
+       $.mobile.getScreenHeight = getScreenHeight;
+
+       //simply set the active page's minimum height to screen height, depending on orientation
+       function resetActivePageHeight(){
+               var aPage = $( "." + $.mobile.activePageClass ),
+                       aPagePadT = parseFloat( aPage.css( "padding-top" ) ),
+                       aPagePadB = parseFloat( aPage.css( "padding-bottom" ) );
+                               
+               aPage.css( "min-height", getScreenHeight() - aPagePadT - aPagePadB );
+       }
+
+       //shared page enhancements
+       function enhancePage( $page, role ) {
+               // If a role was specified, make sure the data-role attribute
+               // on the page element is in sync.
+               if( role ) {
+                       $page.attr( "data-" + $.mobile.ns + "role", role );
+               }
+
+               //run page plugin
+               $page.page();
+       }
+
+/* exposed $.mobile methods     */
+
+       //animation complete callback
+       $.fn.animationComplete = function( callback ) {
+               if( $.support.cssTransitions ) {
+                       return $( this ).one( 'webkitAnimationEnd animationend', callback );
+               }
+               else{
+                       // defer execution for consistency between webkit/non webkit
+                       setTimeout( callback, 0 );
+                       return $( this );
+               }
+       };
+
+       //expose path object on $.mobile
+       $.mobile.path = path;
+
+       //expose base object on $.mobile
+       $.mobile.base = base;
+
+       //history stack
+       $.mobile.urlHistory = urlHistory;
+
+       $.mobile.dialogHashKey = dialogHashKey;
+
+
+
+       //enable cross-domain page support
+       $.mobile.allowCrossDomainPages = false;
+
+       //return the original document url
+       $.mobile.getDocumentUrl = function(asParsedObject) {
+               return asParsedObject ? $.extend( {}, documentUrl ) : documentUrl.href;
+       };
+
+       //return the original document base url
+       $.mobile.getDocumentBase = function(asParsedObject) {
+               return asParsedObject ? $.extend( {}, documentBase ) : documentBase.href;
+       };
+
+       $.mobile._bindPageRemove = function() {
+               var page = $(this);
+
+               // when dom caching is not enabled or the page is embedded bind to remove the page on hide
+               if( !page.data("page").options.domCache
+                               && page.is(":jqmData(external-page='true')") ) {
+
+                       page.bind( 'pagehide.remove', function() {
+                               var $this = $( this ),
+                                       prEvent = new $.Event( "pageremove" );
+
+                               $this.trigger( prEvent );
+
+                               if( !prEvent.isDefaultPrevented() ){
+                                       $this.removeWithDependents();
+                               }
+                       });
+               }
+       };
+
+       // Load a page into the DOM.
+       $.mobile.loadPage = function( url, options ) {
+               // This function uses deferred notifications to let callers
+               // know when the page is done loading, or if an error has occurred.
+               var deferred = $.Deferred(),
+
+                       // The default loadPage options with overrides specified by
+                       // the caller.
+                       settings = $.extend( {}, $.mobile.loadPage.defaults, options ),
+
+                       // The DOM element for the page after it has been loaded.
+                       page = null,
+
+                       // If the reloadPage option is true, and the page is already
+                       // in the DOM, dupCachedPage will be set to the page element
+                       // so that it can be removed after the new version of the
+                       // page is loaded off the network.
+                       dupCachedPage = null,
+
+                       // determine the current base url
+                       findBaseWithDefault = function(){
+                               var closestBase = ( $.mobile.activePage && getClosestBaseUrl( $.mobile.activePage ) );
+                               return closestBase || documentBase.hrefNoHash;
+                       },
+
+                       // The absolute version of the URL passed into the function. This
+                       // version of the URL may contain dialog/subpage params in it.
+                       absUrl = path.makeUrlAbsolute( url, findBaseWithDefault() );
+
+
+               // If the caller provided data, and we're using "get" request,
+               // append the data to the URL.
+               if ( settings.data && settings.type === "get" ) {
+                       absUrl = path.addSearchParams( absUrl, settings.data );
+                       settings.data = undefined;
+               }
+
+               // If the caller is using a "post" request, reloadPage must be true
+               if(  settings.data && settings.type === "post" ){
+                       settings.reloadPage = true;
+               }
+
+                       // The absolute version of the URL minus any dialog/subpage params.
+                       // In otherwords the real URL of the page to be loaded.
+               var fileUrl = path.getFilePath( absUrl ),
+
+                       // The version of the Url actually stored in the data-url attribute of
+                       // the page. For embedded pages, it is just the id of the page. For pages
+                       // within the same domain as the document base, it is the site relative
+                       // path. For cross-domain pages (Phone Gap only) the entire absolute Url
+                       // used to load the page.
+                       dataUrl = path.convertUrlToDataUrl( absUrl );
+
+               // Make sure we have a pageContainer to work with.
+               settings.pageContainer = settings.pageContainer || $.mobile.pageContainer;
+
+               // Check to see if the page already exists in the DOM.
+               page = settings.pageContainer.children( ":jqmData(url='" + dataUrl + "')" );
+
+               // If we failed to find the page, check to see if the url is a
+               // reference to an embedded page. If so, it may have been dynamically
+               // injected by a developer, in which case it would be lacking a data-url
+               // attribute and in need of enhancement.
+               if ( page.length === 0 && dataUrl && !path.isPath( dataUrl ) ) {
+                       page = settings.pageContainer.children( "#" + dataUrl )
+                               .attr( "data-" + $.mobile.ns + "url", dataUrl );
+               }
+
+               // If we failed to find a page in the DOM, check the URL to see if it
+               // refers to the first page in the application. If it isn't a reference
+               // to the first page and refers to non-existent embedded page, error out.
+               if ( page.length === 0 ) {
+                       if ( $.mobile.firstPage && path.isFirstPageUrl( fileUrl ) ) {
+                               // Check to make sure our cached-first-page is actually
+                               // in the DOM. Some user deployed apps are pruning the first
+                               // page from the DOM for various reasons, we check for this
+                               // case here because we don't want a first-page with an id
+                               // falling through to the non-existent embedded page error
+                               // case. If the first-page is not in the DOM, then we let
+                               // things fall through to the ajax loading code below so
+                               // that it gets reloaded.
+                               if ( $.mobile.firstPage.parent().length ) {
+                                       page = $( $.mobile.firstPage );
+                               }
+                       } else if ( path.isEmbeddedPage( fileUrl )  ) {
+                               deferred.reject( absUrl, options );
+                               return deferred.promise();
+                       }
+               }
+
+               // Reset base to the default document base.
+               if ( base ) {
+                       base.reset();
+               }
+
+               // If the page we are interested in is already in the DOM,
+               // and the caller did not indicate that we should force a
+               // reload of the file, we are done. Otherwise, track the
+               // existing page as a duplicated.
+               if ( page.length ) {
+                       if ( !settings.reloadPage ) {
+                               enhancePage( page, settings.role );
+                               deferred.resolve( absUrl, options, page );
+                               return deferred.promise();
+                       }
+                       dupCachedPage = page;
+               }
+
+               var mpc = settings.pageContainer,
+                       pblEvent = new $.Event( "pagebeforeload" ),
+                       triggerData = { url: url, absUrl: absUrl, dataUrl: dataUrl, deferred: deferred, options: settings };
+
+               // Let listeners know we're about to load a page.
+               mpc.trigger( pblEvent, triggerData );
+
+               // If the default behavior is prevented, stop here!
+               if( pblEvent.isDefaultPrevented() ){
+                       return deferred.promise();
+               }
+
+               if ( settings.showLoadMsg ) {
+
+                       // This configurable timeout allows cached pages a brief delay to load without showing a message
+                       var loadMsgDelay = setTimeout(function(){
+                                       $.mobile.showPageLoadingMsg();
+                               }, settings.loadMsgDelay ),
+
+                               // Shared logic for clearing timeout and removing message.
+                               hideMsg = function(){
+
+                                       // Stop message show timer
+                                       clearTimeout( loadMsgDelay );
+
+                                       // Hide loading message
+                                       $.mobile.hidePageLoadingMsg();
+                               };
+               }
+
+               if ( !( $.mobile.allowCrossDomainPages || path.isSameDomain( documentUrl, absUrl ) ) ) {
+                       deferred.reject( absUrl, options );
+               } else {
+                       // Load the new page.
+                       $.ajax({
+                               url: fileUrl,
+                               type: settings.type,
+                               data: settings.data,
+                               dataType: "html",
+                               success: function( html, textStatus, xhr ) {
+                                       //pre-parse html to check for a data-url,
+                                       //use it as the new fileUrl, base path, etc
+                                       var all = $( "<div></div>" ),
+
+                                               //page title regexp
+                                               newPageTitle = html.match( /<title[^>]*>([^<]*)/ ) && RegExp.$1,
+
+                                               // TODO handle dialogs again
+                                               pageElemRegex = new RegExp( "(<[^>]+\\bdata-" + $.mobile.ns + "role=[\"']?page[\"']?[^>]*>)" ),
+                                               dataUrlRegex = new RegExp( "\\bdata-" + $.mobile.ns + "url=[\"']?([^\"'>]*)[\"']?" );
+
+
+                                       // data-url must be provided for the base tag so resource requests can be directed to the
+                                       // correct url. loading into a temprorary element makes these requests immediately
+                                       if( pageElemRegex.test( html )
+                                                       && RegExp.$1
+                                                       && dataUrlRegex.test( RegExp.$1 )
+                                                       && RegExp.$1 ) {
+                                               url = fileUrl = path.getFilePath( RegExp.$1 );
+                                       }
+
+                                       if ( base ) {
+                                               base.set( fileUrl );
+                                       }
+
+                                       //workaround to allow scripts to execute when included in page divs
+                                       all.get( 0 ).innerHTML = html;
+                                       page = all.find( ":jqmData(role='page'), :jqmData(role='dialog')" ).first();
+
+                                       //if page elem couldn't be found, create one and insert the body element's contents
+                                       if( !page.length ){
+                                               page = $( "<div data-" + $.mobile.ns + "role='page'>" + html.split( /<\/?body[^>]*>/gmi )[1] + "</div>" );
+                                       }
+
+                                       if ( newPageTitle && !page.jqmData( "title" ) ) {
+                                               if ( ~newPageTitle.indexOf( "&" ) ) {
+                                                       newPageTitle = $( "<div>" + newPageTitle + "</div>" ).text();
+                                               }
+                                               page.jqmData( "title", newPageTitle );
+                                       }
+
+                                       //rewrite src and href attrs to use a base url
+                                       if( !$.support.dynamicBaseTag ) {
+                                               var newPath = path.get( fileUrl );
+                                               page.find( "[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]" ).each(function() {
+                                                       var thisAttr = $( this ).is( '[href]' ) ? 'href' :
+                                                                       $(this).is('[src]') ? 'src' : 'action',
+                                                               thisUrl = $( this ).attr( thisAttr );
+
+                                                       // XXX_jblas: We need to fix this so that it removes the document
+                                                       //            base URL, and then prepends with the new page URL.
+                                                       //if full path exists and is same, chop it - helps IE out
+                                                       thisUrl = thisUrl.replace( location.protocol + '//' + location.host + location.pathname, '' );
+
+                                                       if( !/^(\w+:|#|\/)/.test( thisUrl ) ) {
+                                                               $( this ).attr( thisAttr, newPath + thisUrl );
+                                                       }
+                                               });
+                                       }
+
+                                       //append to page and enhance
+                                       // TODO taging a page with external to make sure that embedded pages aren't removed
+                                       //      by the various page handling code is bad. Having page handling code in many
+                                       //      places is bad. Solutions post 1.0
+                                       page
+                                               .attr( "data-" + $.mobile.ns + "url", path.convertUrlToDataUrl( fileUrl ) )
+                                               .attr( "data-" + $.mobile.ns + "external-page", true )
+                                               .appendTo( settings.pageContainer );
+
+                                       // wait for page creation to leverage options defined on widget
+                                       page.one( 'pagecreate', $.mobile._bindPageRemove );
+
+                                       enhancePage( page, settings.role );
+
+                                       // Enhancing the page may result in new dialogs/sub pages being inserted
+                                       // into the DOM. If the original absUrl refers to a sub-page, that is the
+                                       // real page we are interested in.
+                                       if ( absUrl.indexOf( "&" + $.mobile.subPageUrlKey ) > -1 ) {
+                                               page = settings.pageContainer.children( ":jqmData(url='" + dataUrl + "')" );
+                                       }
+
+                                       //bind pageHide to removePage after it's hidden, if the page options specify to do so
+
+                                       // Remove loading message.
+                                       if ( settings.showLoadMsg ) {
+                                               hideMsg();
+                                       }
+
+                                       // Add the page reference and xhr to our triggerData.
+                                       triggerData.xhr = xhr;
+                                       triggerData.textStatus = textStatus;
+                                       triggerData.page = page;
+
+                                       // Let listeners know the page loaded successfully.
+                                       settings.pageContainer.trigger( "pageload", triggerData );
+
+                                       deferred.resolve( absUrl, options, page, dupCachedPage );
+                               },
+                               error: function( xhr, textStatus, errorThrown ) {
+                                       //set base back to current path
+                                       if( base ) {
+                                               base.set( path.get() );
+                                       }
+
+                                       // Add error info to our triggerData.
+                                       triggerData.xhr = xhr;
+                                       triggerData.textStatus = textStatus;
+                                       triggerData.errorThrown = errorThrown;
+
+                                       var plfEvent = new $.Event( "pageloadfailed" );
+
+                                       // Let listeners know the page load failed.
+                                       settings.pageContainer.trigger( plfEvent, triggerData );
+
+                                       // If the default behavior is prevented, stop here!
+                                       // Note that it is the responsibility of the listener/handler
+                                       // that called preventDefault(), to resolve/reject the
+                                       // deferred object within the triggerData.
+                                       if( plfEvent.isDefaultPrevented() ){
+                                               return;
+                                       }
+
+                                       // Remove loading message.
+                                       if ( settings.showLoadMsg ) {
+
+                                               // Remove loading message.
+                                               hideMsg();
+
+                                               // show error message
+                                               $.mobile.showPageLoadingMsg( $.mobile.pageLoadErrorMessageTheme, $.mobile.pageLoadErrorMessage, true );
+
+                                               // hide after delay
+                                               setTimeout( $.mobile.hidePageLoadingMsg, 1500 );
+                                       }
+
+                                       deferred.reject( absUrl, options );
+                               }
+                       });
+               }
+
+               return deferred.promise();
+       };
+
+       $.mobile.loadPage.defaults = {
+               type: "get",
+               data: undefined,
+               reloadPage: false,
+               role: undefined, // By default we rely on the role defined by the @data-role attribute.
+               showLoadMsg: false,
+               pageContainer: undefined,
+               loadMsgDelay: 50 // This delay allows loads that pull from browser cache to occur without showing the loading message.
+       };
+
+       // Show a specific page in the page container.
+       $.mobile.changePage = function( toPage, options ) {
+               // If we are in the midst of a transition, queue the current request.
+               // We'll call changePage() once we're done with the current transition to
+               // service the request.
+               if( isPageTransitioning ) {
+                       pageTransitionQueue.unshift( arguments );
+                       return;
+               }
+
+               var settings = $.extend( {}, $.mobile.changePage.defaults, options );
+
+               // Make sure we have a pageContainer to work with.
+               settings.pageContainer = settings.pageContainer || $.mobile.pageContainer;
+
+               // Make sure we have a fromPage.
+               settings.fromPage = settings.fromPage || $.mobile.activePage;
+
+               var mpc = settings.pageContainer,
+                       pbcEvent = new $.Event( "pagebeforechange" ),
+                       triggerData = { toPage: toPage, options: settings };
+
+               // Let listeners know we're about to change the current page.
+               mpc.trigger( pbcEvent, triggerData );
+
+               // If the default behavior is prevented, stop here!
+               if( pbcEvent.isDefaultPrevented() ){
+                       return;
+               }
+
+               // We allow "pagebeforechange" observers to modify the toPage in the trigger
+               // data to allow for redirects. Make sure our toPage is updated.
+
+               toPage = triggerData.toPage;
+
+               // Set the isPageTransitioning flag to prevent any requests from
+               // entering this method while we are in the midst of loading a page
+               // or transitioning.
+
+               isPageTransitioning = true;
+
+               // If the caller passed us a url, call loadPage()
+               // to make sure it is loaded into the DOM. We'll listen
+               // to the promise object it returns so we know when
+               // it is done loading or if an error ocurred.
+               if ( typeof toPage == "string" ) {
+                       $.mobile.loadPage( toPage, settings )
+                               .done(function( url, options, newPage, dupCachedPage ) {
+                                       isPageTransitioning = false;
+                                       options.duplicateCachedPage = dupCachedPage;
+                                       $.mobile.changePage( newPage, options );
+                               })
+                               .fail(function( url, options ) {
+                                       isPageTransitioning = false;
+
+                                       //clear out the active button state
+                                       removeActiveLinkClass( true );
+
+                                       //release transition lock so navigation is free again
+                                       releasePageTransitionLock();
+                                       settings.pageContainer.trigger( "pagechangefailed", triggerData );
+                               });
+                       return;
+               }
+
+               // If we are going to the first-page of the application, we need to make
+               // sure settings.dataUrl is set to the application document url. This allows
+               // us to avoid generating a document url with an id hash in the case where the
+               // first-page of the document has an id attribute specified.
+               if ( toPage[ 0 ] === $.mobile.firstPage[ 0 ] && !settings.dataUrl ) {
+                       settings.dataUrl = documentUrl.hrefNoHash;
+               }
+
+               // The caller passed us a real page DOM element. Update our
+               // internal state and then trigger a transition to the page.
+               var fromPage = settings.fromPage,
+                       url = ( settings.dataUrl && path.convertUrlToDataUrl( settings.dataUrl ) ) || toPage.jqmData( "url" ),
+                       // The pageUrl var is usually the same as url, except when url is obscured as a dialog url. pageUrl always contains the file path
+                       pageUrl = url,
+                       fileUrl = path.getFilePath( url ),
+                       active = urlHistory.getActive(),
+                       activeIsInitialPage = urlHistory.activeIndex === 0,
+                       historyDir = 0,
+                       pageTitle = document.title,
+                       isDialog = settings.role === "dialog" || toPage.jqmData( "role" ) === "dialog";
+
+               // By default, we prevent changePage requests when the fromPage and toPage
+               // are the same element, but folks that generate content manually/dynamically
+               // and reuse pages want to be able to transition to the same page. To allow
+               // this, they will need to change the default value of allowSamePageTransition
+               // to true, *OR*, pass it in as an option when they manually call changePage().
+               // It should be noted that our default transition animations assume that the
+               // formPage and toPage are different elements, so they may behave unexpectedly.
+               // It is up to the developer that turns on the allowSamePageTransitiona option
+               // to either turn off transition animations, or make sure that an appropriate
+               // animation transition is used.
+               if( fromPage && fromPage[0] === toPage[0] && !settings.allowSamePageTransition ) {
+                       isPageTransitioning = false;
+                       mpc.trigger( "pagechange", triggerData );
+                       return;
+               }
+
+               // We need to make sure the page we are given has already been enhanced.
+               enhancePage( toPage, settings.role );
+
+               // If the changePage request was sent from a hashChange event, check to see if the
+               // page is already within the urlHistory stack. If so, we'll assume the user hit
+               // the forward/back button and will try to match the transition accordingly.
+               if( settings.fromHashChange ) {
+                       urlHistory.directHashChange({
+                               currentUrl:     url,
+                               isBack:         function() { historyDir = -1; },
+                               isForward:      function() { historyDir = 1; }
+                       });
+               }
+
+               // Kill the keyboard.
+               // XXX_jblas: We need to stop crawling the entire document to kill focus. Instead,
+               //            we should be tracking focus with a delegate() handler so we already have
+               //            the element in hand at this point.
+               // Wrap this in a try/catch block since IE9 throw "Unspecified error" if document.activeElement
+               // is undefined when we are in an IFrame.
+               try {
+                       if(document.activeElement && document.activeElement.nodeName.toLowerCase() != 'body') {
+                               $(document.activeElement).blur();
+                       } else {
+                               $( "input:focus, textarea:focus, select:focus" ).blur();
+                       }
+               } catch(e) {}
+
+               // If we're displaying the page as a dialog, we don't want the url
+               // for the dialog content to be used in the hash. Instead, we want
+               // to append the dialogHashKey to the url of the current page.
+               if ( isDialog && active ) {
+                       // on the initial page load active.url is undefined and in that case should
+                       // be an empty string. Moving the undefined -> empty string back into
+                       // urlHistory.addNew seemed imprudent given undefined better represents
+                       // the url state
+                       url = ( active.url || "" ) + dialogHashKey;
+               }
+
+               // Set the location hash.
+               if( settings.changeHash !== false && url ) {
+                       //disable hash listening temporarily
+                       urlHistory.ignoreNextHashChange = true;
+                       //update hash and history
+                       path.set( url );
+               }
+
+               // if title element wasn't found, try the page div data attr too
+               // If this is a deep-link or a reload ( active === undefined ) then just use pageTitle
+               var newPageTitle = ( !active )? pageTitle : toPage.jqmData( "title" ) || toPage.children(":jqmData(role='header')").find(".ui-title" ).getEncodedText();
+               if( !!newPageTitle && pageTitle == document.title ) {
+                       pageTitle = newPageTitle;
+               }
+               if ( !toPage.jqmData( "title" ) ) {
+                       toPage.jqmData( "title", pageTitle );
+               }
+
+               // Make sure we have a transition defined.
+               settings.transition = settings.transition
+                       || ( ( historyDir && !activeIsInitialPage ) ? active.transition : undefined )
+                       || ( isDialog ? $.mobile.defaultDialogTransition : $.mobile.defaultPageTransition );
+
+               //add page to history stack if it's not back or forward
+               if( !historyDir ) {
+                       urlHistory.addNew( url, settings.transition, pageTitle, pageUrl, settings.role );
+               }
+
+               //set page title
+               document.title = urlHistory.getActive().title;
+
+               //set "toPage" as activePage
+               $.mobile.activePage = toPage;
+
+               // If we're navigating back in the URL history, set reverse accordingly.
+               settings.reverse = settings.reverse || historyDir < 0;
+
+               transitionPages( toPage, fromPage, settings.transition, settings.reverse )
+                       .done(function( name, reverse, $to, $from, alreadyFocused ) {
+                               removeActiveLinkClass();
+
+                               //if there's a duplicateCachedPage, remove it from the DOM now that it's hidden
+                               if ( settings.duplicateCachedPage ) {
+                                       settings.duplicateCachedPage.remove();
+                               }
+
+                               // Send focus to the newly shown page. Moved from promise .done binding in transitionPages
+                               // itself to avoid ie bug that reports offsetWidth as > 0 (core check for visibility)
+                               // despite visibility: hidden addresses issue #2965
+                               // https://github.com/jquery/jquery-mobile/issues/2965
+                               if( !alreadyFocused ){
+                                       $.mobile.focusPage( toPage );
+                               }
+
+                               releasePageTransitionLock();
+
+                               // Let listeners know we're all done changing the current page.
+                               mpc.trigger( "pagechange", triggerData );
+                       });
+       };
+
+       $.mobile.changePage.defaults = {
+               transition: undefined,
+               reverse: false,
+               changeHash: true,
+               fromHashChange: false,
+               role: undefined, // By default we rely on the role defined by the @data-role attribute.
+               duplicateCachedPage: undefined,
+               pageContainer: undefined,
+               showLoadMsg: true, //loading message shows by default when pages are being fetched during changePage
+               dataUrl: undefined,
+               fromPage: undefined,
+               allowSamePageTransition: false
+       };
+
+/* Event Bindings - hashchange, submit, and click */
+       function findClosestLink( ele )
+       {
+               while ( ele ) {
+                       // Look for the closest element with a nodeName of "a".
+                       // Note that we are checking if we have a valid nodeName
+                       // before attempting to access it. This is because the
+                       // node we get called with could have originated from within
+                       // an embedded SVG document where some symbol instance elements
+                       // don't have nodeName defined on them, or strings are of type
+                       // SVGAnimatedString.
+                       if ( ( typeof ele.nodeName === "string" ) && ele.nodeName.toLowerCase() == "a" ) {
+                               break;
+                       }
+                       ele = ele.parentNode;
+               }
+               return ele;
+       }
+
+       // The base URL for any given element depends on the page it resides in.
+       function getClosestBaseUrl( ele )
+       {
+               // Find the closest page and extract out its url.
+               var url = $( ele ).closest( ".ui-page" ).jqmData( "url" ),
+                       base = documentBase.hrefNoHash;
+
+               if ( !url || !path.isPath( url ) ) {
+                       url = base;
+               }
+
+               return path.makeUrlAbsolute( url, base);
+       }
+
+
+       //The following event bindings should be bound after mobileinit has been triggered
+       //the following function is called in the init file
+       $.mobile._registerInternalEvents = function(){
+
+               //bind to form submit events, handle with Ajax
+               $( document ).delegate( "form", "submit", function( event ) {
+                       var $this = $( this );
+
+                       if( !$.mobile.ajaxEnabled ||
+                                       // test that the form is, itself, ajax false
+                                       $this.is(":jqmData(ajax='false')") ||
+                                       // test that $.mobile.ignoreContentEnabled is set and
+                                       // the form or one of it's parents is ajax=false
+                                       !$this.jqmHijackable().length ) {
+                               return;
+                       }
+
+                       var type = $this.attr( "method" ),
+                               target = $this.attr( "target" ),
+                               url = $this.attr( "action" );
+
+                       // If no action is specified, browsers default to using the
+                       // URL of the document containing the form. Since we dynamically
+                       // pull in pages from external documents, the form should submit
+                       // to the URL for the source document of the page containing
+                       // the form.
+                       if ( !url ) {
+                               // Get the @data-url for the page containing the form.
+                               url = getClosestBaseUrl( $this );
+                               if ( url === documentBase.hrefNoHash ) {
+                                       // The url we got back matches the document base,
+                                       // which means the page must be an internal/embedded page,
+                                       // so default to using the actual document url as a browser
+                                       // would.
+                                       url = documentUrl.hrefNoSearch;
+                               }
+                       }
+
+                       url = path.makeUrlAbsolute(  url, getClosestBaseUrl($this) );
+
+                       //external submits use regular HTTP
+                       if( path.isExternal( url ) || target ) {
+                               return;
+                       }
+
+                       $.mobile.changePage(
+                               url,
+                               {
+                                       type:           type && type.length && type.toLowerCase() || "get",
+                                       data:           $this.serialize(),
+                                       transition:     $this.jqmData( "transition" ),
+                                       direction:      $this.jqmData( "direction" ),
+                                       reloadPage:     true
+                               }
+                       );
+                       event.preventDefault();
+               });
+
+               //add active state on vclick
+               $( document ).bind( "vclick", function( event ) {
+                       // if this isn't a left click we don't care. Its important to note
+                       // that when the virtual event is generated it will create the which attr
+                       if ( event.which > 1 || !$.mobile.linkBindingEnabled ) {
+                               return;
+                       }
+
+                       var link = findClosestLink( event.target );
+
+                       // split from the previous return logic to avoid find closest where possible
+                       // TODO teach $.mobile.hijackable to operate on raw dom elements so the link wrapping
+                       // can be avoided
+                       if ( !$(link).jqmHijackable().length ) {
+                               return;
+                       }
+
+                       if ( link ) {
+                               if ( path.parseUrl( link.getAttribute( "href" ) || "#" ).hash !== "#" ) {
+                                       removeActiveLinkClass( true );
+                                       $activeClickedLink = $( link ).closest( ".ui-btn" ).not( ".ui-disabled" );
+                                       $activeClickedLink.addClass( $.mobile.activeBtnClass );
+                                       $( "." + $.mobile.activePageClass + " .ui-btn" ).not( link ).blur();
+
+                                       // By caching the href value to data and switching the href to a #, we can avoid address bar showing in iOS. The click handler resets the href during its initial steps if this data is present
+                                       $( link )
+                                               .jqmData( "href", $( link  ).attr( "href" )  )
+                                               .attr( "href", "#" );
+                               }
+                       }
+               });
+
+               // click routing - direct to HTTP or Ajax, accordingly
+               $( document ).bind( "click", function( event ) {
+                       if( !$.mobile.linkBindingEnabled ){
+                               return;
+                       }
+
+                       var link = findClosestLink( event.target ), $link = $( link ), httpCleanup;
+
+                       // If there is no link associated with the click or its not a left
+                       // click we want to ignore the click
+                       // TODO teach $.mobile.hijackable to operate on raw dom elements so the link wrapping
+                       // can be avoided
+                       if ( !link || event.which > 1 || !$link.jqmHijackable().length ) {
+                               return;
+                       }
+
+                       //remove active link class if external (then it won't be there if you come back)
+                       httpCleanup = function(){
+                               window.setTimeout( function() { removeActiveLinkClass( true ); }, 200 );
+                       };
+
+                       // If there's data cached for the real href value, set the link's href back to it again. This pairs with an address bar workaround from the vclick handler
+                       if( $link.jqmData( "href" ) ){
+                               $link.attr( "href", $link.jqmData( "href" ) );
+                       }
+
+                       //if there's a data-rel=back attr, go back in history
+                       if( $link.is( ":jqmData(rel='back')" ) ) {
+                               window.history.back();
+                               return false;
+                       }
+
+                       var baseUrl = getClosestBaseUrl( $link ),
+
+                               //get href, if defined, otherwise default to empty hash
+                               href = path.makeUrlAbsolute( $link.attr( "href" ) || "#", baseUrl );
+
+                       //if ajax is disabled, exit early
+                       if( !$.mobile.ajaxEnabled && !path.isEmbeddedPage( href ) ){
+                               httpCleanup();
+                               //use default click handling
+                               return;
+                       }
+
+                       // XXX_jblas: Ideally links to application pages should be specified as
+                       //            an url to the application document with a hash that is either
+                       //            the site relative path or id to the page. But some of the
+                       //            internal code that dynamically generates sub-pages for nested
+                       //            lists and select dialogs, just write a hash in the link they
+                       //            create. This means the actual URL path is based on whatever
+                       //            the current value of the base tag is at the time this code
+                       //            is called. For now we are just assuming that any url with a
+                       //            hash in it is an application page reference.
+                       if ( href.search( "#" ) != -1 ) {
+                               href = href.replace( /[^#]*#/, "" );
+                               if ( !href ) {
+                                       //link was an empty hash meant purely
+                                       //for interaction, so we ignore it.
+                                       event.preventDefault();
+                                       return;
+                               } else if ( path.isPath( href ) ) {
+                                       //we have apath so make it the href we want to load.
+                                       href = path.makeUrlAbsolute( href, baseUrl );
+                               } else {
+                                       //we have a simple id so use the documentUrl as its base.
+                                       href = path.makeUrlAbsolute( "#" + href, documentUrl.hrefNoHash );
+                               }
+                       }
+
+                               // Should we handle this link, or let the browser deal with it?
+                       var useDefaultUrlHandling = $link.is( "[rel='external']" ) || $link.is( ":jqmData(ajax='false')" ) || $link.is( "[target]" ),
+
+                               // Some embedded browsers, like the web view in Phone Gap, allow cross-domain XHR
+                               // requests if the document doing the request was loaded via the file:// protocol.
+                               // This is usually to allow the application to "phone home" and fetch app specific
+                               // data. We normally let the browser handle external/cross-domain urls, but if the
+                               // allowCrossDomainPages option is true, we will allow cross-domain http/https
+                               // requests to go through our page loading logic.
+                               isCrossDomainPageLoad = ( $.mobile.allowCrossDomainPages && documentUrl.protocol === "file:" && href.search( /^https?:/ ) != -1 ),
+
+                               //check for protocol or rel and its not an embedded page
+                               //TODO overlap in logic from isExternal, rel=external check should be
+                               //     moved into more comprehensive isExternalLink
+                               isExternal = useDefaultUrlHandling || ( path.isExternal( href ) && !isCrossDomainPageLoad );
+
+                       if( isExternal ) {
+                               httpCleanup();
+                               //use default click handling
+                               return;
+                       }
+
+                       //use ajax
+                       var transition = $link.jqmData( "transition" ),
+                               direction = $link.jqmData( "direction" ),
+                               reverse = ( direction && direction === "reverse" ) ||
+                                                       // deprecated - remove by 1.0
+                                                       $link.jqmData( "back" ),
+
+                               //this may need to be more specific as we use data-rel more
+                               role = $link.attr( "data-" + $.mobile.ns + "rel" ) || undefined;
+
+                       $.mobile.changePage( href, { transition: transition, reverse: reverse, role: role } );
+                       event.preventDefault();
+               });
+
+               //prefetch pages when anchors with data-prefetch are encountered
+               $( document ).delegate( ".ui-page", "pageshow.prefetch", function() {
+                       var urls = [];
+                       $( this ).find( "a:jqmData(prefetch)" ).each(function(){
+                               var $link = $(this),
+                                       url = $link.attr( "href" );
+
+                               if ( url && $.inArray( url, urls ) === -1 ) {
+                                       urls.push( url );
+
+                                       $.mobile.loadPage( url, {role: $link.attr("data-" + $.mobile.ns + "rel")} );
+                               }
+                       });
+               });
+
+               $.mobile._handleHashChange = function( hash ) {
+                       //find first page via hash
+                       var to = path.stripHash( hash ),
+                               //transition is false if it's the first page, undefined otherwise (and may be overridden by default)
+                               transition = $.mobile.urlHistory.stack.length === 0 ? "none" : undefined,
+
+                               // default options for the changPage calls made after examining the current state
+                               // of the page and the hash
+                               changePageOptions = {
+                                       transition: transition,
+                                       changeHash: false,
+                                       fromHashChange: true
+                               };
+
+                       //if listening is disabled (either globally or temporarily), or it's a dialog hash
+                       if( !$.mobile.hashListeningEnabled || urlHistory.ignoreNextHashChange ) {
+                               urlHistory.ignoreNextHashChange = false;
+                               return;
+                       }
+
+                       // special case for dialogs
+                       if( urlHistory.stack.length > 1 && to.indexOf( dialogHashKey ) > -1 ) {
+
+                               // If current active page is not a dialog skip the dialog and continue
+                               // in the same direction
+                               if(!$.mobile.activePage.is( ".ui-dialog" )) {
+                                       //determine if we're heading forward or backward and continue accordingly past
+                                       //the current dialog
+                                       urlHistory.directHashChange({
+                                               currentUrl: to,
+                                               isBack: function() { window.history.back(); },
+                                               isForward: function() { window.history.forward(); }
+                                       });
+
+                                       // prevent changePage()
+                                       return;
+                               } else {
+                                       // if the current active page is a dialog and we're navigating
+                                       // to a dialog use the dialog objected saved in the stack
+                                       urlHistory.directHashChange({
+                                               currentUrl: to,
+
+                                               // regardless of the direction of the history change
+                                               // do the following
+                                               either: function( isBack ) {
+                                                       var active = $.mobile.urlHistory.getActive();
+
+                                                       to = active.pageUrl;
+
+                                                       // make sure to set the role, transition and reversal
+                                                       // as most of this is lost by the domCache cleaning
+                                                       $.extend( changePageOptions, {
+                                                               role: active.role,
+                                                               transition:      active.transition,
+                                                               reverse: isBack
+                                                       });
+                                               }
+                                       });
+                               }
+                       }
+
+                       //if to is defined, load it
+                       if ( to ) {
+                               // At this point, 'to' can be one of 3 things, a cached page element from
+                               // a history stack entry, an id, or site-relative/absolute URL. If 'to' is
+                               // an id, we need to resolve it against the documentBase, not the location.href,
+                               // since the hashchange could've been the result of a forward/backward navigation
+                               // that crosses from an external page/dialog to an internal page/dialog.
+                               to = ( typeof to === "string" && !path.isPath( to ) ) ? ( path.makeUrlAbsolute( '#' + to, documentBase ) ) : to;
+                               $.mobile.changePage( to, changePageOptions );
+                       }       else {
+                               //there's no hash, go to the first page in the dom
+                               $.mobile.changePage( $.mobile.firstPage, changePageOptions );
+                       }
+               };
+
+               //hashchange event handler
+               $window.bind( "hashchange", function( e, triggered ) {
+                       $.mobile._handleHashChange( location.hash );
+               });
+
+               //set page min-heights to be device specific
+               $( document ).bind( "pageshow", resetActivePageHeight );
+               $( window ).bind( "throttledresize", resetActivePageHeight );
+
+       };//_registerInternalEvents callback
+
+})( jQuery );
+
+( function( $, window ) {
+       // For now, let's Monkeypatch this onto the end of $.mobile._registerInternalEvents
+       // Scope self to pushStateHandler so we can reference it sanely within the
+       // methods handed off as event handlers
+       var     pushStateHandler = {},
+               self = pushStateHandler,
+               $win = $( window ),
+               url = $.mobile.path.parseUrl( location.href );
+
+       $.extend( pushStateHandler, {
+               // TODO move to a path helper, this is rather common functionality
+               initialFilePath: (function() {
+                       return url.pathname + url.search;
+               })(),
+
+               initialHref: url.hrefNoHash,
+
+               state: function() {
+                       return {
+                               hash: location.hash || "#" + self.initialFilePath,
+                               title: document.title,
+
+                               // persist across refresh
+                               initialHref: self.initialHref
+                       };
+               },
+
+               resetUIKeys: function( url ) {
+                       var dialog = $.mobile.dialogHashKey,
+                               subkey = "&" + $.mobile.subPageUrlKey,
+                               dialogIndex = url.indexOf( dialog );
+
+                       if( dialogIndex > -1 ) {
+                               url = url.slice( 0, dialogIndex ) + "#" + url.slice( dialogIndex );
+                       } else if( url.indexOf( subkey ) > -1 ) {
+                               url = url.split( subkey ).join( "#" + subkey );
+                       }
+
+                       return url;
+               },
+
+               hashValueAfterReset: function( url ) {
+                       var resetUrl = self.resetUIKeys( url );
+                       return $.mobile.path.parseUrl( resetUrl ).hash;
+               },
+
+               // TODO sort out a single barrier to hashchange functionality
+               nextHashChangePrevented: function( value ) {
+                       $.mobile.urlHistory.ignoreNextHashChange = value;
+                       self.onHashChangeDisabled = value;
+               },
+
+               // on hash change we want to clean up the url
+               // NOTE this takes place *after* the vanilla navigation hash change
+               // handling has taken place and set the state of the DOM
+               onHashChange: function( e ) {
+                       // disable this hash change
+                       if( self.onHashChangeDisabled ){
+                               return;
+                       }
+
+                       var href, state,
+                               hash = location.hash,
+                               isPath = $.mobile.path.isPath( hash ),
+                               resolutionUrl = isPath ? location.href : $.mobile.getDocumentUrl();
+
+                       hash = isPath ? hash.replace( "#", "" ) : hash;
+
+
+                       // propulate the hash when its not available
+                       state = self.state();
+
+                       // make the hash abolute with the current href
+                       href = $.mobile.path.makeUrlAbsolute( hash, resolutionUrl );
+
+                       if ( isPath ) {
+                               href = self.resetUIKeys( href );
+                       }
+
+                       // replace the current url with the new href and store the state
+                       // Note that in some cases we might be replacing an url with the
+                       // same url. We do this anyways because we need to make sure that
+                       // all of our history entries have a state object associated with
+                       // them. This allows us to work around the case where window.history.back()
+                       // is called to transition from an external page to an embedded page.
+                       // In that particular case, a hashchange event is *NOT* generated by the browser.
+                       // Ensuring each history entry has a state object means that onPopState()
+                       // will always trigger our hashchange callback even when a hashchange event
+                       // is not fired.
+                       history.replaceState( state, document.title, href );
+               },
+
+               // on popstate (ie back or forward) we need to replace the hash that was there previously
+               // cleaned up by the additional hash handling
+               onPopState: function( e ) {
+                       var poppedState = e.originalEvent.state,
+                               timeout, fromHash, toHash, hashChanged;
+
+                       // if there's no state its not a popstate we care about, eg chrome's initial popstate
+                       if( poppedState ) {
+                               // the active url in the history stack will still be from the previous state
+                               // so we can use it to verify if a hashchange will be fired from the popstate
+                               fromHash = self.hashValueAfterReset( $.mobile.urlHistory.getActive().url );
+
+                               // the hash stored in the state popped off the stack will be our currenturl or
+                               // the url to which we wish to navigate
+                               toHash = self.hashValueAfterReset( poppedState.hash.replace("#", "") );
+
+                               // if the hashes of the urls are different we must assume that the browser
+                               // will fire a hashchange
+                               hashChanged = fromHash !== toHash;
+
+                               // unlock hash handling once the hashchange caused be the popstate has fired
+                               if( hashChanged ) {
+                                       $win.one( "hashchange.pushstate", function() {
+                                               self.nextHashChangePrevented( false );
+                                       });
+                               }
+
+                               // enable hash handling for the the _handleHashChange call
+                               self.nextHashChangePrevented( false );
+
+                               // change the page based on the hash
+                               $.mobile._handleHashChange( poppedState.hash );
+
+                               // only prevent another hash change handling if a hash change will be fired
+                               // by the browser
+                               if( hashChanged ) {
+                                       // disable hash handling until one of the above timers fires
+                                       self.nextHashChangePrevented( true );
+                               }
+                       }
+               },
+
+               init: function() {
+                       $win.bind( "hashchange", self.onHashChange );
+
+                       // Handle popstate events the occur through history changes
+                       $win.bind( "popstate", self.onPopState );
+
+                       // if there's no hash, we need to replacestate for returning to home
+                       if ( location.hash === "" ) {
+                               history.replaceState( self.state(), document.title, location.href );
+                       }
+               }
+       });
+
+       $( function() {
+               if( $.mobile.pushStateEnabled && $.support.pushState ){
+                       pushStateHandler.init();
+               }
+       });
+})( jQuery, this );
+
+/*
+* fallback transition for pop in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+$.mobile.transitionFallbacks.pop = "fade";
+
+})( jQuery, this );
+
+/*
+* fallback transition for slide in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+// Use the simultaneous transition handler for slide transitions
+$.mobile.transitionHandlers.slide = $.mobile.transitionHandlers.simultaneous;
+
+// Set the slide transition's fallback to "fade"
+$.mobile.transitionFallbacks.slide = "fade";
+
+})( jQuery, this );
+
+/*
+* fallback transition for slidedown in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+$.mobile.transitionFallbacks.slidedown = "fade";
+
+})( jQuery, this );
+
+/*
+* fallback transition for slideup in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+$.mobile.transitionFallbacks.slideup = "fade";
+
+})( jQuery, this );
+
+/*
+* fallback transition for flip in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+$.mobile.transitionFallbacks.flip = "fade";
+
+})( jQuery, this );
+
+/*
+* fallback transition for flow in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+$.mobile.transitionFallbacks.flow = "fade";
+
+})( jQuery, this );
+
+/*
+* fallback transition for turn in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+$.mobile.transitionFallbacks.turn = "fade";
+
+})( jQuery, this );
+
+(function( $, undefined ) {
+
+$.mobile.page.prototype.options.degradeInputs = {
+       color: false,
+       date: false,
+       datetime: false,
+       "datetime-local": false,
+       email: false,
+       month: false,
+       number: false,
+       range: "number",
+       search: "text",
+       tel: false,
+       time: false,
+       url: false,
+       week: false
+};
+
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ){
+
+       var page = $.mobile.closestPageData($(e.target)), options;
+
+       if( !page ) {
+               return;
+       }
+
+       options = page.options;
+
+       // degrade inputs to avoid poorly implemented native functionality
+       $( e.target ).find( "input" ).not( page.keepNativeSelector() ).each(function() {
+               var $this = $( this ),
+                       type = this.getAttribute( "type" ),
+                       optType = options.degradeInputs[ type ] || "text";
+
+               if ( options.degradeInputs[ type ] ) {
+                       var html = $( "<div>" ).html( $this.clone() ).html(),
+                               // In IE browsers, the type sometimes doesn't exist in the cloned markup, so we replace the closing tag instead
+                               hasType = html.indexOf( " type=" ) > -1,
+                               findstr = hasType ? /\s+type=["']?\w+['"]?/ : /\/?>/,
+                               repstr = " type=\"" + optType + "\" data-" + $.mobile.ns + "type=\"" + type + "\"" + ( hasType ? "" : ">" );
+
+                       $this.replaceWith( html.replace( findstr, repstr ) );
+               }
+       });
+
+});
+
+})( jQuery );
+
+(function( $, window, undefined ) {
+
+$.widget( "mobile.dialog", $.mobile.widget, {
+       options: {
+               closeBtnText    : "Close",
+               overlayTheme    : "a",
+               initSelector    : ":jqmData(role='dialog')"
+       },
+       _create: function() {
+               var self = this,
+                       $el = this.element,
+                       headerCloseButton = $( "<a href='#' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "iconpos='notext'>"+ this.options.closeBtnText + "</a>" ),
+                       dialogWrap = $("<div/>", {
+                                       "role" : "dialog",
+                                       "class" : "ui-dialog-contain ui-corner-all ui-overlay-shadow"
+                               });
+
+               $el.addClass( "ui-dialog ui-overlay-" + this.options.overlayTheme );
+               
+               // Class the markup for dialog styling
+               // Set aria role
+               $el
+                       .wrapInner( dialogWrap )
+                       .children()
+                               .find( ":jqmData(role='header')" )
+                                       .prepend( headerCloseButton )
+                               .end()
+                               .children( ':first-child')
+                                       .addClass( "ui-corner-top" )
+                               .end()
+                               .children( ":last-child" )
+                                       .addClass( "ui-corner-bottom" );
+
+               // this must be an anonymous function so that select menu dialogs can replace
+               // the close method. This is a change from previously just defining data-rel=back
+               // on the button and letting nav handle it
+               //
+               // Use click rather than vclick in order to prevent the possibility of unintentionally
+               // reopening the dialog if the dialog opening item was directly under the close button.
+               headerCloseButton.bind( "click", function() {
+                       self.close();
+               });
+
+               /* bind events
+                       - clicks and submits should use the closing transition that the dialog opened with
+                         unless a data-transition is specified on the link/form
+                       - if the click was on the close button, or the link has a data-rel="back" it'll go back in history naturally
+               */
+               $el.bind( "vclick submit", function( event ) {
+                       var $target = $( event.target ).closest( event.type === "vclick" ? "a" : "form" ),
+                               active;
+
+                       if ( $target.length && !$target.jqmData( "transition" ) ) {
+
+                               active = $.mobile.urlHistory.getActive() || {};
+
+                               $target.attr( "data-" + $.mobile.ns + "transition", ( active.transition || $.mobile.defaultDialogTransition ) )
+                                       .attr( "data-" + $.mobile.ns + "direction", "reverse" );
+                       }
+               })
+               .bind( "pagehide", function( e, ui ) {
+                       $( this ).find( "." + $.mobile.activeBtnClass ).removeClass( $.mobile.activeBtnClass );
+               })
+               // Override the theme set by the page plugin on pageshow
+               .bind( "pagebeforeshow", function(){
+                       if( self.options.overlayTheme ){
+                               self.element
+                                       .page( "removeContainerBackground" )
+                                       .page( "setContainerBackground", self.options.overlayTheme );
+                       }
+               });
+       },
+
+       // Close method goes back in history
+       close: function() {
+               window.history.back();
+       }
+});
+
+//auto self-init widgets
+$( document ).delegate( $.mobile.dialog.prototype.options.initSelector, "pagecreate", function(){
+       $.mobile.dialog.prototype.enhance( this );
+});
+
+})( jQuery, this );
+
+(function( $, undefined ) {
+
+$.fn.fieldcontain = function( options ) {
+       return this.addClass( "ui-field-contain ui-body ui-br" );
+};
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ){
+       $( ":jqmData(role='fieldcontain')", e.target ).jqmEnhanceable().fieldcontain();
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.fn.grid = function( options ) {
+       return this.each(function() {
+
+               var $this = $( this ),
+                       o = $.extend({
+                               grid: null
+                       },options),
+                       $kids = $this.children(),
+                       gridCols = {solo:1, a:2, b:3, c:4, d:5},
+                       grid = o.grid,
+                       iterator;
+
+                       if ( !grid ) {
+                               if ( $kids.length <= 5 ) {
+                                       for ( var letter in gridCols ) {
+                                               if ( gridCols[ letter ] === $kids.length ) {
+                                                       grid = letter;
+                                               }
+                                       }
+                               } else {
+                                       grid = "a";
+                               }
+                       }
+                       iterator = gridCols[grid];
+
+               $this.addClass( "ui-grid-" + grid );
+
+               $kids.filter( ":nth-child(" + iterator + "n+1)" ).addClass( "ui-block-a" );
+
+               if ( iterator > 1 ) {
+                       $kids.filter( ":nth-child(" + iterator + "n+2)" ).addClass( "ui-block-b" );
+               }
+               if ( iterator > 2 ) {
+                       $kids.filter( ":nth-child(3n+3)" ).addClass( "ui-block-c" );
+               }
+               if ( iterator > 3 ) {
+                       $kids.filter( ":nth-child(4n+4)" ).addClass( "ui-block-d" );
+               }
+               if ( iterator > 4 ) {
+                       $kids.filter( ":nth-child(5n+5)" ).addClass( "ui-block-e" );
+               }
+       });
+};
+})( jQuery );
+
+(function( $, undefined ) {
+
+$( document ).bind( "pagecreate create", function( e ){
+       $( ":jqmData(role='nojs')", e.target ).addClass( "ui-nojs" );
+       
+});
+
+})( jQuery );
+
+( function( $, undefined ) {
+
+$.fn.buttonMarkup = function( options ) {
+       var $workingSet = this;
+
+       // Enforce options to be of type string
+       options = ( options && ( $.type( options ) == "object" ) )? options : {};
+       for ( var i = 0; i < $workingSet.length; i++ ) {
+               var el = $workingSet.eq( i ),
+                       e = el[ 0 ],
+                       o = $.extend( {}, $.fn.buttonMarkup.defaults, {
+                               icon:       options.icon       !== undefined ? options.icon       : el.jqmData( "icon" ),
+                               iconpos:    options.iconpos    !== undefined ? options.iconpos    : el.jqmData( "iconpos" ),
+                               theme:      options.theme      !== undefined ? options.theme      : el.jqmData( "theme" ) || $.mobile.getInheritedTheme( el, "c" ),
+                               inline:     options.inline     !== undefined ? options.inline     : el.jqmData( "inline" ),
+                               shadow:     options.shadow     !== undefined ? options.shadow     : el.jqmData( "shadow" ),
+                               corners:    options.corners    !== undefined ? options.corners    : el.jqmData( "corners" ),
+                               iconshadow: options.iconshadow !== undefined ? options.iconshadow : el.jqmData( "iconshadow" ),
+                               mini:       options.mini       !== undefined ? options.mini       : el.jqmData( "mini" )
+                       }, options ),
+
+                       // Classes Defined
+                       innerClass = "ui-btn-inner",
+                       textClass = "ui-btn-text",
+                       buttonClass, iconClass,
+                       // Button inner markup
+                       buttonInner,
+                       buttonText,
+                       buttonIcon,
+                       buttonElements;
+
+               $.each(o, function(key, value) {
+                       e.setAttribute( "data-" + $.mobile.ns + key, value );
+                       el.jqmData(key, value);
+               });
+
+               // Check if this element is already enhanced
+               buttonElements = $.data(((e.tagName === "INPUT" || e.tagName === "BUTTON") ? e.parentNode : e), "buttonElements");
+
+               if (buttonElements) {
+                       e = buttonElements.outer;
+                       el = $(e);
+                       buttonInner = buttonElements.inner;
+                       buttonText = buttonElements.text;
+                       // We will recreate this icon below
+                       $(buttonElements.icon).remove();
+                       buttonElements.icon = null;
+               }
+               else {
+                       buttonInner = document.createElement( o.wrapperEls );
+                       buttonText = document.createElement( o.wrapperEls );
+               }
+               buttonIcon = o.icon ? document.createElement( "span" ) : null;
+
+               if ( attachEvents && !buttonElements) {
+                       attachEvents();
+               }
+               
+               // if not, try to find closest theme container  
+               if ( !o.theme ) {
+                       o.theme = $.mobile.getInheritedTheme( el, "c" );        
+               }               
+
+               buttonClass = "ui-btn ui-btn-up-" + o.theme;
+               buttonClass += o.inline ? " ui-btn-inline" : "";
+               buttonClass += o.shadow ? " ui-shadow" : "";
+               buttonClass += o.corners ? " ui-btn-corner-all" : "";
+
+               if ( o.mini !== undefined ) {
+                       // Used to control styling in headers/footers, where buttons default to `mini` style.
+                       buttonClass += o.mini ? " ui-mini" : " ui-fullsize";
+               }
+               
+               if ( o.inline !== undefined ) {                 
+                       // Used to control styling in headers/footers, where buttons default to `mini` style.
+                       buttonClass += o.inline === false ? " ui-btn-block" : " ui-btn-inline";
+               }
+               
+               
+               if ( o.icon ) {
+                       o.icon = "ui-icon-" + o.icon;
+                       o.iconpos = o.iconpos || "left";
+
+                       iconClass = "ui-icon " + o.icon;
+
+                       if ( o.iconshadow ) {
+                               iconClass += " ui-icon-shadow";
+                       }
+               }
+
+               if ( o.iconpos ) {
+                       buttonClass += " ui-btn-icon-" + o.iconpos;
+
+                       if ( o.iconpos == "notext" && !el.attr( "title" ) ) {
+                               el.attr( "title", el.getEncodedText() );
+                       }
+               }
+    
+               innerClass += o.corners ? " ui-btn-corner-all" : "";
+
+               if ( o.iconpos && o.iconpos === "notext" && !el.attr( "title" ) ) {
+                       el.attr( "title", el.getEncodedText() );
+               }
+
+               if ( buttonElements ) {
+                       el.removeClass( buttonElements.bcls || "" );
+               }
+               el.removeClass( "ui-link" ).addClass( buttonClass );
+
+               buttonInner.className = innerClass;
+
+               buttonText.className = textClass;
+               if ( !buttonElements ) {
+                       buttonInner.appendChild( buttonText );
+               }
+               if ( buttonIcon ) {
+                       buttonIcon.className = iconClass;
+                       if ( !(buttonElements && buttonElements.icon) ) {
+                               buttonIcon.appendChild( document.createTextNode("\u00a0") );
+                               buttonInner.appendChild( buttonIcon );
+                       }
+               }
+
+               while ( e.firstChild && !buttonElements) {
+                       buttonText.appendChild( e.firstChild );
+               }
+
+               if ( !buttonElements ) {
+                       e.appendChild( buttonInner );
+               }
+
+               // Assign a structure containing the elements of this button to the elements of this button. This
+               // will allow us to recognize this as an already-enhanced button in future calls to buttonMarkup().
+               buttonElements = {
+                       bcls  : buttonClass,
+                       outer : e,
+                       inner : buttonInner,
+                       text  : buttonText,
+                       icon  : buttonIcon
+               };
+
+               $.data(e,           'buttonElements', buttonElements);
+               $.data(buttonInner, 'buttonElements', buttonElements);
+               $.data(buttonText,  'buttonElements', buttonElements);
+               if (buttonIcon) {
+                       $.data(buttonIcon, 'buttonElements', buttonElements);
+               }
+       }
+
+       return this;
+};
+
+$.fn.buttonMarkup.defaults = {
+       corners: true,
+       shadow: true,
+       iconshadow: true,
+       wrapperEls: "span"
+};
+
+function closestEnabledButton( element ) {
+    var cname;
+
+    while ( element ) {
+               // Note that we check for typeof className below because the element we
+               // handed could be in an SVG DOM where className on SVG elements is defined to
+               // be of a different type (SVGAnimatedString). We only operate on HTML DOM
+               // elements, so we look for plain "string".
+        cname = ( typeof element.className === 'string' ) && (element.className + ' ');
+        if ( cname && cname.indexOf("ui-btn ") > -1 && cname.indexOf("ui-disabled ") < 0 ) {
+            break;
+        }
+
+        element = element.parentNode;
+    }
+
+    return element;
+}
+
+var attachEvents = function() {
+       var hoverDelay = $.mobile.buttonMarkup.hoverDelay, hov, foc;
+
+       $( document ).bind( {
+               "vmousedown vmousecancel vmouseup vmouseover vmouseout focus blur scrollstart": function( event ) {
+                       var theme,
+                               $btn = $( closestEnabledButton( event.target ) ),
+                               evt = event.type;
+               
+                       if ( $btn.length ) {
+                               theme = $btn.attr( "data-" + $.mobile.ns + "theme" );
+               
+                               if ( evt === "vmousedown" ) {
+                                       if ( $.support.touch ) {
+                                               hov = setTimeout(function() {
+                                                       $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-down-" + theme );
+                                               }, hoverDelay );
+                                       } else {
+                                               $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-down-" + theme );
+                                       }
+                               } else if ( evt === "vmousecancel" || evt === "vmouseup" ) {
+                                       $btn.removeClass( "ui-btn-down-" + theme ).addClass( "ui-btn-up-" + theme );
+                               } else if ( evt === "vmouseover" || evt === "focus" ) {
+                                       if ( $.support.touch ) {
+                                               foc = setTimeout(function() {
+                                                       $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-hover-" + theme );
+                                               }, hoverDelay );
+                                       } else {
+                                               $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-hover-" + theme );
+                                       }
+                               } else if ( evt === "vmouseout" || evt === "blur" || evt === "scrollstart" ) {
+                                       $btn.removeClass( "ui-btn-hover-" + theme  + " ui-btn-down-" + theme ).addClass( "ui-btn-up-" + theme );
+                                       if ( hov ) {
+                                               clearTimeout( hov );
+                                       }
+                                       if ( foc ) {
+                                               clearTimeout( foc );
+                                       }
+                               }
+                       }
+               },
+               "focusin focus": function( event ){
+                       $( closestEnabledButton( event.target ) ).addClass( $.mobile.focusClass );
+               },
+               "focusout blur": function( event ){
+                       $( closestEnabledButton( event.target ) ).removeClass( $.mobile.focusClass );
+               }
+       });
+
+       attachEvents = null;
+};
+
+//links in bars, or those with  data-role become buttons
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ){
+
+       $( ":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmData(role='controlgroup') > a", e.target )
+               .not( ".ui-btn, :jqmData(role='none'), :jqmData(role='nojs')" )
+               .buttonMarkup();
+});
+
+})( jQuery );
+
+
+(function( $, undefined ) {
+
+$.mobile.page.prototype.options.backBtnText  = "Back";
+$.mobile.page.prototype.options.addBackBtn   = false;
+$.mobile.page.prototype.options.backBtnTheme = null;
+$.mobile.page.prototype.options.headerTheme  = "a";
+$.mobile.page.prototype.options.footerTheme  = "a";
+$.mobile.page.prototype.options.contentTheme = null;
+
+$( document ).delegate( ":jqmData(role='page'), :jqmData(role='dialog')", "pagecreate", function( e ) {
+
+       var $page = $( this ),
+               o = $page.data( "page" ).options,
+               pageRole = $page.jqmData( "role" ),
+               pageTheme = o.theme;
+
+       $( ":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')", this )
+               .jqmEnhanceable()
+               .each(function() {
+
+               var $this = $( this ),
+                       role = $this.jqmData( "role" ),
+                       theme = $this.jqmData( "theme" ),
+                       contentTheme = theme || o.contentTheme || ( pageRole === "dialog" && pageTheme ),
+                       $headeranchors,
+                       leftbtn,
+                       rightbtn,
+                       backBtn;
+
+               $this.addClass( "ui-" + role );
+
+               //apply theming and markup modifications to page,header,content,footer
+               if ( role === "header" || role === "footer" ) {
+
+                       var thisTheme = theme || ( role === "header" ? o.headerTheme : o.footerTheme ) || pageTheme;
+
+                       $this
+                               //add theme class
+                               .addClass( "ui-bar-" + thisTheme )
+                               // Add ARIA role
+                               .attr( "role", role === "header" ? "banner" : "contentinfo" );
+
+                       if( role === "header") {
+                               // Right,left buttons
+                               $headeranchors  = $this.children( "a" );
+                               leftbtn = $headeranchors.hasClass( "ui-btn-left" );
+                               rightbtn = $headeranchors.hasClass( "ui-btn-right" );
+
+                               leftbtn = leftbtn || $headeranchors.eq( 0 ).not( ".ui-btn-right" ).addClass( "ui-btn-left" ).length;
+
+                               rightbtn = rightbtn || $headeranchors.eq( 1 ).addClass( "ui-btn-right" ).length;
+                       }
+
+                       // Auto-add back btn on pages beyond first view
+                       if ( o.addBackBtn &&
+                               role === "header" &&
+                               $( ".ui-page" ).length > 1 &&
+                               $page.jqmData( "url" ) !== $.mobile.path.stripHash( location.hash ) &&
+                               !leftbtn ) {
+
+                               backBtn = $( "<a href='#' class='ui-btn-left' data-"+ $.mobile.ns +"rel='back' data-"+ $.mobile.ns +"icon='arrow-l'>"+ o.backBtnText +"</a>" )
+                                       // If theme is provided, override default inheritance
+                                       .attr( "data-"+ $.mobile.ns +"theme", o.backBtnTheme || thisTheme )
+                                       .prependTo( $this );
+                       }
+
+                       // Page title
+                       $this.children( "h1, h2, h3, h4, h5, h6" )
+                               .addClass( "ui-title" )
+                               // Regardless of h element number in src, it becomes h1 for the enhanced page
+                               .attr({
+                                       "role": "heading",
+                                       "aria-level": "1"
+                               });
+
+               } else if ( role === "content" ) {
+                       if ( contentTheme ) {
+                           $this.addClass( "ui-body-" + ( contentTheme ) );
+                       }
+
+                       // Add ARIA role
+                       $this.attr( "role", "main" );
+               }
+       });
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.collapsible", $.mobile.widget, {
+       options: {
+               expandCueText: " click to expand contents",
+               collapseCueText: " click to collapse contents",
+               collapsed: true,
+               heading: "h1,h2,h3,h4,h5,h6,legend",
+               theme: null,
+               contentTheme: null,
+               iconTheme: "d",
+               mini: false,
+               initSelector: ":jqmData(role='collapsible')"
+       },
+       _create: function() {
+
+               var $el = this.element,
+                       o = this.options,
+                       collapsible = $el.addClass( "ui-collapsible" ),
+                       collapsibleHeading = $el.children( o.heading ).first(),
+                       collapsibleContent = collapsible.wrapInner( "<div class='ui-collapsible-content'></div>" ).find( ".ui-collapsible-content" ),
+                       collapsibleSet = $el.closest( ":jqmData(role='collapsible-set')" ).addClass( "ui-collapsible-set" );
+
+               // Replace collapsibleHeading if it's a legend
+               if ( collapsibleHeading.is( "legend" ) ) {
+                       collapsibleHeading = $( "<div role='heading'>"+ collapsibleHeading.html() +"</div>" ).insertBefore( collapsibleHeading );
+                       collapsibleHeading.next().remove();
+               }
+
+               // If we are in a collapsible set
+               if ( collapsibleSet.length ) {
+                       // Inherit the theme from collapsible-set
+                       if ( !o.theme ) {
+                               o.theme = collapsibleSet.jqmData("theme") || $.mobile.getInheritedTheme( collapsibleSet, "c" );
+                       }
+                       // Inherit the content-theme from collapsible-set
+                       if ( !o.contentTheme ) {
+                               o.contentTheme = collapsibleSet.jqmData( "content-theme" );
+                       }
+
+                       // Gets the preference icon position in the set
+                       if ( !o.iconPos ) {
+                               o.iconPos = collapsibleSet.jqmData( "iconpos" );
+                       }
+
+                       if( !o.mini ) {
+                               o.mini = collapsibleSet.jqmData( "mini" );
+                       }
+               }
+               collapsibleContent.addClass( ( o.contentTheme ) ? ( "ui-body-" + o.contentTheme ) : "");
+
+               collapsibleHeading
+                       //drop heading in before content
+                       .insertBefore( collapsibleContent )
+                       //modify markup & attributes
+                       .addClass( "ui-collapsible-heading" )
+                       .append( "<span class='ui-collapsible-heading-status'></span>" )
+                       .wrapInner( "<a href='#' class='ui-collapsible-heading-toggle'></a>" )
+                       .find( "a" )
+                               .first()
+                               .buttonMarkup({
+                                       shadow: false,
+                                       corners: false,
+                                       iconpos: $el.jqmData( "iconpos" ) || o.iconPos || "left",
+                                       icon: "plus",
+                                       mini: o.mini,
+                                       theme: o.theme
+                               })
+                       .add( ".ui-btn-inner", $el )
+                               .addClass( "ui-corner-top ui-corner-bottom" );
+
+               //events
+               collapsible
+                       .bind( "expand collapse", function( event ) {
+                               if ( !event.isDefaultPrevented() ) {
+
+                                       event.preventDefault();
+
+                                       var $this = $( this ),
+                                               isCollapse = ( event.type === "collapse" ),
+                                           contentTheme = o.contentTheme;
+
+                                       collapsibleHeading
+                                               .toggleClass( "ui-collapsible-heading-collapsed", isCollapse)
+                                               .find( ".ui-collapsible-heading-status" )
+                                                       .text( isCollapse ? o.expandCueText : o.collapseCueText )
+                                               .end()
+                                               .find( ".ui-icon" )
+                                                       .toggleClass( "ui-icon-minus", !isCollapse )
+                                                       .toggleClass( "ui-icon-plus", isCollapse );
+
+                                       $this.toggleClass( "ui-collapsible-collapsed", isCollapse );
+                                       collapsibleContent.toggleClass( "ui-collapsible-content-collapsed", isCollapse ).attr( "aria-hidden", isCollapse );
+
+                                       if ( contentTheme && ( !collapsibleSet.length || collapsible.jqmData( "collapsible-last" ) ) ) {
+                                               collapsibleHeading
+                                                       .find( "a" ).first().add( collapsibleHeading.find( ".ui-btn-inner" ) )
+                                                       .toggleClass( "ui-corner-bottom", isCollapse );
+                                               collapsibleContent.toggleClass( "ui-corner-bottom", !isCollapse );
+                                       }
+                                       collapsibleContent.trigger( "updatelayout" );
+                               }
+                       })
+                       .trigger( o.collapsed ? "collapse" : "expand" );
+
+               collapsibleHeading
+                       .bind( "click", function( event ) {
+
+                               var type = collapsibleHeading.is( ".ui-collapsible-heading-collapsed" ) ?
+                                                                               "expand" : "collapse";
+
+                               collapsible.trigger( type );
+
+                               event.preventDefault();
+                       });
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ){
+       $.mobile.collapsible.prototype.enhanceWithin( e.target );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.collapsibleset", $.mobile.widget, {
+       options: {
+               initSelector: ":jqmData(role='collapsible-set')"
+       },
+       _create: function() {
+               var $el = this.element.addClass( "ui-collapsible-set" ),
+                       o = this.options;
+
+               // Inherit the theme from collapsible-set
+               if ( !o.theme ) {
+                       o.theme = $.mobile.getInheritedTheme( $el, "c" );
+               }
+               // Inherit the content-theme from collapsible-set
+               if ( !o.contentTheme ) {
+                       o.contentTheme = $el.jqmData( "content-theme" );
+               }
+
+               if ( !o.corners ) {
+                       o.corners = $el.jqmData( "corners" ) === undefined ? true : false;
+               }
+
+               // Initialize the collapsible set if it's not already initialized
+               if ( !$el.jqmData( "collapsiblebound" ) ) {
+                       $el
+                               .jqmData( "collapsiblebound", true )
+                               .bind( "expand collapse", function( event ) {
+                                       var isCollapse = ( event.type === "collapse" ),
+                                               collapsible = $( event.target ).closest( ".ui-collapsible" ),
+                                               widget = collapsible.data( "collapsible" ),
+                                           contentTheme = widget.options.contentTheme;
+                                       if ( contentTheme && collapsible.jqmData( "collapsible-last" ) ) {
+                                               collapsible.find( widget.options.heading ).first()
+                                                       .find( "a" ).first()
+                                                       .add( ".ui-btn-inner" )
+                                                       .toggleClass( "ui-corner-bottom", isCollapse );
+                                               collapsible.find( ".ui-collapsible-content" ).toggleClass( "ui-corner-bottom", !isCollapse );
+                                       }
+                               })
+                               .bind( "expand", function( event ) {
+                                       $( event.target )
+                                               .closest( ".ui-collapsible" )
+                                               .siblings( ".ui-collapsible" )
+                                               .trigger( "collapse" );
+                               });
+               }
+       },
+
+       _init: function() {
+               this.refresh();
+       },
+
+       refresh: function() {
+               var $el = this.element,
+                       o = this.options,
+                       collapsiblesInSet = $el.children( ":jqmData(role='collapsible')" );
+
+               $.mobile.collapsible.prototype.enhance( collapsiblesInSet.not( ".ui-collapsible" ) );
+
+               // clean up borders
+               collapsiblesInSet.each( function() {
+                       $( this ).find( $.mobile.collapsible.prototype.options.heading )
+                               .find( "a" ).first()
+                               .add( ".ui-btn-inner" )
+                               .removeClass( "ui-corner-top ui-corner-bottom" );
+               });
+
+               collapsiblesInSet.first()
+                       .find( "a" )
+                               .first()
+                               .addClass( o.corners ? "ui-corner-top" : "" )
+                               .find( ".ui-btn-inner" )
+                                       .addClass( "ui-corner-top" );
+
+               collapsiblesInSet.last()
+                       .jqmData( "collapsible-last", true )
+                       .find( "a" )
+                               .first()
+                               .addClass( o.corners ? "ui-corner-bottom" : "" )
+                               .find( ".ui-btn-inner" )
+                                       .addClass( "ui-corner-bottom" );
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ){
+       $.mobile.collapsibleset.prototype.enhanceWithin( e.target );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.navbar", $.mobile.widget, {
+       options: {
+               iconpos: "top",
+               grid: null,
+               initSelector: ":jqmData(role='navbar')"
+       },
+
+       _create: function(){
+
+               var $navbar = this.element,
+                       $navbtns = $navbar.find( "a" ),
+                       iconpos = $navbtns.filter( ":jqmData(icon)" ).length ?
+                                                                       this.options.iconpos : undefined;
+
+               $navbar.addClass( "ui-navbar" )
+                       .attr( "role","navigation" )
+                       .find( "ul" )
+                       .jqmEnhanceable()
+                       .grid({ grid: this.options.grid });
+
+               if ( !iconpos ) {
+                       $navbar.addClass( "ui-navbar-noicons" );
+               }
+
+               $navbtns.buttonMarkup({
+                       corners:        false,
+                       shadow:         false,
+                       inline:     true,
+                       iconpos:        iconpos
+               });
+
+               $navbar.delegate( "a", "vclick", function( event ) {
+                       if( !$(event.target).hasClass("ui-disabled") ) {
+                               $navbtns.removeClass( $.mobile.activeBtnClass );
+                               $( this ).addClass( $.mobile.activeBtnClass );
+                       }
+               });
+
+               // Buttons in the navbar with ui-state-persist class should regain their active state before page show
+               $navbar.closest( ".ui-page" ).bind( "pagebeforeshow", function() {
+                       $navbtns.filter( ".ui-state-persist" ).addClass( $.mobile.activeBtnClass );
+               });
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ){
+       $.mobile.navbar.prototype.enhanceWithin( e.target );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+//Keeps track of the number of lists per page UID
+//This allows support for multiple nested list in the same page
+//https://github.com/jquery/jquery-mobile/issues/1617
+var listCountPerPage = {};
+
+$.widget( "mobile.listview", $.mobile.widget, {
+
+       options: {
+               theme: null,
+               countTheme: "c",
+               headerTheme: "b",
+               dividerTheme: "b",
+               splitIcon: "arrow-r",
+               splitTheme: "b",
+               mini: false,
+               inset: false,
+               initSelector: ":jqmData(role='listview')"
+       },
+
+       _create: function() {
+               var t = this,
+                       listviewClasses = "";
+                       
+               listviewClasses += t.options.inset ? " ui-listview-inset ui-corner-all ui-shadow " : "";
+               listviewClasses += t.element.jqmData( "mini" ) || t.options.mini === true ? " ui-mini" : "";
+               
+               // create listview markup
+               t.element.addClass(function( i, orig ) {
+                       return orig + " ui-listview " + listviewClasses;
+               });
+
+               t.refresh( true );
+       },
+
+       _removeCorners: function( li, which ) {
+               var top = "ui-corner-top ui-corner-tr ui-corner-tl",
+                       bot = "ui-corner-bottom ui-corner-br ui-corner-bl";
+
+               li = li.add( li.find( ".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb" ) );
+
+               if ( which === "top" ) {
+                       li.removeClass( top );
+               } else if ( which === "bottom" ) {
+                       li.removeClass( bot );
+               } else {
+                       li.removeClass( top + " " + bot );
+               }
+       },
+
+       _refreshCorners: function( create ) {
+               var $li,
+                       $visibleli,
+                       $topli,
+                       $bottomli;
+
+               if ( this.options.inset ) {
+                       $li = this.element.children( "li" );
+                       // at create time the li are not visible yet so we need to rely on .ui-screen-hidden
+                       $visibleli = create?$li.not( ".ui-screen-hidden" ):$li.filter( ":visible" );
+
+                       this._removeCorners( $li );
+
+                       // Select the first visible li element
+                       $topli = $visibleli.first()
+                               .addClass( "ui-corner-top" );
+
+                       $topli.add( $topli.find( ".ui-btn-inner" )
+                                       .not( ".ui-li-link-alt span:first-child" ) )
+                                .addClass( "ui-corner-top" )
+                                .end()
+                               .find( ".ui-li-link-alt, .ui-li-link-alt span:first-child" )
+                                       .addClass( "ui-corner-tr" )
+                               .end()
+                               .find( ".ui-li-thumb" )
+                                       .not(".ui-li-icon")
+                                       .addClass( "ui-corner-tl" );
+
+                       // Select the last visible li element
+                       $bottomli = $visibleli.last()
+                               .addClass( "ui-corner-bottom" );
+
+                       $bottomli.add( $bottomli.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" );
+               }
+               if ( !create ) {
+                       this.element.trigger( "updatelayout" );
+               }
+       },
+
+       // This is a generic utility method for finding the first
+       // node with a given nodeName. It uses basic DOM traversal
+       // to be fast and is meant to be a substitute for simple
+       // $.fn.closest() and $.fn.children() calls on a single
+       // element. Note that callers must pass both the lowerCase
+       // and upperCase version of the nodeName they are looking for.
+       // The main reason for this is that this function will be
+       // called many times and we want to avoid having to lowercase
+       // the nodeName from the element every time to ensure we have
+       // a match. Note that this function lives here for now, but may
+       // be moved into $.mobile if other components need a similar method.
+       _findFirstElementByTagName: function( ele, nextProp, lcName, ucName )
+       {
+               var dict = {};
+               dict[ lcName ] = dict[ ucName ] = true;
+               while ( ele ) {
+                       if ( dict[ ele.nodeName ] ) {
+                               return ele;
+                       }
+                       ele = ele[ nextProp ];
+               }
+               return null;
+       },
+       _getChildrenByTagName: function( ele, lcName, ucName )
+       {
+               var results = [],
+                       dict = {};
+               dict[ lcName ] = dict[ ucName ] = true;
+               ele = ele.firstChild;
+               while ( ele ) {
+                       if ( dict[ ele.nodeName ] ) {
+                               results.push( ele );
+                       }
+                       ele = ele.nextSibling;
+               }
+               return $( results );
+       },
+
+       _addThumbClasses: function( containers )
+       {
+               var i, img, len = containers.length;
+               for ( i = 0; i < len; i++ ) {
+                       img = $( this._findFirstElementByTagName( containers[ i ].firstChild, "nextSibling", "img", "IMG" ) );
+                       if ( img.length ) {
+                               img.addClass( "ui-li-thumb" );
+                               $( this._findFirstElementByTagName( img[ 0 ].parentNode, "parentNode", "li", "LI" ) ).addClass( img.is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
+                       }
+               }
+       },
+
+       refresh: function( create ) {
+               this.parentPage = this.element.closest( ".ui-page" );
+               this._createSubPages();
+
+               var o = this.options,
+                       $list = this.element,
+                       self = this,
+                       dividertheme = $list.jqmData( "dividertheme" ) || o.dividerTheme,
+                       listsplittheme = $list.jqmData( "splittheme" ),
+                       listspliticon = $list.jqmData( "spliticon" ),
+                       li = this._getChildrenByTagName( $list[ 0 ], "li", "LI" ),
+                       counter = $.support.cssPseudoElement || !$.nodeName( $list[ 0 ], "ol" ) ? 0 : 1,
+                       itemClassDict = {},
+                       item, itemClass, itemTheme,
+                       a, last, splittheme, countParent, icon, imgParents, img, linkIcon;
+
+               if ( counter ) {
+                       $list.find( ".ui-li-dec" ).remove();
+               }
+
+               if ( !o.theme ) {
+                       o.theme = $.mobile.getInheritedTheme( this.element, "c" );
+               }
+
+               for ( var pos = 0, numli = li.length; pos < numli; pos++ ) {
+                       item = li.eq( pos );
+                       itemClass = "ui-li";
+
+                       // If we're creating the element, we update it regardless
+                       if ( create || !item.hasClass( "ui-li" ) ) {
+                               itemTheme = item.jqmData("theme") || o.theme;
+                               a = this._getChildrenByTagName( item[ 0 ], "a", "A" );
+
+                               if ( a.length ) {
+                                       icon = item.jqmData("icon");
+
+                                       item.buttonMarkup({
+                                               wrapperEls: "div",
+                                               shadow: false,
+                                               corners: false,
+                                               iconpos: "right",
+                                               icon: a.length > 1 || icon === false ? false : icon || "arrow-r",
+                                               theme: itemTheme
+                                       });
+
+                                       if ( ( icon != false ) && ( a.length == 1 ) ) {
+                                               item.addClass( "ui-li-has-arrow" );
+                                       }
+
+                                       a.first().removeClass( "ui-link" ).addClass( "ui-link-inherit" );
+
+                                       if ( a.length > 1 ) {
+                                               itemClass += " ui-li-has-alt";
+
+                                               last = a.last();
+                                               splittheme = listsplittheme || last.jqmData( "theme" ) || o.splitTheme;
+                                               linkIcon = last.jqmData("icon");
+
+                                               last.appendTo(item)
+                                                       .attr( "title", last.getEncodedText() )
+                                                       .addClass( "ui-li-link-alt" )
+                                                       .empty()
+                                                       .buttonMarkup({
+                                                               shadow: false,
+                                                               corners: false,
+                                                               theme: itemTheme,
+                                                               icon: false,
+                                                               iconpos: false
+                                                       })
+                                                       .find( ".ui-btn-inner" )
+                                                               .append(
+                                                                       $( document.createElement( "span" ) ).buttonMarkup({
+                                                                               shadow: true,
+                                                                               corners: true,
+                                                                               theme: splittheme,
+                                                                               iconpos: "notext",
+                                                                               // link icon overrides list item icon overrides ul element overrides options
+                                                                               icon: linkIcon || icon || listspliticon || o.splitIcon
+                                                                       })
+                                                               );
+                                       }
+                               } else if ( item.jqmData( "role" ) === "list-divider" ) {
+
+                                       itemClass += " ui-li-divider ui-bar-" + dividertheme;
+                                       item.attr( "role", "heading" );
+
+                                       //reset counter when a divider heading is encountered
+                                       if ( counter ) {
+                                               counter = 1;
+                                       }
+
+                               } else {
+                                       itemClass += " ui-li-static ui-body-" + itemTheme;
+                               }
+                       }
+
+                       if ( counter && itemClass.indexOf( "ui-li-divider" ) < 0 ) {
+                               countParent = item.is( ".ui-li-static:first" ) ? item : item.find( ".ui-link-inherit" );
+
+                               countParent.addClass( "ui-li-jsnumbering" )
+                                       .prepend( "<span class='ui-li-dec'>" + (counter++) + ". </span>" );
+                       }
+
+                       // Instead of setting item class directly on the list item and its
+                       // btn-inner at this point in time, push the item into a dictionary
+                       // that tells us what class to set on it so we can do this after this
+                       // processing loop is finished.
+
+                       if ( !itemClassDict[ itemClass ] ) {
+                               itemClassDict[ itemClass ] = [];
+                       }
+
+                       itemClassDict[ itemClass ].push( item[ 0 ] );
+               }
+
+               // Set the appropriate listview item classes on each list item
+               // and their btn-inner elements. The main reason we didn't do this
+               // in the for-loop above is because we can eliminate per-item function overhead
+               // by calling addClass() and children() once or twice afterwards. This
+               // can give us a significant boost on platforms like WP7.5.
+
+               for ( itemClass in itemClassDict ) {
+                       $( itemClassDict[ itemClass ] ).addClass( itemClass ).children( ".ui-btn-inner" ).addClass( itemClass );
+               }
+
+               $list.find( "h1, h2, h3, h4, h5, h6" ).addClass( "ui-li-heading" )
+                       .end()
+
+                       .find( "p, dl" ).addClass( "ui-li-desc" )
+                       .end()
+
+                       .find( ".ui-li-aside" ).each(function() {
+                                       var $this = $(this);
+                                       $this.prependTo( $this.parent() ); //shift aside to front for css float
+                               })
+                       .end()
+
+                       .find( ".ui-li-count" ).each( function() {
+                                       $( this ).closest( "li" ).addClass( "ui-li-has-count" );
+                               }).addClass( "ui-btn-up-" + ( $list.jqmData( "counttheme" ) || this.options.countTheme) + " ui-btn-corner-all" );
+
+               // The idea here is to look at the first image in the list item
+               // itself, and any .ui-link-inherit element it may contain, so we
+               // can place the appropriate classes on the image and list item.
+               // Note that we used to use something like:
+               //
+               //    li.find(">img:eq(0), .ui-link-inherit>img:eq(0)").each( ... );
+               //
+               // But executing a find() like that on Windows Phone 7.5 took a
+               // really long time. Walking things manually with the code below
+               // allows the 400 listview item page to load in about 3 seconds as
+               // opposed to 30 seconds.
+
+               this._addThumbClasses( li );
+               this._addThumbClasses( $list.find( ".ui-link-inherit" ) );
+
+               this._refreshCorners( create );
+       },
+
+       //create a string for ID/subpage url creation
+       _idStringEscape: function( str ) {
+               return str.replace(/[^a-zA-Z0-9]/g, '-');
+       },
+
+       _createSubPages: function() {
+               var parentList = this.element,
+                       parentPage = parentList.closest( ".ui-page" ),
+                       parentUrl = parentPage.jqmData( "url" ),
+                       parentId = parentUrl || parentPage[ 0 ][ $.expando ],
+                       parentListId = parentList.attr( "id" ),
+                       o = this.options,
+                       dns = "data-" + $.mobile.ns,
+                       self = this,
+                       persistentFooterID = parentPage.find( ":jqmData(role='footer')" ).jqmData( "id" ),
+                       hasSubPages;
+
+               if ( typeof listCountPerPage[ parentId ] === "undefined" ) {
+                       listCountPerPage[ parentId ] = -1;
+               }
+
+               parentListId = parentListId || ++listCountPerPage[ parentId ];
+
+               $( parentList.find( "li>ul, li>ol" ).toArray().reverse() ).each(function( i ) {
+                       var self = this,
+                               list = $( this ),
+                               listId = list.attr( "id" ) || parentListId + "-" + i,
+                               parent = list.parent(),
+                               nodeEls = $( list.prevAll().toArray().reverse() ),
+                               nodeEls = nodeEls.length ? nodeEls : $( "<span>" + $.trim(parent.contents()[ 0 ].nodeValue) + "</span>" ),
+                               title = nodeEls.first().getEncodedText(),//url limits to first 30 chars of text
+                               id = ( parentUrl || "" ) + "&" + $.mobile.subPageUrlKey + "=" + listId,
+                               theme = list.jqmData( "theme" ) || o.theme,
+                               countTheme = list.jqmData( "counttheme" ) || parentList.jqmData( "counttheme" ) || o.countTheme,
+                               newPage, anchor;
+
+                       //define hasSubPages for use in later removal
+                       hasSubPages = true;
+
+                       newPage = list.detach()
+                                               .wrap( "<div " + dns + "role='page' " + dns + "url='" + id + "' " + dns + "theme='" + theme + "' " + dns + "count-theme='" + countTheme + "'><div " + dns + "role='content'></div></div>" )
+                                               .parent()
+                                                       .before( "<div " + dns + "role='header' " + dns + "theme='" + o.headerTheme + "'><div class='ui-title'>" + title + "</div></div>" )
+                                                       .after( persistentFooterID ? $( "<div " + dns + "role='footer' " + dns + "id='"+ persistentFooterID +"'>") : "" )
+                                                       .parent()
+                                                               .appendTo( $.mobile.pageContainer );
+
+                       newPage.page();
+
+                       anchor = parent.find('a:first');
+
+                       if ( !anchor.length ) {
+                               anchor = $( "<a/>" ).html( nodeEls || title ).prependTo( parent.empty() );
+                       }
+
+                       anchor.attr( "href", "#" + id );
+
+               }).listview();
+
+               // on pagehide, remove any nested pages along with the parent page, as long as they aren't active
+               // and aren't embedded
+               if( hasSubPages &&
+                       parentPage.is( ":jqmData(external-page='true')" ) &&
+                       parentPage.data("page").options.domCache === false ) {
+
+                       var newRemove = function( e, ui ){
+                               var nextPage = ui.nextPage, npURL;
+
+                               if( ui.nextPage ){
+                                       npURL = nextPage.jqmData( "url" );
+                                       if( npURL.indexOf( parentUrl + "&" + $.mobile.subPageUrlKey ) !== 0 ){
+                                               self.childPages().remove();
+                                               parentPage.remove();
+                                       }
+                               }
+                       };
+
+                       // unbind the original page remove and replace with our specialized version
+                       parentPage
+                               .unbind( "pagehide.remove" )
+                               .bind( "pagehide.remove", newRemove);
+               }
+       },
+
+       // TODO sort out a better way to track sub pages of the listview this is brittle
+       childPages: function(){
+               var parentUrl = this.parentPage.jqmData( "url" );
+
+               return $( ":jqmData(url^='"+  parentUrl + "&" + $.mobile.subPageUrlKey +"')");
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ){
+       $.mobile.listview.prototype.enhanceWithin( e.target );
+});
+
+})( jQuery );
+
+/*
+* "checkboxradio" plugin
+*/
+
+(function( $, undefined ) {
+
+$.widget( "mobile.checkboxradio", $.mobile.widget, {
+       options: {
+               theme: null,
+               initSelector: "input[type='checkbox'],input[type='radio']"
+       },
+       _create: function() {
+               var self = this,
+                       input = this.element,
+                       inheritAttr = function( input, dataAttr ) {
+                               return input.jqmData( dataAttr ) || input.closest( "form,fieldset" ).jqmData( dataAttr )
+                       },
+                       // NOTE: Windows Phone could not find the label through a selector
+                       // filter works though.
+                       parentLabel = $( input ).closest( "label" ),
+                       label = parentLabel.length ? parentLabel : $( input ).closest( "form,fieldset,:jqmData(role='page'),:jqmData(role='dialog')" ).find( "label" ).filter( "[for='" + input[0].id + "']" ),
+                       inputtype = input[0].type,
+                       mini = inheritAttr( input, "mini" ),
+                       checkedState = inputtype + "-on",
+                       uncheckedState = inputtype + "-off",
+                       icon = input.parents( ":jqmData(type='horizontal')" ).length ? undefined : uncheckedState,
+                       iconpos = inheritAttr( input, "iconpos" ),
+                       activeBtn = icon ? "" : " " + $.mobile.activeBtnClass,
+                       checkedClass = "ui-" + checkedState + activeBtn,
+                       uncheckedClass = "ui-" + uncheckedState,
+                       checkedicon = "ui-icon-" + checkedState,
+                       uncheckedicon = "ui-icon-" + uncheckedState;
+
+               if ( inputtype !== "checkbox" && inputtype !== "radio" ) {
+                       return;
+               }
+
+               // Expose for other methods
+               $.extend( this, {
+                       label: label,
+                       inputtype: inputtype,
+                       checkedClass: checkedClass,
+                       uncheckedClass: uncheckedClass,
+                       checkedicon: checkedicon,
+                       uncheckedicon: uncheckedicon
+               });
+
+               // If there's no selected theme check the data attr
+               if( !this.options.theme ) {
+                       this.options.theme = $.mobile.getInheritedTheme( this.element, "c" );
+               }
+
+               label.buttonMarkup({
+                       theme: this.options.theme,
+                       icon: icon,
+                       shadow: false,
+                       mini: mini,
+                       iconpos: iconpos
+               });
+
+               // Wrap the input + label in a div
+               var wrapper = document.createElement('div');
+               wrapper.className = 'ui-' + inputtype;
+
+               input.add( label ).wrapAll( wrapper );
+
+               label.bind({
+                       vmouseover: function( event ) {
+                               if ( $( this ).parent().is( ".ui-disabled" ) ) {
+                                       event.stopPropagation();
+                               }
+                       },
+
+                       vclick: function( event ) {
+                               if ( input.is( ":disabled" ) ) {
+                                       event.preventDefault();
+                                       return;
+                               }
+
+                               self._cacheVals();
+
+                               input.prop( "checked", inputtype === "radio" && true || !input.prop( "checked" ) );
+
+                               // trigger click handler's bound directly to the input as a substitute for
+                               // how label clicks behave normally in the browsers
+                               // TODO: it would be nice to let the browser's handle the clicks and pass them
+                               //       through to the associate input. we can swallow that click at the parent
+                               //       wrapper element level
+                               input.triggerHandler( 'click' );
+
+                               // Input set for common radio buttons will contain all the radio
+                               // buttons, but will not for checkboxes. clearing the checked status
+                               // of other radios ensures the active button state is applied properly
+                               self._getInputSet().not( input ).prop( "checked", false );
+
+                               self._updateAll();
+                               return false;
+                       }
+               });
+
+               input
+                       .bind({
+                               vmousedown: function() {
+                                       self._cacheVals();
+                               },
+
+                               vclick: function() {
+                                       var $this = $(this);
+
+                                       // Adds checked attribute to checked input when keyboard is used
+                                       if ( $this.is( ":checked" ) ) {
+
+                                               $this.prop( "checked", true);
+                                               self._getInputSet().not($this).prop( "checked", false );
+                                       } else {
+
+                                               $this.prop( "checked", false );
+                                       }
+
+                                       self._updateAll();
+                               },
+
+                               focus: function() {
+                                       label.addClass( $.mobile.focusClass );
+                               },
+
+                               blur: function() {
+                                       label.removeClass( $.mobile.focusClass );
+                               }
+                       });
+
+               this.refresh();
+       },
+
+       _cacheVals: function() {
+               this._getInputSet().each(function() {
+                       $(this).jqmData( "cacheVal", this.checked );
+               });
+       },
+
+       //returns either a set of radios with the same name attribute, or a single checkbox
+       _getInputSet: function(){
+               if(this.inputtype === "checkbox") {
+                       return this.element;
+               }
+
+               return this.element.closest( "form,fieldset,:jqmData(role='page')" )
+                       .find( "input[name='"+ this.element[0].name +"'][type='"+ this.inputtype +"']" );
+       },
+
+       _updateAll: function() {
+               var self = this;
+
+               this._getInputSet().each(function() {
+                       var $this = $(this);
+
+                       if ( this.checked || self.inputtype === "checkbox" ) {
+                               $this.trigger( "change" );
+                       }
+               })
+               .checkboxradio( "refresh" );
+       },
+
+       refresh: function() {
+               var input = this.element[0],
+                       label = this.label,
+                       icon = label.find( ".ui-icon" );
+
+               if ( input.checked ) {
+                       label.addClass( this.checkedClass ).removeClass( this.uncheckedClass );
+                       icon.addClass( this.checkedicon ).removeClass( this.uncheckedicon );
+               } else {
+                       label.removeClass( this.checkedClass ).addClass( this.uncheckedClass );
+                       icon.removeClass( this.checkedicon ).addClass( this.uncheckedicon );
+               }
+
+               if ( input.disabled ) {
+                       this.disable();
+               } else {
+                       this.enable();
+               }
+       },
+
+       disable: function() {
+               this.element.prop( "disabled", true ).parent().addClass( "ui-disabled" );
+       },
+
+       enable: function() {
+               this.element.prop( "disabled", false ).parent().removeClass( "ui-disabled" );
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ){
+       $.mobile.checkboxradio.prototype.enhanceWithin( e.target, true );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.button", $.mobile.widget, {
+       options: {
+               theme: null,
+               icon: null,
+               iconpos: null,
+               inline: false,
+               corners: true,
+               shadow: true,
+               iconshadow: true,
+               initSelector: "button, [type='button'], [type='submit'], [type='reset'], [type='image']",
+               mini: false
+       },
+       _create: function() {
+               var $el = this.element,
+                       $button,
+                       o = this.options,
+                       type,
+                       name,
+                       classes = "",
+                       $buttonPlaceholder;
+
+               // if this is a link, check if it's been enhanced and, if not, use the right function
+               if( $el[ 0 ].tagName === "A" ) {
+                       !$el.hasClass( "ui-btn" ) && $el.buttonMarkup();
+                       return;
+               }
+
+               // get the inherited theme
+               // TODO centralize for all widgets
+               if ( !this.options.theme ) {
+                       this.options.theme = $.mobile.getInheritedTheme( this.element, "c" );
+               }
+
+               // TODO: Post 1.1--once we have time to test thoroughly--any classes manually applied to the original element should be carried over to the enhanced element, with an `-enhanced` suffix. See https://github.com/jquery/jquery-mobile/issues/3577
+               /* if( $el[0].className.length ) {
+                       classes = $el[0].className;
+               } */
+               if( !!~$el[0].className.indexOf( "ui-btn-left" ) ) {
+                       classes = "ui-btn-left";
+               }
+
+               if(  !!~$el[0].className.indexOf( "ui-btn-right" ) ) {
+                       classes = "ui-btn-right";
+               }
+
+               // Add ARIA role
+               this.button = $( "<div></div>" )
+                       .text( $el.text() || $el.val() )
+                       .insertBefore( $el )
+                       .buttonMarkup({
+                               theme: o.theme,
+                               icon: o.icon,
+                               iconpos: o.iconpos,
+                               inline: o.inline,
+                               corners: o.corners,
+                               shadow: o.shadow,
+                               iconshadow: o.iconshadow,
+                               mini: o.mini
+                       })
+                       .addClass( classes )
+                       .append( $el.addClass( "ui-btn-hidden" ) );
+
+        $button = this.button;
+               type = $el.attr( "type" );
+               name = $el.attr( "name" );
+
+               // Add hidden input during submit if input type="submit" has a name.
+               if ( type !== "button" && type !== "reset" && name ) {
+                               $el.bind( "vclick", function() {
+                                       // Add hidden input if it doesn’t already exist.
+                                       if( $buttonPlaceholder === undefined ) {
+                                               $buttonPlaceholder = $( "<input>", {
+                                                       type: "hidden",
+                                                       name: $el.attr( "name" ),
+                                                       value: $el.attr( "value" )
+                                               }).insertBefore( $el );
+
+                                               // Bind to doc to remove after submit handling
+                                               $( document ).one("submit", function(){
+                                                       $buttonPlaceholder.remove();
+
+                                                       // reset the local var so that the hidden input
+                                                       // will be re-added on subsequent clicks
+                                                       $buttonPlaceholder = undefined;
+                                               });
+                                       }
+                               });
+               }
+
+        $el.bind({
+            focus: function() {
+                $button.addClass( $.mobile.focusClass );
+            },
+
+            blur: function() {
+                $button.removeClass( $.mobile.focusClass );
+            }
+        });
+
+               this.refresh();
+       },
+
+       enable: function() {
+               this.element.attr( "disabled", false );
+               this.button.removeClass( "ui-disabled" ).attr( "aria-disabled", false );
+               return this._setOption( "disabled", false );
+       },
+
+       disable: function() {
+               this.element.attr( "disabled", true );
+               this.button.addClass( "ui-disabled" ).attr( "aria-disabled", true );
+               return this._setOption( "disabled", true );
+       },
+
+       refresh: function() {
+               var $el = this.element;
+
+               if ( $el.prop("disabled") ) {
+                       this.disable();
+               } else {
+                       this.enable();
+               }
+
+               // Grab the button's text element from its implementation-independent data item
+               $( this.button.data( 'buttonElements' ).text ).text( $el.text() || $el.val() );
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ){
+       $.mobile.button.prototype.enhanceWithin( e.target, true );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.fn.controlgroup = function( options ) {
+       function flipClasses( els, flCorners  ) {
+               els.removeClass( "ui-btn-corner-all ui-shadow" )
+                       .eq( 0 ).addClass( flCorners[ 0 ] )
+                       .end()
+                       .last().addClass( flCorners[ 1 ] ).addClass( "ui-controlgroup-last" );
+       }
+
+       return this.each(function() {
+               var $el = $( this ),
+                       o = $.extend({
+                                               direction: $el.jqmData( "type" ) || "vertical",
+                                               shadow: false,
+                                               excludeInvisible: true,
+                                               mini: $el.jqmData( "mini" )
+                                       }, options ),
+                       groupheading = $el.children( "legend" ),
+                       flCorners = o.direction == "horizontal" ? [ "ui-corner-left", "ui-corner-right" ] : [ "ui-corner-top", "ui-corner-bottom" ],
+                       type = $el.find( "input" ).first().attr( "type" );
+
+               // Replace legend with more stylable replacement div
+               if ( groupheading.length ) {
+                       $el.wrapInner( "<div class='ui-controlgroup-controls'></div>" );
+                       $( "<div role='heading' class='ui-controlgroup-label'>" + groupheading.html() + "</div>" ).insertBefore( $el.children(0) );
+                       groupheading.remove();
+               }
+
+               $el.addClass( "ui-corner-all ui-controlgroup ui-controlgroup-" + o.direction );
+
+               flipClasses( $el.find( ".ui-btn" + ( o.excludeInvisible ? ":visible" : "" ) ).not('.ui-slider-handle'), flCorners );
+               flipClasses( $el.find( ".ui-btn-inner" ), flCorners );
+
+               if ( o.shadow ) {
+                       $el.addClass( "ui-shadow" );
+               }
+
+               if ( o.mini ) {
+                       $el.addClass( "ui-mini" );
+               }
+
+       });
+};
+
+// The pagecreate handler for controlgroup is in jquery.mobile.init because of the soft-dependency on the wrapped widgets
+
+})(jQuery);
+
+(function( $, undefined ) {
+
+$( document ).bind( "pagecreate create", function( e ){
+
+       //links within content areas, tests included with page
+       $( e.target )
+               .find( "a" )
+               .jqmEnhanceable()
+               .not( ".ui-btn, .ui-link-inherit, :jqmData(role='none'), :jqmData(role='nojs')" )
+               .addClass( "ui-link" );
+
+});
+
+})( jQuery );
+
+
+( function( $ ) {
+       var     meta = $( "meta[name=viewport]" ),
+        initialContent = meta.attr( "content" ),
+        disabledZoom = initialContent + ",maximum-scale=1, user-scalable=no",
+        enabledZoom = initialContent + ",maximum-scale=10, user-scalable=yes",
+               disabledInitially = /(user-scalable[\s]*=[\s]*no)|(maximum-scale[\s]*=[\s]*1)[$,\s]/.test( initialContent );
+       
+       $.mobile.zoom = $.extend( {}, {
+               enabled: !disabledInitially,
+               locked: false,
+               disable: function( lock ) {
+                       if( !disabledInitially && !$.mobile.zoom.locked ){
+                       meta.attr( "content", disabledZoom );
+                       $.mobile.zoom.enabled = false;
+                               $.mobile.zoom.locked = lock || false;
+                       }
+               },
+               enable: function( unlock ) {
+                       if( !disabledInitially && ( !$.mobile.zoom.locked || unlock === true ) ){
+                       meta.attr( "content", enabledZoom );
+                       $.mobile.zoom.enabled = true;
+                               $.mobile.zoom.locked = false;
+                       }
+               },
+               restore: function() {
+                       if( !disabledInitially ){
+                       meta.attr( "content", initialContent );
+                       $.mobile.zoom.enabled = true;
+                       }
+               }
+       });
+
+}( jQuery ));
+
+(function( $, undefined ) {
+
+$.widget( "mobile.textinput", $.mobile.widget, {
+       options: {
+               theme: null,
+               // This option defaults to true on iOS devices.
+               preventFocusZoom: /iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1,
+               initSelector: "input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type])",
+               clearSearchButtonText: "clear text"
+       },
+
+       _create: function() {
+
+               var input = this.element,
+                       o = this.options,
+                       theme = o.theme || $.mobile.getInheritedTheme( this.element, "c" ),
+                       themeclass  = " ui-body-" + theme,
+                       mini = input.jqmData("mini") == true,
+                       miniclass = mini ? " ui-mini" : "",
+                       focusedEl, clearbtn;
+
+               $( "label[for='" + input.attr( "id" ) + "']" ).addClass( "ui-input-text" );
+
+               focusedEl = input.addClass("ui-input-text ui-body-"+ theme );
+
+               // XXX: Temporary workaround for issue 785 (Apple bug 8910589).
+               //      Turn off autocorrect and autocomplete on non-iOS 5 devices
+               //      since the popup they use can't be dismissed by the user. Note
+               //      that we test for the presence of the feature by looking for
+               //      the autocorrect property on the input element. We currently
+               //      have no test for iOS 5 or newer so we're temporarily using
+               //      the touchOverflow support flag for jQM 1.0. Yes, I feel dirty. - jblas
+               if ( typeof input[0].autocorrect !== "undefined" && !$.support.touchOverflow ) {
+                       // Set the attribute instead of the property just in case there
+                       // is code that attempts to make modifications via HTML.
+                       input[0].setAttribute( "autocorrect", "off" );
+                       input[0].setAttribute( "autocomplete", "off" );
+               }
+
+
+               //"search" input widget
+               if ( input.is( "[type='search'],:jqmData(type='search')" ) ) {
+
+                       focusedEl = input.wrap( "<div class='ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield" + themeclass + miniclass + "'></div>" ).parent();
+                       clearbtn = $( "<a href='#' class='ui-input-clear' title='" + o.clearSearchButtonText + "'>" + o.clearSearchButtonText + "</a>" )
+                               .bind('click', function( event ) {
+                                       input
+                                               .val( "" )
+                                               .focus()
+                                               .trigger( "change" );
+                                       clearbtn.addClass( "ui-input-clear-hidden" );
+                                       event.preventDefault();
+                               })
+                               .appendTo( focusedEl )
+                               .buttonMarkup({
+                                       icon: "delete",
+                                       iconpos: "notext",
+                                       corners: true,
+                                       shadow: true,
+                                       mini: mini
+                               });
+
+                       function toggleClear() {
+                               setTimeout(function() {
+                                       clearbtn.toggleClass( "ui-input-clear-hidden", !input.val() );
+                               }, 0);
+                       }
+
+                       toggleClear();
+
+                       input.bind('paste cut keyup focus change blur', toggleClear);
+
+               } else {
+                       input.addClass( "ui-corner-all ui-shadow-inset" + themeclass + miniclass );
+               }
+
+               input.focus(function() {
+                               focusedEl.addClass( $.mobile.focusClass );
+                       })
+                       .blur(function(){
+                               focusedEl.removeClass( $.mobile.focusClass );
+                       })
+                       // In many situations, iOS will zoom into the select upon tap, this prevents that from happening
+                       .bind( "focus", function() {
+                               if( o.preventFocusZoom ){
+                                       $.mobile.zoom.disable( true );
+                               }
+                       })
+                       .bind( "blur", function() {
+                               if( o.preventFocusZoom ){
+                                       $.mobile.zoom.enable( true );
+                               }
+                       });
+
+               // Autogrow
+               if ( input.is( "textarea" ) ) {
+                       var extraLineHeight = 15,
+                               keyupTimeoutBuffer = 100,
+                               keyup = function() {
+                                       var scrollHeight = input[ 0 ].scrollHeight,
+                                               clientHeight = input[ 0 ].clientHeight;
+
+                                       if ( clientHeight < scrollHeight ) {
+                                               input.height(scrollHeight + extraLineHeight);
+                                       }
+                               },
+                               keyupTimeout;
+
+                       input.keyup(function() {
+                               clearTimeout( keyupTimeout );
+                               keyupTimeout = setTimeout( keyup, keyupTimeoutBuffer );
+                       });
+
+                       // binding to pagechange here ensures that for pages loaded via
+                       // ajax the height is recalculated without user input
+                       $( document ).one( "pagechange", keyup );
+
+                       // Issue 509: the browser is not providing scrollHeight properly until the styles load
+                       if ( $.trim( input.val() ) ) {
+                               // bind to the window load to make sure the height is calculated based on BOTH
+                               // the DOM and CSS
+                               $( window ).load( keyup );
+                       }
+               }
+       },
+
+       disable: function(){
+               ( this.element.attr( "disabled", true ).is( "[type='search'],:jqmData(type='search')" ) ?
+                       this.element.parent() : this.element ).addClass( "ui-disabled" );
+       },
+
+       enable: function(){
+               ( this.element.attr( "disabled", false).is( "[type='search'],:jqmData(type='search')" ) ?
+                       this.element.parent() : this.element ).removeClass( "ui-disabled" );
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ){
+       $.mobile.textinput.prototype.enhanceWithin( e.target, true );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.mobile.listview.prototype.options.filter = false;
+$.mobile.listview.prototype.options.filterPlaceholder = "Filter items...";
+$.mobile.listview.prototype.options.filterTheme = "c";
+$.mobile.listview.prototype.options.filterCallback = function( text, searchValue ){
+       return text.toLowerCase().indexOf( searchValue ) === -1;
+};
+
+$( document ).delegate( ":jqmData(role='listview')", "listviewcreate", function() {
+
+       var list = $( this ),
+               listview = list.data( "listview" );
+
+       if ( !listview.options.filter ) {
+               return;
+       }
+
+       var wrapper = $( "<form>", {
+                       "class": "ui-listview-filter ui-bar-" + listview.options.filterTheme,
+                       "role": "search"
+               }),
+               search = $( "<input>", {
+                       placeholder: listview.options.filterPlaceholder
+               })
+               .attr( "data-" + $.mobile.ns + "type", "search" )
+               .jqmData( "lastval", "" )
+               .bind( "keyup change", function() {
+
+                       var $this = $(this),
+                               val = this.value.toLowerCase(),
+                               listItems = null,
+                               lastval = $this.jqmData( "lastval" ) + "",
+                               childItems = false,
+                               itemtext = "",
+                               item;
+
+                       // Change val as lastval for next execution
+                       $this.jqmData( "lastval" , val );
+                       if ( val.length < lastval.length || val.indexOf(lastval) !== 0 ) {
+
+                               // Removed chars or pasted something totally different, check all items
+                               listItems = list.children();
+                       } else {
+
+                               // Only chars added, not removed, only use visible subset
+                               listItems = list.children( ":not(.ui-screen-hidden)" );
+                       }
+
+                       if ( val ) {
+
+                               // This handles hiding regular rows without the text we search for
+                               // and any list dividers without regular rows shown under it
+
+                               for ( var i = listItems.length - 1; i >= 0; i-- ) {
+                                       item = $( listItems[ i ] );
+                                       itemtext = item.jqmData( "filtertext" ) || item.text();
+
+                                       if ( item.is( "li:jqmData(role=list-divider)" ) ) {
+
+                                               item.toggleClass( "ui-filter-hidequeue" , !childItems );
+
+                                               // New bucket!
+                                               childItems = false;
+
+                                       } else if ( listview.options.filterCallback( itemtext, val ) ) {
+
+                                               //mark to be hidden
+                                               item.toggleClass( "ui-filter-hidequeue" , true );
+                                       } else {
+
+                                               // There's a shown item in the bucket
+                                               childItems = true;
+                                       }
+                               }
+
+                               // Show items, not marked to be hidden
+                               listItems
+                                       .filter( ":not(.ui-filter-hidequeue)" )
+                                       .toggleClass( "ui-screen-hidden", false );
+
+                               // Hide items, marked to be hidden
+                               listItems
+                                       .filter( ".ui-filter-hidequeue" )
+                                       .toggleClass( "ui-screen-hidden", true )
+                                       .toggleClass( "ui-filter-hidequeue", false );
+
+                       } else {
+
+                               //filtervalue is empty => show all
+                               listItems.toggleClass( "ui-screen-hidden", false );
+                       }
+                       listview._refreshCorners();
+               })
+               .appendTo( wrapper )
+               .textinput();
+
+       if ( listview.options.inset ) {
+               wrapper.addClass( "ui-listview-filter-inset" );
+       }
+
+       wrapper.bind( "submit", function() {
+               return false;
+       })
+       .insertBefore( list );
+});
+
+})( jQuery );
+
+( function( $, undefined ) {
+
+$.widget( "mobile.slider", $.mobile.widget, {
+       options: {
+               theme: null,
+               trackTheme: null,
+               disabled: false,
+               initSelector: "input[type='range'], :jqmData(type='range'), :jqmData(role='slider')",
+               mini: false
+       },
+
+       _create: function() {
+
+               // TODO: Each of these should have comments explain what they're for
+               var self = this,
+
+                       control = this.element,
+
+                       parentTheme = $.mobile.getInheritedTheme( control, "c" ),
+
+                       theme = this.options.theme || parentTheme,
+
+                       trackTheme = this.options.trackTheme || parentTheme,
+
+                       cType = control[ 0 ].nodeName.toLowerCase(),
+
+                       selectClass = ( cType == "select" ) ? "ui-slider-switch" : "",
+
+                       controlID = control.attr( "id" ),
+
+                       labelID = controlID + "-label",
+
+                       label = $( "[for='"+ controlID +"']" ).attr( "id", labelID ),
+
+                       val = function() {
+                               return  cType == "input"  ? parseFloat( control.val() ) : control[0].selectedIndex;
+                       },
+
+                       min =  cType == "input" ? parseFloat( control.attr( "min" ) ) : 0,
+
+                       max =  cType == "input" ? parseFloat( control.attr( "max" ) ) : control.find( "option" ).length-1,
+
+                       step = window.parseFloat( control.attr( "step" ) || 1 ),
+
+                       inlineClass = ( this.options.inline || control.jqmData("inline") == true ) ? " ui-slider-inline" : "",
+
+                       miniClass = ( this.options.mini || control.jqmData("mini") ) ? " ui-slider-mini" : "",
+
+
+                       domHandle = document.createElement('a'),
+                       handle = $( domHandle ),
+                       domSlider = document.createElement('div'),
+                       slider = $( domSlider ),
+
+                       valuebg = control.jqmData("highlight") && cType != "select" ? (function() {
+                               var bg = document.createElement('div');
+                               bg.className = 'ui-slider-bg ui-btn-active ui-btn-corner-all';
+                               return $( bg ).prependTo( slider );
+                       })() : false,
+
+                       options;
+
+        domHandle.setAttribute( 'href', "#" );
+               domSlider.setAttribute('role','application');
+               domSlider.className = ['ui-slider ',selectClass," ui-btn-down-",trackTheme,' ui-btn-corner-all', inlineClass, miniClass].join("");
+               domHandle.className = 'ui-slider-handle';
+               domSlider.appendChild(domHandle);
+
+               handle.buttonMarkup({ corners: true, theme: theme, shadow: true })
+                               .attr({
+                                       "role": "slider",
+                                       "aria-valuemin": min,
+                                       "aria-valuemax": max,
+                                       "aria-valuenow": val(),
+                                       "aria-valuetext": val(),
+                                       "title": val(),
+                                       "aria-labelledby": labelID
+                               });
+
+               $.extend( this, {
+                       slider: slider,
+                       handle: handle,
+                       valuebg: valuebg,
+                       dragging: false,
+                       beforeStart: null,
+                       userModified: false,
+                       mouseMoved: false
+               });
+
+               if ( cType == "select" ) {
+                       var wrapper = document.createElement('div');
+                       wrapper.className = 'ui-slider-inneroffset';
+
+                       for(var j = 0,length = domSlider.childNodes.length;j < length;j++){
+                               wrapper.appendChild(domSlider.childNodes[j]);
+                       }
+
+                       domSlider.appendChild(wrapper);
+
+                       // slider.wrapInner( "<div class='ui-slider-inneroffset'></div>" );
+
+                       // make the handle move with a smooth transition
+                       handle.addClass( "ui-slider-handle-snapping" );
+
+                       options = control.find( "option" );
+
+                       for(var i = 0, optionsCount = options.length; i < optionsCount; i++){
+                               var side = !i ? "b":"a",
+                                       sliderTheme = !i ? " ui-btn-down-" + trackTheme :( " " + $.mobile.activeBtnClass ),
+                                       sliderLabel = document.createElement('div'),
+                                       sliderImg = document.createElement('span');
+
+                               sliderImg.className = ['ui-slider-label ui-slider-label-',side,sliderTheme," ui-btn-corner-all"].join("");
+                               sliderImg.setAttribute('role','img');
+                               sliderImg.appendChild(document.createTextNode(options[i].innerHTML));
+                               $(sliderImg).prependTo( slider );
+                       }
+
+                       self._labels = $( ".ui-slider-label", slider );
+
+               }
+
+               label.addClass( "ui-slider" );
+
+               // monitor the input for updated values
+               control.addClass( cType === "input" ? "ui-slider-input" : "ui-slider-switch" )
+                       .change( function() {
+                               // if the user dragged the handle, the "change" event was triggered from inside refresh(); don't call refresh() again
+                               if (!self.mouseMoved) {
+                                       self.refresh( val(), true );
+                               }
+                       })
+                       .keyup( function() { // necessary?
+                               self.refresh( val(), true, true );
+                       })
+                       .blur( function() {
+                               self.refresh( val(), true );
+                       });
+
+               // prevent screen drag when slider activated
+               $( document ).bind( "vmousemove", function( event ) {
+                       if ( self.dragging ) {
+                               // self.mouseMoved must be updated before refresh() because it will be used in the control "change" event
+                               self.mouseMoved = true;
+
+                               if ( cType === "select" ) {
+                                       // make the handle move in sync with the mouse
+                                       handle.removeClass( "ui-slider-handle-snapping" );
+                               }
+
+                               self.refresh( event );
+
+                               // only after refresh() you can calculate self.userModified
+                               self.userModified = self.beforeStart !== control[0].selectedIndex;
+                               return false;
+                       }
+               });
+
+               slider.bind( "vmousedown", function( event ) {
+                       self.dragging = true;
+                       self.userModified = false;
+                       self.mouseMoved = false;
+
+                       if ( cType === "select" ) {
+                               self.beforeStart = control[0].selectedIndex;
+                       }
+
+                       self.refresh( event );
+                       return false;
+               })
+               .bind( "vclick", false );
+
+               slider.add( document )
+                       .bind( "vmouseup", function() {
+                               if ( self.dragging ) {
+
+                                       self.dragging = false;
+
+                                       if ( cType === "select") {
+
+                                               // make the handle move with a smooth transition
+                                               handle.addClass( "ui-slider-handle-snapping" );
+
+                                               if ( self.mouseMoved ) {
+
+                                                       // this is a drag, change the value only if user dragged enough
+                                                       if ( self.userModified ) {
+                                                               self.refresh( self.beforeStart == 0 ? 1 : 0 );
+                                                       }
+                                                       else {
+                                                               self.refresh( self.beforeStart );
+                                                       }
+
+                                               }
+                                               else {
+                                                       // this is just a click, change the value
+                                                       self.refresh( self.beforeStart == 0 ? 1 : 0 );
+                                               }
+
+                                       }
+
+                                       self.mouseMoved = false;
+
+                                       return false;
+                               }
+                       });
+
+               slider.insertAfter( control );
+
+               // Only add focus class to toggle switch, sliders get it automatically from ui-btn
+               if( cType == 'select' ) {
+                       this.handle.bind({
+                               focus: function() {
+                                       slider.addClass( $.mobile.focusClass );
+                               },
+
+                               blur: function() {
+                                       slider.removeClass( $.mobile.focusClass );
+                               }
+                       });
+               }
+
+               this.handle.bind({
+                       // NOTE force focus on handle
+                       vmousedown: function() {
+                               $( this ).focus();
+                       },
+
+                       vclick: false,
+
+                       keydown: function( event ) {
+                               var index = val();
+
+                               if ( self.options.disabled ) {
+                                       return;
+                               }
+
+                               // In all cases prevent the default and mark the handle as active
+                               switch ( event.keyCode ) {
+                                       case $.mobile.keyCode.HOME:
+                                       case $.mobile.keyCode.END:
+                                       case $.mobile.keyCode.PAGE_UP:
+                                       case $.mobile.keyCode.PAGE_DOWN:
+                                       case $.mobile.keyCode.UP:
+                                       case $.mobile.keyCode.RIGHT:
+                                       case $.mobile.keyCode.DOWN:
+                                       case $.mobile.keyCode.LEFT:
+                                               event.preventDefault();
+
+                                               if ( !self._keySliding ) {
+                                                       self._keySliding = true;
+                                                       $( this ).addClass( "ui-state-active" );
+                                               }
+                                               break;
+                               }
+
+                               // move the slider according to the keypress
+                               switch ( event.keyCode ) {
+                                       case $.mobile.keyCode.HOME:
+                                               self.refresh( min );
+                                               break;
+                                       case $.mobile.keyCode.END:
+                                               self.refresh( max );
+                                               break;
+                                       case $.mobile.keyCode.PAGE_UP:
+                                       case $.mobile.keyCode.UP:
+                                       case $.mobile.keyCode.RIGHT:
+                                               self.refresh( index + step );
+                                               break;
+                                       case $.mobile.keyCode.PAGE_DOWN:
+                                       case $.mobile.keyCode.DOWN:
+                                       case $.mobile.keyCode.LEFT:
+                                               self.refresh( index - step );
+                                               break;
+                               }
+                       }, // remove active mark
+
+                       keyup: function( event ) {
+                               if ( self._keySliding ) {
+                                       self._keySliding = false;
+                                       $( this ).removeClass( "ui-state-active" );
+                               }
+                       }
+                       });
+
+               this.refresh(undefined, undefined, true);
+       },
+
+       refresh: function( val, isfromControl, preventInputUpdate ) {
+
+               if ( this.options.disabled || this.element.attr('disabled')) {
+                       this.disable();
+               }
+
+               var control = this.element, percent,
+                       cType = control[0].nodeName.toLowerCase(),
+                       min = cType === "input" ? parseFloat( control.attr( "min" ) ) : 0,
+                       max = cType === "input" ? parseFloat( control.attr( "max" ) ) : control.find( "option" ).length - 1,
+                       step = (cType === "input" && parseFloat( control.attr( "step" ) ) > 0) ? parseFloat(control.attr("step")) : 1;
+
+               if ( typeof val === "object" ) {
+                       var data = val,
+                               // a slight tolerance helped get to the ends of the slider
+                               tol = 8;
+                       if ( !this.dragging ||
+                                       data.pageX < this.slider.offset().left - tol ||
+                                       data.pageX > this.slider.offset().left + this.slider.width() + tol ) {
+                               return;
+                       }
+                       percent = Math.round( ( ( data.pageX - this.slider.offset().left ) / this.slider.width() ) * 100 );
+               } else {
+                       if ( val == null ) {
+                               val = cType === "input" ? parseFloat( control.val() || 0 ) : control[0].selectedIndex;
+                       }
+                       percent = ( parseFloat( val ) - min ) / ( max - min ) * 100;
+               }
+
+               if ( isNaN( percent ) ) {
+                       return;
+               }
+
+               if ( percent < 0 ) {
+                       percent = 0;
+               }
+
+               if ( percent > 100 ) {
+                       percent = 100;
+               }
+
+               var newval = ( percent / 100 ) * ( max - min ) + min;
+
+               //from jQuery UI slider, the following source will round to the nearest step
+               var valModStep = ( newval - min ) % step;
+               var alignValue = newval - valModStep;
+
+               if ( Math.abs( valModStep ) * 2 >= step ) {
+                       alignValue += ( valModStep > 0 ) ? step : ( -step );
+               }
+               // Since JavaScript has problems with large floats, round
+               // the final value to 5 digits after the decimal point (see jQueryUI: #4124)
+               newval = parseFloat( alignValue.toFixed(5) );
+
+               if ( newval < min ) {
+                       newval = min;
+               }
+
+               if ( newval > max ) {
+                       newval = max;
+               }
+
+               this.handle.css( "left", percent + "%" );
+               this.handle.attr( {
+                               "aria-valuenow": cType === "input" ? newval : control.find( "option" ).eq( newval ).attr( "value" ),
+                               "aria-valuetext": cType === "input" ? newval : control.find( "option" ).eq( newval ).getEncodedText(),
+                               title: cType === "input" ? newval : control.find( "option" ).eq( newval ).getEncodedText()
+                       });
+               this.valuebg && this.valuebg.css( "width", percent + "%" );
+
+               // drag the label widths
+               if ( this._labels ) {
+                       var handlePercent = this.handle.width() / this.slider.width() * 100,
+                               aPercent = percent && handlePercent + ( 100 - handlePercent ) * percent / 100,
+                               bPercent = percent === 100 ? 0 : Math.min( handlePercent + 100 - aPercent, 100 );
+
+                       this._labels.each(function(){
+                               var ab = $(this).is( ".ui-slider-label-a" );
+                               $( this ).width( ( ab ? aPercent : bPercent  ) + "%" );
+                       });
+               }
+
+               if ( !preventInputUpdate ) {
+                       var valueChanged = false;
+
+                       // update control"s value
+                       if ( cType === "input" ) {
+                               valueChanged = control.val() !== newval;
+                               control.val( newval );
+                       } else {
+                               valueChanged = control[ 0 ].selectedIndex !== newval;
+                               control[ 0 ].selectedIndex = newval;
+                       }
+                       if ( !isfromControl && valueChanged ) {
+                               control.trigger( "change" );
+                       }
+               }
+       },
+
+       enable: function() {
+               this.element.attr( "disabled", false );
+               this.slider.removeClass( "ui-disabled" ).attr( "aria-disabled", false );
+               return this._setOption( "disabled", false );
+       },
+
+       disable: function() {
+               this.element.attr( "disabled", true );
+               this.slider.addClass( "ui-disabled" ).attr( "aria-disabled", true );
+               return this._setOption( "disabled", true );
+       }
+
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ){
+       $.mobile.slider.prototype.enhanceWithin( e.target, true );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.selectmenu", $.mobile.widget, {
+       options: {
+               theme: null,
+               disabled: false,
+               icon: "arrow-d",
+               iconpos: "right",
+               inline: false,
+               corners: true,
+               shadow: true,
+               iconshadow: true,
+               overlayTheme: "a",
+               hidePlaceholderMenuItems: true,
+               closeText: "Close",
+               nativeMenu: true,
+               // This option defaults to true on iOS devices.
+               preventFocusZoom: /iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1,
+               initSelector: "select:not(:jqmData(role='slider'))",
+               mini: false
+       },
+
+       _button: function(){
+               return $( "<div/>" );
+       },
+
+       _setDisabled: function( value ) {
+               this.element.attr( "disabled", value );
+               this.button.attr( "aria-disabled", value );
+               return this._setOption( "disabled", value );
+       },
+
+       _focusButton : function() {
+               var self = this;
+
+               setTimeout( function() {
+                       self.button.focus();
+               }, 40);
+       },
+
+  _selectOptions: function() {
+    return this.select.find( "option" );
+  },
+
+       // setup items that are generally necessary for select menu extension
+       _preExtension: function(){
+               var classes = "";
+               // TODO: Post 1.1--once we have time to test thoroughly--any classes manually applied to the original element should be carried over to the enhanced element, with an `-enhanced` suffix. See https://github.com/jquery/jquery-mobile/issues/3577
+               /* if( $el[0].className.length ) {
+                       classes = $el[0].className;
+               } */
+               if( !!~this.element[0].className.indexOf( "ui-btn-left" ) ) {
+                       classes =  " ui-btn-left";
+               }
+               
+               if(  !!~this.element[0].className.indexOf( "ui-btn-right" ) ) {
+                       classes = " ui-btn-right";
+               }
+               
+               this.select = this.element.wrap( "<div class='ui-select" + classes + "'>" );
+               this.selectID  = this.select.attr( "id" );
+               this.label = $( "label[for='"+ this.selectID +"']" ).addClass( "ui-select" );
+               this.isMultiple = this.select[ 0 ].multiple;
+               if ( !this.options.theme ) {
+                       this.options.theme = $.mobile.getInheritedTheme( this.select, "c" );
+               }
+       },
+
+       _create: function() {
+               this._preExtension();
+
+               // Allows for extension of the native select for custom selects and other plugins
+               // see select.custom for example extension
+               // TODO explore plugin registration
+               this._trigger( "beforeCreate" );
+
+               this.button = this._button();
+
+               var self = this,
+
+                       options = this.options,
+
+                       // IE throws an exception at options.item() function when
+                       // there is no selected item
+                       // select first in this case
+                       selectedIndex = this.select[ 0 ].selectedIndex == -1 ? 0 : this.select[ 0 ].selectedIndex,
+
+                       // TODO values buttonId and menuId are undefined here
+                       button = this.button
+                               .text( $( this.select[ 0 ].options.item( selectedIndex ) ).text() )
+                               .insertBefore( this.select )
+                               .buttonMarkup( {
+                                       theme: options.theme,
+                                       icon: options.icon,
+                                       iconpos: options.iconpos,
+                                       inline: options.inline,
+                                       corners: options.corners,
+                                       shadow: options.shadow,
+                                       iconshadow: options.iconshadow,
+                                       mini: options.mini
+                               });
+
+               // Opera does not properly support opacity on select elements
+               // In Mini, it hides the element, but not its text
+               // On the desktop,it seems to do the opposite
+               // for these reasons, using the nativeMenu option results in a full native select in Opera
+               if ( options.nativeMenu && window.opera && window.opera.version ) {
+                       this.select.addClass( "ui-select-nativeonly" );
+               }
+
+               // Add counter for multi selects
+               if ( this.isMultiple ) {
+                       this.buttonCount = $( "<span>" )
+                               .addClass( "ui-li-count ui-btn-up-c ui-btn-corner-all" )
+                               .hide()
+                               .appendTo( button.addClass('ui-li-has-count') );
+               }
+
+               // Disable if specified
+               if ( options.disabled || this.element.attr('disabled')) {
+                       this.disable();
+               }
+
+               // Events on native select
+               this.select.change( function() {
+                       self.refresh();
+               });
+
+               this.build();
+       },
+
+       build: function() {
+               var self = this;
+
+               this.select
+                       .appendTo( self.button )
+                       .bind( "vmousedown", function() {
+                               // Add active class to button
+                               self.button.addClass( $.mobile.activeBtnClass );
+                       })
+            .bind( "focus", function() {
+                self.button.addClass( $.mobile.focusClass );
+            })
+            .bind( "blur", function() {
+                self.button.removeClass( $.mobile.focusClass );
+            })
+                       .bind( "focus vmouseover", function() {
+                               self.button.trigger( "vmouseover" );
+                       })
+                       .bind( "vmousemove", function() {
+                               // Remove active class on scroll/touchmove
+                               self.button.removeClass( $.mobile.activeBtnClass );
+                       })
+                       .bind( "change blur vmouseout", function() {
+                               self.button.trigger( "vmouseout" )
+                                       .removeClass( $.mobile.activeBtnClass );
+                       })
+                       .bind( "change blur", function() {
+                               self.button.removeClass( "ui-btn-down-" + self.options.theme );
+                       });
+
+               // In many situations, iOS will zoom into the select upon tap, this prevents that from happening
+               self.button.bind( "vmousedown", function() {
+                       if( self.options.preventFocusZoom ){
+                               $.mobile.zoom.disable( true );
+                       }
+               })
+               .bind( "mouseup", function() {
+                       if( self.options.preventFocusZoom ){
+                               $.mobile.zoom.enable( true );
+                       }
+               });
+       },
+
+       selected: function() {
+               return this._selectOptions().filter( ":selected" );
+       },
+
+       selectedIndices: function() {
+               var self = this;
+
+               return this.selected().map( function() {
+                       return self._selectOptions().index( this );
+               }).get();
+       },
+
+       setButtonText: function() {
+               var self = this, selected = this.selected();
+
+               this.button.find( ".ui-btn-text" ).text( function() {
+                       if ( !self.isMultiple ) {
+                               return selected.text();
+                       }
+
+                       return selected.length ? selected.map( function() {
+                               return $( this ).text();
+                       }).get().join( ", " ) : self.placeholder;
+               });
+       },
+
+       setButtonCount: function() {
+               var selected = this.selected();
+
+               // multiple count inside button
+               if ( this.isMultiple ) {
+                       this.buttonCount[ selected.length > 1 ? "show" : "hide" ]().text( selected.length );
+               }
+       },
+
+       refresh: function() {
+               this.setButtonText();
+               this.setButtonCount();
+       },
+
+       // open and close preserved in native selects
+       // to simplify users code when looping over selects
+       open: $.noop,
+       close: $.noop,
+
+       disable: function() {
+               this._setDisabled( true );
+               this.button.addClass( "ui-disabled" );
+       },
+
+       enable: function() {
+               this._setDisabled( false );
+               this.button.removeClass( "ui-disabled" );
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ){
+       $.mobile.selectmenu.prototype.enhanceWithin( e.target, true );
+});
+})( jQuery );
+
+/*
+* custom "selectmenu" plugin
+*/
+
+(function( $, undefined ) {
+       var extendSelect = function( widget ){
+
+               var select = widget.select,
+                       selectID  = widget.selectID,
+                       label = widget.label,
+                       thisPage = widget.select.closest( ".ui-page" ),
+                       screen = $( "<div>", {"class": "ui-selectmenu-screen ui-screen-hidden"} ).appendTo( thisPage ),
+                       selectOptions = widget._selectOptions(),
+                       isMultiple = widget.isMultiple = widget.select[ 0 ].multiple,
+                       buttonId = selectID + "-button",
+                       menuId = selectID + "-menu",
+                       menuPage = $( "<div data-" + $.mobile.ns + "role='dialog' data-" +$.mobile.ns + "theme='"+ widget.options.theme +"' data-" +$.mobile.ns + "overlay-theme='"+ widget.options.overlayTheme +"'>" +
+                               "<div data-" + $.mobile.ns + "role='header'>" +
+                               "<div class='ui-title'>" + label.getEncodedText() + "</div>"+
+                               "</div>"+
+                               "<div data-" + $.mobile.ns + "role='content'></div>"+
+                               "</div>" ),
+
+                       listbox =  $("<div>", { "class": "ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all ui-body-" + widget.options.overlayTheme + " " + $.mobile.defaultDialogTransition } ).insertAfter(screen),
+
+                       list = $( "<ul>", {
+                               "class": "ui-selectmenu-list",
+                               "id": menuId,
+                               "role": "listbox",
+                               "aria-labelledby": buttonId
+                       }).attr( "data-" + $.mobile.ns + "theme", widget.options.theme ).appendTo( listbox ),
+
+                       header = $( "<div>", {
+                               "class": "ui-header ui-bar-" + widget.options.theme
+                       }).prependTo( listbox ),
+
+                       headerTitle = $( "<h1>", {
+                               "class": "ui-title"
+                       }).appendTo( header ),
+
+                       menuPageContent,
+                       menuPageClose,
+                       headerClose;
+
+               if( widget.isMultiple ) {
+                       headerClose = $( "<a>", {
+                               "text": widget.options.closeText,
+                               "href": "#",
+                               "class": "ui-btn-left"
+                       }).attr( "data-" + $.mobile.ns + "iconpos", "notext" ).attr( "data-" + $.mobile.ns + "icon", "delete" ).appendTo( header ).buttonMarkup();
+               }
+
+               $.extend( widget, {
+                       select: widget.select,
+                       selectID: selectID,
+                       buttonId: buttonId,
+                       menuId: menuId,
+                       thisPage: thisPage,
+                       menuPage: menuPage,
+                       label: label,
+                       screen: screen,
+                       selectOptions: selectOptions,
+                       isMultiple: isMultiple,
+                       theme: widget.options.theme,
+                       listbox: listbox,
+                       list: list,
+                       header: header,
+                       headerTitle: headerTitle,
+                       headerClose: headerClose,
+                       menuPageContent: menuPageContent,
+                       menuPageClose: menuPageClose,
+                       placeholder: "",
+
+                       build: function() {
+                               var self = this;
+
+                               // Create list from select, update state
+                               self.refresh();
+
+                               self.select.attr( "tabindex", "-1" ).focus(function() {
+                                       $( this ).blur();
+                                       self.button.focus();
+                               });
+
+                               // Button events
+                               self.button.bind( "vclick keydown" , function( event ) {
+                                       if ( event.type == "vclick" ||
+                                                        event.keyCode && ( event.keyCode === $.mobile.keyCode.ENTER ||
+                                                                                                                                       event.keyCode === $.mobile.keyCode.SPACE ) ) {
+
+                                               self.open();
+                                               event.preventDefault();
+                                       }
+                               });
+
+                               // Events for list items
+                               self.list.attr( "role", "listbox" )
+                                       .bind( "focusin", function( e ){
+                                               $( e.target )
+                                                       .attr( "tabindex", "0" )
+                                                       .trigger( "vmouseover" );
+
+                                       })
+                                       .bind( "focusout", function( e ){
+                                               $( e.target )
+                                                       .attr( "tabindex", "-1" )
+                                                       .trigger( "vmouseout" );
+                                       })
+                                       .delegate( "li:not(.ui-disabled, .ui-li-divider)", "click", function( event ) {
+
+                                               // index of option tag to be selected
+                                               var oldIndex = self.select[ 0 ].selectedIndex,
+                                                       newIndex = self.list.find( "li:not(.ui-li-divider)" ).index( this ),
+                                                       option = self._selectOptions().eq( newIndex )[ 0 ];
+
+                                               // toggle selected status on the tag for multi selects
+                                               option.selected = self.isMultiple ? !option.selected : true;
+
+                                               // toggle checkbox class for multiple selects
+                                               if ( self.isMultiple ) {
+                                                       $( this ).find( ".ui-icon" )
+                                                               .toggleClass( "ui-icon-checkbox-on", option.selected )
+                                                               .toggleClass( "ui-icon-checkbox-off", !option.selected );
+                                               }
+
+                                               // trigger change if value changed
+                                               if ( self.isMultiple || oldIndex !== newIndex ) {
+                                                       self.select.trigger( "change" );
+                                               }
+
+                                               //hide custom select for single selects only
+                                               if ( !self.isMultiple ) {
+                                                       self.close();
+                                               }
+
+                                               event.preventDefault();
+                                       })
+                                       .keydown(function( event ) {  //keyboard events for menu items
+                                               var target = $( event.target ),
+                                                       li = target.closest( "li" ),
+                                                       prev, next;
+
+                                               // switch logic based on which key was pressed
+                                               switch ( event.keyCode ) {
+                                                       // up or left arrow keys
+                                                case 38:
+                                                       prev = li.prev().not( ".ui-selectmenu-placeholder" );
+
+                                                       if( prev.is( ".ui-li-divider" ) ) {
+                                                               prev = prev.prev();
+                                                       }
+
+                                                       // if there's a previous option, focus it
+                                                       if ( prev.length ) {
+                                                               target
+                                                                       .blur()
+                                                                       .attr( "tabindex", "-1" );
+
+                                                               prev.addClass( "ui-btn-down-" + widget.options.theme ).find( "a" ).first().focus();
+                                                       }
+
+                                                       return false;
+                                                       break;
+
+                                                       // down or right arrow keys
+                                                case 40:
+                                                       next = li.next();
+
+                                                       if( next.is( ".ui-li-divider" ) ) {
+                                                               next = next.next();
+                                                       }
+
+                                                       // if there's a next option, focus it
+                                                       if ( next.length ) {
+                                                               target
+                                                                       .blur()
+                                                                       .attr( "tabindex", "-1" );
+
+                                                               next.addClass( "ui-btn-down-" + widget.options.theme ).find( "a" ).first().focus();
+                                                       }
+
+                                                       return false;
+                                                       break;
+
+                                                       // If enter or space is pressed, trigger click
+                                                case 13:
+                                                case 32:
+                                                       target.trigger( "click" );
+
+                                                       return false;
+                                                       break;
+                                               }
+                                       });
+
+                               // button refocus ensures proper height calculation
+                               // by removing the inline style and ensuring page inclusion
+                               self.menuPage.bind( "pagehide", function() {
+                                       self.list.appendTo( self.listbox );
+                                       self._focusButton();
+
+                                       // TODO centralize page removal binding / handling in the page plugin.
+                                       // Suggestion from @jblas to do refcounting
+                                       //
+                                       // TODO extremely confusing dependency on the open method where the pagehide.remove
+                                       // bindings are stripped to prevent the parent page from disappearing. The way
+                                       // we're keeping pages in the DOM right now sucks
+                                       //
+                                       // rebind the page remove that was unbound in the open function
+                                       // to allow for the parent page removal from actions other than the use
+                                       // of a dialog sized custom select
+                                       //
+                                       // doing this here provides for the back button on the custom select dialog
+                                       $.mobile._bindPageRemove.call( self.thisPage );
+                               });
+
+                               // Events on "screen" overlay
+                               self.screen.bind( "vclick", function( event ) {
+                                       self.close();
+                               });
+
+                               // Close button on small overlays
+                               if( self.isMultiple ){
+                                       self.headerClose.click( function() {
+                                               if ( self.menuType == "overlay" ) {
+                                                       self.close();
+                                                       return false;
+                                               }
+                                       });
+                               }
+
+                               // track this dependency so that when the parent page
+                               // is removed on pagehide it will also remove the menupage
+                               self.thisPage.addDependents( this.menuPage );
+                       },
+
+                       _isRebuildRequired: function() {
+                               var list = this.list.find( "li" ),
+                                       options = this._selectOptions();
+
+                               // TODO exceedingly naive method to determine difference
+                               // ignores value changes etc in favor of a forcedRebuild
+                               // from the user in the refresh method
+                               return options.text() !== list.text();
+                       },
+
+                       refresh: function( forceRebuild , foo ){
+                               var self = this,
+                               select = this.element,
+                               isMultiple = this.isMultiple,
+                               options = this._selectOptions(),
+                               selected = this.selected(),
+                               // return an array of all selected index's
+                               indicies = this.selectedIndices();
+
+                               if (  forceRebuild || this._isRebuildRequired() ) {
+                                       self._buildList();
+                               }
+
+                               self.setButtonText();
+                               self.setButtonCount();
+
+                               self.list.find( "li:not(.ui-li-divider)" )
+                                       .removeClass( $.mobile.activeBtnClass )
+                                       .attr( "aria-selected", false )
+                                       .each(function( i ) {
+
+                                               if ( $.inArray( i, indicies ) > -1 ) {
+                                                       var item = $( this );
+
+                                                       // Aria selected attr
+                                                       item.attr( "aria-selected", true );
+
+                                                       // Multiple selects: add the "on" checkbox state to the icon
+                                                       if ( self.isMultiple ) {
+                                                               item.find( ".ui-icon" ).removeClass( "ui-icon-checkbox-off" ).addClass( "ui-icon-checkbox-on" );
+                                                       } else {
+                                                               if( item.is( ".ui-selectmenu-placeholder" ) ) {
+                                                                       item.next().addClass( $.mobile.activeBtnClass );
+                                                               } else {
+                                                                       item.addClass( $.mobile.activeBtnClass );
+                                                               }
+                                                       }
+                                               }
+                                       });
+                       },
+
+                       close: function() {
+                               if ( this.options.disabled || !this.isOpen ) {
+                                       return;
+                               }
+
+                               var self = this;
+
+                               if ( self.menuType == "page" ) {
+                                       // doesn't solve the possible issue with calling change page
+                                       // where the objects don't define data urls which prevents dialog key
+                                       // stripping - changePage has incoming refactor
+                                       window.history.back();
+                               } else {
+                                       self.screen.addClass( "ui-screen-hidden" );
+                                       self.listbox.addClass( "ui-selectmenu-hidden" ).removeAttr( "style" ).removeClass( "in" );
+                                       self.list.appendTo( self.listbox );
+                                       self._focusButton();
+                               }
+
+                               // allow the dialog to be closed again
+                               self.isOpen = false;
+                       },
+
+                       open: function() {
+                               if ( this.options.disabled ) {
+                                       return;
+                               }
+
+                               var self = this,
+          $window = $( window ),
+          selfListParent = self.list.parent(),
+                                       menuHeight = selfListParent.outerHeight(),
+                                       menuWidth = selfListParent.outerWidth(),
+                                       activePage = $( ".ui-page-active" ),
+                                       tScrollElem = activePage,
+                                       scrollTop = $window.scrollTop(),
+                                       btnOffset = self.button.offset().top,
+                                       screenHeight = $window.height(),
+                                       screenWidth = $window.width();
+
+                               //add active class to button
+                               self.button.addClass( $.mobile.activeBtnClass );
+
+                               //remove after delay
+                               setTimeout( function() {
+                                       self.button.removeClass( $.mobile.activeBtnClass );
+                               }, 300);
+
+                               function focusMenuItem() {
+                                       self.list.find( "." + $.mobile.activeBtnClass + " a" ).focus();
+                               }
+
+                               if ( menuHeight > screenHeight - 80 || !$.support.scrollTop ) {
+
+                                       self.menuPage.appendTo( $.mobile.pageContainer ).page();
+                                       self.menuPageContent = menuPage.find( ".ui-content" );
+                                       self.menuPageClose = menuPage.find( ".ui-header a" );
+
+                                       // prevent the parent page from being removed from the DOM,
+                                       // otherwise the results of selecting a list item in the dialog
+                                       // fall into a black hole
+                                       self.thisPage.unbind( "pagehide.remove" );
+
+                                       //for WebOS/Opera Mini (set lastscroll using button offset)
+                                       if ( scrollTop == 0 && btnOffset > screenHeight ) {
+                                               self.thisPage.one( "pagehide", function() {
+                                                       $( this ).jqmData( "lastScroll", btnOffset );
+                                               });
+                                       }
+
+                                       self.menuPage.one( "pageshow", function() {
+                                               focusMenuItem();
+                                               self.isOpen = true;
+                                       });
+
+                                       self.menuType = "page";
+                                       self.menuPageContent.append( self.list );
+                                       self.menuPage.find("div .ui-title").text(self.label.text());
+                                       $.mobile.changePage( self.menuPage, {
+                                               transition: $.mobile.defaultDialogTransition
+                                       });
+                               } else {
+                                       self.menuType = "overlay";
+
+                                       self.screen.height( $(document).height() )
+                                               .removeClass( "ui-screen-hidden" );
+
+                                       // Try and center the overlay over the button
+                                       var roomtop = btnOffset - scrollTop,
+                                               roombot = scrollTop + screenHeight - btnOffset,
+                                               halfheight = menuHeight / 2,
+                                               maxwidth = parseFloat( self.list.parent().css( "max-width" ) ),
+                                               newtop, newleft;
+
+                                       if ( roomtop > menuHeight / 2 && roombot > menuHeight / 2 ) {
+                                               newtop = btnOffset + ( self.button.outerHeight() / 2 ) - halfheight;
+                                       } else {
+                                               // 30px tolerance off the edges
+                                               newtop = roomtop > roombot ? scrollTop + screenHeight - menuHeight - 30 : scrollTop + 30;
+                                       }
+
+                                       // If the menuwidth is smaller than the screen center is
+                                       if ( menuWidth < maxwidth ) {
+                                               newleft = ( screenWidth - menuWidth ) / 2;
+                                       } else {
+
+                                               //otherwise insure a >= 30px offset from the left
+                                               newleft = self.button.offset().left + self.button.outerWidth() / 2 - menuWidth / 2;
+
+                                               // 30px tolerance off the edges
+                                               if ( newleft < 30 ) {
+                                                       newleft = 30;
+                                               } else if ( (newleft + menuWidth) > screenWidth ) {
+                                                       newleft = screenWidth - menuWidth - 30;
+                                               }
+                                       }
+
+                                       self.listbox.append( self.list )
+                                               .removeClass( "ui-selectmenu-hidden" )
+                                               .css({
+                                                       top: newtop,
+                                                       left: newleft
+                                               })
+                                               .addClass( "in" );
+
+                                       focusMenuItem();
+
+                                       // duplicate with value set in page show for dialog sized selects
+                                       self.isOpen = true;
+                               }
+                       },
+
+                       _buildList: function() {
+                               var self = this,
+                                       o = this.options,
+                                       placeholder = this.placeholder,
+                                       needPlaceholder = true,
+                                       optgroups = [],
+                                       lis = [],
+                                       dataIcon = self.isMultiple ? "checkbox-off" : "false";
+
+                               self.list.empty().filter( ".ui-listview" ).listview( "destroy" );
+
+                               var $options = self.select.find("option"),
+                                       numOptions = $options.length,
+                                       select = this.select[ 0 ],
+                                       dataPrefix = 'data-' + $.mobile.ns,
+                                       dataIndexAttr = dataPrefix + 'option-index',
+                                       dataIconAttr = dataPrefix + 'icon',
+                                       dataRoleAttr = dataPrefix + 'role',
+                                       fragment = document.createDocumentFragment(),
+                                       optGroup;
+
+                               for (var i = 0; i < numOptions;i++){
+                                       var option = $options[i],
+                                               $option = $(option),
+                                               parent = option.parentNode,
+                                               text = $option.text(),
+                                               anchor  = document.createElement('a'),
+                                               classes = [];
+
+                                       anchor.setAttribute('href','#');
+                                       anchor.appendChild(document.createTextNode(text));
+
+                                       // Are we inside an optgroup?
+                                       if (parent !== select && parent.nodeName.toLowerCase() === "optgroup"){
+                                               var optLabel = parent.getAttribute('label');
+                                               if ( optLabel != optGroup) {
+                                                       var divider = document.createElement('li');
+                                                       divider.setAttribute(dataRoleAttr,'list-divider');
+                                                       divider.setAttribute('role','option');
+                                                       divider.setAttribute('tabindex','-1');
+                                                       divider.appendChild(document.createTextNode(optLabel));
+                                                       fragment.appendChild(divider);
+                                                       optGroup = optLabel;
+                                               }
+                                       }
+
+                                       if (needPlaceholder && (!option.getAttribute( "value" ) || text.length == 0 || $option.jqmData( "placeholder" ))) {
+                                               needPlaceholder = false;
+                                               if ( o.hidePlaceholderMenuItems ) {
+                                                       classes.push( "ui-selectmenu-placeholder" );
+                                               }
+                                               if (!placeholder) {
+                                                       placeholder = self.placeholder = text;
+                                               }
+                                       }
+
+                                       var item = document.createElement('li');
+                                       if ( option.disabled ) {
+                                               classes.push( "ui-disabled" );
+                                               item.setAttribute('aria-disabled',true);
+                                       }
+                                       item.setAttribute(dataIndexAttr,i);
+                                       item.setAttribute(dataIconAttr,dataIcon);
+                                       item.className = classes.join(" ");
+                                       item.setAttribute('role','option');
+                                       anchor.setAttribute('tabindex','-1');
+                                       item.appendChild(anchor);
+                                       fragment.appendChild(item);
+                               }
+
+                               self.list[0].appendChild(fragment);
+
+                               // Hide header if it's not a multiselect and there's no placeholder
+                               if ( !this.isMultiple && !placeholder.length ) {
+                                       this.header.hide();
+                               } else {
+                                       this.headerTitle.text( this.placeholder );
+                               }
+
+                               // Now populated, create listview
+                               self.list.listview();
+                       },
+
+                       _button: function(){
+                               return $( "<a>", {
+                                       "href": "#",
+                                       "role": "button",
+                                       // TODO value is undefined at creation
+                                       "id": this.buttonId,
+                                       "aria-haspopup": "true",
+
+                                       // TODO value is undefined at creation
+                                       "aria-owns": this.menuId
+                               });
+                       }
+               });
+       };
+
+       // issue #3894 - core doesn't triggered events on disabled delegates
+       $( document ).bind( "selectmenubeforecreate", function( event ){
+               var selectmenuWidget = $( event.target ).data( "selectmenu" );
+
+               if( !selectmenuWidget.options.nativeMenu ){
+                       extendSelect( selectmenuWidget );
+               }
+       });
+})( jQuery );
+
+(function( $, undefined ) {
+
+
+       $.widget( "mobile.fixedtoolbar", $.mobile.widget, {
+               options: {
+                       visibleOnPageShow: true,
+                       disablePageZoom: true,
+                       transition: "slide", //can be none, fade, slide (slide maps to slideup or slidedown)
+                       fullscreen: false,
+                       tapToggle: true,
+                       tapToggleBlacklist: "a, input, select, textarea, .ui-header-fixed, .ui-footer-fixed",
+                       hideDuringFocus: "input, textarea, select",
+                       updatePagePadding: true,
+                       trackPersistentToolbars: true,
+
+                       // Browser detection! Weeee, here we go...
+                       // Unfortunately, position:fixed is costly, not to mention probably impossible, to feature-detect accurately.
+                       // Some tests exist, but they currently return false results in critical devices and browsers, which could lead to a broken experience.
+                       // Testing fixed positioning is also pretty obtrusive to page load, requiring injected elements and scrolling the window
+                       // The following function serves to rule out some popular browsers with known fixed-positioning issues
+                       // This is a plugin option like any other, so feel free to improve or overwrite it
+                       supportBlacklist: function(){
+                               var w = window,
+                                       ua = navigator.userAgent,
+                                       platform = navigator.platform,
+                                       // Rendering engine is Webkit, and capture major version
+                                       wkmatch = ua.match( /AppleWebKit\/([0-9]+)/ ),
+                                       wkversion = !!wkmatch && wkmatch[ 1 ],
+                                       ffmatch = ua.match( /Fennec\/([0-9]+)/ ),
+                                       ffversion = !!ffmatch && ffmatch[ 1 ],
+                                       operammobilematch = ua.match( /Opera Mobi\/([0-9]+)/ ),
+                                       omversion = !!operammobilematch && operammobilematch[ 1 ];
+
+                               if(
+                                       // iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5)
+                                       ( ( platform.indexOf( "iPhone" ) > -1 || platform.indexOf( "iPad" ) > -1  || platform.indexOf( "iPod" ) > -1 ) && wkversion && wkversion < 534 )
+                                       ||
+                                       // Opera Mini
+                                       ( w.operamini && ({}).toString.call( w.operamini ) === "[object OperaMini]" )
+                                       ||
+                                       ( operammobilematch && omversion < 7458 )
+                                       ||
+                                       //Android lte 2.1: Platform is Android and Webkit version is less than 533 (Android 2.2)
+                                       ( ua.indexOf( "Android" ) > -1 && wkversion && wkversion < 533 )
+                                       ||
+                                       // Firefox Mobile before 6.0 -
+                                       ( ffversion && ffversion < 6 )
+                                       ||
+                                       // WebOS less than 3
+                                       ( "palmGetResource" in window && wkversion && wkversion < 534 )
+                                       ||
+                                       // MeeGo
+                                       ( ua.indexOf( "MeeGo" ) > -1 && ua.indexOf( "NokiaBrowser/8.5.0" ) > -1 )
+                               ){
+                                       return true;
+                               }
+
+                               return false;
+                       },
+                       initSelector: ":jqmData(position='fixed')"
+               },
+
+               _create: function() {
+
+                       var self = this,
+                               o = self.options,
+                               $el = self.element,
+                               tbtype = $el.is( ":jqmData(role='header')" ) ? "header" : "footer",
+                               $page = $el.closest(".ui-page");
+
+                       // Feature detecting support for
+                       if( o.supportBlacklist() ){
+                               self.destroy();
+                               return;
+                       }
+
+                       $el.addClass( "ui-"+ tbtype +"-fixed" );
+
+                       // "fullscreen" overlay positioning
+                       if( o.fullscreen ){
+                               $el.addClass( "ui-"+ tbtype +"-fullscreen" );
+                               $page.addClass( "ui-page-" + tbtype + "-fullscreen" );
+                       }
+                       // If not fullscreen, add class to page to set top or bottom padding
+                       else{
+                               $page.addClass( "ui-page-" + tbtype + "-fixed" );
+                       }
+
+                       self._addTransitionClass();
+                       self._bindPageEvents();
+                       self._bindToggleHandlers();
+               },
+
+               _addTransitionClass: function(){
+                       var tclass = this.options.transition;
+
+                       if( tclass && tclass !== "none" ){
+                               // use appropriate slide for header or footer
+                               if( tclass === "slide" ){
+                                       tclass = this.element.is( ".ui-header" ) ? "slidedown" : "slideup";
+                               }
+
+                               this.element.addClass( tclass );
+                       }
+               },
+
+               _bindPageEvents: function(){
+                       var self = this,
+                               o = self.options,
+                               $el = self.element;
+
+                       //page event bindings
+                       // Fixed toolbars require page zoom to be disabled, otherwise usability issues crop up
+                       // This method is meant to disable zoom while a fixed-positioned toolbar page is visible
+                       $el.closest( ".ui-page" )
+                               .bind( "pagebeforeshow", function(){
+                                       if( o.disablePageZoom ){
+                                               $.mobile.zoom.disable( true );
+                                       }
+                                       if( !o.visibleOnPageShow ){
+                                               self.hide( true );
+                                       }
+                               } )
+                               .bind( "webkitAnimationStart animationstart updatelayout", function(){
+                                       if( o.updatePagePadding ){
+                                               self.updatePagePadding();
+                                       }
+                               })
+                               .bind( "pageshow", function(){
+                                       self.updatePagePadding();
+                                       if( o.updatePagePadding ){
+                                               $( window ).bind( "throttledresize." + self.widgetName, function(){
+                                                       self.updatePagePadding();
+                                               });
+                                       }
+                               })
+                               .bind( "pagebeforehide", function( e, ui ){
+                                       if( o.disablePageZoom ){
+                                               $.mobile.zoom.enable( true );
+                                       }
+                                       if( o.updatePagePadding ){
+                                               $( window ).unbind( "throttledresize." + self.widgetName );
+                                       }
+
+                                       if( o.trackPersistentToolbars ){
+                                               var thisFooter = $( ".ui-footer-fixed:jqmData(id)", this ),
+                                                       thisHeader = $( ".ui-header-fixed:jqmData(id)", this ),
+                                                       nextFooter = thisFooter.length && ui.nextPage && $( ".ui-footer-fixed:jqmData(id='" + thisFooter.jqmData( "id" ) + "')", ui.nextPage ),
+                                                       nextHeader = thisHeader.length && ui.nextPage && $( ".ui-header-fixed:jqmData(id='" + thisHeader.jqmData( "id" ) + "')", ui.nextPage );
+
+                                               nextFooter = nextFooter || $();
+
+                                                       if( nextFooter.length || nextHeader.length ){
+
+                                                               nextFooter.add( nextHeader ).appendTo( $.mobile.pageContainer );
+
+                                                               ui.nextPage.one( "pageshow", function(){
+                                                                       nextFooter.add( nextHeader ).appendTo( this );
+                                                               });
+                                                       }
+                                       }
+                               });
+               },
+
+               _visible: true,
+
+               // This will set the content element's top or bottom padding equal to the toolbar's height
+               updatePagePadding: function() {
+                       var $el = this.element,
+                               header = $el.is( ".ui-header" );
+
+                       // This behavior only applies to "fixed", not "fullscreen"
+                       if( this.options.fullscreen ){ return; }
+
+                       $el.closest( ".ui-page" ).css( "padding-" + ( header ? "top" : "bottom" ), $el.outerHeight() );
+               },
+               
+               _useTransition: function( notransition ){
+                       var $win = $( window ),
+                               $el = this.element,
+                               scroll = $win.scrollTop(),
+                               elHeight = $el.height(),
+                               pHeight = $el.closest( ".ui-page" ).height(),
+                               viewportHeight = $.mobile.getScreenHeight(),
+                               tbtype = $el.is( ":jqmData(role='header')" ) ? "header" : "footer";
+                               
+                       return !notransition &&
+                               ( this.options.transition && this.options.transition !== "none" &&
+                               (
+                                       ( tbtype === "header" && !this.options.fullscreen && scroll > elHeight ) ||
+                                       ( tbtype === "footer" && !this.options.fullscreen && scroll + viewportHeight < pHeight - elHeight )
+                               ) || this.options.fullscreen
+                               );
+               },
+
+               show: function( notransition ){
+                       var hideClass = "ui-fixed-hidden",
+                               $el = this.element;
+
+                               if( this._useTransition( notransition ) ){
+                               $el
+                                       .removeClass( "out " + hideClass )
+                                       .addClass( "in" );
+                       }
+                       else {
+                               $el.removeClass( hideClass );
+                       }
+                       this._visible = true;
+               },
+
+               hide: function( notransition ){
+                       var hideClass = "ui-fixed-hidden",
+                               $el = this.element,
+                               // if it's a slide transition, our new transitions need the reverse class as well to slide outward
+                               outclass = "out" + ( this.options.transition === "slide" ? " reverse" : "" );
+
+                       if( this._useTransition( notransition ) ){
+                               $el
+                                       .addClass( outclass )
+                                       .removeClass( "in" )
+                                       .animationComplete( function(){
+                                               $el.addClass( hideClass ).removeClass( outclass );
+                                       });
+                       }
+                       else {
+                               $el.addClass( hideClass ).removeClass( outclass );
+                       }
+                       this._visible = false;
+               },
+
+               toggle: function(){
+                       this[ this._visible ? "hide" : "show" ]();
+               },
+
+               _bindToggleHandlers: function(){
+                       var self = this,
+                               o = self.options,
+                               $el = self.element;
+
+                       // tap toggle
+                       $el.closest( ".ui-page" )
+                               .bind( "vclick", function( e ){
+                                       if( o.tapToggle && !$( e.target ).closest( o.tapToggleBlacklist ).length ){
+                                               self.toggle();
+                                       }
+                               })
+                               .bind( "focusin focusout", function( e ){
+                                       if( screen.width < 500 && $( e.target ).is( o.hideDuringFocus ) && !$( e.target ).closest( ".ui-header-fixed, .ui-footer-fixed" ).length ){
+                                               self[ ( e.type === "focusin" && self._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" );
+               }
+
+       });
+
+       //auto self-init widgets
+       $( document )
+               .bind( "pagecreate create", function( e ){
+                       
+                       // DEPRECATED in 1.1: support for data-fullscreen=true|false on the page element.
+                       // This line ensures it still works, but we recommend moving the attribute to the toolbars themselves.
+                       if( $( e.target ).jqmData( "fullscreen" ) ){
+                               $( $.mobile.fixedtoolbar.prototype.options.initSelector, e.target ).not( ":jqmData(fullscreen)" ).jqmData( "fullscreen", true );
+                       }
+                       
+                       $.mobile.fixedtoolbar.prototype.enhanceWithin( e.target );
+               });
+
+})( jQuery );
+
+( function( $, window ) {
+       
+       // This fix addresses an iOS bug, so return early if the UA claims it's something else.
+       if( !(/iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1 ) ){
+               return;
+       }
+       
+    var zoom = $.mobile.zoom,
+               evt, x, y, z, aig;
+       
+    function checkTilt( e ){
+               evt = e.originalEvent;
+               aig = evt.accelerationIncludingGravity;
+               
+               x = Math.abs( aig.x );
+               y = Math.abs( aig.y );
+               z = Math.abs( aig.z );
+                               
+               // If portrait orientation and in one of the danger zones
+        if( !window.orientation && ( x > 7 || ( ( z > 6 && y < 8 || z < 8 && y > 6 ) && x > 5 ) ) ){
+                       if( zoom.enabled ){
+                               zoom.disable();
+                       }               
+        }
+               else if( !zoom.enabled ){
+                       zoom.enable();
+        }
+    }
+
+    $( window )
+               .bind( "orientationchange.iosorientationfix", zoom.enable )
+               .bind( "devicemotion.iosorientationfix", checkTilt );
+
+}( jQuery, this ));
+
+( function( $, window, undefined ) {
+       var     $html = $( "html" ),
+                       $head = $( "head" ),
+                       $window = $( window );
+
+       // trigger mobileinit event - useful hook for configuring $.mobile settings before they're used
+       $( window.document ).trigger( "mobileinit" );
+
+       // support conditions
+       // if device support condition(s) aren't met, leave things as they are -> a basic, usable experience,
+       // otherwise, proceed with the enhancements
+       if ( !$.mobile.gradeA() ) {
+               return;
+       }
+
+       // override ajaxEnabled on platforms that have known conflicts with hash history updates
+       // or generally work better browsing in regular http for full page refreshes (BB5, Opera Mini)
+       if ( $.mobile.ajaxBlacklist ) {
+               $.mobile.ajaxEnabled = false;
+       }
+
+       // Add mobile, initial load "rendering" classes to docEl
+       $html.addClass( "ui-mobile ui-mobile-rendering" );
+
+       // This is a fallback. If anything goes wrong (JS errors, etc), or events don't fire,
+       // this ensures the rendering class is removed after 5 seconds, so content is visible and accessible
+       setTimeout( hideRenderingClass, 5000 );
+
+       // loading div which appears during Ajax requests
+       // will not appear if $.mobile.loadingMessage is false
+       var loaderClass = "ui-loader",
+               $loader = $( "<div class='" + loaderClass + "'><span class='ui-icon ui-icon-loading'></span><h1></h1></div>" );
+
+       // For non-fixed supportin browsers. Position at y center (if scrollTop supported), above the activeBtn (if defined), or just 100px from top
+       function fakeFixLoader(){
+               var activeBtn = $( "." + $.mobile.activeBtnClass ).first();
+
+               $loader
+                       .css({
+                               top: $.support.scrollTop && $window.scrollTop() + $window.height() / 2 ||
+                               activeBtn.length && activeBtn.offset().top || 100
+                       });
+       }
+
+       // check position of loader to see if it appears to be "fixed" to center
+       // if not, use abs positioning
+       function checkLoaderPosition(){
+               var offset = $loader.offset(),
+                       scrollTop = $window.scrollTop(),
+                       screenHeight = $.mobile.getScreenHeight();
+
+               if( offset.top < scrollTop || (offset.top - scrollTop) > screenHeight ) {
+                       $loader.addClass( "ui-loader-fakefix" );
+                       fakeFixLoader();
+                       $window
+                               .unbind( "scroll", checkLoaderPosition )
+                               .bind( "scroll", fakeFixLoader );
+               }
+       }
+
+       //remove initial build class (only present on first pageshow)
+       function hideRenderingClass(){
+               $html.removeClass( "ui-mobile-rendering" );
+       }
+
+       $.extend($.mobile, {
+               // turn on/off page loading message.
+               showPageLoadingMsg: function( theme, msgText, textonly ) {
+                       $html.addClass( "ui-loading" );
+
+                       if ( $.mobile.loadingMessage ) {
+                               // text visibility from argument takes priority
+                               var textVisible = textonly || $.mobile.loadingMessageTextVisible;
+
+                               theme = theme || $.mobile.loadingMessageTheme,
+
+                               $loader
+                                       .attr( "class", loaderClass + " ui-corner-all ui-body-" + ( theme || "a" ) + " ui-loader-" + ( textVisible ? "verbose" : "default" ) + ( textonly ? " ui-loader-textonly" : "" ) )
+                                       .find( "h1" )
+                                               .text( msgText || $.mobile.loadingMessage )
+                                               .end()
+                                       .appendTo( $.mobile.pageContainer );
+
+                               checkLoaderPosition();
+                               $window.bind( "scroll", checkLoaderPosition );
+                       }
+               },
+
+               hidePageLoadingMsg: function() {
+                       $html.removeClass( "ui-loading" );
+
+                       if( $.mobile.loadingMessage ){
+                               $loader.removeClass( "ui-loader-fakefix" );
+                       }
+
+                       $( window ).unbind( "scroll", fakeFixLoader );
+                       $( window ).unbind( "scroll", checkLoaderPosition );
+               },
+
+               // find and enhance the pages in the dom and transition to the first page.
+               initializePage: function() {
+                       // find present pages
+                       var $pages = $( ":jqmData(role='page'), :jqmData(role='dialog')" );
+
+                       // if no pages are found, create one with body's inner html
+                       if ( !$pages.length ) {
+                               $pages = $( "body" ).wrapInner( "<div data-" + $.mobile.ns + "role='page'></div>" ).children( 0 );
+                       }
+
+                       // add dialogs, set data-url attrs
+                       $pages.each(function() {
+                               var $this = $(this);
+
+                               // unless the data url is already set set it to the pathname
+                               if ( !$this.jqmData("url") ) {
+                                       $this.attr( "data-" + $.mobile.ns + "url", $this.attr( "id" ) || location.pathname + location.search );
+                               }
+                       });
+
+                       // define first page in dom case one backs out to the directory root (not always the first page visited, but defined as fallback)
+                       $.mobile.firstPage = $pages.first();
+
+                       // define page container
+                       $.mobile.pageContainer = $pages.first().parent().addClass( "ui-mobile-viewport" );
+
+                       // alert listeners that the pagecontainer has been determined for binding
+                       // to events triggered on it
+                       $window.trigger( "pagecontainercreate" );
+
+                       // cue page loading message
+                       $.mobile.showPageLoadingMsg();
+
+                       //remove initial build class (only present on first pageshow)
+                       hideRenderingClass();
+
+                       // if hashchange listening is disabled or there's no hash deeplink, change to the first page in the DOM
+                       if ( !$.mobile.hashListeningEnabled || !$.mobile.path.stripHash( location.hash ) ) {
+                               $.mobile.changePage( $.mobile.firstPage, { transition: "none", reverse: true, changeHash: false, fromHashChange: true } );
+                       }
+                       // otherwise, trigger a hashchange to load a deeplink
+                       else {
+                               $window.trigger( "hashchange", [ true ] );
+                       }
+               }
+       });
+
+       // initialize events now, after mobileinit has occurred
+       $.mobile._registerInternalEvents();
+
+       // check which scrollTop value should be used by scrolling to 1 immediately at domready
+       // then check what the scroll top is. Android will report 0... others 1
+       // note that this initial scroll won't hide the address bar. It's just for the check.
+       $(function() {
+               window.scrollTo( 0, 1 );
+
+               // if defaultHomeScroll hasn't been set yet, see if scrollTop is 1
+               // it should be 1 in most browsers, but android treats 1 as 0 (for hiding addr bar)
+               // so if it's 1, use 0 from now on
+               $.mobile.defaultHomeScroll = ( !$.support.scrollTop || $(window).scrollTop() === 1 ) ? 0 : 1;
+
+
+               // TODO: Implement a proper registration mechanism with dependency handling in order to not have exceptions like the one below
+               //auto self-init widgets for those widgets that have a soft dependency on others
+               if ( $.fn.controlgroup ) {
+                       $( document ).bind( "pagecreate create", function( e ){
+                               $( ":jqmData(role='controlgroup')", e.target )
+                                       .jqmEnhanceable()
+                                       .controlgroup({ excludeInvisible: false });
+                       });
+               }
+
+               //dom-ready inits
+               if( $.mobile.autoInitializePage ){
+                       $.mobile.initializePage();
+               }
+
+               // window load event
+               // hide iOS browser chrome on load
+               $window.load( $.mobile.silentScroll );
+       });
+}( jQuery, this ));
+
+
+}));
diff --git a/org.tizen.common.verrari/templates/cli/jqm-common-resources/js/main.js b/org.tizen.common.verrari/templates/cli/jqm-common-resources/js/main.js
new file mode 100644 (file)
index 0000000..8b8abd3
--- /dev/null
@@ -0,0 +1,10 @@
+/*
+ * Copyright $@{YEAR()} $@{USER()} All rights reserved.
+ */
+
+//Initialize function
+var init = function () {
+    // TODO:: Do your initialization job
+    console.log("init() called");
+};
+$(document).bind('pageinit', init);
diff --git a/org.tizen.common.verrari/templates/cli/jqm-masterdetail/META-INF/MANIFEST.MF b/org.tizen.common.verrari/templates/cli/jqm-masterdetail/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..98813f3
--- /dev/null
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Tizen-Template-Name: jqm-masterdetail
+Tizen-Template-Description: jQuery Mobile - MasterDetail
+Tizen-Template-Tags: jquery,jqm,master,detail
+Tizen-Template-Version: 0.1
+Tizen-Template-Dependency: common-resources;jqm-common-resources
+Tizen-Template-Exclude: META-INF/*;*.template
diff --git a/org.tizen.common.verrari/templates/cli/jqm-masterdetail/META-INF/messages.properties b/org.tizen.common.verrari/templates/cli/jqm-masterdetail/META-INF/messages.properties
new file mode 100644 (file)
index 0000000..1933a5b
--- /dev/null
@@ -0,0 +1,4 @@
+#Properties file for jqm-masterdetail.jar
+MetaDescriptionContent = HTML meta description [string][optional]
+HtmlTitle = HTML Title [string][optional]
+JQMTheme = jQuery Mobile Theme [a,b,c,d or e][optional]
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/cli/jqm-masterdetail/head.template b/org.tizen.common.verrari/templates/cli/jqm-masterdetail/head.template
new file mode 100644 (file)
index 0000000..11e6cb4
--- /dev/null
@@ -0,0 +1,20 @@
+<!------------------------------------------------------------------------------------------------
+ Copyright $@{YEAR()} $@{USER()} All rights reserved.
+------------------------------------------------------------------------------------------------->
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
+    <meta name="description" content="$${MetaDescriptionContent|"Tizen template generated by Tizen Web IDE"}"/>
+
+    <title>$${HtmlTitle|"Title"}</title>
+
+    <link rel="stylesheet" href="./css/jquery.mobile-1.1.0.css"/>
+    <script type="text/javascript" src="./js/jquery-1.7.1.js"></script>
+    <script type="text/javascript" src="./js/jquery.mobile-1.1.0.js"></script>
+    <script type="text/javascript" src="./js/main.js"></script>
+    <link rel="stylesheet" type="text/css" href="./css/style.css"/>
+</head>
+
diff --git a/org.tizen.common.verrari/templates/cli/jqm-masterdetail/index.html b/org.tizen.common.verrari/templates/cli/jqm-masterdetail/index.html
new file mode 100644 (file)
index 0000000..cead747
--- /dev/null
@@ -0,0 +1,40 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page" class="type-interior" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Master-Detail Application</h1>
+        <a href="index.html" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <div class="content-primary">
+            <h2>Introduction</h2>
+            <p>This template is for a master-detail structured application.</p>
+            <ul>
+                <li>Left bars to navigate details (master)
+                <li>Right content pane (detail)
+            </ul>
+        </div><!--/content-primary -->
+
+        <div class="content-secondary">
+            <div data-role="collapsible" data-collapsed="true" data-content-theme="$${JQMTheme|'c'}">
+                <h3>More in this section</h3>
+                <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}">
+                    <li data-role="list-divider">Details</li>
+                    <li><a href="index.html">Introduction</a></li>
+                    <li><a href="section1.html">Section 1</a></li>
+                    <li><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" class="footer-docs" data-theme="$${JQMTheme|'a'}" data-position="fixed">
+        <p>&copy; Your Company</p>
+    </div><!-- /footer -->
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/jqm-masterdetail/section1.html b/org.tizen.common.verrari/templates/cli/jqm-masterdetail/section1.html
new file mode 100644 (file)
index 0000000..52a2e06
--- /dev/null
@@ -0,0 +1,37 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page" class="type-interior" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Master-Detail Application</h1>
+        <a href="index.html" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <div class="content-primary">
+            <h2>Section 1</h2>
+
+            <p>This is Section 1.</p>
+        </div><!--/content-primary -->
+
+        <div class="content-secondary">
+            <div data-role="collapsible" data-collapsed="true" data-content-theme="$${JQMTheme|'c'}">
+                <h3>More in this section</h3>
+                <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}">
+                    <li data-role="list-divider">Details</li>
+                    <li><a href="index.html">Introduction</a></li>
+                    <li><a href="section1.html">Section 1</a></li>
+                    <li><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" class="footer-docs" data-theme="$${JQMTheme|'a'}" data-position="fixed">
+        <p></p>
+    </div>
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/jqm-masterdetail/section2.html b/org.tizen.common.verrari/templates/cli/jqm-masterdetail/section2.html
new file mode 100644 (file)
index 0000000..e198e70
--- /dev/null
@@ -0,0 +1,37 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page" class="type-interior" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Master-Detail Application</h1>
+        <a href="index.html" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <div class="content-primary">
+            <h2>Section 2</h2>
+
+            <p>This is Section 2.</p>
+        </div><!--/content-primary -->
+
+        <div class="content-secondary">
+            <div data-role="collapsible" data-collapsed="true" data-content-theme="$${JQMTheme|'c'}">
+                <h3>More in this section</h3>
+                <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}">
+                    <li data-role="list-divider">Details</li>
+                    <li><a href="index.html">Introduction</a></li>
+                    <li><a href="section1.html">Section 1</a></li>
+                    <li><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" class="footer-docs" data-theme="$${JQMTheme|'a'}" data-position="fixed">
+        <p></p>
+    </div>
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/jqm-multipage/META-INF/MANIFEST.MF b/org.tizen.common.verrari/templates/cli/jqm-multipage/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..0e93c8b
--- /dev/null
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Tizen-Template-Name: jqm-multipage
+Tizen-Template-Description: jQuery Mobile - Multi Page
+Tizen-Template-Tags: jquery,jqm,multipage,multi
+Tizen-Template-Version: 0.1
+Tizen-Template-Dependency: common-resources;jqm-common-resources
+Tizen-Template-Exclude: META-INF/*;*.template
diff --git a/org.tizen.common.verrari/templates/cli/jqm-multipage/META-INF/messages.properties b/org.tizen.common.verrari/templates/cli/jqm-multipage/META-INF/messages.properties
new file mode 100644 (file)
index 0000000..b2d3f27
--- /dev/null
@@ -0,0 +1,4 @@
+#Properties file for jqm-multipage.jar
+MetaDescriptionContent = HTML meta description [string][optional]
+HtmlTitle = HTML Title [string][optional]
+JQMTheme = jQuery Mobile Theme [a,b,c,d or e][optional]
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/cli/jqm-multipage/head.template b/org.tizen.common.verrari/templates/cli/jqm-multipage/head.template
new file mode 100644 (file)
index 0000000..11e6cb4
--- /dev/null
@@ -0,0 +1,20 @@
+<!------------------------------------------------------------------------------------------------
+ Copyright $@{YEAR()} $@{USER()} All rights reserved.
+------------------------------------------------------------------------------------------------->
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
+    <meta name="description" content="$${MetaDescriptionContent|"Tizen template generated by Tizen Web IDE"}"/>
+
+    <title>$${HtmlTitle|"Title"}</title>
+
+    <link rel="stylesheet" href="./css/jquery.mobile-1.1.0.css"/>
+    <script type="text/javascript" src="./js/jquery-1.7.1.js"></script>
+    <script type="text/javascript" src="./js/jquery.mobile-1.1.0.js"></script>
+    <script type="text/javascript" src="./js/main.js"></script>
+    <link rel="stylesheet" type="text/css" href="./css/style.css"/>
+</head>
+
diff --git a/org.tizen.common.verrari/templates/cli/jqm-multipage/index.html b/org.tizen.common.verrari/templates/cli/jqm-multipage/index.html
new file mode 100644 (file)
index 0000000..c2a21c0
--- /dev/null
@@ -0,0 +1,100 @@
+$$include{"head.template"}
+
+<body>
+
+<!-- Start of first page: #one -->
+<div data-role="page" id="one" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Multi-Page Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <h2>One</h2>
+        <p>
+            This is a multi-page boilerplate template that you can copy to build
+            your first jQuery Mobile page. This template contains multiple "page"
+            containers inside.
+        </p>
+        <p>
+            You link to internal pages by referring to the ID of the page you
+            want to show. For example, to <a href="#two">link</a> to the page
+            with an ID of "two", my link would have a
+            <code>href="#two"</code>
+            in the code.
+        </p>
+
+        <h3>Show internal pages:</h3>
+        <p>
+            <a href="#two" data-role="button">Show page "two"</a>
+        </p>
+        <p>
+            <a href="#popup" data-role="button" data-rel="dialog"
+                data-transition="pop">Show page "popup" (as a dialog)</a>
+        </p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page one -->
+
+
+<!-- Start of second page: #two -->
+<div data-role="page" id="two" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Two</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <h2>Two</h2>
+        <p>I have an id of "two" on my page container. I'm the second
+            page container in this multi-page template.</p>
+        <p>
+            Notice that the theme is different for this page because we've added
+            a few
+            <code>data-theme</code>
+            swatch assigments here to show off how flexible it is. You can add
+            any content or widget to these pages, but we're keeping these
+            simple.
+        </p>
+        <p>
+            <a href="#one" data-direction="reverse" data-role="button">Back to page "one"</a>
+        </p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page two -->
+
+
+<!-- Start of third page: #popup -->
+<div data-role="page" id="popup" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Dialog</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <h2>Popup</h2>
+        <p>
+            I have an id of "popup" on my page container and only look like a
+            dialog because the link to me had a
+            <code>data-rel="dialog"</code>
+            attribute which gives me this inset look and a
+            <code>data-transition="pop"</code>
+            attribute to change the transition to pop. Without this, I'd be
+            styled as a normal page.
+        </p>
+        <p>
+            <a href="#one" data-rel="back" data-role="button" data-inline="true"
+                data-icon="back">Back to page "one"</a>
+        </p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page popup -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/jqm-navigation/META-INF/MANIFEST.MF b/org.tizen.common.verrari/templates/cli/jqm-navigation/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..4203058
--- /dev/null
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Tizen-Template-Name: jqm-navigation
+Tizen-Template-Description: jQuery Mobile - Navigation
+Tizen-Template-Tags: jquery,jqm,navigation
+Tizen-Template-Version: 0.1
+Tizen-Template-Dependency: common-resources;jqm-common-resources
+Tizen-Template-Exclude: META-INF/*;*.template
diff --git a/org.tizen.common.verrari/templates/cli/jqm-navigation/META-INF/messages.properties b/org.tizen.common.verrari/templates/cli/jqm-navigation/META-INF/messages.properties
new file mode 100644 (file)
index 0000000..2c21e83
--- /dev/null
@@ -0,0 +1,4 @@
+#Properties file for jqm-navigation.jar
+MetaDescriptionContent = HTML meta description [string][optional]
+HtmlTitle = HTML Title [string][optional]
+JQMTheme = jQuery Mobile Theme [a,b,c,d or e][optional]
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/cli/jqm-navigation/head.template b/org.tizen.common.verrari/templates/cli/jqm-navigation/head.template
new file mode 100644 (file)
index 0000000..11e6cb4
--- /dev/null
@@ -0,0 +1,20 @@
+<!------------------------------------------------------------------------------------------------
+ Copyright $@{YEAR()} $@{USER()} All rights reserved.
+------------------------------------------------------------------------------------------------->
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
+    <meta name="description" content="$${MetaDescriptionContent|"Tizen template generated by Tizen Web IDE"}"/>
+
+    <title>$${HtmlTitle|"Title"}</title>
+
+    <link rel="stylesheet" href="./css/jquery.mobile-1.1.0.css"/>
+    <script type="text/javascript" src="./js/jquery-1.7.1.js"></script>
+    <script type="text/javascript" src="./js/jquery.mobile-1.1.0.js"></script>
+    <script type="text/javascript" src="./js/main.js"></script>
+    <link rel="stylesheet" type="text/css" href="./css/style.css"/>
+</head>
+
diff --git a/org.tizen.common.verrari/templates/cli/jqm-navigation/index.html b/org.tizen.common.verrari/templates/cli/jqm-navigation/index.html
new file mode 100644 (file)
index 0000000..1f6f72a
--- /dev/null
@@ -0,0 +1,32 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page" id="foo" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}" style="margin-top: 0;">
+                    <li><a href="index.html">Classic</a></li>
+                    <li><a href="index.html">2011 Hit song</a></li>
+                    <li><a href="index.html">In the gym</a></li>
+                    <li><a href="index.html">For baby</a></li>
+                    <li><a href="index.html">My favorite </a></li>
+                </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="fool" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <div data-role="navbar">
+            <ul>
+                <li><a href="index.html" class="ui-btn-active ui-state-persist">Play List</a></li>
+                <li><a href="section1.html">Music</a></li>
+                <li><a href="section2.html">Artist</a></li>
+            </ul>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/jqm-navigation/section1.html b/org.tizen.common.verrari/templates/cli/jqm-navigation/section1.html
new file mode 100644 (file)
index 0000000..4d1d526
--- /dev/null
@@ -0,0 +1,34 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page" id="foo" data-position="fixed" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}" style="margin-top: 0;">
+                    <li><a href="index.html">All I Want For Chritsmas Is You</a></li>
+                    <li><a href="index.html">Baby(Feat.Ludacris)</a></li>
+                    <li><a href="index.html">Baby I Love You</a></li>
+                    <li><a href="index.html">Because Of You</a></li>
+                    <li><a href="index.html">Geek In The Pink</a></li>
+                    <li><a href="index.html">Hangover (Feat. Flo Rida)</a></li>
+                    <li><a href="index.html">I'm Yours</a></li>
+                </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="fool" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <div data-role="navbar">
+            <ul>
+                <li><a href="index.html" >Play List</a></li>
+                <li><a href="section1.html"  class="ui-btn-active ui-state-persist">Music</a></li>
+                <li><a href="section2.html">Artist</a></li>
+            </ul>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/jqm-navigation/section2.html b/org.tizen.common.verrari/templates/cli/jqm-navigation/section2.html
new file mode 100644 (file)
index 0000000..b12778b
--- /dev/null
@@ -0,0 +1,52 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page" id="foo" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}" style="margin-top: 0;">
+                    <li data-role="list-divider">A</li>
+                    <li><a href="index.html">Adam Lambert</a></li>
+                    <li><a href="index.html">Adele</a></li>
+                    <li><a href="index.html">Amy Winehouse</a></li>
+
+                    <li data-role="list-divider">B</li>
+                    <li><a href="index.html">Beyonce</a></li>
+
+                    <li data-role="list-divider">C</li>
+                    <li><a href="index.html">Chris Brown</a></li>
+
+                    <li data-role="list-divider">D</li>
+                    <li><a href="index.html">David Guetta</a></li>
+                    <li><a href="index.html">Drake</a></li>
+
+                    <li data-role="list-divider">E</li>
+                    <li><a href="index.html">Ed Sheeran</a></li>
+                    <li><a href="index.html">Eric Benet</a></li>
+
+                    <li data-role="list-divider">F</li>
+                    <li><a href="index.html">Far East Movement</a></li>
+
+                    <li data-role="list-divider">H</li>
+                    <li><a href="index.html">Hope</a></li>
+                    <li><a href="index.html">Hot Chelle Rae</a></li>
+                </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="fool" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <div data-role="navbar">
+            <ul>
+                <li><a href="index.html" >Play List</a></li>
+                <li><a href="section1.html">Music</a></li>
+                <li><a href="section2.html" class="ui-btn-active ui-state-persist">Artist</a></li>
+            </ul>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/jqm-singlepage/META-INF/MANIFEST.MF b/org.tizen.common.verrari/templates/cli/jqm-singlepage/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..f74fdd9
--- /dev/null
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Tizen-Template-Name: jqm-singlepage
+Tizen-Template-Description: jQuery Mobile - Single Page
+Tizen-Template-Tags: jquery,jqm,singlepage,single
+Tizen-Template-Version: 0.1
+Tizen-Template-Dependency: common-resources;jqm-common-resources
+Tizen-Template-Exclude: META-INF/*;*.template
diff --git a/org.tizen.common.verrari/templates/cli/jqm-singlepage/META-INF/messages.properties b/org.tizen.common.verrari/templates/cli/jqm-singlepage/META-INF/messages.properties
new file mode 100644 (file)
index 0000000..7745156
--- /dev/null
@@ -0,0 +1,4 @@
+#Properties file for jqm-singlepage.jar
+MetaDescriptionContent = HTML meta description [string][optional]
+HtmlTitle = HTML Title [string][optional]
+JQMTheme = jQuery Mobile Theme [a,b,c,d or e][optional]
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/cli/jqm-singlepage/head.template b/org.tizen.common.verrari/templates/cli/jqm-singlepage/head.template
new file mode 100644 (file)
index 0000000..11e6cb4
--- /dev/null
@@ -0,0 +1,20 @@
+<!------------------------------------------------------------------------------------------------
+ Copyright $@{YEAR()} $@{USER()} All rights reserved.
+------------------------------------------------------------------------------------------------->
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
+    <meta name="description" content="$${MetaDescriptionContent|"Tizen template generated by Tizen Web IDE"}"/>
+
+    <title>$${HtmlTitle|"Title"}</title>
+
+    <link rel="stylesheet" href="./css/jquery.mobile-1.1.0.css"/>
+    <script type="text/javascript" src="./js/jquery-1.7.1.js"></script>
+    <script type="text/javascript" src="./js/jquery.mobile-1.1.0.js"></script>
+    <script type="text/javascript" src="./js/main.js"></script>
+    <link rel="stylesheet" type="text/css" href="./css/style.css"/>
+</head>
+
diff --git a/org.tizen.common.verrari/templates/cli/jqm-singlepage/index.html b/org.tizen.common.verrari/templates/cli/jqm-singlepage/index.html
new file mode 100644 (file)
index 0000000..ff3422c
--- /dev/null
@@ -0,0 +1,21 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Single-Page Application </h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <p>This is a single page boilerplate template that you can copy to build your first jQuery Mobile page.</p>
+            <canvas width="" height="300"></canvas>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h4>Footer content</h4>
+    </div><!-- /footer -->
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/tizen-basic/META-INF/MANIFEST.MF b/org.tizen.common.verrari/templates/cli/tizen-basic/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..a3e22eb
--- /dev/null
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Tizen-Template-Name: tizen-basic
+Tizen-Template-Description: Tizen basic Application
+Tizen-Template-Tags: tizen,basic
+Tizen-Template-Version: 0.1
+Tizen-Template-Copy: images/*
+Tizen-Template-Dependency: common-resources
+Tizen-Template-Exclude: META-INF/*;*.template
diff --git a/org.tizen.common.verrari/templates/cli/tizen-basic/META-INF/messages.properties b/org.tizen.common.verrari/templates/cli/tizen-basic/META-INF/messages.properties
new file mode 100644 (file)
index 0000000..8d58614
--- /dev/null
@@ -0,0 +1,3 @@
+#Properties file for tizen-basic.jar
+MetaDescriptionContent = HTML meta description [string][optional]
+HtmlTitle = HTML Title [string][optional]
diff --git a/org.tizen.common.verrari/templates/cli/tizen-basic/css/style.css b/org.tizen.common.verrari/templates/cli/tizen-basic/css/style.css
new file mode 100644 (file)
index 0000000..8db21b8
--- /dev/null
@@ -0,0 +1,122 @@
+/* Copyright $@{YEAR()} $@{USER()} All rights reserved. */
+
+* {
+    font-family: Lucida Sans, Arial, Helvetica, sans-serif;
+}
+
+body {
+    margin: 0px auto;
+}
+
+header h1 {
+    font-size: 36px;
+    margin: 0px;
+}
+
+header h2 {
+    font-size: 18px;
+    margin: 0px;
+    color: #888;
+    font-style: italic;
+}
+
+nav ul {
+    list-style: none;
+    padding: 0px;
+    display: block;
+    clear: right;
+    background-color: #666;
+    padding-left: 4px;
+    height: 24px;
+}
+
+nav ul li {
+    display: inline;
+    padding: 0px 20px 5px 10px;
+    height: 24px;
+    border-right: 1px solid #ccc;
+}
+
+nav ul li a {
+    color: #EFD3D3;
+    text-decoration: none;
+    font-size: 13px;
+    font-weight: bold;
+}
+
+nav ul li a:hover {
+    color: #fff;
+}
+
+article > header h1 {
+    font-size: 20px;
+    margin-left: 14px;
+}
+
+article > header h1 a {
+    color: #993333;
+}
+
+article > header h1 img {
+    vertical-align:middle;
+}
+
+article > section header h1 {
+    font-size: 16px;
+}
+
+article p {
+    clear: both;
+}
+
+article > section video {
+    width: 480px;
+    height: 200px;
+}
+
+article > section div.no-html5-video,
+article > section div#no-canvas {
+    width: 480px;
+    height: 40px;
+    border: 1px solid #993333;
+    text-align: center;
+    color: #993333;
+    font-size: 13px;
+    font-style: italic;
+    background-color: #F7E9E9;
+}
+
+article > section div#no-canvas {
+    display: none;
+}
+
+article > section form {
+    border: 1px solid #888;
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    border-radius: 10px;
+    -moz-box-shadow: 10px 10px 5px #888;
+    -webkit-box-shadow: 10px 10px 5px #888;
+    box-shadow: 10px 10px 5px #888;
+    background-color: #eee;
+    padding: 10px;
+    margin-bottom: 30px;
+}
+
+article > section label {
+    font-weight: bold;
+    font-size: 13px;
+}
+
+article > section input {
+    margin-bottom: 3px;
+    font-size: 13px;
+}
+
+footer p {
+    text-align: center;
+    font-size: 12px;
+    color: #888;
+    margin-top: 24px;
+}
+
diff --git a/org.tizen.common.verrari/templates/cli/tizen-basic/head.template b/org.tizen.common.verrari/templates/cli/tizen-basic/head.template
new file mode 100644 (file)
index 0000000..72bf727
--- /dev/null
@@ -0,0 +1,17 @@
+<!------------------------------------------------------------------------------------------------
+ Copyright $@{YEAR()} $@{USER()} All rights reserved.
+------------------------------------------------------------------------------------------------->
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8"/>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
+    <meta name="description" content="$${MetaDescriptionContent|"Tizen template generated by Tizen Web IDE"}"/>
+
+    <title>$${HtmlTitle|"Title"}</title>
+
+    <script type="text/javascript" src="./js/main.js"></script>
+    <link rel="stylesheet" type="text/css" href="./css/style.css"/>
+</head>
+
diff --git a/org.tizen.common.verrari/templates/cli/tizen-basic/images/tizen_32.png b/org.tizen.common.verrari/templates/cli/tizen-basic/images/tizen_32.png
new file mode 100644 (file)
index 0000000..983c883
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizen-basic/images/tizen_32.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizen-basic/index.html b/org.tizen.common.verrari/templates/cli/tizen-basic/index.html
new file mode 100644 (file)
index 0000000..fc95f28
--- /dev/null
@@ -0,0 +1,46 @@
+$$include{"head.template"}
+
+<body>
+
+<header>
+  <hgroup>
+    <h1>Tizen App</h1>
+    <h2>An empty template of Tizen</h2>
+  </hgroup>
+</header>
+
+<nav>
+  <ul>
+     <li><a href="#">Home</a></li>
+     <li><a href="#">About Us</a></li>
+     <li><a href="#">Contact Us</a></li>
+  </ul>
+</nav>
+
+<article>
+  <header>
+    <h1>
+      <img src="images/tizen_32.png" /> Application Name
+    </h1>
+  </header>
+  <p>This is an empty template of Tizen Web Application. Tizen will support multiple device categories:
+    <ul>
+      <li>smartphones, tablets and smart TVs
+      <li>netbooks, in-vehicle infotainment devices
+    </ul>
+  </p>
+  <section>
+    <p>This is a basic section of a document.</p>
+    <p>The following button displays a time using JavaScript.</p>
+    <div id="divbutton1">
+      <button onclick="startTime();">Clock</button>
+    </div>
+  </section>
+</article>
+
+<footer>
+  <p>&copy; 2012 Company Name. All rights reserved.</p>
+</footer>
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/tizen-basic/js/main.js b/org.tizen.common.verrari/templates/cli/tizen-basic/js/main.js
new file mode 100644 (file)
index 0000000..618837e
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright $@{YEAR()} $@{USER()} All rights reserved.
+ */
+
+var startTime;
+var checkTime;
+
+//Initialize function
+var init = function () {
+    // TODO:: Do your initialization job
+    console.log("init() called");
+};
+// window.onload can work without <body onload="">
+window.onload = init;
+
+function startTime() {
+    var today = new Date();
+    var h = today.getHours();
+
+    var m = today.getMinutes();
+    var s = today.getSeconds();
+    m = checkTime(m);
+    s = checkTime(s);
+    document.getElementById('divbutton1').innerHTML="Current time: " + h + ":" + m + ":" + s;
+    t = setTimeout(startTime, 250);
+}
+
+function checkTime(i) {
+    if (i < 10) {
+        i="0" + i;
+    }
+    return i;
+}
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/META-INF/MANIFEST.MF b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..66e62a4
--- /dev/null
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Tizen-Template-Name: tizenwebuifw-common-resources
+Tizen-Template-Description: Tizen Web UI Framework - common resources
+Tizen-Template-Tags: tizenwebuifw,tizen
+Tizen-Template-Version: 0.1
+Tizen-Template-Copy: icon.png;tizen-web-ui-fw*
+Tizen-Template-Exclude: META-INF/*
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/META-INF/messages.properties b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/META-INF/messages.properties
new file mode 100644 (file)
index 0000000..0d75503
--- /dev/null
@@ -0,0 +1,2 @@
+#Properties file for tizenwebuifw-common-resources.jar
+WidgetID = * Widget Name [string]
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/config.xml b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/config.xml
new file mode 100644 (file)
index 0000000..8037e57
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/$${WidgetID|"WidgetID"}" version="1.0.0" viewmodes="maximized">
+    <tizen:application id="$@{APPLICATIONID()}" required_version="1.0"/>
+    <content src="index.html"/>
+    <tizen:privilege name="http://tizen.org/privilege/tizen"/>
+    <tizen:privilege name="http://tizen.org/privilege/application.kill"/>
+    <icon src="icon.png"/>
+    <name>$${WidgetID|"WidgetID"}</name>
+</widget>
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/css/style.css b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/css/style.css
new file mode 100644 (file)
index 0000000..9a4c48c
--- /dev/null
@@ -0,0 +1,4 @@
+/* Copyright $@{YEAR()} $@{USER()} All rights reserved. */
+
+body {
+}
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/icon.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/icon.png
new file mode 100644 (file)
index 0000000..983c883
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/icon.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/js/main.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/js/main.js
new file mode 100644 (file)
index 0000000..d9e2300
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+ * Copyright $@{YEAR()} $@{USER()} All rights reserved.
+ */
+
+//Initialize function
+var init = function () {
+    $('div[data-role="page"]:first .ui-btn-back').bind("click", function(event) {
+        var currentApp = tizen.application.getCurrentApplication();
+        currentApp.exit();
+    });
+    // TODO:: Do your initialization job
+    console.log("init() called");
+};
+$(document).bind('pageinit', init);
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/VERSION b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/VERSION
new file mode 100644 (file)
index 0000000..b005e30
--- /dev/null
@@ -0,0 +1 @@
+0.2.15
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.af-ZA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.af-ZA.js
new file mode 100644 (file)
index 0000000..8588aef
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture af-ZA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "af-ZA", "default", {
+       name: "af-ZA",
+       englishName: "Afrikaans (South Africa)",
+       nativeName: "Afrikaans (Suid Afrika)",
+       language: "af",
+       numberFormat: {
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"],
+                               namesAbbr: ["Son","Maan","Dins","Woen","Dond","Vry","Sat"],
+                               namesShort: ["So","Ma","Di","Wo","Do","Vr","Sa"]
+                       },
+                       months: {
+                               names: ["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember",""],
+                               namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.af.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.af.js
new file mode 100644 (file)
index 0000000..0f17c0d
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture af
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "af", "default", {
+       name: "af",
+       englishName: "Afrikaans",
+       nativeName: "Afrikaans",
+       language: "af",
+       numberFormat: {
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"],
+                               namesAbbr: ["Son","Maan","Dins","Woen","Dond","Vry","Sat"],
+                               namesShort: ["So","Ma","Di","Wo","Do","Vr","Sa"]
+                       },
+                       months: {
+                               names: ["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember",""],
+                               namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.am-ET.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.am-ET.js
new file mode 100644 (file)
index 0000000..e603a0b
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Globalize Culture am-ET
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "am-ET", "default", {
+       name: "am-ET",
+       englishName: "Amharic (Ethiopia)",
+       nativeName: "አማርኛ (ኢትዮጵያ)",
+       language: "am",
+       numberFormat: {
+               decimals: 1,
+               groupSizes: [3,0],
+               NaN: "NAN",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       decimals: 1,
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       groupSizes: [3,0],
+                       symbol: "ETB"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["እሑድ","ሰኞ","ማክሰኞ","ረቡዕ","ሐሙስ","ዓርብ","ቅዳሜ"],
+                               namesAbbr: ["እሑድ","ሰኞ","ማክሰ","ረቡዕ","ሐሙስ","ዓርብ","ቅዳሜ"],
+                               namesShort: ["እ","ሰ","ማ","ረ","ሐ","ዓ","ቅ"]
+                       },
+                       months: {
+                               names: ["ጃንዩወሪ","ፌብሩወሪ","ማርች","ኤፕረል","ሜይ","ጁን","ጁላይ","ኦገስት","ሴፕቴምበር","ኦክተውበር","ኖቬምበር","ዲሴምበር",""],
+                               namesAbbr: ["ጃንዩ","ፌብሩ","ማርች","ኤፕረ","ሜይ","ጁን","ጁላይ","ኦገስ","ሴፕቴ","ኦክተ","ኖቬም","ዲሴም",""]
+                       },
+                       AM: ["ጡዋት","ጡዋት","ጡዋት"],
+                       PM: ["ከሰዓት","ከሰዓት","ከሰዓት"],
+                       eras: [{"name":"ዓመተ  ምሕረት","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd '፣' MMMM d 'ቀን' yyyy",
+                               f: "dddd '፣' MMMM d 'ቀን' yyyy h:mm tt",
+                               F: "dddd '፣' MMMM d 'ቀን' yyyy h:mm:ss tt",
+                               M: "MMMM d ቀን",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.am.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.am.js
new file mode 100644 (file)
index 0000000..fe1a37c
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Globalize Culture am
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "am", "default", {
+       name: "am",
+       englishName: "Amharic",
+       nativeName: "አማርኛ",
+       language: "am",
+       numberFormat: {
+               decimals: 1,
+               groupSizes: [3,0],
+               NaN: "NAN",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       decimals: 1,
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       groupSizes: [3,0],
+                       symbol: "ETB"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["እሑድ","ሰኞ","ማክሰኞ","ረቡዕ","ሐሙስ","ዓርብ","ቅዳሜ"],
+                               namesAbbr: ["እሑድ","ሰኞ","ማክሰ","ረቡዕ","ሐሙስ","ዓርብ","ቅዳሜ"],
+                               namesShort: ["እ","ሰ","ማ","ረ","ሐ","ዓ","ቅ"]
+                       },
+                       months: {
+                               names: ["ጃንዩወሪ","ፌብሩወሪ","ማርች","ኤፕረል","ሜይ","ጁን","ጁላይ","ኦገስት","ሴፕቴምበር","ኦክተውበር","ኖቬምበር","ዲሴምበር",""],
+                               namesAbbr: ["ጃንዩ","ፌብሩ","ማርች","ኤፕረ","ሜይ","ጁን","ጁላይ","ኦገስ","ሴፕቴ","ኦክተ","ኖቬም","ዲሴም",""]
+                       },
+                       AM: ["ጡዋት","ጡዋት","ጡዋት"],
+                       PM: ["ከሰዓት","ከሰዓት","ከሰዓት"],
+                       eras: [{"name":"ዓመተ  ምሕረት","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd '፣' MMMM d 'ቀን' yyyy",
+                               f: "dddd '፣' MMMM d 'ቀን' yyyy h:mm tt",
+                               F: "dddd '፣' MMMM d 'ቀን' yyyy h:mm:ss tt",
+                               M: "MMMM d ቀን",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-AE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-AE.js
new file mode 100644 (file)
index 0000000..fdf1a51
--- /dev/null
@@ -0,0 +1,457 @@
+/*
+ * Globalize Culture ar-AE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-AE", "default", {
+       name: "ar-AE",
+       englishName: "Arabic (U.A.E.)",
+       nativeName: "العربية (الإمارات العربية المتحدة)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "د.إ.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-BH.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-BH.js
new file mode 100644 (file)
index 0000000..b073e2c
--- /dev/null
@@ -0,0 +1,462 @@
+/*
+ * Globalize Culture ar-BH
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-BH", "default", {
+       name: "ar-BH",
+       englishName: "Arabic (Bahrain)",
+       nativeName: "العربية (البحرين)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               decimals: 3,
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               percent: {
+                       decimals: 3
+               },
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       decimals: 3,
+                       symbol: "د.ب.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-DZ.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-DZ.js
new file mode 100644 (file)
index 0000000..75eaa7f
--- /dev/null
@@ -0,0 +1,458 @@
+/*
+ * Globalize Culture ar-DZ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-DZ", "default", {
+       name: "ar-DZ",
+       englishName: "Arabic (Algeria)",
+       nativeName: "العربية (الجزائر)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "د.ج.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM, yyyy H:mm",
+                               F: "dd MMMM, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd/MM/yyyy H:mm",
+                               F: "dd/MM/yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd/MMMM/yyyy H:mm",
+                               F: "dd/MMMM/yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-EG.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-EG.js
new file mode 100644 (file)
index 0000000..9d2365c
--- /dev/null
@@ -0,0 +1,484 @@
+/*
+ * Globalize Culture ar-EG
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-EG", "default", {
+       name: "ar-EG",
+       englishName: "Arabic (Egypt)",
+       nativeName: "العربية (مصر)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               decimals: 3,
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               percent: {
+                       decimals: 3
+               },
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ج.م.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-IQ.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-IQ.js
new file mode 100644 (file)
index 0000000..0235336
--- /dev/null
@@ -0,0 +1,457 @@
+/*
+ * Globalize Culture ar-IQ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-IQ", "default", {
+       name: "ar-IQ",
+       englishName: "Arabic (Iraq)",
+       nativeName: "العربية (العراق)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "د.ع.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-JO.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-JO.js
new file mode 100644 (file)
index 0000000..152ce08
--- /dev/null
@@ -0,0 +1,462 @@
+/*
+ * Globalize Culture ar-JO
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-JO", "default", {
+       name: "ar-JO",
+       englishName: "Arabic (Jordan)",
+       nativeName: "العربية (الأردن)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               decimals: 3,
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               percent: {
+                       decimals: 3
+               },
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       decimals: 3,
+                       symbol: "د.ا.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-KW.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-KW.js
new file mode 100644 (file)
index 0000000..07d1f89
--- /dev/null
@@ -0,0 +1,462 @@
+/*
+ * Globalize Culture ar-KW
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-KW", "default", {
+       name: "ar-KW",
+       englishName: "Arabic (Kuwait)",
+       nativeName: "العربية (الكويت)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               decimals: 3,
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               percent: {
+                       decimals: 3
+               },
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       decimals: 3,
+                       symbol: "د.ك.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-LB.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-LB.js
new file mode 100644 (file)
index 0000000..8c82f5a
--- /dev/null
@@ -0,0 +1,457 @@
+/*
+ * Globalize Culture ar-LB
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-LB", "default", {
+       name: "ar-LB",
+       englishName: "Arabic (Lebanon)",
+       nativeName: "العربية (لبنان)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ل.ل.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-LY.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-LY.js
new file mode 100644 (file)
index 0000000..5c16db8
--- /dev/null
@@ -0,0 +1,462 @@
+/*
+ * Globalize Culture ar-LY
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-LY", "default", {
+       name: "ar-LY",
+       englishName: "Arabic (Libya)",
+       nativeName: "العربية (ليبيا)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               decimals: 3,
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               percent: {
+                       decimals: 3
+               },
+               currency: {
+                       pattern: ["$n-","$n"],
+                       decimals: 3,
+                       symbol: "د.ل.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-MA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-MA.js
new file mode 100644 (file)
index 0000000..483eba8
--- /dev/null
@@ -0,0 +1,458 @@
+/*
+ * Globalize Culture ar-MA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-MA", "default", {
+       name: "ar-MA",
+       englishName: "Arabic (Morocco)",
+       nativeName: "العربية (المملكة المغربية)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "د.م.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","ماي","يونيو","يوليوز","غشت","شتنبر","أكتوبر","نونبر","دجنبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","ماي","يونيو","يوليوز","غشت","شتنبر","أكتوبر","نونبر","دجنبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM, yyyy H:mm",
+                               F: "dd MMMM, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd/MM/yyyy H:mm",
+                               F: "dd/MM/yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd/MMMM/yyyy H:mm",
+                               F: "dd/MMMM/yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-OM.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-OM.js
new file mode 100644 (file)
index 0000000..630fef0
--- /dev/null
@@ -0,0 +1,458 @@
+/*
+ * Globalize Culture ar-OM
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-OM", "default", {
+       name: "ar-OM",
+       englishName: "Arabic (Oman)",
+       nativeName: "العربية (عمان)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       decimals: 3,
+                       symbol: "ر.ع.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-QA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-QA.js
new file mode 100644 (file)
index 0000000..69839a2
--- /dev/null
@@ -0,0 +1,457 @@
+/*
+ * Globalize Culture ar-QA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-QA", "default", {
+       name: "ar-QA",
+       englishName: "Arabic (Qatar)",
+       nativeName: "العربية (قطر)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ر.ق.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-SA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-SA.js
new file mode 100644 (file)
index 0000000..86c73cd
--- /dev/null
@@ -0,0 +1,457 @@
+/*
+ * Globalize Culture ar-SA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-SA", "default", {
+       name: "ar-SA",
+       englishName: "Arabic (Saudi Arabia)",
+       nativeName: "العربية (المملكة العربية السعودية)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ر.س.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-SY.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-SY.js
new file mode 100644 (file)
index 0000000..1444e7e
--- /dev/null
@@ -0,0 +1,457 @@
+/*
+ * Globalize Culture ar-SY
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-SY", "default", {
+       name: "ar-SY",
+       englishName: "Arabic (Syria)",
+       nativeName: "العربية (سوريا)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ل.س.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-TN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-TN.js
new file mode 100644 (file)
index 0000000..47eb3ca
--- /dev/null
@@ -0,0 +1,463 @@
+/*
+ * Globalize Culture ar-TN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-TN", "default", {
+       name: "ar-TN",
+       englishName: "Arabic (Tunisia)",
+       nativeName: "العربية (تونس)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               decimals: 3,
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               percent: {
+                       decimals: 3
+               },
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       decimals: 3,
+                       symbol: "د.ت.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM, yyyy H:mm",
+                               F: "dd MMMM, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd/MM/yyyy H:mm",
+                               F: "dd/MM/yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd/MMMM/yyyy H:mm",
+                               F: "dd/MMMM/yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-YE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar-YE.js
new file mode 100644 (file)
index 0000000..2d25f2f
--- /dev/null
@@ -0,0 +1,457 @@
+/*
+ * Globalize Culture ar-YE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar-YE", "default", {
+       name: "ar-YE",
+       englishName: "Arabic (Yemen)",
+       nativeName: "العربية (اليمن)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ر.ي.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ar.js
new file mode 100644 (file)
index 0000000..31938bd
--- /dev/null
@@ -0,0 +1,457 @@
+/*
+ * Globalize Culture ar
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar", "default", {
+       name: "ar",
+       englishName: "Arabic",
+       nativeName: "العربية",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ر.س.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.arn-CL.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.arn-CL.js
new file mode 100644 (file)
index 0000000..12a7ebe
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture arn-CL
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "arn-CL", "default", {
+       name: "arn-CL",
+       englishName: "Mapudungun (Chile)",
+       nativeName: "Mapudungun (Chile)",
+       language: "arn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.arn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.arn.js
new file mode 100644 (file)
index 0000000..9839cd9
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture arn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "arn", "default", {
+       name: "arn",
+       englishName: "Mapudungun",
+       nativeName: "Mapudungun",
+       language: "arn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.as-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.as-IN.js
new file mode 100644 (file)
index 0000000..ead83ba
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture as-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "as-IN", "default", {
+       name: "as-IN",
+       englishName: "Assamese (India)",
+       nativeName: "অসমীয়া (ভাৰত)",
+       language: "as",
+       numberFormat: {
+               groupSizes: [3,2],
+               NaN: "nan",
+               negativeInfinity: "-infinity",
+               positiveInfinity: "infinity",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","n$"],
+                       groupSizes: [3,2],
+                       symbol: "ট"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["সোমবাৰ","মঙ্গলবাৰ","বুধবাৰ","বৃহস্পতিবাৰ","শুক্রবাৰ","শনিবাৰ","ৰবিবাৰ"],
+                               namesAbbr: ["সোম.","মঙ্গল.","বুধ.","বৃহ.","শুক্র.","শনি.","ৰবি."],
+                               namesShort: ["সো","ম","বু","বৃ","শু","শ","র"]
+                       },
+                       months: {
+                               names: ["জানুৱাৰী","ফেব্রুৱাৰী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগষ্ট","চেপ্টেম্বর","অক্টোবর","নবেম্বর","ডিচেম্বর",""],
+                               namesAbbr: ["জানু","ফেব্রু","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগষ্ট","চেপ্টে","অক্টো","নবে","ডিচে",""]
+                       },
+                       AM: ["ৰাতিপু","ৰাতিপু","ৰাতিপু"],
+                       PM: ["আবেলি","আবেলি","আবেলি"],
+                       eras: [{"name":"খ্রীষ্টাব্দ","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "yyyy,MMMM dd, dddd",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "yyyy,MMMM dd, dddd tt h:mm",
+                               F: "yyyy,MMMM dd, dddd tt h:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM,yy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.as.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.as.js
new file mode 100644 (file)
index 0000000..f20cccf
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture as
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "as", "default", {
+       name: "as",
+       englishName: "Assamese",
+       nativeName: "অসমীয়া",
+       language: "as",
+       numberFormat: {
+               groupSizes: [3,2],
+               NaN: "nan",
+               negativeInfinity: "-infinity",
+               positiveInfinity: "infinity",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","n$"],
+                       groupSizes: [3,2],
+                       symbol: "ট"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["সোমবাৰ","মঙ্গলবাৰ","বুধবাৰ","বৃহস্পতিবাৰ","শুক্রবাৰ","শনিবাৰ","ৰবিবাৰ"],
+                               namesAbbr: ["সোম.","মঙ্গল.","বুধ.","বৃহ.","শুক্র.","শনি.","ৰবি."],
+                               namesShort: ["সো","ম","বু","বৃ","শু","শ","র"]
+                       },
+                       months: {
+                               names: ["জানুৱাৰী","ফেব্রুৱাৰী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগষ্ট","চেপ্টেম্বর","অক্টোবর","নবেম্বর","ডিচেম্বর",""],
+                               namesAbbr: ["জানু","ফেব্রু","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগষ্ট","চেপ্টে","অক্টো","নবে","ডিচে",""]
+                       },
+                       AM: ["ৰাতিপু","ৰাতিপু","ৰাতিপু"],
+                       PM: ["আবেলি","আবেলি","আবেলি"],
+                       eras: [{"name":"খ্রীষ্টাব্দ","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "yyyy,MMMM dd, dddd",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "yyyy,MMMM dd, dddd tt h:mm",
+                               F: "yyyy,MMMM dd, dddd tt h:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM,yy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az-Cyrl-AZ.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az-Cyrl-AZ.js
new file mode 100644 (file)
index 0000000..5808bdf
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture az-Cyrl-AZ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "az-Cyrl-AZ", "default", {
+       name: "az-Cyrl-AZ",
+       englishName: "Azeri (Cyrillic, Azerbaijan)",
+       nativeName: "Азәрбајҹан (Азәрбајҹан)",
+       language: "az-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "ман."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Базар","Базар ертәси","Чәршәнбә ахшамы","Чәршәнбә","Ҹүмә ахшамы","Ҹүмә","Шәнбә"],
+                               namesAbbr: ["Б","Бе","Ча","Ч","Ҹа","Ҹ","Ш"],
+                               namesShort: ["Б","Бе","Ча","Ч","Ҹа","Ҹ","Ш"]
+                       },
+                       months: {
+                               names: ["Јанвар","Феврал","Март","Апрел","Мај","Ијун","Ијул","Август","Сентјабр","Октјабр","Нојабр","Декабр",""],
+                               namesAbbr: ["Јан","Фев","Мар","Апр","Мај","Ијун","Ијул","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["јанвар","феврал","март","апрел","мај","ијун","ијул","август","сентјабр","октјабр","нојабр","декабр",""],
+                               namesAbbr: ["Јан","Фев","Мар","Апр","мая","ијун","ијул","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az-Cyrl.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az-Cyrl.js
new file mode 100644 (file)
index 0000000..786b81f
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture az-Cyrl
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "az-Cyrl", "default", {
+       name: "az-Cyrl",
+       englishName: "Azeri (Cyrillic)",
+       nativeName: "Азәрбајҹан дили",
+       language: "az-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "ман."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Базар","Базар ертәси","Чәршәнбә ахшамы","Чәршәнбә","Ҹүмә ахшамы","Ҹүмә","Шәнбә"],
+                               namesAbbr: ["Б","Бе","Ча","Ч","Ҹа","Ҹ","Ш"],
+                               namesShort: ["Б","Бе","Ча","Ч","Ҹа","Ҹ","Ш"]
+                       },
+                       months: {
+                               names: ["Јанвар","Феврал","Март","Апрел","Мај","Ијун","Ијул","Август","Сентјабр","Октјабр","Нојабр","Декабр",""],
+                               namesAbbr: ["Јан","Фев","Мар","Апр","Мај","Ијун","Ијул","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["јанвар","феврал","март","апрел","мај","ијун","ијул","август","сентјабр","октјабр","нојабр","декабр",""],
+                               namesAbbr: ["Јан","Фев","Мар","Апр","мая","ијун","ијул","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az-Latn-AZ.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az-Latn-AZ.js
new file mode 100644 (file)
index 0000000..a70d637
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture az-Latn-AZ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "az-Latn-AZ", "default", {
+       name: "az-Latn-AZ",
+       englishName: "Azeri (Latin, Azerbaijan)",
+       nativeName: "Azərbaycan­ılı (Azərbaycan)",
+       language: "az-Latn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "man."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"],
+                               namesAbbr: ["B","Be","Ça","Ç","Ca","C","Ş"],
+                               namesShort: ["B","Be","Ça","Ç","Ca","C","Ş"]
+                       },
+                       months: {
+                               names: ["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avgust","Sentyabr","Oktyabr","Noyabr","Dekabr",""],
+                               namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""]
+                       },
+                       monthsGenitive: {
+                               names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""],
+                               namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az-Latn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az-Latn.js
new file mode 100644 (file)
index 0000000..a8175c2
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture az-Latn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "az-Latn", "default", {
+       name: "az-Latn",
+       englishName: "Azeri (Latin)",
+       nativeName: "Azərbaycan­ılı",
+       language: "az-Latn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "man."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"],
+                               namesAbbr: ["B","Be","Ça","Ç","Ca","C","Ş"],
+                               namesShort: ["B","Be","Ça","Ç","Ca","C","Ş"]
+                       },
+                       months: {
+                               names: ["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avgust","Sentyabr","Oktyabr","Noyabr","Dekabr",""],
+                               namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""]
+                       },
+                       monthsGenitive: {
+                               names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""],
+                               namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.az.js
new file mode 100644 (file)
index 0000000..94c9ad0
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture az
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "az", "default", {
+       name: "az",
+       englishName: "Azeri",
+       nativeName: "Azərbaycan­ılı",
+       language: "az",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "man."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"],
+                               namesAbbr: ["B","Be","Ça","Ç","Ca","C","Ş"],
+                               namesShort: ["B","Be","Ça","Ç","Ca","C","Ş"]
+                       },
+                       months: {
+                               names: ["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avgust","Sentyabr","Oktyabr","Noyabr","Dekabr",""],
+                               namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""]
+                       },
+                       monthsGenitive: {
+                               names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""],
+                               namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ba-RU.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ba-RU.js
new file mode 100644 (file)
index 0000000..b5f9559
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture ba-RU
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ba-RU", "default", {
+       name: "ba-RU",
+       englishName: "Bashkir (Russia)",
+       nativeName: "Башҡорт (Россия)",
+       language: "ba",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "һ."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Йәкшәмбе","Дүшәмбе","Шишәмбе","Шаршамбы","Кесаҙна","Йома","Шәмбе"],
+                               namesAbbr: ["Йш","Дш","Шш","Шр","Кс","Йм","Шб"],
+                               namesShort: ["Йш","Дш","Шш","Шр","Кс","Йм","Шб"]
+                       },
+                       months: {
+                               names: ["ғинуар","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь",""],
+                               namesAbbr: ["ғин","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d MMMM yyyy 'й'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy 'й' H:mm",
+                               F: "d MMMM yyyy 'й' H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ba.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ba.js
new file mode 100644 (file)
index 0000000..b026451
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture ba
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ba", "default", {
+       name: "ba",
+       englishName: "Bashkir",
+       nativeName: "Башҡорт",
+       language: "ba",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "һ."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Йәкшәмбе","Дүшәмбе","Шишәмбе","Шаршамбы","Кесаҙна","Йома","Шәмбе"],
+                               namesAbbr: ["Йш","Дш","Шш","Шр","Кс","Йм","Шб"],
+                               namesShort: ["Йш","Дш","Шш","Шр","Кс","Йм","Шб"]
+                       },
+                       months: {
+                               names: ["ғинуар","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь",""],
+                               namesAbbr: ["ғин","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d MMMM yyyy 'й'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy 'й' H:mm",
+                               F: "d MMMM yyyy 'й' H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.be-BY.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.be-BY.js
new file mode 100644 (file)
index 0000000..9f736f2
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture be-BY
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "be-BY", "default", {
+       name: "be-BY",
+       englishName: "Belarusian (Belarus)",
+       nativeName: "Беларускі (Беларусь)",
+       language: "be",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["нядзеля","панядзелак","аўторак","серада","чацвер","пятніца","субота"],
+                               namesAbbr: ["нд","пн","аў","ср","чц","пт","сб"],
+                               namesShort: ["нд","пн","аў","ср","чц","пт","сб"]
+                       },
+                       months: {
+                               names: ["Студзень","Люты","Сакавік","Красавік","Май","Чэрвень","Ліпень","Жнівень","Верасень","Кастрычнік","Лістапад","Снежань",""],
+                               namesAbbr: ["Сту","Лют","Сак","Кра","Май","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне",""]
+                       },
+                       monthsGenitive: {
+                               names: ["студзеня","лютага","сакавіка","красавіка","мая","чэрвеня","ліпеня","жніўня","верасня","кастрычніка","лістапада","снежня",""],
+                               namesAbbr: ["Сту","Лют","Сак","Кра","Май","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.be.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.be.js
new file mode 100644 (file)
index 0000000..422a644
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture be
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "be", "default", {
+       name: "be",
+       englishName: "Belarusian",
+       nativeName: "Беларускі",
+       language: "be",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["нядзеля","панядзелак","аўторак","серада","чацвер","пятніца","субота"],
+                               namesAbbr: ["нд","пн","аў","ср","чц","пт","сб"],
+                               namesShort: ["нд","пн","аў","ср","чц","пт","сб"]
+                       },
+                       months: {
+                               names: ["Студзень","Люты","Сакавік","Красавік","Май","Чэрвень","Ліпень","Жнівень","Верасень","Кастрычнік","Лістапад","Снежань",""],
+                               namesAbbr: ["Сту","Лют","Сак","Кра","Май","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне",""]
+                       },
+                       monthsGenitive: {
+                               names: ["студзеня","лютага","сакавіка","красавіка","мая","чэрвеня","ліпеня","жніўня","верасня","кастрычніка","лістапада","снежня",""],
+                               namesAbbr: ["Сту","Лют","Сак","Кра","Май","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bg-BG.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bg-BG.js
new file mode 100644 (file)
index 0000000..bf3e085
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture bg-BG
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "bg-BG", "default", {
+       name: "bg-BG",
+       englishName: "Bulgarian (Bulgaria)",
+       nativeName: "български (България)",
+       language: "bg",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "- безкрайност",
+               positiveInfinity: "+ безкрайност",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "лв."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"],
+                               namesAbbr: ["нед","пон","вт","ср","четв","пет","съб"],
+                               namesShort: ["н","п","в","с","ч","п","с"]
+                       },
+                       months: {
+                               names: ["януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември",""],
+                               namesAbbr: ["ян","февр","март","апр","май","юни","юли","авг","септ","окт","ноември","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"след новата ера","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy 'г.'",
+                               D: "dd MMMM yyyy 'г.'",
+                               t: "HH:mm 'ч.'",
+                               T: "HH:mm:ss 'ч.'",
+                               f: "dd MMMM yyyy 'г.' HH:mm 'ч.'",
+                               F: "dd MMMM yyyy 'г.' HH:mm:ss 'ч.'",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy 'г.'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bg.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bg.js
new file mode 100644 (file)
index 0000000..06574e6
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture bg
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "bg", "default", {
+       name: "bg",
+       englishName: "Bulgarian",
+       nativeName: "български",
+       language: "bg",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "- безкрайност",
+               positiveInfinity: "+ безкрайност",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "лв."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"],
+                               namesAbbr: ["нед","пон","вт","ср","четв","пет","съб"],
+                               namesShort: ["н","п","в","с","ч","п","с"]
+                       },
+                       months: {
+                               names: ["януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември",""],
+                               namesAbbr: ["ян","февр","март","апр","май","юни","юли","авг","септ","окт","ноември","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"след новата ера","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy 'г.'",
+                               D: "dd MMMM yyyy 'г.'",
+                               t: "HH:mm 'ч.'",
+                               T: "HH:mm:ss 'ч.'",
+                               f: "dd MMMM yyyy 'г.' HH:mm 'ч.'",
+                               F: "dd MMMM yyyy 'г.' HH:mm:ss 'ч.'",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy 'г.'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bn-BD.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bn-BD.js
new file mode 100644 (file)
index 0000000..7f746f8
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Globalize Culture bn-BD
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "bn-BD", "default", {
+       name: "bn-BD",
+       englishName: "Bengali (Bangladesh)",
+       nativeName: "বাংলা (বাংলাদেশ)",
+       language: "bn",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       pattern: ["-%n","%n"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "৳"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       ":": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"],
+                               namesAbbr: ["রবি.","সোম.","মঙ্গল.","বুধ.","বৃহস্পতি.","শুক্র.","শনি."],
+                               namesShort: ["র","স","ম","ব","ব","শ","শ"]
+                       },
+                       months: {
+                               names: ["জানুয়ারী","ফেব্রুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর",""],
+                               namesAbbr: ["জানু.","ফেব্রু.","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগ.","সেপ্টে.","অক্টো.","নভে.","ডিসে.",""]
+                       },
+                       AM: ["পুর্বাহ্ন","পুর্বাহ্ন","পুর্বাহ্ন"],
+                       PM: ["অপরাহ্ন","অপরাহ্ন","অপরাহ্ন"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH.mm",
+                               T: "HH.mm.ss",
+                               f: "dd MMMM yyyy HH.mm",
+                               F: "dd MMMM yyyy HH.mm.ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bn-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bn-IN.js
new file mode 100644 (file)
index 0000000..169e4af
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Globalize Culture bn-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "bn-IN", "default", {
+       name: "bn-IN",
+       englishName: "Bengali (India)",
+       nativeName: "বাংলা (ভারত)",
+       language: "bn",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       pattern: ["-%n","%n"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "টা"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       ":": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"],
+                               namesAbbr: ["রবি.","সোম.","মঙ্গল.","বুধ.","বৃহস্পতি.","শুক্র.","শনি."],
+                               namesShort: ["র","স","ম","ব","ব","শ","শ"]
+                       },
+                       months: {
+                               names: ["জানুয়ারী","ফেব্রুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর",""],
+                               namesAbbr: ["জানু.","ফেব্রু.","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগ.","সেপ্টে.","অক্টো.","নভে.","ডিসে.",""]
+                       },
+                       AM: ["পুর্বাহ্ন","পুর্বাহ্ন","পুর্বাহ্ন"],
+                       PM: ["অপরাহ্ন","অপরাহ্ন","অপরাহ্ন"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH.mm",
+                               T: "HH.mm.ss",
+                               f: "dd MMMM yyyy HH.mm",
+                               F: "dd MMMM yyyy HH.mm.ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bn.js
new file mode 100644 (file)
index 0000000..9a07ddb
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Globalize Culture bn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "bn", "default", {
+       name: "bn",
+       englishName: "Bengali",
+       nativeName: "বাংলা",
+       language: "bn",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       pattern: ["-%n","%n"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "টা"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       ":": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"],
+                               namesAbbr: ["রবি.","সোম.","মঙ্গল.","বুধ.","বৃহস্পতি.","শুক্র.","শনি."],
+                               namesShort: ["র","স","ম","ব","ব","শ","শ"]
+                       },
+                       months: {
+                               names: ["জানুয়ারী","ফেব্রুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর",""],
+                               namesAbbr: ["জানু.","ফেব্রু.","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগ.","সেপ্টে.","অক্টো.","নভে.","ডিসে.",""]
+                       },
+                       AM: ["পুর্বাহ্ন","পুর্বাহ্ন","পুর্বাহ্ন"],
+                       PM: ["অপরাহ্ন","অপরাহ্ন","অপরাহ্ন"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH.mm",
+                               T: "HH.mm.ss",
+                               f: "dd MMMM yyyy HH.mm",
+                               F: "dd MMMM yyyy HH.mm.ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bo-CN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bo-CN.js
new file mode 100644 (file)
index 0000000..b337e02
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture bo-CN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "bo-CN", "default", {
+       name: "bo-CN",
+       englishName: "Tibetan (PRC)",
+       nativeName: "བོད་ཡིག (ཀྲུང་ཧྭ་མི་དམངས་སྤྱི་མཐུན་རྒྱལ་ཁབ།)",
+       language: "bo",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "ཨང་ཀི་མིན་པ།",
+               negativeInfinity: "མོ་གྲངས་ཚད་མེད་ཆུང་བ།",
+               positiveInfinity: "ཕོ་གྲངས་ཚད་མེད་ཆེ་བ།",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       groupSizes: [3,0],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["གཟའ་ཉི་མ།","གཟའ་ཟླ་བ།","གཟའ་མིག་དམར།","གཟའ་ལྷག་པ།","གཟའ་ཕུར་བུ།","གཟའ་པ་སངས།","གཟའ་སྤེན་པ།"],
+                               namesAbbr: ["ཉི་མ།","ཟླ་བ།","མིག་དམར།","ལྷག་པ།","ཕུར་བུ།","པ་སངས།","སྤེན་པ།"],
+                               namesShort: ["༧","༡","༢","༣","༤","༥","༦"]
+                       },
+                       months: {
+                               names: ["སྤྱི་ཟླ་དང་པོ།","སྤྱི་ཟླ་གཉིས་པ།","སྤྱི་ཟླ་གསུམ་པ།","སྤྱི་ཟླ་བཞི་པ།","སྤྱི་ཟླ་ལྔ་པ།","སྤྱི་ཟླ་དྲུག་པ།","སྤྱི་ཟླ་བདུན་པ།","སྤྱི་ཟླ་བརྒྱད་པ།","སྤྱི་ཟླ་དགུ་པ།","སྤྱི་ཟླ་བཅུ་པོ།","སྤྱི་ཟླ་བཅུ་གཅིག་པ།","སྤྱི་ཟླ་བཅུ་གཉིས་པ།",""],
+                               namesAbbr: ["ཟླ་ ༡","ཟླ་ ༢","ཟླ་ ༣","ཟླ་ ༤","ཟླ་ ༥","ཟླ་ ༦","ཟླ་ ༧","ཟླ་ ༨","ཟླ་ ༩","ཟླ་ ༡༠","ཟླ་ ༡༡","ཟླ་ ༡༢",""]
+                       },
+                       AM: ["སྔ་དྲོ","སྔ་དྲོ","སྔ་དྲོ"],
+                       PM: ["ཕྱི་དྲོ","ཕྱི་དྲོ","ཕྱི་དྲོ"],
+                       eras: [{"name":"སྤྱི་ལོ","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'ལོའི་ཟླ' M'ཚེས' d",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm",
+                               F: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm:ss",
+                               M: "'ཟླ་' M'ཚེས'd",
+                               Y: "yyyy.M"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bo.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bo.js
new file mode 100644 (file)
index 0000000..f36be06
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture bo
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "bo", "default", {
+       name: "bo",
+       englishName: "Tibetan",
+       nativeName: "བོད་ཡིག",
+       language: "bo",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "ཨང་ཀི་མིན་པ།",
+               negativeInfinity: "མོ་གྲངས་ཚད་མེད་ཆུང་བ།",
+               positiveInfinity: "ཕོ་གྲངས་ཚད་མེད་ཆེ་བ།",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       groupSizes: [3,0],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["གཟའ་ཉི་མ།","གཟའ་ཟླ་བ།","གཟའ་མིག་དམར།","གཟའ་ལྷག་པ།","གཟའ་ཕུར་བུ།","གཟའ་པ་སངས།","གཟའ་སྤེན་པ།"],
+                               namesAbbr: ["ཉི་མ།","ཟླ་བ།","མིག་དམར།","ལྷག་པ།","ཕུར་བུ།","པ་སངས།","སྤེན་པ།"],
+                               namesShort: ["༧","༡","༢","༣","༤","༥","༦"]
+                       },
+                       months: {
+                               names: ["སྤྱི་ཟླ་དང་པོ།","སྤྱི་ཟླ་གཉིས་པ།","སྤྱི་ཟླ་གསུམ་པ།","སྤྱི་ཟླ་བཞི་པ།","སྤྱི་ཟླ་ལྔ་པ།","སྤྱི་ཟླ་དྲུག་པ།","སྤྱི་ཟླ་བདུན་པ།","སྤྱི་ཟླ་བརྒྱད་པ།","སྤྱི་ཟླ་དགུ་པ།","སྤྱི་ཟླ་བཅུ་པོ།","སྤྱི་ཟླ་བཅུ་གཅིག་པ།","སྤྱི་ཟླ་བཅུ་གཉིས་པ།",""],
+                               namesAbbr: ["ཟླ་ ༡","ཟླ་ ༢","ཟླ་ ༣","ཟླ་ ༤","ཟླ་ ༥","ཟླ་ ༦","ཟླ་ ༧","ཟླ་ ༨","ཟླ་ ༩","ཟླ་ ༡༠","ཟླ་ ༡༡","ཟླ་ ༡༢",""]
+                       },
+                       AM: ["སྔ་དྲོ","སྔ་དྲོ","སྔ་དྲོ"],
+                       PM: ["ཕྱི་དྲོ","ཕྱི་དྲོ","ཕྱི་དྲོ"],
+                       eras: [{"name":"སྤྱི་ལོ","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'ལོའི་ཟླ' M'ཚེས' d",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm",
+                               F: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm:ss",
+                               M: "'ཟླ་' M'ཚེས'd",
+                               Y: "yyyy.M"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.br-FR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.br-FR.js
new file mode 100644 (file)
index 0000000..73a711c
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture br-FR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "br-FR", "default", {
+       name: "br-FR",
+       englishName: "Breton (France)",
+       nativeName: "brezhoneg (Frañs)",
+       language: "br",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "NkN",
+               negativeInfinity: "-Anfin",
+               positiveInfinity: "+Anfin",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Sul","Lun","Meurzh","Merc'her","Yaou","Gwener","Sadorn"],
+                               namesAbbr: ["Sul","Lun","Meu.","Mer.","Yaou","Gwe.","Sad."],
+                               namesShort: ["Su","Lu","Mz","Mc","Ya","Gw","Sa"]
+                       },
+                       months: {
+                               names: ["Genver","C'hwevrer","Meurzh","Ebrel","Mae","Mezheven","Gouere","Eost","Gwengolo","Here","Du","Kerzu",""],
+                               namesAbbr: ["Gen.","C'hwe.","Meur.","Ebr.","Mae","Mezh.","Goue.","Eost","Gwen.","Here","Du","Kzu",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"g. J.-K.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.br.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.br.js
new file mode 100644 (file)
index 0000000..cac444b
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture br
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "br", "default", {
+       name: "br",
+       englishName: "Breton",
+       nativeName: "brezhoneg",
+       language: "br",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "NkN",
+               negativeInfinity: "-Anfin",
+               positiveInfinity: "+Anfin",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Sul","Lun","Meurzh","Merc'her","Yaou","Gwener","Sadorn"],
+                               namesAbbr: ["Sul","Lun","Meu.","Mer.","Yaou","Gwe.","Sad."],
+                               namesShort: ["Su","Lu","Mz","Mc","Ya","Gw","Sa"]
+                       },
+                       months: {
+                               names: ["Genver","C'hwevrer","Meurzh","Ebrel","Mae","Mezheven","Gouere","Eost","Gwengolo","Here","Du","Kerzu",""],
+                               namesAbbr: ["Gen.","C'hwe.","Meur.","Ebr.","Mae","Mezh.","Goue.","Eost","Gwen.","Here","Du","Kzu",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"g. J.-K.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs-Cyrl-BA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs-Cyrl-BA.js
new file mode 100644 (file)
index 0000000..dea619b
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture bs-Cyrl-BA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "bs-Cyrl-BA", "default", {
+       name: "bs-Cyrl-BA",
+       englishName: "Bosnian (Cyrillic, Bosnia and Herzegovina)",
+       nativeName: "босански (Босна и Херцеговина)",
+       language: "bs-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "КМ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недјеља","понедјељак","уторак","сриједа","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["н","п","у","с","ч","п","с"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs-Cyrl.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs-Cyrl.js
new file mode 100644 (file)
index 0000000..47d2fa5
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture bs-Cyrl
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "bs-Cyrl", "default", {
+       name: "bs-Cyrl",
+       englishName: "Bosnian (Cyrillic)",
+       nativeName: "босански",
+       language: "bs-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "КМ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недјеља","понедјељак","уторак","сриједа","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["н","п","у","с","ч","п","с"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs-Latn-BA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs-Latn-BA.js
new file mode 100644 (file)
index 0000000..08c41d8
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture bs-Latn-BA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "bs-Latn-BA", "default", {
+       name: "bs-Latn-BA",
+       englishName: "Bosnian (Latin, Bosnia and Herzegovina)",
+       nativeName: "bosanski (Bosna i Hercegovina)",
+       language: "bs-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "KM"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs-Latn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs-Latn.js
new file mode 100644 (file)
index 0000000..f962bb3
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture bs-Latn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "bs-Latn", "default", {
+       name: "bs-Latn",
+       englishName: "Bosnian (Latin)",
+       nativeName: "bosanski",
+       language: "bs-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "KM"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.bs.js
new file mode 100644 (file)
index 0000000..3fac524
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture bs
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "bs", "default", {
+       name: "bs",
+       englishName: "Bosnian",
+       nativeName: "bosanski",
+       language: "bs",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "KM"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ca-ES.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ca-ES.js
new file mode 100644 (file)
index 0000000..b882330
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture ca-ES
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ca-ES", "default", {
+       name: "ca-ES",
+       englishName: "Catalan (Catalan)",
+       nativeName: "català (català)",
+       language: "ca",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinit",
+               positiveInfinity: "Infinit",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],
+                               namesAbbr: ["dg.","dl.","dt.","dc.","dj.","dv.","ds."],
+                               namesShort: ["dg","dl","dt","dc","dj","dv","ds"]
+                       },
+                       months: {
+                               names: ["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""],
+                               namesAbbr: ["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d' / 'MMMM' / 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' / 'MMMM' / 'yyyy HH:mm",
+                               F: "dddd, d' / 'MMMM' / 'yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' / 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ca.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ca.js
new file mode 100644 (file)
index 0000000..5b515d8
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture ca
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ca", "default", {
+       name: "ca",
+       englishName: "Catalan",
+       nativeName: "català",
+       language: "ca",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinit",
+               positiveInfinity: "Infinit",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],
+                               namesAbbr: ["dg.","dl.","dt.","dc.","dj.","dv.","ds."],
+                               namesShort: ["dg","dl","dt","dc","dj","dv","ds"]
+                       },
+                       months: {
+                               names: ["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""],
+                               namesAbbr: ["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d' / 'MMMM' / 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' / 'MMMM' / 'yyyy HH:mm",
+                               F: "dddd, d' / 'MMMM' / 'yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' / 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.co-FR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.co-FR.js
new file mode 100644 (file)
index 0000000..203fecb
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture co-FR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "co-FR", "default", {
+       name: "co-FR",
+       englishName: "Corsican (France)",
+       nativeName: "Corsu (France)",
+       language: "co",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Mica numericu",
+               negativeInfinity: "-Infinitu",
+               positiveInfinity: "+Infinitu",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dumenica","luni","marti","mercuri","ghjovi","venderi","sabbatu"],
+                               namesAbbr: ["dum.","lun.","mar.","mer.","ghj.","ven.","sab."],
+                               namesShort: ["du","lu","ma","me","gh","ve","sa"]
+                       },
+                       months: {
+                               names: ["ghjennaghju","ferraghju","marzu","aprile","maghju","ghjunghju","lugliu","aostu","settembre","ottobre","nuvembre","dicembre",""],
+                               namesAbbr: ["ghje","ferr","marz","apri","magh","ghju","lugl","aost","sett","otto","nuve","dice",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"dopu J-C","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.co.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.co.js
new file mode 100644 (file)
index 0000000..885b5af
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture co
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "co", "default", {
+       name: "co",
+       englishName: "Corsican",
+       nativeName: "Corsu",
+       language: "co",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Mica numericu",
+               negativeInfinity: "-Infinitu",
+               positiveInfinity: "+Infinitu",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dumenica","luni","marti","mercuri","ghjovi","venderi","sabbatu"],
+                               namesAbbr: ["dum.","lun.","mar.","mer.","ghj.","ven.","sab."],
+                               namesShort: ["du","lu","ma","me","gh","ve","sa"]
+                       },
+                       months: {
+                               names: ["ghjennaghju","ferraghju","marzu","aprile","maghju","ghjunghju","lugliu","aostu","settembre","ottobre","nuvembre","dicembre",""],
+                               namesAbbr: ["ghje","ferr","marz","apri","magh","ghju","lugl","aost","sett","otto","nuve","dice",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"dopu J-C","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.cs-CZ.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.cs-CZ.js
new file mode 100644 (file)
index 0000000..fd1c5c3
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Globalize Culture cs-CZ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "cs-CZ", "default", {
+       name: "cs-CZ",
+       englishName: "Czech (Czech Republic)",
+       nativeName: "čeština (Česká republika)",
+       language: "cs",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Není číslo",
+               negativeInfinity: "-nekonečno",
+               positiveInfinity: "+nekonečno",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Kč"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],
+                               namesAbbr: ["ne","po","út","st","čt","pá","so"],
+                               namesShort: ["ne","po","út","st","čt","pá","so"]
+                       },
+                       months: {
+                               names: ["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["dop.","dop.","DOP."],
+                       PM: ["odp.","odp.","ODP."],
+                       eras: [{"name":"n. l.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.cs.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.cs.js
new file mode 100644 (file)
index 0000000..4d6397b
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Globalize Culture cs
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "cs", "default", {
+       name: "cs",
+       englishName: "Czech",
+       nativeName: "čeština",
+       language: "cs",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Není číslo",
+               negativeInfinity: "-nekonečno",
+               positiveInfinity: "+nekonečno",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Kč"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],
+                               namesAbbr: ["ne","po","út","st","čt","pá","so"],
+                               namesShort: ["ne","po","út","st","čt","pá","so"]
+                       },
+                       months: {
+                               names: ["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["dop.","dop.","DOP."],
+                       PM: ["odp.","odp.","ODP."],
+                       eras: [{"name":"n. l.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.cy-GB.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.cy-GB.js
new file mode 100644 (file)
index 0000000..83e37b6
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Globalize Culture cy-GB
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "cy-GB", "default", {
+       name: "cy-GB",
+       englishName: "Welsh (United Kingdom)",
+       nativeName: "Cymraeg (y Deyrnas Unedig)",
+       language: "cy",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "£"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"],
+                               namesAbbr: ["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"],
+                               namesShort: ["Su","Ll","Ma","Me","Ia","Gw","Sa"]
+                       },
+                       months: {
+                               names: ["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr",""],
+                               namesAbbr: ["Ion","Chwe","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tach","Rhag",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.cy.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.cy.js
new file mode 100644 (file)
index 0000000..fdaba63
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Globalize Culture cy
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "cy", "default", {
+       name: "cy",
+       englishName: "Welsh",
+       nativeName: "Cymraeg",
+       language: "cy",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "£"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"],
+                               namesAbbr: ["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"],
+                               namesShort: ["Su","Ll","Ma","Me","Ia","Gw","Sa"]
+                       },
+                       months: {
+                               names: ["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr",""],
+                               namesAbbr: ["Ion","Chwe","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tach","Rhag",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.da-DK.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.da-DK.js
new file mode 100644 (file)
index 0000000..703722c
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture da-DK
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "da-DK", "default", {
+       name: "da-DK",
+       englishName: "Danish (Denmark)",
+       nativeName: "dansk (Danmark)",
+       language: "da",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],
+                               namesAbbr: ["sø","ma","ti","on","to","fr","lø"],
+                               namesShort: ["sø","ma","ti","on","to","fr","lø"]
+                       },
+                       months: {
+                               names: ["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.da.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.da.js
new file mode 100644 (file)
index 0000000..259e63e
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture da
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "da", "default", {
+       name: "da",
+       englishName: "Danish",
+       nativeName: "dansk",
+       language: "da",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],
+                               namesAbbr: ["sø","ma","ti","on","to","fr","lø"],
+                               namesShort: ["sø","ma","ti","on","to","fr","lø"]
+                       },
+                       months: {
+                               names: ["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-AT.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-AT.js
new file mode 100644 (file)
index 0000000..d00ffc5
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture de-AT
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "de-AT", "default", {
+       name: "de-AT",
+       englishName: "German (Austria)",
+       nativeName: "Deutsch (Österreich)",
+       language: "de",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "n. def.",
+               negativeInfinity: "-unendlich",
+               positiveInfinity: "+unendlich",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+                               namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+                               namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, dd. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, dd. MMMM yyyy HH:mm",
+                               F: "dddd, dd. MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-CH.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-CH.js
new file mode 100644 (file)
index 0000000..4cd202a
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture de-CH
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "de-CH", "default", {
+       name: "de-CH",
+       englishName: "German (Switzerland)",
+       nativeName: "Deutsch (Schweiz)",
+       language: "de",
+       numberFormat: {
+               ",": "'",
+               NaN: "n. def.",
+               negativeInfinity: "-unendlich",
+               positiveInfinity: "+unendlich",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": "'"
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": "'",
+                       symbol: "Fr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+                               namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+                               namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d. MMMM yyyy HH:mm",
+                               F: "dddd, d. MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-DE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-DE.js
new file mode 100644 (file)
index 0000000..5466bd7
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture de-DE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "de-DE", "default", {
+       name: "de-DE",
+       englishName: "German (Germany)",
+       nativeName: "Deutsch (Deutschland)",
+       language: "de",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "n. def.",
+               negativeInfinity: "-unendlich",
+               positiveInfinity: "+unendlich",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+                               namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+                               namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d. MMMM yyyy HH:mm",
+                               F: "dddd, d. MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-LI.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-LI.js
new file mode 100644 (file)
index 0000000..b821044
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture de-LI
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "de-LI", "default", {
+       name: "de-LI",
+       englishName: "German (Liechtenstein)",
+       nativeName: "Deutsch (Liechtenstein)",
+       language: "de",
+       numberFormat: {
+               ",": "'",
+               NaN: "n. def.",
+               negativeInfinity: "-unendlich",
+               positiveInfinity: "+unendlich",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": "'"
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": "'",
+                       symbol: "CHF"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+                               namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+                               namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d. MMMM yyyy HH:mm",
+                               F: "dddd, d. MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-LU.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de-LU.js
new file mode 100644 (file)
index 0000000..76f5feb
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture de-LU
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "de-LU", "default", {
+       name: "de-LU",
+       englishName: "German (Luxembourg)",
+       nativeName: "Deutsch (Luxemburg)",
+       language: "de",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "n. def.",
+               negativeInfinity: "-unendlich",
+               positiveInfinity: "+unendlich",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+                               namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+                               namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d. MMMM yyyy HH:mm",
+                               F: "dddd, d. MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.de.js
new file mode 100644 (file)
index 0000000..a2183ac
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture de
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "de", "default", {
+       name: "de",
+       englishName: "German",
+       nativeName: "Deutsch",
+       language: "de",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "n. def.",
+               negativeInfinity: "-unendlich",
+               positiveInfinity: "+unendlich",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+                               namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+                               namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d. MMMM yyyy HH:mm",
+                               F: "dddd, d. MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.dsb-DE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.dsb-DE.js
new file mode 100644 (file)
index 0000000..04ad511
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Globalize Culture dsb-DE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "dsb-DE", "default", {
+       name: "dsb-DE",
+       englishName: "Lower Sorbian (Germany)",
+       nativeName: "dolnoserbšćina (Nimska)",
+       language: "dsb",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "njedefinowane",
+               negativeInfinity: "-njekońcne",
+               positiveInfinity: "+njekońcne",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ". ",
+                       firstDay: 1,
+                       days: {
+                               names: ["njeźela","ponjeźele","wałtora","srjoda","stwortk","pětk","sobota"],
+                               namesAbbr: ["nje","pon","wał","srj","stw","pět","sob"],
+                               namesShort: ["n","p","w","s","s","p","s"]
+                       },
+                       months: {
+                               names: ["januar","februar","měrc","apryl","maj","junij","julij","awgust","september","oktober","nowember","december",""],
+                               namesAbbr: ["jan","feb","měr","apr","maj","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       monthsGenitive: {
+                               names: ["januara","februara","měrca","apryla","maja","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""],
+                               namesAbbr: ["jan","feb","měr","apr","maj","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"po Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d. M. yyyy",
+                               D: "dddd, 'dnja' d. MMMM yyyy",
+                               t: "H.mm 'goź.'",
+                               T: "H:mm:ss",
+                               f: "dddd, 'dnja' d. MMMM yyyy H.mm 'goź.'",
+                               F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.dsb.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.dsb.js
new file mode 100644 (file)
index 0000000..f75129e
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Globalize Culture dsb
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "dsb", "default", {
+       name: "dsb",
+       englishName: "Lower Sorbian",
+       nativeName: "dolnoserbšćina",
+       language: "dsb",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "njedefinowane",
+               negativeInfinity: "-njekońcne",
+               positiveInfinity: "+njekońcne",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ". ",
+                       firstDay: 1,
+                       days: {
+                               names: ["njeźela","ponjeźele","wałtora","srjoda","stwortk","pětk","sobota"],
+                               namesAbbr: ["nje","pon","wał","srj","stw","pět","sob"],
+                               namesShort: ["n","p","w","s","s","p","s"]
+                       },
+                       months: {
+                               names: ["januar","februar","měrc","apryl","maj","junij","julij","awgust","september","oktober","nowember","december",""],
+                               namesAbbr: ["jan","feb","měr","apr","maj","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       monthsGenitive: {
+                               names: ["januara","februara","měrca","apryla","maja","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""],
+                               namesAbbr: ["jan","feb","měr","apr","maj","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"po Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d. M. yyyy",
+                               D: "dddd, 'dnja' d. MMMM yyyy",
+                               t: "H.mm 'goź.'",
+                               T: "H:mm:ss",
+                               f: "dddd, 'dnja' d. MMMM yyyy H.mm 'goź.'",
+                               F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.dv-MV.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.dv-MV.js
new file mode 100644 (file)
index 0000000..367a759
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+ * Globalize Culture dv-MV
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "dv-MV", "default", {
+       name: "dv-MV",
+       englishName: "Divehi (Maldives)",
+       nativeName: "ދިވެހިބަސް (ދިވެހި ރާއްޖެ)",
+       language: "dv",
+       isRTL: true,
+       numberFormat: {
+               currency: {
+                       pattern: ["n $-","n $"],
+                       symbol: "ރ."
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Hijri",
+                       days: {
+                               names: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesAbbr: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesShort: ["އާ","ހޯ","އަ","ބު","ބު","ހު","ހޮ"]
+                       },
+                       months: {
+                               names: ["މުޙައްރަމް","ޞަފަރު","ރަބީޢުލްއައްވަލް","ރަބީޢުލްއާޚިރު","ޖުމާދަލްއޫލާ","ޖުމާދަލްއާޚިރާ","ރަޖަބް","ޝަޢްބާން","ރަމަޟާން","ޝައްވާލް","ޛުލްޤަޢިދާ","ޛުލްޙިއްޖާ",""],
+                               namesAbbr: ["މުޙައްރަމް","ޞަފަރު","ރަބީޢުލްއައްވަލް","ރަބީޢުލްއާޚިރު","ޖުމާދަލްއޫލާ","ޖުމާދަލްއާޚިރާ","ރަޖަބް","ޝަޢްބާން","ރަމަޟާން","ޝައްވާލް","ޛުލްޤަޢިދާ","ޛުލްޙިއްޖާ",""]
+                       },
+                       AM: ["މކ","މކ","މކ"],
+                       PM: ["މފ","މފ","މފ"],
+                       eras: [{"name":"ހިޖްރީ","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd/MM/yyyy HH:mm",
+                               F: "dd/MM/yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_Localized: {
+                       days: {
+                               names: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesAbbr: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesShort: ["އާ","ހޯ","އަ","ބު","ބު","ހު","ހޮ"]
+                       },
+                       months: {
+                               names: ["ޖަނަވަރީ","ފެބްރުއަރީ","މާޗް","އޭޕްރިލް","މެއި","ޖޫން","ޖުލައި","އޯގަސްޓް","ސެޕްޓެމްބަރ","އޮކްޓޯބަރ","ނޮވެމްބަރ","ޑިސެމްބަރ",""],
+                               namesAbbr: ["ޖަނަވަރީ","ފެބްރުއަރީ","މާޗް","އޭޕްރިލް","މެއި","ޖޫން","ޖުލައި","އޯގަސްޓް","ސެޕްޓެމްބަރ","އޮކްޓޯބަރ","ނޮވެމްބަރ","ޑިސެމްބަރ",""]
+                       },
+                       AM: ["މކ","މކ","މކ"],
+                       PM: ["މފ","މފ","މފ"],
+                       eras: [{"name":"މީލާދީ","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "ddd, yyyy MMMM dd",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "ddd, yyyy MMMM dd HH:mm",
+                               F: "ddd, yyyy MMMM dd HH:mm:ss",
+                               Y: "yyyy, MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.dv.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.dv.js
new file mode 100644 (file)
index 0000000..04043e8
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+ * Globalize Culture dv
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "dv", "default", {
+       name: "dv",
+       englishName: "Divehi",
+       nativeName: "ދިވެހިބަސް",
+       language: "dv",
+       isRTL: true,
+       numberFormat: {
+               currency: {
+                       pattern: ["n $-","n $"],
+                       symbol: "ރ."
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Hijri",
+                       days: {
+                               names: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesAbbr: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesShort: ["އާ","ހޯ","އަ","ބު","ބު","ހު","ހޮ"]
+                       },
+                       months: {
+                               names: ["މުޙައްރަމް","ޞަފަރު","ރަބީޢުލްއައްވަލް","ރަބީޢުލްއާޚިރު","ޖުމާދަލްއޫލާ","ޖުމާދަލްއާޚިރާ","ރަޖަބް","ޝަޢްބާން","ރަމަޟާން","ޝައްވާލް","ޛުލްޤަޢިދާ","ޛުލްޙިއްޖާ",""],
+                               namesAbbr: ["މުޙައްރަމް","ޞަފަރު","ރަބީޢުލްއައްވަލް","ރަބީޢުލްއާޚިރު","ޖުމާދަލްއޫލާ","ޖުމާދަލްއާޚިރާ","ރަޖަބް","ޝަޢްބާން","ރަމަޟާން","ޝައްވާލް","ޛުލްޤަޢިދާ","ޛުލްޙިއްޖާ",""]
+                       },
+                       AM: ["މކ","މކ","މކ"],
+                       PM: ["މފ","މފ","މފ"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd/MM/yyyy HH:mm",
+                               F: "dd/MM/yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_Localized: {
+                       days: {
+                               names: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesAbbr: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesShort: ["އާ","ހޯ","އަ","ބު","ބު","ހު","ހޮ"]
+                       },
+                       months: {
+                               names: ["ޖަނަވަރީ","ފެބްރުއަރީ","މާޗް","އޭޕްރިލް","މެއި","ޖޫން","ޖުލައި","އޯގަސްޓް","ސެޕްޓެމްބަރ","އޮކްޓޯބަރ","ނޮވެމްބަރ","ޑިސެމްބަރ",""],
+                               namesAbbr: ["ޖަނަވަރީ","ފެބްރުއަރީ","މާޗް","އޭޕްރިލް","މެއި","ޖޫން","ޖުލައި","އޯގަސްޓް","ސެޕްޓެމްބަރ","އޮކްޓޯބަރ","ނޮވެމްބަރ","ޑިސެމްބަރ",""]
+                       },
+                       AM: ["މކ","މކ","މކ"],
+                       PM: ["މފ","މފ","މފ"],
+                       eras: [{"name":"މީލާދީ","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "ddd, yyyy MMMM dd",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "ddd, yyyy MMMM dd HH:mm",
+                               F: "ddd, yyyy MMMM dd HH:mm:ss",
+                               Y: "yyyy, MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.el-GR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.el-GR.js
new file mode 100644 (file)
index 0000000..a598e0d
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Globalize Culture el-GR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "el-GR", "default", {
+       name: "el-GR",
+       englishName: "Greek (Greece)",
+       nativeName: "Ελληνικά (Ελλάδα)",
+       language: "el",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "μη αριθμός",
+               negativeInfinity: "-Άπειρο",
+               positiveInfinity: "Άπειρο",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],
+                               namesAbbr: ["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],
+                               namesShort: ["Κυ","Δε","Τρ","Τε","Πε","Πα","Σά"]
+                       },
+                       months: {
+                               names: ["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος",""],
+                               namesAbbr: ["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ",""]
+                       },
+                       monthsGenitive: {
+                               names: ["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου",""],
+                               namesAbbr: ["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ",""]
+                       },
+                       AM: ["πμ","πμ","ΠΜ"],
+                       PM: ["μμ","μμ","ΜΜ"],
+                       eras: [{"name":"μ.Χ.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd, d MMMM yyyy",
+                               f: "dddd, d MMMM yyyy h:mm tt",
+                               F: "dddd, d MMMM yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.el.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.el.js
new file mode 100644 (file)
index 0000000..7ab0a51
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Globalize Culture el
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "el", "default", {
+       name: "el",
+       englishName: "Greek",
+       nativeName: "Ελληνικά",
+       language: "el",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "μη αριθμός",
+               negativeInfinity: "-Άπειρο",
+               positiveInfinity: "Άπειρο",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],
+                               namesAbbr: ["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],
+                               namesShort: ["Κυ","Δε","Τρ","Τε","Πε","Πα","Σά"]
+                       },
+                       months: {
+                               names: ["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος",""],
+                               namesAbbr: ["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ",""]
+                       },
+                       monthsGenitive: {
+                               names: ["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου",""],
+                               namesAbbr: ["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ",""]
+                       },
+                       AM: ["πμ","πμ","ΠΜ"],
+                       PM: ["μμ","μμ","ΜΜ"],
+                       eras: [{"name":"μ.Χ.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd, d MMMM yyyy",
+                               f: "dddd, d MMMM yyyy h:mm tt",
+                               F: "dddd, d MMMM yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-029.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-029.js
new file mode 100644 (file)
index 0000000..28a1705
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Globalize Culture en-029
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-029", "default", {
+       name: "en-029",
+       englishName: "English (Caribbean)",
+       nativeName: "English (Caribbean)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       patterns: {
+                               d: "MM/dd/yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-AU.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-AU.js
new file mode 100644 (file)
index 0000000..8c62088
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Globalize Culture en-AU
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-AU", "default", {
+       name: "en-AU",
+       englishName: "English (Australia)",
+       nativeName: "English (Australia)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "dddd, d MMMM yyyy",
+                               f: "dddd, d MMMM yyyy h:mm tt",
+                               F: "dddd, d MMMM yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-BZ.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-BZ.js
new file mode 100644 (file)
index 0000000..1dd1ba6
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Globalize Culture en-BZ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-BZ", "default", {
+       name: "en-BZ",
+       englishName: "English (Belize)",
+       nativeName: "English (Belize)",
+       numberFormat: {
+               currency: {
+                       groupSizes: [3,0],
+                       symbol: "BZ$"
+               }
+       },
+       calendars: {
+               standard: {
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd MMMM yyyy hh:mm tt",
+                               F: "dddd, dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-CA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-CA.js
new file mode 100644 (file)
index 0000000..7e0bab3
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Globalize Culture en-CA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-CA", "default", {
+       name: "en-CA",
+       englishName: "English (Canada)",
+       nativeName: "English (Canada)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "MMMM-dd-yy",
+                               f: "MMMM-dd-yy h:mm tt",
+                               F: "MMMM-dd-yy h:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-GB.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-GB.js
new file mode 100644 (file)
index 0000000..5167db7
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * Globalize Culture en-GB
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-GB", "default", {
+       name: "en-GB",
+       englishName: "English (United Kingdom)",
+       nativeName: "English (United Kingdom)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "£"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-IE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-IE.js
new file mode 100644 (file)
index 0000000..52772b1
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ * Globalize Culture en-IE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-IE", "default", {
+       name: "en-IE",
+       englishName: "English (Ireland)",
+       nativeName: "English (Ireland)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-IN.js
new file mode 100644 (file)
index 0000000..8dd0d36
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Globalize Culture en-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-IN", "default", {
+       name: "en-IN",
+       englishName: "English (India)",
+       nativeName: "English (India)",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "Rs."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-JM.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-JM.js
new file mode 100644 (file)
index 0000000..f1442b7
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Globalize Culture en-JM
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-JM", "default", {
+       name: "en-JM",
+       englishName: "English (Jamaica)",
+       nativeName: "English (Jamaica)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "J$"
+               }
+       },
+       calendars: {
+               standard: {
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-MY.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-MY.js
new file mode 100644 (file)
index 0000000..5d6b8cc
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Globalize Culture en-MY
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-MY", "default", {
+       name: "en-MY",
+       englishName: "English (Malaysia)",
+       nativeName: "English (Malaysia)",
+       numberFormat: {
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       symbol: "RM"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               namesShort: ["S","M","T","W","T","F","S"]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd, d MMMM, yyyy",
+                               f: "dddd, d MMMM, yyyy h:mm tt",
+                               F: "dddd, d MMMM, yyyy h:mm:ss tt",
+                               M: "d MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-NZ.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-NZ.js
new file mode 100644 (file)
index 0000000..08c28e9
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Globalize Culture en-NZ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-NZ", "default", {
+       name: "en-NZ",
+       englishName: "English (New Zealand)",
+       nativeName: "English (New Zealand)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "dddd, d MMMM yyyy",
+                               f: "dddd, d MMMM yyyy h:mm tt",
+                               F: "dddd, d MMMM yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-PH.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-PH.js
new file mode 100644 (file)
index 0000000..8be79eb
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Globalize Culture en-PH
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-PH", "default", {
+       name: "en-PH",
+       englishName: "English (Republic of the Philippines)",
+       nativeName: "English (Philippines)",
+       numberFormat: {
+               currency: {
+                       symbol: "Php"
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-SG.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-SG.js
new file mode 100644 (file)
index 0000000..a4aaf12
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Globalize Culture en-SG
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-SG", "default", {
+       name: "en-SG",
+       englishName: "English (Singapore)",
+       nativeName: "English (Singapore)",
+       numberFormat: {
+               percent: {
+                       pattern: ["-n%","n%"]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               namesShort: ["S","M","T","W","T","F","S"]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd, d MMMM, yyyy",
+                               f: "dddd, d MMMM, yyyy h:mm tt",
+                               F: "dddd, d MMMM, yyyy h:mm:ss tt",
+                               M: "d MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-TT.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-TT.js
new file mode 100644 (file)
index 0000000..1ac4aa5
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Globalize Culture en-TT
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-TT", "default", {
+       name: "en-TT",
+       englishName: "English (Trinidad and Tobago)",
+       nativeName: "English (Trinidad y Tobago)",
+       numberFormat: {
+               currency: {
+                       groupSizes: [3,0],
+                       symbol: "TT$"
+               }
+       },
+       calendars: {
+               standard: {
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd MMMM yyyy hh:mm tt",
+                               F: "dddd, dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-US.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-US.js
new file mode 100644 (file)
index 0000000..0958d1d
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Globalize Culture en-US
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-US", "default", {
+       name: "en-US",
+       englishName: "English (United States)"
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-ZA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-ZA.js
new file mode 100644 (file)
index 0000000..64f2a0c
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Globalize Culture en-ZA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-ZA", "default", {
+       name: "en-ZA",
+       englishName: "English (South Africa)",
+       nativeName: "English (South Africa)",
+       numberFormat: {
+               ",": " ",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " "
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-ZW.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.en-ZW.js
new file mode 100644 (file)
index 0000000..8323c62
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Globalize Culture en-ZW
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "en-ZW", "default", {
+       name: "en-ZW",
+       englishName: "English (Zimbabwe)",
+       nativeName: "English (Zimbabwe)",
+       numberFormat: {
+               currency: {
+                       symbol: "Z$"
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-AR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-AR.js
new file mode 100644 (file)
index 0000000..853296f
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture es-AR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-AR", "default", {
+       name: "es-AR",
+       englishName: "Spanish (Argentina)",
+       nativeName: "Español (Argentina)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-BO.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-BO.js
new file mode 100644 (file)
index 0000000..f784f68
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture es-BO
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-BO", "default", {
+       name: "es-BO",
+       englishName: "Spanish (Bolivia)",
+       nativeName: "Español (Bolivia)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "$b"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-CL.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-CL.js
new file mode 100644 (file)
index 0000000..769ad2c
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture es-CL
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-CL", "default", {
+       name: "es-CL",
+       englishName: "Spanish (Chile)",
+       nativeName: "Español (Chile)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-CO.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-CO.js
new file mode 100644 (file)
index 0000000..fb75fc9
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture es-CO
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-CO", "default", {
+       name: "es-CO",
+       englishName: "Spanish (Colombia)",
+       nativeName: "Español (Colombia)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-CR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-CR.js
new file mode 100644 (file)
index 0000000..13b90cf
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture es-CR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-CR", "default", {
+       name: "es-CR",
+       englishName: "Spanish (Costa Rica)",
+       nativeName: "Español (Costa Rica)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       ",": ".",
+                       ".": ",",
+                       symbol: "₡"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-DO.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-DO.js
new file mode 100644 (file)
index 0000000..33a4f99
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Globalize Culture es-DO
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-DO", "default", {
+       name: "es-DO",
+       englishName: "Spanish (Dominican Republic)",
+       nativeName: "Español (República Dominicana)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       symbol: "RD$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-EC.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-EC.js
new file mode 100644 (file)
index 0000000..c2779ea
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture es-EC
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-EC", "default", {
+       name: "es-EC",
+       englishName: "Spanish (Ecuador)",
+       nativeName: "Español (Ecuador)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-ES.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-ES.js
new file mode 100644 (file)
index 0000000..8a5b3df
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture es-ES
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-ES", "default", {
+       name: "es-ES",
+       englishName: "Spanish (Spain, International Sort)",
+       nativeName: "Español (España, alfabetización internacional)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-GT.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-GT.js
new file mode 100644 (file)
index 0000000..1e55ce6
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Globalize Culture es-GT
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-GT", "default", {
+       name: "es-GT",
+       englishName: "Spanish (Guatemala)",
+       nativeName: "Español (Guatemala)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       symbol: "Q"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-HN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-HN.js
new file mode 100644 (file)
index 0000000..d392d64
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Globalize Culture es-HN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-HN", "default", {
+       name: "es-HN",
+       englishName: "Spanish (Honduras)",
+       nativeName: "Español (Honduras)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,0],
+                       symbol: "L."
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-MX.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-MX.js
new file mode 100644 (file)
index 0000000..7cbf393
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Globalize Culture es-MX
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-MX", "default", {
+       name: "es-MX",
+       englishName: "Spanish (Mexico)",
+       nativeName: "Español (México)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-NI.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-NI.js
new file mode 100644 (file)
index 0000000..1b4a4c1
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Globalize Culture es-NI
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-NI", "default", {
+       name: "es-NI",
+       englishName: "Spanish (Nicaragua)",
+       nativeName: "Español (Nicaragua)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       groupSizes: [3,0],
+                       symbol: "C$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-PA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-PA.js
new file mode 100644 (file)
index 0000000..6369ea7
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Globalize Culture es-PA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-PA", "default", {
+       name: "es-PA",
+       englishName: "Spanish (Panama)",
+       nativeName: "Español (Panamá)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       symbol: "B/."
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-PE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-PE.js
new file mode 100644 (file)
index 0000000..b0261ac
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Globalize Culture es-PE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-PE", "default", {
+       name: "es-PE",
+       englishName: "Spanish (Peru)",
+       nativeName: "Español (Perú)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       symbol: "S/."
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-PR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-PR.js
new file mode 100644 (file)
index 0000000..63774f9
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Globalize Culture es-PR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-PR", "default", {
+       name: "es-PR",
+       englishName: "Spanish (Puerto Rico)",
+       nativeName: "Español (Puerto Rico)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-PY.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-PY.js
new file mode 100644 (file)
index 0000000..6a1eed0
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture es-PY
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-PY", "default", {
+       name: "es-PY",
+       englishName: "Spanish (Paraguay)",
+       nativeName: "Español (Paraguay)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Gs"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-SV.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-SV.js
new file mode 100644 (file)
index 0000000..4b4d088
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Globalize Culture es-SV
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-SV", "default", {
+       name: "es-SV",
+       englishName: "Spanish (El Salvador)",
+       nativeName: "Español (El Salvador)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-US.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-US.js
new file mode 100644 (file)
index 0000000..2e4a89a
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Globalize Culture es-US
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-US", "default", {
+       name: "es-US",
+       englishName: "Spanish (United States)",
+       nativeName: "Español (Estados Unidos)",
+       language: "es",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sa"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               M: "dd' de 'MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-UY.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-UY.js
new file mode 100644 (file)
index 0000000..50d6a2b
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture es-UY
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-UY", "default", {
+       name: "es-UY",
+       englishName: "Spanish (Uruguay)",
+       nativeName: "Español (Uruguay)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "$U"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-VE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es-VE.js
new file mode 100644 (file)
index 0000000..445181d
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture es-VE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es-VE", "default", {
+       name: "es-VE",
+       englishName: "Spanish (Bolivarian Republic of Venezuela)",
+       nativeName: "Español (Republica Bolivariana de Venezuela)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Bs. F."
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.es.js
new file mode 100644 (file)
index 0000000..6441bcd
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture es
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "es", "default", {
+       name: "es",
+       englishName: "Spanish",
+       nativeName: "español",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.et-EE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.et-EE.js
new file mode 100644 (file)
index 0000000..6164b31
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture et-EE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "et-EE", "default", {
+       name: "et-EE",
+       englishName: "Estonian (Estonia)",
+       nativeName: "eesti (Eesti)",
+       language: "et",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "avaldamatu",
+               negativeInfinity: "miinuslõpmatus",
+               positiveInfinity: "plusslõpmatus",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"],
+                               namesAbbr: ["P","E","T","K","N","R","L"],
+                               namesShort: ["P","E","T","K","N","R","L"]
+                       },
+                       months: {
+                               names: ["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember",""],
+                               namesAbbr: ["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets",""]
+                       },
+                       AM: ["EL","el","EL"],
+                       PM: ["PL","pl","PL"],
+                       patterns: {
+                               d: "d.MM.yyyy",
+                               D: "d. MMMM yyyy'. a.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy'. a.' H:mm",
+                               F: "d. MMMM yyyy'. a.' H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy'. a.'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.et.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.et.js
new file mode 100644 (file)
index 0000000..bf3384f
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture et
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "et", "default", {
+       name: "et",
+       englishName: "Estonian",
+       nativeName: "eesti",
+       language: "et",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "avaldamatu",
+               negativeInfinity: "miinuslõpmatus",
+               positiveInfinity: "plusslõpmatus",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"],
+                               namesAbbr: ["P","E","T","K","N","R","L"],
+                               namesShort: ["P","E","T","K","N","R","L"]
+                       },
+                       months: {
+                               names: ["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember",""],
+                               namesAbbr: ["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets",""]
+                       },
+                       AM: ["EL","el","EL"],
+                       PM: ["PL","pl","PL"],
+                       patterns: {
+                               d: "d.MM.yyyy",
+                               D: "d. MMMM yyyy'. a.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy'. a.' H:mm",
+                               F: "d. MMMM yyyy'. a.' H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy'. a.'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.eu-ES.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.eu-ES.js
new file mode 100644 (file)
index 0000000..2a98ef6
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture eu-ES
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "eu-ES", "default", {
+       name: "eu-ES",
+       englishName: "Basque (Basque)",
+       nativeName: "euskara (euskara)",
+       language: "eu",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "EdZ",
+               negativeInfinity: "-Infinitu",
+               positiveInfinity: "Infinitu",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],
+                               namesAbbr: ["ig.","al.","as.","az.","og.","or.","lr."],
+                               namesShort: ["ig","al","as","az","og","or","lr"]
+                       },
+                       months: {
+                               names: ["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""],
+                               namesAbbr: ["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dddd, yyyy.'eko' MMMM'k 'd",
+                               t: "HH:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, yyyy.'eko' MMMM'k 'd HH:mm",
+                               F: "dddd, yyyy.'eko' MMMM'k 'd H:mm:ss",
+                               Y: "yyyy.'eko' MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.eu.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.eu.js
new file mode 100644 (file)
index 0000000..ab2f3d9
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture eu
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "eu", "default", {
+       name: "eu",
+       englishName: "Basque",
+       nativeName: "euskara",
+       language: "eu",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "EdZ",
+               negativeInfinity: "-Infinitu",
+               positiveInfinity: "Infinitu",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],
+                               namesAbbr: ["ig.","al.","as.","az.","og.","or.","lr."],
+                               namesShort: ["ig","al","as","az","og","or","lr"]
+                       },
+                       months: {
+                               names: ["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""],
+                               namesAbbr: ["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dddd, yyyy.'eko' MMMM'k 'd",
+                               t: "HH:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, yyyy.'eko' MMMM'k 'd HH:mm",
+                               F: "dddd, yyyy.'eko' MMMM'k 'd H:mm:ss",
+                               Y: "yyyy.'eko' MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fa-IR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fa-IR.js
new file mode 100644 (file)
index 0000000..3386f5f
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * Globalize Culture fa-IR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fa-IR", "default", {
+       name: "fa-IR",
+       englishName: "Persian",
+       nativeName: "فارسى (ایران)",
+       language: "fa",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       ".": "/",
+                       symbol: "ريال"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 6,
+                       days: {
+                               names: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesAbbr: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesShort: ["ی","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["ژانويه","فوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اُكتبر","نوامبر","دسامبر",""],
+                               namesAbbr: ["ژانويه","فوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اُكتبر","نوامبر","دسامبر",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "yyyy/MM/dd",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "yyyy/MM/dd hh:mm tt",
+                               F: "yyyy/MM/dd hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fa.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fa.js
new file mode 100644 (file)
index 0000000..580eac1
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * Globalize Culture fa
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fa", "default", {
+       name: "fa",
+       englishName: "Persian",
+       nativeName: "فارسى",
+       language: "fa",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       ".": "/",
+                       symbol: "ريال"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 6,
+                       days: {
+                               names: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesAbbr: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesShort: ["ی","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["ژانويه","فوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اُكتبر","نوامبر","دسامبر",""],
+                               namesAbbr: ["ژانويه","فوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اُكتبر","نوامبر","دسامبر",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "yyyy/MM/dd",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "yyyy/MM/dd hh:mm tt",
+                               F: "yyyy/MM/dd hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fi-FI.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fi-FI.js
new file mode 100644 (file)
index 0000000..09f0dad
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture fi-FI
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fi-FI", "default", {
+       name: "fi-FI",
+       englishName: "Finnish (Finland)",
+       nativeName: "suomi (Suomi)",
+       language: "fi",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],
+                               namesAbbr: ["su","ma","ti","ke","to","pe","la"],
+                               namesShort: ["su","ma","ti","ke","to","pe","la"]
+                       },
+                       months: {
+                               names: ["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""],
+                               namesAbbr: ["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM'ta 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM'ta 'yyyy H:mm",
+                               F: "d. MMMM'ta 'yyyy H:mm:ss",
+                               M: "d. MMMM'ta'",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fi.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fi.js
new file mode 100644 (file)
index 0000000..e8fa06c
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture fi
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fi", "default", {
+       name: "fi",
+       englishName: "Finnish",
+       nativeName: "suomi",
+       language: "fi",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],
+                               namesAbbr: ["su","ma","ti","ke","to","pe","la"],
+                               namesShort: ["su","ma","ti","ke","to","pe","la"]
+                       },
+                       months: {
+                               names: ["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""],
+                               namesAbbr: ["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM'ta 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM'ta 'yyyy H:mm",
+                               F: "d. MMMM'ta 'yyyy H:mm:ss",
+                               M: "d. MMMM'ta'",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fil-PH.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fil-PH.js
new file mode 100644 (file)
index 0000000..3e6c8fa
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Globalize Culture fil-PH
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fil-PH", "default", {
+       name: "fil-PH",
+       englishName: "Filipino (Philippines)",
+       nativeName: "Filipino (Pilipinas)",
+       language: "fil",
+       numberFormat: {
+               currency: {
+                       symbol: "PhP"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Linggo","Lunes","Martes","Mierkoles","Huebes","Biernes","Sabado"],
+                               namesAbbr: ["Lin","Lun","Mar","Mier","Hueb","Bier","Saba"],
+                               namesShort: ["L","L","M","M","H","B","S"]
+                       },
+                       months: {
+                               names: ["Enero","Pebrero","Marso","Abril","Mayo","Hunyo","Hulyo","Agosto","Septyembre","Oktubre","Nobyembre","Disyembre",""],
+                               namesAbbr: ["En","Peb","Mar","Abr","Mayo","Hun","Hul","Agos","Sept","Okt","Nob","Dis",""]
+                       },
+                       eras: [{"name":"Anno Domini","start":null,"offset":0}]
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fil.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fil.js
new file mode 100644 (file)
index 0000000..6e4509f
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Globalize Culture fil
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fil", "default", {
+       name: "fil",
+       englishName: "Filipino",
+       nativeName: "Filipino",
+       language: "fil",
+       numberFormat: {
+               currency: {
+                       symbol: "PhP"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Linggo","Lunes","Martes","Mierkoles","Huebes","Biernes","Sabado"],
+                               namesAbbr: ["Lin","Lun","Mar","Mier","Hueb","Bier","Saba"],
+                               namesShort: ["L","L","M","M","H","B","S"]
+                       },
+                       months: {
+                               names: ["Enero","Pebrero","Marso","Abril","Mayo","Hunyo","Hulyo","Agosto","Septyembre","Oktubre","Nobyembre","Disyembre",""],
+                               namesAbbr: ["En","Peb","Mar","Abr","Mayo","Hun","Hul","Agos","Sept","Okt","Nob","Dis",""]
+                       },
+                       eras: [{"name":"Anno Domini","start":null,"offset":0}]
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fo-FO.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fo-FO.js
new file mode 100644 (file)
index 0000000..68783ce
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture fo-FO
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fo-FO", "default", {
+       name: "fo-FO",
+       englishName: "Faroese (Faroe Islands)",
+       nativeName: "føroyskt (Føroyar)",
+       language: "fo",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["sunnudagur","mánadagur","týsdagur","mikudagur","hósdagur","fríggjadagur","leygardagur"],
+                               namesAbbr: ["sun","mán","týs","mik","hós","frí","leyg"],
+                               namesShort: ["su","má","tý","mi","hó","fr","ley"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","apríl","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fo.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fo.js
new file mode 100644 (file)
index 0000000..7b98c7d
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture fo
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fo", "default", {
+       name: "fo",
+       englishName: "Faroese",
+       nativeName: "føroyskt",
+       language: "fo",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["sunnudagur","mánadagur","týsdagur","mikudagur","hósdagur","fríggjadagur","leygardagur"],
+                               namesAbbr: ["sun","mán","týs","mik","hós","frí","leyg"],
+                               namesShort: ["su","má","tý","mi","hó","fr","ley"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","apríl","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-BE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-BE.js
new file mode 100644 (file)
index 0000000..e5d5b9b
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture fr-BE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fr-BE", "default", {
+       name: "fr-BE",
+       englishName: "French (Belgium)",
+       nativeName: "français (Belgique)",
+       language: "fr",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-CA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-CA.js
new file mode 100644 (file)
index 0000000..d91d60e
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture fr-CA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fr-CA", "default", {
+       name: "fr-CA",
+       englishName: "French (Canada)",
+       nativeName: "français (Canada)",
+       language: "fr",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["(n $)","n $"],
+                       ",": " ",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-CH.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-CH.js
new file mode 100644 (file)
index 0000000..89d416b
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture fr-CH
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fr-CH", "default", {
+       name: "fr-CH",
+       englishName: "French (Switzerland)",
+       nativeName: "français (Suisse)",
+       language: "fr",
+       numberFormat: {
+               ",": "'",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": "'"
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": "'",
+                       symbol: "fr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-FR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-FR.js
new file mode 100644 (file)
index 0000000..ddd833a
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture fr-FR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fr-FR", "default", {
+       name: "fr-FR",
+       englishName: "French (France)",
+       nativeName: "français (France)",
+       language: "fr",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-LU.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-LU.js
new file mode 100644 (file)
index 0000000..1a3408f
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture fr-LU
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fr-LU", "default", {
+       name: "fr-LU",
+       englishName: "French (Luxembourg)",
+       nativeName: "français (Luxembourg)",
+       language: "fr",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-MC.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr-MC.js
new file mode 100644 (file)
index 0000000..a487097
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture fr-MC
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fr-MC", "default", {
+       name: "fr-MC",
+       englishName: "French (Monaco)",
+       nativeName: "français (Principauté de Monaco)",
+       language: "fr",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fr.js
new file mode 100644 (file)
index 0000000..a6ce16e
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture fr
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fr", "default", {
+       name: "fr",
+       englishName: "French",
+       nativeName: "français",
+       language: "fr",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fy-NL.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fy-NL.js
new file mode 100644 (file)
index 0000000..bf16672
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture fy-NL
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fy-NL", "default", {
+       name: "fy-NL",
+       englishName: "Frisian (Netherlands)",
+       nativeName: "Frysk (Nederlân)",
+       language: "fy",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["Snein","Moandei","Tiisdei","Woansdei","Tongersdei","Freed","Sneon"],
+                               namesAbbr: ["Sn","Mo","Ti","Wo","To","Fr","Sn"],
+                               namesShort: ["S","M","T","W","T","F","S"]
+                       },
+                       months: {
+                               names: ["jannewaris","febrewaris","maart","april","maaie","juny","july","augustus","septimber","oktober","novimber","desimber",""],
+                               namesAbbr: ["jann","febr","mrt","apr","maaie","jun","jul","aug","sept","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d-M-yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd d MMMM yyyy H:mm",
+                               F: "dddd d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fy.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.fy.js
new file mode 100644 (file)
index 0000000..7d617a0
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture fy
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "fy", "default", {
+       name: "fy",
+       englishName: "Frisian",
+       nativeName: "Frysk",
+       language: "fy",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["Snein","Moandei","Tiisdei","Woansdei","Tongersdei","Freed","Sneon"],
+                               namesAbbr: ["Sn","Mo","Ti","Wo","To","Fr","Sn"],
+                               namesShort: ["S","M","T","W","T","F","S"]
+                       },
+                       months: {
+                               names: ["jannewaris","febrewaris","maart","april","maaie","juny","july","augustus","septimber","oktober","novimber","desimber",""],
+                               namesAbbr: ["jann","febr","mrt","apr","maaie","jun","jul","aug","sept","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d-M-yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd d MMMM yyyy H:mm",
+                               F: "dddd d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ga-IE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ga-IE.js
new file mode 100644 (file)
index 0000000..dabd2ca
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture ga-IE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ga-IE", "default", {
+       name: "ga-IE",
+       englishName: "Irish (Ireland)",
+       nativeName: "Gaeilge (Éire)",
+       language: "ga",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],
+                               namesAbbr: ["Domh","Luan","Máir","Céad","Déar","Aoi","Sath"],
+                               namesShort: ["Do","Lu","Má","Cé","De","Ao","Sa"]
+                       },
+                       months: {
+                               names: ["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig",""],
+                               namesAbbr: ["Ean","Feabh","Már","Aib","Bealt","Meith","Iúil","Lún","M.Fómh","D.Fómh","Samh","Noll",""]
+                       },
+                       AM: ["r.n.","r.n.","R.N."],
+                       PM: ["i.n.","i.n.","I.N."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ga.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ga.js
new file mode 100644 (file)
index 0000000..b7df294
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture ga
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ga", "default", {
+       name: "ga",
+       englishName: "Irish",
+       nativeName: "Gaeilge",
+       language: "ga",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],
+                               namesAbbr: ["Domh","Luan","Máir","Céad","Déar","Aoi","Sath"],
+                               namesShort: ["Do","Lu","Má","Cé","De","Ao","Sa"]
+                       },
+                       months: {
+                               names: ["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig",""],
+                               namesAbbr: ["Ean","Feabh","Már","Aib","Bealt","Meith","Iúil","Lún","M.Fómh","D.Fómh","Samh","Noll",""]
+                       },
+                       AM: ["r.n.","r.n.","R.N."],
+                       PM: ["i.n.","i.n.","I.N."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gd-GB.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gd-GB.js
new file mode 100644 (file)
index 0000000..3716169
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Globalize Culture gd-GB
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "gd-GB", "default", {
+       name: "gd-GB",
+       englishName: "Scottish Gaelic (United Kingdom)",
+       nativeName: "Gàidhlig (An Rìoghachd Aonaichte)",
+       language: "gd",
+       numberFormat: {
+               negativeInfinity: "-Neo-chrìochnachd",
+               positiveInfinity: "Neo-chrìochnachd",
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "£"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],
+                               namesAbbr: ["Dòm","Lua","Mài","Cia","Ard","Hao","Sat"],
+                               namesShort: ["D","L","M","C","A","H","S"]
+                       },
+                       months: {
+                               names: ["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd",""],
+                               namesAbbr: ["Fao","Gea","Màr","Gib","Cèi","Ògm","Iuc","Lùn","Sul","Dàm","Sam","Dùb",""]
+                       },
+                       AM: ["m","m","M"],
+                       PM: ["f","f","F"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gd.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gd.js
new file mode 100644 (file)
index 0000000..7c0c35b
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Globalize Culture gd
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "gd", "default", {
+       name: "gd",
+       englishName: "Scottish Gaelic",
+       nativeName: "Gàidhlig",
+       language: "gd",
+       numberFormat: {
+               negativeInfinity: "-Neo-chrìochnachd",
+               positiveInfinity: "Neo-chrìochnachd",
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "£"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],
+                               namesAbbr: ["Dòm","Lua","Mài","Cia","Ard","Hao","Sat"],
+                               namesShort: ["D","L","M","C","A","H","S"]
+                       },
+                       months: {
+                               names: ["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd",""],
+                               namesAbbr: ["Fao","Gea","Màr","Gib","Cèi","Ògm","Iuc","Lùn","Sul","Dàm","Sam","Dùb",""]
+                       },
+                       AM: ["m","m","M"],
+                       PM: ["f","f","F"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gl-ES.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gl-ES.js
new file mode 100644 (file)
index 0000000..2f30b61
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture gl-ES
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "gl-ES", "default", {
+       name: "gl-ES",
+       englishName: "Galician (Galician)",
+       nativeName: "galego (galego)",
+       language: "gl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","luns","martes","mércores","xoves","venres","sábado"],
+                               namesAbbr: ["dom","luns","mar","mér","xov","ven","sáb"],
+                               namesShort: ["do","lu","ma","mé","xo","ve","sá"]
+                       },
+                       months: {
+                               names: ["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""],
+                               namesAbbr: ["xan","feb","mar","abr","maio","xuñ","xull","ago","set","out","nov","dec",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gl.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gl.js
new file mode 100644 (file)
index 0000000..a1fd8f1
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture gl
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "gl", "default", {
+       name: "gl",
+       englishName: "Galician",
+       nativeName: "galego",
+       language: "gl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","luns","martes","mércores","xoves","venres","sábado"],
+                               namesAbbr: ["dom","luns","mar","mér","xov","ven","sáb"],
+                               namesShort: ["do","lu","ma","mé","xo","ve","sá"]
+                       },
+                       months: {
+                               names: ["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""],
+                               namesAbbr: ["xan","feb","mar","abr","maio","xuñ","xull","ago","set","out","nov","dec",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gsw-FR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gsw-FR.js
new file mode 100644 (file)
index 0000000..a6528d3
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture gsw-FR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "gsw-FR", "default", {
+       name: "gsw-FR",
+       englishName: "Alsatian (France)",
+       nativeName: "Elsässisch (Frànkrisch)",
+       language: "gsw",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Ohne Nummer",
+               negativeInfinity: "-Unendlich",
+               positiveInfinity: "+Unendlich",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Sundàà","Mondàà","Dienschdàà","Mittwuch","Dunnerschdàà","Fridàà","Sàmschdàà"],
+                               namesAbbr: ["Su.","Mo.","Di.","Mi.","Du.","Fr.","Sà."],
+                               namesShort: ["Su","Mo","Di","Mi","Du","Fr","Sà"]
+                       },
+                       months: {
+                               names: ["Jänner","Feverje","März","Àpril","Mai","Jüni","Jüli","Augscht","September","Oktower","Nowember","Dezember",""],
+                               namesAbbr: ["Jän.","Fev.","März","Apr.","Mai","Jüni","Jüli","Aug.","Sept.","Okt.","Now.","Dez.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"Vor J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gsw.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gsw.js
new file mode 100644 (file)
index 0000000..8eca7be
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture gsw
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "gsw", "default", {
+       name: "gsw",
+       englishName: "Alsatian",
+       nativeName: "Elsässisch",
+       language: "gsw",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Ohne Nummer",
+               negativeInfinity: "-Unendlich",
+               positiveInfinity: "+Unendlich",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Sundàà","Mondàà","Dienschdàà","Mittwuch","Dunnerschdàà","Fridàà","Sàmschdàà"],
+                               namesAbbr: ["Su.","Mo.","Di.","Mi.","Du.","Fr.","Sà."],
+                               namesShort: ["Su","Mo","Di","Mi","Du","Fr","Sà"]
+                       },
+                       months: {
+                               names: ["Jänner","Feverje","März","Àpril","Mai","Jüni","Jüli","Augscht","September","Oktower","Nowember","Dezember",""],
+                               namesAbbr: ["Jän.","Fev.","März","Apr.","Mai","Jüni","Jüli","Aug.","Sept.","Okt.","Now.","Dez.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"Vor J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gu-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gu-IN.js
new file mode 100644 (file)
index 0000000..b6c4009
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture gu-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "gu-IN", "default", {
+       name: "gu-IN",
+       englishName: "Gujarati (India)",
+       nativeName: "ગુજરાતી (ભારત)",
+       language: "gu",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "રૂ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["રવિવાર","સોમવાર","મંગળવાર","બુધવાર","ગુરુવાર","શુક્રવાર","શનિવાર"],
+                               namesAbbr: ["રવિ","સોમ","મંગળ","બુધ","ગુરુ","શુક્ર","શનિ"],
+                               namesShort: ["ર","સ","મ","બ","ગ","શ","શ"]
+                       },
+                       months: {
+                               names: ["જાન્યુઆરી","ફેબ્રુઆરી","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઈ","ઑગસ્ટ","સપ્ટેમ્બર","ઑક્ટ્બર","નવેમ્બર","ડિસેમ્બર",""],
+                               namesAbbr: ["જાન્યુ","ફેબ્રુ","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઈ","ઑગસ્ટ","સપ્ટે","ઑક્ટો","નવે","ડિસે",""]
+                       },
+                       AM: ["પૂર્વ મધ્યાહ્ન","પૂર્વ મધ્યાહ્ન","પૂર્વ મધ્યાહ્ન"],
+                       PM: ["ઉત્તર મધ્યાહ્ન","ઉત્તર મધ્યાહ્ન","ઉત્તર મધ્યાહ્ન"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gu.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.gu.js
new file mode 100644 (file)
index 0000000..cab1c0e
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture gu
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "gu", "default", {
+       name: "gu",
+       englishName: "Gujarati",
+       nativeName: "ગુજરાતી",
+       language: "gu",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "રૂ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["રવિવાર","સોમવાર","મંગળવાર","બુધવાર","ગુરુવાર","શુક્રવાર","શનિવાર"],
+                               namesAbbr: ["રવિ","સોમ","મંગળ","બુધ","ગુરુ","શુક્ર","શનિ"],
+                               namesShort: ["ર","સ","મ","બ","ગ","શ","શ"]
+                       },
+                       months: {
+                               names: ["જાન્યુઆરી","ફેબ્રુઆરી","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઈ","ઑગસ્ટ","સપ્ટેમ્બર","ઑક્ટ્બર","નવેમ્બર","ડિસેમ્બર",""],
+                               namesAbbr: ["જાન્યુ","ફેબ્રુ","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઈ","ઑગસ્ટ","સપ્ટે","ઑક્ટો","નવે","ડિસે",""]
+                       },
+                       AM: ["પૂર્વ મધ્યાહ્ન","પૂર્વ મધ્યાહ્ન","પૂર્વ મધ્યાહ્ન"],
+                       PM: ["ઉત્તર મધ્યાહ્ન","ઉત્તર મધ્યાહ્ન","ઉત્તર મધ્યાહ્ન"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ha-Latn-NG.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ha-Latn-NG.js
new file mode 100644 (file)
index 0000000..5ac8bd8
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Globalize Culture ha-Latn-NG
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ha-Latn-NG", "default", {
+       name: "ha-Latn-NG",
+       englishName: "Hausa (Latin, Nigeria)",
+       nativeName: "Hausa (Nigeria)",
+       language: "ha-Latn",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Lahadi","Litinin","Talata","Laraba","Alhamis","Juma'a","Asabar"],
+                               namesAbbr: ["Lah","Lit","Tal","Lar","Alh","Jum","Asa"],
+                               namesShort: ["L","L","T","L","A","J","A"]
+                       },
+                       months: {
+                               names: ["Januwaru","Febreru","Maris","Afrilu","Mayu","Yuni","Yuli","Agusta","Satumba","Oktocba","Nuwamba","Disamba",""],
+                               namesAbbr: ["Jan","Feb","Mar","Afr","May","Yun","Yul","Agu","Sat","Okt","Nuw","Dis",""]
+                       },
+                       AM: ["Safe","safe","SAFE"],
+                       PM: ["Yamma","yamma","YAMMA"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ha-Latn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ha-Latn.js
new file mode 100644 (file)
index 0000000..049ca5a
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Globalize Culture ha-Latn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ha-Latn", "default", {
+       name: "ha-Latn",
+       englishName: "Hausa (Latin)",
+       nativeName: "Hausa",
+       language: "ha-Latn",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Lahadi","Litinin","Talata","Laraba","Alhamis","Juma'a","Asabar"],
+                               namesAbbr: ["Lah","Lit","Tal","Lar","Alh","Jum","Asa"],
+                               namesShort: ["L","L","T","L","A","J","A"]
+                       },
+                       months: {
+                               names: ["Januwaru","Febreru","Maris","Afrilu","Mayu","Yuni","Yuli","Agusta","Satumba","Oktocba","Nuwamba","Disamba",""],
+                               namesAbbr: ["Jan","Feb","Mar","Afr","May","Yun","Yul","Agu","Sat","Okt","Nuw","Dis",""]
+                       },
+                       AM: ["Safe","safe","SAFE"],
+                       PM: ["Yamma","yamma","YAMMA"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ha.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ha.js
new file mode 100644 (file)
index 0000000..07f4be8
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Globalize Culture ha
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ha", "default", {
+       name: "ha",
+       englishName: "Hausa",
+       nativeName: "Hausa",
+       language: "ha",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Lahadi","Litinin","Talata","Laraba","Alhamis","Juma'a","Asabar"],
+                               namesAbbr: ["Lah","Lit","Tal","Lar","Alh","Jum","Asa"],
+                               namesShort: ["L","L","T","L","A","J","A"]
+                       },
+                       months: {
+                               names: ["Januwaru","Febreru","Maris","Afrilu","Mayu","Yuni","Yuli","Agusta","Satumba","Oktocba","Nuwamba","Disamba",""],
+                               namesAbbr: ["Jan","Feb","Mar","Afr","May","Yun","Yul","Agu","Sat","Okt","Nuw","Dis",""]
+                       },
+                       AM: ["Safe","safe","SAFE"],
+                       PM: ["Yamma","yamma","YAMMA"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.he-IL.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.he-IL.js
new file mode 100644 (file)
index 0000000..b0bd6b8
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * Globalize Culture he-IL
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "he-IL", "default", {
+       name: "he-IL",
+       englishName: "Hebrew (Israel)",
+       nativeName: "עברית (ישראל)",
+       language: "he",
+       isRTL: true,
+       numberFormat: {
+               NaN: "לא מספר",
+               negativeInfinity: "אינסוף שלילי",
+               positiveInfinity: "אינסוף חיובי",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "₪"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"],
+                               namesAbbr: ["יום א","יום ב","יום ג","יום ד","יום ה","יום ו","שבת"],
+                               namesShort: ["א","ב","ג","ד","ה","ו","ש"]
+                       },
+                       months: {
+                               names: ["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר",""],
+                               namesAbbr: ["ינו","פבר","מרץ","אפר","מאי","יונ","יול","אוג","ספט","אוק","נוב","דצמ",""]
+                       },
+                       eras: [{"name":"לספירה","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd dd MMMM yyyy HH:mm",
+                               F: "dddd dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               },
+               Hebrew: {
+                       name: "Hebrew",
+                       "/": " ",
+                       days: {
+                               names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"],
+                               namesAbbr: ["א","ב","ג","ד","ה","ו","ש"],
+                               namesShort: ["א","ב","ג","ד","ה","ו","ש"]
+                       },
+                       months: {
+                               names: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"],
+                               namesAbbr: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"]
+                       },
+                       eras: [{"name":"C.E.","start":null,"offset":0}],
+                       twoDigitYearMax: 5790,
+                       patterns: {
+                               d: "dd MMMM yyyy",
+                               D: "dddd dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd dd MMMM yyyy HH:mm",
+                               F: "dddd dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.he.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.he.js
new file mode 100644 (file)
index 0000000..bca17f3
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * Globalize Culture he
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "he", "default", {
+       name: "he",
+       englishName: "Hebrew",
+       nativeName: "עברית",
+       language: "he",
+       isRTL: true,
+       numberFormat: {
+               NaN: "לא מספר",
+               negativeInfinity: "אינסוף שלילי",
+               positiveInfinity: "אינסוף חיובי",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "₪"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"],
+                               namesAbbr: ["יום א","יום ב","יום ג","יום ד","יום ה","יום ו","שבת"],
+                               namesShort: ["א","ב","ג","ד","ה","ו","ש"]
+                       },
+                       months: {
+                               names: ["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר",""],
+                               namesAbbr: ["ינו","פבר","מרץ","אפר","מאי","יונ","יול","אוג","ספט","אוק","נוב","דצמ",""]
+                       },
+                       eras: [{"name":"לספירה","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd dd MMMM yyyy HH:mm",
+                               F: "dddd dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               },
+               Hebrew: {
+                       name: "Hebrew",
+                       "/": " ",
+                       days: {
+                               names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"],
+                               namesAbbr: ["א","ב","ג","ד","ה","ו","ש"],
+                               namesShort: ["א","ב","ג","ד","ה","ו","ש"]
+                       },
+                       months: {
+                               names: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"],
+                               namesAbbr: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"]
+                       },
+                       eras: [{"name":"C.E.","start":null,"offset":0}],
+                       twoDigitYearMax: 5790,
+                       patterns: {
+                               d: "dd MMMM yyyy",
+                               D: "dddd dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd dd MMMM yyyy HH:mm",
+                               F: "dddd dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hi-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hi-IN.js
new file mode 100644 (file)
index 0000000..7e228b2
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture hi-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "hi-IN", "default", {
+       name: "hi-IN",
+       englishName: "Hindi (India)",
+       nativeName: "हिंदी (भारत)",
+       language: "hi",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],
+                               namesAbbr: ["रवि.","सोम.","मंगल.","बुध.","गुरु.","शुक्र.","शनि."],
+                               namesShort: ["र","स","म","ब","ग","श","श"]
+                       },
+                       months: {
+                               names: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""],
+                               namesAbbr: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""]
+                       },
+                       AM: ["पूर्वाह्न","पूर्वाह्न","पूर्वाह्न"],
+                       PM: ["अपराह्न","अपराह्न","अपराह्न"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hi.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hi.js
new file mode 100644 (file)
index 0000000..15dc5d4
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture hi
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "hi", "default", {
+       name: "hi",
+       englishName: "Hindi",
+       nativeName: "हिंदी",
+       language: "hi",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],
+                               namesAbbr: ["रवि.","सोम.","मंगल.","बुध.","गुरु.","शुक्र.","शनि."],
+                               namesShort: ["र","स","म","ब","ग","श","श"]
+                       },
+                       months: {
+                               names: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""],
+                               namesAbbr: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""]
+                       },
+                       AM: ["पूर्वाह्न","पूर्वाह्न","पूर्वाह्न"],
+                       PM: ["अपराह्न","अपराह्न","अपराह्न"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hr-BA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hr-BA.js
new file mode 100644 (file)
index 0000000..63ff67e
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture hr-BA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "hr-BA", "default", {
+       name: "hr-BA",
+       englishName: "Croatian (Latin, Bosnia and Herzegovina)",
+       nativeName: "hrvatski (Bosna i Hercegovina)",
+       language: "hr",
+       numberFormat: {
+               pattern: ["- n"],
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "KM"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""],
+                               namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+                       },
+                       monthsGenitive: {
+                               names: ["siječnja","veljače","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""],
+                               namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy.",
+                               D: "d. MMMM yyyy.",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy. H:mm",
+                               F: "d. MMMM yyyy. H:mm:ss",
+                               M: "d. MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hr-HR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hr-HR.js
new file mode 100644 (file)
index 0000000..f63a459
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture hr-HR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "hr-HR", "default", {
+       name: "hr-HR",
+       englishName: "Croatian (Croatia)",
+       nativeName: "hrvatski (Hrvatska)",
+       language: "hr",
+       numberFormat: {
+               pattern: ["- n"],
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kn"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""],
+                               namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+                       },
+                       monthsGenitive: {
+                               names: ["siječnja","veljače","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""],
+                               namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy.",
+                               D: "d. MMMM yyyy.",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy. H:mm",
+                               F: "d. MMMM yyyy. H:mm:ss",
+                               M: "d. MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hr.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hr.js
new file mode 100644 (file)
index 0000000..747e76c
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture hr
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "hr", "default", {
+       name: "hr",
+       englishName: "Croatian",
+       nativeName: "hrvatski",
+       language: "hr",
+       numberFormat: {
+               pattern: ["- n"],
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kn"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""],
+                               namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+                       },
+                       monthsGenitive: {
+                               names: ["siječnja","veljače","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""],
+                               namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy.",
+                               D: "d. MMMM yyyy.",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy. H:mm",
+                               F: "d. MMMM yyyy. H:mm:ss",
+                               M: "d. MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hsb-DE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hsb-DE.js
new file mode 100644 (file)
index 0000000..8588f95
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Globalize Culture hsb-DE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "hsb-DE", "default", {
+       name: "hsb-DE",
+       englishName: "Upper Sorbian (Germany)",
+       nativeName: "hornjoserbšćina (Němska)",
+       language: "hsb",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "njedefinowane",
+               negativeInfinity: "-njekónčne",
+               positiveInfinity: "+njekónčne",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ". ",
+                       firstDay: 1,
+                       days: {
+                               names: ["njedźela","póndźela","wutora","srjeda","štwórtk","pjatk","sobota"],
+                               namesAbbr: ["nje","pón","wut","srj","štw","pja","sob"],
+                               namesShort: ["n","p","w","s","š","p","s"]
+                       },
+                       months: {
+                               names: ["januar","februar","měrc","apryl","meja","junij","julij","awgust","september","oktober","nowember","december",""],
+                               namesAbbr: ["jan","feb","měr","apr","mej","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       monthsGenitive: {
+                               names: ["januara","februara","měrca","apryla","meje","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""],
+                               namesAbbr: ["jan","feb","měr","apr","mej","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"po Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d. M. yyyy",
+                               D: "dddd, 'dnja' d. MMMM yyyy",
+                               t: "H.mm 'hodź.'",
+                               T: "H:mm:ss",
+                               f: "dddd, 'dnja' d. MMMM yyyy H.mm 'hodź.'",
+                               F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hsb.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hsb.js
new file mode 100644 (file)
index 0000000..a6ce654
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Globalize Culture hsb
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "hsb", "default", {
+       name: "hsb",
+       englishName: "Upper Sorbian",
+       nativeName: "hornjoserbšćina",
+       language: "hsb",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "njedefinowane",
+               negativeInfinity: "-njekónčne",
+               positiveInfinity: "+njekónčne",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ". ",
+                       firstDay: 1,
+                       days: {
+                               names: ["njedźela","póndźela","wutora","srjeda","štwórtk","pjatk","sobota"],
+                               namesAbbr: ["nje","pón","wut","srj","štw","pja","sob"],
+                               namesShort: ["n","p","w","s","š","p","s"]
+                       },
+                       months: {
+                               names: ["januar","februar","měrc","apryl","meja","junij","julij","awgust","september","oktober","nowember","december",""],
+                               namesAbbr: ["jan","feb","měr","apr","mej","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       monthsGenitive: {
+                               names: ["januara","februara","měrca","apryla","meje","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""],
+                               namesAbbr: ["jan","feb","měr","apr","mej","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"po Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d. M. yyyy",
+                               D: "dddd, 'dnja' d. MMMM yyyy",
+                               t: "H.mm 'hodź.'",
+                               T: "H:mm:ss",
+                               f: "dddd, 'dnja' d. MMMM yyyy H.mm 'hodź.'",
+                               F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hu-HU.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hu-HU.js
new file mode 100644 (file)
index 0000000..e48037a
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture hu-HU
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "hu-HU", "default", {
+       name: "hu-HU",
+       englishName: "Hungarian (Hungary)",
+       nativeName: "magyar (Magyarország)",
+       language: "hu",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "nem szám",
+               negativeInfinity: "negatív végtelen",
+               positiveInfinity: "végtelen",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Ft"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],
+                               namesAbbr: ["V","H","K","Sze","Cs","P","Szo"],
+                               namesShort: ["V","H","K","Sze","Cs","P","Szo"]
+                       },
+                       months: {
+                               names: ["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december",""],
+                               namesAbbr: ["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec.",""]
+                       },
+                       AM: ["de.","de.","DE."],
+                       PM: ["du.","du.","DU."],
+                       eras: [{"name":"i.sz.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy.MM.dd.",
+                               D: "yyyy. MMMM d.",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy. MMMM d. H:mm",
+                               F: "yyyy. MMMM d. H:mm:ss",
+                               M: "MMMM d.",
+                               Y: "yyyy. MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hu.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hu.js
new file mode 100644 (file)
index 0000000..5db2111
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture hu
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "hu", "default", {
+       name: "hu",
+       englishName: "Hungarian",
+       nativeName: "magyar",
+       language: "hu",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "nem szám",
+               negativeInfinity: "negatív végtelen",
+               positiveInfinity: "végtelen",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Ft"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],
+                               namesAbbr: ["V","H","K","Sze","Cs","P","Szo"],
+                               namesShort: ["V","H","K","Sze","Cs","P","Szo"]
+                       },
+                       months: {
+                               names: ["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december",""],
+                               namesAbbr: ["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec.",""]
+                       },
+                       AM: ["de.","de.","DE."],
+                       PM: ["du.","du.","DU."],
+                       eras: [{"name":"i.sz.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy.MM.dd.",
+                               D: "yyyy. MMMM d.",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy. MMMM d. H:mm",
+                               F: "yyyy. MMMM d. H:mm:ss",
+                               M: "MMMM d.",
+                               Y: "yyyy. MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hy-AM.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hy-AM.js
new file mode 100644 (file)
index 0000000..d4b0e3f
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture hy-AM
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "hy-AM", "default", {
+       name: "hy-AM",
+       englishName: "Armenian (Armenia)",
+       nativeName: "Հայերեն (Հայաստան)",
+       language: "hy",
+       numberFormat: {
+               currency: {
+                       pattern: ["-n $","n $"],
+                       symbol: "դր."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Կիրակի","Երկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","ՈՒրբաթ","Շաբաթ"],
+                               namesAbbr: ["Կիր","Երկ","Երք","Չրք","Հնգ","ՈՒր","Շբթ"],
+                               namesShort: ["Կ","Ե","Ե","Չ","Հ","Ո","Շ"]
+                       },
+                       months: {
+                               names: ["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր",""],
+                               namesAbbr: ["ՀՆՎ","ՓՏՎ","ՄՐՏ","ԱՊՐ","ՄՅՍ","ՀՆՍ","ՀԼՍ","ՕԳՍ","ՍԵՊ","ՀՈԿ","ՆՈՅ","ԴԵԿ",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM, yyyy H:mm",
+                               F: "d MMMM, yyyy H:mm:ss",
+                               M: "d MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hy.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.hy.js
new file mode 100644 (file)
index 0000000..914d70f
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture hy
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "hy", "default", {
+       name: "hy",
+       englishName: "Armenian",
+       nativeName: "Հայերեն",
+       language: "hy",
+       numberFormat: {
+               currency: {
+                       pattern: ["-n $","n $"],
+                       symbol: "դր."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Կիրակի","Երկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","ՈՒրբաթ","Շաբաթ"],
+                               namesAbbr: ["Կիր","Երկ","Երք","Չրք","Հնգ","ՈՒր","Շբթ"],
+                               namesShort: ["Կ","Ե","Ե","Չ","Հ","Ո","Շ"]
+                       },
+                       months: {
+                               names: ["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր",""],
+                               namesAbbr: ["ՀՆՎ","ՓՏՎ","ՄՐՏ","ԱՊՐ","ՄՅՍ","ՀՆՍ","ՀԼՍ","ՕԳՍ","ՍԵՊ","ՀՈԿ","ՆՈՅ","ԴԵԿ",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM, yyyy H:mm",
+                               F: "d MMMM, yyyy H:mm:ss",
+                               M: "d MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.id-ID.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.id-ID.js
new file mode 100644 (file)
index 0000000..7f7c890
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Globalize Culture id-ID
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "id-ID", "default", {
+       name: "id-ID",
+       englishName: "Indonesian (Indonesia)",
+       nativeName: "Bahasa Indonesia (Indonesia)",
+       language: "id",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       decimals: 0,
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Rp"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],
+                               namesAbbr: ["Minggu","Sen","Sel","Rabu","Kamis","Jumat","Sabtu"],
+                               namesShort: ["M","S","S","R","K","J","S"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember",""],
+                               namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agust","Sep","Okt","Nop","Des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM yyyy H:mm",
+                               F: "dd MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.id.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.id.js
new file mode 100644 (file)
index 0000000..278522d
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Globalize Culture id
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "id", "default", {
+       name: "id",
+       englishName: "Indonesian",
+       nativeName: "Bahasa Indonesia",
+       language: "id",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       decimals: 0,
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Rp"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],
+                               namesAbbr: ["Minggu","Sen","Sel","Rabu","Kamis","Jumat","Sabtu"],
+                               namesShort: ["M","S","S","R","K","J","S"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember",""],
+                               namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agust","Sep","Okt","Nop","Des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM yyyy H:mm",
+                               F: "dd MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ig-NG.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ig-NG.js
new file mode 100644 (file)
index 0000000..444f59f
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Globalize Culture ig-NG
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ig-NG", "default", {
+       name: "ig-NG",
+       englishName: "Igbo (Nigeria)",
+       nativeName: "Igbo (Nigeria)",
+       language: "ig",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"],
+                               namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"],
+                               namesShort: ["A","A","I","O","O","E","A"]
+                       },
+                       months: {
+                               names: ["Onwa mbu","Onwa ibua","Onwa ato","Onwa ano","Onwa ise","Onwa isi","Onwa asa","Onwa asato","Onwa itolu","Onwa iri","Onwa iri n'ofu","Onwa iri n'ibua",""],
+                               namesAbbr: ["mbu.","ibu.","ato.","ano.","ise","isi","asa","asa.","ito.","iri.","n'of.","n'ib.",""]
+                       },
+                       AM: ["Ututu","ututu","UTUTU"],
+                       PM: ["Efifie","efifie","EFIFIE"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ig.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ig.js
new file mode 100644 (file)
index 0000000..bce5771
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Globalize Culture ig
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ig", "default", {
+       name: "ig",
+       englishName: "Igbo",
+       nativeName: "Igbo",
+       language: "ig",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"],
+                               namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"],
+                               namesShort: ["A","A","I","O","O","E","A"]
+                       },
+                       months: {
+                               names: ["Onwa mbu","Onwa ibua","Onwa ato","Onwa ano","Onwa ise","Onwa isi","Onwa asa","Onwa asato","Onwa itolu","Onwa iri","Onwa iri n'ofu","Onwa iri n'ibua",""],
+                               namesAbbr: ["mbu.","ibu.","ato.","ano.","ise","isi","asa","asa.","ito.","iri.","n'of.","n'ib.",""]
+                       },
+                       AM: ["Ututu","ututu","UTUTU"],
+                       PM: ["Efifie","efifie","EFIFIE"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ii-CN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ii-CN.js
new file mode 100644 (file)
index 0000000..7157e36
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture ii-CN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ii-CN", "default", {
+       name: "ii-CN",
+       englishName: "Yi (PRC)",
+       nativeName: "ꆈꌠꁱꂷ (ꍏꉸꏓꂱꇭꉼꇩ)",
+       language: "ii",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "ꌗꂷꀋꉬ",
+               negativeInfinity: "ꀄꊭꌐꀋꉆ",
+               positiveInfinity: "ꈤꇁꑖꀋꉬ",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["ꑭꆏꑍ","ꆏꊂ꒔","ꆏꊂꑍ","ꆏꊂꌕ","ꆏꊂꇖ","ꆏꊂꉬ","ꆏꊂꃘ"],
+                               namesAbbr: ["ꑭꆏ","ꆏ꒔","ꆏꑍ","ꆏꌕ","ꆏꇖ","ꆏꉬ","ꆏꃘ"],
+                               namesShort: ["ꆏ","꒔","ꑍ","ꌕ","ꇖ","ꉬ","ꃘ"]
+                       },
+                       months: {
+                               names: ["ꋍꆪ","ꑍꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","ꏃꆪ","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""],
+                               namesAbbr: ["ꋍꆪ","ꑍꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","ꏃꆪ","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""]
+                       },
+                       AM: ["ꂵꆪꈌꈐ","ꂵꆪꈌꈐ","ꂵꆪꈌꈐ"],
+                       PM: ["ꂵꆪꈌꉈ","ꂵꆪꈌꉈ","ꂵꆪꈌꉈ"],
+                       eras: [{"name":"ꇬꑼ","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'ꈎ' M'ꆪ' d'ꑍ'",
+                               t: "tt h:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'ꈎ' M'ꆪ' d'ꑍ' tt h:mm",
+                               F: "yyyy'ꈎ' M'ꆪ' d'ꑍ' H:mm:ss",
+                               M: "M'ꆪ' d'ꑍ'",
+                               Y: "yyyy'ꈎ' M'ꆪ'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ii.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ii.js
new file mode 100644 (file)
index 0000000..6aace19
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture ii
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ii", "default", {
+       name: "ii",
+       englishName: "Yi",
+       nativeName: "ꆈꌠꁱꂷ",
+       language: "ii",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "ꌗꂷꀋꉬ",
+               negativeInfinity: "ꀄꊭꌐꀋꉆ",
+               positiveInfinity: "ꈤꇁꑖꀋꉬ",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["ꑭꆏꑍ","ꆏꊂ꒔","ꆏꊂꑍ","ꆏꊂꌕ","ꆏꊂꇖ","ꆏꊂꉬ","ꆏꊂꃘ"],
+                               namesAbbr: ["ꑭꆏ","ꆏ꒔","ꆏꑍ","ꆏꌕ","ꆏꇖ","ꆏꉬ","ꆏꃘ"],
+                               namesShort: ["ꆏ","꒔","ꑍ","ꌕ","ꇖ","ꉬ","ꃘ"]
+                       },
+                       months: {
+                               names: ["ꋍꆪ","ꑍꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","ꏃꆪ","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""],
+                               namesAbbr: ["ꋍꆪ","ꑍꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","ꏃꆪ","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""]
+                       },
+                       AM: ["ꂵꆪꈌꈐ","ꂵꆪꈌꈐ","ꂵꆪꈌꈐ"],
+                       PM: ["ꂵꆪꈌꉈ","ꂵꆪꈌꉈ","ꂵꆪꈌꉈ"],
+                       eras: [{"name":"ꇬꑼ","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'ꈎ' M'ꆪ' d'ꑍ'",
+                               t: "tt h:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'ꈎ' M'ꆪ' d'ꑍ' tt h:mm",
+                               F: "yyyy'ꈎ' M'ꆪ' d'ꑍ' H:mm:ss",
+                               M: "M'ꆪ' d'ꑍ'",
+                               Y: "yyyy'ꈎ' M'ꆪ'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.is-IS.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.is-IS.js
new file mode 100644 (file)
index 0000000..7af9121
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture is-IS
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "is-IS", "default", {
+       name: "is-IS",
+       englishName: "Icelandic (Iceland)",
+       nativeName: "íslenska (Ísland)",
+       language: "is",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       decimals: 0,
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"],
+                               namesAbbr: ["sun.","mán.","þri.","mið.","fim.","fös.","lau."],
+                               namesShort: ["su","má","þr","mi","fi","fö","la"]
+                       },
+                       months: {
+                               names: ["janúar","febrúar","mars","apríl","maí","júní","júlí","ágúst","september","október","nóvember","desember",""],
+                               namesAbbr: ["jan.","feb.","mar.","apr.","maí","jún.","júl.","ágú.","sep.","okt.","nóv.","des.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.is.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.is.js
new file mode 100644 (file)
index 0000000..971e18a
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture is
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "is", "default", {
+       name: "is",
+       englishName: "Icelandic",
+       nativeName: "íslenska",
+       language: "is",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       decimals: 0,
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"],
+                               namesAbbr: ["sun.","mán.","þri.","mið.","fim.","fös.","lau."],
+                               namesShort: ["su","má","þr","mi","fi","fö","la"]
+                       },
+                       months: {
+                               names: ["janúar","febrúar","mars","apríl","maí","júní","júlí","ágúst","september","október","nóvember","desember",""],
+                               namesAbbr: ["jan.","feb.","mar.","apr.","maí","jún.","júl.","ágú.","sep.","okt.","nóv.","des.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.it-CH.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.it-CH.js
new file mode 100644 (file)
index 0000000..e231c2f
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture it-CH
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "it-CH", "default", {
+       name: "it-CH",
+       englishName: "Italian (Switzerland)",
+       nativeName: "italiano (Svizzera)",
+       language: "it",
+       numberFormat: {
+               ",": "'",
+               NaN: "Non un numero reale",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "+Infinito",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": "'"
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": "'",
+                       symbol: "fr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],
+                               namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"],
+                               namesShort: ["do","lu","ma","me","gi","ve","sa"]
+                       },
+                       months: {
+                               names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],
+                               namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d. MMMM yyyy HH:mm",
+                               F: "dddd, d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.it-IT.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.it-IT.js
new file mode 100644 (file)
index 0000000..42ec54a
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture it-IT
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "it-IT", "default", {
+       name: "it-IT",
+       englishName: "Italian (Italy)",
+       nativeName: "italiano (Italia)",
+       language: "it",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "Non un numero reale",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "+Infinito",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],
+                               namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"],
+                               namesShort: ["do","lu","ma","me","gi","ve","sa"]
+                       },
+                       months: {
+                               names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],
+                               namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.it.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.it.js
new file mode 100644 (file)
index 0000000..34594b0
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture it
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "it", "default", {
+       name: "it",
+       englishName: "Italian",
+       nativeName: "italiano",
+       language: "it",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "Non un numero reale",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "+Infinito",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],
+                               namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"],
+                               namesShort: ["do","lu","ma","me","gi","ve","sa"]
+                       },
+                       months: {
+                               names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],
+                               namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu-Cans-CA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu-Cans-CA.js
new file mode 100644 (file)
index 0000000..f546847
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Globalize Culture iu-Cans-CA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "iu-Cans-CA", "default", {
+       name: "iu-Cans-CA",
+       englishName: "Inuktitut (Syllabics, Canada)",
+       nativeName: "ᐃᓄᒃᑎᑐᑦ (ᑲᓇᑕᒥ)",
+       language: "iu-Cans",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["ᓈᑦᑏᖑᔭ","ᓇᒡᒐᔾᔭᐅ","ᐊᐃᑉᐱᖅ","ᐱᖓᑦᓯᖅ","ᓯᑕᒻᒥᖅ","ᑕᓪᓕᕐᒥᖅ","ᓯᕙᑖᕐᕕᒃ"],
+                               namesAbbr: ["ᓈᑦᑏ","ᓇᒡᒐ","ᐊᐃᑉᐱ","ᐱᖓᑦᓯ","ᓯᑕ","ᑕᓪᓕ","ᓯᕙᑖᕐᕕᒃ"],
+                               namesShort: ["ᓈ","ᓇ","ᐊ","ᐱ","ᓯ","ᑕ","ᓯ"]
+                       },
+                       months: {
+                               names: ["ᔮᓐᓄᐊᕆ","ᕖᕝᕗᐊᕆ","ᒫᑦᓯ","ᐄᐳᕆ","ᒪᐃ","ᔫᓂ","ᔪᓚᐃ","ᐋᒡᒌᓯ","ᓯᑎᐱᕆ","ᐅᑐᐱᕆ","ᓄᕕᐱᕆ","ᑎᓯᐱᕆ",""],
+                               namesAbbr: ["ᔮᓐᓄ","ᕖᕝᕗ","ᒫᑦᓯ","ᐄᐳᕆ","ᒪᐃ","ᔫᓂ","ᔪᓚᐃ","ᐋᒡᒌ","ᓯᑎᐱ","ᐅᑐᐱ","ᓄᕕᐱ","ᑎᓯᐱ",""]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd,MMMM dd,yyyy",
+                               f: "dddd,MMMM dd,yyyy h:mm tt",
+                               F: "dddd,MMMM dd,yyyy h:mm:ss tt",
+                               Y: "MMMM,yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu-Cans.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu-Cans.js
new file mode 100644 (file)
index 0000000..62f15ab
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Globalize Culture iu-Cans
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "iu-Cans", "default", {
+       name: "iu-Cans",
+       englishName: "Inuktitut (Syllabics)",
+       nativeName: "ᐃᓄᒃᑎᑐᑦ",
+       language: "iu-Cans",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["ᓈᑦᑏᖑᔭ","ᓇᒡᒐᔾᔭᐅ","ᐊᐃᑉᐱᖅ","ᐱᖓᑦᓯᖅ","ᓯᑕᒻᒥᖅ","ᑕᓪᓕᕐᒥᖅ","ᓯᕙᑖᕐᕕᒃ"],
+                               namesAbbr: ["ᓈᑦᑏ","ᓇᒡᒐ","ᐊᐃᑉᐱ","ᐱᖓᑦᓯ","ᓯᑕ","ᑕᓪᓕ","ᓯᕙᑖᕐᕕᒃ"],
+                               namesShort: ["ᓈ","ᓇ","ᐊ","ᐱ","ᓯ","ᑕ","ᓯ"]
+                       },
+                       months: {
+                               names: ["ᔮᓐᓄᐊᕆ","ᕖᕝᕗᐊᕆ","ᒫᑦᓯ","ᐄᐳᕆ","ᒪᐃ","ᔫᓂ","ᔪᓚᐃ","ᐋᒡᒌᓯ","ᓯᑎᐱᕆ","ᐅᑐᐱᕆ","ᓄᕕᐱᕆ","ᑎᓯᐱᕆ",""],
+                               namesAbbr: ["ᔮᓐᓄ","ᕖᕝᕗ","ᒫᑦᓯ","ᐄᐳᕆ","ᒪᐃ","ᔫᓂ","ᔪᓚᐃ","ᐋᒡᒌ","ᓯᑎᐱ","ᐅᑐᐱ","ᓄᕕᐱ","ᑎᓯᐱ",""]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd,MMMM dd,yyyy",
+                               f: "dddd,MMMM dd,yyyy h:mm tt",
+                               F: "dddd,MMMM dd,yyyy h:mm:ss tt",
+                               Y: "MMMM,yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu-Latn-CA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu-Latn-CA.js
new file mode 100644 (file)
index 0000000..2fa1467
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Globalize Culture iu-Latn-CA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "iu-Latn-CA", "default", {
+       name: "iu-Latn-CA",
+       englishName: "Inuktitut (Latin, Canada)",
+       nativeName: "Inuktitut (Kanatami)",
+       language: "iu-Latn",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Naattiinguja","Naggajjau","Aippiq","Pingatsiq","Sitammiq","Tallirmiq","Sivataarvik"],
+                               namesAbbr: ["Nat","Nag","Aip","Pi","Sit","Tal","Siv"],
+                               namesShort: ["N","N","A","P","S","T","S"]
+                       },
+                       months: {
+                               names: ["Jaannuari","Viivvuari","Maatsi","Iipuri","Mai","Juuni","Julai","Aaggiisi","Sitipiri","Utupiri","Nuvipiri","Tisipiri",""],
+                               namesAbbr: ["Jan","Viv","Mas","Ipu","Mai","Jun","Jul","Agi","Sii","Uut","Nuv","Tis",""]
+                       },
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "ddd, MMMM dd,yyyy",
+                               f: "ddd, MMMM dd,yyyy h:mm tt",
+                               F: "ddd, MMMM dd,yyyy h:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu-Latn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu-Latn.js
new file mode 100644 (file)
index 0000000..d2e54fa
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Globalize Culture iu-Latn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "iu-Latn", "default", {
+       name: "iu-Latn",
+       englishName: "Inuktitut (Latin)",
+       nativeName: "Inuktitut",
+       language: "iu-Latn",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Naattiinguja","Naggajjau","Aippiq","Pingatsiq","Sitammiq","Tallirmiq","Sivataarvik"],
+                               namesAbbr: ["Nat","Nag","Aip","Pi","Sit","Tal","Siv"],
+                               namesShort: ["N","N","A","P","S","T","S"]
+                       },
+                       months: {
+                               names: ["Jaannuari","Viivvuari","Maatsi","Iipuri","Mai","Juuni","Julai","Aaggiisi","Sitipiri","Utupiri","Nuvipiri","Tisipiri",""],
+                               namesAbbr: ["Jan","Viv","Mas","Ipu","Mai","Jun","Jul","Agi","Sii","Uut","Nuv","Tis",""]
+                       },
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "ddd, MMMM dd,yyyy",
+                               f: "ddd, MMMM dd,yyyy h:mm tt",
+                               F: "ddd, MMMM dd,yyyy h:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.iu.js
new file mode 100644 (file)
index 0000000..093956b
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Globalize Culture iu
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "iu", "default", {
+       name: "iu",
+       englishName: "Inuktitut",
+       nativeName: "Inuktitut",
+       language: "iu",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Naattiinguja","Naggajjau","Aippiq","Pingatsiq","Sitammiq","Tallirmiq","Sivataarvik"],
+                               namesAbbr: ["Nat","Nag","Aip","Pi","Sit","Tal","Siv"],
+                               namesShort: ["N","N","A","P","S","T","S"]
+                       },
+                       months: {
+                               names: ["Jaannuari","Viivvuari","Maatsi","Iipuri","Mai","Juuni","Julai","Aaggiisi","Sitipiri","Utupiri","Nuvipiri","Tisipiri",""],
+                               namesAbbr: ["Jan","Viv","Mas","Ipu","Mai","Jun","Jul","Agi","Sii","Uut","Nuv","Tis",""]
+                       },
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "ddd, MMMM dd,yyyy",
+                               f: "ddd, MMMM dd,yyyy h:mm tt",
+                               F: "ddd, MMMM dd,yyyy h:mm:ss tt"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ja-JP.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ja-JP.js
new file mode 100644 (file)
index 0000000..a9469d7
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Globalize Culture ja-JP
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ja-JP", "default", {
+       name: "ja-JP",
+       englishName: "Japanese (Japan)",
+       nativeName: "日本語 (日本)",
+       language: "ja",
+       numberFormat: {
+               NaN: "NaN (非数値)",
+               negativeInfinity: "-∞",
+               positiveInfinity: "+∞",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       decimals: 0,
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+                               namesAbbr: ["日","月","火","水","木","金","土"],
+                               namesShort: ["日","月","火","水","木","金","土"]
+                       },
+                       months: {
+                               names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["午前","午前","午前"],
+                       PM: ["午後","午後","午後"],
+                       eras: [{"name":"西暦","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               },
+               Japanese: {
+                       name: "Japanese",
+                       days: {
+                               names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+                               namesAbbr: ["日","月","火","水","木","金","土"],
+                               namesShort: ["日","月","火","水","木","金","土"]
+                       },
+                       months: {
+                               names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["午前","午前","午前"],
+                       PM: ["午後","午後","午後"],
+                       eras: [{"name":"平成","start":null,"offset":1867},{"name":"昭和","start":-1812153600000,"offset":1911},{"name":"大正","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}],
+                       twoDigitYearMax: 99,
+                       patterns: {
+                               d: "gg y/M/d",
+                               D: "gg y'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "gg y'年'M'月'd'日' H:mm",
+                               F: "gg y'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "gg y'年'M'月'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ja.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ja.js
new file mode 100644 (file)
index 0000000..1539f99
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Globalize Culture ja
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ja", "default", {
+       name: "ja",
+       englishName: "Japanese",
+       nativeName: "日本語",
+       language: "ja",
+       numberFormat: {
+               NaN: "NaN (非数値)",
+               negativeInfinity: "-∞",
+               positiveInfinity: "+∞",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       decimals: 0,
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+                               namesAbbr: ["日","月","火","水","木","金","土"],
+                               namesShort: ["日","月","火","水","木","金","土"]
+                       },
+                       months: {
+                               names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["午前","午前","午前"],
+                       PM: ["午後","午後","午後"],
+                       eras: [{"name":"西暦","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               },
+               Japanese: {
+                       name: "Japanese",
+                       days: {
+                               names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+                               namesAbbr: ["日","月","火","水","木","金","土"],
+                               namesShort: ["日","月","火","水","木","金","土"]
+                       },
+                       months: {
+                               names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["午前","午前","午前"],
+                       PM: ["午後","午後","午後"],
+                       eras: [{"name":"平成","start":null,"offset":1867},{"name":"昭和","start":-1812153600000,"offset":1911},{"name":"大正","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}],
+                       twoDigitYearMax: 99,
+                       patterns: {
+                               d: "gg y/M/d",
+                               D: "gg y'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "gg y'年'M'月'd'日' H:mm",
+                               F: "gg y'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "gg y'年'M'月'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ka-GE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ka-GE.js
new file mode 100644 (file)
index 0000000..97b767b
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture ka-GE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ka-GE", "default", {
+       name: "ka-GE",
+       englishName: "Georgian (Georgia)",
+       nativeName: "ქართული (საქართველო)",
+       language: "ka",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Lari"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],
+                               namesAbbr: ["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],
+                               namesShort: ["კ","ო","ს","ო","ხ","პ","შ"]
+                       },
+                       months: {
+                               names: ["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი",""],
+                               namesAbbr: ["იან","თებ","მარ","აპრ","მაის","ივნ","ივლ","აგვ","სექ","ოქტ","ნოემ","დეკ",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "yyyy 'წლის' dd MM, dddd",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'წლის' dd MM, dddd H:mm",
+                               F: "yyyy 'წლის' dd MM, dddd H:mm:ss",
+                               M: "dd MM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ka.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ka.js
new file mode 100644 (file)
index 0000000..6e19adf
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture ka
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ka", "default", {
+       name: "ka",
+       englishName: "Georgian",
+       nativeName: "ქართული",
+       language: "ka",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Lari"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],
+                               namesAbbr: ["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],
+                               namesShort: ["კ","ო","ს","ო","ხ","პ","შ"]
+                       },
+                       months: {
+                               names: ["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი",""],
+                               namesAbbr: ["იან","თებ","მარ","აპრ","მაის","ივნ","ივლ","აგვ","სექ","ოქტ","ნოემ","დეკ",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "yyyy 'წლის' dd MM, dddd",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'წლის' dd MM, dddd H:mm",
+                               F: "yyyy 'წლის' dd MM, dddd H:mm:ss",
+                               M: "dd MM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kk-KZ.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kk-KZ.js
new file mode 100644 (file)
index 0000000..138d486
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture kk-KZ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "kk-KZ", "default", {
+       name: "kk-KZ",
+       englishName: "Kazakh (Kazakhstan)",
+       nativeName: "Қазақ (Қазақстан)",
+       language: "kk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       ",": " ",
+                       ".": "-",
+                       symbol: "Т"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Жексенбі","Дүйсенбі","Сейсенбі","Сәрсенбі","Бейсенбі","Жұма","Сенбі"],
+                               namesAbbr: ["Жк","Дс","Сс","Ср","Бс","Жм","Сн"],
+                               namesShort: ["Жк","Дс","Сс","Ср","Бс","Жм","Сн"]
+                       },
+                       months: {
+                               names: ["қаңтар","ақпан","наурыз","сәуір","мамыр","маусым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқсан",""],
+                               namesAbbr: ["Қаң","Ақп","Нау","Сәу","Мам","Мау","Шіл","Там","Қыр","Қаз","Қар","Жел",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy 'ж.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy 'ж.' H:mm",
+                               F: "d MMMM yyyy 'ж.' H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kk.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kk.js
new file mode 100644 (file)
index 0000000..7530988
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture kk
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "kk", "default", {
+       name: "kk",
+       englishName: "Kazakh",
+       nativeName: "Қазақ",
+       language: "kk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       ",": " ",
+                       ".": "-",
+                       symbol: "Т"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Жексенбі","Дүйсенбі","Сейсенбі","Сәрсенбі","Бейсенбі","Жұма","Сенбі"],
+                               namesAbbr: ["Жк","Дс","Сс","Ср","Бс","Жм","Сн"],
+                               namesShort: ["Жк","Дс","Сс","Ср","Бс","Жм","Сн"]
+                       },
+                       months: {
+                               names: ["қаңтар","ақпан","наурыз","сәуір","мамыр","маусым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқсан",""],
+                               namesAbbr: ["Қаң","Ақп","Нау","Сәу","Мам","Мау","Шіл","Там","Қыр","Қаз","Қар","Жел",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy 'ж.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy 'ж.' H:mm",
+                               F: "d MMMM yyyy 'ж.' H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kl-GL.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kl-GL.js
new file mode 100644 (file)
index 0000000..03b9637
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture kl-GL
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "kl-GL", "default", {
+       name: "kl-GL",
+       englishName: "Greenlandic (Greenland)",
+       nativeName: "kalaallisut (Kalaallit Nunaat)",
+       language: "kl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       groupSizes: [3,0],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,0],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["sapaat","ataasinngorneq","marlunngorneq","pingasunngorneq","sisamanngorneq","tallimanngorneq","arfininngorneq"],
+                               namesAbbr: ["sap","ata","mar","ping","sis","tal","arf"],
+                               namesShort: ["sa","at","ma","pi","si","ta","ar"]
+                       },
+                       months: {
+                               names: ["januari","februari","martsi","apriili","maaji","juni","juli","aggusti","septembari","oktobari","novembari","decembari",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kl.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kl.js
new file mode 100644 (file)
index 0000000..cf71fed
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture kl
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "kl", "default", {
+       name: "kl",
+       englishName: "Greenlandic",
+       nativeName: "kalaallisut",
+       language: "kl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       groupSizes: [3,0],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,0],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["sapaat","ataasinngorneq","marlunngorneq","pingasunngorneq","sisamanngorneq","tallimanngorneq","arfininngorneq"],
+                               namesAbbr: ["sap","ata","mar","ping","sis","tal","arf"],
+                               namesShort: ["sa","at","ma","pi","si","ta","ar"]
+                       },
+                       months: {
+                               names: ["januari","februari","martsi","apriili","maaji","juni","juli","aggusti","septembari","oktobari","novembari","decembari",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.km-KH.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.km-KH.js
new file mode 100644 (file)
index 0000000..6c2ea1c
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Globalize Culture km-KH
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "km-KH", "default", {
+       name: "km-KH",
+       englishName: "Khmer (Cambodia)",
+       nativeName: "ខ្មែរ (កម្ពុជា)",
+       language: "km",
+       numberFormat: {
+               pattern: ["- n"],
+               groupSizes: [3,0],
+               NaN: "NAN",
+               negativeInfinity: "-- អនន្ត",
+               positiveInfinity: "អនន្ត",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       symbol: "៛"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["ថ្ងៃអាទិត្យ","ថ្ងៃច័ន្ទ","ថ្ងៃអង្គារ","ថ្ងៃពុធ","ថ្ងៃព្រហស្បតិ៍","ថ្ងៃសុក្រ","ថ្ងៃសៅរ៍"],
+                               namesAbbr: ["អាទិ.","ច.","អ.","ពុ","ព្រហ.","សុ.","ស."],
+                               namesShort: ["អា","ច","អ","ពុ","ព្","សុ","ស"]
+                       },
+                       months: {
+                               names: ["មករា","កុម្ភៈ","មិនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ",""],
+                               namesAbbr: ["១","២","៣","៤","៥","៦","៧","៨","៩","១០","១១","១២",""]
+                       },
+                       AM: ["ព្រឹក","ព្រឹក","ព្រឹក"],
+                       PM: ["ល្ងាច","ល្ងាច","ល្ងាច"],
+                       eras: [{"name":"មុនគ.ស.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "d MMMM yyyy",
+                               t: "H:mm tt",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy H:mm tt",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "'ថ្ងៃទី' dd 'ខែ' MM",
+                               Y: "'ខែ' MM 'ឆ្នាំ' yyyy"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ព្រឹក","ព្រឹក","ព្រឹក"],
+                       PM: ["ល្ងាច","ល្ងាច","ល្ងាច"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm tt",
+                               T: "HH:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm tt",
+                               F: "dddd, MMMM dd, yyyy HH:mm:ss"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.km.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.km.js
new file mode 100644 (file)
index 0000000..b3d9b4c
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Globalize Culture km
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "km", "default", {
+       name: "km",
+       englishName: "Khmer",
+       nativeName: "ខ្មែរ",
+       language: "km",
+       numberFormat: {
+               pattern: ["- n"],
+               groupSizes: [3,0],
+               NaN: "NAN",
+               negativeInfinity: "-- អនន្ត",
+               positiveInfinity: "អនន្ត",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       symbol: "៛"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["ថ្ងៃអាទិត្យ","ថ្ងៃច័ន្ទ","ថ្ងៃអង្គារ","ថ្ងៃពុធ","ថ្ងៃព្រហស្បតិ៍","ថ្ងៃសុក្រ","ថ្ងៃសៅរ៍"],
+                               namesAbbr: ["អាទិ.","ច.","អ.","ពុ","ព្រហ.","សុ.","ស."],
+                               namesShort: ["អា","ច","អ","ពុ","ព្","សុ","ស"]
+                       },
+                       months: {
+                               names: ["មករា","កុម្ភៈ","មិនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ",""],
+                               namesAbbr: ["១","២","៣","៤","៥","៦","៧","៨","៩","១០","១១","១២",""]
+                       },
+                       AM: ["ព្រឹក","ព្រឹក","ព្រឹក"],
+                       PM: ["ល្ងាច","ល្ងាច","ល្ងាច"],
+                       eras: [{"name":"មុនគ.ស.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "d MMMM yyyy",
+                               t: "H:mm tt",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy H:mm tt",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "'ថ្ងៃទី' dd 'ខែ' MM",
+                               Y: "'ខែ' MM 'ឆ្នាំ' yyyy"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ព្រឹក","ព្រឹក","ព្រឹក"],
+                       PM: ["ល្ងាច","ល្ងាច","ល្ងាច"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm tt",
+                               T: "HH:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm tt",
+                               F: "dddd, MMMM dd, yyyy HH:mm:ss"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kn-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kn-IN.js
new file mode 100644 (file)
index 0000000..23b8684
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture kn-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "kn-IN", "default", {
+       name: "kn-IN",
+       englishName: "Kannada (India)",
+       nativeName: "ಕನ್ನಡ (ಭಾರತ)",
+       language: "kn",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ರೂ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ಭಾನುವಾರ","ಸೋಮವಾರ","ಮಂಗಳವಾರ","ಬುಧವಾರ","ಗುರುವಾರ","ಶುಕ್ರವಾರ","ಶನಿವಾರ"],
+                               namesAbbr: ["ಭಾನು.","ಸೋಮ.","ಮಂಗಳ.","ಬುಧ.","ಗುರು.","ಶುಕ್ರ.","ಶನಿ."],
+                               namesShort: ["ರ","ಸ","ಮ","ಬ","ಗ","ಶ","ಶ"]
+                       },
+                       months: {
+                               names: ["ಜನವರಿ","ಫೆಬ್ರವರಿ","ಮಾರ್ಚ್","ಎಪ್ರಿಲ್","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗಸ್ಟ್","ಸೆಪ್ಟಂಬರ್","ಅಕ್ಟೋಬರ್","ನವೆಂಬರ್","ಡಿಸೆಂಬರ್",""],
+                               namesAbbr: ["ಜನವರಿ","ಫೆಬ್ರವರಿ","ಮಾರ್ಚ್","ಎಪ್ರಿಲ್","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗಸ್ಟ್","ಸೆಪ್ಟಂಬರ್","ಅಕ್ಟೋಬರ್","ನವೆಂಬರ್","ಡಿಸೆಂಬರ್",""]
+                       },
+                       AM: ["ಪೂರ್ವಾಹ್ನ","ಪೂರ್ವಾಹ್ನ","ಪೂರ್ವಾಹ್ನ"],
+                       PM: ["ಅಪರಾಹ್ನ","ಅಪರಾಹ್ನ","ಅಪರಾಹ್ನ"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kn.js
new file mode 100644 (file)
index 0000000..43322e2
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture kn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "kn", "default", {
+       name: "kn",
+       englishName: "Kannada",
+       nativeName: "ಕನ್ನಡ",
+       language: "kn",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ರೂ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ಭಾನುವಾರ","ಸೋಮವಾರ","ಮಂಗಳವಾರ","ಬುಧವಾರ","ಗುರುವಾರ","ಶುಕ್ರವಾರ","ಶನಿವಾರ"],
+                               namesAbbr: ["ಭಾನು.","ಸೋಮ.","ಮಂಗಳ.","ಬುಧ.","ಗುರು.","ಶುಕ್ರ.","ಶನಿ."],
+                               namesShort: ["ರ","ಸ","ಮ","ಬ","ಗ","ಶ","ಶ"]
+                       },
+                       months: {
+                               names: ["ಜನವರಿ","ಫೆಬ್ರವರಿ","ಮಾರ್ಚ್","ಎಪ್ರಿಲ್","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗಸ್ಟ್","ಸೆಪ್ಟಂಬರ್","ಅಕ್ಟೋಬರ್","ನವೆಂಬರ್","ಡಿಸೆಂಬರ್",""],
+                               namesAbbr: ["ಜನವರಿ","ಫೆಬ್ರವರಿ","ಮಾರ್ಚ್","ಎಪ್ರಿಲ್","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗಸ್ಟ್","ಸೆಪ್ಟಂಬರ್","ಅಕ್ಟೋಬರ್","ನವೆಂಬರ್","ಡಿಸೆಂಬರ್",""]
+                       },
+                       AM: ["ಪೂರ್ವಾಹ್ನ","ಪೂರ್ವಾಹ್ನ","ಪೂರ್ವಾಹ್ನ"],
+                       PM: ["ಅಪರಾಹ್ನ","ಅಪರಾಹ್ನ","ಅಪರಾಹ್ನ"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ko-KR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ko-KR.js
new file mode 100644 (file)
index 0000000..ce97685
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Globalize Culture ko-KR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ko-KR", "default", {
+       name: "ko-KR",
+       englishName: "Korean (Korea)",
+       nativeName: "한국어 (대한민국)",
+       language: "ko",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       decimals: 0,
+                       symbol: "₩"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],
+                               namesAbbr: ["일","월","화","수","목","금","토"],
+                               namesShort: ["일","월","화","수","목","금","토"]
+                       },
+                       months: {
+                               names: ["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["오전","오전","오전"],
+                       PM: ["오후","오후","오후"],
+                       eras: [{"name":"서기","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "yyyy'년' M'월' d'일' dddd",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "yyyy'년' M'월' d'일' dddd tt h:mm",
+                               F: "yyyy'년' M'월' d'일' dddd tt h:mm:ss",
+                               M: "M'월' d'일'",
+                               Y: "yyyy'년' M'월'"
+                       }
+               },
+               Korean: {
+                       name: "Korean",
+                       "/": "-",
+                       days: {
+                               names: ["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],
+                               namesAbbr: ["일","월","화","수","목","금","토"],
+                               namesShort: ["일","월","화","수","목","금","토"]
+                       },
+                       months: {
+                               names: ["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["오전","오전","오전"],
+                       PM: ["오후","오후","오후"],
+                       eras: [{"name":"단기","start":null,"offset":-2333}],
+                       twoDigitYearMax: 4362,
+                       patterns: {
+                               d: "gg yyyy-MM-dd",
+                               D: "gg yyyy'년' M'월' d'일' dddd",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "gg yyyy'년' M'월' d'일' dddd tt h:mm",
+                               F: "gg yyyy'년' M'월' d'일' dddd tt h:mm:ss",
+                               M: "M'월' d'일'",
+                               Y: "gg yyyy'년' M'월'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ko.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ko.js
new file mode 100644 (file)
index 0000000..a0a7376
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Globalize Culture ko
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ko", "default", {
+       name: "ko",
+       englishName: "Korean",
+       nativeName: "한국어",
+       language: "ko",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       decimals: 0,
+                       symbol: "₩"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],
+                               namesAbbr: ["일","월","화","수","목","금","토"],
+                               namesShort: ["일","월","화","수","목","금","토"]
+                       },
+                       months: {
+                               names: ["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["오전","오전","오전"],
+                       PM: ["오후","오후","오후"],
+                       eras: [{"name":"서기","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "yyyy'년' M'월' d'일' dddd",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "yyyy'년' M'월' d'일' dddd tt h:mm",
+                               F: "yyyy'년' M'월' d'일' dddd tt h:mm:ss",
+                               M: "M'월' d'일'",
+                               Y: "yyyy'년' M'월'"
+                       }
+               },
+               Korean: {
+                       name: "Korean",
+                       "/": "-",
+                       days: {
+                               names: ["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],
+                               namesAbbr: ["일","월","화","수","목","금","토"],
+                               namesShort: ["일","월","화","수","목","금","토"]
+                       },
+                       months: {
+                               names: ["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["오전","오전","오전"],
+                       PM: ["오후","오후","오후"],
+                       eras: [{"name":"단기","start":null,"offset":-2333}],
+                       twoDigitYearMax: 4362,
+                       patterns: {
+                               d: "gg yyyy-MM-dd",
+                               D: "gg yyyy'년' M'월' d'일' dddd",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "gg yyyy'년' M'월' d'일' dddd tt h:mm",
+                               F: "gg yyyy'년' M'월' d'일' dddd tt h:mm:ss",
+                               M: "M'월' d'일'",
+                               Y: "gg yyyy'년' M'월'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kok-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kok-IN.js
new file mode 100644 (file)
index 0000000..ec8cab9
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture kok-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "kok-IN", "default", {
+       name: "kok-IN",
+       englishName: "Konkani (India)",
+       nativeName: "कोंकणी (भारत)",
+       language: "kok",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["आयतार","सोमार","मंगळार","बुधवार","बिरेस्तार","सुक्रार","शेनवार"],
+                               namesAbbr: ["आय.","सोम.","मंगळ.","बुध.","बिरे.","सुक्र.","शेन."],
+                               namesShort: ["आ","स","म","ब","ब","स","श"]
+                       },
+                       months: {
+                               names: ["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोवेम्बर","डिसेंबर",""],
+                               namesAbbr: ["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोवेम्बर","डिसेंबर",""]
+                       },
+                       AM: ["म.पू.","म.पू.","म.पू."],
+                       PM: ["म.नं.","म.नं.","म.नं."],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kok.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.kok.js
new file mode 100644 (file)
index 0000000..65a3678
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture kok
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "kok", "default", {
+       name: "kok",
+       englishName: "Konkani",
+       nativeName: "कोंकणी",
+       language: "kok",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["आयतार","सोमार","मंगळार","बुधवार","बिरेस्तार","सुक्रार","शेनवार"],
+                               namesAbbr: ["आय.","सोम.","मंगळ.","बुध.","बिरे.","सुक्र.","शेन."],
+                               namesShort: ["आ","स","म","ब","ब","स","श"]
+                       },
+                       months: {
+                               names: ["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोवेम्बर","डिसेंबर",""],
+                               namesAbbr: ["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोवेम्बर","डिसेंबर",""]
+                       },
+                       AM: ["म.पू.","म.पू.","म.पू."],
+                       PM: ["म.नं.","म.नं.","म.नं."],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ky-KG.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ky-KG.js
new file mode 100644 (file)
index 0000000..3c35abd
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture ky-KG
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ky-KG", "default", {
+       name: "ky-KG",
+       englishName: "Kyrgyz (Kyrgyzstan)",
+       nativeName: "Кыргыз (Кыргызстан)",
+       language: "ky",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": "-",
+                       symbol: "сом"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Жекшемби","Дүйшөмбү","Шейшемби","Шаршемби","Бейшемби","Жума","Ишемби"],
+                               namesAbbr: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"],
+                               namesShort: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"]
+                       },
+                       months: {
+                               names: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d'-'MMMM yyyy'-ж.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d'-'MMMM yyyy'-ж.' H:mm",
+                               F: "d'-'MMMM yyyy'-ж.' H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy'-ж.'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ky.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ky.js
new file mode 100644 (file)
index 0000000..7bc386b
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture ky
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ky", "default", {
+       name: "ky",
+       englishName: "Kyrgyz",
+       nativeName: "Кыргыз",
+       language: "ky",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": "-",
+                       symbol: "сом"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Жекшемби","Дүйшөмбү","Шейшемби","Шаршемби","Бейшемби","Жума","Ишемби"],
+                               namesAbbr: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"],
+                               namesShort: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"]
+                       },
+                       months: {
+                               names: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d'-'MMMM yyyy'-ж.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d'-'MMMM yyyy'-ж.' H:mm",
+                               F: "d'-'MMMM yyyy'-ж.' H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy'-ж.'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lb-LU.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lb-LU.js
new file mode 100644 (file)
index 0000000..ef9d39a
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture lb-LU
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "lb-LU", "default", {
+       name: "lb-LU",
+       englishName: "Luxembourgish (Luxembourg)",
+       nativeName: "Lëtzebuergesch (Luxembourg)",
+       language: "lb",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "n. num.",
+               negativeInfinity: "-onendlech",
+               positiveInfinity: "+onendlech",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"],
+                               namesAbbr: ["Son","Méi","Dën","Mët","Don","Fre","Sam"],
+                               namesShort: ["So","Mé","Dë","Më","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lb.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lb.js
new file mode 100644 (file)
index 0000000..56983ff
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture lb
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "lb", "default", {
+       name: "lb",
+       englishName: "Luxembourgish",
+       nativeName: "Lëtzebuergesch",
+       language: "lb",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "n. num.",
+               negativeInfinity: "-onendlech",
+               positiveInfinity: "+onendlech",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"],
+                               namesAbbr: ["Son","Méi","Dën","Mët","Don","Fre","Sam"],
+                               namesShort: ["So","Mé","Dë","Më","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lo-LA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lo-LA.js
new file mode 100644 (file)
index 0000000..5556d3c
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture lo-LA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "lo-LA", "default", {
+       name: "lo-LA",
+       englishName: "Lao (Lao P.D.R.)",
+       nativeName: "ລາວ (ສ.ປ.ປ. ລາວ)",
+       language: "lo",
+       numberFormat: {
+               pattern: ["(n)"],
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["(n$)","n$"],
+                       groupSizes: [3,0],
+                       symbol: "₭"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["ວັນອາທິດ","ວັນຈັນ","ວັນອັງຄານ","ວັນພຸດ","ວັນພະຫັດ","ວັນສຸກ","ວັນເສົາ"],
+                               namesAbbr: ["ອາທິດ","ຈັນ","ອັງຄານ","ພຸດ","ພະຫັດ","ສຸກ","ເສົາ"],
+                               namesShort: ["ອ","ຈ","ອ","ພ","ພ","ສ","ເ"]
+                       },
+                       months: {
+                               names: ["ມັງກອນ","ກຸມພາ","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","ກໍລະກົດ","ສິງຫາ","ກັນຍາ","ຕຸລາ","ພະຈິກ","ທັນວາ",""],
+                               namesAbbr: ["ມັງກອນ","ກຸມພາ","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","ກໍລະກົດ","ສິງຫາ","ກັນຍາ","ຕຸລາ","ພະຈິກ","ທັນວາ",""]
+                       },
+                       AM: ["ເຊົ້າ","ເຊົ້າ","ເຊົ້າ"],
+                       PM: ["ແລງ","ແລງ","ແລງ"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm tt",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy H:mm tt",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lo.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lo.js
new file mode 100644 (file)
index 0000000..bea14aa
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture lo
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "lo", "default", {
+       name: "lo",
+       englishName: "Lao",
+       nativeName: "ລາວ",
+       language: "lo",
+       numberFormat: {
+               pattern: ["(n)"],
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["(n$)","n$"],
+                       groupSizes: [3,0],
+                       symbol: "₭"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["ວັນອາທິດ","ວັນຈັນ","ວັນອັງຄານ","ວັນພຸດ","ວັນພະຫັດ","ວັນສຸກ","ວັນເສົາ"],
+                               namesAbbr: ["ອາທິດ","ຈັນ","ອັງຄານ","ພຸດ","ພະຫັດ","ສຸກ","ເສົາ"],
+                               namesShort: ["ອ","ຈ","ອ","ພ","ພ","ສ","ເ"]
+                       },
+                       months: {
+                               names: ["ມັງກອນ","ກຸມພາ","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","ກໍລະກົດ","ສິງຫາ","ກັນຍາ","ຕຸລາ","ພະຈິກ","ທັນວາ",""],
+                               namesAbbr: ["ມັງກອນ","ກຸມພາ","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","ກໍລະກົດ","ສິງຫາ","ກັນຍາ","ຕຸລາ","ພະຈິກ","ທັນວາ",""]
+                       },
+                       AM: ["ເຊົ້າ","ເຊົ້າ","ເຊົ້າ"],
+                       PM: ["ແລງ","ແລງ","ແລງ"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm tt",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy H:mm tt",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lt-LT.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lt-LT.js
new file mode 100644 (file)
index 0000000..d0d31a3
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Globalize Culture lt-LT
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "lt-LT", "default", {
+       name: "lt-LT",
+       englishName: "Lithuanian (Lithuania)",
+       nativeName: "lietuvių (Lietuva)",
+       language: "lt",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-begalybė",
+               positiveInfinity: "begalybė",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Lt"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sekmadienis","pirmadienis","antradienis","trečiadienis","ketvirtadienis","penktadienis","šeštadienis"],
+                               namesAbbr: ["Sk","Pr","An","Tr","Kt","Pn","Št"],
+                               namesShort: ["S","P","A","T","K","Pn","Š"]
+                       },
+                       months: {
+                               names: ["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjūtis","rugsėjis","spalis","lapkritis","gruodis",""],
+                               namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""]
+                       },
+                       monthsGenitive: {
+                               names: ["sausio","vasario","kovo","balandžio","gegužės","birželio","liepos","rugpjūčio","rugsėjo","spalio","lapkričio","gruodžio",""],
+                               namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy.MM.dd",
+                               D: "yyyy 'm.' MMMM d 'd.'",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'm.' MMMM d 'd.' HH:mm",
+                               F: "yyyy 'm.' MMMM d 'd.' HH:mm:ss",
+                               M: "MMMM d 'd.'",
+                               Y: "yyyy 'm.' MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lt.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lt.js
new file mode 100644 (file)
index 0000000..e06d87f
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Globalize Culture lt
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "lt", "default", {
+       name: "lt",
+       englishName: "Lithuanian",
+       nativeName: "lietuvių",
+       language: "lt",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-begalybė",
+               positiveInfinity: "begalybė",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Lt"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sekmadienis","pirmadienis","antradienis","trečiadienis","ketvirtadienis","penktadienis","šeštadienis"],
+                               namesAbbr: ["Sk","Pr","An","Tr","Kt","Pn","Št"],
+                               namesShort: ["S","P","A","T","K","Pn","Š"]
+                       },
+                       months: {
+                               names: ["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjūtis","rugsėjis","spalis","lapkritis","gruodis",""],
+                               namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""]
+                       },
+                       monthsGenitive: {
+                               names: ["sausio","vasario","kovo","balandžio","gegužės","birželio","liepos","rugpjūčio","rugsėjo","spalio","lapkričio","gruodžio",""],
+                               namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy.MM.dd",
+                               D: "yyyy 'm.' MMMM d 'd.'",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'm.' MMMM d 'd.' HH:mm",
+                               F: "yyyy 'm.' MMMM d 'd.' HH:mm:ss",
+                               M: "MMMM d 'd.'",
+                               Y: "yyyy 'm.' MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lv-LV.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lv-LV.js
new file mode 100644 (file)
index 0000000..145329b
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Globalize Culture lv-LV
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "lv-LV", "default", {
+       name: "lv-LV",
+       englishName: "Latvian (Latvia)",
+       nativeName: "latviešu (Latvija)",
+       language: "lv",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-bezgalība",
+               positiveInfinity: "bezgalība",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Ls"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["svētdiena","pirmdiena","otrdiena","trešdiena","ceturtdiena","piektdiena","sestdiena"],
+                               namesAbbr: ["sv","pr","ot","tr","ce","pk","se"],
+                               namesShort: ["sv","pr","ot","tr","ce","pk","se"]
+                       },
+                       months: {
+                               names: ["janvāris","februāris","marts","aprīlis","maijs","jūnijs","jūlijs","augusts","septembris","oktobris","novembris","decembris",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jūn","jūl","aug","sep","okt","nov","dec",""]
+                       },
+                       monthsGenitive: {
+                               names: ["janvārī","februārī","martā","aprīlī","maijā","jūnijā","jūlijā","augustā","septembrī","oktobrī","novembrī","decembrī",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jūn","jūl","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy.MM.dd.",
+                               D: "dddd, yyyy'. gada 'd. MMMM",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, yyyy'. gada 'd. MMMM H:mm",
+                               F: "dddd, yyyy'. gada 'd. MMMM H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "yyyy. MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lv.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.lv.js
new file mode 100644 (file)
index 0000000..5065722
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Globalize Culture lv
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "lv", "default", {
+       name: "lv",
+       englishName: "Latvian",
+       nativeName: "latviešu",
+       language: "lv",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-bezgalība",
+               positiveInfinity: "bezgalība",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Ls"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["svētdiena","pirmdiena","otrdiena","trešdiena","ceturtdiena","piektdiena","sestdiena"],
+                               namesAbbr: ["sv","pr","ot","tr","ce","pk","se"],
+                               namesShort: ["sv","pr","ot","tr","ce","pk","se"]
+                       },
+                       months: {
+                               names: ["janvāris","februāris","marts","aprīlis","maijs","jūnijs","jūlijs","augusts","septembris","oktobris","novembris","decembris",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jūn","jūl","aug","sep","okt","nov","dec",""]
+                       },
+                       monthsGenitive: {
+                               names: ["janvārī","februārī","martā","aprīlī","maijā","jūnijā","jūlijā","augustā","septembrī","oktobrī","novembrī","decembrī",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jūn","jūl","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy.MM.dd.",
+                               D: "dddd, yyyy'. gada 'd. MMMM",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, yyyy'. gada 'd. MMMM H:mm",
+                               F: "dddd, yyyy'. gada 'd. MMMM H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "yyyy. MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mi-NZ.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mi-NZ.js
new file mode 100644 (file)
index 0000000..03720c9
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture mi-NZ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "mi-NZ", "default", {
+       name: "mi-NZ",
+       englishName: "Maori (New Zealand)",
+       nativeName: "Reo Māori (Aotearoa)",
+       language: "mi",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Rātapu","Rāhina","Rātū","Rāapa","Rāpare","Rāmere","Rāhoroi"],
+                               namesAbbr: ["Ta","Hi","Tū","Apa","Pa","Me","Ho"],
+                               namesShort: ["Ta","Hi","Tū","Aa","Pa","Me","Ho"]
+                       },
+                       months: {
+                               names: ["Kohi-tātea","Hui-tanguru","Poutū-te-rangi","Paenga-whāwhā","Haratua","Pipiri","Hōngongoi","Here-turi-kōkā","Mahuru","Whiringa-ā-nuku","Whiringa-ā-rangi","Hakihea",""],
+                               namesAbbr: ["Kohi","Hui","Pou","Pae","Hara","Pipi","Hōngo","Here","Mahu","Nuku","Rangi","Haki",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd MMMM, yyyy",
+                               f: "dddd, dd MMMM, yyyy h:mm tt",
+                               F: "dddd, dd MMMM, yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM, yy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mi.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mi.js
new file mode 100644 (file)
index 0000000..5f861db
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture mi
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "mi", "default", {
+       name: "mi",
+       englishName: "Maori",
+       nativeName: "Reo Māori",
+       language: "mi",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Rātapu","Rāhina","Rātū","Rāapa","Rāpare","Rāmere","Rāhoroi"],
+                               namesAbbr: ["Ta","Hi","Tū","Apa","Pa","Me","Ho"],
+                               namesShort: ["Ta","Hi","Tū","Aa","Pa","Me","Ho"]
+                       },
+                       months: {
+                               names: ["Kohi-tātea","Hui-tanguru","Poutū-te-rangi","Paenga-whāwhā","Haratua","Pipiri","Hōngongoi","Here-turi-kōkā","Mahuru","Whiringa-ā-nuku","Whiringa-ā-rangi","Hakihea",""],
+                               namesAbbr: ["Kohi","Hui","Pou","Pae","Hara","Pipi","Hōngo","Here","Mahu","Nuku","Rangi","Haki",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd MMMM, yyyy",
+                               f: "dddd, dd MMMM, yyyy h:mm tt",
+                               F: "dddd, dd MMMM, yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM, yy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mk-MK.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mk-MK.js
new file mode 100644 (file)
index 0000000..f0d5e51
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture mk-MK
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "mk-MK", "default", {
+       name: "mk-MK",
+       englishName: "Macedonian (Former Yugoslav Republic of Macedonia)",
+       nativeName: "македонски јазик (Македонија)",
+       language: "mk",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "ден."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недела","понеделник","вторник","среда","четврток","петок","сабота"],
+                               namesAbbr: ["нед","пон","втр","срд","чет","пет","саб"],
+                               namesShort: ["не","по","вт","ср","че","пе","са"]
+                       },
+                       months: {
+                               names: ["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември",""],
+                               namesAbbr: ["јан","фев","мар","апр","мај","јун","јул","авг","сеп","окт","ное","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, dd MMMM yyyy HH:mm",
+                               F: "dddd, dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mk.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mk.js
new file mode 100644 (file)
index 0000000..a6f8210
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture mk
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "mk", "default", {
+       name: "mk",
+       englishName: "Macedonian (FYROM)",
+       nativeName: "македонски јазик",
+       language: "mk",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "ден."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недела","понеделник","вторник","среда","четврток","петок","сабота"],
+                               namesAbbr: ["нед","пон","втр","срд","чет","пет","саб"],
+                               namesShort: ["не","по","вт","ср","че","пе","са"]
+                       },
+                       months: {
+                               names: ["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември",""],
+                               namesAbbr: ["јан","фев","мар","апр","мај","јун","јул","авг","сеп","окт","ное","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, dd MMMM yyyy HH:mm",
+                               F: "dddd, dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ml-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ml-IN.js
new file mode 100644 (file)
index 0000000..3a915e5
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture ml-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ml-IN", "default", {
+       name: "ml-IN",
+       englishName: "Malayalam (India)",
+       nativeName: "മലയാളം (ഭാരതം)",
+       language: "ml",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       pattern: ["-%n","%n"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ക"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       ":": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["ഞായറാഴ്ച","തിങ്കളാഴ്ച","ചൊവ്വാഴ്ച","ബുധനാഴ്ച","വ്യാഴാഴ്ച","വെള്ളിയാഴ്ച","ശനിയാഴ്ച"],
+                               namesAbbr: ["ഞായർ.","തിങ്കൾ.","ചൊവ്വ.","ബുധൻ.","വ്യാഴം.","വെള്ളി.","ശനി."],
+                               namesShort: ["ഞ","ത","ച","ബ","വ","വെ","ശ"]
+                       },
+                       months: {
+                               names: ["ജനുവരി","ഫെബ്റുവരി","മാറ്ച്ച്","ഏപ്റില്","മെയ്","ജൂണ്","ജൂലൈ","ഓഗസ്ററ്","സെപ്ററംബറ്","ഒക്ടോബറ്","നവംബറ്","ഡിസംബറ്",""],
+                               namesAbbr: ["ജനുവരി","ഫെബ്റുവരി","മാറ്ച്ച്","ഏപ്റില്","മെയ്","ജൂണ്","ജൂലൈ","ഓഗസ്ററ്","സെപ്ററംബറ്","ഒക്ടോബറ്","നവംബറ്","ഡിസംബറ്",""]
+                       },
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH.mm",
+                               T: "HH.mm.ss",
+                               f: "dd MMMM yyyy HH.mm",
+                               F: "dd MMMM yyyy HH.mm.ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ml.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ml.js
new file mode 100644 (file)
index 0000000..183a223
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture ml
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ml", "default", {
+       name: "ml",
+       englishName: "Malayalam",
+       nativeName: "മലയാളം",
+       language: "ml",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       pattern: ["-%n","%n"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ക"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       ":": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["ഞായറാഴ്ച","തിങ്കളാഴ്ച","ചൊവ്വാഴ്ച","ബുധനാഴ്ച","വ്യാഴാഴ്ച","വെള്ളിയാഴ്ച","ശനിയാഴ്ച"],
+                               namesAbbr: ["ഞായർ.","തിങ്കൾ.","ചൊവ്വ.","ബുധൻ.","വ്യാഴം.","വെള്ളി.","ശനി."],
+                               namesShort: ["ഞ","ത","ച","ബ","വ","വെ","ശ"]
+                       },
+                       months: {
+                               names: ["ജനുവരി","ഫെബ്റുവരി","മാറ്ച്ച്","ഏപ്റില്","മെയ്","ജൂണ്","ജൂലൈ","ഓഗസ്ററ്","സെപ്ററംബറ്","ഒക്ടോബറ്","നവംബറ്","ഡിസംബറ്",""],
+                               namesAbbr: ["ജനുവരി","ഫെബ്റുവരി","മാറ്ച്ച്","ഏപ്റില്","മെയ്","ജൂണ്","ജൂലൈ","ഓഗസ്ററ്","സെപ്ററംബറ്","ഒക്ടോബറ്","നവംബറ്","ഡിസംബറ്",""]
+                       },
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH.mm",
+                               T: "HH.mm.ss",
+                               f: "dd MMMM yyyy HH.mm",
+                               F: "dd MMMM yyyy HH.mm.ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn-Cyrl.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn-Cyrl.js
new file mode 100644 (file)
index 0000000..9493c43
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture mn-Cyrl
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "mn-Cyrl", "default", {
+       name: "mn-Cyrl",
+       englishName: "Mongolian (Cyrillic)",
+       nativeName: "Монгол хэл",
+       language: "mn-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "₮"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Ням","Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба"],
+                               namesAbbr: ["Ня","Да","Мя","Лх","Пү","Ба","Бя"],
+                               namesShort: ["Ня","Да","Мя","Лх","Пү","Ба","Бя"]
+                       },
+                       months: {
+                               names: ["1 дүгээр сар","2 дугаар сар","3 дугаар сар","4 дүгээр сар","5 дугаар сар","6 дугаар сар","7 дугаар сар","8 дугаар сар","9 дүгээр сар","10 дугаар сар","11 дүгээр сар","12 дугаар сар",""],
+                               namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""]
+                       },
+                       monthsGenitive: {
+                               names: ["1 дүгээр сарын","2 дугаар сарын","3 дугаар сарын","4 дүгээр сарын","5 дугаар сарын","6 дугаар сарын","7 дугаар сарын","8 дугаар сарын","9 дүгээр сарын","10 дугаар сарын","11 дүгээр сарын","12 дугаар сарын",""],
+                               namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yy.MM.dd",
+                               D: "yyyy 'оны' MMMM d",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'оны' MMMM d H:mm",
+                               F: "yyyy 'оны' MMMM d H:mm:ss",
+                               M: "d MMMM",
+                               Y: "yyyy 'он' MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn-MN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn-MN.js
new file mode 100644 (file)
index 0000000..90577b4
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture mn-MN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "mn-MN", "default", {
+       name: "mn-MN",
+       englishName: "Mongolian (Cyrillic, Mongolia)",
+       nativeName: "Монгол хэл (Монгол улс)",
+       language: "mn-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "₮"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Ням","Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба"],
+                               namesAbbr: ["Ня","Да","Мя","Лх","Пү","Ба","Бя"],
+                               namesShort: ["Ня","Да","Мя","Лх","Пү","Ба","Бя"]
+                       },
+                       months: {
+                               names: ["1 дүгээр сар","2 дугаар сар","3 дугаар сар","4 дүгээр сар","5 дугаар сар","6 дугаар сар","7 дугаар сар","8 дугаар сар","9 дүгээр сар","10 дугаар сар","11 дүгээр сар","12 дугаар сар",""],
+                               namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""]
+                       },
+                       monthsGenitive: {
+                               names: ["1 дүгээр сарын","2 дугаар сарын","3 дугаар сарын","4 дүгээр сарын","5 дугаар сарын","6 дугаар сарын","7 дугаар сарын","8 дугаар сарын","9 дүгээр сарын","10 дугаар сарын","11 дүгээр сарын","12 дугаар сарын",""],
+                               namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yy.MM.dd",
+                               D: "yyyy 'оны' MMMM d",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'оны' MMMM d H:mm",
+                               F: "yyyy 'оны' MMMM d H:mm:ss",
+                               M: "d MMMM",
+                               Y: "yyyy 'он' MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn-Mong-CN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn-Mong-CN.js
new file mode 100644 (file)
index 0000000..94b57dd
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture mn-Mong-CN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "mn-Mong-CN", "default", {
+       name: "mn-Mong-CN",
+       englishName: "Mongolian (Traditional Mongolian, PRC)",
+       nativeName: "ᠮᠤᠨᠭᠭᠤᠯ ᠬᠡᠯᠡ (ᠪᠦᠭᠦᠳᠡ ᠨᠠᠢᠷᠠᠮᠳᠠᠬᠤ ᠳᠤᠮᠳᠠᠳᠤ ᠠᠷᠠᠳ ᠣᠯᠣᠰ)",
+       language: "mn-Mong",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "ᠲᠤᠭᠠᠠ ᠪᠤᠰᠤ",
+               negativeInfinity: "ᠰᠦᠬᠡᠷᠬᠦ ᠬᠢᠵᠠᠭᠠᠷᠭᠦᠢ ᠶᠡᠬᠡ",
+               positiveInfinity: "ᠡᠶ᠋ᠡᠷᠬᠦ ᠬᠢᠵᠠᠭᠠᠷᠭᠦᠢ ᠶᠠᠬᠡ",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       groupSizes: [3,0],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["ᠭᠠᠷᠠᠭ ᠤᠨ ᠡᠳᠦᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠨᠢᠭᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠬᠣᠶᠠᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠭᠤᠷᠪᠠᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠳᠥᠷᠪᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠲᠠᠪᠤᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠵᠢᠷᠭᠤᠭᠠᠨ"],
+                               namesAbbr: ["ᠭᠠᠷᠠᠭ ᠤᠨ ᠡᠳᠦᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠨᠢᠭᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠬᠣᠶᠠᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠭᠤᠷᠪᠠᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠳᠥᠷᠪᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠲᠠᠪᠤᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠵᠢᠷᠭᠤᠭᠠᠨ"],
+                               namesShort: ["ᠡ‍","ᠨᠢ‍","ᠬᠣ‍","ᠭᠤ‍","ᠳᠥ‍","ᠲᠠ‍","ᠵᠢ‍"]
+                       },
+                       months: {
+                               names: ["ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠭᠤᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠦᠷᠪᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠠᠪᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠵᠢᠷᠭᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠤᠯᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠨᠠᠢᠮᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠶᠢᠰᠦᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ",""],
+                               namesAbbr: ["ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠭᠤᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠦᠷᠪᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠠᠪᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠵᠢᠷᠭᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠤᠯᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠨᠠᠢᠮᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠶᠢᠰᠦᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ᠣᠨ ᠲᠣᠭᠠᠯᠠᠯ ᠤᠨ","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'ᠣᠨ ᠤ᠋' M'ᠰᠠᠷ᠎ᠠ  ᠢᠢᠨ 'd' ᠤ᠋ ᠡᠳᠦᠷ'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'ᠣᠨ ᠤ᠋' M'ᠰᠠᠷ᠎ᠠ  ᠢᠢᠨ 'd' ᠤ᠋ ᠡᠳᠦᠷ' H:mm",
+                               F: "yyyy'ᠣᠨ ᠤ᠋' M'ᠰᠠᠷ᠎ᠠ  ᠢᠢᠨ 'd' ᠤ᠋ ᠡᠳᠦᠷ' H:mm:ss",
+                               M: "M'ᠰᠠᠷ᠎ᠠ' d'ᠡᠳᠦᠷ'",
+                               Y: "yyyy'ᠣᠨ' M'ᠰᠠᠷ᠎ᠠ'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn-Mong.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn-Mong.js
new file mode 100644 (file)
index 0000000..a263973
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture mn-Mong
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "mn-Mong", "default", {
+       name: "mn-Mong",
+       englishName: "Mongolian (Traditional Mongolian)",
+       nativeName: "ᠮᠤᠨᠭᠭᠤᠯ ᠬᠡᠯᠡ",
+       language: "mn-Mong",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "ᠲᠤᠭᠠᠠ ᠪᠤᠰᠤ",
+               negativeInfinity: "ᠰᠦᠬᠡᠷᠬᠦ ᠬᠢᠵᠠᠭᠠᠷᠭᠦᠢ ᠶᠡᠬᠡ",
+               positiveInfinity: "ᠡᠶ᠋ᠡᠷᠬᠦ ᠬᠢᠵᠠᠭᠠᠷᠭᠦᠢ ᠶᠠᠬᠡ",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       groupSizes: [3,0],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["ᠭᠠᠷᠠᠭ ᠤᠨ ᠡᠳᠦᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠨᠢᠭᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠬᠣᠶᠠᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠭᠤᠷᠪᠠᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠳᠥᠷᠪᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠲᠠᠪᠤᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠵᠢᠷᠭᠤᠭᠠᠨ"],
+                               namesAbbr: ["ᠭᠠᠷᠠᠭ ᠤᠨ ᠡᠳᠦᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠨᠢᠭᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠬᠣᠶᠠᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠭᠤᠷᠪᠠᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠳᠥᠷᠪᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠲᠠᠪᠤᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠵᠢᠷᠭᠤᠭᠠᠨ"],
+                               namesShort: ["ᠡ‍","ᠨᠢ‍","ᠬᠣ‍","ᠭᠤ‍","ᠳᠥ‍","ᠲᠠ‍","ᠵᠢ‍"]
+                       },
+                       months: {
+                               names: ["ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠭᠤᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠦᠷᠪᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠠᠪᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠵᠢᠷᠭᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠤᠯᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠨᠠᠢᠮᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠶᠢᠰᠦᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ",""],
+                               namesAbbr: ["ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠭᠤᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠦᠷᠪᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠠᠪᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠵᠢᠷᠭᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠤᠯᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠨᠠᠢᠮᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠶᠢᠰᠦᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ᠣᠨ ᠲᠣᠭᠠᠯᠠᠯ ᠤᠨ","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'ᠣᠨ ᠤ᠋' M'ᠰᠠᠷ᠎ᠠ  ᠢᠢᠨ 'd' ᠤ᠋ ᠡᠳᠦᠷ'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'ᠣᠨ ᠤ᠋' M'ᠰᠠᠷ᠎ᠠ  ᠢᠢᠨ 'd' ᠤ᠋ ᠡᠳᠦᠷ' H:mm",
+                               F: "yyyy'ᠣᠨ ᠤ᠋' M'ᠰᠠᠷ᠎ᠠ  ᠢᠢᠨ 'd' ᠤ᠋ ᠡᠳᠦᠷ' H:mm:ss",
+                               M: "M'ᠰᠠᠷ᠎ᠠ' d'ᠡᠳᠦᠷ'",
+                               Y: "yyyy'ᠣᠨ' M'ᠰᠠᠷ᠎ᠠ'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mn.js
new file mode 100644 (file)
index 0000000..acc45c4
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture mn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "mn", "default", {
+       name: "mn",
+       englishName: "Mongolian",
+       nativeName: "Монгол хэл",
+       language: "mn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "₮"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Ням","Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба"],
+                               namesAbbr: ["Ня","Да","Мя","Лх","Пү","Ба","Бя"],
+                               namesShort: ["Ня","Да","Мя","Лх","Пү","Ба","Бя"]
+                       },
+                       months: {
+                               names: ["1 дүгээр сар","2 дугаар сар","3 дугаар сар","4 дүгээр сар","5 дугаар сар","6 дугаар сар","7 дугаар сар","8 дугаар сар","9 дүгээр сар","10 дугаар сар","11 дүгээр сар","12 дугаар сар",""],
+                               namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""]
+                       },
+                       monthsGenitive: {
+                               names: ["1 дүгээр сарын","2 дугаар сарын","3 дугаар сарын","4 дүгээр сарын","5 дугаар сарын","6 дугаар сарын","7 дугаар сарын","8 дугаар сарын","9 дүгээр сарын","10 дугаар сарын","11 дүгээр сарын","12 дугаар сарын",""],
+                               namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yy.MM.dd",
+                               D: "yyyy 'оны' MMMM d",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'оны' MMMM d H:mm",
+                               F: "yyyy 'оны' MMMM d H:mm:ss",
+                               M: "d MMMM",
+                               Y: "yyyy 'он' MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.moh-CA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.moh-CA.js
new file mode 100644 (file)
index 0000000..ebea792
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Globalize Culture moh-CA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "moh-CA", "default", {
+       name: "moh-CA",
+       englishName: "Mohawk (Mohawk)",
+       nativeName: "Kanien'kéha",
+       language: "moh",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Awentatokentì:ke","Awentataón'ke","Ratironhia'kehronòn:ke","Soséhne","Okaristiiáhne","Ronwaia'tanentaktonhne","Entákta"],
+                               namesShort: ["S","M","T","W","T","F","S"]
+                       },
+                       months: {
+                               names: ["Tsothohrkó:Wa","Enniska","Enniskó:Wa","Onerahtókha","Onerahtohkó:Wa","Ohiari:Ha","Ohiarihkó:Wa","Seskéha","Seskehkó:Wa","Kenténha","Kentenhkó:Wa","Tsothóhrha",""]
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.moh.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.moh.js
new file mode 100644 (file)
index 0000000..e8fa748
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Globalize Culture moh
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "moh", "default", {
+       name: "moh",
+       englishName: "Mohawk",
+       nativeName: "Kanien'kéha",
+       language: "moh",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Awentatokentì:ke","Awentataón'ke","Ratironhia'kehronòn:ke","Soséhne","Okaristiiáhne","Ronwaia'tanentaktonhne","Entákta"],
+                               namesShort: ["S","M","T","W","T","F","S"]
+                       },
+                       months: {
+                               names: ["Tsothohrkó:Wa","Enniska","Enniskó:Wa","Onerahtókha","Onerahtohkó:Wa","Ohiari:Ha","Ohiarihkó:Wa","Seskéha","Seskehkó:Wa","Kenténha","Kentenhkó:Wa","Tsothóhrha",""]
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mr-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mr-IN.js
new file mode 100644 (file)
index 0000000..b671dca
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture mr-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "mr-IN", "default", {
+       name: "mr-IN",
+       englishName: "Marathi (India)",
+       nativeName: "मराठी (भारत)",
+       language: "mr",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["रविवार","सोमवार","मंगळवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],
+                               namesAbbr: ["रवि.","सोम.","मंगळ.","बुध.","गुरु.","शुक्र.","शनि."],
+                               namesShort: ["र","स","म","ब","ग","श","श"]
+                       },
+                       months: {
+                               names: ["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोव्हेंबर","डिसेंबर",""],
+                               namesAbbr: ["जाने.","फेब्रु.","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टें.","ऑक्टो.","नोव्हें.","डिसें.",""]
+                       },
+                       AM: ["म.पू.","म.पू.","म.पू."],
+                       PM: ["म.नं.","म.नं.","म.नं."],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mr.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mr.js
new file mode 100644 (file)
index 0000000..2a59f15
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture mr
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "mr", "default", {
+       name: "mr",
+       englishName: "Marathi",
+       nativeName: "मराठी",
+       language: "mr",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["रविवार","सोमवार","मंगळवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],
+                               namesAbbr: ["रवि.","सोम.","मंगळ.","बुध.","गुरु.","शुक्र.","शनि."],
+                               namesShort: ["र","स","म","ब","ग","श","श"]
+                       },
+                       months: {
+                               names: ["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोव्हेंबर","डिसेंबर",""],
+                               namesAbbr: ["जाने.","फेब्रु.","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टें.","ऑक्टो.","नोव्हें.","डिसें.",""]
+                       },
+                       AM: ["म.पू.","म.पू.","म.पू."],
+                       PM: ["म.नं.","म.नं.","म.नं."],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ms-BN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ms-BN.js
new file mode 100644 (file)
index 0000000..61bedd0
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Globalize Culture ms-BN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ms-BN", "default", {
+       name: "ms-BN",
+       englishName: "Malay (Brunei Darussalam)",
+       nativeName: "Bahasa Melayu (Brunei Darussalam)",
+       language: "ms",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       decimals: 0,
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],
+                               namesAbbr: ["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"],
+                               namesShort: ["A","I","S","R","K","J","S"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember",""],
+                               namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM yyyy H:mm",
+                               F: "dd MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ms-MY.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ms-MY.js
new file mode 100644 (file)
index 0000000..d6d916d
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture ms-MY
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ms-MY", "default", {
+       name: "ms-MY",
+       englishName: "Malay (Malaysia)",
+       nativeName: "Bahasa Melayu (Malaysia)",
+       language: "ms",
+       numberFormat: {
+               currency: {
+                       decimals: 0,
+                       symbol: "RM"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],
+                               namesAbbr: ["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"],
+                               namesShort: ["A","I","S","R","K","J","S"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember",""],
+                               namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM yyyy H:mm",
+                               F: "dd MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ms.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ms.js
new file mode 100644 (file)
index 0000000..033e5d2
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture ms
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ms", "default", {
+       name: "ms",
+       englishName: "Malay",
+       nativeName: "Bahasa Melayu",
+       language: "ms",
+       numberFormat: {
+               currency: {
+                       decimals: 0,
+                       symbol: "RM"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],
+                               namesAbbr: ["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"],
+                               namesShort: ["A","I","S","R","K","J","S"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember",""],
+                               namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM yyyy H:mm",
+                               F: "dd MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mt-MT.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mt-MT.js
new file mode 100644 (file)
index 0000000..bb7d40e
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Globalize Culture mt-MT
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "mt-MT", "default", {
+       name: "mt-MT",
+       englishName: "Maltese (Malta)",
+       nativeName: "Malti (Malta)",
+       language: "mt",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Il-Ħadd","It-Tnejn","It-Tlieta","L-Erbgħa","Il-Ħamis","Il-Ġimgħa","Is-Sibt"],
+                               namesAbbr: ["Ħad","Tne","Tli","Erb","Ħam","Ġim","Sib"],
+                               namesShort: ["I","I","I","L","I","I","I"]
+                       },
+                       months: {
+                               names: ["Jannar","Frar","Marzu","April","Mejju","Ġunju","Lulju","Awissu","Settembru","Ottubru","Novembru","Diċembru",""],
+                               namesAbbr: ["Jan","Fra","Mar","Apr","Mej","Ġun","Lul","Awi","Set","Ott","Nov","Diċ",""]
+                       },
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d' ta\\' 'MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' ta\\' 'MMMM yyyy HH:mm",
+                               F: "dddd, d' ta\\' 'MMMM yyyy HH:mm:ss",
+                               M: "d' ta\\' 'MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mt.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.mt.js
new file mode 100644 (file)
index 0000000..b742360
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Globalize Culture mt
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "mt", "default", {
+       name: "mt",
+       englishName: "Maltese",
+       nativeName: "Malti",
+       language: "mt",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Il-Ħadd","It-Tnejn","It-Tlieta","L-Erbgħa","Il-Ħamis","Il-Ġimgħa","Is-Sibt"],
+                               namesAbbr: ["Ħad","Tne","Tli","Erb","Ħam","Ġim","Sib"],
+                               namesShort: ["I","I","I","L","I","I","I"]
+                       },
+                       months: {
+                               names: ["Jannar","Frar","Marzu","April","Mejju","Ġunju","Lulju","Awissu","Settembru","Ottubru","Novembru","Diċembru",""],
+                               namesAbbr: ["Jan","Fra","Mar","Apr","Mej","Ġun","Lul","Awi","Set","Ott","Nov","Diċ",""]
+                       },
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d' ta\\' 'MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' ta\\' 'MMMM yyyy HH:mm",
+                               F: "dddd, d' ta\\' 'MMMM yyyy HH:mm:ss",
+                               M: "d' ta\\' 'MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nb-NO.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nb-NO.js
new file mode 100644 (file)
index 0000000..4961cb1
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture nb-NO
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "nb-NO", "default", {
+       name: "nb-NO",
+       englishName: "Norwegian, Bokmål (Norway)",
+       nativeName: "norsk, bokmål (Norge)",
+       language: "nb",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],
+                               namesAbbr: ["sø","ma","ti","on","to","fr","lø"],
+                               namesShort: ["sø","ma","ti","on","to","fr","lø"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nb.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nb.js
new file mode 100644 (file)
index 0000000..31e3144
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture nb
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "nb", "default", {
+       name: "nb",
+       englishName: "Norwegian (Bokmål)",
+       nativeName: "norsk (bokmål)",
+       language: "nb",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],
+                               namesAbbr: ["sø","ma","ti","on","to","fr","lø"],
+                               namesShort: ["sø","ma","ti","on","to","fr","lø"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ne-NP.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ne-NP.js
new file mode 100644 (file)
index 0000000..6b40800
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Globalize Culture ne-NP
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ne-NP", "default", {
+       name: "ne-NP",
+       englishName: "Nepali (Nepal)",
+       nativeName: "नेपाली (नेपाल)",
+       language: "ne",
+       numberFormat: {
+               groupSizes: [3,2],
+               NaN: "nan",
+               negativeInfinity: "-infinity",
+               positiveInfinity: "infinity",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["आइतवार","सोमवार","मङ्गलवार","बुधवार","बिहीवार","शुक्रवार","शनिवार"],
+                               namesAbbr: ["आइत","सोम","मङ्गल","बुध","बिही","शुक्र","शनि"],
+                               namesShort: ["आ","सो","म","बु","बि","शु","श"]
+                       },
+                       months: {
+                               names: ["जनवरी","फेब्रुअरी","मार्च","अप्रिल","मे","जून","जुलाई","अगस्त","सेप्टेम्बर","अक्टोबर","नोभेम्बर","डिसेम्बर",""],
+                               namesAbbr: ["जन","फेब","मार्च","अप्रिल","मे","जून","जुलाई","अग","सेप्ट","अक्ट","नोभ","डिस",""]
+                       },
+                       AM: ["विहानी","विहानी","विहानी"],
+                       PM: ["बेलुकी","बेलुकी","बेलुकी"],
+                       eras: [{"name":"a.d.","start":null,"offset":0}],
+                       patterns: {
+                               Y: "MMMM,yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ne.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ne.js
new file mode 100644 (file)
index 0000000..874982f
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Globalize Culture ne
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ne", "default", {
+       name: "ne",
+       englishName: "Nepali",
+       nativeName: "नेपाली",
+       language: "ne",
+       numberFormat: {
+               groupSizes: [3,2],
+               NaN: "nan",
+               negativeInfinity: "-infinity",
+               positiveInfinity: "infinity",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["आइतवार","सोमवार","मङ्गलवार","बुधवार","बिहीवार","शुक्रवार","शनिवार"],
+                               namesAbbr: ["आइत","सोम","मङ्गल","बुध","बिही","शुक्र","शनि"],
+                               namesShort: ["आ","सो","म","बु","बि","शु","श"]
+                       },
+                       months: {
+                               names: ["जनवरी","फेब्रुअरी","मार्च","अप्रिल","मे","जून","जुलाई","अगस्त","सेप्टेम्बर","अक्टोबर","नोभेम्बर","डिसेम्बर",""],
+                               namesAbbr: ["जन","फेब","मार्च","अप्रिल","मे","जून","जुलाई","अग","सेप्ट","अक्ट","नोभ","डिस",""]
+                       },
+                       AM: ["विहानी","विहानी","विहानी"],
+                       PM: ["बेलुकी","बेलुकी","बेलुकी"],
+                       eras: [{"name":"a.d.","start":null,"offset":0}],
+                       patterns: {
+                               Y: "MMMM,yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nl-BE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nl-BE.js
new file mode 100644 (file)
index 0000000..c9f93c7
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture nl-BE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "nl-BE", "default", {
+       name: "nl-BE",
+       englishName: "Dutch (Belgium)",
+       nativeName: "Nederlands (België)",
+       language: "nl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NaN (Niet-een-getal)",
+               negativeInfinity: "-oneindig",
+               positiveInfinity: "oneindig",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],
+                               namesAbbr: ["zo","ma","di","wo","do","vr","za"],
+                               namesShort: ["zo","ma","di","wo","do","vr","za"]
+                       },
+                       months: {
+                               names: ["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd d MMMM yyyy H:mm",
+                               F: "dddd d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nl-NL.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nl-NL.js
new file mode 100644 (file)
index 0000000..263d5af
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture nl-NL
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "nl-NL", "default", {
+       name: "nl-NL",
+       englishName: "Dutch (Netherlands)",
+       nativeName: "Nederlands (Nederland)",
+       language: "nl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],
+                               namesAbbr: ["zo","ma","di","wo","do","vr","za"],
+                               namesShort: ["zo","ma","di","wo","do","vr","za"]
+                       },
+                       months: {
+                               names: ["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d-M-yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd d MMMM yyyy H:mm",
+                               F: "dddd d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nl.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nl.js
new file mode 100644 (file)
index 0000000..560fa97
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture nl
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "nl", "default", {
+       name: "nl",
+       englishName: "Dutch",
+       nativeName: "Nederlands",
+       language: "nl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],
+                               namesAbbr: ["zo","ma","di","wo","do","vr","za"],
+                               namesShort: ["zo","ma","di","wo","do","vr","za"]
+                       },
+                       months: {
+                               names: ["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d-M-yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd d MMMM yyyy H:mm",
+                               F: "dddd d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nn-NO.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nn-NO.js
new file mode 100644 (file)
index 0000000..921debf
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture nn-NO
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "nn-NO", "default", {
+       name: "nn-NO",
+       englishName: "Norwegian, Nynorsk (Norway)",
+       nativeName: "norsk, nynorsk (Noreg)",
+       language: "nn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],
+                               namesAbbr: ["sø","må","ty","on","to","fr","la"],
+                               namesShort: ["sø","må","ty","on","to","fr","la"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nn.js
new file mode 100644 (file)
index 0000000..9942d9e
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture nn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "nn", "default", {
+       name: "nn",
+       englishName: "Norwegian (Nynorsk)",
+       nativeName: "norsk (nynorsk)",
+       language: "nn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],
+                               namesAbbr: ["sø","må","ty","on","to","fr","la"],
+                               namesShort: ["sø","må","ty","on","to","fr","la"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.no.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.no.js
new file mode 100644 (file)
index 0000000..e1131df
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture no
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "no", "default", {
+       name: "no",
+       englishName: "Norwegian",
+       nativeName: "norsk",
+       language: "no",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],
+                               namesAbbr: ["sø","ma","ti","on","to","fr","lø"],
+                               namesShort: ["sø","ma","ti","on","to","fr","lø"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nso-ZA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nso-ZA.js
new file mode 100644 (file)
index 0000000..ad3afa0
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture nso-ZA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "nso-ZA", "default", {
+       name: "nso-ZA",
+       englishName: "Sesotho sa Leboa (South Africa)",
+       nativeName: "Sesotho sa Leboa (Afrika Borwa)",
+       language: "nso",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Lamorena","Mošupologo","Labobedi","Laboraro","Labone","Labohlano","Mokibelo"],
+                               namesAbbr: ["Lam","Moš","Lbb","Lbr","Lbn","Lbh","Mok"],
+                               namesShort: ["L","M","L","L","L","L","M"]
+                       },
+                       months: {
+                               names: ["Pherekgong","Hlakola","Mopitlo","Moranang","Mosegamanye","Ngoatobošego","Phuphu","Phato","Lewedi","Diphalana","Dibatsela","Manthole",""],
+                               namesAbbr: ["Pher","Hlak","Mop","Mor","Mos","Ngwat","Phup","Phat","Lew","Dip","Dib","Man",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nso.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.nso.js
new file mode 100644 (file)
index 0000000..76621b8
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture nso
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "nso", "default", {
+       name: "nso",
+       englishName: "Sesotho sa Leboa",
+       nativeName: "Sesotho sa Leboa",
+       language: "nso",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Lamorena","Mošupologo","Labobedi","Laboraro","Labone","Labohlano","Mokibelo"],
+                               namesAbbr: ["Lam","Moš","Lbb","Lbr","Lbn","Lbh","Mok"],
+                               namesShort: ["L","M","L","L","L","L","M"]
+                       },
+                       months: {
+                               names: ["Pherekgong","Hlakola","Mopitlo","Moranang","Mosegamanye","Ngoatobošego","Phuphu","Phato","Lewedi","Diphalana","Dibatsela","Manthole",""],
+                               namesAbbr: ["Pher","Hlak","Mop","Mor","Mos","Ngwat","Phup","Phat","Lew","Dip","Dib","Man",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.oc-FR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.oc-FR.js
new file mode 100644 (file)
index 0000000..6681813
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Globalize Culture oc-FR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "oc-FR", "default", {
+       name: "oc-FR",
+       englishName: "Occitan (France)",
+       nativeName: "Occitan (França)",
+       language: "oc",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numeric",
+               negativeInfinity: "-Infinit",
+               positiveInfinity: "+Infinit",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimenge","diluns","dimars","dimècres","dijòus","divendres","dissabte"],
+                               namesAbbr: ["dim.","lun.","mar.","mèc.","jòu.","ven.","sab."],
+                               namesShort: ["di","lu","ma","mè","jò","ve","sa"]
+                       },
+                       months: {
+                               names: ["genier","febrier","març","abril","mai","junh","julh","agost","setembre","octobre","novembre","desembre",""],
+                               namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""]
+                       },
+                       monthsGenitive: {
+                               names: ["de genier","de febrier","de març","d'abril","de mai","de junh","de julh","d'agost","de setembre","d'octobre","de novembre","de desembre",""],
+                               namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"après Jèsus-Crist","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd,' lo 'd MMMM' de 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd,' lo 'd MMMM' de 'yyyy HH:mm",
+                               F: "dddd,' lo 'd MMMM' de 'yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.oc.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.oc.js
new file mode 100644 (file)
index 0000000..34705f0
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Globalize Culture oc
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "oc", "default", {
+       name: "oc",
+       englishName: "Occitan",
+       nativeName: "Occitan",
+       language: "oc",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numeric",
+               negativeInfinity: "-Infinit",
+               positiveInfinity: "+Infinit",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimenge","diluns","dimars","dimècres","dijòus","divendres","dissabte"],
+                               namesAbbr: ["dim.","lun.","mar.","mèc.","jòu.","ven.","sab."],
+                               namesShort: ["di","lu","ma","mè","jò","ve","sa"]
+                       },
+                       months: {
+                               names: ["genier","febrier","març","abril","mai","junh","julh","agost","setembre","octobre","novembre","desembre",""],
+                               namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""]
+                       },
+                       monthsGenitive: {
+                               names: ["de genier","de febrier","de març","d'abril","de mai","de junh","de julh","d'agost","de setembre","d'octobre","de novembre","de desembre",""],
+                               namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"après Jèsus-Crist","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd,' lo 'd MMMM' de 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd,' lo 'd MMMM' de 'yyyy HH:mm",
+                               F: "dddd,' lo 'd MMMM' de 'yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.or-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.or-IN.js
new file mode 100644 (file)
index 0000000..f773323
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Globalize Culture or-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "or-IN", "default", {
+       name: "or-IN",
+       englishName: "Oriya (India)",
+       nativeName: "ଓଡ଼ିଆ (ଭାରତ)",
+       language: "or",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ଟ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["ରବିବାର","ସୋମବାର","ମଙ୍ଗଳବାର","ବୁଧବାର","ଗୁରୁବାର","ଶୁକ୍ରବାର","ଶନିବାର"],
+                               namesAbbr: ["ରବି.","ସୋମ.","ମଙ୍ଗଳ.","ବୁଧ.","ଗୁରୁ.","ଶୁକ୍ର.","ଶନି."],
+                               namesShort: ["ର","ସୋ","ମ","ବୁ","ଗୁ","ଶୁ","ଶ"]
+                       },
+                       months: {
+                               names: ["ଜାନୁୟାରୀ","ଫ୍ରେବୃୟାରୀ","ମାର୍ଚ୍ଚ","ଏପ୍ରିଲ୍‌","ମେ","ଜୁନ୍‌","ଜୁଲାଇ","ଅଗଷ୍ଟ","ସେପ୍ଟେମ୍ବର","ଅକ୍ଟୋବର","ନଭେମ୍ବର","(ଡିସେମ୍ବର",""],
+                               namesAbbr: ["ଜାନୁୟାରୀ","ଫ୍ରେବୃୟାରୀ","ମାର୍ଚ୍ଚ","ଏପ୍ରିଲ୍‌","ମେ","ଜୁନ୍‌","ଜୁଲାଇ","ଅଗଷ୍ଟ","ସେପ୍ଟେମ୍ବର","ଅକ୍ଟୋବର","ନଭେମ୍ବର","(ଡିସେମ୍ବର",""]
+                       },
+                       eras: [{"name":"ଖ୍ରୀଷ୍ଟାବ୍ଦ","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.or.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.or.js
new file mode 100644 (file)
index 0000000..55581bd
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Globalize Culture or
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "or", "default", {
+       name: "or",
+       englishName: "Oriya",
+       nativeName: "ଓଡ଼ିଆ",
+       language: "or",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ଟ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["ରବିବାର","ସୋମବାର","ମଙ୍ଗଳବାର","ବୁଧବାର","ଗୁରୁବାର","ଶୁକ୍ରବାର","ଶନିବାର"],
+                               namesAbbr: ["ରବି.","ସୋମ.","ମଙ୍ଗଳ.","ବୁଧ.","ଗୁରୁ.","ଶୁକ୍ର.","ଶନି."],
+                               namesShort: ["ର","ସୋ","ମ","ବୁ","ଗୁ","ଶୁ","ଶ"]
+                       },
+                       months: {
+                               names: ["ଜାନୁୟାରୀ","ଫ୍ରେବୃୟାରୀ","ମାର୍ଚ୍ଚ","ଏପ୍ରିଲ୍‌","ମେ","ଜୁନ୍‌","ଜୁଲାଇ","ଅଗଷ୍ଟ","ସେପ୍ଟେମ୍ବର","ଅକ୍ଟୋବର","ନଭେମ୍ବର","(ଡିସେମ୍ବର",""],
+                               namesAbbr: ["ଜାନୁୟାରୀ","ଫ୍ରେବୃୟାରୀ","ମାର୍ଚ୍ଚ","ଏପ୍ରିଲ୍‌","ମେ","ଜୁନ୍‌","ଜୁଲାଇ","ଅଗଷ୍ଟ","ସେପ୍ଟେମ୍ବର","ଅକ୍ଟୋବର","ନଭେମ୍ବର","(ଡିସେମ୍ବର",""]
+                       },
+                       eras: [{"name":"ଖ୍ରୀଷ୍ଟାବ୍ଦ","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pa-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pa-IN.js
new file mode 100644 (file)
index 0000000..fa6672a
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture pa-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "pa-IN", "default", {
+       name: "pa-IN",
+       englishName: "Punjabi (India)",
+       nativeName: "ਪੰਜਾਬੀ (ਭਾਰਤ)",
+       language: "pa",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ਰੁ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ਐਤਵਾਰ","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬੁੱਧਵਾਰ","ਵੀਰਵਾਰ","ਸ਼ੁੱਕਰਵਾਰ","ਸ਼ਨਿੱਚਰਵਾਰ"],
+                               namesAbbr: ["ਐਤ.","ਸੋਮ.","ਮੰਗਲ.","ਬੁੱਧ.","ਵੀਰ.","ਸ਼ੁਕਰ.","ਸ਼ਨਿੱਚਰ."],
+                               namesShort: ["ਐ","ਸ","ਮ","ਬ","ਵ","ਸ਼","ਸ਼"]
+                       },
+                       months: {
+                               names: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""],
+                               namesAbbr: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""]
+                       },
+                       AM: ["ਸਵੇਰ","ਸਵੇਰ","ਸਵੇਰ"],
+                       PM: ["ਸ਼ਾਮ","ਸ਼ਾਮ","ਸ਼ਾਮ"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy dddd",
+                               t: "tt hh:mm",
+                               T: "tt hh:mm:ss",
+                               f: "dd MMMM yyyy dddd tt hh:mm",
+                               F: "dd MMMM yyyy dddd tt hh:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pa.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pa.js
new file mode 100644 (file)
index 0000000..f0f1bd5
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture pa
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "pa", "default", {
+       name: "pa",
+       englishName: "Punjabi",
+       nativeName: "ਪੰਜਾਬੀ",
+       language: "pa",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ਰੁ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ਐਤਵਾਰ","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬੁੱਧਵਾਰ","ਵੀਰਵਾਰ","ਸ਼ੁੱਕਰਵਾਰ","ਸ਼ਨਿੱਚਰਵਾਰ"],
+                               namesAbbr: ["ਐਤ.","ਸੋਮ.","ਮੰਗਲ.","ਬੁੱਧ.","ਵੀਰ.","ਸ਼ੁਕਰ.","ਸ਼ਨਿੱਚਰ."],
+                               namesShort: ["ਐ","ਸ","ਮ","ਬ","ਵ","ਸ਼","ਸ਼"]
+                       },
+                       months: {
+                               names: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""],
+                               namesAbbr: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""]
+                       },
+                       AM: ["ਸਵੇਰ","ਸਵੇਰ","ਸਵੇਰ"],
+                       PM: ["ਸ਼ਾਮ","ਸ਼ਾਮ","ਸ਼ਾਮ"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy dddd",
+                               t: "tt hh:mm",
+                               T: "tt hh:mm:ss",
+                               f: "dd MMMM yyyy dddd tt hh:mm",
+                               F: "dd MMMM yyyy dddd tt hh:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pl-PL.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pl-PL.js
new file mode 100644 (file)
index 0000000..59b4330
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Globalize Culture pl-PL
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "pl-PL", "default", {
+       name: "pl-PL",
+       englishName: "Polish (Poland)",
+       nativeName: "polski (Polska)",
+       language: "pl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "nie jest liczbą",
+               negativeInfinity: "-nieskończoność",
+               positiveInfinity: "+nieskończoność",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "zł"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],
+                               namesAbbr: ["N","Pn","Wt","Śr","Cz","Pt","So"],
+                               namesShort: ["N","Pn","Wt","Śr","Cz","Pt","So"]
+                       },
+                       months: {
+                               names: ["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień",""],
+                               namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""]
+                       },
+                       monthsGenitive: {
+                               names: ["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia",""],
+                               namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pl.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pl.js
new file mode 100644 (file)
index 0000000..5b09eca
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Globalize Culture pl
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "pl", "default", {
+       name: "pl",
+       englishName: "Polish",
+       nativeName: "polski",
+       language: "pl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "nie jest liczbą",
+               negativeInfinity: "-nieskończoność",
+               positiveInfinity: "+nieskończoność",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "zł"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],
+                               namesAbbr: ["N","Pn","Wt","Śr","Cz","Pt","So"],
+                               namesShort: ["N","Pn","Wt","Śr","Cz","Pt","So"]
+                       },
+                       months: {
+                               names: ["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień",""],
+                               namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""]
+                       },
+                       monthsGenitive: {
+                               names: ["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia",""],
+                               namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.prs-AF.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.prs-AF.js
new file mode 100644 (file)
index 0000000..d487690
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+ * Globalize Culture prs-AF
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "prs-AF", "default", {
+       name: "prs-AF",
+       englishName: "Dari (Afghanistan)",
+       nativeName: "درى (افغانستان)",
+       language: "prs",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               ",": ".",
+               ".": ",",
+               NaN: "غ ع",
+               negativeInfinity: "-∞",
+               positiveInfinity: "∞",
+               percent: {
+                       pattern: ["%n-","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$n-","$n"],
+                       symbol: "؋"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Hijri",
+                       firstDay: 5,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               f: "dd/MM/yyyy h:mm tt",
+                               F: "dd/MM/yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 5,
+                       days: {
+                               names: ["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesAbbr: ["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesShort: ["ی","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","وږى","تله","لړم","ليندۍ","مرغومى",""],
+                               namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","وږى","تله","لړم","ليندۍ","مرغومى",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"ل.ه","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy, dd, MMMM, dddd",
+                               f: "yyyy, dd, MMMM, dddd h:mm tt",
+                               F: "yyyy, dd, MMMM, dddd h:mm:ss tt",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.prs.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.prs.js
new file mode 100644 (file)
index 0000000..5111acc
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+ * Globalize Culture prs
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "prs", "default", {
+       name: "prs",
+       englishName: "Dari",
+       nativeName: "درى",
+       language: "prs",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               ",": ".",
+               ".": ",",
+               NaN: "غ ع",
+               negativeInfinity: "-∞",
+               positiveInfinity: "∞",
+               percent: {
+                       pattern: ["%n-","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$n-","$n"],
+                       symbol: "؋"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Hijri",
+                       firstDay: 5,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               f: "dd/MM/yyyy h:mm tt",
+                               F: "dd/MM/yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 5,
+                       days: {
+                               names: ["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesAbbr: ["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesShort: ["ی","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","وږى","تله","لړم","ليندۍ","مرغومى",""],
+                               namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","وږى","تله","لړم","ليندۍ","مرغومى",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"ل.ه","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy, dd, MMMM, dddd",
+                               f: "yyyy, dd, MMMM, dddd h:mm tt",
+                               F: "yyyy, dd, MMMM, dddd h:mm:ss tt",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ps-AF.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ps-AF.js
new file mode 100644 (file)
index 0000000..15e57f0
--- /dev/null
@@ -0,0 +1,176 @@
+/*
+ * Globalize Culture ps-AF
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ps-AF", "default", {
+       name: "ps-AF",
+       englishName: "Pashto (Afghanistan)",
+       nativeName: "پښتو (افغانستان)",
+       language: "ps",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               ",": "،",
+               ".": ",",
+               NaN: "غ ع",
+               negativeInfinity: "-∞",
+               positiveInfinity: "∞",
+               percent: {
+                       pattern: ["%n-","%n"],
+                       ",": "،",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$n-","$n"],
+                       ",": "٬",
+                       ".": "٫",
+                       symbol: "؋"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               f: "dd/MM/yyyy h:mm tt",
+                               F: "dd/MM/yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 6,
+                       days: {
+                               names: ["یکشنبه","دوشنبه","سه‌شنبه","چارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesAbbr: ["یکشنبه","دوشنبه","سه‌شنبه","چارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesShort: ["ی","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا ښزمرى","زمرى","وږى","تله","لړم","لنڈ ۍ","مرغومى",""],
+                               namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا ښ","زمرى","وږى","تله","لړم","لنڈ ۍ","مرغومى",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"ل.ه","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy, dd, MMMM, dddd",
+                               f: "yyyy, dd, MMMM, dddd h:mm tt",
+                               F: "yyyy, dd, MMMM, dddd h:mm:ss tt",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ps.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ps.js
new file mode 100644 (file)
index 0000000..73e4c93
--- /dev/null
@@ -0,0 +1,176 @@
+/*
+ * Globalize Culture ps
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ps", "default", {
+       name: "ps",
+       englishName: "Pashto",
+       nativeName: "پښتو",
+       language: "ps",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               ",": "،",
+               ".": ",",
+               NaN: "غ ع",
+               negativeInfinity: "-∞",
+               positiveInfinity: "∞",
+               percent: {
+                       pattern: ["%n-","%n"],
+                       ",": "،",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$n-","$n"],
+                       ",": "٬",
+                       ".": "٫",
+                       symbol: "؋"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               f: "dd/MM/yyyy h:mm tt",
+                               F: "dd/MM/yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 6,
+                       days: {
+                               names: ["یکشنبه","دوشنبه","سه‌شنبه","چارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesAbbr: ["یکشنبه","دوشنبه","سه‌شنبه","چارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesShort: ["ی","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا ښزمرى","زمرى","وږى","تله","لړم","لنڈ ۍ","مرغومى",""],
+                               namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا ښ","زمرى","وږى","تله","لړم","لنڈ ۍ","مرغومى",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"ل.ه","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy, dd, MMMM, dddd",
+                               f: "yyyy, dd, MMMM, dddd h:mm tt",
+                               F: "yyyy, dd, MMMM, dddd h:mm:ss tt",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pt-BR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pt-BR.js
new file mode 100644 (file)
index 0000000..ccbb632
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture pt-BR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "pt-BR", "default", {
+       name: "pt-BR",
+       englishName: "Portuguese (Brazil)",
+       nativeName: "Português (Brasil)",
+       language: "pt",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NaN (Não é um número)",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "+Infinito",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "R$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],
+                               namesAbbr: ["dom","seg","ter","qua","qui","sex","sáb"],
+                               namesShort: ["D","S","T","Q","Q","S","S"]
+                       },
+                       months: {
+                               names: ["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],
+                               namesAbbr: ["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d' de 'MMMM' de 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' de 'MMMM' de 'yyyy HH:mm",
+                               F: "dddd, d' de 'MMMM' de 'yyyy HH:mm:ss",
+                               M: "dd' de 'MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pt-PT.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pt-PT.js
new file mode 100644 (file)
index 0000000..d521e23
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture pt-PT
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "pt-PT", "default", {
+       name: "pt-PT",
+       englishName: "Portuguese (Portugal)",
+       nativeName: "português (Portugal)",
+       language: "pt",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NaN (Não é um número)",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "+Infinito",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],
+                               namesAbbr: ["dom","seg","ter","qua","qui","sex","sáb"],
+                               namesShort: ["D","S","T","Q","Q","S","S"]
+                       },
+                       months: {
+                               names: ["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro",""],
+                               namesAbbr: ["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dddd, d' de 'MMMM' de 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' de 'MMMM' de 'yyyy HH:mm",
+                               F: "dddd, d' de 'MMMM' de 'yyyy HH:mm:ss",
+                               M: "d/M",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pt.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.pt.js
new file mode 100644 (file)
index 0000000..5a83321
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture pt
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "pt", "default", {
+       name: "pt",
+       englishName: "Portuguese",
+       nativeName: "Português",
+       language: "pt",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NaN (Não é um número)",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "+Infinito",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "R$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],
+                               namesAbbr: ["dom","seg","ter","qua","qui","sex","sáb"],
+                               namesShort: ["D","S","T","Q","Q","S","S"]
+                       },
+                       months: {
+                               names: ["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],
+                               namesAbbr: ["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d' de 'MMMM' de 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' de 'MMMM' de 'yyyy HH:mm",
+                               F: "dddd, d' de 'MMMM' de 'yyyy HH:mm:ss",
+                               M: "dd' de 'MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.qut-GT.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.qut-GT.js
new file mode 100644 (file)
index 0000000..93bcffb
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Globalize Culture qut-GT
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "qut-GT", "default", {
+       name: "qut-GT",
+       englishName: "K'iche (Guatemala)",
+       nativeName: "K'iche (Guatemala)",
+       language: "qut",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       symbol: "Q"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["juq'ij","kaq'ij","oxq'ij","kajq'ij","joq'ij","waqq'ij","wuqq'ij"],
+                               namesAbbr: ["juq","kaq","oxq","kajq","joq","waqq","wuqq"],
+                               namesShort: ["ju","ka","ox","ka","jo","wa","wu"]
+                       },
+                       months: {
+                               names: ["nab'e ik'","ukab' ik'","rox ik'","ukaj ik'","uro' ik'","uwaq ik'","uwuq ik'","uwajxaq ik'","ub'elej ik'","ulaj ik'","ujulaj ik'","ukab'laj ik'",""],
+                               namesAbbr: ["nab'e","ukab","rox","ukaj","uro","uwaq","uwuq","uwajxaq","ub'elej","ulaj","ujulaj","ukab'laj",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.qut.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.qut.js
new file mode 100644 (file)
index 0000000..5d5790b
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Globalize Culture qut
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "qut", "default", {
+       name: "qut",
+       englishName: "K'iche",
+       nativeName: "K'iche",
+       language: "qut",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       symbol: "Q"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["juq'ij","kaq'ij","oxq'ij","kajq'ij","joq'ij","waqq'ij","wuqq'ij"],
+                               namesAbbr: ["juq","kaq","oxq","kajq","joq","waqq","wuqq"],
+                               namesShort: ["ju","ka","ox","ka","jo","wa","wu"]
+                       },
+                       months: {
+                               names: ["nab'e ik'","ukab' ik'","rox ik'","ukaj ik'","uro' ik'","uwaq ik'","uwuq ik'","uwajxaq ik'","ub'elej ik'","ulaj ik'","ujulaj ik'","ukab'laj ik'",""],
+                               namesAbbr: ["nab'e","ukab","rox","ukaj","uro","uwaq","uwuq","uwajxaq","ub'elej","ulaj","ujulaj","ukab'laj",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.quz-BO.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.quz-BO.js
new file mode 100644 (file)
index 0000000..313a9ad
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Globalize Culture quz-BO
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "quz-BO", "default", {
+       name: "quz-BO",
+       englishName: "Quechua (Bolivia)",
+       nativeName: "runasimi (Qullasuyu)",
+       language: "quz",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "$b"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"],
+                               namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"],
+                               namesShort: ["d","k","a","m","h","b","k"]
+                       },
+                       months: {
+                               names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""],
+                               namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.quz-EC.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.quz-EC.js
new file mode 100644 (file)
index 0000000..0b75b40
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Globalize Culture quz-EC
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "quz-EC", "default", {
+       name: "quz-EC",
+       englishName: "Quechua (Ecuador)",
+       nativeName: "runasimi (Ecuador)",
+       language: "quz",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"],
+                               namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"],
+                               namesShort: ["d","k","a","m","h","b","k"]
+                       },
+                       months: {
+                               names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""],
+                               namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.quz-PE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.quz-PE.js
new file mode 100644 (file)
index 0000000..5187503
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Globalize Culture quz-PE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "quz-PE", "default", {
+       name: "quz-PE",
+       englishName: "Quechua (Peru)",
+       nativeName: "runasimi (Piruw)",
+       language: "quz",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       symbol: "S/."
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"],
+                               namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"],
+                               namesShort: ["d","k","a","m","h","b","k"]
+                       },
+                       months: {
+                               names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""],
+                               namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.quz.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.quz.js
new file mode 100644 (file)
index 0000000..fef7426
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Globalize Culture quz
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "quz", "default", {
+       name: "quz",
+       englishName: "Quechua",
+       nativeName: "runasimi",
+       language: "quz",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "$b"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"],
+                               namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"],
+                               namesShort: ["d","k","a","m","h","b","k"]
+                       },
+                       months: {
+                               names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""],
+                               namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.rm-CH.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.rm-CH.js
new file mode 100644 (file)
index 0000000..9191f4b
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture rm-CH
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "rm-CH", "default", {
+       name: "rm-CH",
+       englishName: "Romansh (Switzerland)",
+       nativeName: "Rumantsch (Svizra)",
+       language: "rm",
+       numberFormat: {
+               ",": "'",
+               NaN: "betg def.",
+               negativeInfinity: "-infinit",
+               positiveInfinity: "+infinit",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": "'"
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": "'",
+                       symbol: "fr."
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dumengia","glindesdi","mardi","mesemna","gievgia","venderdi","sonda"],
+                               namesAbbr: ["du","gli","ma","me","gie","ve","so"],
+                               namesShort: ["du","gli","ma","me","gie","ve","so"]
+                       },
+                       months: {
+                               names: ["schaner","favrer","mars","avrigl","matg","zercladur","fanadur","avust","settember","october","november","december",""],
+                               namesAbbr: ["schan","favr","mars","avr","matg","zercl","fan","avust","sett","oct","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"s. Cr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d MMMM yyyy HH:mm",
+                               F: "dddd, d MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.rm.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.rm.js
new file mode 100644 (file)
index 0000000..0cbe7d3
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture rm
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "rm", "default", {
+       name: "rm",
+       englishName: "Romansh",
+       nativeName: "Rumantsch",
+       language: "rm",
+       numberFormat: {
+               ",": "'",
+               NaN: "betg def.",
+               negativeInfinity: "-infinit",
+               positiveInfinity: "+infinit",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": "'"
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": "'",
+                       symbol: "fr."
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dumengia","glindesdi","mardi","mesemna","gievgia","venderdi","sonda"],
+                               namesAbbr: ["du","gli","ma","me","gie","ve","so"],
+                               namesShort: ["du","gli","ma","me","gie","ve","so"]
+                       },
+                       months: {
+                               names: ["schaner","favrer","mars","avrigl","matg","zercladur","fanadur","avust","settember","october","november","december",""],
+                               namesAbbr: ["schan","favr","mars","avr","matg","zercl","fan","avust","sett","oct","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"s. Cr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d MMMM yyyy HH:mm",
+                               F: "dddd, d MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ro-RO.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ro-RO.js
new file mode 100644 (file)
index 0000000..e36fe53
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture ro-RO
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ro-RO", "default", {
+       name: "ro-RO",
+       englishName: "Romanian (Romania)",
+       nativeName: "română (România)",
+       language: "ro",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "lei"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["duminică","luni","marţi","miercuri","joi","vineri","sâmbătă"],
+                               namesAbbr: ["D","L","Ma","Mi","J","V","S"],
+                               namesShort: ["D","L","Ma","Mi","J","V","S"]
+                       },
+                       months: {
+                               names: ["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""],
+                               namesAbbr: ["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ro.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ro.js
new file mode 100644 (file)
index 0000000..9cbe26a
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture ro
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ro", "default", {
+       name: "ro",
+       englishName: "Romanian",
+       nativeName: "română",
+       language: "ro",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "lei"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["duminică","luni","marţi","miercuri","joi","vineri","sâmbătă"],
+                               namesAbbr: ["D","L","Ma","Mi","J","V","S"],
+                               namesShort: ["D","L","Ma","Mi","J","V","S"]
+                       },
+                       months: {
+                               names: ["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""],
+                               namesAbbr: ["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ru-RU.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ru-RU.js
new file mode 100644 (file)
index 0000000..c44493e
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Globalize Culture ru-RU
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ru-RU", "default", {
+       name: "ru-RU",
+       englishName: "Russian (Russia)",
+       nativeName: "русский (Россия)",
+       language: "ru",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],
+                               namesAbbr: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],
+                               namesShort: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"]
+                       },
+                       months: {
+                               names: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],
+                               namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря",""],
+                               namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy 'г.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy 'г.' H:mm",
+                               F: "d MMMM yyyy 'г.' H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ru.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ru.js
new file mode 100644 (file)
index 0000000..e3f4750
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Globalize Culture ru
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ru", "default", {
+       name: "ru",
+       englishName: "Russian",
+       nativeName: "русский",
+       language: "ru",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],
+                               namesAbbr: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],
+                               namesShort: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"]
+                       },
+                       months: {
+                               names: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],
+                               namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря",""],
+                               namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy 'г.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy 'г.' H:mm",
+                               F: "d MMMM yyyy 'г.' H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.rw-RW.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.rw-RW.js
new file mode 100644 (file)
index 0000000..7aa4cbc
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Globalize Culture rw-RW
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "rw-RW", "default", {
+       name: "rw-RW",
+       englishName: "Kinyarwanda (Rwanda)",
+       nativeName: "Kinyarwanda (Rwanda)",
+       language: "rw",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "RWF"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Ku wa mbere","Ku wa kabiri","Ku wa gatatu","Ku wa kane","Ku wa gatanu","Ku wa gatandatu","Ku cyumweru"],
+                               namesAbbr: ["mbe.","kab.","gat.","kan.","gat.","gat.","cyu."],
+                               namesShort: ["mb","ka","ga","ka","ga","ga","cy"]
+                       },
+                       months: {
+                               names: ["Mutarama","Gashyantare","Werurwe","Mata","Gicurasi","Kamena","Nyakanga","Kanama","Nzeli","Ukwakira","Ugushyingo","Ukuboza",""],
+                               namesAbbr: ["Mut","Gas","Wer","Mat","Gic","Kam","Nya","Kan","Nze","Ukwa","Ugu","Uku",""]
+                       },
+                       AM: ["saa moya z.m.","saa moya z.m.","SAA MOYA Z.M."],
+                       PM: ["saa moya z.n.","saa moya z.n.","SAA MOYA Z.N."],
+                       eras: [{"name":"AD","start":null,"offset":0}]
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.rw.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.rw.js
new file mode 100644 (file)
index 0000000..c86c2e9
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Globalize Culture rw
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "rw", "default", {
+       name: "rw",
+       englishName: "Kinyarwanda",
+       nativeName: "Kinyarwanda",
+       language: "rw",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "RWF"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Ku wa mbere","Ku wa kabiri","Ku wa gatatu","Ku wa kane","Ku wa gatanu","Ku wa gatandatu","Ku cyumweru"],
+                               namesAbbr: ["mbe.","kab.","gat.","kan.","gat.","gat.","cyu."],
+                               namesShort: ["mb","ka","ga","ka","ga","ga","cy"]
+                       },
+                       months: {
+                               names: ["Mutarama","Gashyantare","Werurwe","Mata","Gicurasi","Kamena","Nyakanga","Kanama","Nzeli","Ukwakira","Ugushyingo","Ukuboza",""],
+                               namesAbbr: ["Mut","Gas","Wer","Mat","Gic","Kam","Nya","Kan","Nze","Ukwa","Ugu","Uku",""]
+                       },
+                       AM: ["saa moya z.m.","saa moya z.m.","SAA MOYA Z.M."],
+                       PM: ["saa moya z.n.","saa moya z.n.","SAA MOYA Z.N."],
+                       eras: [{"name":"AD","start":null,"offset":0}]
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sa-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sa-IN.js
new file mode 100644 (file)
index 0000000..5408ab5
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Globalize Culture sa-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sa-IN", "default", {
+       name: "sa-IN",
+       englishName: "Sanskrit (India)",
+       nativeName: "संस्कृत (भारतम्)",
+       language: "sa",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"],
+                               namesAbbr: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"],
+                               namesShort: ["र","स","म","ब","ग","श","श"]
+                       },
+                       months: {
+                               names: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""],
+                               namesAbbr: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""]
+                       },
+                       AM: ["पूर्वाह्न","पूर्वाह्न","पूर्वाह्न"],
+                       PM: ["अपराह्न","अपराह्न","अपराह्न"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy dddd",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy dddd HH:mm",
+                               F: "dd MMMM yyyy dddd HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sa.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sa.js
new file mode 100644 (file)
index 0000000..3fb8cea
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Globalize Culture sa
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sa", "default", {
+       name: "sa",
+       englishName: "Sanskrit",
+       nativeName: "संस्कृत",
+       language: "sa",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"],
+                               namesAbbr: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"],
+                               namesShort: ["र","स","म","ब","ग","श","श"]
+                       },
+                       months: {
+                               names: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""],
+                               namesAbbr: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""]
+                       },
+                       AM: ["पूर्वाह्न","पूर्वाह्न","पूर्वाह्न"],
+                       PM: ["अपराह्न","अपराह्न","अपराह्न"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy dddd",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy dddd HH:mm",
+                               F: "dd MMMM yyyy dddd HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sah-RU.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sah-RU.js
new file mode 100644 (file)
index 0000000..17f487f
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Globalize Culture sah-RU
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sah-RU", "default", {
+       name: "sah-RU",
+       englishName: "Yakut (Russia)",
+       nativeName: "саха (Россия)",
+       language: "sah",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "NAN",
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "с."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["баскыһыанньа","бэнидиэнньик","оптуорунньук","сэрэдэ","чэппиэр","бээтинсэ","субуота"],
+                               namesAbbr: ["Бс","Бн","Оп","Ср","Чп","Бт","Сб"],
+                               namesShort: ["Бс","Бн","Оп","Ср","Чп","Бт","Сб"]
+                       },
+                       months: {
+                               names: ["Тохсунньу","Олунньу","Кулун тутар","Муус устар","Ыам ыйа","Бэс ыйа","От ыйа","Атырдьах ыйа","Балаҕан ыйа","Алтынньы","Сэтинньи","Ахсынньы",""],
+                               namesAbbr: ["тхс","олн","кул","мст","ыам","бэс","отй","атр","блҕ","алт","стн","ахс",""]
+                       },
+                       monthsGenitive: {
+                               names: ["тохсунньу","олунньу","кулун тутар","муус устар","ыам ыйын","бэс ыйын","от ыйын","атырдьах ыйын","балаҕан ыйын","алтынньы","сэтинньи","ахсынньы",""],
+                               namesAbbr: ["тхс","олн","кул","мст","ыам","бэс","отй","атр","блҕ","алт","стн","ахс",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "MM.dd.yyyy",
+                               D: "MMMM d yyyy 'с.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d yyyy 'с.' H:mm",
+                               F: "MMMM d yyyy 'с.' H:mm:ss",
+                               Y: "MMMM yyyy 'с.'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sah.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sah.js
new file mode 100644 (file)
index 0000000..ff1b18e
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Globalize Culture sah
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sah", "default", {
+       name: "sah",
+       englishName: "Yakut",
+       nativeName: "саха",
+       language: "sah",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "NAN",
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "с."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["баскыһыанньа","бэнидиэнньик","оптуорунньук","сэрэдэ","чэппиэр","бээтинсэ","субуота"],
+                               namesAbbr: ["Бс","Бн","Оп","Ср","Чп","Бт","Сб"],
+                               namesShort: ["Бс","Бн","Оп","Ср","Чп","Бт","Сб"]
+                       },
+                       months: {
+                               names: ["Тохсунньу","Олунньу","Кулун тутар","Муус устар","Ыам ыйа","Бэс ыйа","От ыйа","Атырдьах ыйа","Балаҕан ыйа","Алтынньы","Сэтинньи","Ахсынньы",""],
+                               namesAbbr: ["тхс","олн","кул","мст","ыам","бэс","отй","атр","блҕ","алт","стн","ахс",""]
+                       },
+                       monthsGenitive: {
+                               names: ["тохсунньу","олунньу","кулун тутар","муус устар","ыам ыйын","бэс ыйын","от ыйын","атырдьах ыйын","балаҕан ыйын","алтынньы","сэтинньи","ахсынньы",""],
+                               namesAbbr: ["тхс","олн","кул","мст","ыам","бэс","отй","атр","блҕ","алт","стн","ахс",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "MM.dd.yyyy",
+                               D: "MMMM d yyyy 'с.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d yyyy 'с.' H:mm",
+                               F: "MMMM d yyyy 'с.' H:mm:ss",
+                               Y: "MMMM yyyy 'с.'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.se-FI.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.se-FI.js
new file mode 100644 (file)
index 0000000..424df67
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture se-FI
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "se-FI", "default", {
+       name: "se-FI",
+       englishName: "Sami, Northern (Finland)",
+       nativeName: "davvisámegiella (Suopma)",
+       language: "se",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"],
+                               namesAbbr: ["sotn","vuos","maŋ","gask","duor","bear","láv"],
+                               namesShort: ["s","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ođđajagemánnu","guovvamánnu","njukčamánnu","cuoŋománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","čakčamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ođđajagimánu","guovvamánu","njukčamánu","cuoŋománu","miessemánu","geassemánu","suoidnemánu","borgemánu","čakčamánu","golggotmánu","skábmamánu","juovlamánu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d'. b. 'yyyy H:mm",
+                               F: "MMMM d'. b. 'yyyy H:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.se-NO.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.se-NO.js
new file mode 100644 (file)
index 0000000..ccdb630
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture se-NO
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "se-NO", "default", {
+       name: "se-NO",
+       englishName: "Sami, Northern (Norway)",
+       nativeName: "davvisámegiella (Norga)",
+       language: "se",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"],
+                               namesAbbr: ["sotn","vuos","maŋ","gask","duor","bear","láv"],
+                               namesShort: ["s","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ođđajagemánnu","guovvamánnu","njukčamánnu","cuoŋománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","čakčamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ođđajagimánu","guovvamánu","njukčamánu","cuoŋománu","miessemánu","geassemánu","suoidnemánu","borgemánu","čakčamánu","golggotmánu","skábmamánu","juovlamánu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.se-SE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.se-SE.js
new file mode 100644 (file)
index 0000000..b085955
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture se-SE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "se-SE", "default", {
+       name: "se-SE",
+       englishName: "Sami, Northern (Sweden)",
+       nativeName: "davvisámegiella (Ruoŧŧa)",
+       language: "se",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["sotnabeaivi","mánnodat","disdat","gaskavahkku","duorastat","bearjadat","lávvardat"],
+                               namesAbbr: ["sotn","mán","dis","gask","duor","bear","láv"],
+                               namesShort: ["s","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ođđajagemánnu","guovvamánnu","njukčamánnu","cuoŋománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","čakčamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ođđajagimánu","guovvamánu","njukčamánu","cuoŋománu","miessemánu","geassemánu","suoidnemánu","borgemánu","čakčamánu","golggotmánu","skábmamánu","juovlamánu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.se.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.se.js
new file mode 100644 (file)
index 0000000..c80207b
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture se
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "se", "default", {
+       name: "se",
+       englishName: "Sami (Northern)",
+       nativeName: "davvisámegiella",
+       language: "se",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"],
+                               namesAbbr: ["sotn","vuos","maŋ","gask","duor","bear","láv"],
+                               namesShort: ["s","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ođđajagemánnu","guovvamánnu","njukčamánnu","cuoŋománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","čakčamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ođđajagimánu","guovvamánu","njukčamánu","cuoŋománu","miessemánu","geassemánu","suoidnemánu","borgemánu","čakčamánu","golggotmánu","skábmamánu","juovlamánu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.si-LK.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.si-LK.js
new file mode 100644 (file)
index 0000000..9a114ed
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture si-LK
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "si-LK", "default", {
+       name: "si-LK",
+       englishName: "Sinhala (Sri Lanka)",
+       nativeName: "සිංහල (ශ්‍රී ලංකා)",
+       language: "si",
+       numberFormat: {
+               groupSizes: [3,2],
+               negativeInfinity: "-අනන්තය",
+               positiveInfinity: "අනන්තය",
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       symbol: "රු."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ඉරිදා","සඳුදා","අඟහරුවාදා","බදාදා","බ්‍රහස්පතින්දා","සිකුරාදා","සෙනසුරාදා"],
+                               namesAbbr: ["ඉරිදා","සඳුදා","කුජදා","බුදදා","ගුරුදා","කිවිදා","ශනිදා"],
+                               namesShort: ["ඉ","ස","අ","බ","බ්‍ර","සි","සෙ"]
+                       },
+                       months: {
+                               names: ["ජනවාරි","පෙබරවාරි","මාර්තු","අ‌ප්‍රේල්","මැයි","ජූනි","ජූලි","අ‌ගෝස්තු","සැප්තැම්බර්","ඔක්තෝබර්","නොවැම්බර්","දෙසැම්බර්",""],
+                               namesAbbr: ["ජන.","පෙබ.","මාර්තු.","අප්‍රේල්.","මැයි.","ජූනි.","ජූලි.","අගෝ.","සැප්.","ඔක්.","නොවැ.","දෙසැ.",""]
+                       },
+                       AM: ["පෙ.ව.","පෙ.ව.","පෙ.ව."],
+                       PM: ["ප.ව.","ප.ව.","ප.ව."],
+                       eras: [{"name":"ක්‍රි.ව.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "yyyy MMMM' මස 'dd' වැනිදා 'dddd",
+                               f: "yyyy MMMM' මස 'dd' වැනිදා 'dddd h:mm tt",
+                               F: "yyyy MMMM' මස 'dd' වැනිදා 'dddd h:mm:ss tt",
+                               Y: "yyyy MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.si.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.si.js
new file mode 100644 (file)
index 0000000..724dc61
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture si
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "si", "default", {
+       name: "si",
+       englishName: "Sinhala",
+       nativeName: "සිංහල",
+       language: "si",
+       numberFormat: {
+               groupSizes: [3,2],
+               negativeInfinity: "-අනන්තය",
+               positiveInfinity: "අනන්තය",
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       symbol: "රු."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ඉරිදා","සඳුදා","අඟහරුවාදා","බදාදා","බ්‍රහස්පතින්දා","සිකුරාදා","සෙනසුරාදා"],
+                               namesAbbr: ["ඉරිදා","සඳුදා","කුජදා","බුදදා","ගුරුදා","කිවිදා","ශනිදා"],
+                               namesShort: ["ඉ","ස","අ","බ","බ්‍ර","සි","සෙ"]
+                       },
+                       months: {
+                               names: ["ජනවාරි","පෙබරවාරි","මාර්තු","අ‌ප්‍රේල්","මැයි","ජූනි","ජූලි","අ‌ගෝස්තු","සැප්තැම්බර්","ඔක්තෝබර්","නොවැම්බර්","දෙසැම්බර්",""],
+                               namesAbbr: ["ජන.","පෙබ.","මාර්තු.","අප්‍රේල්.","මැයි.","ජූනි.","ජූලි.","අගෝ.","සැප්.","ඔක්.","නොවැ.","දෙසැ.",""]
+                       },
+                       AM: ["පෙ.ව.","පෙ.ව.","පෙ.ව."],
+                       PM: ["ප.ව.","ප.ව.","ප.ව."],
+                       eras: [{"name":"ක්‍රි.ව.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "yyyy MMMM' මස 'dd' වැනිදා 'dddd",
+                               f: "yyyy MMMM' මස 'dd' වැනිදා 'dddd h:mm tt",
+                               F: "yyyy MMMM' මස 'dd' වැනිදා 'dddd h:mm:ss tt",
+                               Y: "yyyy MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sk-SK.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sk-SK.js
new file mode 100644 (file)
index 0000000..6bc1656
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Globalize Culture sk-SK
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sk-SK", "default", {
+       name: "sk-SK",
+       englishName: "Slovak (Slovakia)",
+       nativeName: "slovenčina (Slovenská republika)",
+       language: "sk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Nie je číslo",
+               negativeInfinity: "-nekonečno",
+               positiveInfinity: "+nekonečno",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ". ",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],
+                               namesAbbr: ["ne","po","ut","st","št","pi","so"],
+                               namesShort: ["ne","po","ut","st","št","pi","so"]
+                       },
+                       months: {
+                               names: ["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       monthsGenitive: {
+                               names: ["januára","februára","marca","apríla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. l.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d. M. yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sk.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sk.js
new file mode 100644 (file)
index 0000000..0fd4334
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Globalize Culture sk
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sk", "default", {
+       name: "sk",
+       englishName: "Slovak",
+       nativeName: "slovenčina",
+       language: "sk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Nie je číslo",
+               negativeInfinity: "-nekonečno",
+               positiveInfinity: "+nekonečno",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ". ",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],
+                               namesAbbr: ["ne","po","ut","st","št","pi","so"],
+                               namesShort: ["ne","po","ut","st","št","pi","so"]
+                       },
+                       months: {
+                               names: ["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       monthsGenitive: {
+                               names: ["januára","februára","marca","apríla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. l.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d. M. yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sl-SI.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sl-SI.js
new file mode 100644 (file)
index 0000000..9cfb1f9
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture sl-SI
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sl-SI", "default", {
+       name: "sl-SI",
+       englishName: "Slovenian (Slovenia)",
+       nativeName: "slovenski (Slovenija)",
+       language: "sl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-neskončnost",
+               positiveInfinity: "neskončnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljek","torek","sreda","četrtek","petek","sobota"],
+                               namesAbbr: ["ned","pon","tor","sre","čet","pet","sob"],
+                               namesShort: ["ne","po","to","sr","če","pe","so"]
+                       },
+                       months: {
+                               names: ["januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sl.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sl.js
new file mode 100644 (file)
index 0000000..ebfa588
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture sl
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sl", "default", {
+       name: "sl",
+       englishName: "Slovenian",
+       nativeName: "slovenski",
+       language: "sl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-neskončnost",
+               positiveInfinity: "neskončnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljek","torek","sreda","četrtek","petek","sobota"],
+                               namesAbbr: ["ned","pon","tor","sre","čet","pet","sob"],
+                               namesShort: ["ne","po","to","sr","če","pe","so"]
+                       },
+                       months: {
+                               names: ["januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sma-NO.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sma-NO.js
new file mode 100644 (file)
index 0000000..80879ff
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture sma-NO
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sma-NO", "default", {
+       name: "sma-NO",
+       englishName: "Sami, Southern (Norway)",
+       nativeName: "åarjelsaemiengiele (Nöörje)",
+       language: "sma",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["aejlege","måanta","dæjsta","gaskevåhkoe","duarsta","bearjadahke","laavvardahke"],
+                               namesAbbr: ["aej","måa","dæj","gask","duar","bearj","laav"],
+                               namesShort: ["a","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve",""],
+                               namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""]
+                       },
+                       monthsGenitive: {
+                               names: ["tsïengelen","goevten","njoktjen","voerhtjen","suehpeden","ruffien","snjaltjen","mïetsken","skïereden","golken","rahkan","goeven",""],
+                               namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sma-SE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sma-SE.js
new file mode 100644 (file)
index 0000000..36747ff
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture sma-SE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sma-SE", "default", {
+       name: "sma-SE",
+       englishName: "Sami, Southern (Sweden)",
+       nativeName: "åarjelsaemiengiele (Sveerje)",
+       language: "sma",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["aejlege","måanta","dæjsta","gaskevåhkoe","duarsta","bearjadahke","laavvardahke"],
+                               namesAbbr: ["aej","måa","dæj","gask","duar","bearj","laav"],
+                               namesShort: ["a","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve",""],
+                               namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""]
+                       },
+                       monthsGenitive: {
+                               names: ["tsïengelen","goevten","njoktjen","voerhtjen","suehpeden","ruffien","snjaltjen","mïetsken","skïereden","golken","rahkan","goeven",""],
+                               namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sma.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sma.js
new file mode 100644 (file)
index 0000000..284bf37
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture sma
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sma", "default", {
+       name: "sma",
+       englishName: "Sami (Southern)",
+       nativeName: "åarjelsaemiengiele",
+       language: "sma",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["aejlege","måanta","dæjsta","gaskevåhkoe","duarsta","bearjadahke","laavvardahke"],
+                               namesAbbr: ["aej","måa","dæj","gask","duar","bearj","laav"],
+                               namesShort: ["a","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve",""],
+                               namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""]
+                       },
+                       monthsGenitive: {
+                               names: ["tsïengelen","goevten","njoktjen","voerhtjen","suehpeden","ruffien","snjaltjen","mïetsken","skïereden","golken","rahkan","goeven",""],
+                               namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smj-NO.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smj-NO.js
new file mode 100644 (file)
index 0000000..d6556e5
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture smj-NO
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "smj-NO", "default", {
+       name: "smj-NO",
+       englishName: "Sami, Lule (Norway)",
+       nativeName: "julevusámegiella (Vuodna)",
+       language: "smj",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sådnåbiejvve","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"],
+                               namesAbbr: ["såd","mán","dis","gas","duor","bier","láv"],
+                               namesShort: ["s","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ådåjakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bårggemánno","ragátmánno","gålgådismánno","basádismánno","javllamánno",""],
+                               namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ådåjakmáno","guovvamáno","sjnjuktjamáno","vuoratjismáno","moarmesmáno","biehtsemáno","sjnjilltjamáno","bårggemáno","ragátmáno","gålgådismáno","basádismáno","javllamáno",""],
+                               namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smj-SE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smj-SE.js
new file mode 100644 (file)
index 0000000..4b3f8a2
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture smj-SE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "smj-SE", "default", {
+       name: "smj-SE",
+       englishName: "Sami, Lule (Sweden)",
+       nativeName: "julevusámegiella (Svierik)",
+       language: "smj",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ájllek","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"],
+                               namesAbbr: ["ájl","mán","dis","gas","duor","bier","láv"],
+                               namesShort: ["á","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ådåjakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bårggemánno","ragátmánno","gålgådismánno","basádismánno","javllamánno",""],
+                               namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ådåjakmáno","guovvamáno","sjnjuktjamáno","vuoratjismáno","moarmesmáno","biehtsemáno","sjnjilltjamáno","bårggemáno","ragátmáno","gålgådismáno","basádismáno","javllamáno",""],
+                               namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smj.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smj.js
new file mode 100644 (file)
index 0000000..fe1e50f
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture smj
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "smj", "default", {
+       name: "smj",
+       englishName: "Sami (Lule)",
+       nativeName: "julevusámegiella",
+       language: "smj",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ájllek","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"],
+                               namesAbbr: ["ájl","mán","dis","gas","duor","bier","láv"],
+                               namesShort: ["á","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ådåjakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bårggemánno","ragátmánno","gålgådismánno","basádismánno","javllamánno",""],
+                               namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ådåjakmáno","guovvamáno","sjnjuktjamáno","vuoratjismáno","moarmesmáno","biehtsemáno","sjnjilltjamáno","bårggemáno","ragátmáno","gålgådismáno","basádismáno","javllamáno",""],
+                               namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smn-FI.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smn-FI.js
new file mode 100644 (file)
index 0000000..8226968
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture smn-FI
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "smn-FI", "default", {
+       name: "smn-FI",
+       englishName: "Sami, Inari (Finland)",
+       nativeName: "sämikielâ (Suomâ)",
+       language: "smn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["pasepeivi","vuossargâ","majebargâ","koskokko","tuorâstâh","vástuppeivi","lávárdâh"],
+                               namesAbbr: ["pa","vu","ma","ko","tu","vá","lá"],
+                               namesShort: ["p","v","m","k","t","v","l"]
+                       },
+                       months: {
+                               names: ["uđđâivemáánu","kuovâmáánu","njuhčâmáánu","cuáŋuimáánu","vyesimáánu","kesimáánu","syeinimáánu","porgemáánu","čohčâmáánu","roovvâdmáánu","skammâmáánu","juovlâmáánu",""],
+                               namesAbbr: ["uđiv","kuov","njuh","cuoŋ","vyes","kesi","syei","porg","čoh","roov","ska","juov",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "MMMM d'. p. 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d'. p. 'yyyy H:mm",
+                               F: "MMMM d'. p. 'yyyy H:mm:ss",
+                               M: "MMMM d'. p. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.smn.js
new file mode 100644 (file)
index 0000000..ce7bcf8
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Globalize Culture smn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "smn", "default", {
+       name: "smn",
+       englishName: "Sami (Inari)",
+       nativeName: "sämikielâ",
+       language: "smn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["pasepeivi","vuossargâ","majebargâ","koskokko","tuorâstâh","vástuppeivi","lávárdâh"],
+                               namesAbbr: ["pa","vu","ma","ko","tu","vá","lá"],
+                               namesShort: ["p","v","m","k","t","v","l"]
+                       },
+                       months: {
+                               names: ["uđđâivemáánu","kuovâmáánu","njuhčâmáánu","cuáŋuimáánu","vyesimáánu","kesimáánu","syeinimáánu","porgemáánu","čohčâmáánu","roovvâdmáánu","skammâmáánu","juovlâmáánu",""],
+                               namesAbbr: ["uđiv","kuov","njuh","cuoŋ","vyes","kesi","syei","porg","čoh","roov","ska","juov",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "MMMM d'. p. 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d'. p. 'yyyy H:mm",
+                               F: "MMMM d'. p. 'yyyy H:mm:ss",
+                               M: "MMMM d'. p. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sms-FI.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sms-FI.js
new file mode 100644 (file)
index 0000000..441c2f3
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture sms-FI
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sms-FI", "default", {
+       name: "sms-FI",
+       englishName: "Sami, Skolt (Finland)",
+       nativeName: "sääm´ǩiõll (Lää´ddjânnam)",
+       language: "sms",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["pâ´sspei´vv","vuõssargg","mââibargg","seärad","nelljdpei´vv","piâtnâc","sue´vet"],
+                               namesAbbr: ["pâ","vu","mâ","se","ne","pi","su"],
+                               namesShort: ["p","v","m","s","n","p","s"]
+                       },
+                       months: {
+                               names: ["ođđee´jjmään","tä´lvvmään","pâ´zzlâšttammään","njuhččmään","vue´ssmään","ǩie´ssmään","suei´nnmään","på´rǧǧmään","čõhččmään","kålggmään","skamm´mään","rosttovmään",""],
+                               namesAbbr: ["ođjm","tä´lvv","pâzl","njuh","vue","ǩie","suei","på´r","čõh","kålg","ska","rost",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ođđee´jjmannu","tä´lvvmannu","pâ´zzlâšttammannu","njuhččmannu","vue´ssmannu","ǩie´ssmannu","suei´nnmannu","på´rǧǧmannu","čõhččmannu","kålggmannu","skamm´mannu","rosttovmannu",""],
+                               namesAbbr: ["ođjm","tä´lvv","pâzl","njuh","vue","ǩie","suei","på´r","čõh","kålg","ska","rost",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "MMMM d'. p. 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d'. p. 'yyyy H:mm",
+                               F: "MMMM d'. p. 'yyyy H:mm:ss",
+                               M: "MMMM d'. p. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sms.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sms.js
new file mode 100644 (file)
index 0000000..990e43f
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture sms
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sms", "default", {
+       name: "sms",
+       englishName: "Sami (Skolt)",
+       nativeName: "sääm´ǩiõll",
+       language: "sms",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["pâ´sspei´vv","vuõssargg","mââibargg","seärad","nelljdpei´vv","piâtnâc","sue´vet"],
+                               namesAbbr: ["pâ","vu","mâ","se","ne","pi","su"],
+                               namesShort: ["p","v","m","s","n","p","s"]
+                       },
+                       months: {
+                               names: ["ođđee´jjmään","tä´lvvmään","pâ´zzlâšttammään","njuhččmään","vue´ssmään","ǩie´ssmään","suei´nnmään","på´rǧǧmään","čõhččmään","kålggmään","skamm´mään","rosttovmään",""],
+                               namesAbbr: ["ođjm","tä´lvv","pâzl","njuh","vue","ǩie","suei","på´r","čõh","kålg","ska","rost",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ođđee´jjmannu","tä´lvvmannu","pâ´zzlâšttammannu","njuhččmannu","vue´ssmannu","ǩie´ssmannu","suei´nnmannu","på´rǧǧmannu","čõhččmannu","kålggmannu","skamm´mannu","rosttovmannu",""],
+                               namesAbbr: ["ođjm","tä´lvv","pâzl","njuh","vue","ǩie","suei","på´r","čõh","kålg","ska","rost",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "MMMM d'. p. 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d'. p. 'yyyy H:mm",
+                               F: "MMMM d'. p. 'yyyy H:mm:ss",
+                               M: "MMMM d'. p. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sq-AL.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sq-AL.js
new file mode 100644 (file)
index 0000000..f90be76
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture sq-AL
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sq-AL", "default", {
+       name: "sq-AL",
+       englishName: "Albanian (Albania)",
+       nativeName: "shqipe (Shqipëria)",
+       language: "sq",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-infinit",
+               positiveInfinity: "infinit",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Lek"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["e diel","e hënë","e martë","e mërkurë","e enjte","e premte","e shtunë"],
+                               namesAbbr: ["Die","Hën","Mar","Mër","Enj","Pre","Sht"],
+                               namesShort: ["Di","Hë","Ma","Më","En","Pr","Sh"]
+                       },
+                       months: {
+                               names: ["janar","shkurt","mars","prill","maj","qershor","korrik","gusht","shtator","tetor","nëntor","dhjetor",""],
+                               namesAbbr: ["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gsh","Sht","Tet","Nën","Dhj",""]
+                       },
+                       AM: ["PD","pd","PD"],
+                       PM: ["MD","md","MD"],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "yyyy-MM-dd",
+                               t: "h:mm.tt",
+                               T: "h:mm:ss.tt",
+                               f: "yyyy-MM-dd h:mm.tt",
+                               F: "yyyy-MM-dd h:mm:ss.tt",
+                               Y: "yyyy-MM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sq.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sq.js
new file mode 100644 (file)
index 0000000..0e9c6b8
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture sq
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sq", "default", {
+       name: "sq",
+       englishName: "Albanian",
+       nativeName: "shqipe",
+       language: "sq",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-infinit",
+               positiveInfinity: "infinit",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Lek"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["e diel","e hënë","e martë","e mërkurë","e enjte","e premte","e shtunë"],
+                               namesAbbr: ["Die","Hën","Mar","Mër","Enj","Pre","Sht"],
+                               namesShort: ["Di","Hë","Ma","Më","En","Pr","Sh"]
+                       },
+                       months: {
+                               names: ["janar","shkurt","mars","prill","maj","qershor","korrik","gusht","shtator","tetor","nëntor","dhjetor",""],
+                               namesAbbr: ["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gsh","Sht","Tet","Nën","Dhj",""]
+                       },
+                       AM: ["PD","pd","PD"],
+                       PM: ["MD","md","MD"],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "yyyy-MM-dd",
+                               t: "h:mm.tt",
+                               T: "h:mm:ss.tt",
+                               f: "yyyy-MM-dd h:mm.tt",
+                               F: "yyyy-MM-dd h:mm:ss.tt",
+                               Y: "yyyy-MM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl-BA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl-BA.js
new file mode 100644 (file)
index 0000000..ea6f27a
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture sr-Cyrl-BA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sr-Cyrl-BA", "default", {
+       name: "sr-Cyrl-BA",
+       englishName: "Serbian (Cyrillic, Bosnia and Herzegovina)",
+       nativeName: "српски (Босна и Херцеговина)",
+       language: "sr-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "КМ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недеља","понедељак","уторак","среда","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["н","п","у","с","ч","п","с"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl-CS.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl-CS.js
new file mode 100644 (file)
index 0000000..4a1ad32
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture sr-Cyrl-CS
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sr-Cyrl-CS", "default", {
+       name: "sr-Cyrl-CS",
+       englishName: "Serbian (Cyrillic, Serbia and Montenegro (Former))",
+       nativeName: "српски (Србија и Црна Гора (Претходно))",
+       language: "sr-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Дин."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недеља","понедељак","уторак","среда","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["не","по","ут","ср","че","пе","су"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl-ME.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl-ME.js
new file mode 100644 (file)
index 0000000..d791952
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture sr-Cyrl-ME
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sr-Cyrl-ME", "default", {
+       name: "sr-Cyrl-ME",
+       englishName: "Serbian (Cyrillic, Montenegro)",
+       nativeName: "српски (Црна Гора)",
+       language: "sr-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недеља","понедељак","уторак","среда","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["не","по","ут","ср","че","пе","су"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl-RS.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl-RS.js
new file mode 100644 (file)
index 0000000..9e5367d
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture sr-Cyrl-RS
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sr-Cyrl-RS", "default", {
+       name: "sr-Cyrl-RS",
+       englishName: "Serbian (Cyrillic, Serbia)",
+       nativeName: "српски (Србија)",
+       language: "sr-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Дин."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недеља","понедељак","уторак","среда","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["не","по","ут","ср","че","пе","су"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Cyrl.js
new file mode 100644 (file)
index 0000000..cde93e1
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture sr-Cyrl
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sr-Cyrl", "default", {
+       name: "sr-Cyrl",
+       englishName: "Serbian (Cyrillic)",
+       nativeName: "српски",
+       language: "sr-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Дин."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недеља","понедељак","уторак","среда","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["не","по","ут","ср","че","пе","су"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn-BA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn-BA.js
new file mode 100644 (file)
index 0000000..ba99cbb
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture sr-Latn-BA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sr-Latn-BA", "default", {
+       name: "sr-Latn-BA",
+       englishName: "Serbian (Latin, Bosnia and Herzegovina)",
+       nativeName: "srpski (Bosna i Hercegovina)",
+       language: "sr-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-beskonačnost",
+               positiveInfinity: "+beskonačnost",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "KM"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sre","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n.e.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn-CS.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn-CS.js
new file mode 100644 (file)
index 0000000..02436cb
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture sr-Latn-CS
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sr-Latn-CS", "default", {
+       name: "sr-Latn-CS",
+       englishName: "Serbian (Latin, Serbia and Montenegro (Former))",
+       nativeName: "srpski (Srbija i Crna Gora (Prethodno))",
+       language: "sr-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-beskonačnost",
+               positiveInfinity: "+beskonačnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Din."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sre","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n.e.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn-ME.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn-ME.js
new file mode 100644 (file)
index 0000000..39ac523
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture sr-Latn-ME
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sr-Latn-ME", "default", {
+       name: "sr-Latn-ME",
+       englishName: "Serbian (Latin, Montenegro)",
+       nativeName: "srpski (Crna Gora)",
+       language: "sr-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-beskonačnost",
+               positiveInfinity: "+beskonačnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sre","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n.e.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn-RS.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn-RS.js
new file mode 100644 (file)
index 0000000..369bcc7
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture sr-Latn-RS
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sr-Latn-RS", "default", {
+       name: "sr-Latn-RS",
+       englishName: "Serbian (Latin, Serbia)",
+       nativeName: "srpski (Srbija)",
+       language: "sr-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-beskonačnost",
+               positiveInfinity: "+beskonačnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Din."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sre","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n.e.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr-Latn.js
new file mode 100644 (file)
index 0000000..ae10f74
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture sr-Latn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sr-Latn", "default", {
+       name: "sr-Latn",
+       englishName: "Serbian (Latin)",
+       nativeName: "srpski",
+       language: "sr-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-beskonačnost",
+               positiveInfinity: "+beskonačnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Din."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sre","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n.e.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sr.js
new file mode 100644 (file)
index 0000000..b74cd89
--- /dev/null
@@ -0,0 +1,80 @@
+/*
+ * Globalize Culture sr
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sr", "default", {
+       name: "sr",
+       englishName: "Serbian",
+       nativeName: "srpski",
+       language: "sr",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-beskonačnost",
+               positiveInfinity: "+beskonačnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Din."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sre","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n.e.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sv-FI.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sv-FI.js
new file mode 100644 (file)
index 0000000..74aeca9
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture sv-FI
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sv-FI", "default", {
+       name: "sv-FI",
+       englishName: "Swedish (Finland)",
+       nativeName: "svenska (Finland)",
+       language: "sv",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],
+                               namesAbbr: ["sö","må","ti","on","to","fr","lö"],
+                               namesShort: ["sö","må","ti","on","to","fr","lö"]
+                       },
+                       months: {
+                               names: ["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "'den 'd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "'den 'd MMMM yyyy HH:mm",
+                               F: "'den 'd MMMM yyyy HH:mm:ss",
+                               M: "'den 'd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sv-SE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sv-SE.js
new file mode 100644 (file)
index 0000000..85e5a20
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture sv-SE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sv-SE", "default", {
+       name: "sv-SE",
+       englishName: "Swedish (Sweden)",
+       nativeName: "svenska (Sverige)",
+       language: "sv",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],
+                               namesAbbr: ["sö","må","ti","on","to","fr","lö"],
+                               namesShort: ["sö","må","ti","on","to","fr","lö"]
+                       },
+                       months: {
+                               names: ["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "'den 'd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "'den 'd MMMM yyyy HH:mm",
+                               F: "'den 'd MMMM yyyy HH:mm:ss",
+                               M: "'den 'd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sv.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sv.js
new file mode 100644 (file)
index 0000000..313eaf7
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture sv
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sv", "default", {
+       name: "sv",
+       englishName: "Swedish",
+       nativeName: "svenska",
+       language: "sv",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],
+                               namesAbbr: ["sö","må","ti","on","to","fr","lö"],
+                               namesShort: ["sö","må","ti","on","to","fr","lö"]
+                       },
+                       months: {
+                               names: ["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "'den 'd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "'den 'd MMMM yyyy HH:mm",
+                               F: "'den 'd MMMM yyyy HH:mm:ss",
+                               M: "'den 'd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sw-KE.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sw-KE.js
new file mode 100644 (file)
index 0000000..8df3960
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Globalize Culture sw-KE
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sw-KE", "default", {
+       name: "sw-KE",
+       englishName: "Kiswahili (Kenya)",
+       nativeName: "Kiswahili (Kenya)",
+       language: "sw",
+       numberFormat: {
+               currency: {
+                       symbol: "S"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Jumapili","Jumatatu","Jumanne","Jumatano","Alhamisi","Ijumaa","Jumamosi"],
+                               namesAbbr: ["Jumap.","Jumat.","Juman.","Jumat.","Alh.","Iju.","Jumam."],
+                               namesShort: ["P","T","N","T","A","I","M"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Decemba",""],
+                               namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ago","Sep","Okt","Nov","Dec",""]
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sw.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.sw.js
new file mode 100644 (file)
index 0000000..c5cfe84
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Globalize Culture sw
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "sw", "default", {
+       name: "sw",
+       englishName: "Kiswahili",
+       nativeName: "Kiswahili",
+       language: "sw",
+       numberFormat: {
+               currency: {
+                       symbol: "S"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Jumapili","Jumatatu","Jumanne","Jumatano","Alhamisi","Ijumaa","Jumamosi"],
+                               namesAbbr: ["Jumap.","Jumat.","Juman.","Jumat.","Alh.","Iju.","Jumam."],
+                               namesShort: ["P","T","N","T","A","I","M"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Decemba",""],
+                               namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ago","Sep","Okt","Nov","Dec",""]
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.syr-SY.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.syr-SY.js
new file mode 100644 (file)
index 0000000..1ef86ec
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture syr-SY
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "syr-SY", "default", {
+       name: "syr-SY",
+       englishName: "Syriac (Syria)",
+       nativeName: "ܣܘܪܝܝܐ (سوريا)",
+       language: "syr",
+       isRTL: true,
+       numberFormat: {
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ل.س.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["ܚܕ ܒܫܒܐ","ܬܪܝܢ ܒܫܒܐ","ܬܠܬܐ ܒܫܒܐ","ܐܪܒܥܐ ܒܫܒܐ","ܚܡܫܐ ܒܫܒܐ","ܥܪܘܒܬܐ","ܫܒܬܐ"],
+                               namesAbbr: ["܏ܐ ܏ܒܫ","܏ܒ ܏ܒܫ","܏ܓ ܏ܒܫ","܏ܕ ܏ܒܫ","܏ܗ ܏ܒܫ","܏ܥܪܘܒ","܏ܫܒ"],
+                               namesShort: ["ܐ","ܒ","ܓ","ܕ","ܗ","ܥ","ܫ"]
+                       },
+                       months: {
+                               names: ["ܟܢܘܢ ܐܚܪܝ","ܫܒܛ","ܐܕܪ","ܢܝܣܢ","ܐܝܪ","ܚܙܝܪܢ","ܬܡܘܙ","ܐܒ","ܐܝܠܘܠ","ܬܫܪܝ ܩܕܝܡ","ܬܫܪܝ ܐܚܪܝ","ܟܢܘܢ ܩܕܝܡ",""],
+                               namesAbbr: ["܏ܟܢ ܏ܒ","ܫܒܛ","ܐܕܪ","ܢܝܣܢ","ܐܝܪ","ܚܙܝܪܢ","ܬܡܘܙ","ܐܒ","ܐܝܠܘܠ","܏ܬܫ ܏ܐ","܏ܬܫ ܏ܒ","܏ܟܢ ܏ܐ",""]
+                       },
+                       AM: ["ܩ.ܛ","ܩ.ܛ","ܩ.ܛ"],
+                       PM: ["ܒ.ܛ","ܒ.ܛ","ܒ.ܛ"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.syr.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.syr.js
new file mode 100644 (file)
index 0000000..74ea704
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture syr
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "syr", "default", {
+       name: "syr",
+       englishName: "Syriac",
+       nativeName: "ܣܘܪܝܝܐ",
+       language: "syr",
+       isRTL: true,
+       numberFormat: {
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ل.س.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["ܚܕ ܒܫܒܐ","ܬܪܝܢ ܒܫܒܐ","ܬܠܬܐ ܒܫܒܐ","ܐܪܒܥܐ ܒܫܒܐ","ܚܡܫܐ ܒܫܒܐ","ܥܪܘܒܬܐ","ܫܒܬܐ"],
+                               namesAbbr: ["܏ܐ ܏ܒܫ","܏ܒ ܏ܒܫ","܏ܓ ܏ܒܫ","܏ܕ ܏ܒܫ","܏ܗ ܏ܒܫ","܏ܥܪܘܒ","܏ܫܒ"],
+                               namesShort: ["ܐ","ܒ","ܓ","ܕ","ܗ","ܥ","ܫ"]
+                       },
+                       months: {
+                               names: ["ܟܢܘܢ ܐܚܪܝ","ܫܒܛ","ܐܕܪ","ܢܝܣܢ","ܐܝܪ","ܚܙܝܪܢ","ܬܡܘܙ","ܐܒ","ܐܝܠܘܠ","ܬܫܪܝ ܩܕܝܡ","ܬܫܪܝ ܐܚܪܝ","ܟܢܘܢ ܩܕܝܡ",""],
+                               namesAbbr: ["܏ܟܢ ܏ܒ","ܫܒܛ","ܐܕܪ","ܢܝܣܢ","ܐܝܪ","ܚܙܝܪܢ","ܬܡܘܙ","ܐܒ","ܐܝܠܘܠ","܏ܬܫ ܏ܐ","܏ܬܫ ܏ܒ","܏ܟܢ ܏ܐ",""]
+                       },
+                       AM: ["ܩ.ܛ","ܩ.ܛ","ܩ.ܛ"],
+                       PM: ["ܒ.ܛ","ܒ.ܛ","ܒ.ܛ"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ta-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ta-IN.js
new file mode 100644 (file)
index 0000000..63b16fe
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Globalize Culture ta-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ta-IN", "default", {
+       name: "ta-IN",
+       englishName: "Tamil (India)",
+       nativeName: "தமிழ் (இந்தியா)",
+       language: "ta",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ரூ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ஞாயிற்றுக்கிழமை","திங்கள்கிழமை","செவ்வாய்கிழமை","புதன்கிழமை","வியாழக்கிழமை","வெள்ளிக்கிழமை","சனிக்கிழமை"],
+                               namesAbbr: ["ஞாயிறு","திங்கள்","செவ்வாய்","புதன்","வியாழன்","வெள்ளி","சனி"],
+                               namesShort: ["ஞா","தி","செ","பு","வி","வெ","ச"]
+                       },
+                       months: {
+                               names: ["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்",""],
+                               namesAbbr: ["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்",""]
+                       },
+                       AM: ["காலை","காலை","காலை"],
+                       PM: ["மாலை","மாலை","மாலை"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ta.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ta.js
new file mode 100644 (file)
index 0000000..e67c57f
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Globalize Culture ta
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ta", "default", {
+       name: "ta",
+       englishName: "Tamil",
+       nativeName: "தமிழ்",
+       language: "ta",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ரூ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ஞாயிற்றுக்கிழமை","திங்கள்கிழமை","செவ்வாய்கிழமை","புதன்கிழமை","வியாழக்கிழமை","வெள்ளிக்கிழமை","சனிக்கிழமை"],
+                               namesAbbr: ["ஞாயிறு","திங்கள்","செவ்வாய்","புதன்","வியாழன்","வெள்ளி","சனி"],
+                               namesShort: ["ஞா","தி","செ","பு","வி","வெ","ச"]
+                       },
+                       months: {
+                               names: ["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்",""],
+                               namesAbbr: ["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்",""]
+                       },
+                       AM: ["காலை","காலை","காலை"],
+                       PM: ["மாலை","மாலை","மாலை"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.te-IN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.te-IN.js
new file mode 100644 (file)
index 0000000..b1b92ee
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture te-IN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "te-IN", "default", {
+       name: "te-IN",
+       englishName: "Telugu (India)",
+       nativeName: "తెలుగు (భారత దేశం)",
+       language: "te",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "రూ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ఆదివారం","సోమవారం","మంగళవారం","బుధవారం","గురువారం","శుక్రవారం","శనివారం"],
+                               namesAbbr: ["ఆది.","సోమ.","మంగళ.","బుధ.","గురు.","శుక్ర.","శని."],
+                               namesShort: ["ఆ","సో","మం","బు","గు","శు","శ"]
+                       },
+                       months: {
+                               names: ["జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జూలై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్",""],
+                               namesAbbr: ["జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జూలై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్",""]
+                       },
+                       AM: ["పూర్వాహ్న","పూర్వాహ్న","పూర్వాహ్న"],
+                       PM: ["అపరాహ్న","అపరాహ్న","అపరాహ్న"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.te.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.te.js
new file mode 100644 (file)
index 0000000..be5becb
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture te
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "te", "default", {
+       name: "te",
+       englishName: "Telugu",
+       nativeName: "తెలుగు",
+       language: "te",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "రూ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ఆదివారం","సోమవారం","మంగళవారం","బుధవారం","గురువారం","శుక్రవారం","శనివారం"],
+                               namesAbbr: ["ఆది.","సోమ.","మంగళ.","బుధ.","గురు.","శుక్ర.","శని."],
+                               namesShort: ["ఆ","సో","మం","బు","గు","శు","శ"]
+                       },
+                       months: {
+                               names: ["జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జూలై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్",""],
+                               namesAbbr: ["జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జూలై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్",""]
+                       },
+                       AM: ["పూర్వాహ్న","పూర్వాహ్న","పూర్వాహ్న"],
+                       PM: ["అపరాహ్న","అపరాహ్న","అపరాహ్న"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tg-Cyrl-TJ.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tg-Cyrl-TJ.js
new file mode 100644 (file)
index 0000000..3f0f3eb
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Globalize Culture tg-Cyrl-TJ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tg-Cyrl-TJ", "default", {
+       name: "tg-Cyrl-TJ",
+       englishName: "Tajik (Cyrillic, Tajikistan)",
+       nativeName: "Тоҷикӣ (Тоҷикистон)",
+       language: "tg-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ";",
+                       symbol: "т.р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       days: {
+                               names: ["Яш","Душанбе","Сешанбе","Чоршанбе","Панҷшанбе","Ҷумъа","Шанбе"],
+                               namesAbbr: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"],
+                               namesShort: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"]
+                       },
+                       months: {
+                               names: ["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["январи","феврали","марти","апрели","маи","июни","июли","августи","сентябри","октябри","ноябри","декабри",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tg-Cyrl.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tg-Cyrl.js
new file mode 100644 (file)
index 0000000..30fa290
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Globalize Culture tg-Cyrl
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tg-Cyrl", "default", {
+       name: "tg-Cyrl",
+       englishName: "Tajik (Cyrillic)",
+       nativeName: "Тоҷикӣ",
+       language: "tg-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ";",
+                       symbol: "т.р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       days: {
+                               names: ["Яш","Душанбе","Сешанбе","Чоршанбе","Панҷшанбе","Ҷумъа","Шанбе"],
+                               namesAbbr: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"],
+                               namesShort: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"]
+                       },
+                       months: {
+                               names: ["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["январи","феврали","марти","апрели","маи","июни","июли","августи","сентябри","октябри","ноябри","декабри",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tg.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tg.js
new file mode 100644 (file)
index 0000000..df4f26b
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Globalize Culture tg
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tg", "default", {
+       name: "tg",
+       englishName: "Tajik",
+       nativeName: "Тоҷикӣ",
+       language: "tg",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ";",
+                       symbol: "т.р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       days: {
+                               names: ["Яш","Душанбе","Сешанбе","Чоршанбе","Панҷшанбе","Ҷумъа","Шанбе"],
+                               namesAbbr: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"],
+                               namesShort: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"]
+                       },
+                       months: {
+                               names: ["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["январи","феврали","марти","апрели","маи","июни","июли","августи","сентябри","октябри","ноябри","декабри",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.th-TH.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.th-TH.js
new file mode 100644 (file)
index 0000000..3ab70ab
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Globalize Culture th-TH
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "th-TH", "default", {
+       name: "th-TH",
+       englishName: "Thai (Thailand)",
+       nativeName: "ไทย (ไทย)",
+       language: "th",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "฿"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "ThaiBuddhist",
+                       firstDay: 1,
+                       days: {
+                               names: ["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],
+                               namesAbbr: ["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],
+                               namesShort: ["อ","จ","อ","พ","พ","ศ","ส"]
+                       },
+                       months: {
+                               names: ["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม",""],
+                               namesAbbr: ["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.",""]
+                       },
+                       eras: [{"name":"พ.ศ.","start":null,"offset":-543}],
+                       twoDigitYearMax: 2572,
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 1,
+                       days: {
+                               names: ["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],
+                               namesAbbr: ["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],
+                               namesShort: ["อ","จ","อ","พ","พ","ศ","ส"]
+                       },
+                       months: {
+                               names: ["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม",""],
+                               namesAbbr: ["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.",""]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "'วัน'dddd'ที่' d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "'วัน'dddd'ที่' d MMMM yyyy H:mm",
+                               F: "'วัน'dddd'ที่' d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.th.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.th.js
new file mode 100644 (file)
index 0000000..1294351
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Globalize Culture th
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "th", "default", {
+       name: "th",
+       englishName: "Thai",
+       nativeName: "ไทย",
+       language: "th",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "฿"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "ThaiBuddhist",
+                       firstDay: 1,
+                       days: {
+                               names: ["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],
+                               namesAbbr: ["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],
+                               namesShort: ["อ","จ","อ","พ","พ","ศ","ส"]
+                       },
+                       months: {
+                               names: ["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม",""],
+                               namesAbbr: ["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.",""]
+                       },
+                       eras: [{"name":"พ.ศ.","start":null,"offset":-543}],
+                       twoDigitYearMax: 2572,
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 1,
+                       days: {
+                               names: ["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],
+                               namesAbbr: ["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],
+                               namesShort: ["อ","จ","อ","พ","พ","ศ","ส"]
+                       },
+                       months: {
+                               names: ["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม",""],
+                               namesAbbr: ["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.",""]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "'วัน'dddd'ที่' d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "'วัน'dddd'ที่' d MMMM yyyy H:mm",
+                               F: "'วัน'dddd'ที่' d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tk-TM.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tk-TM.js
new file mode 100644 (file)
index 0000000..8abafa0
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture tk-TM
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tk-TM", "default", {
+       name: "tk-TM",
+       englishName: "Turkmen (Turkmenistan)",
+       nativeName: "türkmençe (Türkmenistan)",
+       language: "tk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-üznüksizlik",
+               positiveInfinity: "üznüksizlik",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "m."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Duşenbe","Sişenbe","Çarşenbe","Penşenbe","Anna","Şenbe","Ýekşenbe"],
+                               namesAbbr: ["Db","Sb","Çb","Pb","An","Şb","Ýb"],
+                               namesShort: ["D","S","Ç","P","A","Ş","Ý"]
+                       },
+                       months: {
+                               names: ["Ýanwar","Fewral","Mart","Aprel","Maý","lýun","lýul","Awgust","Sentýabr","Oktýabr","Noýabr","Dekabr",""],
+                               namesAbbr: ["Ýan","Few","Mart","Apr","Maý","lýun","lýul","Awg","Sen","Okt","Not","Dek",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "yyyy 'ý.' MMMM d",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'ý.' MMMM d H:mm",
+                               F: "yyyy 'ý.' MMMM d H:mm:ss",
+                               Y: "yyyy 'ý.' MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tk.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tk.js
new file mode 100644 (file)
index 0000000..2727041
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Globalize Culture tk
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tk", "default", {
+       name: "tk",
+       englishName: "Turkmen",
+       nativeName: "türkmençe",
+       language: "tk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-üznüksizlik",
+               positiveInfinity: "üznüksizlik",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "m."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Duşenbe","Sişenbe","Çarşenbe","Penşenbe","Anna","Şenbe","Ýekşenbe"],
+                               namesAbbr: ["Db","Sb","Çb","Pb","An","Şb","Ýb"],
+                               namesShort: ["D","S","Ç","P","A","Ş","Ý"]
+                       },
+                       months: {
+                               names: ["Ýanwar","Fewral","Mart","Aprel","Maý","lýun","lýul","Awgust","Sentýabr","Oktýabr","Noýabr","Dekabr",""],
+                               namesAbbr: ["Ýan","Few","Mart","Apr","Maý","lýun","lýul","Awg","Sen","Okt","Not","Dek",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "yyyy 'ý.' MMMM d",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'ý.' MMMM d H:mm",
+                               F: "yyyy 'ý.' MMMM d H:mm:ss",
+                               Y: "yyyy 'ý.' MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tn-ZA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tn-ZA.js
new file mode 100644 (file)
index 0000000..32c861d
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture tn-ZA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tn-ZA", "default", {
+       name: "tn-ZA",
+       englishName: "Setswana (South Africa)",
+       nativeName: "Setswana (Aforika Borwa)",
+       language: "tn",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Latshipi","Mosupologo","Labobedi","Laboraro","Labone","Labotlhano","Lamatlhatso"],
+                               namesAbbr: ["Ltp.","Mos.","Lbd.","Lbr.","Lbn.","Lbt.","Lmt."],
+                               namesShort: ["Lp","Ms","Lb","Lr","Ln","Lt","Lm"]
+                       },
+                       months: {
+                               names: ["Ferikgong","Tlhakole","Mopitloe","Moranang","Motsheganong","Seetebosigo","Phukwi","Phatwe","Lwetse","Diphalane","Ngwanatsele","Sedimothole",""],
+                               namesAbbr: ["Fer.","Tlhak.","Mop.","Mor.","Motsh.","Seet.","Phukw.","Phatw.","Lwets.","Diph.","Ngwan.","Sed.",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tn.js
new file mode 100644 (file)
index 0000000..e331578
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+ * Globalize Culture tn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tn", "default", {
+       name: "tn",
+       englishName: "Setswana",
+       nativeName: "Setswana",
+       language: "tn",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Latshipi","Mosupologo","Labobedi","Laboraro","Labone","Labotlhano","Lamatlhatso"],
+                               namesAbbr: ["Ltp.","Mos.","Lbd.","Lbr.","Lbn.","Lbt.","Lmt."],
+                               namesShort: ["Lp","Ms","Lb","Lr","Ln","Lt","Lm"]
+                       },
+                       months: {
+                               names: ["Ferikgong","Tlhakole","Mopitloe","Moranang","Motsheganong","Seetebosigo","Phukwi","Phatwe","Lwetse","Diphalane","Ngwanatsele","Sedimothole",""],
+                               namesAbbr: ["Fer.","Tlhak.","Mop.","Mor.","Motsh.","Seet.","Phukw.","Phatw.","Lwets.","Diph.","Ngwan.","Sed.",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tr-TR.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tr-TR.js
new file mode 100644 (file)
index 0000000..0fb93f8
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture tr-TR
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tr-TR", "default", {
+       name: "tr-TR",
+       englishName: "Turkish (Turkey)",
+       nativeName: "Türkçe (Türkiye)",
+       language: "tr",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "TL"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],
+                               namesAbbr: ["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],
+                               namesShort: ["Pz","Pt","Sa","Ça","Pe","Cu","Ct"]
+                       },
+                       months: {
+                               names: ["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık",""],
+                               namesAbbr: ["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dd MMMM yyyy dddd",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy dddd HH:mm",
+                               F: "dd MMMM yyyy dddd HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tr.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tr.js
new file mode 100644 (file)
index 0000000..a2ef8a5
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture tr
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tr", "default", {
+       name: "tr",
+       englishName: "Turkish",
+       nativeName: "Türkçe",
+       language: "tr",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "TL"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],
+                               namesAbbr: ["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],
+                               namesShort: ["Pz","Pt","Sa","Ça","Pe","Cu","Ct"]
+                       },
+                       months: {
+                               names: ["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık",""],
+                               namesAbbr: ["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dd MMMM yyyy dddd",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy dddd HH:mm",
+                               F: "dd MMMM yyyy dddd HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tt-RU.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tt-RU.js
new file mode 100644 (file)
index 0000000..b918faa
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture tt-RU
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tt-RU", "default", {
+       name: "tt-RU",
+       englishName: "Tatar (Russia)",
+       nativeName: "Татар (Россия)",
+       language: "tt",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Якшәмбе","Дүшәмбе","Сишәмбе","Чәршәмбе","Пәнҗешәмбе","Җомга","Шимбә"],
+                               namesAbbr: ["Якш","Дүш","Сиш","Чәрш","Пәнҗ","Җом","Шим"],
+                               namesShort: ["Я","Д","С","Ч","П","Җ","Ш"]
+                       },
+                       months: {
+                               names: ["Гыйнвар","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],
+                               namesAbbr: ["Гыйн.","Фев.","Мар.","Апр.","Май","Июнь","Июль","Авг.","Сен.","Окт.","Нояб.","Дек.",""]
+                       },
+                       monthsGenitive: {
+                               names: ["Гыйнварның","Февральнең","Мартның","Апрельнең","Майның","Июньнең","Июльнең","Августның","Сентябрьның","Октябрьның","Ноябрьның","Декабрьның",""],
+                               namesAbbr: ["Гыйн.-ның","Фев.-нең","Мар.-ның","Апр.-нең","Майның","Июньнең","Июльнең","Авг.-ның","Сен.-ның","Окт.-ның","Нояб.-ның","Дек.-ның",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tt.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tt.js
new file mode 100644 (file)
index 0000000..efefad6
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture tt
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tt", "default", {
+       name: "tt",
+       englishName: "Tatar",
+       nativeName: "Татар",
+       language: "tt",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Якшәмбе","Дүшәмбе","Сишәмбе","Чәршәмбе","Пәнҗешәмбе","Җомга","Шимбә"],
+                               namesAbbr: ["Якш","Дүш","Сиш","Чәрш","Пәнҗ","Җом","Шим"],
+                               namesShort: ["Я","Д","С","Ч","П","Җ","Ш"]
+                       },
+                       months: {
+                               names: ["Гыйнвар","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],
+                               namesAbbr: ["Гыйн.","Фев.","Мар.","Апр.","Май","Июнь","Июль","Авг.","Сен.","Окт.","Нояб.","Дек.",""]
+                       },
+                       monthsGenitive: {
+                               names: ["Гыйнварның","Февральнең","Мартның","Апрельнең","Майның","Июньнең","Июльнең","Августның","Сентябрьның","Октябрьның","Ноябрьның","Декабрьның",""],
+                               namesAbbr: ["Гыйн.-ның","Фев.-нең","Мар.-ның","Апр.-нең","Майның","Июньнең","Июльнең","Авг.-ның","Сен.-ның","Окт.-ның","Нояб.-ның","Дек.-ның",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tzm-Latn-DZ.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tzm-Latn-DZ.js
new file mode 100644 (file)
index 0000000..a05ff0a
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture tzm-Latn-DZ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tzm-Latn-DZ", "default", {
+       name: "tzm-Latn-DZ",
+       englishName: "Tamazight (Latin, Algeria)",
+       nativeName: "Tamazight (Djazaïr)",
+       language: "tzm-Latn",
+       numberFormat: {
+               pattern: ["n-"],
+               ",": ".",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       symbol: "DZD"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 6,
+                       days: {
+                               names: ["Acer","Arime","Aram","Ahad","Amhadh","Sem","Sedh"],
+                               namesAbbr: ["Ace","Ari","Ara","Aha","Amh","Sem","Sed"],
+                               namesShort: ["Ac","Ar","Ar","Ah","Am","Se","Se"]
+                       },
+                       months: {
+                               names: ["Yenayer","Furar","Maghres","Yebrir","Mayu","Yunyu","Yulyu","Ghuct","Cutenber","Ktuber","Wambir","Dujanbir",""],
+                               namesAbbr: ["Yen","Fur","Mag","Yeb","May","Yun","Yul","Ghu","Cut","Ktu","Wam","Duj",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM, yyyy H:mm",
+                               F: "dd MMMM, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tzm-Latn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tzm-Latn.js
new file mode 100644 (file)
index 0000000..6e30aa6
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture tzm-Latn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tzm-Latn", "default", {
+       name: "tzm-Latn",
+       englishName: "Tamazight (Latin)",
+       nativeName: "Tamazight",
+       language: "tzm-Latn",
+       numberFormat: {
+               pattern: ["n-"],
+               ",": ".",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       symbol: "DZD"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 6,
+                       days: {
+                               names: ["Acer","Arime","Aram","Ahad","Amhadh","Sem","Sedh"],
+                               namesAbbr: ["Ace","Ari","Ara","Aha","Amh","Sem","Sed"],
+                               namesShort: ["Ac","Ar","Ar","Ah","Am","Se","Se"]
+                       },
+                       months: {
+                               names: ["Yenayer","Furar","Maghres","Yebrir","Mayu","Yunyu","Yulyu","Ghuct","Cutenber","Ktuber","Wambir","Dujanbir",""],
+                               namesAbbr: ["Yen","Fur","Mag","Yeb","May","Yun","Yul","Ghu","Cut","Ktu","Wam","Duj",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM, yyyy H:mm",
+                               F: "dd MMMM, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tzm.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.tzm.js
new file mode 100644 (file)
index 0000000..176f0c9
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture tzm
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "tzm", "default", {
+       name: "tzm",
+       englishName: "Tamazight",
+       nativeName: "Tamazight",
+       language: "tzm",
+       numberFormat: {
+               pattern: ["n-"],
+               ",": ".",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       symbol: "DZD"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 6,
+                       days: {
+                               names: ["Acer","Arime","Aram","Ahad","Amhadh","Sem","Sedh"],
+                               namesAbbr: ["Ace","Ari","Ara","Aha","Amh","Sem","Sed"],
+                               namesShort: ["Ac","Ar","Ar","Ah","Am","Se","Se"]
+                       },
+                       months: {
+                               names: ["Yenayer","Furar","Maghres","Yebrir","Mayu","Yunyu","Yulyu","Ghuct","Cutenber","Ktuber","Wambir","Dujanbir",""],
+                               namesAbbr: ["Yen","Fur","Mag","Yeb","May","Yun","Yul","Ghu","Cut","Ktu","Wam","Duj",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM, yyyy H:mm",
+                               F: "dd MMMM, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ug-CN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ug-CN.js
new file mode 100644 (file)
index 0000000..dcfd852
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Globalize Culture ug-CN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ug-CN", "default", {
+       name: "ug-CN",
+       englishName: "Uyghur (PRC)",
+       nativeName: "ئۇيغۇرچە (جۇڭخۇا خەلق جۇمھۇرىيىتى)",
+       language: "ug",
+       isRTL: true,
+       numberFormat: {
+               NaN: "سان ئەمەس",
+               negativeInfinity: "مەنپىي چەكسىزلىك",
+               positiveInfinity: "مۇسبەت چەكسىزلىك",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"],
+                               namesAbbr: ["يە","دۈ","سە","چا","پە","جۈ","شە"],
+                               namesShort: ["ي","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""],
+                               namesAbbr: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""]
+                       },
+                       AM: ["چۈشتىن بۇرۇن","چۈشتىن بۇرۇن","چۈشتىن بۇرۇن"],
+                       PM: ["چۈشتىن كېيىن","چۈشتىن كېيىن","چۈشتىن كېيىن"],
+                       eras: [{"name":"مىلادى","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-M-d",
+                               D: "yyyy-'يىلى' MMMM d-'كۈنى،'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm",
+                               F: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm:ss",
+                               M: "MMMM d'-كۈنى'",
+                               Y: "yyyy-'يىلى' MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ug.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ug.js
new file mode 100644 (file)
index 0000000..5ea5a5a
--- /dev/null
@@ -0,0 +1,75 @@
+/*
+ * Globalize Culture ug
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ug", "default", {
+       name: "ug",
+       englishName: "Uyghur",
+       nativeName: "ئۇيغۇرچە",
+       language: "ug",
+       isRTL: true,
+       numberFormat: {
+               NaN: "سان ئەمەس",
+               negativeInfinity: "مەنپىي چەكسىزلىك",
+               positiveInfinity: "مۇسبەت چەكسىزلىك",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"],
+                               namesAbbr: ["يە","دۈ","سە","چا","پە","جۈ","شە"],
+                               namesShort: ["ي","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""],
+                               namesAbbr: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""]
+                       },
+                       AM: ["چۈشتىن بۇرۇن","چۈشتىن بۇرۇن","چۈشتىن بۇرۇن"],
+                       PM: ["چۈشتىن كېيىن","چۈشتىن كېيىن","چۈشتىن كېيىن"],
+                       eras: [{"name":"مىلادى","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-M-d",
+                               D: "yyyy-'يىلى' MMMM d-'كۈنى،'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm",
+                               F: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm:ss",
+                               M: "MMMM d'-كۈنى'",
+                               Y: "yyyy-'يىلى' MMMM"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uk-UA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uk-UA.js
new file mode 100644 (file)
index 0000000..ffd012a
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Globalize Culture uk-UA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "uk-UA", "default", {
+       name: "uk-UA",
+       englishName: "Ukrainian (Ukraine)",
+       nativeName: "українська (Україна)",
+       language: "uk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-безмежність",
+               positiveInfinity: "безмежність",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "₴"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["неділя","понеділок","вівторок","середа","четвер","п'ятниця","субота"],
+                               namesAbbr: ["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],
+                               namesShort: ["Нд","Пн","Вт","Ср","Чт","Пт","Сб"]
+                       },
+                       months: {
+                               names: ["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень",""],
+                               namesAbbr: ["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру",""]
+                       },
+                       monthsGenitive: {
+                               names: ["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня",""],
+                               namesAbbr: ["січ","лют","бер","кві","тра","чер","лип","сер","вер","жов","лис","гру",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy' р.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy' р.' H:mm",
+                               F: "d MMMM yyyy' р.' H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy' р.'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uk.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uk.js
new file mode 100644 (file)
index 0000000..3aba558
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Globalize Culture uk
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "uk", "default", {
+       name: "uk",
+       englishName: "Ukrainian",
+       nativeName: "українська",
+       language: "uk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-безмежність",
+               positiveInfinity: "безмежність",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "₴"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["неділя","понеділок","вівторок","середа","четвер","п'ятниця","субота"],
+                               namesAbbr: ["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],
+                               namesShort: ["Нд","Пн","Вт","Ср","Чт","Пт","Сб"]
+                       },
+                       months: {
+                               names: ["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень",""],
+                               namesAbbr: ["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру",""]
+                       },
+                       monthsGenitive: {
+                               names: ["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня",""],
+                               namesAbbr: ["січ","лют","бер","кві","тра","чер","лип","сер","вер","жов","лис","гру",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy' р.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy' р.' H:mm",
+                               F: "d MMMM yyyy' р.' H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy' р.'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ur-PK.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ur-PK.js
new file mode 100644 (file)
index 0000000..befd62f
--- /dev/null
@@ -0,0 +1,157 @@
+/*
+ * Globalize Culture ur-PK
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ur-PK", "default", {
+       name: "ur-PK",
+       englishName: "Urdu (Islamic Republic of Pakistan)",
+       nativeName: "اُردو (پاکستان)",
+       language: "ur",
+       isRTL: true,
+       numberFormat: {
+               currency: {
+                       pattern: ["$n-","$n"],
+                       symbol: "Rs"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","هفته"],
+                               namesAbbr: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","هفته"],
+                               namesShort: ["ا","پ","م","ب","ج","ج","ه"]
+                       },
+                       months: {
+                               names: ["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""],
+                               namesAbbr: ["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""]
+                       },
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               f: "dd MMMM, yyyy h:mm tt",
+                               F: "dd MMMM, yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               f: "dd/MM/yyyy h:mm tt",
+                               F: "dd/MM/yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ur.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.ur.js
new file mode 100644 (file)
index 0000000..ce12613
--- /dev/null
@@ -0,0 +1,157 @@
+/*
+ * Globalize Culture ur
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ur", "default", {
+       name: "ur",
+       englishName: "Urdu",
+       nativeName: "اُردو",
+       language: "ur",
+       isRTL: true,
+       numberFormat: {
+               currency: {
+                       pattern: ["$n-","$n"],
+                       symbol: "Rs"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","هفته"],
+                               namesAbbr: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","هفته"],
+                               namesShort: ["ا","پ","م","ب","ج","ج","ه"]
+                       },
+                       months: {
+                               names: ["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""],
+                               namesAbbr: ["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""]
+                       },
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               f: "dd MMMM, yyyy h:mm tt",
+                               F: "dd MMMM, yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               f: "dd/MM/yyyy h:mm tt",
+                               F: "dd/MM/yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz-Cyrl-UZ.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz-Cyrl-UZ.js
new file mode 100644 (file)
index 0000000..69bd196
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture uz-Cyrl-UZ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "uz-Cyrl-UZ", "default", {
+       name: "uz-Cyrl-UZ",
+       englishName: "Uzbek (Cyrillic, Uzbekistan)",
+       nativeName: "Ўзбек (Ўзбекистон)",
+       language: "uz-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "сўм"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["якшанба","душанба","сешанба","чоршанба","пайшанба","жума","шанба"],
+                               namesAbbr: ["якш","дш","сш","чш","пш","ж","ш"],
+                               namesShort: ["я","д","с","ч","п","ж","ш"]
+                       },
+                       months: {
+                               names: ["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["январ","феврал","март","апрел","май","июн","июл","август","сентябр","октябр","ноябр","декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","мая","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "yyyy 'йил' d-MMMM",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'йил' d-MMMM HH:mm",
+                               F: "yyyy 'йил' d-MMMM HH:mm:ss",
+                               M: "d-MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz-Cyrl.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz-Cyrl.js
new file mode 100644 (file)
index 0000000..90d5f45
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Globalize Culture uz-Cyrl
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "uz-Cyrl", "default", {
+       name: "uz-Cyrl",
+       englishName: "Uzbek (Cyrillic)",
+       nativeName: "Ўзбек",
+       language: "uz-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "сўм"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["якшанба","душанба","сешанба","чоршанба","пайшанба","жума","шанба"],
+                               namesAbbr: ["якш","дш","сш","чш","пш","ж","ш"],
+                               namesShort: ["я","д","с","ч","п","ж","ш"]
+                       },
+                       months: {
+                               names: ["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["январ","феврал","март","апрел","май","июн","июл","август","сентябр","октябр","ноябр","декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","мая","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "yyyy 'йил' d-MMMM",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'йил' d-MMMM HH:mm",
+                               F: "yyyy 'йил' d-MMMM HH:mm:ss",
+                               M: "d-MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz-Latn-UZ.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz-Latn-UZ.js
new file mode 100644 (file)
index 0000000..b4b1ea4
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture uz-Latn-UZ
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "uz-Latn-UZ", "default", {
+       name: "uz-Latn-UZ",
+       englishName: "Uzbek (Latin, Uzbekistan)",
+       nativeName: "U'zbek (U'zbekiston Respublikasi)",
+       language: "uz-Latn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       decimals: 0,
+                       ",": " ",
+                       ".": ",",
+                       symbol: "so'm"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"],
+                               namesAbbr: ["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."],
+                               namesShort: ["ya","d","s","ch","p","j","sh"]
+                       },
+                       months: {
+                               names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""],
+                               namesAbbr: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM yyyy",
+                               D: "yyyy 'yil' d-MMMM",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'yil' d-MMMM HH:mm",
+                               F: "yyyy 'yil' d-MMMM HH:mm:ss",
+                               M: "d-MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz-Latn.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz-Latn.js
new file mode 100644 (file)
index 0000000..95a717e
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture uz-Latn
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "uz-Latn", "default", {
+       name: "uz-Latn",
+       englishName: "Uzbek (Latin)",
+       nativeName: "U'zbek",
+       language: "uz-Latn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       decimals: 0,
+                       ",": " ",
+                       ".": ",",
+                       symbol: "so'm"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"],
+                               namesAbbr: ["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."],
+                               namesShort: ["ya","d","s","ch","p","j","sh"]
+                       },
+                       months: {
+                               names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""],
+                               namesAbbr: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM yyyy",
+                               D: "yyyy 'yil' d-MMMM",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'yil' d-MMMM HH:mm",
+                               F: "yyyy 'yil' d-MMMM HH:mm:ss",
+                               M: "d-MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.uz.js
new file mode 100644 (file)
index 0000000..50bf9ce
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Globalize Culture uz
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "uz", "default", {
+       name: "uz",
+       englishName: "Uzbek",
+       nativeName: "U'zbek",
+       language: "uz",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       decimals: 0,
+                       ",": " ",
+                       ".": ",",
+                       symbol: "so'm"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"],
+                               namesAbbr: ["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."],
+                               namesShort: ["ya","d","s","ch","p","j","sh"]
+                       },
+                       months: {
+                               names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""],
+                               namesAbbr: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM yyyy",
+                               D: "yyyy 'yil' d-MMMM",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'yil' d-MMMM HH:mm",
+                               F: "yyyy 'yil' d-MMMM HH:mm:ss",
+                               M: "d-MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.vi-VN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.vi-VN.js
new file mode 100644 (file)
index 0000000..bc28d7a
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Globalize Culture vi-VN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "vi-VN", "default", {
+       name: "vi-VN",
+       englishName: "Vietnamese (Vietnam)",
+       nativeName: "Tiếng Việt (Việt Nam)",
+       language: "vi",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "₫"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"],
+                               namesAbbr: ["CN","Hai","Ba","Tư","Năm","Sáu","Bảy"],
+                               namesShort: ["C","H","B","T","N","S","B"]
+                       },
+                       months: {
+                               names: ["Tháng Giêng","Tháng Hai","Tháng Ba","Tháng Tư","Tháng Năm","Tháng Sáu","Tháng Bảy","Tháng Tám","Tháng Chín","Tháng Mười","Tháng Mười Một","Tháng Mười Hai",""],
+                               namesAbbr: ["Thg1","Thg2","Thg3","Thg4","Thg5","Thg6","Thg7","Thg8","Thg9","Thg10","Thg11","Thg12",""]
+                       },
+                       AM: ["SA","sa","SA"],
+                       PM: ["CH","ch","CH"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               f: "dd MMMM yyyy h:mm tt",
+                               F: "dd MMMM yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.vi.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.vi.js
new file mode 100644 (file)
index 0000000..d0cec0b
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Globalize Culture vi
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "vi", "default", {
+       name: "vi",
+       englishName: "Vietnamese",
+       nativeName: "Tiếng Việt",
+       language: "vi",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "₫"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"],
+                               namesAbbr: ["CN","Hai","Ba","Tư","Năm","Sáu","Bảy"],
+                               namesShort: ["C","H","B","T","N","S","B"]
+                       },
+                       months: {
+                               names: ["Tháng Giêng","Tháng Hai","Tháng Ba","Tháng Tư","Tháng Năm","Tháng Sáu","Tháng Bảy","Tháng Tám","Tháng Chín","Tháng Mười","Tháng Mười Một","Tháng Mười Hai",""],
+                               namesAbbr: ["Thg1","Thg2","Thg3","Thg4","Thg5","Thg6","Thg7","Thg8","Thg9","Thg10","Thg11","Thg12",""]
+                       },
+                       AM: ["SA","sa","SA"],
+                       PM: ["CH","ch","CH"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               f: "dd MMMM yyyy h:mm tt",
+                               F: "dd MMMM yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.wo-SN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.wo-SN.js
new file mode 100644 (file)
index 0000000..e2def20
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture wo-SN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "wo-SN", "default", {
+       name: "wo-SN",
+       englishName: "Wolof (Senegal)",
+       nativeName: "Wolof (Sénégal)",
+       language: "wo",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "XOF"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.wo.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.wo.js
new file mode 100644 (file)
index 0000000..f2d4edb
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Globalize Culture wo
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "wo", "default", {
+       name: "wo",
+       englishName: "Wolof",
+       nativeName: "Wolof",
+       language: "wo",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "XOF"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.xh-ZA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.xh-ZA.js
new file mode 100644 (file)
index 0000000..4101be6
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Globalize Culture xh-ZA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "xh-ZA", "default", {
+       name: "xh-ZA",
+       englishName: "isiXhosa (South Africa)",
+       nativeName: "isiXhosa (uMzantsi Afrika)",
+       language: "xh",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["iCawa","uMvulo","uLwesibini","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"],
+                               namesShort: ["Ca","Mv","Lb","Lt","Ln","Lh","Mg"]
+                       },
+                       months: {
+                               names: ["Mqungu","Mdumba","Kwindla","Tshazimpuzi","Canzibe","Silimela","Khala","Thupha","Msintsi","Dwarha","Nkanga","Mnga",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.xh.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.xh.js
new file mode 100644 (file)
index 0000000..8325e61
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ * Globalize Culture xh
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "xh", "default", {
+       name: "xh",
+       englishName: "isiXhosa",
+       nativeName: "isiXhosa",
+       language: "xh",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["iCawa","uMvulo","uLwesibini","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"],
+                               namesShort: ["Ca","Mv","Lb","Lt","Ln","Lh","Mg"]
+                       },
+                       months: {
+                               names: ["Mqungu","Mdumba","Kwindla","Tshazimpuzi","Canzibe","Silimela","Khala","Thupha","Msintsi","Dwarha","Nkanga","Mnga",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.yo-NG.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.yo-NG.js
new file mode 100644 (file)
index 0000000..39af5b8
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Globalize Culture yo-NG
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "yo-NG", "default", {
+       name: "yo-NG",
+       englishName: "Yoruba (Nigeria)",
+       nativeName: "Yoruba (Nigeria)",
+       language: "yo",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"],
+                               namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"],
+                               namesShort: ["A","A","I","O","O","E","A"]
+                       },
+                       months: {
+                               names: ["Osu kinni","Osu keji","Osu keta","Osu kerin","Osu karun","Osu kefa","Osu keje","Osu kejo","Osu kesan","Osu kewa","Osu kokanla","Osu keresi",""],
+                               namesAbbr: ["kin.","kej.","ket.","ker.","kar.","kef.","kej.","kej.","kes.","kew.","kok.","ker.",""]
+                       },
+                       AM: ["Owuro","owuro","OWURO"],
+                       PM: ["Ale","ale","ALE"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.yo.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.yo.js
new file mode 100644 (file)
index 0000000..b5e24cd
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Globalize Culture yo
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "yo", "default", {
+       name: "yo",
+       englishName: "Yoruba",
+       nativeName: "Yoruba",
+       language: "yo",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"],
+                               namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"],
+                               namesShort: ["A","A","I","O","O","E","A"]
+                       },
+                       months: {
+                               names: ["Osu kinni","Osu keji","Osu keta","Osu kerin","Osu karun","Osu kefa","Osu keje","Osu kejo","Osu kesan","Osu kewa","Osu kokanla","Osu keresi",""],
+                               namesAbbr: ["kin.","kej.","ket.","ker.","kar.","kef.","kej.","kej.","kes.","kew.","kok.","ker.",""]
+                       },
+                       AM: ["Owuro","owuro","OWURO"],
+                       PM: ["Ale","ale","ALE"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-CHS.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-CHS.js
new file mode 100644 (file)
index 0000000..c843bc8
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Globalize Culture zh-CHS
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "zh-CHS", "default", {
+       name: "zh-CHS",
+       englishName: "Chinese (Simplified) Legacy",
+       nativeName: "中文(简体) 旧版",
+       language: "zh-CHS",
+       numberFormat: {
+               NaN: "非数字",
+               negativeInfinity: "负无穷大",
+               positiveInfinity: "正无穷大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["周日","周一","周二","周三","周四","周五","周六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-CHT.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-CHT.js
new file mode 100644 (file)
index 0000000..7ca37c9
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture zh-CHT
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "zh-CHT", "default", {
+       name: "zh-CHT",
+       englishName: "Chinese (Traditional) Legacy",
+       nativeName: "中文(繁體) 舊版",
+       language: "zh-CHT",
+       numberFormat: {
+               NaN: "非數字",
+               negativeInfinity: "負無窮大",
+               positiveInfinity: "正無窮大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       symbol: "HK$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["週日","週一","週二","週三","週四","週五","週六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-CN.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-CN.js
new file mode 100644 (file)
index 0000000..41e6294
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Globalize Culture zh-CN
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "zh-CN", "default", {
+       name: "zh-CN",
+       englishName: "Chinese (Simplified, PRC)",
+       nativeName: "中文(中华人民共和国)",
+       language: "zh-CHS",
+       numberFormat: {
+               NaN: "非数字",
+               negativeInfinity: "负无穷大",
+               positiveInfinity: "正无穷大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["周日","周一","周二","周三","周四","周五","周六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-HK.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-HK.js
new file mode 100644 (file)
index 0000000..dd769ca
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture zh-HK
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "zh-HK", "default", {
+       name: "zh-HK",
+       englishName: "Chinese (Traditional, Hong Kong S.A.R.)",
+       nativeName: "中文(香港特別行政區)",
+       language: "zh-CHT",
+       numberFormat: {
+               NaN: "非數字",
+               negativeInfinity: "負無窮大",
+               positiveInfinity: "正無窮大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       symbol: "HK$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["週日","週一","週二","週三","週四","週五","週六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-Hans.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-Hans.js
new file mode 100644 (file)
index 0000000..8569374
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Globalize Culture zh-Hans
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "zh-Hans", "default", {
+       name: "zh-Hans",
+       englishName: "Chinese (Simplified)",
+       nativeName: "中文(简体)",
+       language: "zh-Hans",
+       numberFormat: {
+               NaN: "非数字",
+               negativeInfinity: "负无穷大",
+               positiveInfinity: "正无穷大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["周日","周一","周二","周三","周四","周五","周六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-Hant.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-Hant.js
new file mode 100644 (file)
index 0000000..44ba865
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture zh-Hant
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "zh-Hant", "default", {
+       name: "zh-Hant",
+       englishName: "Chinese (Traditional)",
+       nativeName: "中文(繁體)",
+       language: "zh-Hant",
+       numberFormat: {
+               NaN: "非數字",
+               negativeInfinity: "負無窮大",
+               positiveInfinity: "正無窮大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       symbol: "HK$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["週日","週一","週二","週三","週四","週五","週六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-MO.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-MO.js
new file mode 100644 (file)
index 0000000..e09274f
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Globalize Culture zh-MO
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "zh-MO", "default", {
+       name: "zh-MO",
+       englishName: "Chinese (Traditional, Macao S.A.R.)",
+       nativeName: "中文(澳門特別行政區)",
+       language: "zh-CHT",
+       numberFormat: {
+               NaN: "非數字",
+               negativeInfinity: "負無窮大",
+               positiveInfinity: "正無窮大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       symbol: "MOP"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["週日","週一","週二","週三","週四","週五","週六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-SG.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-SG.js
new file mode 100644 (file)
index 0000000..8e99e6d
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Globalize Culture zh-SG
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "zh-SG", "default", {
+       name: "zh-SG",
+       englishName: "Chinese (Simplified, Singapore)",
+       nativeName: "中文(新加坡)",
+       language: "zh-CHS",
+       numberFormat: {
+               percent: {
+                       pattern: ["-n%","n%"]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["周日","周一","周二","周三","周四","周五","周六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "yyyy'年'M'月'd'日' tt h:mm",
+                               F: "yyyy'年'M'月'd'日' tt h:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-TW.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh-TW.js
new file mode 100644 (file)
index 0000000..22eea14
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+ * Globalize Culture zh-TW
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "zh-TW", "default", {
+       name: "zh-TW",
+       englishName: "Chinese (Traditional, Taiwan)",
+       nativeName: "中文(台灣)",
+       language: "zh-CHT",
+       numberFormat: {
+               NaN: "不是一個數字",
+               negativeInfinity: "負無窮大",
+               positiveInfinity: "正無窮大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "NT$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["週日","週一","週二","週三","週四","週五","週六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"西元","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "tt hh:mm",
+                               T: "tt hh:mm:ss",
+                               f: "yyyy'年'M'月'd'日' tt hh:mm",
+                               F: "yyyy'年'M'月'd'日' tt hh:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               },
+               Taiwan: {
+                       name: "Taiwan",
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["週日","週一","週二","週三","週四","週五","週六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"","start":null,"offset":1911}],
+                       twoDigitYearMax: 99,
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "tt hh:mm",
+                               T: "tt hh:mm:ss",
+                               f: "yyyy'年'M'月'd'日' tt hh:mm",
+                               F: "yyyy'年'M'月'd'日' tt hh:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zh.js
new file mode 100644 (file)
index 0000000..2bab388
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Globalize Culture zh
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "zh", "default", {
+       name: "zh",
+       englishName: "Chinese",
+       nativeName: "中文",
+       language: "zh",
+       numberFormat: {
+               NaN: "非数字",
+               negativeInfinity: "负无穷大",
+               positiveInfinity: "正无穷大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["周日","周一","周二","周三","周四","周五","周六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zu-ZA.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zu-ZA.js
new file mode 100644 (file)
index 0000000..348cda6
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Globalize Culture zu-ZA
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "zu-ZA", "default", {
+       name: "zu-ZA",
+       englishName: "isiZulu (South Africa)",
+       nativeName: "isiZulu (iNingizimu Afrika)",
+       language: "zu",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["iSonto","uMsombuluko","uLwesibili","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"],
+                               namesAbbr: ["Son.","Mso.","Bi.","Tha.","Ne.","Hla.","Mgq."]
+                       },
+                       months: {
+                               names: ["uMasingana","uNhlolanja","uNdasa","uMbaso","uNhlaba","uNhlangulana","uNtulikazi","uNcwaba","uMandulo","uMfumfu","uLwezi","uZibandlela",""],
+                               namesAbbr: ["Mas.","Nhlo.","Nda.","Mba.","Nhla.","Nhlang.","Ntu.","Ncwa.","Man.","Mfu.","Lwe.","Zib.",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zu.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.culture.zu.js
new file mode 100644 (file)
index 0000000..78873a5
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Globalize Culture zu
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "zu", "default", {
+       name: "zu",
+       englishName: "isiZulu",
+       nativeName: "isiZulu",
+       language: "zu",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["iSonto","uMsombuluko","uLwesibili","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"],
+                               namesAbbr: ["Son.","Mso.","Bi.","Tha.","Ne.","Hla.","Mgq."]
+                       },
+                       months: {
+                               names: ["uMasingana","uNhlolanja","uNdasa","uMbaso","uNhlaba","uNhlangulana","uNtulikazi","uNcwaba","uMandulo","uMfumfu","uLwezi","uZibandlela",""],
+                               namesAbbr: ["Mas.","Nhlo.","Nda.","Mba.","Nhla.","Nhlang.","Ntu.","Ncwa.","Man.","Mfu.","Lwe.","Zib.",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+}( this ));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.cultures.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/cultures/globalize.cultures.js
new file mode 100644 (file)
index 0000000..cf30659
--- /dev/null
@@ -0,0 +1,24063 @@
+/*
+ * Globalize Cultures
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * This file was generated by the Globalize Culture Generator
+ * Translation: bugs found in this file need to be fixed in the generator
+ */
+
+(function( window, undefined ) {
+
+var Globalize;
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       Globalize = require( "globalize" );
+} else {
+       // Global variable
+       Globalize = window.Globalize;
+}
+
+Globalize.addCultureInfo( "ar", "default", {
+       name: "ar",
+       englishName: "Arabic",
+       nativeName: "العربية",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ر.س.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "bg", "default", {
+       name: "bg",
+       englishName: "Bulgarian",
+       nativeName: "български",
+       language: "bg",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "- безкрайност",
+               positiveInfinity: "+ безкрайност",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "лв."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"],
+                               namesAbbr: ["нед","пон","вт","ср","четв","пет","съб"],
+                               namesShort: ["н","п","в","с","ч","п","с"]
+                       },
+                       months: {
+                               names: ["януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември",""],
+                               namesAbbr: ["ян","февр","март","апр","май","юни","юли","авг","септ","окт","ноември","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"след новата ера","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy 'г.'",
+                               D: "dd MMMM yyyy 'г.'",
+                               t: "HH:mm 'ч.'",
+                               T: "HH:mm:ss 'ч.'",
+                               f: "dd MMMM yyyy 'г.' HH:mm 'ч.'",
+                               F: "dd MMMM yyyy 'г.' HH:mm:ss 'ч.'",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy 'г.'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ca", "default", {
+       name: "ca",
+       englishName: "Catalan",
+       nativeName: "català",
+       language: "ca",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinit",
+               positiveInfinity: "Infinit",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],
+                               namesAbbr: ["dg.","dl.","dt.","dc.","dj.","dv.","ds."],
+                               namesShort: ["dg","dl","dt","dc","dj","dv","ds"]
+                       },
+                       months: {
+                               names: ["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""],
+                               namesAbbr: ["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d' / 'MMMM' / 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' / 'MMMM' / 'yyyy HH:mm",
+                               F: "dddd, d' / 'MMMM' / 'yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' / 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "zh-Hans", "default", {
+       name: "zh-Hans",
+       englishName: "Chinese (Simplified)",
+       nativeName: "中文(简体)",
+       language: "zh-Hans",
+       numberFormat: {
+               NaN: "非数字",
+               negativeInfinity: "负无穷大",
+               positiveInfinity: "正无穷大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["周日","周一","周二","周三","周四","周五","周六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "cs", "default", {
+       name: "cs",
+       englishName: "Czech",
+       nativeName: "čeština",
+       language: "cs",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Není číslo",
+               negativeInfinity: "-nekonečno",
+               positiveInfinity: "+nekonečno",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Kč"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],
+                               namesAbbr: ["ne","po","út","st","čt","pá","so"],
+                               namesShort: ["ne","po","út","st","čt","pá","so"]
+                       },
+                       months: {
+                               names: ["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["dop.","dop.","DOP."],
+                       PM: ["odp.","odp.","ODP."],
+                       eras: [{"name":"n. l.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "da", "default", {
+       name: "da",
+       englishName: "Danish",
+       nativeName: "dansk",
+       language: "da",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],
+                               namesAbbr: ["sø","ma","ti","on","to","fr","lø"],
+                               namesShort: ["sø","ma","ti","on","to","fr","lø"]
+                       },
+                       months: {
+                               names: ["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "de", "default", {
+       name: "de",
+       englishName: "German",
+       nativeName: "Deutsch",
+       language: "de",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "n. def.",
+               negativeInfinity: "-unendlich",
+               positiveInfinity: "+unendlich",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+                               namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+                               namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d. MMMM yyyy HH:mm",
+                               F: "dddd, d. MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "el", "default", {
+       name: "el",
+       englishName: "Greek",
+       nativeName: "Ελληνικά",
+       language: "el",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "μη αριθμός",
+               negativeInfinity: "-Άπειρο",
+               positiveInfinity: "Άπειρο",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],
+                               namesAbbr: ["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],
+                               namesShort: ["Κυ","Δε","Τρ","Τε","Πε","Πα","Σά"]
+                       },
+                       months: {
+                               names: ["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος",""],
+                               namesAbbr: ["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ",""]
+                       },
+                       monthsGenitive: {
+                               names: ["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου",""],
+                               namesAbbr: ["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ",""]
+                       },
+                       AM: ["πμ","πμ","ΠΜ"],
+                       PM: ["μμ","μμ","ΜΜ"],
+                       eras: [{"name":"μ.Χ.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd, d MMMM yyyy",
+                               f: "dddd, d MMMM yyyy h:mm tt",
+                               F: "dddd, d MMMM yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es", "default", {
+       name: "es",
+       englishName: "Spanish",
+       nativeName: "español",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fi", "default", {
+       name: "fi",
+       englishName: "Finnish",
+       nativeName: "suomi",
+       language: "fi",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],
+                               namesAbbr: ["su","ma","ti","ke","to","pe","la"],
+                               namesShort: ["su","ma","ti","ke","to","pe","la"]
+                       },
+                       months: {
+                               names: ["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""],
+                               namesAbbr: ["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM'ta 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM'ta 'yyyy H:mm",
+                               F: "d. MMMM'ta 'yyyy H:mm:ss",
+                               M: "d. MMMM'ta'",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fr", "default", {
+       name: "fr",
+       englishName: "French",
+       nativeName: "français",
+       language: "fr",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "he", "default", {
+       name: "he",
+       englishName: "Hebrew",
+       nativeName: "עברית",
+       language: "he",
+       isRTL: true,
+       numberFormat: {
+               NaN: "לא מספר",
+               negativeInfinity: "אינסוף שלילי",
+               positiveInfinity: "אינסוף חיובי",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "₪"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"],
+                               namesAbbr: ["יום א","יום ב","יום ג","יום ד","יום ה","יום ו","שבת"],
+                               namesShort: ["א","ב","ג","ד","ה","ו","ש"]
+                       },
+                       months: {
+                               names: ["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר",""],
+                               namesAbbr: ["ינו","פבר","מרץ","אפר","מאי","יונ","יול","אוג","ספט","אוק","נוב","דצמ",""]
+                       },
+                       eras: [{"name":"לספירה","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd dd MMMM yyyy HH:mm",
+                               F: "dddd dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               },
+               Hebrew: {
+                       name: "Hebrew",
+                       "/": " ",
+                       days: {
+                               names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"],
+                               namesAbbr: ["א","ב","ג","ד","ה","ו","ש"],
+                               namesShort: ["א","ב","ג","ד","ה","ו","ש"]
+                       },
+                       months: {
+                               names: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"],
+                               namesAbbr: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"]
+                       },
+                       eras: [{"name":"C.E.","start":null,"offset":0}],
+                       twoDigitYearMax: 5790,
+                       patterns: {
+                               d: "dd MMMM yyyy",
+                               D: "dddd dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd dd MMMM yyyy HH:mm",
+                               F: "dddd dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "hu", "default", {
+       name: "hu",
+       englishName: "Hungarian",
+       nativeName: "magyar",
+       language: "hu",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "nem szám",
+               negativeInfinity: "negatív végtelen",
+               positiveInfinity: "végtelen",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Ft"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],
+                               namesAbbr: ["V","H","K","Sze","Cs","P","Szo"],
+                               namesShort: ["V","H","K","Sze","Cs","P","Szo"]
+                       },
+                       months: {
+                               names: ["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december",""],
+                               namesAbbr: ["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec.",""]
+                       },
+                       AM: ["de.","de.","DE."],
+                       PM: ["du.","du.","DU."],
+                       eras: [{"name":"i.sz.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy.MM.dd.",
+                               D: "yyyy. MMMM d.",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy. MMMM d. H:mm",
+                               F: "yyyy. MMMM d. H:mm:ss",
+                               M: "MMMM d.",
+                               Y: "yyyy. MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "is", "default", {
+       name: "is",
+       englishName: "Icelandic",
+       nativeName: "íslenska",
+       language: "is",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       decimals: 0,
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"],
+                               namesAbbr: ["sun.","mán.","þri.","mið.","fim.","fös.","lau."],
+                               namesShort: ["su","má","þr","mi","fi","fö","la"]
+                       },
+                       months: {
+                               names: ["janúar","febrúar","mars","apríl","maí","júní","júlí","ágúst","september","október","nóvember","desember",""],
+                               namesAbbr: ["jan.","feb.","mar.","apr.","maí","jún.","júl.","ágú.","sep.","okt.","nóv.","des.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "it", "default", {
+       name: "it",
+       englishName: "Italian",
+       nativeName: "italiano",
+       language: "it",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "Non un numero reale",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "+Infinito",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],
+                               namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"],
+                               namesShort: ["do","lu","ma","me","gi","ve","sa"]
+                       },
+                       months: {
+                               names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],
+                               namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ja", "default", {
+       name: "ja",
+       englishName: "Japanese",
+       nativeName: "日本語",
+       language: "ja",
+       numberFormat: {
+               NaN: "NaN (非数値)",
+               negativeInfinity: "-∞",
+               positiveInfinity: "+∞",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       decimals: 0,
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+                               namesAbbr: ["日","月","火","水","木","金","土"],
+                               namesShort: ["日","月","火","水","木","金","土"]
+                       },
+                       months: {
+                               names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["午前","午前","午前"],
+                       PM: ["午後","午後","午後"],
+                       eras: [{"name":"西暦","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               },
+               Japanese: {
+                       name: "Japanese",
+                       days: {
+                               names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+                               namesAbbr: ["日","月","火","水","木","金","土"],
+                               namesShort: ["日","月","火","水","木","金","土"]
+                       },
+                       months: {
+                               names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["午前","午前","午前"],
+                       PM: ["午後","午後","午後"],
+                       eras: [{"name":"平成","start":null,"offset":1867},{"name":"昭和","start":-1812153600000,"offset":1911},{"name":"大正","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}],
+                       twoDigitYearMax: 99,
+                       patterns: {
+                               d: "gg y/M/d",
+                               D: "gg y'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "gg y'年'M'月'd'日' H:mm",
+                               F: "gg y'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "gg y'年'M'月'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ko", "default", {
+       name: "ko",
+       englishName: "Korean",
+       nativeName: "한국어",
+       language: "ko",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       decimals: 0,
+                       symbol: "₩"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],
+                               namesAbbr: ["일","월","화","수","목","금","토"],
+                               namesShort: ["일","월","화","수","목","금","토"]
+                       },
+                       months: {
+                               names: ["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["오전","오전","오전"],
+                       PM: ["오후","오후","오후"],
+                       eras: [{"name":"서기","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "yyyy'년' M'월' d'일' dddd",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "yyyy'년' M'월' d'일' dddd tt h:mm",
+                               F: "yyyy'년' M'월' d'일' dddd tt h:mm:ss",
+                               M: "M'월' d'일'",
+                               Y: "yyyy'년' M'월'"
+                       }
+               },
+               Korean: {
+                       name: "Korean",
+                       "/": "-",
+                       days: {
+                               names: ["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],
+                               namesAbbr: ["일","월","화","수","목","금","토"],
+                               namesShort: ["일","월","화","수","목","금","토"]
+                       },
+                       months: {
+                               names: ["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["오전","오전","오전"],
+                       PM: ["오후","오후","오후"],
+                       eras: [{"name":"단기","start":null,"offset":-2333}],
+                       twoDigitYearMax: 4362,
+                       patterns: {
+                               d: "gg yyyy-MM-dd",
+                               D: "gg yyyy'년' M'월' d'일' dddd",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "gg yyyy'년' M'월' d'일' dddd tt h:mm",
+                               F: "gg yyyy'년' M'월' d'일' dddd tt h:mm:ss",
+                               M: "M'월' d'일'",
+                               Y: "gg yyyy'년' M'월'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "nl", "default", {
+       name: "nl",
+       englishName: "Dutch",
+       nativeName: "Nederlands",
+       language: "nl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],
+                               namesAbbr: ["zo","ma","di","wo","do","vr","za"],
+                               namesShort: ["zo","ma","di","wo","do","vr","za"]
+                       },
+                       months: {
+                               names: ["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d-M-yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd d MMMM yyyy H:mm",
+                               F: "dddd d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "no", "default", {
+       name: "no",
+       englishName: "Norwegian",
+       nativeName: "norsk",
+       language: "no",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],
+                               namesAbbr: ["sø","ma","ti","on","to","fr","lø"],
+                               namesShort: ["sø","ma","ti","on","to","fr","lø"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "pl", "default", {
+       name: "pl",
+       englishName: "Polish",
+       nativeName: "polski",
+       language: "pl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "nie jest liczbą",
+               negativeInfinity: "-nieskończoność",
+               positiveInfinity: "+nieskończoność",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "zł"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],
+                               namesAbbr: ["N","Pn","Wt","Śr","Cz","Pt","So"],
+                               namesShort: ["N","Pn","Wt","Śr","Cz","Pt","So"]
+                       },
+                       months: {
+                               names: ["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień",""],
+                               namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""]
+                       },
+                       monthsGenitive: {
+                               names: ["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia",""],
+                               namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "pt", "default", {
+       name: "pt",
+       englishName: "Portuguese",
+       nativeName: "Português",
+       language: "pt",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NaN (Não é um número)",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "+Infinito",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "R$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],
+                               namesAbbr: ["dom","seg","ter","qua","qui","sex","sáb"],
+                               namesShort: ["D","S","T","Q","Q","S","S"]
+                       },
+                       months: {
+                               names: ["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],
+                               namesAbbr: ["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d' de 'MMMM' de 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' de 'MMMM' de 'yyyy HH:mm",
+                               F: "dddd, d' de 'MMMM' de 'yyyy HH:mm:ss",
+                               M: "dd' de 'MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "rm", "default", {
+       name: "rm",
+       englishName: "Romansh",
+       nativeName: "Rumantsch",
+       language: "rm",
+       numberFormat: {
+               ",": "'",
+               NaN: "betg def.",
+               negativeInfinity: "-infinit",
+               positiveInfinity: "+infinit",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": "'"
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": "'",
+                       symbol: "fr."
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dumengia","glindesdi","mardi","mesemna","gievgia","venderdi","sonda"],
+                               namesAbbr: ["du","gli","ma","me","gie","ve","so"],
+                               namesShort: ["du","gli","ma","me","gie","ve","so"]
+                       },
+                       months: {
+                               names: ["schaner","favrer","mars","avrigl","matg","zercladur","fanadur","avust","settember","october","november","december",""],
+                               namesAbbr: ["schan","favr","mars","avr","matg","zercl","fan","avust","sett","oct","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"s. Cr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d MMMM yyyy HH:mm",
+                               F: "dddd, d MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ro", "default", {
+       name: "ro",
+       englishName: "Romanian",
+       nativeName: "română",
+       language: "ro",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "lei"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["duminică","luni","marţi","miercuri","joi","vineri","sâmbătă"],
+                               namesAbbr: ["D","L","Ma","Mi","J","V","S"],
+                               namesShort: ["D","L","Ma","Mi","J","V","S"]
+                       },
+                       months: {
+                               names: ["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""],
+                               namesAbbr: ["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ru", "default", {
+       name: "ru",
+       englishName: "Russian",
+       nativeName: "русский",
+       language: "ru",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],
+                               namesAbbr: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],
+                               namesShort: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"]
+                       },
+                       months: {
+                               names: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],
+                               namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря",""],
+                               namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy 'г.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy 'г.' H:mm",
+                               F: "d MMMM yyyy 'г.' H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "hr", "default", {
+       name: "hr",
+       englishName: "Croatian",
+       nativeName: "hrvatski",
+       language: "hr",
+       numberFormat: {
+               pattern: ["- n"],
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kn"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""],
+                               namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+                       },
+                       monthsGenitive: {
+                               names: ["siječnja","veljače","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""],
+                               namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy.",
+                               D: "d. MMMM yyyy.",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy. H:mm",
+                               F: "d. MMMM yyyy. H:mm:ss",
+                               M: "d. MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sk", "default", {
+       name: "sk",
+       englishName: "Slovak",
+       nativeName: "slovenčina",
+       language: "sk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Nie je číslo",
+               negativeInfinity: "-nekonečno",
+               positiveInfinity: "+nekonečno",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ". ",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],
+                               namesAbbr: ["ne","po","ut","st","št","pi","so"],
+                               namesShort: ["ne","po","ut","st","št","pi","so"]
+                       },
+                       months: {
+                               names: ["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       monthsGenitive: {
+                               names: ["januára","februára","marca","apríla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. l.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d. M. yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sq", "default", {
+       name: "sq",
+       englishName: "Albanian",
+       nativeName: "shqipe",
+       language: "sq",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-infinit",
+               positiveInfinity: "infinit",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Lek"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["e diel","e hënë","e martë","e mërkurë","e enjte","e premte","e shtunë"],
+                               namesAbbr: ["Die","Hën","Mar","Mër","Enj","Pre","Sht"],
+                               namesShort: ["Di","Hë","Ma","Më","En","Pr","Sh"]
+                       },
+                       months: {
+                               names: ["janar","shkurt","mars","prill","maj","qershor","korrik","gusht","shtator","tetor","nëntor","dhjetor",""],
+                               namesAbbr: ["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gsh","Sht","Tet","Nën","Dhj",""]
+                       },
+                       AM: ["PD","pd","PD"],
+                       PM: ["MD","md","MD"],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "yyyy-MM-dd",
+                               t: "h:mm.tt",
+                               T: "h:mm:ss.tt",
+                               f: "yyyy-MM-dd h:mm.tt",
+                               F: "yyyy-MM-dd h:mm:ss.tt",
+                               Y: "yyyy-MM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sv", "default", {
+       name: "sv",
+       englishName: "Swedish",
+       nativeName: "svenska",
+       language: "sv",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],
+                               namesAbbr: ["sö","må","ti","on","to","fr","lö"],
+                               namesShort: ["sö","må","ti","on","to","fr","lö"]
+                       },
+                       months: {
+                               names: ["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "'den 'd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "'den 'd MMMM yyyy HH:mm",
+                               F: "'den 'd MMMM yyyy HH:mm:ss",
+                               M: "'den 'd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "th", "default", {
+       name: "th",
+       englishName: "Thai",
+       nativeName: "ไทย",
+       language: "th",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "฿"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "ThaiBuddhist",
+                       firstDay: 1,
+                       days: {
+                               names: ["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],
+                               namesAbbr: ["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],
+                               namesShort: ["อ","จ","อ","พ","พ","ศ","ส"]
+                       },
+                       months: {
+                               names: ["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม",""],
+                               namesAbbr: ["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.",""]
+                       },
+                       eras: [{"name":"พ.ศ.","start":null,"offset":-543}],
+                       twoDigitYearMax: 2572,
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 1,
+                       days: {
+                               names: ["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],
+                               namesAbbr: ["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],
+                               namesShort: ["อ","จ","อ","พ","พ","ศ","ส"]
+                       },
+                       months: {
+                               names: ["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม",""],
+                               namesAbbr: ["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.",""]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "'วัน'dddd'ที่' d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "'วัน'dddd'ที่' d MMMM yyyy H:mm",
+                               F: "'วัน'dddd'ที่' d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tr", "default", {
+       name: "tr",
+       englishName: "Turkish",
+       nativeName: "Türkçe",
+       language: "tr",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "TL"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],
+                               namesAbbr: ["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],
+                               namesShort: ["Pz","Pt","Sa","Ça","Pe","Cu","Ct"]
+                       },
+                       months: {
+                               names: ["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık",""],
+                               namesAbbr: ["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dd MMMM yyyy dddd",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy dddd HH:mm",
+                               F: "dd MMMM yyyy dddd HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ur", "default", {
+       name: "ur",
+       englishName: "Urdu",
+       nativeName: "اُردو",
+       language: "ur",
+       isRTL: true,
+       numberFormat: {
+               currency: {
+                       pattern: ["$n-","$n"],
+                       symbol: "Rs"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","هفته"],
+                               namesAbbr: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","هفته"],
+                               namesShort: ["ا","پ","م","ب","ج","ج","ه"]
+                       },
+                       months: {
+                               names: ["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""],
+                               namesAbbr: ["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""]
+                       },
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               f: "dd MMMM, yyyy h:mm tt",
+                               F: "dd MMMM, yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               f: "dd/MM/yyyy h:mm tt",
+                               F: "dd/MM/yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "id", "default", {
+       name: "id",
+       englishName: "Indonesian",
+       nativeName: "Bahasa Indonesia",
+       language: "id",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       decimals: 0,
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Rp"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],
+                               namesAbbr: ["Minggu","Sen","Sel","Rabu","Kamis","Jumat","Sabtu"],
+                               namesShort: ["M","S","S","R","K","J","S"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember",""],
+                               namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agust","Sep","Okt","Nop","Des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM yyyy H:mm",
+                               F: "dd MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "uk", "default", {
+       name: "uk",
+       englishName: "Ukrainian",
+       nativeName: "українська",
+       language: "uk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-безмежність",
+               positiveInfinity: "безмежність",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "₴"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["неділя","понеділок","вівторок","середа","четвер","п'ятниця","субота"],
+                               namesAbbr: ["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],
+                               namesShort: ["Нд","Пн","Вт","Ср","Чт","Пт","Сб"]
+                       },
+                       months: {
+                               names: ["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень",""],
+                               namesAbbr: ["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру",""]
+                       },
+                       monthsGenitive: {
+                               names: ["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня",""],
+                               namesAbbr: ["січ","лют","бер","кві","тра","чер","лип","сер","вер","жов","лис","гру",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy' р.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy' р.' H:mm",
+                               F: "d MMMM yyyy' р.' H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy' р.'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "be", "default", {
+       name: "be",
+       englishName: "Belarusian",
+       nativeName: "Беларускі",
+       language: "be",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["нядзеля","панядзелак","аўторак","серада","чацвер","пятніца","субота"],
+                               namesAbbr: ["нд","пн","аў","ср","чц","пт","сб"],
+                               namesShort: ["нд","пн","аў","ср","чц","пт","сб"]
+                       },
+                       months: {
+                               names: ["Студзень","Люты","Сакавік","Красавік","Май","Чэрвень","Ліпень","Жнівень","Верасень","Кастрычнік","Лістапад","Снежань",""],
+                               namesAbbr: ["Сту","Лют","Сак","Кра","Май","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне",""]
+                       },
+                       monthsGenitive: {
+                               names: ["студзеня","лютага","сакавіка","красавіка","мая","чэрвеня","ліпеня","жніўня","верасня","кастрычніка","лістапада","снежня",""],
+                               namesAbbr: ["Сту","Лют","Сак","Кра","Май","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sl", "default", {
+       name: "sl",
+       englishName: "Slovenian",
+       nativeName: "slovenski",
+       language: "sl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-neskončnost",
+               positiveInfinity: "neskončnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljek","torek","sreda","četrtek","petek","sobota"],
+                               namesAbbr: ["ned","pon","tor","sre","čet","pet","sob"],
+                               namesShort: ["ne","po","to","sr","če","pe","so"]
+                       },
+                       months: {
+                               names: ["januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "et", "default", {
+       name: "et",
+       englishName: "Estonian",
+       nativeName: "eesti",
+       language: "et",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "avaldamatu",
+               negativeInfinity: "miinuslõpmatus",
+               positiveInfinity: "plusslõpmatus",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"],
+                               namesAbbr: ["P","E","T","K","N","R","L"],
+                               namesShort: ["P","E","T","K","N","R","L"]
+                       },
+                       months: {
+                               names: ["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember",""],
+                               namesAbbr: ["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets",""]
+                       },
+                       AM: ["EL","el","EL"],
+                       PM: ["PL","pl","PL"],
+                       patterns: {
+                               d: "d.MM.yyyy",
+                               D: "d. MMMM yyyy'. a.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy'. a.' H:mm",
+                               F: "d. MMMM yyyy'. a.' H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy'. a.'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "lv", "default", {
+       name: "lv",
+       englishName: "Latvian",
+       nativeName: "latviešu",
+       language: "lv",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-bezgalība",
+               positiveInfinity: "bezgalība",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Ls"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["svētdiena","pirmdiena","otrdiena","trešdiena","ceturtdiena","piektdiena","sestdiena"],
+                               namesAbbr: ["sv","pr","ot","tr","ce","pk","se"],
+                               namesShort: ["sv","pr","ot","tr","ce","pk","se"]
+                       },
+                       months: {
+                               names: ["janvāris","februāris","marts","aprīlis","maijs","jūnijs","jūlijs","augusts","septembris","oktobris","novembris","decembris",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jūn","jūl","aug","sep","okt","nov","dec",""]
+                       },
+                       monthsGenitive: {
+                               names: ["janvārī","februārī","martā","aprīlī","maijā","jūnijā","jūlijā","augustā","septembrī","oktobrī","novembrī","decembrī",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jūn","jūl","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy.MM.dd.",
+                               D: "dddd, yyyy'. gada 'd. MMMM",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, yyyy'. gada 'd. MMMM H:mm",
+                               F: "dddd, yyyy'. gada 'd. MMMM H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "yyyy. MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "lt", "default", {
+       name: "lt",
+       englishName: "Lithuanian",
+       nativeName: "lietuvių",
+       language: "lt",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-begalybė",
+               positiveInfinity: "begalybė",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Lt"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sekmadienis","pirmadienis","antradienis","trečiadienis","ketvirtadienis","penktadienis","šeštadienis"],
+                               namesAbbr: ["Sk","Pr","An","Tr","Kt","Pn","Št"],
+                               namesShort: ["S","P","A","T","K","Pn","Š"]
+                       },
+                       months: {
+                               names: ["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjūtis","rugsėjis","spalis","lapkritis","gruodis",""],
+                               namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""]
+                       },
+                       monthsGenitive: {
+                               names: ["sausio","vasario","kovo","balandžio","gegužės","birželio","liepos","rugpjūčio","rugsėjo","spalio","lapkričio","gruodžio",""],
+                               namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy.MM.dd",
+                               D: "yyyy 'm.' MMMM d 'd.'",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'm.' MMMM d 'd.' HH:mm",
+                               F: "yyyy 'm.' MMMM d 'd.' HH:mm:ss",
+                               M: "MMMM d 'd.'",
+                               Y: "yyyy 'm.' MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tg", "default", {
+       name: "tg",
+       englishName: "Tajik",
+       nativeName: "Тоҷикӣ",
+       language: "tg",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ";",
+                       symbol: "т.р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       days: {
+                               names: ["Яш","Душанбе","Сешанбе","Чоршанбе","Панҷшанбе","Ҷумъа","Шанбе"],
+                               namesAbbr: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"],
+                               namesShort: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"]
+                       },
+                       months: {
+                               names: ["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["январи","феврали","марти","апрели","маи","июни","июли","августи","сентябри","октябри","ноябри","декабри",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fa", "default", {
+       name: "fa",
+       englishName: "Persian",
+       nativeName: "فارسى",
+       language: "fa",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       ".": "/",
+                       symbol: "ريال"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 6,
+                       days: {
+                               names: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesAbbr: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesShort: ["ی","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["ژانويه","فوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اُكتبر","نوامبر","دسامبر",""],
+                               namesAbbr: ["ژانويه","فوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اُكتبر","نوامبر","دسامبر",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "yyyy/MM/dd",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "yyyy/MM/dd hh:mm tt",
+                               F: "yyyy/MM/dd hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "vi", "default", {
+       name: "vi",
+       englishName: "Vietnamese",
+       nativeName: "Tiếng Việt",
+       language: "vi",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "₫"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"],
+                               namesAbbr: ["CN","Hai","Ba","Tư","Năm","Sáu","Bảy"],
+                               namesShort: ["C","H","B","T","N","S","B"]
+                       },
+                       months: {
+                               names: ["Tháng Giêng","Tháng Hai","Tháng Ba","Tháng Tư","Tháng Năm","Tháng Sáu","Tháng Bảy","Tháng Tám","Tháng Chín","Tháng Mười","Tháng Mười Một","Tháng Mười Hai",""],
+                               namesAbbr: ["Thg1","Thg2","Thg3","Thg4","Thg5","Thg6","Thg7","Thg8","Thg9","Thg10","Thg11","Thg12",""]
+                       },
+                       AM: ["SA","sa","SA"],
+                       PM: ["CH","ch","CH"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               f: "dd MMMM yyyy h:mm tt",
+                               F: "dd MMMM yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "hy", "default", {
+       name: "hy",
+       englishName: "Armenian",
+       nativeName: "Հայերեն",
+       language: "hy",
+       numberFormat: {
+               currency: {
+                       pattern: ["-n $","n $"],
+                       symbol: "դր."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Կիրակի","Երկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","ՈՒրբաթ","Շաբաթ"],
+                               namesAbbr: ["Կիր","Երկ","Երք","Չրք","Հնգ","ՈՒր","Շբթ"],
+                               namesShort: ["Կ","Ե","Ե","Չ","Հ","Ո","Շ"]
+                       },
+                       months: {
+                               names: ["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր",""],
+                               namesAbbr: ["ՀՆՎ","ՓՏՎ","ՄՐՏ","ԱՊՐ","ՄՅՍ","ՀՆՍ","ՀԼՍ","ՕԳՍ","ՍԵՊ","ՀՈԿ","ՆՈՅ","ԴԵԿ",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM, yyyy H:mm",
+                               F: "d MMMM, yyyy H:mm:ss",
+                               M: "d MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "az", "default", {
+       name: "az",
+       englishName: "Azeri",
+       nativeName: "Azərbaycan­ılı",
+       language: "az",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "man."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"],
+                               namesAbbr: ["B","Be","Ça","Ç","Ca","C","Ş"],
+                               namesShort: ["B","Be","Ça","Ç","Ca","C","Ş"]
+                       },
+                       months: {
+                               names: ["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avgust","Sentyabr","Oktyabr","Noyabr","Dekabr",""],
+                               namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""]
+                       },
+                       monthsGenitive: {
+                               names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""],
+                               namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "eu", "default", {
+       name: "eu",
+       englishName: "Basque",
+       nativeName: "euskara",
+       language: "eu",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "EdZ",
+               negativeInfinity: "-Infinitu",
+               positiveInfinity: "Infinitu",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],
+                               namesAbbr: ["ig.","al.","as.","az.","og.","or.","lr."],
+                               namesShort: ["ig","al","as","az","og","or","lr"]
+                       },
+                       months: {
+                               names: ["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""],
+                               namesAbbr: ["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dddd, yyyy.'eko' MMMM'k 'd",
+                               t: "HH:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, yyyy.'eko' MMMM'k 'd HH:mm",
+                               F: "dddd, yyyy.'eko' MMMM'k 'd H:mm:ss",
+                               Y: "yyyy.'eko' MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "hsb", "default", {
+       name: "hsb",
+       englishName: "Upper Sorbian",
+       nativeName: "hornjoserbšćina",
+       language: "hsb",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "njedefinowane",
+               negativeInfinity: "-njekónčne",
+               positiveInfinity: "+njekónčne",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ". ",
+                       firstDay: 1,
+                       days: {
+                               names: ["njedźela","póndźela","wutora","srjeda","štwórtk","pjatk","sobota"],
+                               namesAbbr: ["nje","pón","wut","srj","štw","pja","sob"],
+                               namesShort: ["n","p","w","s","š","p","s"]
+                       },
+                       months: {
+                               names: ["januar","februar","měrc","apryl","meja","junij","julij","awgust","september","oktober","nowember","december",""],
+                               namesAbbr: ["jan","feb","měr","apr","mej","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       monthsGenitive: {
+                               names: ["januara","februara","měrca","apryla","meje","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""],
+                               namesAbbr: ["jan","feb","měr","apr","mej","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"po Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d. M. yyyy",
+                               D: "dddd, 'dnja' d. MMMM yyyy",
+                               t: "H.mm 'hodź.'",
+                               T: "H:mm:ss",
+                               f: "dddd, 'dnja' d. MMMM yyyy H.mm 'hodź.'",
+                               F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "mk", "default", {
+       name: "mk",
+       englishName: "Macedonian (FYROM)",
+       nativeName: "македонски јазик",
+       language: "mk",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "ден."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недела","понеделник","вторник","среда","четврток","петок","сабота"],
+                               namesAbbr: ["нед","пон","втр","срд","чет","пет","саб"],
+                               namesShort: ["не","по","вт","ср","че","пе","са"]
+                       },
+                       months: {
+                               names: ["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември",""],
+                               namesAbbr: ["јан","фев","мар","апр","мај","јун","јул","авг","сеп","окт","ное","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, dd MMMM yyyy HH:mm",
+                               F: "dddd, dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tn", "default", {
+       name: "tn",
+       englishName: "Setswana",
+       nativeName: "Setswana",
+       language: "tn",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Latshipi","Mosupologo","Labobedi","Laboraro","Labone","Labotlhano","Lamatlhatso"],
+                               namesAbbr: ["Ltp.","Mos.","Lbd.","Lbr.","Lbn.","Lbt.","Lmt."],
+                               namesShort: ["Lp","Ms","Lb","Lr","Ln","Lt","Lm"]
+                       },
+                       months: {
+                               names: ["Ferikgong","Tlhakole","Mopitloe","Moranang","Motsheganong","Seetebosigo","Phukwi","Phatwe","Lwetse","Diphalane","Ngwanatsele","Sedimothole",""],
+                               namesAbbr: ["Fer.","Tlhak.","Mop.","Mor.","Motsh.","Seet.","Phukw.","Phatw.","Lwets.","Diph.","Ngwan.","Sed.",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "xh", "default", {
+       name: "xh",
+       englishName: "isiXhosa",
+       nativeName: "isiXhosa",
+       language: "xh",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["iCawa","uMvulo","uLwesibini","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"],
+                               namesShort: ["Ca","Mv","Lb","Lt","Ln","Lh","Mg"]
+                       },
+                       months: {
+                               names: ["Mqungu","Mdumba","Kwindla","Tshazimpuzi","Canzibe","Silimela","Khala","Thupha","Msintsi","Dwarha","Nkanga","Mnga",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "zu", "default", {
+       name: "zu",
+       englishName: "isiZulu",
+       nativeName: "isiZulu",
+       language: "zu",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["iSonto","uMsombuluko","uLwesibili","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"],
+                               namesAbbr: ["Son.","Mso.","Bi.","Tha.","Ne.","Hla.","Mgq."]
+                       },
+                       months: {
+                               names: ["uMasingana","uNhlolanja","uNdasa","uMbaso","uNhlaba","uNhlangulana","uNtulikazi","uNcwaba","uMandulo","uMfumfu","uLwezi","uZibandlela",""],
+                               namesAbbr: ["Mas.","Nhlo.","Nda.","Mba.","Nhla.","Nhlang.","Ntu.","Ncwa.","Man.","Mfu.","Lwe.","Zib.",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "af", "default", {
+       name: "af",
+       englishName: "Afrikaans",
+       nativeName: "Afrikaans",
+       language: "af",
+       numberFormat: {
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"],
+                               namesAbbr: ["Son","Maan","Dins","Woen","Dond","Vry","Sat"],
+                               namesShort: ["So","Ma","Di","Wo","Do","Vr","Sa"]
+                       },
+                       months: {
+                               names: ["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember",""],
+                               namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ka", "default", {
+       name: "ka",
+       englishName: "Georgian",
+       nativeName: "ქართული",
+       language: "ka",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Lari"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],
+                               namesAbbr: ["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],
+                               namesShort: ["კ","ო","ს","ო","ხ","პ","შ"]
+                       },
+                       months: {
+                               names: ["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი",""],
+                               namesAbbr: ["იან","თებ","მარ","აპრ","მაის","ივნ","ივლ","აგვ","სექ","ოქტ","ნოემ","დეკ",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "yyyy 'წლის' dd MM, dddd",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'წლის' dd MM, dddd H:mm",
+                               F: "yyyy 'წლის' dd MM, dddd H:mm:ss",
+                               M: "dd MM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fo", "default", {
+       name: "fo",
+       englishName: "Faroese",
+       nativeName: "føroyskt",
+       language: "fo",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["sunnudagur","mánadagur","týsdagur","mikudagur","hósdagur","fríggjadagur","leygardagur"],
+                               namesAbbr: ["sun","mán","týs","mik","hós","frí","leyg"],
+                               namesShort: ["su","má","tý","mi","hó","fr","ley"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","apríl","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "hi", "default", {
+       name: "hi",
+       englishName: "Hindi",
+       nativeName: "हिंदी",
+       language: "hi",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],
+                               namesAbbr: ["रवि.","सोम.","मंगल.","बुध.","गुरु.","शुक्र.","शनि."],
+                               namesShort: ["र","स","म","ब","ग","श","श"]
+                       },
+                       months: {
+                               names: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""],
+                               namesAbbr: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""]
+                       },
+                       AM: ["पूर्वाह्न","पूर्वाह्न","पूर्वाह्न"],
+                       PM: ["अपराह्न","अपराह्न","अपराह्न"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "mt", "default", {
+       name: "mt",
+       englishName: "Maltese",
+       nativeName: "Malti",
+       language: "mt",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Il-Ħadd","It-Tnejn","It-Tlieta","L-Erbgħa","Il-Ħamis","Il-Ġimgħa","Is-Sibt"],
+                               namesAbbr: ["Ħad","Tne","Tli","Erb","Ħam","Ġim","Sib"],
+                               namesShort: ["I","I","I","L","I","I","I"]
+                       },
+                       months: {
+                               names: ["Jannar","Frar","Marzu","April","Mejju","Ġunju","Lulju","Awissu","Settembru","Ottubru","Novembru","Diċembru",""],
+                               namesAbbr: ["Jan","Fra","Mar","Apr","Mej","Ġun","Lul","Awi","Set","Ott","Nov","Diċ",""]
+                       },
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d' ta\\' 'MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' ta\\' 'MMMM yyyy HH:mm",
+                               F: "dddd, d' ta\\' 'MMMM yyyy HH:mm:ss",
+                               M: "d' ta\\' 'MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "se", "default", {
+       name: "se",
+       englishName: "Sami (Northern)",
+       nativeName: "davvisámegiella",
+       language: "se",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"],
+                               namesAbbr: ["sotn","vuos","maŋ","gask","duor","bear","láv"],
+                               namesShort: ["s","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ođđajagemánnu","guovvamánnu","njukčamánnu","cuoŋománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","čakčamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ođđajagimánu","guovvamánu","njukčamánu","cuoŋománu","miessemánu","geassemánu","suoidnemánu","borgemánu","čakčamánu","golggotmánu","skábmamánu","juovlamánu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ga", "default", {
+       name: "ga",
+       englishName: "Irish",
+       nativeName: "Gaeilge",
+       language: "ga",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],
+                               namesAbbr: ["Domh","Luan","Máir","Céad","Déar","Aoi","Sath"],
+                               namesShort: ["Do","Lu","Má","Cé","De","Ao","Sa"]
+                       },
+                       months: {
+                               names: ["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig",""],
+                               namesAbbr: ["Ean","Feabh","Már","Aib","Bealt","Meith","Iúil","Lún","M.Fómh","D.Fómh","Samh","Noll",""]
+                       },
+                       AM: ["r.n.","r.n.","R.N."],
+                       PM: ["i.n.","i.n.","I.N."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ms", "default", {
+       name: "ms",
+       englishName: "Malay",
+       nativeName: "Bahasa Melayu",
+       language: "ms",
+       numberFormat: {
+               currency: {
+                       decimals: 0,
+                       symbol: "RM"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],
+                               namesAbbr: ["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"],
+                               namesShort: ["A","I","S","R","K","J","S"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember",""],
+                               namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM yyyy H:mm",
+                               F: "dd MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "kk", "default", {
+       name: "kk",
+       englishName: "Kazakh",
+       nativeName: "Қазақ",
+       language: "kk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       ",": " ",
+                       ".": "-",
+                       symbol: "Т"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Жексенбі","Дүйсенбі","Сейсенбі","Сәрсенбі","Бейсенбі","Жұма","Сенбі"],
+                               namesAbbr: ["Жк","Дс","Сс","Ср","Бс","Жм","Сн"],
+                               namesShort: ["Жк","Дс","Сс","Ср","Бс","Жм","Сн"]
+                       },
+                       months: {
+                               names: ["қаңтар","ақпан","наурыз","сәуір","мамыр","маусым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқсан",""],
+                               namesAbbr: ["Қаң","Ақп","Нау","Сәу","Мам","Мау","Шіл","Там","Қыр","Қаз","Қар","Жел",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy 'ж.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy 'ж.' H:mm",
+                               F: "d MMMM yyyy 'ж.' H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ky", "default", {
+       name: "ky",
+       englishName: "Kyrgyz",
+       nativeName: "Кыргыз",
+       language: "ky",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": "-",
+                       symbol: "сом"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Жекшемби","Дүйшөмбү","Шейшемби","Шаршемби","Бейшемби","Жума","Ишемби"],
+                               namesAbbr: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"],
+                               namesShort: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"]
+                       },
+                       months: {
+                               names: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d'-'MMMM yyyy'-ж.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d'-'MMMM yyyy'-ж.' H:mm",
+                               F: "d'-'MMMM yyyy'-ж.' H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy'-ж.'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sw", "default", {
+       name: "sw",
+       englishName: "Kiswahili",
+       nativeName: "Kiswahili",
+       language: "sw",
+       numberFormat: {
+               currency: {
+                       symbol: "S"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Jumapili","Jumatatu","Jumanne","Jumatano","Alhamisi","Ijumaa","Jumamosi"],
+                               namesAbbr: ["Jumap.","Jumat.","Juman.","Jumat.","Alh.","Iju.","Jumam."],
+                               namesShort: ["P","T","N","T","A","I","M"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Decemba",""],
+                               namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ago","Sep","Okt","Nov","Dec",""]
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tk", "default", {
+       name: "tk",
+       englishName: "Turkmen",
+       nativeName: "türkmençe",
+       language: "tk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-üznüksizlik",
+               positiveInfinity: "üznüksizlik",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "m."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Duşenbe","Sişenbe","Çarşenbe","Penşenbe","Anna","Şenbe","Ýekşenbe"],
+                               namesAbbr: ["Db","Sb","Çb","Pb","An","Şb","Ýb"],
+                               namesShort: ["D","S","Ç","P","A","Ş","Ý"]
+                       },
+                       months: {
+                               names: ["Ýanwar","Fewral","Mart","Aprel","Maý","lýun","lýul","Awgust","Sentýabr","Oktýabr","Noýabr","Dekabr",""],
+                               namesAbbr: ["Ýan","Few","Mart","Apr","Maý","lýun","lýul","Awg","Sen","Okt","Not","Dek",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "yyyy 'ý.' MMMM d",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'ý.' MMMM d H:mm",
+                               F: "yyyy 'ý.' MMMM d H:mm:ss",
+                               Y: "yyyy 'ý.' MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "uz", "default", {
+       name: "uz",
+       englishName: "Uzbek",
+       nativeName: "U'zbek",
+       language: "uz",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       decimals: 0,
+                       ",": " ",
+                       ".": ",",
+                       symbol: "so'm"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"],
+                               namesAbbr: ["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."],
+                               namesShort: ["ya","d","s","ch","p","j","sh"]
+                       },
+                       months: {
+                               names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""],
+                               namesAbbr: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM yyyy",
+                               D: "yyyy 'yil' d-MMMM",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'yil' d-MMMM HH:mm",
+                               F: "yyyy 'yil' d-MMMM HH:mm:ss",
+                               M: "d-MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tt", "default", {
+       name: "tt",
+       englishName: "Tatar",
+       nativeName: "Татар",
+       language: "tt",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Якшәмбе","Дүшәмбе","Сишәмбе","Чәршәмбе","Пәнҗешәмбе","Җомга","Шимбә"],
+                               namesAbbr: ["Якш","Дүш","Сиш","Чәрш","Пәнҗ","Җом","Шим"],
+                               namesShort: ["Я","Д","С","Ч","П","Җ","Ш"]
+                       },
+                       months: {
+                               names: ["Гыйнвар","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],
+                               namesAbbr: ["Гыйн.","Фев.","Мар.","Апр.","Май","Июнь","Июль","Авг.","Сен.","Окт.","Нояб.","Дек.",""]
+                       },
+                       monthsGenitive: {
+                               names: ["Гыйнварның","Февральнең","Мартның","Апрельнең","Майның","Июньнең","Июльнең","Августның","Сентябрьның","Октябрьның","Ноябрьның","Декабрьның",""],
+                               namesAbbr: ["Гыйн.-ның","Фев.-нең","Мар.-ның","Апр.-нең","Майның","Июньнең","Июльнең","Авг.-ның","Сен.-ның","Окт.-ның","Нояб.-ның","Дек.-ның",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "bn", "default", {
+       name: "bn",
+       englishName: "Bengali",
+       nativeName: "বাংলা",
+       language: "bn",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       pattern: ["-%n","%n"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "টা"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       ":": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"],
+                               namesAbbr: ["রবি.","সোম.","মঙ্গল.","বুধ.","বৃহস্পতি.","শুক্র.","শনি."],
+                               namesShort: ["র","স","ম","ব","ব","শ","শ"]
+                       },
+                       months: {
+                               names: ["জানুয়ারী","ফেব্রুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর",""],
+                               namesAbbr: ["জানু.","ফেব্রু.","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগ.","সেপ্টে.","অক্টো.","নভে.","ডিসে.",""]
+                       },
+                       AM: ["পুর্বাহ্ন","পুর্বাহ্ন","পুর্বাহ্ন"],
+                       PM: ["অপরাহ্ন","অপরাহ্ন","অপরাহ্ন"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH.mm",
+                               T: "HH.mm.ss",
+                               f: "dd MMMM yyyy HH.mm",
+                               F: "dd MMMM yyyy HH.mm.ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "pa", "default", {
+       name: "pa",
+       englishName: "Punjabi",
+       nativeName: "ਪੰਜਾਬੀ",
+       language: "pa",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ਰੁ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ਐਤਵਾਰ","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬੁੱਧਵਾਰ","ਵੀਰਵਾਰ","ਸ਼ੁੱਕਰਵਾਰ","ਸ਼ਨਿੱਚਰਵਾਰ"],
+                               namesAbbr: ["ਐਤ.","ਸੋਮ.","ਮੰਗਲ.","ਬੁੱਧ.","ਵੀਰ.","ਸ਼ੁਕਰ.","ਸ਼ਨਿੱਚਰ."],
+                               namesShort: ["ਐ","ਸ","ਮ","ਬ","ਵ","ਸ਼","ਸ਼"]
+                       },
+                       months: {
+                               names: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""],
+                               namesAbbr: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""]
+                       },
+                       AM: ["ਸਵੇਰ","ਸਵੇਰ","ਸਵੇਰ"],
+                       PM: ["ਸ਼ਾਮ","ਸ਼ਾਮ","ਸ਼ਾਮ"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy dddd",
+                               t: "tt hh:mm",
+                               T: "tt hh:mm:ss",
+                               f: "dd MMMM yyyy dddd tt hh:mm",
+                               F: "dd MMMM yyyy dddd tt hh:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "gu", "default", {
+       name: "gu",
+       englishName: "Gujarati",
+       nativeName: "ગુજરાતી",
+       language: "gu",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "રૂ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["રવિવાર","સોમવાર","મંગળવાર","બુધવાર","ગુરુવાર","શુક્રવાર","શનિવાર"],
+                               namesAbbr: ["રવિ","સોમ","મંગળ","બુધ","ગુરુ","શુક્ર","શનિ"],
+                               namesShort: ["ર","સ","મ","બ","ગ","શ","શ"]
+                       },
+                       months: {
+                               names: ["જાન્યુઆરી","ફેબ્રુઆરી","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઈ","ઑગસ્ટ","સપ્ટેમ્બર","ઑક્ટ્બર","નવેમ્બર","ડિસેમ્બર",""],
+                               namesAbbr: ["જાન્યુ","ફેબ્રુ","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઈ","ઑગસ્ટ","સપ્ટે","ઑક્ટો","નવે","ડિસે",""]
+                       },
+                       AM: ["પૂર્વ મધ્યાહ્ન","પૂર્વ મધ્યાહ્ન","પૂર્વ મધ્યાહ્ન"],
+                       PM: ["ઉત્તર મધ્યાહ્ન","ઉત્તર મધ્યાહ્ન","ઉત્તર મધ્યાહ્ન"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "or", "default", {
+       name: "or",
+       englishName: "Oriya",
+       nativeName: "ଓଡ଼ିଆ",
+       language: "or",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ଟ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["ରବିବାର","ସୋମବାର","ମଙ୍ଗଳବାର","ବୁଧବାର","ଗୁରୁବାର","ଶୁକ୍ରବାର","ଶନିବାର"],
+                               namesAbbr: ["ରବି.","ସୋମ.","ମଙ୍ଗଳ.","ବୁଧ.","ଗୁରୁ.","ଶୁକ୍ର.","ଶନି."],
+                               namesShort: ["ର","ସୋ","ମ","ବୁ","ଗୁ","ଶୁ","ଶ"]
+                       },
+                       months: {
+                               names: ["ଜାନୁୟାରୀ","ଫ୍ରେବୃୟାରୀ","ମାର୍ଚ୍ଚ","ଏପ୍ରିଲ୍‌","ମେ","ଜୁନ୍‌","ଜୁଲାଇ","ଅଗଷ୍ଟ","ସେପ୍ଟେମ୍ବର","ଅକ୍ଟୋବର","ନଭେମ୍ବର","(ଡିସେମ୍ବର",""],
+                               namesAbbr: ["ଜାନୁୟାରୀ","ଫ୍ରେବୃୟାରୀ","ମାର୍ଚ୍ଚ","ଏପ୍ରିଲ୍‌","ମେ","ଜୁନ୍‌","ଜୁଲାଇ","ଅଗଷ୍ଟ","ସେପ୍ଟେମ୍ବର","ଅକ୍ଟୋବର","ନଭେମ୍ବର","(ଡିସେମ୍ବର",""]
+                       },
+                       eras: [{"name":"ଖ୍ରୀଷ୍ଟାବ୍ଦ","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ta", "default", {
+       name: "ta",
+       englishName: "Tamil",
+       nativeName: "தமிழ்",
+       language: "ta",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ரூ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ஞாயிற்றுக்கிழமை","திங்கள்கிழமை","செவ்வாய்கிழமை","புதன்கிழமை","வியாழக்கிழமை","வெள்ளிக்கிழமை","சனிக்கிழமை"],
+                               namesAbbr: ["ஞாயிறு","திங்கள்","செவ்வாய்","புதன்","வியாழன்","வெள்ளி","சனி"],
+                               namesShort: ["ஞா","தி","செ","பு","வி","வெ","ச"]
+                       },
+                       months: {
+                               names: ["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்",""],
+                               namesAbbr: ["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்",""]
+                       },
+                       AM: ["காலை","காலை","காலை"],
+                       PM: ["மாலை","மாலை","மாலை"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "te", "default", {
+       name: "te",
+       englishName: "Telugu",
+       nativeName: "తెలుగు",
+       language: "te",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "రూ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ఆదివారం","సోమవారం","మంగళవారం","బుధవారం","గురువారం","శుక్రవారం","శనివారం"],
+                               namesAbbr: ["ఆది.","సోమ.","మంగళ.","బుధ.","గురు.","శుక్ర.","శని."],
+                               namesShort: ["ఆ","సో","మం","బు","గు","శు","శ"]
+                       },
+                       months: {
+                               names: ["జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జూలై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్",""],
+                               namesAbbr: ["జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జూలై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్",""]
+                       },
+                       AM: ["పూర్వాహ్న","పూర్వాహ్న","పూర్వాహ్న"],
+                       PM: ["అపరాహ్న","అపరాహ్న","అపరాహ్న"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "kn", "default", {
+       name: "kn",
+       englishName: "Kannada",
+       nativeName: "ಕನ್ನಡ",
+       language: "kn",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ರೂ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ಭಾನುವಾರ","ಸೋಮವಾರ","ಮಂಗಳವಾರ","ಬುಧವಾರ","ಗುರುವಾರ","ಶುಕ್ರವಾರ","ಶನಿವಾರ"],
+                               namesAbbr: ["ಭಾನು.","ಸೋಮ.","ಮಂಗಳ.","ಬುಧ.","ಗುರು.","ಶುಕ್ರ.","ಶನಿ."],
+                               namesShort: ["ರ","ಸ","ಮ","ಬ","ಗ","ಶ","ಶ"]
+                       },
+                       months: {
+                               names: ["ಜನವರಿ","ಫೆಬ್ರವರಿ","ಮಾರ್ಚ್","ಎಪ್ರಿಲ್","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗಸ್ಟ್","ಸೆಪ್ಟಂಬರ್","ಅಕ್ಟೋಬರ್","ನವೆಂಬರ್","ಡಿಸೆಂಬರ್",""],
+                               namesAbbr: ["ಜನವರಿ","ಫೆಬ್ರವರಿ","ಮಾರ್ಚ್","ಎಪ್ರಿಲ್","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗಸ್ಟ್","ಸೆಪ್ಟಂಬರ್","ಅಕ್ಟೋಬರ್","ನವೆಂಬರ್","ಡಿಸೆಂಬರ್",""]
+                       },
+                       AM: ["ಪೂರ್ವಾಹ್ನ","ಪೂರ್ವಾಹ್ನ","ಪೂರ್ವಾಹ್ನ"],
+                       PM: ["ಅಪರಾಹ್ನ","ಅಪರಾಹ್ನ","ಅಪರಾಹ್ನ"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ml", "default", {
+       name: "ml",
+       englishName: "Malayalam",
+       nativeName: "മലയാളം",
+       language: "ml",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       pattern: ["-%n","%n"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ക"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       ":": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["ഞായറാഴ്ച","തിങ്കളാഴ്ച","ചൊവ്വാഴ്ച","ബുധനാഴ്ച","വ്യാഴാഴ്ച","വെള്ളിയാഴ്ച","ശനിയാഴ്ച"],
+                               namesAbbr: ["ഞായർ.","തിങ്കൾ.","ചൊവ്വ.","ബുധൻ.","വ്യാഴം.","വെള്ളി.","ശനി."],
+                               namesShort: ["ഞ","ത","ച","ബ","വ","വെ","ശ"]
+                       },
+                       months: {
+                               names: ["ജനുവരി","ഫെബ്റുവരി","മാറ്ച്ച്","ഏപ്റില്","മെയ്","ജൂണ്","ജൂലൈ","ഓഗസ്ററ്","സെപ്ററംബറ്","ഒക്ടോബറ്","നവംബറ്","ഡിസംബറ്",""],
+                               namesAbbr: ["ജനുവരി","ഫെബ്റുവരി","മാറ്ച്ച്","ഏപ്റില്","മെയ്","ജൂണ്","ജൂലൈ","ഓഗസ്ററ്","സെപ്ററംബറ്","ഒക്ടോബറ്","നവംബറ്","ഡിസംബറ്",""]
+                       },
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH.mm",
+                               T: "HH.mm.ss",
+                               f: "dd MMMM yyyy HH.mm",
+                               F: "dd MMMM yyyy HH.mm.ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "as", "default", {
+       name: "as",
+       englishName: "Assamese",
+       nativeName: "অসমীয়া",
+       language: "as",
+       numberFormat: {
+               groupSizes: [3,2],
+               NaN: "nan",
+               negativeInfinity: "-infinity",
+               positiveInfinity: "infinity",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","n$"],
+                       groupSizes: [3,2],
+                       symbol: "ট"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["সোমবাৰ","মঙ্গলবাৰ","বুধবাৰ","বৃহস্পতিবাৰ","শুক্রবাৰ","শনিবাৰ","ৰবিবাৰ"],
+                               namesAbbr: ["সোম.","মঙ্গল.","বুধ.","বৃহ.","শুক্র.","শনি.","ৰবি."],
+                               namesShort: ["সো","ম","বু","বৃ","শু","শ","র"]
+                       },
+                       months: {
+                               names: ["জানুৱাৰী","ফেব্রুৱাৰী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগষ্ট","চেপ্টেম্বর","অক্টোবর","নবেম্বর","ডিচেম্বর",""],
+                               namesAbbr: ["জানু","ফেব্রু","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগষ্ট","চেপ্টে","অক্টো","নবে","ডিচে",""]
+                       },
+                       AM: ["ৰাতিপু","ৰাতিপু","ৰাতিপু"],
+                       PM: ["আবেলি","আবেলি","আবেলি"],
+                       eras: [{"name":"খ্রীষ্টাব্দ","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "yyyy,MMMM dd, dddd",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "yyyy,MMMM dd, dddd tt h:mm",
+                               F: "yyyy,MMMM dd, dddd tt h:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM,yy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "mr", "default", {
+       name: "mr",
+       englishName: "Marathi",
+       nativeName: "मराठी",
+       language: "mr",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["रविवार","सोमवार","मंगळवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],
+                               namesAbbr: ["रवि.","सोम.","मंगळ.","बुध.","गुरु.","शुक्र.","शनि."],
+                               namesShort: ["र","स","म","ब","ग","श","श"]
+                       },
+                       months: {
+                               names: ["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोव्हेंबर","डिसेंबर",""],
+                               namesAbbr: ["जाने.","फेब्रु.","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टें.","ऑक्टो.","नोव्हें.","डिसें.",""]
+                       },
+                       AM: ["म.पू.","म.पू.","म.पू."],
+                       PM: ["म.नं.","म.नं.","म.नं."],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sa", "default", {
+       name: "sa",
+       englishName: "Sanskrit",
+       nativeName: "संस्कृत",
+       language: "sa",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"],
+                               namesAbbr: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"],
+                               namesShort: ["र","स","म","ब","ग","श","श"]
+                       },
+                       months: {
+                               names: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""],
+                               namesAbbr: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""]
+                       },
+                       AM: ["पूर्वाह्न","पूर्वाह्न","पूर्वाह्न"],
+                       PM: ["अपराह्न","अपराह्न","अपराह्न"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy dddd",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy dddd HH:mm",
+                               F: "dd MMMM yyyy dddd HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "mn", "default", {
+       name: "mn",
+       englishName: "Mongolian",
+       nativeName: "Монгол хэл",
+       language: "mn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "₮"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Ням","Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба"],
+                               namesAbbr: ["Ня","Да","Мя","Лх","Пү","Ба","Бя"],
+                               namesShort: ["Ня","Да","Мя","Лх","Пү","Ба","Бя"]
+                       },
+                       months: {
+                               names: ["1 дүгээр сар","2 дугаар сар","3 дугаар сар","4 дүгээр сар","5 дугаар сар","6 дугаар сар","7 дугаар сар","8 дугаар сар","9 дүгээр сар","10 дугаар сар","11 дүгээр сар","12 дугаар сар",""],
+                               namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""]
+                       },
+                       monthsGenitive: {
+                               names: ["1 дүгээр сарын","2 дугаар сарын","3 дугаар сарын","4 дүгээр сарын","5 дугаар сарын","6 дугаар сарын","7 дугаар сарын","8 дугаар сарын","9 дүгээр сарын","10 дугаар сарын","11 дүгээр сарын","12 дугаар сарын",""],
+                               namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yy.MM.dd",
+                               D: "yyyy 'оны' MMMM d",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'оны' MMMM d H:mm",
+                               F: "yyyy 'оны' MMMM d H:mm:ss",
+                               M: "d MMMM",
+                               Y: "yyyy 'он' MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "bo", "default", {
+       name: "bo",
+       englishName: "Tibetan",
+       nativeName: "བོད་ཡིག",
+       language: "bo",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "ཨང་ཀི་མིན་པ།",
+               negativeInfinity: "མོ་གྲངས་ཚད་མེད་ཆུང་བ།",
+               positiveInfinity: "ཕོ་གྲངས་ཚད་མེད་ཆེ་བ།",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       groupSizes: [3,0],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["གཟའ་ཉི་མ།","གཟའ་ཟླ་བ།","གཟའ་མིག་དམར།","གཟའ་ལྷག་པ།","གཟའ་ཕུར་བུ།","གཟའ་པ་སངས།","གཟའ་སྤེན་པ།"],
+                               namesAbbr: ["ཉི་མ།","ཟླ་བ།","མིག་དམར།","ལྷག་པ།","ཕུར་བུ།","པ་སངས།","སྤེན་པ།"],
+                               namesShort: ["༧","༡","༢","༣","༤","༥","༦"]
+                       },
+                       months: {
+                               names: ["སྤྱི་ཟླ་དང་པོ།","སྤྱི་ཟླ་གཉིས་པ།","སྤྱི་ཟླ་གསུམ་པ།","སྤྱི་ཟླ་བཞི་པ།","སྤྱི་ཟླ་ལྔ་པ།","སྤྱི་ཟླ་དྲུག་པ།","སྤྱི་ཟླ་བདུན་པ།","སྤྱི་ཟླ་བརྒྱད་པ།","སྤྱི་ཟླ་དགུ་པ།","སྤྱི་ཟླ་བཅུ་པོ།","སྤྱི་ཟླ་བཅུ་གཅིག་པ།","སྤྱི་ཟླ་བཅུ་གཉིས་པ།",""],
+                               namesAbbr: ["ཟླ་ ༡","ཟླ་ ༢","ཟླ་ ༣","ཟླ་ ༤","ཟླ་ ༥","ཟླ་ ༦","ཟླ་ ༧","ཟླ་ ༨","ཟླ་ ༩","ཟླ་ ༡༠","ཟླ་ ༡༡","ཟླ་ ༡༢",""]
+                       },
+                       AM: ["སྔ་དྲོ","སྔ་དྲོ","སྔ་དྲོ"],
+                       PM: ["ཕྱི་དྲོ","ཕྱི་དྲོ","ཕྱི་དྲོ"],
+                       eras: [{"name":"སྤྱི་ལོ","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'ལོའི་ཟླ' M'ཚེས' d",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm",
+                               F: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm:ss",
+                               M: "'ཟླ་' M'ཚེས'd",
+                               Y: "yyyy.M"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "cy", "default", {
+       name: "cy",
+       englishName: "Welsh",
+       nativeName: "Cymraeg",
+       language: "cy",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "£"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"],
+                               namesAbbr: ["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"],
+                               namesShort: ["Su","Ll","Ma","Me","Ia","Gw","Sa"]
+                       },
+                       months: {
+                               names: ["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr",""],
+                               namesAbbr: ["Ion","Chwe","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tach","Rhag",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "km", "default", {
+       name: "km",
+       englishName: "Khmer",
+       nativeName: "ខ្មែរ",
+       language: "km",
+       numberFormat: {
+               pattern: ["- n"],
+               groupSizes: [3,0],
+               NaN: "NAN",
+               negativeInfinity: "-- អនន្ត",
+               positiveInfinity: "អនន្ត",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       symbol: "៛"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["ថ្ងៃអាទិត្យ","ថ្ងៃច័ន្ទ","ថ្ងៃអង្គារ","ថ្ងៃពុធ","ថ្ងៃព្រហស្បតិ៍","ថ្ងៃសុក្រ","ថ្ងៃសៅរ៍"],
+                               namesAbbr: ["អាទិ.","ច.","អ.","ពុ","ព្រហ.","សុ.","ស."],
+                               namesShort: ["អា","ច","អ","ពុ","ព្","សុ","ស"]
+                       },
+                       months: {
+                               names: ["មករា","កុម្ភៈ","មិនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ",""],
+                               namesAbbr: ["១","២","៣","៤","៥","៦","៧","៨","៩","១០","១១","១២",""]
+                       },
+                       AM: ["ព្រឹក","ព្រឹក","ព្រឹក"],
+                       PM: ["ល្ងាច","ល្ងាច","ល្ងាច"],
+                       eras: [{"name":"មុនគ.ស.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "d MMMM yyyy",
+                               t: "H:mm tt",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy H:mm tt",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "'ថ្ងៃទី' dd 'ខែ' MM",
+                               Y: "'ខែ' MM 'ឆ្នាំ' yyyy"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ព្រឹក","ព្រឹក","ព្រឹក"],
+                       PM: ["ល្ងាច","ល្ងាច","ល្ងាច"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm tt",
+                               T: "HH:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm tt",
+                               F: "dddd, MMMM dd, yyyy HH:mm:ss"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "lo", "default", {
+       name: "lo",
+       englishName: "Lao",
+       nativeName: "ລາວ",
+       language: "lo",
+       numberFormat: {
+               pattern: ["(n)"],
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["(n$)","n$"],
+                       groupSizes: [3,0],
+                       symbol: "₭"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["ວັນອາທິດ","ວັນຈັນ","ວັນອັງຄານ","ວັນພຸດ","ວັນພະຫັດ","ວັນສຸກ","ວັນເສົາ"],
+                               namesAbbr: ["ອາທິດ","ຈັນ","ອັງຄານ","ພຸດ","ພະຫັດ","ສຸກ","ເສົາ"],
+                               namesShort: ["ອ","ຈ","ອ","ພ","ພ","ສ","ເ"]
+                       },
+                       months: {
+                               names: ["ມັງກອນ","ກຸມພາ","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","ກໍລະກົດ","ສິງຫາ","ກັນຍາ","ຕຸລາ","ພະຈິກ","ທັນວາ",""],
+                               namesAbbr: ["ມັງກອນ","ກຸມພາ","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","ກໍລະກົດ","ສິງຫາ","ກັນຍາ","ຕຸລາ","ພະຈິກ","ທັນວາ",""]
+                       },
+                       AM: ["ເຊົ້າ","ເຊົ້າ","ເຊົ້າ"],
+                       PM: ["ແລງ","ແລງ","ແລງ"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm tt",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy H:mm tt",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "gl", "default", {
+       name: "gl",
+       englishName: "Galician",
+       nativeName: "galego",
+       language: "gl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","luns","martes","mércores","xoves","venres","sábado"],
+                               namesAbbr: ["dom","luns","mar","mér","xov","ven","sáb"],
+                               namesShort: ["do","lu","ma","mé","xo","ve","sá"]
+                       },
+                       months: {
+                               names: ["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""],
+                               namesAbbr: ["xan","feb","mar","abr","maio","xuñ","xull","ago","set","out","nov","dec",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "kok", "default", {
+       name: "kok",
+       englishName: "Konkani",
+       nativeName: "कोंकणी",
+       language: "kok",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["आयतार","सोमार","मंगळार","बुधवार","बिरेस्तार","सुक्रार","शेनवार"],
+                               namesAbbr: ["आय.","सोम.","मंगळ.","बुध.","बिरे.","सुक्र.","शेन."],
+                               namesShort: ["आ","स","म","ब","ब","स","श"]
+                       },
+                       months: {
+                               names: ["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोवेम्बर","डिसेंबर",""],
+                               namesAbbr: ["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोवेम्बर","डिसेंबर",""]
+                       },
+                       AM: ["म.पू.","म.पू.","म.पू."],
+                       PM: ["म.नं.","म.नं.","म.नं."],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "syr", "default", {
+       name: "syr",
+       englishName: "Syriac",
+       nativeName: "ܣܘܪܝܝܐ",
+       language: "syr",
+       isRTL: true,
+       numberFormat: {
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ل.س.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["ܚܕ ܒܫܒܐ","ܬܪܝܢ ܒܫܒܐ","ܬܠܬܐ ܒܫܒܐ","ܐܪܒܥܐ ܒܫܒܐ","ܚܡܫܐ ܒܫܒܐ","ܥܪܘܒܬܐ","ܫܒܬܐ"],
+                               namesAbbr: ["܏ܐ ܏ܒܫ","܏ܒ ܏ܒܫ","܏ܓ ܏ܒܫ","܏ܕ ܏ܒܫ","܏ܗ ܏ܒܫ","܏ܥܪܘܒ","܏ܫܒ"],
+                               namesShort: ["ܐ","ܒ","ܓ","ܕ","ܗ","ܥ","ܫ"]
+                       },
+                       months: {
+                               names: ["ܟܢܘܢ ܐܚܪܝ","ܫܒܛ","ܐܕܪ","ܢܝܣܢ","ܐܝܪ","ܚܙܝܪܢ","ܬܡܘܙ","ܐܒ","ܐܝܠܘܠ","ܬܫܪܝ ܩܕܝܡ","ܬܫܪܝ ܐܚܪܝ","ܟܢܘܢ ܩܕܝܡ",""],
+                               namesAbbr: ["܏ܟܢ ܏ܒ","ܫܒܛ","ܐܕܪ","ܢܝܣܢ","ܐܝܪ","ܚܙܝܪܢ","ܬܡܘܙ","ܐܒ","ܐܝܠܘܠ","܏ܬܫ ܏ܐ","܏ܬܫ ܏ܒ","܏ܟܢ ܏ܐ",""]
+                       },
+                       AM: ["ܩ.ܛ","ܩ.ܛ","ܩ.ܛ"],
+                       PM: ["ܒ.ܛ","ܒ.ܛ","ܒ.ܛ"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "si", "default", {
+       name: "si",
+       englishName: "Sinhala",
+       nativeName: "සිංහල",
+       language: "si",
+       numberFormat: {
+               groupSizes: [3,2],
+               negativeInfinity: "-අනන්තය",
+               positiveInfinity: "අනන්තය",
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       symbol: "රු."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ඉරිදා","සඳුදා","අඟහරුවාදා","බදාදා","බ්‍රහස්පතින්දා","සිකුරාදා","සෙනසුරාදා"],
+                               namesAbbr: ["ඉරිදා","සඳුදා","කුජදා","බුදදා","ගුරුදා","කිවිදා","ශනිදා"],
+                               namesShort: ["ඉ","ස","අ","බ","බ්‍ර","සි","සෙ"]
+                       },
+                       months: {
+                               names: ["ජනවාරි","පෙබරවාරි","මාර්තු","අ‌ප්‍රේල්","මැයි","ජූනි","ජූලි","අ‌ගෝස්තු","සැප්තැම්බර්","ඔක්තෝබර්","නොවැම්බර්","දෙසැම්බර්",""],
+                               namesAbbr: ["ජන.","පෙබ.","මාර්තු.","අප්‍රේල්.","මැයි.","ජූනි.","ජූලි.","අගෝ.","සැප්.","ඔක්.","නොවැ.","දෙසැ.",""]
+                       },
+                       AM: ["පෙ.ව.","පෙ.ව.","පෙ.ව."],
+                       PM: ["ප.ව.","ප.ව.","ප.ව."],
+                       eras: [{"name":"ක්‍රි.ව.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "yyyy MMMM' මස 'dd' වැනිදා 'dddd",
+                               f: "yyyy MMMM' මස 'dd' වැනිදා 'dddd h:mm tt",
+                               F: "yyyy MMMM' මස 'dd' වැනිදා 'dddd h:mm:ss tt",
+                               Y: "yyyy MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "iu", "default", {
+       name: "iu",
+       englishName: "Inuktitut",
+       nativeName: "Inuktitut",
+       language: "iu",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Naattiinguja","Naggajjau","Aippiq","Pingatsiq","Sitammiq","Tallirmiq","Sivataarvik"],
+                               namesAbbr: ["Nat","Nag","Aip","Pi","Sit","Tal","Siv"],
+                               namesShort: ["N","N","A","P","S","T","S"]
+                       },
+                       months: {
+                               names: ["Jaannuari","Viivvuari","Maatsi","Iipuri","Mai","Juuni","Julai","Aaggiisi","Sitipiri","Utupiri","Nuvipiri","Tisipiri",""],
+                               namesAbbr: ["Jan","Viv","Mas","Ipu","Mai","Jun","Jul","Agi","Sii","Uut","Nuv","Tis",""]
+                       },
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "ddd, MMMM dd,yyyy",
+                               f: "ddd, MMMM dd,yyyy h:mm tt",
+                               F: "ddd, MMMM dd,yyyy h:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "am", "default", {
+       name: "am",
+       englishName: "Amharic",
+       nativeName: "አማርኛ",
+       language: "am",
+       numberFormat: {
+               decimals: 1,
+               groupSizes: [3,0],
+               NaN: "NAN",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       decimals: 1,
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       groupSizes: [3,0],
+                       symbol: "ETB"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["እሑድ","ሰኞ","ማክሰኞ","ረቡዕ","ሐሙስ","ዓርብ","ቅዳሜ"],
+                               namesAbbr: ["እሑድ","ሰኞ","ማክሰ","ረቡዕ","ሐሙስ","ዓርብ","ቅዳሜ"],
+                               namesShort: ["እ","ሰ","ማ","ረ","ሐ","ዓ","ቅ"]
+                       },
+                       months: {
+                               names: ["ጃንዩወሪ","ፌብሩወሪ","ማርች","ኤፕረል","ሜይ","ጁን","ጁላይ","ኦገስት","ሴፕቴምበር","ኦክተውበር","ኖቬምበር","ዲሴምበር",""],
+                               namesAbbr: ["ጃንዩ","ፌብሩ","ማርች","ኤፕረ","ሜይ","ጁን","ጁላይ","ኦገስ","ሴፕቴ","ኦክተ","ኖቬም","ዲሴም",""]
+                       },
+                       AM: ["ጡዋት","ጡዋት","ጡዋት"],
+                       PM: ["ከሰዓት","ከሰዓት","ከሰዓት"],
+                       eras: [{"name":"ዓመተ  ምሕረት","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd '፣' MMMM d 'ቀን' yyyy",
+                               f: "dddd '፣' MMMM d 'ቀን' yyyy h:mm tt",
+                               F: "dddd '፣' MMMM d 'ቀን' yyyy h:mm:ss tt",
+                               M: "MMMM d ቀን",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tzm", "default", {
+       name: "tzm",
+       englishName: "Tamazight",
+       nativeName: "Tamazight",
+       language: "tzm",
+       numberFormat: {
+               pattern: ["n-"],
+               ",": ".",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       symbol: "DZD"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 6,
+                       days: {
+                               names: ["Acer","Arime","Aram","Ahad","Amhadh","Sem","Sedh"],
+                               namesAbbr: ["Ace","Ari","Ara","Aha","Amh","Sem","Sed"],
+                               namesShort: ["Ac","Ar","Ar","Ah","Am","Se","Se"]
+                       },
+                       months: {
+                               names: ["Yenayer","Furar","Maghres","Yebrir","Mayu","Yunyu","Yulyu","Ghuct","Cutenber","Ktuber","Wambir","Dujanbir",""],
+                               namesAbbr: ["Yen","Fur","Mag","Yeb","May","Yun","Yul","Ghu","Cut","Ktu","Wam","Duj",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM, yyyy H:mm",
+                               F: "dd MMMM, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ne", "default", {
+       name: "ne",
+       englishName: "Nepali",
+       nativeName: "नेपाली",
+       language: "ne",
+       numberFormat: {
+               groupSizes: [3,2],
+               NaN: "nan",
+               negativeInfinity: "-infinity",
+               positiveInfinity: "infinity",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["आइतवार","सोमवार","मङ्गलवार","बुधवार","बिहीवार","शुक्रवार","शनिवार"],
+                               namesAbbr: ["आइत","सोम","मङ्गल","बुध","बिही","शुक्र","शनि"],
+                               namesShort: ["आ","सो","म","बु","बि","शु","श"]
+                       },
+                       months: {
+                               names: ["जनवरी","फेब्रुअरी","मार्च","अप्रिल","मे","जून","जुलाई","अगस्त","सेप्टेम्बर","अक्टोबर","नोभेम्बर","डिसेम्बर",""],
+                               namesAbbr: ["जन","फेब","मार्च","अप्रिल","मे","जून","जुलाई","अग","सेप्ट","अक्ट","नोभ","डिस",""]
+                       },
+                       AM: ["विहानी","विहानी","विहानी"],
+                       PM: ["बेलुकी","बेलुकी","बेलुकी"],
+                       eras: [{"name":"a.d.","start":null,"offset":0}],
+                       patterns: {
+                               Y: "MMMM,yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fy", "default", {
+       name: "fy",
+       englishName: "Frisian",
+       nativeName: "Frysk",
+       language: "fy",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["Snein","Moandei","Tiisdei","Woansdei","Tongersdei","Freed","Sneon"],
+                               namesAbbr: ["Sn","Mo","Ti","Wo","To","Fr","Sn"],
+                               namesShort: ["S","M","T","W","T","F","S"]
+                       },
+                       months: {
+                               names: ["jannewaris","febrewaris","maart","april","maaie","juny","july","augustus","septimber","oktober","novimber","desimber",""],
+                               namesAbbr: ["jann","febr","mrt","apr","maaie","jun","jul","aug","sept","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d-M-yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd d MMMM yyyy H:mm",
+                               F: "dddd d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ps", "default", {
+       name: "ps",
+       englishName: "Pashto",
+       nativeName: "پښتو",
+       language: "ps",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               ",": "،",
+               ".": ",",
+               NaN: "غ ع",
+               negativeInfinity: "-∞",
+               positiveInfinity: "∞",
+               percent: {
+                       pattern: ["%n-","%n"],
+                       ",": "،",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$n-","$n"],
+                       ",": "٬",
+                       ".": "٫",
+                       symbol: "؋"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               f: "dd/MM/yyyy h:mm tt",
+                               F: "dd/MM/yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 6,
+                       days: {
+                               names: ["یکشنبه","دوشنبه","سه‌شنبه","چارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesAbbr: ["یکشنبه","دوشنبه","سه‌شنبه","چارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesShort: ["ی","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا ښزمرى","زمرى","وږى","تله","لړم","لنڈ ۍ","مرغومى",""],
+                               namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا ښ","زمرى","وږى","تله","لړم","لنڈ ۍ","مرغومى",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"ل.ه","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy, dd, MMMM, dddd",
+                               f: "yyyy, dd, MMMM, dddd h:mm tt",
+                               F: "yyyy, dd, MMMM, dddd h:mm:ss tt",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fil", "default", {
+       name: "fil",
+       englishName: "Filipino",
+       nativeName: "Filipino",
+       language: "fil",
+       numberFormat: {
+               currency: {
+                       symbol: "PhP"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Linggo","Lunes","Martes","Mierkoles","Huebes","Biernes","Sabado"],
+                               namesAbbr: ["Lin","Lun","Mar","Mier","Hueb","Bier","Saba"],
+                               namesShort: ["L","L","M","M","H","B","S"]
+                       },
+                       months: {
+                               names: ["Enero","Pebrero","Marso","Abril","Mayo","Hunyo","Hulyo","Agosto","Septyembre","Oktubre","Nobyembre","Disyembre",""],
+                               namesAbbr: ["En","Peb","Mar","Abr","Mayo","Hun","Hul","Agos","Sept","Okt","Nob","Dis",""]
+                       },
+                       eras: [{"name":"Anno Domini","start":null,"offset":0}]
+               }
+       }
+});
+
+Globalize.addCultureInfo( "dv", "default", {
+       name: "dv",
+       englishName: "Divehi",
+       nativeName: "ދިވެހިބަސް",
+       language: "dv",
+       isRTL: true,
+       numberFormat: {
+               currency: {
+                       pattern: ["n $-","n $"],
+                       symbol: "ރ."
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Hijri",
+                       days: {
+                               names: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesAbbr: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesShort: ["އާ","ހޯ","އަ","ބު","ބު","ހު","ހޮ"]
+                       },
+                       months: {
+                               names: ["މުޙައްރަމް","ޞަފަރު","ރަބީޢުލްއައްވަލް","ރަބީޢުލްއާޚިރު","ޖުމާދަލްއޫލާ","ޖުމާދަލްއާޚިރާ","ރަޖަބް","ޝަޢްބާން","ރަމަޟާން","ޝައްވާލް","ޛުލްޤަޢިދާ","ޛުލްޙިއްޖާ",""],
+                               namesAbbr: ["މުޙައްރަމް","ޞަފަރު","ރަބީޢުލްއައްވަލް","ރަބީޢުލްއާޚިރު","ޖުމާދަލްއޫލާ","ޖުމާދަލްއާޚިރާ","ރަޖަބް","ޝަޢްބާން","ރަމަޟާން","ޝައްވާލް","ޛުލްޤަޢިދާ","ޛުލްޙިއްޖާ",""]
+                       },
+                       AM: ["މކ","މކ","މކ"],
+                       PM: ["މފ","މފ","މފ"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd/MM/yyyy HH:mm",
+                               F: "dd/MM/yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_Localized: {
+                       days: {
+                               names: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesAbbr: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesShort: ["އާ","ހޯ","އަ","ބު","ބު","ހު","ހޮ"]
+                       },
+                       months: {
+                               names: ["ޖަނަވަރީ","ފެބްރުއަރީ","މާޗް","އޭޕްރިލް","މެއި","ޖޫން","ޖުލައި","އޯގަސްޓް","ސެޕްޓެމްބަރ","އޮކްޓޯބަރ","ނޮވެމްބަރ","ޑިސެމްބަރ",""],
+                               namesAbbr: ["ޖަނަވަރީ","ފެބްރުއަރީ","މާޗް","އޭޕްރިލް","މެއި","ޖޫން","ޖުލައި","އޯގަސްޓް","ސެޕްޓެމްބަރ","އޮކްޓޯބަރ","ނޮވެމްބަރ","ޑިސެމްބަރ",""]
+                       },
+                       AM: ["މކ","މކ","މކ"],
+                       PM: ["މފ","މފ","މފ"],
+                       eras: [{"name":"މީލާދީ","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "ddd, yyyy MMMM dd",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "ddd, yyyy MMMM dd HH:mm",
+                               F: "ddd, yyyy MMMM dd HH:mm:ss",
+                               Y: "yyyy, MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ha", "default", {
+       name: "ha",
+       englishName: "Hausa",
+       nativeName: "Hausa",
+       language: "ha",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Lahadi","Litinin","Talata","Laraba","Alhamis","Juma'a","Asabar"],
+                               namesAbbr: ["Lah","Lit","Tal","Lar","Alh","Jum","Asa"],
+                               namesShort: ["L","L","T","L","A","J","A"]
+                       },
+                       months: {
+                               names: ["Januwaru","Febreru","Maris","Afrilu","Mayu","Yuni","Yuli","Agusta","Satumba","Oktocba","Nuwamba","Disamba",""],
+                               namesAbbr: ["Jan","Feb","Mar","Afr","May","Yun","Yul","Agu","Sat","Okt","Nuw","Dis",""]
+                       },
+                       AM: ["Safe","safe","SAFE"],
+                       PM: ["Yamma","yamma","YAMMA"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "yo", "default", {
+       name: "yo",
+       englishName: "Yoruba",
+       nativeName: "Yoruba",
+       language: "yo",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"],
+                               namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"],
+                               namesShort: ["A","A","I","O","O","E","A"]
+                       },
+                       months: {
+                               names: ["Osu kinni","Osu keji","Osu keta","Osu kerin","Osu karun","Osu kefa","Osu keje","Osu kejo","Osu kesan","Osu kewa","Osu kokanla","Osu keresi",""],
+                               namesAbbr: ["kin.","kej.","ket.","ker.","kar.","kef.","kej.","kej.","kes.","kew.","kok.","ker.",""]
+                       },
+                       AM: ["Owuro","owuro","OWURO"],
+                       PM: ["Ale","ale","ALE"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "quz", "default", {
+       name: "quz",
+       englishName: "Quechua",
+       nativeName: "runasimi",
+       language: "quz",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "$b"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"],
+                               namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"],
+                               namesShort: ["d","k","a","m","h","b","k"]
+                       },
+                       months: {
+                               names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""],
+                               namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "nso", "default", {
+       name: "nso",
+       englishName: "Sesotho sa Leboa",
+       nativeName: "Sesotho sa Leboa",
+       language: "nso",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Lamorena","Mošupologo","Labobedi","Laboraro","Labone","Labohlano","Mokibelo"],
+                               namesAbbr: ["Lam","Moš","Lbb","Lbr","Lbn","Lbh","Mok"],
+                               namesShort: ["L","M","L","L","L","L","M"]
+                       },
+                       months: {
+                               names: ["Pherekgong","Hlakola","Mopitlo","Moranang","Mosegamanye","Ngoatobošego","Phuphu","Phato","Lewedi","Diphalana","Dibatsela","Manthole",""],
+                               namesAbbr: ["Pher","Hlak","Mop","Mor","Mos","Ngwat","Phup","Phat","Lew","Dip","Dib","Man",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ba", "default", {
+       name: "ba",
+       englishName: "Bashkir",
+       nativeName: "Башҡорт",
+       language: "ba",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "һ."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Йәкшәмбе","Дүшәмбе","Шишәмбе","Шаршамбы","Кесаҙна","Йома","Шәмбе"],
+                               namesAbbr: ["Йш","Дш","Шш","Шр","Кс","Йм","Шб"],
+                               namesShort: ["Йш","Дш","Шш","Шр","Кс","Йм","Шб"]
+                       },
+                       months: {
+                               names: ["ғинуар","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь",""],
+                               namesAbbr: ["ғин","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d MMMM yyyy 'й'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy 'й' H:mm",
+                               F: "d MMMM yyyy 'й' H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "lb", "default", {
+       name: "lb",
+       englishName: "Luxembourgish",
+       nativeName: "Lëtzebuergesch",
+       language: "lb",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "n. num.",
+               negativeInfinity: "-onendlech",
+               positiveInfinity: "+onendlech",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"],
+                               namesAbbr: ["Son","Méi","Dën","Mët","Don","Fre","Sam"],
+                               namesShort: ["So","Mé","Dë","Më","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "kl", "default", {
+       name: "kl",
+       englishName: "Greenlandic",
+       nativeName: "kalaallisut",
+       language: "kl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       groupSizes: [3,0],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,0],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["sapaat","ataasinngorneq","marlunngorneq","pingasunngorneq","sisamanngorneq","tallimanngorneq","arfininngorneq"],
+                               namesAbbr: ["sap","ata","mar","ping","sis","tal","arf"],
+                               namesShort: ["sa","at","ma","pi","si","ta","ar"]
+                       },
+                       months: {
+                               names: ["januari","februari","martsi","apriili","maaji","juni","juli","aggusti","septembari","oktobari","novembari","decembari",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ig", "default", {
+       name: "ig",
+       englishName: "Igbo",
+       nativeName: "Igbo",
+       language: "ig",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"],
+                               namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"],
+                               namesShort: ["A","A","I","O","O","E","A"]
+                       },
+                       months: {
+                               names: ["Onwa mbu","Onwa ibua","Onwa ato","Onwa ano","Onwa ise","Onwa isi","Onwa asa","Onwa asato","Onwa itolu","Onwa iri","Onwa iri n'ofu","Onwa iri n'ibua",""],
+                               namesAbbr: ["mbu.","ibu.","ato.","ano.","ise","isi","asa","asa.","ito.","iri.","n'of.","n'ib.",""]
+                       },
+                       AM: ["Ututu","ututu","UTUTU"],
+                       PM: ["Efifie","efifie","EFIFIE"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ii", "default", {
+       name: "ii",
+       englishName: "Yi",
+       nativeName: "ꆈꌠꁱꂷ",
+       language: "ii",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "ꌗꂷꀋꉬ",
+               negativeInfinity: "ꀄꊭꌐꀋꉆ",
+               positiveInfinity: "ꈤꇁꑖꀋꉬ",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["ꑭꆏꑍ","ꆏꊂ꒔","ꆏꊂꑍ","ꆏꊂꌕ","ꆏꊂꇖ","ꆏꊂꉬ","ꆏꊂꃘ"],
+                               namesAbbr: ["ꑭꆏ","ꆏ꒔","ꆏꑍ","ꆏꌕ","ꆏꇖ","ꆏꉬ","ꆏꃘ"],
+                               namesShort: ["ꆏ","꒔","ꑍ","ꌕ","ꇖ","ꉬ","ꃘ"]
+                       },
+                       months: {
+                               names: ["ꋍꆪ","ꑍꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","ꏃꆪ","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""],
+                               namesAbbr: ["ꋍꆪ","ꑍꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","ꏃꆪ","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""]
+                       },
+                       AM: ["ꂵꆪꈌꈐ","ꂵꆪꈌꈐ","ꂵꆪꈌꈐ"],
+                       PM: ["ꂵꆪꈌꉈ","ꂵꆪꈌꉈ","ꂵꆪꈌꉈ"],
+                       eras: [{"name":"ꇬꑼ","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'ꈎ' M'ꆪ' d'ꑍ'",
+                               t: "tt h:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'ꈎ' M'ꆪ' d'ꑍ' tt h:mm",
+                               F: "yyyy'ꈎ' M'ꆪ' d'ꑍ' H:mm:ss",
+                               M: "M'ꆪ' d'ꑍ'",
+                               Y: "yyyy'ꈎ' M'ꆪ'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "arn", "default", {
+       name: "arn",
+       englishName: "Mapudungun",
+       nativeName: "Mapudungun",
+       language: "arn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "moh", "default", {
+       name: "moh",
+       englishName: "Mohawk",
+       nativeName: "Kanien'kéha",
+       language: "moh",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Awentatokentì:ke","Awentataón'ke","Ratironhia'kehronòn:ke","Soséhne","Okaristiiáhne","Ronwaia'tanentaktonhne","Entákta"],
+                               namesShort: ["S","M","T","W","T","F","S"]
+                       },
+                       months: {
+                               names: ["Tsothohrkó:Wa","Enniska","Enniskó:Wa","Onerahtókha","Onerahtohkó:Wa","Ohiari:Ha","Ohiarihkó:Wa","Seskéha","Seskehkó:Wa","Kenténha","Kentenhkó:Wa","Tsothóhrha",""]
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "br", "default", {
+       name: "br",
+       englishName: "Breton",
+       nativeName: "brezhoneg",
+       language: "br",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "NkN",
+               negativeInfinity: "-Anfin",
+               positiveInfinity: "+Anfin",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Sul","Lun","Meurzh","Merc'her","Yaou","Gwener","Sadorn"],
+                               namesAbbr: ["Sul","Lun","Meu.","Mer.","Yaou","Gwe.","Sad."],
+                               namesShort: ["Su","Lu","Mz","Mc","Ya","Gw","Sa"]
+                       },
+                       months: {
+                               names: ["Genver","C'hwevrer","Meurzh","Ebrel","Mae","Mezheven","Gouere","Eost","Gwengolo","Here","Du","Kerzu",""],
+                               namesAbbr: ["Gen.","C'hwe.","Meur.","Ebr.","Mae","Mezh.","Goue.","Eost","Gwen.","Here","Du","Kzu",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"g. J.-K.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ug", "default", {
+       name: "ug",
+       englishName: "Uyghur",
+       nativeName: "ئۇيغۇرچە",
+       language: "ug",
+       isRTL: true,
+       numberFormat: {
+               NaN: "سان ئەمەس",
+               negativeInfinity: "مەنپىي چەكسىزلىك",
+               positiveInfinity: "مۇسبەت چەكسىزلىك",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"],
+                               namesAbbr: ["يە","دۈ","سە","چا","پە","جۈ","شە"],
+                               namesShort: ["ي","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""],
+                               namesAbbr: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""]
+                       },
+                       AM: ["چۈشتىن بۇرۇن","چۈشتىن بۇرۇن","چۈشتىن بۇرۇن"],
+                       PM: ["چۈشتىن كېيىن","چۈشتىن كېيىن","چۈشتىن كېيىن"],
+                       eras: [{"name":"مىلادى","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-M-d",
+                               D: "yyyy-'يىلى' MMMM d-'كۈنى،'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm",
+                               F: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm:ss",
+                               M: "MMMM d'-كۈنى'",
+                               Y: "yyyy-'يىلى' MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "mi", "default", {
+       name: "mi",
+       englishName: "Maori",
+       nativeName: "Reo Māori",
+       language: "mi",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Rātapu","Rāhina","Rātū","Rāapa","Rāpare","Rāmere","Rāhoroi"],
+                               namesAbbr: ["Ta","Hi","Tū","Apa","Pa","Me","Ho"],
+                               namesShort: ["Ta","Hi","Tū","Aa","Pa","Me","Ho"]
+                       },
+                       months: {
+                               names: ["Kohi-tātea","Hui-tanguru","Poutū-te-rangi","Paenga-whāwhā","Haratua","Pipiri","Hōngongoi","Here-turi-kōkā","Mahuru","Whiringa-ā-nuku","Whiringa-ā-rangi","Hakihea",""],
+                               namesAbbr: ["Kohi","Hui","Pou","Pae","Hara","Pipi","Hōngo","Here","Mahu","Nuku","Rangi","Haki",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd MMMM, yyyy",
+                               f: "dddd, dd MMMM, yyyy h:mm tt",
+                               F: "dddd, dd MMMM, yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM, yy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "oc", "default", {
+       name: "oc",
+       englishName: "Occitan",
+       nativeName: "Occitan",
+       language: "oc",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numeric",
+               negativeInfinity: "-Infinit",
+               positiveInfinity: "+Infinit",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimenge","diluns","dimars","dimècres","dijòus","divendres","dissabte"],
+                               namesAbbr: ["dim.","lun.","mar.","mèc.","jòu.","ven.","sab."],
+                               namesShort: ["di","lu","ma","mè","jò","ve","sa"]
+                       },
+                       months: {
+                               names: ["genier","febrier","març","abril","mai","junh","julh","agost","setembre","octobre","novembre","desembre",""],
+                               namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""]
+                       },
+                       monthsGenitive: {
+                               names: ["de genier","de febrier","de març","d'abril","de mai","de junh","de julh","d'agost","de setembre","d'octobre","de novembre","de desembre",""],
+                               namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"après Jèsus-Crist","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd,' lo 'd MMMM' de 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd,' lo 'd MMMM' de 'yyyy HH:mm",
+                               F: "dddd,' lo 'd MMMM' de 'yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "co", "default", {
+       name: "co",
+       englishName: "Corsican",
+       nativeName: "Corsu",
+       language: "co",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Mica numericu",
+               negativeInfinity: "-Infinitu",
+               positiveInfinity: "+Infinitu",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dumenica","luni","marti","mercuri","ghjovi","venderi","sabbatu"],
+                               namesAbbr: ["dum.","lun.","mar.","mer.","ghj.","ven.","sab."],
+                               namesShort: ["du","lu","ma","me","gh","ve","sa"]
+                       },
+                       months: {
+                               names: ["ghjennaghju","ferraghju","marzu","aprile","maghju","ghjunghju","lugliu","aostu","settembre","ottobre","nuvembre","dicembre",""],
+                               namesAbbr: ["ghje","ferr","marz","apri","magh","ghju","lugl","aost","sett","otto","nuve","dice",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"dopu J-C","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "gsw", "default", {
+       name: "gsw",
+       englishName: "Alsatian",
+       nativeName: "Elsässisch",
+       language: "gsw",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Ohne Nummer",
+               negativeInfinity: "-Unendlich",
+               positiveInfinity: "+Unendlich",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Sundàà","Mondàà","Dienschdàà","Mittwuch","Dunnerschdàà","Fridàà","Sàmschdàà"],
+                               namesAbbr: ["Su.","Mo.","Di.","Mi.","Du.","Fr.","Sà."],
+                               namesShort: ["Su","Mo","Di","Mi","Du","Fr","Sà"]
+                       },
+                       months: {
+                               names: ["Jänner","Feverje","März","Àpril","Mai","Jüni","Jüli","Augscht","September","Oktower","Nowember","Dezember",""],
+                               namesAbbr: ["Jän.","Fev.","März","Apr.","Mai","Jüni","Jüli","Aug.","Sept.","Okt.","Now.","Dez.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"Vor J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sah", "default", {
+       name: "sah",
+       englishName: "Yakut",
+       nativeName: "саха",
+       language: "sah",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "NAN",
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "с."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["баскыһыанньа","бэнидиэнньик","оптуорунньук","сэрэдэ","чэппиэр","бээтинсэ","субуота"],
+                               namesAbbr: ["Бс","Бн","Оп","Ср","Чп","Бт","Сб"],
+                               namesShort: ["Бс","Бн","Оп","Ср","Чп","Бт","Сб"]
+                       },
+                       months: {
+                               names: ["Тохсунньу","Олунньу","Кулун тутар","Муус устар","Ыам ыйа","Бэс ыйа","От ыйа","Атырдьах ыйа","Балаҕан ыйа","Алтынньы","Сэтинньи","Ахсынньы",""],
+                               namesAbbr: ["тхс","олн","кул","мст","ыам","бэс","отй","атр","блҕ","алт","стн","ахс",""]
+                       },
+                       monthsGenitive: {
+                               names: ["тохсунньу","олунньу","кулун тутар","муус устар","ыам ыйын","бэс ыйын","от ыйын","атырдьах ыйын","балаҕан ыйын","алтынньы","сэтинньи","ахсынньы",""],
+                               namesAbbr: ["тхс","олн","кул","мст","ыам","бэс","отй","атр","блҕ","алт","стн","ахс",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "MM.dd.yyyy",
+                               D: "MMMM d yyyy 'с.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d yyyy 'с.' H:mm",
+                               F: "MMMM d yyyy 'с.' H:mm:ss",
+                               Y: "MMMM yyyy 'с.'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "qut", "default", {
+       name: "qut",
+       englishName: "K'iche",
+       nativeName: "K'iche",
+       language: "qut",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       symbol: "Q"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["juq'ij","kaq'ij","oxq'ij","kajq'ij","joq'ij","waqq'ij","wuqq'ij"],
+                               namesAbbr: ["juq","kaq","oxq","kajq","joq","waqq","wuqq"],
+                               namesShort: ["ju","ka","ox","ka","jo","wa","wu"]
+                       },
+                       months: {
+                               names: ["nab'e ik'","ukab' ik'","rox ik'","ukaj ik'","uro' ik'","uwaq ik'","uwuq ik'","uwajxaq ik'","ub'elej ik'","ulaj ik'","ujulaj ik'","ukab'laj ik'",""],
+                               namesAbbr: ["nab'e","ukab","rox","ukaj","uro","uwaq","uwuq","uwajxaq","ub'elej","ulaj","ujulaj","ukab'laj",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "rw", "default", {
+       name: "rw",
+       englishName: "Kinyarwanda",
+       nativeName: "Kinyarwanda",
+       language: "rw",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "RWF"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Ku wa mbere","Ku wa kabiri","Ku wa gatatu","Ku wa kane","Ku wa gatanu","Ku wa gatandatu","Ku cyumweru"],
+                               namesAbbr: ["mbe.","kab.","gat.","kan.","gat.","gat.","cyu."],
+                               namesShort: ["mb","ka","ga","ka","ga","ga","cy"]
+                       },
+                       months: {
+                               names: ["Mutarama","Gashyantare","Werurwe","Mata","Gicurasi","Kamena","Nyakanga","Kanama","Nzeli","Ukwakira","Ugushyingo","Ukuboza",""],
+                               namesAbbr: ["Mut","Gas","Wer","Mat","Gic","Kam","Nya","Kan","Nze","Ukwa","Ugu","Uku",""]
+                       },
+                       AM: ["saa moya z.m.","saa moya z.m.","SAA MOYA Z.M."],
+                       PM: ["saa moya z.n.","saa moya z.n.","SAA MOYA Z.N."],
+                       eras: [{"name":"AD","start":null,"offset":0}]
+               }
+       }
+});
+
+Globalize.addCultureInfo( "wo", "default", {
+       name: "wo",
+       englishName: "Wolof",
+       nativeName: "Wolof",
+       language: "wo",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "XOF"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "prs", "default", {
+       name: "prs",
+       englishName: "Dari",
+       nativeName: "درى",
+       language: "prs",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               ",": ".",
+               ".": ",",
+               NaN: "غ ع",
+               negativeInfinity: "-∞",
+               positiveInfinity: "∞",
+               percent: {
+                       pattern: ["%n-","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$n-","$n"],
+                       symbol: "؋"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Hijri",
+                       firstDay: 5,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               f: "dd/MM/yyyy h:mm tt",
+                               F: "dd/MM/yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 5,
+                       days: {
+                               names: ["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesAbbr: ["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesShort: ["ی","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","وږى","تله","لړم","ليندۍ","مرغومى",""],
+                               namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","وږى","تله","لړم","ليندۍ","مرغومى",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"ل.ه","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy, dd, MMMM, dddd",
+                               f: "yyyy, dd, MMMM, dddd h:mm tt",
+                               F: "yyyy, dd, MMMM, dddd h:mm:ss tt",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "gd", "default", {
+       name: "gd",
+       englishName: "Scottish Gaelic",
+       nativeName: "Gàidhlig",
+       language: "gd",
+       numberFormat: {
+               negativeInfinity: "-Neo-chrìochnachd",
+               positiveInfinity: "Neo-chrìochnachd",
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "£"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],
+                               namesAbbr: ["Dòm","Lua","Mài","Cia","Ard","Hao","Sat"],
+                               namesShort: ["D","L","M","C","A","H","S"]
+                       },
+                       months: {
+                               names: ["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd",""],
+                               namesAbbr: ["Fao","Gea","Màr","Gib","Cèi","Ògm","Iuc","Lùn","Sul","Dàm","Sam","Dùb",""]
+                       },
+                       AM: ["m","m","M"],
+                       PM: ["f","f","F"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-SA", "default", {
+       name: "ar-SA",
+       englishName: "Arabic (Saudi Arabia)",
+       nativeName: "العربية (المملكة العربية السعودية)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ر.س.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "bg-BG", "default", {
+       name: "bg-BG",
+       englishName: "Bulgarian (Bulgaria)",
+       nativeName: "български (България)",
+       language: "bg",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "- безкрайност",
+               positiveInfinity: "+ безкрайност",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "лв."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["неделя","понеделник","вторник","сряда","четвъртък","петък","събота"],
+                               namesAbbr: ["нед","пон","вт","ср","четв","пет","съб"],
+                               namesShort: ["н","п","в","с","ч","п","с"]
+                       },
+                       months: {
+                               names: ["януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември",""],
+                               namesAbbr: ["ян","февр","март","апр","май","юни","юли","авг","септ","окт","ноември","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"след новата ера","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy 'г.'",
+                               D: "dd MMMM yyyy 'г.'",
+                               t: "HH:mm 'ч.'",
+                               T: "HH:mm:ss 'ч.'",
+                               f: "dd MMMM yyyy 'г.' HH:mm 'ч.'",
+                               F: "dd MMMM yyyy 'г.' HH:mm:ss 'ч.'",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy 'г.'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ca-ES", "default", {
+       name: "ca-ES",
+       englishName: "Catalan (Catalan)",
+       nativeName: "català (català)",
+       language: "ca",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinit",
+               positiveInfinity: "Infinit",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"],
+                               namesAbbr: ["dg.","dl.","dt.","dc.","dj.","dv.","ds."],
+                               namesShort: ["dg","dl","dt","dc","dj","dv","ds"]
+                       },
+                       months: {
+                               names: ["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre",""],
+                               namesAbbr: ["gen","feb","març","abr","maig","juny","jul","ag","set","oct","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d' / 'MMMM' / 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' / 'MMMM' / 'yyyy HH:mm",
+                               F: "dddd, d' / 'MMMM' / 'yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' / 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "zh-TW", "default", {
+       name: "zh-TW",
+       englishName: "Chinese (Traditional, Taiwan)",
+       nativeName: "中文(台灣)",
+       language: "zh-CHT",
+       numberFormat: {
+               NaN: "不是一個數字",
+               negativeInfinity: "負無窮大",
+               positiveInfinity: "正無窮大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "NT$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["週日","週一","週二","週三","週四","週五","週六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"西元","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "tt hh:mm",
+                               T: "tt hh:mm:ss",
+                               f: "yyyy'年'M'月'd'日' tt hh:mm",
+                               F: "yyyy'年'M'月'd'日' tt hh:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               },
+               Taiwan: {
+                       name: "Taiwan",
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["週日","週一","週二","週三","週四","週五","週六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"","start":null,"offset":1911}],
+                       twoDigitYearMax: 99,
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "tt hh:mm",
+                               T: "tt hh:mm:ss",
+                               f: "yyyy'年'M'月'd'日' tt hh:mm",
+                               F: "yyyy'年'M'月'd'日' tt hh:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "cs-CZ", "default", {
+       name: "cs-CZ",
+       englishName: "Czech (Czech Republic)",
+       nativeName: "čeština (Česká republika)",
+       language: "cs",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Není číslo",
+               negativeInfinity: "-nekonečno",
+               positiveInfinity: "+nekonečno",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Kč"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["neděle","pondělí","úterý","středa","čtvrtek","pátek","sobota"],
+                               namesAbbr: ["ne","po","út","st","čt","pá","so"],
+                               namesShort: ["ne","po","út","st","čt","pá","so"]
+                       },
+                       months: {
+                               names: ["leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ledna","února","března","dubna","května","června","července","srpna","září","října","listopadu","prosince",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["dop.","dop.","DOP."],
+                       PM: ["odp.","odp.","ODP."],
+                       eras: [{"name":"n. l.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "da-DK", "default", {
+       name: "da-DK",
+       englishName: "Danish (Denmark)",
+       nativeName: "dansk (Danmark)",
+       language: "da",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],
+                               namesAbbr: ["sø","ma","ti","on","to","fr","lø"],
+                               namesShort: ["sø","ma","ti","on","to","fr","lø"]
+                       },
+                       months: {
+                               names: ["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "de-DE", "default", {
+       name: "de-DE",
+       englishName: "German (Germany)",
+       nativeName: "Deutsch (Deutschland)",
+       language: "de",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "n. def.",
+               negativeInfinity: "-unendlich",
+               positiveInfinity: "+unendlich",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+                               namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+                               namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d. MMMM yyyy HH:mm",
+                               F: "dddd, d. MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "el-GR", "default", {
+       name: "el-GR",
+       englishName: "Greek (Greece)",
+       nativeName: "Ελληνικά (Ελλάδα)",
+       language: "el",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "μη αριθμός",
+               negativeInfinity: "-Άπειρο",
+               positiveInfinity: "Άπειρο",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"],
+                               namesAbbr: ["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],
+                               namesShort: ["Κυ","Δε","Τρ","Τε","Πε","Πα","Σά"]
+                       },
+                       months: {
+                               names: ["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος",""],
+                               namesAbbr: ["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ",""]
+                       },
+                       monthsGenitive: {
+                               names: ["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου",""],
+                               namesAbbr: ["Ιαν","Φεβ","Μαρ","Απρ","Μαϊ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ",""]
+                       },
+                       AM: ["πμ","πμ","ΠΜ"],
+                       PM: ["μμ","μμ","ΜΜ"],
+                       eras: [{"name":"μ.Χ.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd, d MMMM yyyy",
+                               f: "dddd, d MMMM yyyy h:mm tt",
+                               F: "dddd, d MMMM yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-US", "default", {
+       name: "en-US",
+       englishName: "English (United States)"
+});
+
+Globalize.addCultureInfo( "fi-FI", "default", {
+       name: "fi-FI",
+       englishName: "Finnish (Finland)",
+       nativeName: "suomi (Suomi)",
+       language: "fi",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"],
+                               namesAbbr: ["su","ma","ti","ke","to","pe","la"],
+                               namesShort: ["su","ma","ti","ke","to","pe","la"]
+                       },
+                       months: {
+                               names: ["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu",""],
+                               namesAbbr: ["tammi","helmi","maalis","huhti","touko","kesä","heinä","elo","syys","loka","marras","joulu",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM'ta 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM'ta 'yyyy H:mm",
+                               F: "d. MMMM'ta 'yyyy H:mm:ss",
+                               M: "d. MMMM'ta'",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fr-FR", "default", {
+       name: "fr-FR",
+       englishName: "French (France)",
+       nativeName: "français (France)",
+       language: "fr",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "he-IL", "default", {
+       name: "he-IL",
+       englishName: "Hebrew (Israel)",
+       nativeName: "עברית (ישראל)",
+       language: "he",
+       isRTL: true,
+       numberFormat: {
+               NaN: "לא מספר",
+               negativeInfinity: "אינסוף שלילי",
+               positiveInfinity: "אינסוף חיובי",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "₪"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"],
+                               namesAbbr: ["יום א","יום ב","יום ג","יום ד","יום ה","יום ו","שבת"],
+                               namesShort: ["א","ב","ג","ד","ה","ו","ש"]
+                       },
+                       months: {
+                               names: ["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר",""],
+                               namesAbbr: ["ינו","פבר","מרץ","אפר","מאי","יונ","יול","אוג","ספט","אוק","נוב","דצמ",""]
+                       },
+                       eras: [{"name":"לספירה","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd dd MMMM yyyy HH:mm",
+                               F: "dddd dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               },
+               Hebrew: {
+                       name: "Hebrew",
+                       "/": " ",
+                       days: {
+                               names: ["יום ראשון","יום שני","יום שלישי","יום רביעי","יום חמישי","יום שישי","שבת"],
+                               namesAbbr: ["א","ב","ג","ד","ה","ו","ש"],
+                               namesShort: ["א","ב","ג","ד","ה","ו","ש"]
+                       },
+                       months: {
+                               names: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"],
+                               namesAbbr: ["תשרי","חשון","כסלו","טבת","שבט","אדר","אדר ב","ניסן","אייר","סיון","תמוז","אב","אלול"]
+                       },
+                       eras: [{"name":"C.E.","start":null,"offset":0}],
+                       twoDigitYearMax: 5790,
+                       patterns: {
+                               d: "dd MMMM yyyy",
+                               D: "dddd dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd dd MMMM yyyy HH:mm",
+                               F: "dddd dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "hu-HU", "default", {
+       name: "hu-HU",
+       englishName: "Hungarian (Hungary)",
+       nativeName: "magyar (Magyarország)",
+       language: "hu",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "nem szám",
+               negativeInfinity: "negatív végtelen",
+               positiveInfinity: "végtelen",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Ft"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"],
+                               namesAbbr: ["V","H","K","Sze","Cs","P","Szo"],
+                               namesShort: ["V","H","K","Sze","Cs","P","Szo"]
+                       },
+                       months: {
+                               names: ["január","február","március","április","május","június","július","augusztus","szeptember","október","november","december",""],
+                               namesAbbr: ["jan.","febr.","márc.","ápr.","máj.","jún.","júl.","aug.","szept.","okt.","nov.","dec.",""]
+                       },
+                       AM: ["de.","de.","DE."],
+                       PM: ["du.","du.","DU."],
+                       eras: [{"name":"i.sz.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy.MM.dd.",
+                               D: "yyyy. MMMM d.",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy. MMMM d. H:mm",
+                               F: "yyyy. MMMM d. H:mm:ss",
+                               M: "MMMM d.",
+                               Y: "yyyy. MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "is-IS", "default", {
+       name: "is-IS",
+       englishName: "Icelandic (Iceland)",
+       nativeName: "íslenska (Ísland)",
+       language: "is",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       decimals: 0,
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sunnudagur","mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur"],
+                               namesAbbr: ["sun.","mán.","þri.","mið.","fim.","fös.","lau."],
+                               namesShort: ["su","má","þr","mi","fi","fö","la"]
+                       },
+                       months: {
+                               names: ["janúar","febrúar","mars","apríl","maí","júní","júlí","ágúst","september","október","nóvember","desember",""],
+                               namesAbbr: ["jan.","feb.","mar.","apr.","maí","jún.","júl.","ágú.","sep.","okt.","nóv.","des.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "it-IT", "default", {
+       name: "it-IT",
+       englishName: "Italian (Italy)",
+       nativeName: "italiano (Italia)",
+       language: "it",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "Non un numero reale",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "+Infinito",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],
+                               namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"],
+                               namesShort: ["do","lu","ma","me","gi","ve","sa"]
+                       },
+                       months: {
+                               names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],
+                               namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ja-JP", "default", {
+       name: "ja-JP",
+       englishName: "Japanese (Japan)",
+       nativeName: "日本語 (日本)",
+       language: "ja",
+       numberFormat: {
+               NaN: "NaN (非数値)",
+               negativeInfinity: "-∞",
+               positiveInfinity: "+∞",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       decimals: 0,
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+                               namesAbbr: ["日","月","火","水","木","金","土"],
+                               namesShort: ["日","月","火","水","木","金","土"]
+                       },
+                       months: {
+                               names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["午前","午前","午前"],
+                       PM: ["午後","午後","午後"],
+                       eras: [{"name":"西暦","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               },
+               Japanese: {
+                       name: "Japanese",
+                       days: {
+                               names: ["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],
+                               namesAbbr: ["日","月","火","水","木","金","土"],
+                               namesShort: ["日","月","火","水","木","金","土"]
+                       },
+                       months: {
+                               names: ["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["午前","午前","午前"],
+                       PM: ["午後","午後","午後"],
+                       eras: [{"name":"平成","start":null,"offset":1867},{"name":"昭和","start":-1812153600000,"offset":1911},{"name":"大正","start":-1357603200000,"offset":1925},{"name":"明治","start":60022080000,"offset":1988}],
+                       twoDigitYearMax: 99,
+                       patterns: {
+                               d: "gg y/M/d",
+                               D: "gg y'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "gg y'年'M'月'd'日' H:mm",
+                               F: "gg y'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "gg y'年'M'月'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ko-KR", "default", {
+       name: "ko-KR",
+       englishName: "Korean (Korea)",
+       nativeName: "한국어 (대한민국)",
+       language: "ko",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       decimals: 0,
+                       symbol: "₩"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],
+                               namesAbbr: ["일","월","화","수","목","금","토"],
+                               namesShort: ["일","월","화","수","목","금","토"]
+                       },
+                       months: {
+                               names: ["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["오전","오전","오전"],
+                       PM: ["오후","오후","오후"],
+                       eras: [{"name":"서기","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "yyyy'년' M'월' d'일' dddd",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "yyyy'년' M'월' d'일' dddd tt h:mm",
+                               F: "yyyy'년' M'월' d'일' dddd tt h:mm:ss",
+                               M: "M'월' d'일'",
+                               Y: "yyyy'년' M'월'"
+                       }
+               },
+               Korean: {
+                       name: "Korean",
+                       "/": "-",
+                       days: {
+                               names: ["일요일","월요일","화요일","수요일","목요일","금요일","토요일"],
+                               namesAbbr: ["일","월","화","수","목","금","토"],
+                               namesShort: ["일","월","화","수","목","금","토"]
+                       },
+                       months: {
+                               names: ["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: ["오전","오전","오전"],
+                       PM: ["오후","오후","오후"],
+                       eras: [{"name":"단기","start":null,"offset":-2333}],
+                       twoDigitYearMax: 4362,
+                       patterns: {
+                               d: "gg yyyy-MM-dd",
+                               D: "gg yyyy'년' M'월' d'일' dddd",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "gg yyyy'년' M'월' d'일' dddd tt h:mm",
+                               F: "gg yyyy'년' M'월' d'일' dddd tt h:mm:ss",
+                               M: "M'월' d'일'",
+                               Y: "gg yyyy'년' M'월'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "nl-NL", "default", {
+       name: "nl-NL",
+       englishName: "Dutch (Netherlands)",
+       nativeName: "Nederlands (Nederland)",
+       language: "nl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],
+                               namesAbbr: ["zo","ma","di","wo","do","vr","za"],
+                               namesShort: ["zo","ma","di","wo","do","vr","za"]
+                       },
+                       months: {
+                               names: ["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d-M-yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd d MMMM yyyy H:mm",
+                               F: "dddd d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "nb-NO", "default", {
+       name: "nb-NO",
+       englishName: "Norwegian, Bokmål (Norway)",
+       nativeName: "norsk, bokmål (Norge)",
+       language: "nb",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],
+                               namesAbbr: ["sø","ma","ti","on","to","fr","lø"],
+                               namesShort: ["sø","ma","ti","on","to","fr","lø"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "pl-PL", "default", {
+       name: "pl-PL",
+       englishName: "Polish (Poland)",
+       nativeName: "polski (Polska)",
+       language: "pl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "nie jest liczbą",
+               negativeInfinity: "-nieskończoność",
+               positiveInfinity: "+nieskończoność",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "zł"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"],
+                               namesAbbr: ["N","Pn","Wt","Śr","Cz","Pt","So"],
+                               namesShort: ["N","Pn","Wt","Śr","Cz","Pt","So"]
+                       },
+                       months: {
+                               names: ["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień",""],
+                               namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""]
+                       },
+                       monthsGenitive: {
+                               names: ["stycznia","lutego","marca","kwietnia","maja","czerwca","lipca","sierpnia","września","października","listopada","grudnia",""],
+                               namesAbbr: ["sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "pt-BR", "default", {
+       name: "pt-BR",
+       englishName: "Portuguese (Brazil)",
+       nativeName: "Português (Brasil)",
+       language: "pt",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NaN (Não é um número)",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "+Infinito",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "R$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],
+                               namesAbbr: ["dom","seg","ter","qua","qui","sex","sáb"],
+                               namesShort: ["D","S","T","Q","Q","S","S"]
+                       },
+                       months: {
+                               names: ["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro",""],
+                               namesAbbr: ["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d' de 'MMMM' de 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' de 'MMMM' de 'yyyy HH:mm",
+                               F: "dddd, d' de 'MMMM' de 'yyyy HH:mm:ss",
+                               M: "dd' de 'MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "rm-CH", "default", {
+       name: "rm-CH",
+       englishName: "Romansh (Switzerland)",
+       nativeName: "Rumantsch (Svizra)",
+       language: "rm",
+       numberFormat: {
+               ",": "'",
+               NaN: "betg def.",
+               negativeInfinity: "-infinit",
+               positiveInfinity: "+infinit",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": "'"
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": "'",
+                       symbol: "fr."
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dumengia","glindesdi","mardi","mesemna","gievgia","venderdi","sonda"],
+                               namesAbbr: ["du","gli","ma","me","gie","ve","so"],
+                               namesShort: ["du","gli","ma","me","gie","ve","so"]
+                       },
+                       months: {
+                               names: ["schaner","favrer","mars","avrigl","matg","zercladur","fanadur","avust","settember","october","november","december",""],
+                               namesAbbr: ["schan","favr","mars","avr","matg","zercl","fan","avust","sett","oct","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"s. Cr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d MMMM yyyy HH:mm",
+                               F: "dddd, d MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ro-RO", "default", {
+       name: "ro-RO",
+       englishName: "Romanian (Romania)",
+       nativeName: "română (România)",
+       language: "ro",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "lei"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["duminică","luni","marţi","miercuri","joi","vineri","sâmbătă"],
+                               namesAbbr: ["D","L","Ma","Mi","J","V","S"],
+                               namesShort: ["D","L","Ma","Mi","J","V","S"]
+                       },
+                       months: {
+                               names: ["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie",""],
+                               namesAbbr: ["ian.","feb.","mar.","apr.","mai.","iun.","iul.","aug.","sep.","oct.","nov.","dec.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ru-RU", "default", {
+       name: "ru-RU",
+       englishName: "Russian (Russia)",
+       nativeName: "русский (Россия)",
+       language: "ru",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"],
+                               namesAbbr: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],
+                               namesShort: ["Вс","Пн","Вт","Ср","Чт","Пт","Сб"]
+                       },
+                       months: {
+                               names: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],
+                               namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря",""],
+                               namesAbbr: ["янв","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy 'г.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy 'г.' H:mm",
+                               F: "d MMMM yyyy 'г.' H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "hr-HR", "default", {
+       name: "hr-HR",
+       englishName: "Croatian (Croatia)",
+       nativeName: "hrvatski (Hrvatska)",
+       language: "hr",
+       numberFormat: {
+               pattern: ["- n"],
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kn"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""],
+                               namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+                       },
+                       monthsGenitive: {
+                               names: ["siječnja","veljače","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""],
+                               namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy.",
+                               D: "d. MMMM yyyy.",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy. H:mm",
+                               F: "d. MMMM yyyy. H:mm:ss",
+                               M: "d. MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sk-SK", "default", {
+       name: "sk-SK",
+       englishName: "Slovak (Slovakia)",
+       nativeName: "slovenčina (Slovenská republika)",
+       language: "sk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Nie je číslo",
+               negativeInfinity: "-nekonečno",
+               positiveInfinity: "+nekonečno",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ". ",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedeľa","pondelok","utorok","streda","štvrtok","piatok","sobota"],
+                               namesAbbr: ["ne","po","ut","st","št","pi","so"],
+                               namesShort: ["ne","po","ut","st","št","pi","so"]
+                       },
+                       months: {
+                               names: ["január","február","marec","apríl","máj","jún","júl","august","september","október","november","december",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       monthsGenitive: {
+                               names: ["januára","februára","marca","apríla","mája","júna","júla","augusta","septembra","októbra","novembra","decembra",""],
+                               namesAbbr: ["1","2","3","4","5","6","7","8","9","10","11","12",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. l.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d. M. yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sq-AL", "default", {
+       name: "sq-AL",
+       englishName: "Albanian (Albania)",
+       nativeName: "shqipe (Shqipëria)",
+       language: "sq",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-infinit",
+               positiveInfinity: "infinit",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Lek"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["e diel","e hënë","e martë","e mërkurë","e enjte","e premte","e shtunë"],
+                               namesAbbr: ["Die","Hën","Mar","Mër","Enj","Pre","Sht"],
+                               namesShort: ["Di","Hë","Ma","Më","En","Pr","Sh"]
+                       },
+                       months: {
+                               names: ["janar","shkurt","mars","prill","maj","qershor","korrik","gusht","shtator","tetor","nëntor","dhjetor",""],
+                               namesAbbr: ["Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gsh","Sht","Tet","Nën","Dhj",""]
+                       },
+                       AM: ["PD","pd","PD"],
+                       PM: ["MD","md","MD"],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "yyyy-MM-dd",
+                               t: "h:mm.tt",
+                               T: "h:mm:ss.tt",
+                               f: "yyyy-MM-dd h:mm.tt",
+                               F: "yyyy-MM-dd h:mm:ss.tt",
+                               Y: "yyyy-MM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sv-SE", "default", {
+       name: "sv-SE",
+       englishName: "Swedish (Sweden)",
+       nativeName: "svenska (Sverige)",
+       language: "sv",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],
+                               namesAbbr: ["sö","må","ti","on","to","fr","lö"],
+                               namesShort: ["sö","må","ti","on","to","fr","lö"]
+                       },
+                       months: {
+                               names: ["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "'den 'd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "'den 'd MMMM yyyy HH:mm",
+                               F: "'den 'd MMMM yyyy HH:mm:ss",
+                               M: "'den 'd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "th-TH", "default", {
+       name: "th-TH",
+       englishName: "Thai (Thailand)",
+       nativeName: "ไทย (ไทย)",
+       language: "th",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "฿"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "ThaiBuddhist",
+                       firstDay: 1,
+                       days: {
+                               names: ["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],
+                               namesAbbr: ["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],
+                               namesShort: ["อ","จ","อ","พ","พ","ศ","ส"]
+                       },
+                       months: {
+                               names: ["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม",""],
+                               namesAbbr: ["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.",""]
+                       },
+                       eras: [{"name":"พ.ศ.","start":null,"offset":-543}],
+                       twoDigitYearMax: 2572,
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 1,
+                       days: {
+                               names: ["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์"],
+                               namesAbbr: ["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],
+                               namesShort: ["อ","จ","อ","พ","พ","ศ","ส"]
+                       },
+                       months: {
+                               names: ["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม",""],
+                               namesAbbr: ["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.",""]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "'วัน'dddd'ที่' d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "'วัน'dddd'ที่' d MMMM yyyy H:mm",
+                               F: "'วัน'dddd'ที่' d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tr-TR", "default", {
+       name: "tr-TR",
+       englishName: "Turkish (Turkey)",
+       nativeName: "Türkçe (Türkiye)",
+       language: "tr",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "TL"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"],
+                               namesAbbr: ["Paz","Pzt","Sal","Çar","Per","Cum","Cmt"],
+                               namesShort: ["Pz","Pt","Sa","Ça","Pe","Cu","Ct"]
+                       },
+                       months: {
+                               names: ["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık",""],
+                               namesAbbr: ["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dd MMMM yyyy dddd",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy dddd HH:mm",
+                               F: "dd MMMM yyyy dddd HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ur-PK", "default", {
+       name: "ur-PK",
+       englishName: "Urdu (Islamic Republic of Pakistan)",
+       nativeName: "اُردو (پاکستان)",
+       language: "ur",
+       isRTL: true,
+       numberFormat: {
+               currency: {
+                       pattern: ["$n-","$n"],
+                       symbol: "Rs"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","هفته"],
+                               namesAbbr: ["اتوار","پير","منگل","بدھ","جمعرات","جمعه","هفته"],
+                               namesShort: ["ا","پ","م","ب","ج","ج","ه"]
+                       },
+                       months: {
+                               names: ["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""],
+                               namesAbbr: ["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر",""]
+                       },
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               f: "dd MMMM, yyyy h:mm tt",
+                               F: "dd MMMM, yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               f: "dd/MM/yyyy h:mm tt",
+                               F: "dd/MM/yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "id-ID", "default", {
+       name: "id-ID",
+       englishName: "Indonesian (Indonesia)",
+       nativeName: "Bahasa Indonesia (Indonesia)",
+       language: "id",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       decimals: 0,
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Rp"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"],
+                               namesAbbr: ["Minggu","Sen","Sel","Rabu","Kamis","Jumat","Sabtu"],
+                               namesShort: ["M","S","S","R","K","J","S"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","Nopember","Desember",""],
+                               namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agust","Sep","Okt","Nop","Des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM yyyy H:mm",
+                               F: "dd MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "uk-UA", "default", {
+       name: "uk-UA",
+       englishName: "Ukrainian (Ukraine)",
+       nativeName: "українська (Україна)",
+       language: "uk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-безмежність",
+               positiveInfinity: "безмежність",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "₴"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["неділя","понеділок","вівторок","середа","четвер","п'ятниця","субота"],
+                               namesAbbr: ["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],
+                               namesShort: ["Нд","Пн","Вт","Ср","Чт","Пт","Сб"]
+                       },
+                       months: {
+                               names: ["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень",""],
+                               namesAbbr: ["Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру",""]
+                       },
+                       monthsGenitive: {
+                               names: ["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня",""],
+                               namesAbbr: ["січ","лют","бер","кві","тра","чер","лип","сер","вер","жов","лис","гру",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy' р.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy' р.' H:mm",
+                               F: "d MMMM yyyy' р.' H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy' р.'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "be-BY", "default", {
+       name: "be-BY",
+       englishName: "Belarusian (Belarus)",
+       nativeName: "Беларускі (Беларусь)",
+       language: "be",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["нядзеля","панядзелак","аўторак","серада","чацвер","пятніца","субота"],
+                               namesAbbr: ["нд","пн","аў","ср","чц","пт","сб"],
+                               namesShort: ["нд","пн","аў","ср","чц","пт","сб"]
+                       },
+                       months: {
+                               names: ["Студзень","Люты","Сакавік","Красавік","Май","Чэрвень","Ліпень","Жнівень","Верасень","Кастрычнік","Лістапад","Снежань",""],
+                               namesAbbr: ["Сту","Лют","Сак","Кра","Май","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне",""]
+                       },
+                       monthsGenitive: {
+                               names: ["студзеня","лютага","сакавіка","красавіка","мая","чэрвеня","ліпеня","жніўня","верасня","кастрычніка","лістапада","снежня",""],
+                               namesAbbr: ["Сту","Лют","Сак","Кра","Май","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sl-SI", "default", {
+       name: "sl-SI",
+       englishName: "Slovenian (Slovenia)",
+       nativeName: "slovenski (Slovenija)",
+       language: "sl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-neskončnost",
+               positiveInfinity: "neskončnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljek","torek","sreda","četrtek","petek","sobota"],
+                               namesAbbr: ["ned","pon","tor","sre","čet","pet","sob"],
+                               namesShort: ["ne","po","to","sr","če","pe","so"]
+                       },
+                       months: {
+                               names: ["januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "et-EE", "default", {
+       name: "et-EE",
+       englishName: "Estonian (Estonia)",
+       nativeName: "eesti (Eesti)",
+       language: "et",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "avaldamatu",
+               negativeInfinity: "miinuslõpmatus",
+               positiveInfinity: "plusslõpmatus",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["pühapäev","esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev"],
+                               namesAbbr: ["P","E","T","K","N","R","L"],
+                               namesShort: ["P","E","T","K","N","R","L"]
+                       },
+                       months: {
+                               names: ["jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember",""],
+                               namesAbbr: ["jaan","veebr","märts","apr","mai","juuni","juuli","aug","sept","okt","nov","dets",""]
+                       },
+                       AM: ["EL","el","EL"],
+                       PM: ["PL","pl","PL"],
+                       patterns: {
+                               d: "d.MM.yyyy",
+                               D: "d. MMMM yyyy'. a.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy'. a.' H:mm",
+                               F: "d. MMMM yyyy'. a.' H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy'. a.'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "lv-LV", "default", {
+       name: "lv-LV",
+       englishName: "Latvian (Latvia)",
+       nativeName: "latviešu (Latvija)",
+       language: "lv",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-bezgalība",
+               positiveInfinity: "bezgalība",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Ls"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["svētdiena","pirmdiena","otrdiena","trešdiena","ceturtdiena","piektdiena","sestdiena"],
+                               namesAbbr: ["sv","pr","ot","tr","ce","pk","se"],
+                               namesShort: ["sv","pr","ot","tr","ce","pk","se"]
+                       },
+                       months: {
+                               names: ["janvāris","februāris","marts","aprīlis","maijs","jūnijs","jūlijs","augusts","septembris","oktobris","novembris","decembris",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jūn","jūl","aug","sep","okt","nov","dec",""]
+                       },
+                       monthsGenitive: {
+                               names: ["janvārī","februārī","martā","aprīlī","maijā","jūnijā","jūlijā","augustā","septembrī","oktobrī","novembrī","decembrī",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jūn","jūl","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy.MM.dd.",
+                               D: "dddd, yyyy'. gada 'd. MMMM",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, yyyy'. gada 'd. MMMM H:mm",
+                               F: "dddd, yyyy'. gada 'd. MMMM H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "yyyy. MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "lt-LT", "default", {
+       name: "lt-LT",
+       englishName: "Lithuanian (Lithuania)",
+       nativeName: "lietuvių (Lietuva)",
+       language: "lt",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-begalybė",
+               positiveInfinity: "begalybė",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Lt"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sekmadienis","pirmadienis","antradienis","trečiadienis","ketvirtadienis","penktadienis","šeštadienis"],
+                               namesAbbr: ["Sk","Pr","An","Tr","Kt","Pn","Št"],
+                               namesShort: ["S","P","A","T","K","Pn","Š"]
+                       },
+                       months: {
+                               names: ["sausis","vasaris","kovas","balandis","gegužė","birželis","liepa","rugpjūtis","rugsėjis","spalis","lapkritis","gruodis",""],
+                               namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""]
+                       },
+                       monthsGenitive: {
+                               names: ["sausio","vasario","kovo","balandžio","gegužės","birželio","liepos","rugpjūčio","rugsėjo","spalio","lapkričio","gruodžio",""],
+                               namesAbbr: ["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spl","Lap","Grd",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy.MM.dd",
+                               D: "yyyy 'm.' MMMM d 'd.'",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'm.' MMMM d 'd.' HH:mm",
+                               F: "yyyy 'm.' MMMM d 'd.' HH:mm:ss",
+                               M: "MMMM d 'd.'",
+                               Y: "yyyy 'm.' MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tg-Cyrl-TJ", "default", {
+       name: "tg-Cyrl-TJ",
+       englishName: "Tajik (Cyrillic, Tajikistan)",
+       nativeName: "Тоҷикӣ (Тоҷикистон)",
+       language: "tg-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ";",
+                       symbol: "т.р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       days: {
+                               names: ["Яш","Душанбе","Сешанбе","Чоршанбе","Панҷшанбе","Ҷумъа","Шанбе"],
+                               namesAbbr: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"],
+                               namesShort: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"]
+                       },
+                       months: {
+                               names: ["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["январи","феврали","марти","апрели","маи","июни","июли","августи","сентябри","октябри","ноябри","декабри",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fa-IR", "default", {
+       name: "fa-IR",
+       englishName: "Persian",
+       nativeName: "فارسى (ایران)",
+       language: "fa",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       ".": "/",
+                       symbol: "ريال"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 6,
+                       days: {
+                               names: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesAbbr: ["يكشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesShort: ["ی","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["ژانويه","فوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اُكتبر","نوامبر","دسامبر",""],
+                               namesAbbr: ["ژانويه","فوريه","مارس","آوريل","مى","ژوئن","ژوئيه","اوت","سپتامبر","اُكتبر","نوامبر","دسامبر",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "yyyy/MM/dd",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "yyyy/MM/dd hh:mm tt",
+                               F: "yyyy/MM/dd hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ق.ظ","ق.ظ","ق.ظ"],
+                       PM: ["ب.ظ","ب.ظ","ب.ظ"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "vi-VN", "default", {
+       name: "vi-VN",
+       englishName: "Vietnamese (Vietnam)",
+       nativeName: "Tiếng Việt (Việt Nam)",
+       language: "vi",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "₫"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Chủ Nhật","Thứ Hai","Thứ Ba","Thứ Tư","Thứ Năm","Thứ Sáu","Thứ Bảy"],
+                               namesAbbr: ["CN","Hai","Ba","Tư","Năm","Sáu","Bảy"],
+                               namesShort: ["C","H","B","T","N","S","B"]
+                       },
+                       months: {
+                               names: ["Tháng Giêng","Tháng Hai","Tháng Ba","Tháng Tư","Tháng Năm","Tháng Sáu","Tháng Bảy","Tháng Tám","Tháng Chín","Tháng Mười","Tháng Mười Một","Tháng Mười Hai",""],
+                               namesAbbr: ["Thg1","Thg2","Thg3","Thg4","Thg5","Thg6","Thg7","Thg8","Thg9","Thg10","Thg11","Thg12",""]
+                       },
+                       AM: ["SA","sa","SA"],
+                       PM: ["CH","ch","CH"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               f: "dd MMMM yyyy h:mm tt",
+                               F: "dd MMMM yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "hy-AM", "default", {
+       name: "hy-AM",
+       englishName: "Armenian (Armenia)",
+       nativeName: "Հայերեն (Հայաստան)",
+       language: "hy",
+       numberFormat: {
+               currency: {
+                       pattern: ["-n $","n $"],
+                       symbol: "դր."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Կիրակի","Երկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","ՈՒրբաթ","Շաբաթ"],
+                               namesAbbr: ["Կիր","Երկ","Երք","Չրք","Հնգ","ՈՒր","Շբթ"],
+                               namesShort: ["Կ","Ե","Ե","Չ","Հ","Ո","Շ"]
+                       },
+                       months: {
+                               names: ["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր",""],
+                               namesAbbr: ["ՀՆՎ","ՓՏՎ","ՄՐՏ","ԱՊՐ","ՄՅՍ","ՀՆՍ","ՀԼՍ","ՕԳՍ","ՍԵՊ","ՀՈԿ","ՆՈՅ","ԴԵԿ",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM, yyyy H:mm",
+                               F: "d MMMM, yyyy H:mm:ss",
+                               M: "d MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "az-Latn-AZ", "default", {
+       name: "az-Latn-AZ",
+       englishName: "Azeri (Latin, Azerbaijan)",
+       nativeName: "Azərbaycan­ılı (Azərbaycan)",
+       language: "az-Latn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "man."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"],
+                               namesAbbr: ["B","Be","Ça","Ç","Ca","C","Ş"],
+                               namesShort: ["B","Be","Ça","Ç","Ca","C","Ş"]
+                       },
+                       months: {
+                               names: ["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avgust","Sentyabr","Oktyabr","Noyabr","Dekabr",""],
+                               namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""]
+                       },
+                       monthsGenitive: {
+                               names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""],
+                               namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "eu-ES", "default", {
+       name: "eu-ES",
+       englishName: "Basque (Basque)",
+       nativeName: "euskara (euskara)",
+       language: "eu",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "EdZ",
+               negativeInfinity: "-Infinitu",
+               positiveInfinity: "Infinitu",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["igandea","astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata"],
+                               namesAbbr: ["ig.","al.","as.","az.","og.","or.","lr."],
+                               namesShort: ["ig","al","as","az","og","or","lr"]
+                       },
+                       months: {
+                               names: ["urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua",""],
+                               namesAbbr: ["urt.","ots.","mar.","api.","mai.","eka.","uzt.","abu.","ira.","urr.","aza.","abe.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dddd, yyyy.'eko' MMMM'k 'd",
+                               t: "HH:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, yyyy.'eko' MMMM'k 'd HH:mm",
+                               F: "dddd, yyyy.'eko' MMMM'k 'd H:mm:ss",
+                               Y: "yyyy.'eko' MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "hsb-DE", "default", {
+       name: "hsb-DE",
+       englishName: "Upper Sorbian (Germany)",
+       nativeName: "hornjoserbšćina (Němska)",
+       language: "hsb",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "njedefinowane",
+               negativeInfinity: "-njekónčne",
+               positiveInfinity: "+njekónčne",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ". ",
+                       firstDay: 1,
+                       days: {
+                               names: ["njedźela","póndźela","wutora","srjeda","štwórtk","pjatk","sobota"],
+                               namesAbbr: ["nje","pón","wut","srj","štw","pja","sob"],
+                               namesShort: ["n","p","w","s","š","p","s"]
+                       },
+                       months: {
+                               names: ["januar","februar","měrc","apryl","meja","junij","julij","awgust","september","oktober","nowember","december",""],
+                               namesAbbr: ["jan","feb","měr","apr","mej","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       monthsGenitive: {
+                               names: ["januara","februara","měrca","apryla","meje","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""],
+                               namesAbbr: ["jan","feb","měr","apr","mej","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"po Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d. M. yyyy",
+                               D: "dddd, 'dnja' d. MMMM yyyy",
+                               t: "H.mm 'hodź.'",
+                               T: "H:mm:ss",
+                               f: "dddd, 'dnja' d. MMMM yyyy H.mm 'hodź.'",
+                               F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "mk-MK", "default", {
+       name: "mk-MK",
+       englishName: "Macedonian (Former Yugoslav Republic of Macedonia)",
+       nativeName: "македонски јазик (Македонија)",
+       language: "mk",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "ден."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недела","понеделник","вторник","среда","четврток","петок","сабота"],
+                               namesAbbr: ["нед","пон","втр","срд","чет","пет","саб"],
+                               namesShort: ["не","по","вт","ср","че","пе","са"]
+                       },
+                       months: {
+                               names: ["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември",""],
+                               namesAbbr: ["јан","фев","мар","апр","мај","јун","јул","авг","сеп","окт","ное","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, dd MMMM yyyy HH:mm",
+                               F: "dddd, dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tn-ZA", "default", {
+       name: "tn-ZA",
+       englishName: "Setswana (South Africa)",
+       nativeName: "Setswana (Aforika Borwa)",
+       language: "tn",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Latshipi","Mosupologo","Labobedi","Laboraro","Labone","Labotlhano","Lamatlhatso"],
+                               namesAbbr: ["Ltp.","Mos.","Lbd.","Lbr.","Lbn.","Lbt.","Lmt."],
+                               namesShort: ["Lp","Ms","Lb","Lr","Ln","Lt","Lm"]
+                       },
+                       months: {
+                               names: ["Ferikgong","Tlhakole","Mopitloe","Moranang","Motsheganong","Seetebosigo","Phukwi","Phatwe","Lwetse","Diphalane","Ngwanatsele","Sedimothole",""],
+                               namesAbbr: ["Fer.","Tlhak.","Mop.","Mor.","Motsh.","Seet.","Phukw.","Phatw.","Lwets.","Diph.","Ngwan.","Sed.",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "xh-ZA", "default", {
+       name: "xh-ZA",
+       englishName: "isiXhosa (South Africa)",
+       nativeName: "isiXhosa (uMzantsi Afrika)",
+       language: "xh",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["iCawa","uMvulo","uLwesibini","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"],
+                               namesShort: ["Ca","Mv","Lb","Lt","Ln","Lh","Mg"]
+                       },
+                       months: {
+                               names: ["Mqungu","Mdumba","Kwindla","Tshazimpuzi","Canzibe","Silimela","Khala","Thupha","Msintsi","Dwarha","Nkanga","Mnga",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "zu-ZA", "default", {
+       name: "zu-ZA",
+       englishName: "isiZulu (South Africa)",
+       nativeName: "isiZulu (iNingizimu Afrika)",
+       language: "zu",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["iSonto","uMsombuluko","uLwesibili","uLwesithathu","uLwesine","uLwesihlanu","uMgqibelo"],
+                               namesAbbr: ["Son.","Mso.","Bi.","Tha.","Ne.","Hla.","Mgq."]
+                       },
+                       months: {
+                               names: ["uMasingana","uNhlolanja","uNdasa","uMbaso","uNhlaba","uNhlangulana","uNtulikazi","uNcwaba","uMandulo","uMfumfu","uLwezi","uZibandlela",""],
+                               namesAbbr: ["Mas.","Nhlo.","Nda.","Mba.","Nhla.","Nhlang.","Ntu.","Ncwa.","Man.","Mfu.","Lwe.","Zib.",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "af-ZA", "default", {
+       name: "af-ZA",
+       englishName: "Afrikaans (South Africa)",
+       nativeName: "Afrikaans (Suid Afrika)",
+       language: "af",
+       numberFormat: {
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrydag","Saterdag"],
+                               namesAbbr: ["Son","Maan","Dins","Woen","Dond","Vry","Sat"],
+                               namesShort: ["So","Ma","Di","Wo","Do","Vr","Sa"]
+                       },
+                       months: {
+                               names: ["Januarie","Februarie","Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","November","Desember",""],
+                               namesAbbr: ["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Des",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ka-GE", "default", {
+       name: "ka-GE",
+       englishName: "Georgian (Georgia)",
+       nativeName: "ქართული (საქართველო)",
+       language: "ka",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "Lari"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],
+                               namesAbbr: ["კვირა","ორშაბათი","სამშაბათი","ოთხშაბათი","ხუთშაბათი","პარასკევი","შაბათი"],
+                               namesShort: ["კ","ო","ს","ო","ხ","პ","შ"]
+                       },
+                       months: {
+                               names: ["იანვარი","თებერვალი","მარტი","აპრილი","მაისი","ივნისი","ივლისი","აგვისტო","სექტემბერი","ოქტომბერი","ნოემბერი","დეკემბერი",""],
+                               namesAbbr: ["იან","თებ","მარ","აპრ","მაის","ივნ","ივლ","აგვ","სექ","ოქტ","ნოემ","დეკ",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "yyyy 'წლის' dd MM, dddd",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'წლის' dd MM, dddd H:mm",
+                               F: "yyyy 'წლის' dd MM, dddd H:mm:ss",
+                               M: "dd MM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fo-FO", "default", {
+       name: "fo-FO",
+       englishName: "Faroese (Faroe Islands)",
+       nativeName: "føroyskt (Føroyar)",
+       language: "fo",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["sunnudagur","mánadagur","týsdagur","mikudagur","hósdagur","fríggjadagur","leygardagur"],
+                               namesAbbr: ["sun","mán","týs","mik","hós","frí","leyg"],
+                               namesShort: ["su","má","tý","mi","hó","fr","ley"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","apríl","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "hi-IN", "default", {
+       name: "hi-IN",
+       englishName: "Hindi (India)",
+       nativeName: "हिंदी (भारत)",
+       language: "hi",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["रविवार","सोमवार","मंगलवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],
+                               namesAbbr: ["रवि.","सोम.","मंगल.","बुध.","गुरु.","शुक्र.","शनि."],
+                               namesShort: ["र","स","म","ब","ग","श","श"]
+                       },
+                       months: {
+                               names: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""],
+                               namesAbbr: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""]
+                       },
+                       AM: ["पूर्वाह्न","पूर्वाह्न","पूर्वाह्न"],
+                       PM: ["अपराह्न","अपराह्न","अपराह्न"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "mt-MT", "default", {
+       name: "mt-MT",
+       englishName: "Maltese (Malta)",
+       nativeName: "Malti (Malta)",
+       language: "mt",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Il-Ħadd","It-Tnejn","It-Tlieta","L-Erbgħa","Il-Ħamis","Il-Ġimgħa","Is-Sibt"],
+                               namesAbbr: ["Ħad","Tne","Tli","Erb","Ħam","Ġim","Sib"],
+                               namesShort: ["I","I","I","L","I","I","I"]
+                       },
+                       months: {
+                               names: ["Jannar","Frar","Marzu","April","Mejju","Ġunju","Lulju","Awissu","Settembru","Ottubru","Novembru","Diċembru",""],
+                               namesAbbr: ["Jan","Fra","Mar","Apr","Mej","Ġun","Lul","Awi","Set","Ott","Nov","Diċ",""]
+                       },
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, d' ta\\' 'MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' ta\\' 'MMMM yyyy HH:mm",
+                               F: "dddd, d' ta\\' 'MMMM yyyy HH:mm:ss",
+                               M: "d' ta\\' 'MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "se-NO", "default", {
+       name: "se-NO",
+       englishName: "Sami, Northern (Norway)",
+       nativeName: "davvisámegiella (Norga)",
+       language: "se",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"],
+                               namesAbbr: ["sotn","vuos","maŋ","gask","duor","bear","láv"],
+                               namesShort: ["s","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ođđajagemánnu","guovvamánnu","njukčamánnu","cuoŋománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","čakčamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ođđajagimánu","guovvamánu","njukčamánu","cuoŋománu","miessemánu","geassemánu","suoidnemánu","borgemánu","čakčamánu","golggotmánu","skábmamánu","juovlamánu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ms-MY", "default", {
+       name: "ms-MY",
+       englishName: "Malay (Malaysia)",
+       nativeName: "Bahasa Melayu (Malaysia)",
+       language: "ms",
+       numberFormat: {
+               currency: {
+                       decimals: 0,
+                       symbol: "RM"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],
+                               namesAbbr: ["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"],
+                               namesShort: ["A","I","S","R","K","J","S"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember",""],
+                               namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM yyyy H:mm",
+                               F: "dd MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "kk-KZ", "default", {
+       name: "kk-KZ",
+       englishName: "Kazakh (Kazakhstan)",
+       nativeName: "Қазақ (Қазақстан)",
+       language: "kk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       ",": " ",
+                       ".": "-",
+                       symbol: "Т"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Жексенбі","Дүйсенбі","Сейсенбі","Сәрсенбі","Бейсенбі","Жұма","Сенбі"],
+                               namesAbbr: ["Жк","Дс","Сс","Ср","Бс","Жм","Сн"],
+                               namesShort: ["Жк","Дс","Сс","Ср","Бс","Жм","Сн"]
+                       },
+                       months: {
+                               names: ["қаңтар","ақпан","наурыз","сәуір","мамыр","маусым","шілде","тамыз","қыркүйек","қазан","қараша","желтоқсан",""],
+                               namesAbbr: ["Қаң","Ақп","Нау","Сәу","Мам","Мау","Шіл","Там","Қыр","Қаз","Қар","Жел",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy 'ж.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy 'ж.' H:mm",
+                               F: "d MMMM yyyy 'ж.' H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ky-KG", "default", {
+       name: "ky-KG",
+       englishName: "Kyrgyz (Kyrgyzstan)",
+       nativeName: "Кыргыз (Кыргызстан)",
+       language: "ky",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": "-",
+                       symbol: "сом"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Жекшемби","Дүйшөмбү","Шейшемби","Шаршемби","Бейшемби","Жума","Ишемби"],
+                               namesAbbr: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"],
+                               namesShort: ["Жш","Дш","Шш","Шр","Бш","Жм","Иш"]
+                       },
+                       months: {
+                               names: ["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d'-'MMMM yyyy'-ж.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d'-'MMMM yyyy'-ж.' H:mm",
+                               F: "d'-'MMMM yyyy'-ж.' H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy'-ж.'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sw-KE", "default", {
+       name: "sw-KE",
+       englishName: "Kiswahili (Kenya)",
+       nativeName: "Kiswahili (Kenya)",
+       language: "sw",
+       numberFormat: {
+               currency: {
+                       symbol: "S"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Jumapili","Jumatatu","Jumanne","Jumatano","Alhamisi","Ijumaa","Jumamosi"],
+                               namesAbbr: ["Jumap.","Jumat.","Juman.","Jumat.","Alh.","Iju.","Jumam."],
+                               namesShort: ["P","T","N","T","A","I","M"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Machi","Aprili","Mei","Juni","Julai","Agosti","Septemba","Oktoba","Novemba","Decemba",""],
+                               namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ago","Sep","Okt","Nov","Dec",""]
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tk-TM", "default", {
+       name: "tk-TM",
+       englishName: "Turkmen (Turkmenistan)",
+       nativeName: "türkmençe (Türkmenistan)",
+       language: "tk",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-üznüksizlik",
+               positiveInfinity: "üznüksizlik",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "m."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Duşenbe","Sişenbe","Çarşenbe","Penşenbe","Anna","Şenbe","Ýekşenbe"],
+                               namesAbbr: ["Db","Sb","Çb","Pb","An","Şb","Ýb"],
+                               namesShort: ["D","S","Ç","P","A","Ş","Ý"]
+                       },
+                       months: {
+                               names: ["Ýanwar","Fewral","Mart","Aprel","Maý","lýun","lýul","Awgust","Sentýabr","Oktýabr","Noýabr","Dekabr",""],
+                               namesAbbr: ["Ýan","Few","Mart","Apr","Maý","lýun","lýul","Awg","Sen","Okt","Not","Dek",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "yyyy 'ý.' MMMM d",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'ý.' MMMM d H:mm",
+                               F: "yyyy 'ý.' MMMM d H:mm:ss",
+                               Y: "yyyy 'ý.' MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "uz-Latn-UZ", "default", {
+       name: "uz-Latn-UZ",
+       englishName: "Uzbek (Latin, Uzbekistan)",
+       nativeName: "U'zbek (U'zbekiston Respublikasi)",
+       language: "uz-Latn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       decimals: 0,
+                       ",": " ",
+                       ".": ",",
+                       symbol: "so'm"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"],
+                               namesAbbr: ["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."],
+                               namesShort: ["ya","d","s","ch","p","j","sh"]
+                       },
+                       months: {
+                               names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""],
+                               namesAbbr: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM yyyy",
+                               D: "yyyy 'yil' d-MMMM",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'yil' d-MMMM HH:mm",
+                               F: "yyyy 'yil' d-MMMM HH:mm:ss",
+                               M: "d-MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tt-RU", "default", {
+       name: "tt-RU",
+       englishName: "Tatar (Russia)",
+       nativeName: "Татар (Россия)",
+       language: "tt",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Якшәмбе","Дүшәмбе","Сишәмбе","Чәршәмбе","Пәнҗешәмбе","Җомга","Шимбә"],
+                               namesAbbr: ["Якш","Дүш","Сиш","Чәрш","Пәнҗ","Җом","Шим"],
+                               namesShort: ["Я","Д","С","Ч","П","Җ","Ш"]
+                       },
+                       months: {
+                               names: ["Гыйнвар","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь",""],
+                               namesAbbr: ["Гыйн.","Фев.","Мар.","Апр.","Май","Июнь","Июль","Авг.","Сен.","Окт.","Нояб.","Дек.",""]
+                       },
+                       monthsGenitive: {
+                               names: ["Гыйнварның","Февральнең","Мартның","Апрельнең","Майның","Июньнең","Июльнең","Августның","Сентябрьның","Октябрьның","Ноябрьның","Декабрьның",""],
+                               namesAbbr: ["Гыйн.-ның","Фев.-нең","Мар.-ның","Апр.-нең","Майның","Июньнең","Июльнең","Авг.-ның","Сен.-ның","Окт.-ның","Нояб.-ның","Дек.-ның",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "bn-IN", "default", {
+       name: "bn-IN",
+       englishName: "Bengali (India)",
+       nativeName: "বাংলা (ভারত)",
+       language: "bn",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       pattern: ["-%n","%n"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "টা"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       ":": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"],
+                               namesAbbr: ["রবি.","সোম.","মঙ্গল.","বুধ.","বৃহস্পতি.","শুক্র.","শনি."],
+                               namesShort: ["র","স","ম","ব","ব","শ","শ"]
+                       },
+                       months: {
+                               names: ["জানুয়ারী","ফেব্রুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর",""],
+                               namesAbbr: ["জানু.","ফেব্রু.","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগ.","সেপ্টে.","অক্টো.","নভে.","ডিসে.",""]
+                       },
+                       AM: ["পুর্বাহ্ন","পুর্বাহ্ন","পুর্বাহ্ন"],
+                       PM: ["অপরাহ্ন","অপরাহ্ন","অপরাহ্ন"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH.mm",
+                               T: "HH.mm.ss",
+                               f: "dd MMMM yyyy HH.mm",
+                               F: "dd MMMM yyyy HH.mm.ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "pa-IN", "default", {
+       name: "pa-IN",
+       englishName: "Punjabi (India)",
+       nativeName: "ਪੰਜਾਬੀ (ਭਾਰਤ)",
+       language: "pa",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ਰੁ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ਐਤਵਾਰ","ਸੋਮਵਾਰ","ਮੰਗਲਵਾਰ","ਬੁੱਧਵਾਰ","ਵੀਰਵਾਰ","ਸ਼ੁੱਕਰਵਾਰ","ਸ਼ਨਿੱਚਰਵਾਰ"],
+                               namesAbbr: ["ਐਤ.","ਸੋਮ.","ਮੰਗਲ.","ਬੁੱਧ.","ਵੀਰ.","ਸ਼ੁਕਰ.","ਸ਼ਨਿੱਚਰ."],
+                               namesShort: ["ਐ","ਸ","ਮ","ਬ","ਵ","ਸ਼","ਸ਼"]
+                       },
+                       months: {
+                               names: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""],
+                               namesAbbr: ["ਜਨਵਰੀ","ਫ਼ਰਵਰੀ","ਮਾਰਚ","ਅਪ੍ਰੈਲ","ਮਈ","ਜੂਨ","ਜੁਲਾਈ","ਅਗਸਤ","ਸਤੰਬਰ","ਅਕਤੂਬਰ","ਨਵੰਬਰ","ਦਸੰਬਰ",""]
+                       },
+                       AM: ["ਸਵੇਰ","ਸਵੇਰ","ਸਵੇਰ"],
+                       PM: ["ਸ਼ਾਮ","ਸ਼ਾਮ","ਸ਼ਾਮ"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy dddd",
+                               t: "tt hh:mm",
+                               T: "tt hh:mm:ss",
+                               f: "dd MMMM yyyy dddd tt hh:mm",
+                               F: "dd MMMM yyyy dddd tt hh:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "gu-IN", "default", {
+       name: "gu-IN",
+       englishName: "Gujarati (India)",
+       nativeName: "ગુજરાતી (ભારત)",
+       language: "gu",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "રૂ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["રવિવાર","સોમવાર","મંગળવાર","બુધવાર","ગુરુવાર","શુક્રવાર","શનિવાર"],
+                               namesAbbr: ["રવિ","સોમ","મંગળ","બુધ","ગુરુ","શુક્ર","શનિ"],
+                               namesShort: ["ર","સ","મ","બ","ગ","શ","શ"]
+                       },
+                       months: {
+                               names: ["જાન્યુઆરી","ફેબ્રુઆરી","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઈ","ઑગસ્ટ","સપ્ટેમ્બર","ઑક્ટ્બર","નવેમ્બર","ડિસેમ્બર",""],
+                               namesAbbr: ["જાન્યુ","ફેબ્રુ","માર્ચ","એપ્રિલ","મે","જૂન","જુલાઈ","ઑગસ્ટ","સપ્ટે","ઑક્ટો","નવે","ડિસે",""]
+                       },
+                       AM: ["પૂર્વ મધ્યાહ્ન","પૂર્વ મધ્યાહ્ન","પૂર્વ મધ્યાહ્ન"],
+                       PM: ["ઉત્તર મધ્યાહ્ન","ઉત્તર મધ્યાહ્ન","ઉત્તર મધ્યાહ્ન"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "or-IN", "default", {
+       name: "or-IN",
+       englishName: "Oriya (India)",
+       nativeName: "ଓଡ଼ିଆ (ଭାରତ)",
+       language: "or",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ଟ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["ରବିବାର","ସୋମବାର","ମଙ୍ଗଳବାର","ବୁଧବାର","ଗୁରୁବାର","ଶୁକ୍ରବାର","ଶନିବାର"],
+                               namesAbbr: ["ରବି.","ସୋମ.","ମଙ୍ଗଳ.","ବୁଧ.","ଗୁରୁ.","ଶୁକ୍ର.","ଶନି."],
+                               namesShort: ["ର","ସୋ","ମ","ବୁ","ଗୁ","ଶୁ","ଶ"]
+                       },
+                       months: {
+                               names: ["ଜାନୁୟାରୀ","ଫ୍ରେବୃୟାରୀ","ମାର୍ଚ୍ଚ","ଏପ୍ରିଲ୍‌","ମେ","ଜୁନ୍‌","ଜୁଲାଇ","ଅଗଷ୍ଟ","ସେପ୍ଟେମ୍ବର","ଅକ୍ଟୋବର","ନଭେମ୍ବର","(ଡିସେମ୍ବର",""],
+                               namesAbbr: ["ଜାନୁୟାରୀ","ଫ୍ରେବୃୟାରୀ","ମାର୍ଚ୍ଚ","ଏପ୍ରିଲ୍‌","ମେ","ଜୁନ୍‌","ଜୁଲାଇ","ଅଗଷ୍ଟ","ସେପ୍ଟେମ୍ବର","ଅକ୍ଟୋବର","ନଭେମ୍ବର","(ଡିସେମ୍ବର",""]
+                       },
+                       eras: [{"name":"ଖ୍ରୀଷ୍ଟାବ୍ଦ","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ta-IN", "default", {
+       name: "ta-IN",
+       englishName: "Tamil (India)",
+       nativeName: "தமிழ் (இந்தியா)",
+       language: "ta",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ரூ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ஞாயிற்றுக்கிழமை","திங்கள்கிழமை","செவ்வாய்கிழமை","புதன்கிழமை","வியாழக்கிழமை","வெள்ளிக்கிழமை","சனிக்கிழமை"],
+                               namesAbbr: ["ஞாயிறு","திங்கள்","செவ்வாய்","புதன்","வியாழன்","வெள்ளி","சனி"],
+                               namesShort: ["ஞா","தி","செ","பு","வி","வெ","ச"]
+                       },
+                       months: {
+                               names: ["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்",""],
+                               namesAbbr: ["ஜனவரி","பிப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்",""]
+                       },
+                       AM: ["காலை","காலை","காலை"],
+                       PM: ["மாலை","மாலை","மாலை"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "te-IN", "default", {
+       name: "te-IN",
+       englishName: "Telugu (India)",
+       nativeName: "తెలుగు (భారత దేశం)",
+       language: "te",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "రూ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ఆదివారం","సోమవారం","మంగళవారం","బుధవారం","గురువారం","శుక్రవారం","శనివారం"],
+                               namesAbbr: ["ఆది.","సోమ.","మంగళ.","బుధ.","గురు.","శుక్ర.","శని."],
+                               namesShort: ["ఆ","సో","మం","బు","గు","శు","శ"]
+                       },
+                       months: {
+                               names: ["జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జూలై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్",""],
+                               namesAbbr: ["జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జూలై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్",""]
+                       },
+                       AM: ["పూర్వాహ్న","పూర్వాహ్న","పూర్వాహ్న"],
+                       PM: ["అపరాహ్న","అపరాహ్న","అపరాహ్న"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "kn-IN", "default", {
+       name: "kn-IN",
+       englishName: "Kannada (India)",
+       nativeName: "ಕನ್ನಡ (ಭಾರತ)",
+       language: "kn",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ರೂ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ಭಾನುವಾರ","ಸೋಮವಾರ","ಮಂಗಳವಾರ","ಬುಧವಾರ","ಗುರುವಾರ","ಶುಕ್ರವಾರ","ಶನಿವಾರ"],
+                               namesAbbr: ["ಭಾನು.","ಸೋಮ.","ಮಂಗಳ.","ಬುಧ.","ಗುರು.","ಶುಕ್ರ.","ಶನಿ."],
+                               namesShort: ["ರ","ಸ","ಮ","ಬ","ಗ","ಶ","ಶ"]
+                       },
+                       months: {
+                               names: ["ಜನವರಿ","ಫೆಬ್ರವರಿ","ಮಾರ್ಚ್","ಎಪ್ರಿಲ್","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗಸ್ಟ್","ಸೆಪ್ಟಂಬರ್","ಅಕ್ಟೋಬರ್","ನವೆಂಬರ್","ಡಿಸೆಂಬರ್",""],
+                               namesAbbr: ["ಜನವರಿ","ಫೆಬ್ರವರಿ","ಮಾರ್ಚ್","ಎಪ್ರಿಲ್","ಮೇ","ಜೂನ್","ಜುಲೈ","ಆಗಸ್ಟ್","ಸೆಪ್ಟಂಬರ್","ಅಕ್ಟೋಬರ್","ನವೆಂಬರ್","ಡಿಸೆಂಬರ್",""]
+                       },
+                       AM: ["ಪೂರ್ವಾಹ್ನ","ಪೂರ್ವಾಹ್ನ","ಪೂರ್ವಾಹ್ನ"],
+                       PM: ["ಅಪರಾಹ್ನ","ಅಪರಾಹ್ನ","ಅಪರಾಹ್ನ"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ml-IN", "default", {
+       name: "ml-IN",
+       englishName: "Malayalam (India)",
+       nativeName: "മലയാളം (ഭാരതം)",
+       language: "ml",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       pattern: ["-%n","%n"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "ക"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       ":": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["ഞായറാഴ്ച","തിങ്കളാഴ്ച","ചൊവ്വാഴ്ച","ബുധനാഴ്ച","വ്യാഴാഴ്ച","വെള്ളിയാഴ്ച","ശനിയാഴ്ച"],
+                               namesAbbr: ["ഞായർ.","തിങ്കൾ.","ചൊവ്വ.","ബുധൻ.","വ്യാഴം.","വെള്ളി.","ശനി."],
+                               namesShort: ["ഞ","ത","ച","ബ","വ","വെ","ശ"]
+                       },
+                       months: {
+                               names: ["ജനുവരി","ഫെബ്റുവരി","മാറ്ച്ച്","ഏപ്റില്","മെയ്","ജൂണ്","ജൂലൈ","ഓഗസ്ററ്","സെപ്ററംബറ്","ഒക്ടോബറ്","നവംബറ്","ഡിസംബറ്",""],
+                               namesAbbr: ["ജനുവരി","ഫെബ്റുവരി","മാറ്ച്ച്","ഏപ്റില്","മെയ്","ജൂണ്","ജൂലൈ","ഓഗസ്ററ്","സെപ്ററംബറ്","ഒക്ടോബറ്","നവംബറ്","ഡിസംബറ്",""]
+                       },
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH.mm",
+                               T: "HH.mm.ss",
+                               f: "dd MMMM yyyy HH.mm",
+                               F: "dd MMMM yyyy HH.mm.ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "as-IN", "default", {
+       name: "as-IN",
+       englishName: "Assamese (India)",
+       nativeName: "অসমীয়া (ভাৰত)",
+       language: "as",
+       numberFormat: {
+               groupSizes: [3,2],
+               NaN: "nan",
+               negativeInfinity: "-infinity",
+               positiveInfinity: "infinity",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","n$"],
+                       groupSizes: [3,2],
+                       symbol: "ট"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["সোমবাৰ","মঙ্গলবাৰ","বুধবাৰ","বৃহস্পতিবাৰ","শুক্রবাৰ","শনিবাৰ","ৰবিবাৰ"],
+                               namesAbbr: ["সোম.","মঙ্গল.","বুধ.","বৃহ.","শুক্র.","শনি.","ৰবি."],
+                               namesShort: ["সো","ম","বু","বৃ","শু","শ","র"]
+                       },
+                       months: {
+                               names: ["জানুৱাৰী","ফেব্রুৱাৰী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগষ্ট","চেপ্টেম্বর","অক্টোবর","নবেম্বর","ডিচেম্বর",""],
+                               namesAbbr: ["জানু","ফেব্রু","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগষ্ট","চেপ্টে","অক্টো","নবে","ডিচে",""]
+                       },
+                       AM: ["ৰাতিপু","ৰাতিপু","ৰাতিপু"],
+                       PM: ["আবেলি","আবেলি","আবেলি"],
+                       eras: [{"name":"খ্রীষ্টাব্দ","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "yyyy,MMMM dd, dddd",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "yyyy,MMMM dd, dddd tt h:mm",
+                               F: "yyyy,MMMM dd, dddd tt h:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM,yy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "mr-IN", "default", {
+       name: "mr-IN",
+       englishName: "Marathi (India)",
+       nativeName: "मराठी (भारत)",
+       language: "mr",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["रविवार","सोमवार","मंगळवार","बुधवार","गुरुवार","शुक्रवार","शनिवार"],
+                               namesAbbr: ["रवि.","सोम.","मंगळ.","बुध.","गुरु.","शुक्र.","शनि."],
+                               namesShort: ["र","स","म","ब","ग","श","श"]
+                       },
+                       months: {
+                               names: ["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोव्हेंबर","डिसेंबर",""],
+                               namesAbbr: ["जाने.","फेब्रु.","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टें.","ऑक्टो.","नोव्हें.","डिसें.",""]
+                       },
+                       AM: ["म.पू.","म.पू.","म.पू."],
+                       PM: ["म.नं.","म.नं.","म.नं."],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sa-IN", "default", {
+       name: "sa-IN",
+       englishName: "Sanskrit (India)",
+       nativeName: "संस्कृत (भारतम्)",
+       language: "sa",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"],
+                               namesAbbr: ["रविवासरः","सोमवासरः","मङ्गलवासरः","बुधवासरः","गुरुवासरः","शुक्रवासरः","शनिवासरः"],
+                               namesShort: ["र","स","म","ब","ग","श","श"]
+                       },
+                       months: {
+                               names: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""],
+                               namesAbbr: ["जनवरी","फरवरी","मार्च","अप्रैल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्तूबर","नवम्बर","दिसम्बर",""]
+                       },
+                       AM: ["पूर्वाह्न","पूर्वाह्न","पूर्वाह्न"],
+                       PM: ["अपराह्न","अपराह्न","अपराह्न"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy dddd",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy dddd HH:mm",
+                               F: "dd MMMM yyyy dddd HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "mn-MN", "default", {
+       name: "mn-MN",
+       englishName: "Mongolian (Cyrillic, Mongolia)",
+       nativeName: "Монгол хэл (Монгол улс)",
+       language: "mn-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "₮"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Ням","Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба"],
+                               namesAbbr: ["Ня","Да","Мя","Лх","Пү","Ба","Бя"],
+                               namesShort: ["Ня","Да","Мя","Лх","Пү","Ба","Бя"]
+                       },
+                       months: {
+                               names: ["1 дүгээр сар","2 дугаар сар","3 дугаар сар","4 дүгээр сар","5 дугаар сар","6 дугаар сар","7 дугаар сар","8 дугаар сар","9 дүгээр сар","10 дугаар сар","11 дүгээр сар","12 дугаар сар",""],
+                               namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""]
+                       },
+                       monthsGenitive: {
+                               names: ["1 дүгээр сарын","2 дугаар сарын","3 дугаар сарын","4 дүгээр сарын","5 дугаар сарын","6 дугаар сарын","7 дугаар сарын","8 дугаар сарын","9 дүгээр сарын","10 дугаар сарын","11 дүгээр сарын","12 дугаар сарын",""],
+                               namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yy.MM.dd",
+                               D: "yyyy 'оны' MMMM d",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'оны' MMMM d H:mm",
+                               F: "yyyy 'оны' MMMM d H:mm:ss",
+                               M: "d MMMM",
+                               Y: "yyyy 'он' MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "bo-CN", "default", {
+       name: "bo-CN",
+       englishName: "Tibetan (PRC)",
+       nativeName: "བོད་ཡིག (ཀྲུང་ཧྭ་མི་དམངས་སྤྱི་མཐུན་རྒྱལ་ཁབ།)",
+       language: "bo",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "ཨང་ཀི་མིན་པ།",
+               negativeInfinity: "མོ་གྲངས་ཚད་མེད་ཆུང་བ།",
+               positiveInfinity: "ཕོ་གྲངས་ཚད་མེད་ཆེ་བ།",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       groupSizes: [3,0],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["གཟའ་ཉི་མ།","གཟའ་ཟླ་བ།","གཟའ་མིག་དམར།","གཟའ་ལྷག་པ།","གཟའ་ཕུར་བུ།","གཟའ་པ་སངས།","གཟའ་སྤེན་པ།"],
+                               namesAbbr: ["ཉི་མ།","ཟླ་བ།","མིག་དམར།","ལྷག་པ།","ཕུར་བུ།","པ་སངས།","སྤེན་པ།"],
+                               namesShort: ["༧","༡","༢","༣","༤","༥","༦"]
+                       },
+                       months: {
+                               names: ["སྤྱི་ཟླ་དང་པོ།","སྤྱི་ཟླ་གཉིས་པ།","སྤྱི་ཟླ་གསུམ་པ།","སྤྱི་ཟླ་བཞི་པ།","སྤྱི་ཟླ་ལྔ་པ།","སྤྱི་ཟླ་དྲུག་པ།","སྤྱི་ཟླ་བདུན་པ།","སྤྱི་ཟླ་བརྒྱད་པ།","སྤྱི་ཟླ་དགུ་པ།","སྤྱི་ཟླ་བཅུ་པོ།","སྤྱི་ཟླ་བཅུ་གཅིག་པ།","སྤྱི་ཟླ་བཅུ་གཉིས་པ།",""],
+                               namesAbbr: ["ཟླ་ ༡","ཟླ་ ༢","ཟླ་ ༣","ཟླ་ ༤","ཟླ་ ༥","ཟླ་ ༦","ཟླ་ ༧","ཟླ་ ༨","ཟླ་ ༩","ཟླ་ ༡༠","ཟླ་ ༡༡","ཟླ་ ༡༢",""]
+                       },
+                       AM: ["སྔ་དྲོ","སྔ་དྲོ","སྔ་དྲོ"],
+                       PM: ["ཕྱི་དྲོ","ཕྱི་དྲོ","ཕྱི་དྲོ"],
+                       eras: [{"name":"སྤྱི་ལོ","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'ལོའི་ཟླ' M'ཚེས' d",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm",
+                               F: "yyyy'ལོའི་ཟླ' M'ཚེས' d HH:mm:ss",
+                               M: "'ཟླ་' M'ཚེས'd",
+                               Y: "yyyy.M"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "cy-GB", "default", {
+       name: "cy-GB",
+       englishName: "Welsh (United Kingdom)",
+       nativeName: "Cymraeg (y Deyrnas Unedig)",
+       language: "cy",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "£"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Dydd Sul","Dydd Llun","Dydd Mawrth","Dydd Mercher","Dydd Iau","Dydd Gwener","Dydd Sadwrn"],
+                               namesAbbr: ["Sul","Llun","Maw","Mer","Iau","Gwe","Sad"],
+                               namesShort: ["Su","Ll","Ma","Me","Ia","Gw","Sa"]
+                       },
+                       months: {
+                               names: ["Ionawr","Chwefror","Mawrth","Ebrill","Mai","Mehefin","Gorffennaf","Awst","Medi","Hydref","Tachwedd","Rhagfyr",""],
+                               namesAbbr: ["Ion","Chwe","Maw","Ebr","Mai","Meh","Gor","Aws","Med","Hyd","Tach","Rhag",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "km-KH", "default", {
+       name: "km-KH",
+       englishName: "Khmer (Cambodia)",
+       nativeName: "ខ្មែរ (កម្ពុជា)",
+       language: "km",
+       numberFormat: {
+               pattern: ["- n"],
+               groupSizes: [3,0],
+               NaN: "NAN",
+               negativeInfinity: "-- អនន្ត",
+               positiveInfinity: "អនន្ត",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       symbol: "៛"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["ថ្ងៃអាទិត្យ","ថ្ងៃច័ន្ទ","ថ្ងៃអង្គារ","ថ្ងៃពុធ","ថ្ងៃព្រហស្បតិ៍","ថ្ងៃសុក្រ","ថ្ងៃសៅរ៍"],
+                               namesAbbr: ["អាទិ.","ច.","អ.","ពុ","ព្រហ.","សុ.","ស."],
+                               namesShort: ["អា","ច","អ","ពុ","ព្","សុ","ស"]
+                       },
+                       months: {
+                               names: ["មករា","កុម្ភៈ","មិនា","មេសា","ឧសភា","មិថុនា","កក្កដា","សីហា","កញ្ញា","តុលា","វិច្ឆិកា","ធ្នូ",""],
+                               namesAbbr: ["១","២","៣","៤","៥","៦","៧","៨","៩","១០","១១","១២",""]
+                       },
+                       AM: ["ព្រឹក","ព្រឹក","ព្រឹក"],
+                       PM: ["ល្ងាច","ល្ងាច","ល្ងាច"],
+                       eras: [{"name":"មុនគ.ស.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "d MMMM yyyy",
+                               t: "H:mm tt",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy H:mm tt",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "'ថ្ងៃទី' dd 'ខែ' MM",
+                               Y: "'ខែ' MM 'ឆ្នាំ' yyyy"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ព្រឹក","ព្រឹក","ព្រឹក"],
+                       PM: ["ល្ងាច","ល្ងាច","ល្ងាច"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm tt",
+                               T: "HH:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm tt",
+                               F: "dddd, MMMM dd, yyyy HH:mm:ss"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "lo-LA", "default", {
+       name: "lo-LA",
+       englishName: "Lao (Lao P.D.R.)",
+       nativeName: "ລາວ (ສ.ປ.ປ. ລາວ)",
+       language: "lo",
+       numberFormat: {
+               pattern: ["(n)"],
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["(n$)","n$"],
+                       groupSizes: [3,0],
+                       symbol: "₭"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["ວັນອາທິດ","ວັນຈັນ","ວັນອັງຄານ","ວັນພຸດ","ວັນພະຫັດ","ວັນສຸກ","ວັນເສົາ"],
+                               namesAbbr: ["ອາທິດ","ຈັນ","ອັງຄານ","ພຸດ","ພະຫັດ","ສຸກ","ເສົາ"],
+                               namesShort: ["ອ","ຈ","ອ","ພ","ພ","ສ","ເ"]
+                       },
+                       months: {
+                               names: ["ມັງກອນ","ກຸມພາ","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","ກໍລະກົດ","ສິງຫາ","ກັນຍາ","ຕຸລາ","ພະຈິກ","ທັນວາ",""],
+                               namesAbbr: ["ມັງກອນ","ກຸມພາ","ມີນາ","ເມສາ","ພຶດສະພາ","ມິຖຸນາ","ກໍລະກົດ","ສິງຫາ","ກັນຍາ","ຕຸລາ","ພະຈິກ","ທັນວາ",""]
+                       },
+                       AM: ["ເຊົ້າ","ເຊົ້າ","ເຊົ້າ"],
+                       PM: ["ແລງ","ແລງ","ແລງ"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm tt",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy H:mm tt",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "gl-ES", "default", {
+       name: "gl-ES",
+       englishName: "Galician (Galician)",
+       nativeName: "galego (galego)",
+       language: "gl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","luns","martes","mércores","xoves","venres","sábado"],
+                               namesAbbr: ["dom","luns","mar","mér","xov","ven","sáb"],
+                               namesShort: ["do","lu","ma","mé","xo","ve","sá"]
+                       },
+                       months: {
+                               names: ["xaneiro","febreiro","marzo","abril","maio","xuño","xullo","agosto","setembro","outubro","novembro","decembro",""],
+                               namesAbbr: ["xan","feb","mar","abr","maio","xuñ","xull","ago","set","out","nov","dec",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "kok-IN", "default", {
+       name: "kok-IN",
+       englishName: "Konkani (India)",
+       nativeName: "कोंकणी (भारत)",
+       language: "kok",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["आयतार","सोमार","मंगळार","बुधवार","बिरेस्तार","सुक्रार","शेनवार"],
+                               namesAbbr: ["आय.","सोम.","मंगळ.","बुध.","बिरे.","सुक्र.","शेन."],
+                               namesShort: ["आ","स","म","ब","ब","स","श"]
+                       },
+                       months: {
+                               names: ["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोवेम्बर","डिसेंबर",""],
+                               namesAbbr: ["जानेवारी","फेब्रुवारी","मार्च","एप्रिल","मे","जून","जुलै","ऑगस्ट","सप्टेंबर","ऑक्टोबर","नोवेम्बर","डिसेंबर",""]
+                       },
+                       AM: ["म.पू.","म.पू.","म.पू."],
+                       PM: ["म.नं.","म.नं.","म.नं."],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "syr-SY", "default", {
+       name: "syr-SY",
+       englishName: "Syriac (Syria)",
+       nativeName: "ܣܘܪܝܝܐ (سوريا)",
+       language: "syr",
+       isRTL: true,
+       numberFormat: {
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ل.س.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["ܚܕ ܒܫܒܐ","ܬܪܝܢ ܒܫܒܐ","ܬܠܬܐ ܒܫܒܐ","ܐܪܒܥܐ ܒܫܒܐ","ܚܡܫܐ ܒܫܒܐ","ܥܪܘܒܬܐ","ܫܒܬܐ"],
+                               namesAbbr: ["܏ܐ ܏ܒܫ","܏ܒ ܏ܒܫ","܏ܓ ܏ܒܫ","܏ܕ ܏ܒܫ","܏ܗ ܏ܒܫ","܏ܥܪܘܒ","܏ܫܒ"],
+                               namesShort: ["ܐ","ܒ","ܓ","ܕ","ܗ","ܥ","ܫ"]
+                       },
+                       months: {
+                               names: ["ܟܢܘܢ ܐܚܪܝ","ܫܒܛ","ܐܕܪ","ܢܝܣܢ","ܐܝܪ","ܚܙܝܪܢ","ܬܡܘܙ","ܐܒ","ܐܝܠܘܠ","ܬܫܪܝ ܩܕܝܡ","ܬܫܪܝ ܐܚܪܝ","ܟܢܘܢ ܩܕܝܡ",""],
+                               namesAbbr: ["܏ܟܢ ܏ܒ","ܫܒܛ","ܐܕܪ","ܢܝܣܢ","ܐܝܪ","ܚܙܝܪܢ","ܬܡܘܙ","ܐܒ","ܐܝܠܘܠ","܏ܬܫ ܏ܐ","܏ܬܫ ܏ܒ","܏ܟܢ ܏ܐ",""]
+                       },
+                       AM: ["ܩ.ܛ","ܩ.ܛ","ܩ.ܛ"],
+                       PM: ["ܒ.ܛ","ܒ.ܛ","ܒ.ܛ"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "si-LK", "default", {
+       name: "si-LK",
+       englishName: "Sinhala (Sri Lanka)",
+       nativeName: "සිංහල (ශ්‍රී ලංකා)",
+       language: "si",
+       numberFormat: {
+               groupSizes: [3,2],
+               negativeInfinity: "-අනන්තය",
+               positiveInfinity: "අනන්තය",
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       symbol: "රු."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ඉරිදා","සඳුදා","අඟහරුවාදා","බදාදා","බ්‍රහස්පතින්දා","සිකුරාදා","සෙනසුරාදා"],
+                               namesAbbr: ["ඉරිදා","සඳුදා","කුජදා","බුදදා","ගුරුදා","කිවිදා","ශනිදා"],
+                               namesShort: ["ඉ","ස","අ","බ","බ්‍ර","සි","සෙ"]
+                       },
+                       months: {
+                               names: ["ජනවාරි","පෙබරවාරි","මාර්තු","අ‌ප්‍රේල්","මැයි","ජූනි","ජූලි","අ‌ගෝස්තු","සැප්තැම්බර්","ඔක්තෝබර්","නොවැම්බර්","දෙසැම්බර්",""],
+                               namesAbbr: ["ජන.","පෙබ.","මාර්තු.","අප්‍රේල්.","මැයි.","ජූනි.","ජූලි.","අගෝ.","සැප්.","ඔක්.","නොවැ.","දෙසැ.",""]
+                       },
+                       AM: ["පෙ.ව.","පෙ.ව.","පෙ.ව."],
+                       PM: ["ප.ව.","ප.ව.","ප.ව."],
+                       eras: [{"name":"ක්‍රි.ව.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "yyyy MMMM' මස 'dd' වැනිදා 'dddd",
+                               f: "yyyy MMMM' මස 'dd' වැනිදා 'dddd h:mm tt",
+                               F: "yyyy MMMM' මස 'dd' වැනිදා 'dddd h:mm:ss tt",
+                               Y: "yyyy MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "iu-Cans-CA", "default", {
+       name: "iu-Cans-CA",
+       englishName: "Inuktitut (Syllabics, Canada)",
+       nativeName: "ᐃᓄᒃᑎᑐᑦ (ᑲᓇᑕᒥ)",
+       language: "iu-Cans",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["ᓈᑦᑏᖑᔭ","ᓇᒡᒐᔾᔭᐅ","ᐊᐃᑉᐱᖅ","ᐱᖓᑦᓯᖅ","ᓯᑕᒻᒥᖅ","ᑕᓪᓕᕐᒥᖅ","ᓯᕙᑖᕐᕕᒃ"],
+                               namesAbbr: ["ᓈᑦᑏ","ᓇᒡᒐ","ᐊᐃᑉᐱ","ᐱᖓᑦᓯ","ᓯᑕ","ᑕᓪᓕ","ᓯᕙᑖᕐᕕᒃ"],
+                               namesShort: ["ᓈ","ᓇ","ᐊ","ᐱ","ᓯ","ᑕ","ᓯ"]
+                       },
+                       months: {
+                               names: ["ᔮᓐᓄᐊᕆ","ᕖᕝᕗᐊᕆ","ᒫᑦᓯ","ᐄᐳᕆ","ᒪᐃ","ᔫᓂ","ᔪᓚᐃ","ᐋᒡᒌᓯ","ᓯᑎᐱᕆ","ᐅᑐᐱᕆ","ᓄᕕᐱᕆ","ᑎᓯᐱᕆ",""],
+                               namesAbbr: ["ᔮᓐᓄ","ᕖᕝᕗ","ᒫᑦᓯ","ᐄᐳᕆ","ᒪᐃ","ᔫᓂ","ᔪᓚᐃ","ᐋᒡᒌ","ᓯᑎᐱ","ᐅᑐᐱ","ᓄᕕᐱ","ᑎᓯᐱ",""]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd,MMMM dd,yyyy",
+                               f: "dddd,MMMM dd,yyyy h:mm tt",
+                               F: "dddd,MMMM dd,yyyy h:mm:ss tt",
+                               Y: "MMMM,yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "am-ET", "default", {
+       name: "am-ET",
+       englishName: "Amharic (Ethiopia)",
+       nativeName: "አማርኛ (ኢትዮጵያ)",
+       language: "am",
+       numberFormat: {
+               decimals: 1,
+               groupSizes: [3,0],
+               NaN: "NAN",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       decimals: 1,
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       groupSizes: [3,0],
+                       symbol: "ETB"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["እሑድ","ሰኞ","ማክሰኞ","ረቡዕ","ሐሙስ","ዓርብ","ቅዳሜ"],
+                               namesAbbr: ["እሑድ","ሰኞ","ማክሰ","ረቡዕ","ሐሙስ","ዓርብ","ቅዳሜ"],
+                               namesShort: ["እ","ሰ","ማ","ረ","ሐ","ዓ","ቅ"]
+                       },
+                       months: {
+                               names: ["ጃንዩወሪ","ፌብሩወሪ","ማርች","ኤፕረል","ሜይ","ጁን","ጁላይ","ኦገስት","ሴፕቴምበር","ኦክተውበር","ኖቬምበር","ዲሴምበር",""],
+                               namesAbbr: ["ጃንዩ","ፌብሩ","ማርች","ኤፕረ","ሜይ","ጁን","ጁላይ","ኦገስ","ሴፕቴ","ኦክተ","ኖቬም","ዲሴም",""]
+                       },
+                       AM: ["ጡዋት","ጡዋት","ጡዋት"],
+                       PM: ["ከሰዓት","ከሰዓት","ከሰዓት"],
+                       eras: [{"name":"ዓመተ  ምሕረት","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd '፣' MMMM d 'ቀን' yyyy",
+                               f: "dddd '፣' MMMM d 'ቀን' yyyy h:mm tt",
+                               F: "dddd '፣' MMMM d 'ቀን' yyyy h:mm:ss tt",
+                               M: "MMMM d ቀን",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ne-NP", "default", {
+       name: "ne-NP",
+       englishName: "Nepali (Nepal)",
+       nativeName: "नेपाली (नेपाल)",
+       language: "ne",
+       numberFormat: {
+               groupSizes: [3,2],
+               NaN: "nan",
+               negativeInfinity: "-infinity",
+               positiveInfinity: "infinity",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "रु"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["आइतवार","सोमवार","मङ्गलवार","बुधवार","बिहीवार","शुक्रवार","शनिवार"],
+                               namesAbbr: ["आइत","सोम","मङ्गल","बुध","बिही","शुक्र","शनि"],
+                               namesShort: ["आ","सो","म","बु","बि","शु","श"]
+                       },
+                       months: {
+                               names: ["जनवरी","फेब्रुअरी","मार्च","अप्रिल","मे","जून","जुलाई","अगस्त","सेप्टेम्बर","अक्टोबर","नोभेम्बर","डिसेम्बर",""],
+                               namesAbbr: ["जन","फेब","मार्च","अप्रिल","मे","जून","जुलाई","अग","सेप्ट","अक्ट","नोभ","डिस",""]
+                       },
+                       AM: ["विहानी","विहानी","विहानी"],
+                       PM: ["बेलुकी","बेलुकी","बेलुकी"],
+                       eras: [{"name":"a.d.","start":null,"offset":0}],
+                       patterns: {
+                               Y: "MMMM,yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fy-NL", "default", {
+       name: "fy-NL",
+       englishName: "Frisian (Netherlands)",
+       nativeName: "Frysk (Nederlân)",
+       language: "fy",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["Snein","Moandei","Tiisdei","Woansdei","Tongersdei","Freed","Sneon"],
+                               namesAbbr: ["Sn","Mo","Ti","Wo","To","Fr","Sn"],
+                               namesShort: ["S","M","T","W","T","F","S"]
+                       },
+                       months: {
+                               names: ["jannewaris","febrewaris","maart","april","maaie","juny","july","augustus","septimber","oktober","novimber","desimber",""],
+                               namesAbbr: ["jann","febr","mrt","apr","maaie","jun","jul","aug","sept","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d-M-yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd d MMMM yyyy H:mm",
+                               F: "dddd d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ps-AF", "default", {
+       name: "ps-AF",
+       englishName: "Pashto (Afghanistan)",
+       nativeName: "پښتو (افغانستان)",
+       language: "ps",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               ",": "،",
+               ".": ",",
+               NaN: "غ ع",
+               negativeInfinity: "-∞",
+               positiveInfinity: "∞",
+               percent: {
+                       pattern: ["%n-","%n"],
+                       ",": "،",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$n-","$n"],
+                       ",": "٬",
+                       ".": "٫",
+                       symbol: "؋"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               f: "dd/MM/yyyy h:mm tt",
+                               F: "dd/MM/yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 6,
+                       days: {
+                               names: ["یکشنبه","دوشنبه","سه‌شنبه","چارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesAbbr: ["یکشنبه","دوشنبه","سه‌شنبه","چارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesShort: ["ی","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا ښزمرى","زمرى","وږى","تله","لړم","لنڈ ۍ","مرغومى",""],
+                               namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګا ښ","زمرى","وږى","تله","لړم","لنڈ ۍ","مرغومى",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"ل.ه","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy, dd, MMMM, dddd",
+                               f: "yyyy, dd, MMMM, dddd h:mm tt",
+                               F: "yyyy, dd, MMMM, dddd h:mm:ss tt",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fil-PH", "default", {
+       name: "fil-PH",
+       englishName: "Filipino (Philippines)",
+       nativeName: "Filipino (Pilipinas)",
+       language: "fil",
+       numberFormat: {
+               currency: {
+                       symbol: "PhP"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Linggo","Lunes","Martes","Mierkoles","Huebes","Biernes","Sabado"],
+                               namesAbbr: ["Lin","Lun","Mar","Mier","Hueb","Bier","Saba"],
+                               namesShort: ["L","L","M","M","H","B","S"]
+                       },
+                       months: {
+                               names: ["Enero","Pebrero","Marso","Abril","Mayo","Hunyo","Hulyo","Agosto","Septyembre","Oktubre","Nobyembre","Disyembre",""],
+                               namesAbbr: ["En","Peb","Mar","Abr","Mayo","Hun","Hul","Agos","Sept","Okt","Nob","Dis",""]
+                       },
+                       eras: [{"name":"Anno Domini","start":null,"offset":0}]
+               }
+       }
+});
+
+Globalize.addCultureInfo( "dv-MV", "default", {
+       name: "dv-MV",
+       englishName: "Divehi (Maldives)",
+       nativeName: "ދިވެހިބަސް (ދިވެހި ރާއްޖެ)",
+       language: "dv",
+       isRTL: true,
+       numberFormat: {
+               currency: {
+                       pattern: ["n $-","n $"],
+                       symbol: "ރ."
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Hijri",
+                       days: {
+                               names: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesAbbr: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesShort: ["އާ","ހޯ","އަ","ބު","ބު","ހު","ހޮ"]
+                       },
+                       months: {
+                               names: ["މުޙައްރަމް","ޞަފަރު","ރަބީޢުލްއައްވަލް","ރަބީޢުލްއާޚިރު","ޖުމާދަލްއޫލާ","ޖުމާދަލްއާޚިރާ","ރަޖަބް","ޝަޢްބާން","ރަމަޟާން","ޝައްވާލް","ޛުލްޤަޢިދާ","ޛުލްޙިއްޖާ",""],
+                               namesAbbr: ["މުޙައްރަމް","ޞަފަރު","ރަބީޢުލްއައްވަލް","ރަބީޢުލްއާޚިރު","ޖުމާދަލްއޫލާ","ޖުމާދަލްއާޚިރާ","ރަޖަބް","ޝަޢްބާން","ރަމަޟާން","ޝައްވާލް","ޛުލްޤަޢިދާ","ޛުލްޙިއްޖާ",""]
+                       },
+                       AM: ["މކ","މކ","މކ"],
+                       PM: ["މފ","މފ","މފ"],
+                       eras: [{"name":"ހިޖްރީ","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd/MM/yyyy HH:mm",
+                               F: "dd/MM/yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_Localized: {
+                       days: {
+                               names: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesAbbr: ["އާދީއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],
+                               namesShort: ["އާ","ހޯ","އަ","ބު","ބު","ހު","ހޮ"]
+                       },
+                       months: {
+                               names: ["ޖަނަވަރީ","ފެބްރުއަރީ","މާޗް","އޭޕްރިލް","މެއި","ޖޫން","ޖުލައި","އޯގަސްޓް","ސެޕްޓެމްބަރ","އޮކްޓޯބަރ","ނޮވެމްބަރ","ޑިސެމްބަރ",""],
+                               namesAbbr: ["ޖަނަވަރީ","ފެބްރުއަރީ","މާޗް","އޭޕްރިލް","މެއި","ޖޫން","ޖުލައި","އޯގަސްޓް","ސެޕްޓެމްބަރ","އޮކްޓޯބަރ","ނޮވެމްބަރ","ޑިސެމްބަރ",""]
+                       },
+                       AM: ["މކ","މކ","މކ"],
+                       PM: ["މފ","މފ","މފ"],
+                       eras: [{"name":"މީލާދީ","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "ddd, yyyy MMMM dd",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "ddd, yyyy MMMM dd HH:mm",
+                               F: "ddd, yyyy MMMM dd HH:mm:ss",
+                               Y: "yyyy, MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ha-Latn-NG", "default", {
+       name: "ha-Latn-NG",
+       englishName: "Hausa (Latin, Nigeria)",
+       nativeName: "Hausa (Nigeria)",
+       language: "ha-Latn",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Lahadi","Litinin","Talata","Laraba","Alhamis","Juma'a","Asabar"],
+                               namesAbbr: ["Lah","Lit","Tal","Lar","Alh","Jum","Asa"],
+                               namesShort: ["L","L","T","L","A","J","A"]
+                       },
+                       months: {
+                               names: ["Januwaru","Febreru","Maris","Afrilu","Mayu","Yuni","Yuli","Agusta","Satumba","Oktocba","Nuwamba","Disamba",""],
+                               namesAbbr: ["Jan","Feb","Mar","Afr","May","Yun","Yul","Agu","Sat","Okt","Nuw","Dis",""]
+                       },
+                       AM: ["Safe","safe","SAFE"],
+                       PM: ["Yamma","yamma","YAMMA"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "yo-NG", "default", {
+       name: "yo-NG",
+       englishName: "Yoruba (Nigeria)",
+       nativeName: "Yoruba (Nigeria)",
+       language: "yo",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"],
+                               namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"],
+                               namesShort: ["A","A","I","O","O","E","A"]
+                       },
+                       months: {
+                               names: ["Osu kinni","Osu keji","Osu keta","Osu kerin","Osu karun","Osu kefa","Osu keje","Osu kejo","Osu kesan","Osu kewa","Osu kokanla","Osu keresi",""],
+                               namesAbbr: ["kin.","kej.","ket.","ker.","kar.","kef.","kej.","kej.","kes.","kew.","kok.","ker.",""]
+                       },
+                       AM: ["Owuro","owuro","OWURO"],
+                       PM: ["Ale","ale","ALE"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "quz-BO", "default", {
+       name: "quz-BO",
+       englishName: "Quechua (Bolivia)",
+       nativeName: "runasimi (Qullasuyu)",
+       language: "quz",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "$b"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"],
+                               namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"],
+                               namesShort: ["d","k","a","m","h","b","k"]
+                       },
+                       months: {
+                               names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""],
+                               namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "nso-ZA", "default", {
+       name: "nso-ZA",
+       englishName: "Sesotho sa Leboa (South Africa)",
+       nativeName: "Sesotho sa Leboa (Afrika Borwa)",
+       language: "nso",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Lamorena","Mošupologo","Labobedi","Laboraro","Labone","Labohlano","Mokibelo"],
+                               namesAbbr: ["Lam","Moš","Lbb","Lbr","Lbn","Lbh","Mok"],
+                               namesShort: ["L","M","L","L","L","L","M"]
+                       },
+                       months: {
+                               names: ["Pherekgong","Hlakola","Mopitlo","Moranang","Mosegamanye","Ngoatobošego","Phuphu","Phato","Lewedi","Diphalana","Dibatsela","Manthole",""],
+                               namesAbbr: ["Pher","Hlak","Mop","Mor","Mos","Ngwat","Phup","Phat","Lew","Dip","Dib","Man",""]
+                       },
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ba-RU", "default", {
+       name: "ba-RU",
+       englishName: "Bashkir (Russia)",
+       nativeName: "Башҡорт (Россия)",
+       language: "ba",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "һ."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Йәкшәмбе","Дүшәмбе","Шишәмбе","Шаршамбы","Кесаҙна","Йома","Шәмбе"],
+                               namesAbbr: ["Йш","Дш","Шш","Шр","Кс","Йм","Шб"],
+                               namesShort: ["Йш","Дш","Шш","Шр","Кс","Йм","Шб"]
+                       },
+                       months: {
+                               names: ["ғинуар","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь",""],
+                               namesAbbr: ["ғин","фев","мар","апр","май","июн","июл","авг","сен","окт","ноя","дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d MMMM yyyy 'й'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy 'й' H:mm",
+                               F: "d MMMM yyyy 'й' H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "lb-LU", "default", {
+       name: "lb-LU",
+       englishName: "Luxembourgish (Luxembourg)",
+       nativeName: "Lëtzebuergesch (Luxembourg)",
+       language: "lb",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "n. num.",
+               negativeInfinity: "-onendlech",
+               positiveInfinity: "+onendlech",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonndeg","Méindeg","Dënschdeg","Mëttwoch","Donneschdeg","Freideg","Samschdeg"],
+                               namesAbbr: ["Son","Méi","Dën","Mët","Don","Fre","Sam"],
+                               namesShort: ["So","Mé","Dë","Më","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","Mäerz","Abrëll","Mee","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mäe","Abr","Mee","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "kl-GL", "default", {
+       name: "kl-GL",
+       englishName: "Greenlandic (Greenland)",
+       nativeName: "kalaallisut (Kalaallit Nunaat)",
+       language: "kl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       groupSizes: [3,0],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,0],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["sapaat","ataasinngorneq","marlunngorneq","pingasunngorneq","sisamanngorneq","tallimanngorneq","arfininngorneq"],
+                               namesAbbr: ["sap","ata","mar","ping","sis","tal","arf"],
+                               namesShort: ["sa","at","ma","pi","si","ta","ar"]
+                       },
+                       months: {
+                               names: ["januari","februari","martsi","apriili","maaji","juni","juli","aggusti","septembari","oktobari","novembari","decembari",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ig-NG", "default", {
+       name: "ig-NG",
+       englishName: "Igbo (Nigeria)",
+       nativeName: "Igbo (Nigeria)",
+       language: "ig",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Aiku","Aje","Isegun","Ojo'ru","Ojo'bo","Eti","Abameta"],
+                               namesAbbr: ["Aik","Aje","Ise","Ojo","Ojo","Eti","Aba"],
+                               namesShort: ["A","A","I","O","O","E","A"]
+                       },
+                       months: {
+                               names: ["Onwa mbu","Onwa ibua","Onwa ato","Onwa ano","Onwa ise","Onwa isi","Onwa asa","Onwa asato","Onwa itolu","Onwa iri","Onwa iri n'ofu","Onwa iri n'ibua",""],
+                               namesAbbr: ["mbu.","ibu.","ato.","ano.","ise","isi","asa","asa.","ito.","iri.","n'of.","n'ib.",""]
+                       },
+                       AM: ["Ututu","ututu","UTUTU"],
+                       PM: ["Efifie","efifie","EFIFIE"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ii-CN", "default", {
+       name: "ii-CN",
+       englishName: "Yi (PRC)",
+       nativeName: "ꆈꌠꁱꂷ (ꍏꉸꏓꂱꇭꉼꇩ)",
+       language: "ii",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "ꌗꂷꀋꉬ",
+               negativeInfinity: "ꀄꊭꌐꀋꉆ",
+               positiveInfinity: "ꈤꇁꑖꀋꉬ",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["ꑭꆏꑍ","ꆏꊂ꒔","ꆏꊂꑍ","ꆏꊂꌕ","ꆏꊂꇖ","ꆏꊂꉬ","ꆏꊂꃘ"],
+                               namesAbbr: ["ꑭꆏ","ꆏ꒔","ꆏꑍ","ꆏꌕ","ꆏꇖ","ꆏꉬ","ꆏꃘ"],
+                               namesShort: ["ꆏ","꒔","ꑍ","ꌕ","ꇖ","ꉬ","ꃘ"]
+                       },
+                       months: {
+                               names: ["ꋍꆪ","ꑍꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","ꏃꆪ","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""],
+                               namesAbbr: ["ꋍꆪ","ꑍꆪ","ꌕꆪ","ꇖꆪ","ꉬꆪ","ꃘꆪ","ꏃꆪ","ꉆꆪ","ꈬꆪ","ꊰꆪ","ꊯꊪꆪ","ꊰꑋꆪ",""]
+                       },
+                       AM: ["ꂵꆪꈌꈐ","ꂵꆪꈌꈐ","ꂵꆪꈌꈐ"],
+                       PM: ["ꂵꆪꈌꉈ","ꂵꆪꈌꉈ","ꂵꆪꈌꉈ"],
+                       eras: [{"name":"ꇬꑼ","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'ꈎ' M'ꆪ' d'ꑍ'",
+                               t: "tt h:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'ꈎ' M'ꆪ' d'ꑍ' tt h:mm",
+                               F: "yyyy'ꈎ' M'ꆪ' d'ꑍ' H:mm:ss",
+                               M: "M'ꆪ' d'ꑍ'",
+                               Y: "yyyy'ꈎ' M'ꆪ'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "arn-CL", "default", {
+       name: "arn-CL",
+       englishName: "Mapudungun (Chile)",
+       nativeName: "Mapudungun (Chile)",
+       language: "arn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "moh-CA", "default", {
+       name: "moh-CA",
+       englishName: "Mohawk (Mohawk)",
+       nativeName: "Kanien'kéha",
+       language: "moh",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Awentatokentì:ke","Awentataón'ke","Ratironhia'kehronòn:ke","Soséhne","Okaristiiáhne","Ronwaia'tanentaktonhne","Entákta"],
+                               namesShort: ["S","M","T","W","T","F","S"]
+                       },
+                       months: {
+                               names: ["Tsothohrkó:Wa","Enniska","Enniskó:Wa","Onerahtókha","Onerahtohkó:Wa","Ohiari:Ha","Ohiarihkó:Wa","Seskéha","Seskehkó:Wa","Kenténha","Kentenhkó:Wa","Tsothóhrha",""]
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "br-FR", "default", {
+       name: "br-FR",
+       englishName: "Breton (France)",
+       nativeName: "brezhoneg (Frañs)",
+       language: "br",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "NkN",
+               negativeInfinity: "-Anfin",
+               positiveInfinity: "+Anfin",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Sul","Lun","Meurzh","Merc'her","Yaou","Gwener","Sadorn"],
+                               namesAbbr: ["Sul","Lun","Meu.","Mer.","Yaou","Gwe.","Sad."],
+                               namesShort: ["Su","Lu","Mz","Mc","Ya","Gw","Sa"]
+                       },
+                       months: {
+                               names: ["Genver","C'hwevrer","Meurzh","Ebrel","Mae","Mezheven","Gouere","Eost","Gwengolo","Here","Du","Kerzu",""],
+                               namesAbbr: ["Gen.","C'hwe.","Meur.","Ebr.","Mae","Mezh.","Goue.","Eost","Gwen.","Here","Du","Kzu",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"g. J.-K.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ug-CN", "default", {
+       name: "ug-CN",
+       englishName: "Uyghur (PRC)",
+       nativeName: "ئۇيغۇرچە (جۇڭخۇا خەلق جۇمھۇرىيىتى)",
+       language: "ug",
+       isRTL: true,
+       numberFormat: {
+               NaN: "سان ئەمەس",
+               negativeInfinity: "مەنپىي چەكسىزلىك",
+               positiveInfinity: "مۇسبەت چەكسىزلىك",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["يەكشەنبە","دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"],
+                               namesAbbr: ["يە","دۈ","سە","چا","پە","جۈ","شە"],
+                               namesShort: ["ي","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""],
+                               namesAbbr: ["1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي",""]
+                       },
+                       AM: ["چۈشتىن بۇرۇن","چۈشتىن بۇرۇن","چۈشتىن بۇرۇن"],
+                       PM: ["چۈشتىن كېيىن","چۈشتىن كېيىن","چۈشتىن كېيىن"],
+                       eras: [{"name":"مىلادى","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-M-d",
+                               D: "yyyy-'يىلى' MMMM d-'كۈنى،'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm",
+                               F: "yyyy-'يىلى' MMMM d-'كۈنى،' H:mm:ss",
+                               M: "MMMM d'-كۈنى'",
+                               Y: "yyyy-'يىلى' MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "mi-NZ", "default", {
+       name: "mi-NZ",
+       englishName: "Maori (New Zealand)",
+       nativeName: "Reo Māori (Aotearoa)",
+       language: "mi",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Rātapu","Rāhina","Rātū","Rāapa","Rāpare","Rāmere","Rāhoroi"],
+                               namesAbbr: ["Ta","Hi","Tū","Apa","Pa","Me","Ho"],
+                               namesShort: ["Ta","Hi","Tū","Aa","Pa","Me","Ho"]
+                       },
+                       months: {
+                               names: ["Kohi-tātea","Hui-tanguru","Poutū-te-rangi","Paenga-whāwhā","Haratua","Pipiri","Hōngongoi","Here-turi-kōkā","Mahuru","Whiringa-ā-nuku","Whiringa-ā-rangi","Hakihea",""],
+                               namesAbbr: ["Kohi","Hui","Pou","Pae","Hara","Pipi","Hōngo","Here","Mahu","Nuku","Rangi","Haki",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd MMMM, yyyy",
+                               f: "dddd, dd MMMM, yyyy h:mm tt",
+                               F: "dddd, dd MMMM, yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM, yy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "oc-FR", "default", {
+       name: "oc-FR",
+       englishName: "Occitan (France)",
+       nativeName: "Occitan (França)",
+       language: "oc",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numeric",
+               negativeInfinity: "-Infinit",
+               positiveInfinity: "+Infinit",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimenge","diluns","dimars","dimècres","dijòus","divendres","dissabte"],
+                               namesAbbr: ["dim.","lun.","mar.","mèc.","jòu.","ven.","sab."],
+                               namesShort: ["di","lu","ma","mè","jò","ve","sa"]
+                       },
+                       months: {
+                               names: ["genier","febrier","març","abril","mai","junh","julh","agost","setembre","octobre","novembre","desembre",""],
+                               namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""]
+                       },
+                       monthsGenitive: {
+                               names: ["de genier","de febrier","de març","d'abril","de mai","de junh","de julh","d'agost","de setembre","d'octobre","de novembre","de desembre",""],
+                               namesAbbr: ["gen.","feb.","mar.","abr.","mai.","jun.","jul.","ag.","set.","oct.","nov.","des.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"après Jèsus-Crist","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd,' lo 'd MMMM' de 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd,' lo 'd MMMM' de 'yyyy HH:mm",
+                               F: "dddd,' lo 'd MMMM' de 'yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "co-FR", "default", {
+       name: "co-FR",
+       englishName: "Corsican (France)",
+       nativeName: "Corsu (France)",
+       language: "co",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Mica numericu",
+               negativeInfinity: "-Infinitu",
+               positiveInfinity: "+Infinitu",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dumenica","luni","marti","mercuri","ghjovi","venderi","sabbatu"],
+                               namesAbbr: ["dum.","lun.","mar.","mer.","ghj.","ven.","sab."],
+                               namesShort: ["du","lu","ma","me","gh","ve","sa"]
+                       },
+                       months: {
+                               names: ["ghjennaghju","ferraghju","marzu","aprile","maghju","ghjunghju","lugliu","aostu","settembre","ottobre","nuvembre","dicembre",""],
+                               namesAbbr: ["ghje","ferr","marz","apri","magh","ghju","lugl","aost","sett","otto","nuve","dice",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"dopu J-C","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "gsw-FR", "default", {
+       name: "gsw-FR",
+       englishName: "Alsatian (France)",
+       nativeName: "Elsässisch (Frànkrisch)",
+       language: "gsw",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Ohne Nummer",
+               negativeInfinity: "-Unendlich",
+               positiveInfinity: "+Unendlich",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Sundàà","Mondàà","Dienschdàà","Mittwuch","Dunnerschdàà","Fridàà","Sàmschdàà"],
+                               namesAbbr: ["Su.","Mo.","Di.","Mi.","Du.","Fr.","Sà."],
+                               namesShort: ["Su","Mo","Di","Mi","Du","Fr","Sà"]
+                       },
+                       months: {
+                               names: ["Jänner","Feverje","März","Àpril","Mai","Jüni","Jüli","Augscht","September","Oktower","Nowember","Dezember",""],
+                               namesAbbr: ["Jän.","Fev.","März","Apr.","Mai","Jüni","Jüli","Aug.","Sept.","Okt.","Now.","Dez.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"Vor J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sah-RU", "default", {
+       name: "sah-RU",
+       englishName: "Yakut (Russia)",
+       nativeName: "саха (Россия)",
+       language: "sah",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "NAN",
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "с."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["баскыһыанньа","бэнидиэнньик","оптуорунньук","сэрэдэ","чэппиэр","бээтинсэ","субуота"],
+                               namesAbbr: ["Бс","Бн","Оп","Ср","Чп","Бт","Сб"],
+                               namesShort: ["Бс","Бн","Оп","Ср","Чп","Бт","Сб"]
+                       },
+                       months: {
+                               names: ["Тохсунньу","Олунньу","Кулун тутар","Муус устар","Ыам ыйа","Бэс ыйа","От ыйа","Атырдьах ыйа","Балаҕан ыйа","Алтынньы","Сэтинньи","Ахсынньы",""],
+                               namesAbbr: ["тхс","олн","кул","мст","ыам","бэс","отй","атр","блҕ","алт","стн","ахс",""]
+                       },
+                       monthsGenitive: {
+                               names: ["тохсунньу","олунньу","кулун тутар","муус устар","ыам ыйын","бэс ыйын","от ыйын","атырдьах ыйын","балаҕан ыйын","алтынньы","сэтинньи","ахсынньы",""],
+                               namesAbbr: ["тхс","олн","кул","мст","ыам","бэс","отй","атр","блҕ","алт","стн","ахс",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "MM.dd.yyyy",
+                               D: "MMMM d yyyy 'с.'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d yyyy 'с.' H:mm",
+                               F: "MMMM d yyyy 'с.' H:mm:ss",
+                               Y: "MMMM yyyy 'с.'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "qut-GT", "default", {
+       name: "qut-GT",
+       englishName: "K'iche (Guatemala)",
+       nativeName: "K'iche (Guatemala)",
+       language: "qut",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       symbol: "Q"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["juq'ij","kaq'ij","oxq'ij","kajq'ij","joq'ij","waqq'ij","wuqq'ij"],
+                               namesAbbr: ["juq","kaq","oxq","kajq","joq","waqq","wuqq"],
+                               namesShort: ["ju","ka","ox","ka","jo","wa","wu"]
+                       },
+                       months: {
+                               names: ["nab'e ik'","ukab' ik'","rox ik'","ukaj ik'","uro' ik'","uwaq ik'","uwuq ik'","uwajxaq ik'","ub'elej ik'","ulaj ik'","ujulaj ik'","ukab'laj ik'",""],
+                               namesAbbr: ["nab'e","ukab","rox","ukaj","uro","uwaq","uwuq","uwajxaq","ub'elej","ulaj","ujulaj","ukab'laj",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "rw-RW", "default", {
+       name: "rw-RW",
+       englishName: "Kinyarwanda (Rwanda)",
+       nativeName: "Kinyarwanda (Rwanda)",
+       language: "rw",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "RWF"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Ku wa mbere","Ku wa kabiri","Ku wa gatatu","Ku wa kane","Ku wa gatanu","Ku wa gatandatu","Ku cyumweru"],
+                               namesAbbr: ["mbe.","kab.","gat.","kan.","gat.","gat.","cyu."],
+                               namesShort: ["mb","ka","ga","ka","ga","ga","cy"]
+                       },
+                       months: {
+                               names: ["Mutarama","Gashyantare","Werurwe","Mata","Gicurasi","Kamena","Nyakanga","Kanama","Nzeli","Ukwakira","Ugushyingo","Ukuboza",""],
+                               namesAbbr: ["Mut","Gas","Wer","Mat","Gic","Kam","Nya","Kan","Nze","Ukwa","Ugu","Uku",""]
+                       },
+                       AM: ["saa moya z.m.","saa moya z.m.","SAA MOYA Z.M."],
+                       PM: ["saa moya z.n.","saa moya z.n.","SAA MOYA Z.N."],
+                       eras: [{"name":"AD","start":null,"offset":0}]
+               }
+       }
+});
+
+Globalize.addCultureInfo( "wo-SN", "default", {
+       name: "wo-SN",
+       englishName: "Wolof (Senegal)",
+       nativeName: "Wolof (Sénégal)",
+       language: "wo",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "XOF"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "prs-AF", "default", {
+       name: "prs-AF",
+       englishName: "Dari (Afghanistan)",
+       nativeName: "درى (افغانستان)",
+       language: "prs",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               ",": ".",
+               ".": ",",
+               NaN: "غ ع",
+               negativeInfinity: "-∞",
+               positiveInfinity: "∞",
+               percent: {
+                       pattern: ["%n-","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$n-","$n"],
+                       symbol: "؋"
+               }
+       },
+       calendars: {
+               standard: {
+                       name: "Hijri",
+                       firstDay: 5,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               f: "dd/MM/yyyy h:mm tt",
+                               F: "dd/MM/yyyy h:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_Localized: {
+                       firstDay: 5,
+                       days: {
+                               names: ["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesAbbr: ["یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],
+                               namesShort: ["ی","د","س","چ","پ","ج","ش"]
+                       },
+                       months: {
+                               names: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","وږى","تله","لړم","ليندۍ","مرغومى",""],
+                               namesAbbr: ["سلواغه","كب","ورى","غويى","غبرګولى","چنګاښ","زمرى","وږى","تله","لړم","ليندۍ","مرغومى",""]
+                       },
+                       AM: ["غ.م","غ.م","غ.م"],
+                       PM: ["غ.و","غ.و","غ.و"],
+                       eras: [{"name":"ل.ه","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy, dd, MMMM, dddd",
+                               f: "yyyy, dd, MMMM, dddd h:mm tt",
+                               F: "yyyy, dd, MMMM, dddd h:mm:ss tt",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "gd-GB", "default", {
+       name: "gd-GB",
+       englishName: "Scottish Gaelic (United Kingdom)",
+       nativeName: "Gàidhlig (An Rìoghachd Aonaichte)",
+       language: "gd",
+       numberFormat: {
+               negativeInfinity: "-Neo-chrìochnachd",
+               positiveInfinity: "Neo-chrìochnachd",
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "£"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],
+                               namesAbbr: ["Dòm","Lua","Mài","Cia","Ard","Hao","Sat"],
+                               namesShort: ["D","L","M","C","A","H","S"]
+                       },
+                       months: {
+                               names: ["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd",""],
+                               namesAbbr: ["Fao","Gea","Màr","Gib","Cèi","Ògm","Iuc","Lùn","Sul","Dàm","Sam","Dùb",""]
+                       },
+                       AM: ["m","m","M"],
+                       PM: ["f","f","F"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-IQ", "default", {
+       name: "ar-IQ",
+       englishName: "Arabic (Iraq)",
+       nativeName: "العربية (العراق)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "د.ع.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "zh-CN", "default", {
+       name: "zh-CN",
+       englishName: "Chinese (Simplified, PRC)",
+       nativeName: "中文(中华人民共和国)",
+       language: "zh-CHS",
+       numberFormat: {
+               NaN: "非数字",
+               negativeInfinity: "负无穷大",
+               positiveInfinity: "正无穷大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["周日","周一","周二","周三","周四","周五","周六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "de-CH", "default", {
+       name: "de-CH",
+       englishName: "German (Switzerland)",
+       nativeName: "Deutsch (Schweiz)",
+       language: "de",
+       numberFormat: {
+               ",": "'",
+               NaN: "n. def.",
+               negativeInfinity: "-unendlich",
+               positiveInfinity: "+unendlich",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": "'"
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": "'",
+                       symbol: "Fr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+                               namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+                               namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d. MMMM yyyy HH:mm",
+                               F: "dddd, d. MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-GB", "default", {
+       name: "en-GB",
+       englishName: "English (United Kingdom)",
+       nativeName: "English (United Kingdom)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "£"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-MX", "default", {
+       name: "es-MX",
+       englishName: "Spanish (Mexico)",
+       nativeName: "Español (México)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fr-BE", "default", {
+       name: "fr-BE",
+       englishName: "French (Belgium)",
+       nativeName: "français (Belgique)",
+       language: "fr",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "it-CH", "default", {
+       name: "it-CH",
+       englishName: "Italian (Switzerland)",
+       nativeName: "italiano (Svizzera)",
+       language: "it",
+       numberFormat: {
+               ",": "'",
+               NaN: "Non un numero reale",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "+Infinito",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": "'"
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": "'",
+                       symbol: "fr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["domenica","lunedì","martedì","mercoledì","giovedì","venerdì","sabato"],
+                               namesAbbr: ["dom","lun","mar","mer","gio","ven","sab"],
+                               namesShort: ["do","lu","ma","me","gi","ve","sa"]
+                       },
+                       months: {
+                               names: ["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre",""],
+                               namesAbbr: ["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d. MMMM yyyy HH:mm",
+                               F: "dddd, d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "nl-BE", "default", {
+       name: "nl-BE",
+       englishName: "Dutch (Belgium)",
+       nativeName: "Nederlands (België)",
+       language: "nl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NaN (Niet-een-getal)",
+               negativeInfinity: "-oneindig",
+               positiveInfinity: "oneindig",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],
+                               namesAbbr: ["zo","ma","di","wo","do","vr","za"],
+                               namesShort: ["zo","ma","di","wo","do","vr","za"]
+                       },
+                       months: {
+                               names: ["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd d MMMM yyyy H:mm",
+                               F: "dddd d MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "nn-NO", "default", {
+       name: "nn-NO",
+       englishName: "Norwegian, Nynorsk (Norway)",
+       nativeName: "norsk, nynorsk (Noreg)",
+       language: "nn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],
+                               namesAbbr: ["sø","må","ty","on","to","fr","la"],
+                               namesShort: ["sø","må","ty","on","to","fr","la"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "pt-PT", "default", {
+       name: "pt-PT",
+       englishName: "Portuguese (Portugal)",
+       nativeName: "português (Portugal)",
+       language: "pt",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NaN (Não é um número)",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "+Infinito",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"],
+                               namesAbbr: ["dom","seg","ter","qua","qui","sex","sáb"],
+                               namesShort: ["D","S","T","Q","Q","S","S"]
+                       },
+                       months: {
+                               names: ["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro",""],
+                               namesAbbr: ["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dddd, d' de 'MMMM' de 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d' de 'MMMM' de 'yyyy HH:mm",
+                               F: "dddd, d' de 'MMMM' de 'yyyy HH:mm:ss",
+                               M: "d/M",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sr-Latn-CS", "default", {
+       name: "sr-Latn-CS",
+       englishName: "Serbian (Latin, Serbia and Montenegro (Former))",
+       nativeName: "srpski (Srbija i Crna Gora (Prethodno))",
+       language: "sr-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-beskonačnost",
+               positiveInfinity: "+beskonačnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Din."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sre","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n.e.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sv-FI", "default", {
+       name: "sv-FI",
+       englishName: "Swedish (Finland)",
+       nativeName: "svenska (Finland)",
+       language: "sv",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],
+                               namesAbbr: ["sö","må","ti","on","to","fr","lö"],
+                               namesShort: ["sö","må","ti","on","to","fr","lö"]
+                       },
+                       months: {
+                               names: ["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "'den 'd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "'den 'd MMMM yyyy HH:mm",
+                               F: "'den 'd MMMM yyyy HH:mm:ss",
+                               M: "'den 'd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "az-Cyrl-AZ", "default", {
+       name: "az-Cyrl-AZ",
+       englishName: "Azeri (Cyrillic, Azerbaijan)",
+       nativeName: "Азәрбајҹан (Азәрбајҹан)",
+       language: "az-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "ман."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Базар","Базар ертәси","Чәршәнбә ахшамы","Чәршәнбә","Ҹүмә ахшамы","Ҹүмә","Шәнбә"],
+                               namesAbbr: ["Б","Бе","Ча","Ч","Ҹа","Ҹ","Ш"],
+                               namesShort: ["Б","Бе","Ча","Ч","Ҹа","Ҹ","Ш"]
+                       },
+                       months: {
+                               names: ["Јанвар","Феврал","Март","Апрел","Мај","Ијун","Ијул","Август","Сентјабр","Октјабр","Нојабр","Декабр",""],
+                               namesAbbr: ["Јан","Фев","Мар","Апр","Мај","Ијун","Ијул","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["јанвар","феврал","март","апрел","мај","ијун","ијул","август","сентјабр","октјабр","нојабр","декабр",""],
+                               namesAbbr: ["Јан","Фев","Мар","Апр","мая","ијун","ијул","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "dsb-DE", "default", {
+       name: "dsb-DE",
+       englishName: "Lower Sorbian (Germany)",
+       nativeName: "dolnoserbšćina (Nimska)",
+       language: "dsb",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "njedefinowane",
+               negativeInfinity: "-njekońcne",
+               positiveInfinity: "+njekońcne",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ". ",
+                       firstDay: 1,
+                       days: {
+                               names: ["njeźela","ponjeźele","wałtora","srjoda","stwortk","pětk","sobota"],
+                               namesAbbr: ["nje","pon","wał","srj","stw","pět","sob"],
+                               namesShort: ["n","p","w","s","s","p","s"]
+                       },
+                       months: {
+                               names: ["januar","februar","měrc","apryl","maj","junij","julij","awgust","september","oktober","nowember","december",""],
+                               namesAbbr: ["jan","feb","měr","apr","maj","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       monthsGenitive: {
+                               names: ["januara","februara","měrca","apryla","maja","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""],
+                               namesAbbr: ["jan","feb","měr","apr","maj","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"po Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d. M. yyyy",
+                               D: "dddd, 'dnja' d. MMMM yyyy",
+                               t: "H.mm 'goź.'",
+                               T: "H:mm:ss",
+                               f: "dddd, 'dnja' d. MMMM yyyy H.mm 'goź.'",
+                               F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "se-SE", "default", {
+       name: "se-SE",
+       englishName: "Sami, Northern (Sweden)",
+       nativeName: "davvisámegiella (Ruoŧŧa)",
+       language: "se",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["sotnabeaivi","mánnodat","disdat","gaskavahkku","duorastat","bearjadat","lávvardat"],
+                               namesAbbr: ["sotn","mán","dis","gask","duor","bear","láv"],
+                               namesShort: ["s","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ođđajagemánnu","guovvamánnu","njukčamánnu","cuoŋománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","čakčamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ođđajagimánu","guovvamánu","njukčamánu","cuoŋománu","miessemánu","geassemánu","suoidnemánu","borgemánu","čakčamánu","golggotmánu","skábmamánu","juovlamánu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ga-IE", "default", {
+       name: "ga-IE",
+       englishName: "Irish (Ireland)",
+       nativeName: "Gaeilge (Éire)",
+       language: "ga",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],
+                               namesAbbr: ["Domh","Luan","Máir","Céad","Déar","Aoi","Sath"],
+                               namesShort: ["Do","Lu","Má","Cé","De","Ao","Sa"]
+                       },
+                       months: {
+                               names: ["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig",""],
+                               namesAbbr: ["Ean","Feabh","Már","Aib","Bealt","Meith","Iúil","Lún","M.Fómh","D.Fómh","Samh","Noll",""]
+                       },
+                       AM: ["r.n.","r.n.","R.N."],
+                       PM: ["i.n.","i.n.","I.N."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ms-BN", "default", {
+       name: "ms-BN",
+       englishName: "Malay (Brunei Darussalam)",
+       nativeName: "Bahasa Melayu (Brunei Darussalam)",
+       language: "ms",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       decimals: 0,
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu"],
+                               namesAbbr: ["Ahad","Isnin","Sel","Rabu","Khamis","Jumaat","Sabtu"],
+                               namesShort: ["A","I","S","R","K","J","S"]
+                       },
+                       months: {
+                               names: ["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember",""],
+                               namesAbbr: ["Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sept","Okt","Nov","Dis",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM yyyy H:mm",
+                               F: "dd MMMM yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "uz-Cyrl-UZ", "default", {
+       name: "uz-Cyrl-UZ",
+       englishName: "Uzbek (Cyrillic, Uzbekistan)",
+       nativeName: "Ўзбек (Ўзбекистон)",
+       language: "uz-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "сўм"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["якшанба","душанба","сешанба","чоршанба","пайшанба","жума","шанба"],
+                               namesAbbr: ["якш","дш","сш","чш","пш","ж","ш"],
+                               namesShort: ["я","д","с","ч","п","ж","ш"]
+                       },
+                       months: {
+                               names: ["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["январ","феврал","март","апрел","май","июн","июл","август","сентябр","октябр","ноябр","декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","мая","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "yyyy 'йил' d-MMMM",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'йил' d-MMMM HH:mm",
+                               F: "yyyy 'йил' d-MMMM HH:mm:ss",
+                               M: "d-MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "bn-BD", "default", {
+       name: "bn-BD",
+       englishName: "Bengali (Bangladesh)",
+       nativeName: "বাংলা (বাংলাদেশ)",
+       language: "bn",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       pattern: ["-%n","%n"],
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "৳"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       ":": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["রবিবার","সোমবার","মঙ্গলবার","বুধবার","বৃহস্পতিবার","শুক্রবার","শনিবার"],
+                               namesAbbr: ["রবি.","সোম.","মঙ্গল.","বুধ.","বৃহস্পতি.","শুক্র.","শনি."],
+                               namesShort: ["র","স","ম","ব","ব","শ","শ"]
+                       },
+                       months: {
+                               names: ["জানুয়ারী","ফেব্রুয়ারী","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগস্ট","সেপ্টেম্বর","অক্টোবর","নভেম্বর","ডিসেম্বর",""],
+                               namesAbbr: ["জানু.","ফেব্রু.","মার্চ","এপ্রিল","মে","জুন","জুলাই","আগ.","সেপ্টে.","অক্টো.","নভে.","ডিসে.",""]
+                       },
+                       AM: ["পুর্বাহ্ন","পুর্বাহ্ন","পুর্বাহ্ন"],
+                       PM: ["অপরাহ্ন","অপরাহ্ন","অপরাহ্ন"],
+                       patterns: {
+                               d: "dd-MM-yy",
+                               D: "dd MMMM yyyy",
+                               t: "HH.mm",
+                               T: "HH.mm.ss",
+                               f: "dd MMMM yyyy HH.mm",
+                               F: "dd MMMM yyyy HH.mm.ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "mn-Mong-CN", "default", {
+       name: "mn-Mong-CN",
+       englishName: "Mongolian (Traditional Mongolian, PRC)",
+       nativeName: "ᠮᠤᠨᠭᠭᠤᠯ ᠬᠡᠯᠡ (ᠪᠦᠭᠦᠳᠡ ᠨᠠᠢᠷᠠᠮᠳᠠᠬᠤ ᠳᠤᠮᠳᠠᠳᠤ ᠠᠷᠠᠳ ᠣᠯᠣᠰ)",
+       language: "mn-Mong",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "ᠲᠤᠭᠠᠠ ᠪᠤᠰᠤ",
+               negativeInfinity: "ᠰᠦᠬᠡᠷᠬᠦ ᠬᠢᠵᠠᠭᠠᠷᠭᠦᠢ ᠶᠡᠬᠡ",
+               positiveInfinity: "ᠡᠶ᠋ᠡᠷᠬᠦ ᠬᠢᠵᠠᠭᠠᠷᠭᠦᠢ ᠶᠠᠬᠡ",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       groupSizes: [3,0],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["ᠭᠠᠷᠠᠭ ᠤᠨ ᠡᠳᠦᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠨᠢᠭᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠬᠣᠶᠠᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠭᠤᠷᠪᠠᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠳᠥᠷᠪᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠲᠠᠪᠤᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠵᠢᠷᠭᠤᠭᠠᠨ"],
+                               namesAbbr: ["ᠭᠠᠷᠠᠭ ᠤᠨ ᠡᠳᠦᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠨᠢᠭᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠬᠣᠶᠠᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠭᠤᠷᠪᠠᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠳᠥᠷᠪᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠲᠠᠪᠤᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠵᠢᠷᠭᠤᠭᠠᠨ"],
+                               namesShort: ["ᠡ‍","ᠨᠢ‍","ᠬᠣ‍","ᠭᠤ‍","ᠳᠥ‍","ᠲᠠ‍","ᠵᠢ‍"]
+                       },
+                       months: {
+                               names: ["ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠭᠤᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠦᠷᠪᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠠᠪᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠵᠢᠷᠭᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠤᠯᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠨᠠᠢᠮᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠶᠢᠰᠦᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ",""],
+                               namesAbbr: ["ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠭᠤᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠦᠷᠪᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠠᠪᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠵᠢᠷᠭᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠤᠯᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠨᠠᠢᠮᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠶᠢᠰᠦᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ᠣᠨ ᠲᠣᠭᠠᠯᠠᠯ ᠤᠨ","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'ᠣᠨ ᠤ᠋' M'ᠰᠠᠷ᠎ᠠ  ᠢᠢᠨ 'd' ᠤ᠋ ᠡᠳᠦᠷ'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'ᠣᠨ ᠤ᠋' M'ᠰᠠᠷ᠎ᠠ  ᠢᠢᠨ 'd' ᠤ᠋ ᠡᠳᠦᠷ' H:mm",
+                               F: "yyyy'ᠣᠨ ᠤ᠋' M'ᠰᠠᠷ᠎ᠠ  ᠢᠢᠨ 'd' ᠤ᠋ ᠡᠳᠦᠷ' H:mm:ss",
+                               M: "M'ᠰᠠᠷ᠎ᠠ' d'ᠡᠳᠦᠷ'",
+                               Y: "yyyy'ᠣᠨ' M'ᠰᠠᠷ᠎ᠠ'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "iu-Latn-CA", "default", {
+       name: "iu-Latn-CA",
+       englishName: "Inuktitut (Latin, Canada)",
+       nativeName: "Inuktitut (Kanatami)",
+       language: "iu-Latn",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Naattiinguja","Naggajjau","Aippiq","Pingatsiq","Sitammiq","Tallirmiq","Sivataarvik"],
+                               namesAbbr: ["Nat","Nag","Aip","Pi","Sit","Tal","Siv"],
+                               namesShort: ["N","N","A","P","S","T","S"]
+                       },
+                       months: {
+                               names: ["Jaannuari","Viivvuari","Maatsi","Iipuri","Mai","Juuni","Julai","Aaggiisi","Sitipiri","Utupiri","Nuvipiri","Tisipiri",""],
+                               namesAbbr: ["Jan","Viv","Mas","Ipu","Mai","Jun","Jul","Agi","Sii","Uut","Nuv","Tis",""]
+                       },
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "ddd, MMMM dd,yyyy",
+                               f: "ddd, MMMM dd,yyyy h:mm tt",
+                               F: "ddd, MMMM dd,yyyy h:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tzm-Latn-DZ", "default", {
+       name: "tzm-Latn-DZ",
+       englishName: "Tamazight (Latin, Algeria)",
+       nativeName: "Tamazight (Djazaïr)",
+       language: "tzm-Latn",
+       numberFormat: {
+               pattern: ["n-"],
+               ",": ".",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       symbol: "DZD"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 6,
+                       days: {
+                               names: ["Acer","Arime","Aram","Ahad","Amhadh","Sem","Sedh"],
+                               namesAbbr: ["Ace","Ari","Ara","Aha","Amh","Sem","Sed"],
+                               namesShort: ["Ac","Ar","Ar","Ah","Am","Se","Se"]
+                       },
+                       months: {
+                               names: ["Yenayer","Furar","Maghres","Yebrir","Mayu","Yunyu","Yulyu","Ghuct","Cutenber","Ktuber","Wambir","Dujanbir",""],
+                               namesAbbr: ["Yen","Fur","Mag","Yeb","May","Yun","Yul","Ghu","Cut","Ktu","Wam","Duj",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM, yyyy H:mm",
+                               F: "dd MMMM, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "quz-EC", "default", {
+       name: "quz-EC",
+       englishName: "Quechua (Ecuador)",
+       nativeName: "runasimi (Ecuador)",
+       language: "quz",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"],
+                               namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"],
+                               namesShort: ["d","k","a","m","h","b","k"]
+                       },
+                       months: {
+                               names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""],
+                               namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-EG", "default", {
+       name: "ar-EG",
+       englishName: "Arabic (Egypt)",
+       nativeName: "العربية (مصر)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               decimals: 3,
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               percent: {
+                       decimals: 3
+               },
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ج.م.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "zh-HK", "default", {
+       name: "zh-HK",
+       englishName: "Chinese (Traditional, Hong Kong S.A.R.)",
+       nativeName: "中文(香港特別行政區)",
+       language: "zh-CHT",
+       numberFormat: {
+               NaN: "非數字",
+               negativeInfinity: "負無窮大",
+               positiveInfinity: "正無窮大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       symbol: "HK$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["週日","週一","週二","週三","週四","週五","週六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "de-AT", "default", {
+       name: "de-AT",
+       englishName: "German (Austria)",
+       nativeName: "Deutsch (Österreich)",
+       language: "de",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "n. def.",
+               negativeInfinity: "-unendlich",
+               positiveInfinity: "+unendlich",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+                               namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+                               namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Jänner","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, dd. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, dd. MMMM yyyy HH:mm",
+                               F: "dddd, dd. MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-AU", "default", {
+       name: "en-AU",
+       englishName: "English (Australia)",
+       nativeName: "English (Australia)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "dddd, d MMMM yyyy",
+                               f: "dddd, d MMMM yyyy h:mm tt",
+                               F: "dddd, d MMMM yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-ES", "default", {
+       name: "es-ES",
+       englishName: "Spanish (Spain, International Sort)",
+       nativeName: "Español (España, alfabetización internacional)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fr-CA", "default", {
+       name: "fr-CA",
+       englishName: "French (Canada)",
+       nativeName: "français (Canada)",
+       language: "fr",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["(n $)","n $"],
+                       ",": " ",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d MMMM yyyy HH:mm",
+                               F: "d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sr-Cyrl-CS", "default", {
+       name: "sr-Cyrl-CS",
+       englishName: "Serbian (Cyrillic, Serbia and Montenegro (Former))",
+       nativeName: "српски (Србија и Црна Гора (Претходно))",
+       language: "sr-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Дин."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недеља","понедељак","уторак","среда","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["не","по","ут","ср","че","пе","су"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "se-FI", "default", {
+       name: "se-FI",
+       englishName: "Sami, Northern (Finland)",
+       nativeName: "davvisámegiella (Suopma)",
+       language: "se",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sotnabeaivi","vuossárga","maŋŋebárga","gaskavahkku","duorastat","bearjadat","lávvardat"],
+                               namesAbbr: ["sotn","vuos","maŋ","gask","duor","bear","láv"],
+                               namesShort: ["s","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ođđajagemánnu","guovvamánnu","njukčamánnu","cuoŋománnu","miessemánnu","geassemánnu","suoidnemánnu","borgemánnu","čakčamánnu","golggotmánnu","skábmamánnu","juovlamánnu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ođđajagimánu","guovvamánu","njukčamánu","cuoŋománu","miessemánu","geassemánu","suoidnemánu","borgemánu","čakčamánu","golggotmánu","skábmamánu","juovlamánu",""],
+                               namesAbbr: ["ođđj","guov","njuk","cuo","mies","geas","suoi","borg","čakč","golg","skáb","juov",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d'. b. 'yyyy H:mm",
+                               F: "MMMM d'. b. 'yyyy H:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "quz-PE", "default", {
+       name: "quz-PE",
+       englishName: "Quechua (Peru)",
+       nativeName: "runasimi (Piruw)",
+       language: "quz",
+       numberFormat: {
+               percent: {
+                       pattern: ["-%n","%n"]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       symbol: "S/."
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["intichaw","killachaw","atipachaw","quyllurchaw","Ch' askachaw","Illapachaw","k'uychichaw"],
+                               namesAbbr: ["int","kil","ati","quy","Ch'","Ill","k'u"],
+                               namesShort: ["d","k","a","m","h","b","k"]
+                       },
+                       months: {
+                               names: ["Qulla puquy","Hatun puquy","Pauqar waray","ayriwa","Aymuray","Inti raymi","Anta Sitwa","Qhapaq Sitwa","Uma raymi","Kantaray","Ayamarq'a","Kapaq Raymi",""],
+                               namesAbbr: ["Qul","Hat","Pau","ayr","Aym","Int","Ant","Qha","Uma","Kan","Aya","Kap",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-LY", "default", {
+       name: "ar-LY",
+       englishName: "Arabic (Libya)",
+       nativeName: "العربية (ليبيا)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               decimals: 3,
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               percent: {
+                       decimals: 3
+               },
+               currency: {
+                       pattern: ["$n-","$n"],
+                       decimals: 3,
+                       symbol: "د.ل.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "zh-SG", "default", {
+       name: "zh-SG",
+       englishName: "Chinese (Simplified, Singapore)",
+       nativeName: "中文(新加坡)",
+       language: "zh-CHS",
+       numberFormat: {
+               percent: {
+                       pattern: ["-n%","n%"]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["周日","周一","周二","周三","周四","周五","周六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "tt h:mm",
+                               T: "tt h:mm:ss",
+                               f: "yyyy'年'M'月'd'日' tt h:mm",
+                               F: "yyyy'年'M'月'd'日' tt h:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "de-LU", "default", {
+       name: "de-LU",
+       englishName: "German (Luxembourg)",
+       nativeName: "Deutsch (Luxemburg)",
+       language: "de",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "n. def.",
+               negativeInfinity: "-unendlich",
+               positiveInfinity: "+unendlich",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+                               namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+                               namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d. MMMM yyyy HH:mm",
+                               F: "dddd, d. MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-CA", "default", {
+       name: "en-CA",
+       englishName: "English (Canada)",
+       nativeName: "English (Canada)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "MMMM-dd-yy",
+                               f: "MMMM-dd-yy h:mm tt",
+                               F: "MMMM-dd-yy h:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-GT", "default", {
+       name: "es-GT",
+       englishName: "Spanish (Guatemala)",
+       nativeName: "Español (Guatemala)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       symbol: "Q"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fr-CH", "default", {
+       name: "fr-CH",
+       englishName: "French (Switzerland)",
+       nativeName: "français (Suisse)",
+       language: "fr",
+       numberFormat: {
+               ",": "'",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": "'"
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": "'",
+                       symbol: "fr."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "hr-BA", "default", {
+       name: "hr-BA",
+       englishName: "Croatian (Latin, Bosnia and Herzegovina)",
+       nativeName: "hrvatski (Bosna i Hercegovina)",
+       language: "hr",
+       numberFormat: {
+               pattern: ["- n"],
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "KM"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["siječanj","veljača","ožujak","travanj","svibanj","lipanj","srpanj","kolovoz","rujan","listopad","studeni","prosinac",""],
+                               namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+                       },
+                       monthsGenitive: {
+                               names: ["siječnja","veljače","ožujka","travnja","svibnja","lipnja","srpnja","kolovoza","rujna","listopada","studenog","prosinca",""],
+                               namesAbbr: ["sij","vlj","ožu","tra","svi","lip","srp","kol","ruj","lis","stu","pro",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy.",
+                               D: "d. MMMM yyyy.",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy. H:mm",
+                               F: "d. MMMM yyyy. H:mm:ss",
+                               M: "d. MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "smj-NO", "default", {
+       name: "smj-NO",
+       englishName: "Sami, Lule (Norway)",
+       nativeName: "julevusámegiella (Vuodna)",
+       language: "smj",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["sådnåbiejvve","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"],
+                               namesAbbr: ["såd","mán","dis","gas","duor","bier","láv"],
+                               namesShort: ["s","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ådåjakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bårggemánno","ragátmánno","gålgådismánno","basádismánno","javllamánno",""],
+                               namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ådåjakmáno","guovvamáno","sjnjuktjamáno","vuoratjismáno","moarmesmáno","biehtsemáno","sjnjilltjamáno","bårggemáno","ragátmáno","gålgådismáno","basádismáno","javllamáno",""],
+                               namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-DZ", "default", {
+       name: "ar-DZ",
+       englishName: "Arabic (Algeria)",
+       nativeName: "العربية (الجزائر)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "د.ج.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM, yyyy H:mm",
+                               F: "dd MMMM, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd/MM/yyyy H:mm",
+                               F: "dd/MM/yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd/MMMM/yyyy H:mm",
+                               F: "dd/MMMM/yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "zh-MO", "default", {
+       name: "zh-MO",
+       englishName: "Chinese (Traditional, Macao S.A.R.)",
+       nativeName: "中文(澳門特別行政區)",
+       language: "zh-CHT",
+       numberFormat: {
+               NaN: "非數字",
+               negativeInfinity: "負無窮大",
+               positiveInfinity: "正無窮大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       symbol: "MOP"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["週日","週一","週二","週三","週四","週五","週六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "de-LI", "default", {
+       name: "de-LI",
+       englishName: "German (Liechtenstein)",
+       nativeName: "Deutsch (Liechtenstein)",
+       language: "de",
+       numberFormat: {
+               ",": "'",
+               NaN: "n. def.",
+               negativeInfinity: "-unendlich",
+               positiveInfinity: "+unendlich",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": "'"
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": "'",
+                       symbol: "CHF"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],
+                               namesAbbr: ["So","Mo","Di","Mi","Do","Fr","Sa"],
+                               namesShort: ["So","Mo","Di","Mi","Do","Fr","Sa"]
+                       },
+                       months: {
+                               names: ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember",""],
+                               namesAbbr: ["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n. Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "dddd, d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd, d. MMMM yyyy HH:mm",
+                               F: "dddd, d. MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-NZ", "default", {
+       name: "en-NZ",
+       englishName: "English (New Zealand)",
+       nativeName: "English (New Zealand)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "dddd, d MMMM yyyy",
+                               f: "dddd, d MMMM yyyy h:mm tt",
+                               F: "dddd, d MMMM yyyy h:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-CR", "default", {
+       name: "es-CR",
+       englishName: "Spanish (Costa Rica)",
+       nativeName: "Español (Costa Rica)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       ",": ".",
+                       ".": ",",
+                       symbol: "₡"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fr-LU", "default", {
+       name: "fr-LU",
+       englishName: "French (Luxembourg)",
+       nativeName: "français (Luxembourg)",
+       language: "fr",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "bs-Latn-BA", "default", {
+       name: "bs-Latn-BA",
+       englishName: "Bosnian (Latin, Bosnia and Herzegovina)",
+       nativeName: "bosanski (Bosna i Hercegovina)",
+       language: "bs-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "KM"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "smj-SE", "default", {
+       name: "smj-SE",
+       englishName: "Sami, Lule (Sweden)",
+       nativeName: "julevusámegiella (Svierik)",
+       language: "smj",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ájllek","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"],
+                               namesAbbr: ["ájl","mán","dis","gas","duor","bier","láv"],
+                               namesShort: ["á","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ådåjakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bårggemánno","ragátmánno","gålgådismánno","basádismánno","javllamánno",""],
+                               namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ådåjakmáno","guovvamáno","sjnjuktjamáno","vuoratjismáno","moarmesmáno","biehtsemáno","sjnjilltjamáno","bårggemáno","ragátmáno","gålgådismáno","basádismáno","javllamáno",""],
+                               namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-MA", "default", {
+       name: "ar-MA",
+       englishName: "Arabic (Morocco)",
+       nativeName: "العربية (المملكة المغربية)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "د.م.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","ماي","يونيو","يوليوز","غشت","شتنبر","أكتوبر","نونبر","دجنبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","ماي","يونيو","يوليوز","غشت","شتنبر","أكتوبر","نونبر","دجنبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM, yyyy H:mm",
+                               F: "dd MMMM, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd/MM/yyyy H:mm",
+                               F: "dd/MM/yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd/MMMM/yyyy H:mm",
+                               F: "dd/MMMM/yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-IE", "default", {
+       name: "en-IE",
+       englishName: "English (Ireland)",
+       nativeName: "English (Ireland)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-PA", "default", {
+       name: "es-PA",
+       englishName: "Spanish (Panama)",
+       nativeName: "Español (Panamá)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       symbol: "B/."
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "fr-MC", "default", {
+       name: "fr-MC",
+       englishName: "French (Monaco)",
+       nativeName: "français (Principauté de Monaco)",
+       language: "fr",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd d MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dddd d MMMM yyyy HH:mm",
+                               F: "dddd d MMMM yyyy HH:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sr-Latn-BA", "default", {
+       name: "sr-Latn-BA",
+       englishName: "Serbian (Latin, Bosnia and Herzegovina)",
+       nativeName: "srpski (Bosna i Hercegovina)",
+       language: "sr-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-beskonačnost",
+               positiveInfinity: "+beskonačnost",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "KM"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sre","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n.e.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sma-NO", "default", {
+       name: "sma-NO",
+       englishName: "Sami, Southern (Norway)",
+       nativeName: "åarjelsaemiengiele (Nöörje)",
+       language: "sma",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-%n","%n"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["aejlege","måanta","dæjsta","gaskevåhkoe","duarsta","bearjadahke","laavvardahke"],
+                               namesAbbr: ["aej","måa","dæj","gask","duar","bearj","laav"],
+                               namesShort: ["a","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve",""],
+                               namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""]
+                       },
+                       monthsGenitive: {
+                               names: ["tsïengelen","goevten","njoktjen","voerhtjen","suehpeden","ruffien","snjaltjen","mïetsken","skïereden","golken","rahkan","goeven",""],
+                               namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-TN", "default", {
+       name: "ar-TN",
+       englishName: "Arabic (Tunisia)",
+       nativeName: "العربية (تونس)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               decimals: 3,
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               percent: {
+                       decimals: 3
+               },
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       decimals: 3,
+                       symbol: "د.ت.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM, yyyy H:mm",
+                               F: "dd MMMM, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd/MM/yyyy H:mm",
+                               F: "dd/MM/yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd/MMMM/yyyy H:mm",
+                               F: "dd/MMMM/yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, MMMM dd, yyyy H:mm",
+                               F: "dddd, MMMM dd, yyyy H:mm:ss"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-ZA", "default", {
+       name: "en-ZA",
+       englishName: "English (South Africa)",
+       nativeName: "English (South Africa)",
+       numberFormat: {
+               ",": " ",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " "
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "R"
+               }
+       },
+       calendars: {
+               standard: {
+                       patterns: {
+                               d: "yyyy/MM/dd",
+                               D: "dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM yyyy hh:mm tt",
+                               F: "dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-DO", "default", {
+       name: "es-DO",
+       englishName: "Spanish (Dominican Republic)",
+       nativeName: "Español (República Dominicana)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       symbol: "RD$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sr-Cyrl-BA", "default", {
+       name: "sr-Cyrl-BA",
+       englishName: "Serbian (Cyrillic, Bosnia and Herzegovina)",
+       nativeName: "српски (Босна и Херцеговина)",
+       language: "sr-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "КМ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недеља","понедељак","уторак","среда","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["н","п","у","с","ч","п","с"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sma-SE", "default", {
+       name: "sma-SE",
+       englishName: "Sami, Southern (Sweden)",
+       nativeName: "åarjelsaemiengiele (Sveerje)",
+       language: "sma",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["aejlege","måanta","dæjsta","gaskevåhkoe","duarsta","bearjadahke","laavvardahke"],
+                               namesAbbr: ["aej","måa","dæj","gask","duar","bearj","laav"],
+                               namesShort: ["a","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve",""],
+                               namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""]
+                       },
+                       monthsGenitive: {
+                               names: ["tsïengelen","goevten","njoktjen","voerhtjen","suehpeden","ruffien","snjaltjen","mïetsken","skïereden","golken","rahkan","goeven",""],
+                               namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-OM", "default", {
+       name: "ar-OM",
+       englishName: "Arabic (Oman)",
+       nativeName: "العربية (عمان)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       decimals: 3,
+                       symbol: "ر.ع.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-JM", "default", {
+       name: "en-JM",
+       englishName: "English (Jamaica)",
+       nativeName: "English (Jamaica)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"],
+                       symbol: "J$"
+               }
+       },
+       calendars: {
+               standard: {
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-VE", "default", {
+       name: "es-VE",
+       englishName: "Spanish (Bolivarian Republic of Venezuela)",
+       nativeName: "Español (Republica Bolivariana de Venezuela)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Bs. F."
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "bs-Cyrl-BA", "default", {
+       name: "bs-Cyrl-BA",
+       englishName: "Bosnian (Cyrillic, Bosnia and Herzegovina)",
+       nativeName: "босански (Босна и Херцеговина)",
+       language: "bs-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "КМ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недјеља","понедјељак","уторак","сриједа","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["н","п","у","с","ч","п","с"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sms-FI", "default", {
+       name: "sms-FI",
+       englishName: "Sami, Skolt (Finland)",
+       nativeName: "sääm´ǩiõll (Lää´ddjânnam)",
+       language: "sms",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["pâ´sspei´vv","vuõssargg","mââibargg","seärad","nelljdpei´vv","piâtnâc","sue´vet"],
+                               namesAbbr: ["pâ","vu","mâ","se","ne","pi","su"],
+                               namesShort: ["p","v","m","s","n","p","s"]
+                       },
+                       months: {
+                               names: ["ođđee´jjmään","tä´lvvmään","pâ´zzlâšttammään","njuhččmään","vue´ssmään","ǩie´ssmään","suei´nnmään","på´rǧǧmään","čõhččmään","kålggmään","skamm´mään","rosttovmään",""],
+                               namesAbbr: ["ođjm","tä´lvv","pâzl","njuh","vue","ǩie","suei","på´r","čõh","kålg","ska","rost",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ođđee´jjmannu","tä´lvvmannu","pâ´zzlâšttammannu","njuhččmannu","vue´ssmannu","ǩie´ssmannu","suei´nnmannu","på´rǧǧmannu","čõhččmannu","kålggmannu","skamm´mannu","rosttovmannu",""],
+                               namesAbbr: ["ođjm","tä´lvv","pâzl","njuh","vue","ǩie","suei","på´r","čõh","kålg","ska","rost",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "MMMM d'. p. 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d'. p. 'yyyy H:mm",
+                               F: "MMMM d'. p. 'yyyy H:mm:ss",
+                               M: "MMMM d'. p. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-YE", "default", {
+       name: "ar-YE",
+       englishName: "Arabic (Yemen)",
+       nativeName: "العربية (اليمن)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ر.ي.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-029", "default", {
+       name: "en-029",
+       englishName: "English (Caribbean)",
+       nativeName: "English (Caribbean)",
+       numberFormat: {
+               currency: {
+                       pattern: ["-$n","$n"]
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       patterns: {
+                               d: "MM/dd/yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-CO", "default", {
+       name: "es-CO",
+       englishName: "Spanish (Colombia)",
+       nativeName: "Español (Colombia)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sr-Latn-RS", "default", {
+       name: "sr-Latn-RS",
+       englishName: "Serbian (Latin, Serbia)",
+       nativeName: "srpski (Srbija)",
+       language: "sr-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-beskonačnost",
+               positiveInfinity: "+beskonačnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Din."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sre","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n.e.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "smn-FI", "default", {
+       name: "smn-FI",
+       englishName: "Sami, Inari (Finland)",
+       nativeName: "sämikielâ (Suomâ)",
+       language: "smn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["pasepeivi","vuossargâ","majebargâ","koskokko","tuorâstâh","vástuppeivi","lávárdâh"],
+                               namesAbbr: ["pa","vu","ma","ko","tu","vá","lá"],
+                               namesShort: ["p","v","m","k","t","v","l"]
+                       },
+                       months: {
+                               names: ["uđđâivemáánu","kuovâmáánu","njuhčâmáánu","cuáŋuimáánu","vyesimáánu","kesimáánu","syeinimáánu","porgemáánu","čohčâmáánu","roovvâdmáánu","skammâmáánu","juovlâmáánu",""],
+                               namesAbbr: ["uđiv","kuov","njuh","cuoŋ","vyes","kesi","syei","porg","čoh","roov","ska","juov",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "MMMM d'. p. 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d'. p. 'yyyy H:mm",
+                               F: "MMMM d'. p. 'yyyy H:mm:ss",
+                               M: "MMMM d'. p. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-SY", "default", {
+       name: "ar-SY",
+       englishName: "Arabic (Syria)",
+       nativeName: "العربية (سوريا)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ل.س.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-BZ", "default", {
+       name: "en-BZ",
+       englishName: "English (Belize)",
+       nativeName: "English (Belize)",
+       numberFormat: {
+               currency: {
+                       groupSizes: [3,0],
+                       symbol: "BZ$"
+               }
+       },
+       calendars: {
+               standard: {
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd MMMM yyyy hh:mm tt",
+                               F: "dddd, dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-PE", "default", {
+       name: "es-PE",
+       englishName: "Spanish (Peru)",
+       nativeName: "Español (Perú)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       symbol: "S/."
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sr-Cyrl-RS", "default", {
+       name: "sr-Cyrl-RS",
+       englishName: "Serbian (Cyrillic, Serbia)",
+       nativeName: "српски (Србија)",
+       language: "sr-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Дин."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недеља","понедељак","уторак","среда","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["не","по","ут","ср","че","пе","су"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-JO", "default", {
+       name: "ar-JO",
+       englishName: "Arabic (Jordan)",
+       nativeName: "العربية (الأردن)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               decimals: 3,
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               percent: {
+                       decimals: 3
+               },
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       decimals: 3,
+                       symbol: "د.ا.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-TT", "default", {
+       name: "en-TT",
+       englishName: "English (Trinidad and Tobago)",
+       nativeName: "English (Trinidad y Tobago)",
+       numberFormat: {
+               currency: {
+                       groupSizes: [3,0],
+                       symbol: "TT$"
+               }
+       },
+       calendars: {
+               standard: {
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd MMMM yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd MMMM yyyy hh:mm tt",
+                               F: "dddd, dd MMMM yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-AR", "default", {
+       name: "es-AR",
+       englishName: "Spanish (Argentina)",
+       nativeName: "Español (Argentina)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sr-Latn-ME", "default", {
+       name: "sr-Latn-ME",
+       englishName: "Serbian (Latin, Montenegro)",
+       nativeName: "srpski (Crna Gora)",
+       language: "sr-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-beskonačnost",
+               positiveInfinity: "+beskonačnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sre","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n.e.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-LB", "default", {
+       name: "ar-LB",
+       englishName: "Arabic (Lebanon)",
+       nativeName: "العربية (لبنان)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ل.ل.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 1,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_TransliteratedEnglish: {
+                       name: "Gregorian_TransliteratedEnglish",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["أ","ا","ث","أ","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 1,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-ZW", "default", {
+       name: "en-ZW",
+       englishName: "English (Zimbabwe)",
+       nativeName: "English (Zimbabwe)",
+       numberFormat: {
+               currency: {
+                       symbol: "Z$"
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-EC", "default", {
+       name: "es-EC",
+       englishName: "Spanish (Ecuador)",
+       nativeName: "Español (Ecuador)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sr-Cyrl-ME", "default", {
+       name: "sr-Cyrl-ME",
+       englishName: "Serbian (Cyrillic, Montenegro)",
+       nativeName: "српски (Црна Гора)",
+       language: "sr-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недеља","понедељак","уторак","среда","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["не","по","ут","ср","че","пе","су"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-KW", "default", {
+       name: "ar-KW",
+       englishName: "Arabic (Kuwait)",
+       nativeName: "العربية (الكويت)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               decimals: 3,
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               percent: {
+                       decimals: 3
+               },
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       decimals: 3,
+                       symbol: "د.ك.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-PH", "default", {
+       name: "en-PH",
+       englishName: "English (Republic of the Philippines)",
+       nativeName: "English (Philippines)",
+       numberFormat: {
+               currency: {
+                       symbol: "Php"
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-CL", "default", {
+       name: "es-CL",
+       englishName: "Spanish (Chile)",
+       nativeName: "Español (Chile)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-$ n","$ n"],
+                       ",": ".",
+                       ".": ","
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy H:mm",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy H:mm:ss",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-AE", "default", {
+       name: "ar-AE",
+       englishName: "Arabic (U.A.E.)",
+       nativeName: "العربية (الإمارات العربية المتحدة)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "د.إ.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-UY", "default", {
+       name: "es-UY",
+       englishName: "Spanish (Uruguay)",
+       nativeName: "Español (Uruguay)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "$U"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-BH", "default", {
+       name: "ar-BH",
+       englishName: "Arabic (Bahrain)",
+       nativeName: "العربية (البحرين)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               decimals: 3,
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               percent: {
+                       decimals: 3
+               },
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       decimals: 3,
+                       symbol: "د.ب.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-PY", "default", {
+       name: "es-PY",
+       englishName: "Spanish (Paraguay)",
+       nativeName: "Español (Paraguay)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Gs"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ar-QA", "default", {
+       name: "ar-QA",
+       englishName: "Arabic (Qatar)",
+       nativeName: "العربية (قطر)",
+       language: "ar",
+       isRTL: true,
+       numberFormat: {
+               pattern: ["n-"],
+               NaN: "ليس برقم",
+               negativeInfinity: "-لا نهاية",
+               positiveInfinity: "+لا نهاية",
+               currency: {
+                       pattern: ["$n-","$ n"],
+                       symbol: "ر.ق.‏"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd MMMM, yyyy hh:mm tt",
+                               F: "dd MMMM, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               UmAlQura: {
+                       name: "UmAlQura",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MMMM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MMMM/yyyy hh:mm tt",
+                               F: "dd/MMMM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    _yearInfo: [
+                        // MonthLengthFlags, Gregorian Date
+                        [746, -2198707200000],
+                        [1769, -2168121600000],
+                        [3794, -2137449600000],
+                        [3748, -2106777600000],
+                        [3402, -2076192000000],
+                        [2710, -2045606400000],
+                        [1334, -2015020800000],
+                        [2741, -1984435200000],
+                        [3498, -1953763200000],
+                        [2980, -1923091200000],
+                        [2889, -1892505600000],
+                        [2707, -1861920000000],
+                        [1323, -1831334400000],
+                        [2647, -1800748800000],
+                        [1206, -1770076800000],
+                        [2741, -1739491200000],
+                        [1450, -1708819200000],
+                        [3413, -1678233600000],
+                        [3370, -1647561600000],
+                        [2646, -1616976000000],
+                        [1198, -1586390400000],
+                        [2397, -1555804800000],
+                        [748, -1525132800000],
+                        [1749, -1494547200000],
+                        [1706, -1463875200000],
+                        [1365, -1433289600000],
+                        [1195, -1402704000000],
+                        [2395, -1372118400000],
+                        [698, -1341446400000],
+                        [1397, -1310860800000],
+                        [2994, -1280188800000],
+                        [1892, -1249516800000],
+                        [1865, -1218931200000],
+                        [1621, -1188345600000],
+                        [683, -1157760000000],
+                        [1371, -1127174400000],
+                        [2778, -1096502400000],
+                        [1748, -1065830400000],
+                        [3785, -1035244800000],
+                        [3474, -1004572800000],
+                        [3365, -973987200000],
+                        [2637, -943401600000],
+                        [685, -912816000000],
+                        [1389, -882230400000],
+                        [2922, -851558400000],
+                        [2898, -820886400000],
+                        [2725, -790300800000],
+                        [2635, -759715200000],
+                        [1175, -729129600000],
+                        [2359, -698544000000],
+                        [694, -667872000000],
+                        [1397, -637286400000],
+                        [3434, -606614400000],
+                        [3410, -575942400000],
+                        [2710, -545356800000],
+                        [2349, -514771200000],
+                        [605, -484185600000],
+                        [1245, -453600000000],
+                        [2778, -422928000000],
+                        [1492, -392256000000],
+                        [3497, -361670400000],
+                        [3410, -330998400000],
+                        [2730, -300412800000],
+                        [1238, -269827200000],
+                        [2486, -239241600000],
+                        [884, -208569600000],
+                        [1897, -177984000000],
+                        [1874, -147312000000],
+                        [1701, -116726400000],
+                        [1355, -86140800000],
+                        [2731, -55555200000],
+                        [1370, -24883200000],
+                        [2773, 5702400000],
+                        [3538, 36374400000],
+                        [3492, 67046400000],
+                        [3401, 97632000000],
+                        [2709, 128217600000],
+                        [1325, 158803200000],
+                        [2653, 189388800000],
+                        [1370, 220060800000],
+                        [2773, 250646400000],
+                        [1706, 281318400000],
+                        [1685, 311904000000],
+                        [1323, 342489600000],
+                        [2647, 373075200000],
+                        [1198, 403747200000],
+                        [2422, 434332800000],
+                        [1388, 465004800000],
+                        [2901, 495590400000],
+                        [2730, 526262400000],
+                        [2645, 556848000000],
+                        [1197, 587433600000],
+                        [2397, 618019200000],
+                        [730, 648691200000],
+                        [1497, 679276800000],
+                        [3506, 709948800000],
+                        [2980, 740620800000],
+                        [2890, 771206400000],
+                        [2645, 801792000000],
+                        [693, 832377600000],
+                        [1397, 862963200000],
+                        [2922, 893635200000],
+                        [3026, 924307200000],
+                        [3012, 954979200000],
+                        [2953, 985564800000],
+                        [2709, 1016150400000],
+                        [1325, 1046736000000],
+                        [1453, 1077321600000],
+                        [2922, 1107993600000],
+                        [1748, 1138665600000],
+                        [3529, 1169251200000],
+                        [3474, 1199923200000],
+                        [2726, 1230508800000],
+                        [2390, 1261094400000],
+                        [686, 1291680000000],
+                        [1389, 1322265600000],
+                        [874, 1352937600000],
+                        [2901, 1383523200000],
+                        [2730, 1414195200000],
+                        [2381, 1444780800000],
+                        [1181, 1475366400000],
+                        [2397, 1505952000000],
+                        [698, 1536624000000],
+                        [1461, 1567209600000],
+                        [1450, 1597881600000],
+                        [3413, 1628467200000],
+                        [2714, 1659139200000],
+                        [2350, 1689724800000],
+                        [622, 1720310400000],
+                        [1373, 1750896000000],
+                        [2778, 1781568000000],
+                        [1748, 1812240000000],
+                        [1701, 1842825600000],
+                        [0, 1873411200000]
+                    ],
+                    minDate: -2198707200000,
+                    maxDate: 1873411199999,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var days = hday - 1,
+                            gyear = hyear - 1318;
+                        if (gyear < 0 || gyear >= this._yearInfo.length) return null;
+                        var info = this._yearInfo[gyear],
+                            gdate = new Date(info[1]),
+                            monthLength = info[0];
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the gregorian date in the same timezone,
+                        // not what the gregorian date was at GMT time, so we adjust for the offset.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        for (var i = 0; i < hmonth; i++) {
+                            days += 29 + (monthLength & 1);
+                            monthLength = monthLength >> 1;
+                        }
+                        gdate.setDate(gdate.getDate() + days);
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        // Date's ticks in javascript are always from the GMT time,
+                        // but we are interested in the hijri date in the same timezone,
+                        // not what the hijri date was at GMT time, so we adjust for the offset.
+                        var ticks = gdate - gdate.getTimezoneOffset() * 60000;
+                        if (ticks < this.minDate || ticks > this.maxDate) return null;
+                        var hyear = 0,
+                            hmonth = 1;
+                        // find the earliest gregorian date in the array that is greater than or equal to the given date
+                        while (ticks > this._yearInfo[++hyear][1]) { }
+                        if (ticks !== this._yearInfo[hyear][1]) {
+                            hyear--;
+                        }
+                        var info = this._yearInfo[hyear],
+                            // how many days has it been since the date we found in the array?
+                            // 86400000 = ticks per day
+                            days = Math.floor((ticks - info[1]) / 86400000),
+                            monthLength = info[0];
+                        hyear += 1318; // the Nth array entry corresponds to hijri year 1318+N
+                        // now increment day/month based on the total days, considering
+                        // how many days are in each month. We cannot run past the year
+                        // mark since we would have found a different array entry in that case.
+                        var daysInMonth = 29 + (monthLength & 1);
+                        while (days >= daysInMonth) {
+                            days -= daysInMonth;
+                            monthLength = monthLength >> 1;
+                            daysInMonth = 29 + (monthLength & 1);
+                            hmonth++;
+                        }
+                        // remaining days is less than is in one month, thus is the day of the month we landed on
+                        // hmonth-1 because in javascript months are zero based, stay consistent with that.
+                        return [hyear, hmonth - 1, days + 1];
+                    }
+                       }
+               },
+               Hijri: {
+                       name: "Hijri",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""],
+                               namesAbbr: ["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الثانية","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"بعد الهجرة","start":null,"offset":0}],
+                       twoDigitYearMax: 1451,
+                       patterns: {
+                               d: "dd/MM/yy",
+                               D: "dd/MM/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dd/MM/yyyy hh:mm tt",
+                               F: "dd/MM/yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       },
+                       convert: {
+                    // Adapted to Script from System.Globalization.HijriCalendar
+                    ticks1970: 62135596800000,
+                    // number of days leading up to each month
+                    monthDays: [0, 30, 59, 89, 118, 148, 177, 207, 236, 266, 295, 325, 355],
+                    minDate: -42521673600000,
+                    maxDate: 253402300799999,
+                    // The number of days to add or subtract from the calendar to accommodate the variances
+                    // in the start and the end of Ramadan and to accommodate the date difference between
+                    // countries/regions. May be dynamically adjusted based on user preference, but should
+                    // remain in the range of -2 to 2, inclusive.
+                    hijriAdjustment: 0,
+                    toGregorian: function(hyear, hmonth, hday) {
+                        var daysSinceJan0101 = this.daysToYear(hyear) + this.monthDays[hmonth] + hday - 1 - this.hijriAdjustment;
+                        // 86400000 = ticks per day
+                        var gdate = new Date(daysSinceJan0101 * 86400000 - this.ticks1970);
+                        // adjust for timezone, because we are interested in the gregorian date for the same timezone
+                        // but ticks in javascript is always from GMT, unlike the server were ticks counts from the base
+                        // date in the current timezone.
+                        gdate.setMinutes(gdate.getMinutes() + gdate.getTimezoneOffset());
+                        return gdate;
+                    },
+                    fromGregorian: function(gdate) {
+                        if ((gdate < this.minDate) || (gdate > this.maxDate)) return null;
+                        var ticks = this.ticks1970 + (gdate-0) - gdate.getTimezoneOffset() * 60000,
+                            daysSinceJan0101 = Math.floor(ticks / 86400000) + 1 + this.hijriAdjustment;
+                        // very particular formula determined by someone smart, adapted from the server-side implementation.
+                        // it approximates the hijri year.
+                        var hday, hmonth, hyear = Math.floor(((daysSinceJan0101 - 227013) * 30) / 10631) + 1,
+                            absDays = this.daysToYear(hyear),
+                            daysInYear = this.isLeapYear(hyear) ? 355 : 354;
+                        // hyear is just approximate, it may need adjustment up or down by 1.
+                        if (daysSinceJan0101 < absDays) {
+                            hyear--;
+                            absDays -= daysInYear;
+                        }
+                        else if (daysSinceJan0101 === absDays) {
+                            hyear--;
+                            absDays = this.daysToYear(hyear);
+                        }
+                        else {
+                            if (daysSinceJan0101 > (absDays + daysInYear)) {
+                                absDays += daysInYear;
+                                hyear++;
+                            }
+                        }
+                        // determine month by looking at how many days into the hyear we are
+                        // monthDays contains the number of days up to each month.
+                        hmonth = 0;
+                        var daysIntoYear = daysSinceJan0101 - absDays;
+                        while (hmonth <= 11 && daysIntoYear > this.monthDays[hmonth]) {
+                            hmonth++;
+                        }
+                        hmonth--;
+                        hday = daysIntoYear - this.monthDays[hmonth];
+                        return [hyear, hmonth, hday];
+                    },
+                    daysToYear: function(year) {
+                        // calculates how many days since Jan 1, 0001
+                        var yearsToYear30 = Math.floor((year - 1) / 30) * 30,
+                            yearsInto30 = year - yearsToYear30 - 1,
+                            days = Math.floor((yearsToYear30 * 10631) / 30) + 227013;
+                        while (yearsInto30 > 0) {
+                            days += (this.isLeapYear(yearsInto30) ? 355 : 354);
+                            yearsInto30--;
+                        }
+                        return days;
+                    },
+                    isLeapYear: function(year) {
+                        return ((((year * 11) + 14) % 30) < 11);
+                    }
+                       }
+               },
+               Gregorian_MiddleEastFrench: {
+                       name: "Gregorian_MiddleEastFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],
+                               namesAbbr: ["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],
+                               namesShort: ["di","lu","ma","me","je","ve","sa"]
+                       },
+                       months: {
+                               names: ["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre",""],
+                               namesAbbr: ["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc.",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"ap. J.-C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt",
+                               M: "dd MMMM"
+                       }
+               },
+               Gregorian_Arabic: {
+                       name: "Gregorian_Arabic",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""],
+                               namesAbbr: ["كانون الثاني","شباط","آذار","نيسان","أيار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               },
+               Gregorian_TransliteratedFrench: {
+                       name: "Gregorian_TransliteratedFrench",
+                       firstDay: 6,
+                       days: {
+                               names: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesAbbr: ["الأحد","الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت"],
+                               namesShort: ["ح","ن","ث","ر","خ","ج","س"]
+                       },
+                       months: {
+                               names: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""],
+                               namesAbbr: ["جانفييه","فيفرييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر",""]
+                       },
+                       AM: ["ص","ص","ص"],
+                       PM: ["م","م","م"],
+                       eras: [{"name":"م","start":null,"offset":0}],
+                       patterns: {
+                               d: "MM/dd/yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, MMMM dd, yyyy hh:mm tt",
+                               F: "dddd, MMMM dd, yyyy hh:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-IN", "default", {
+       name: "en-IN",
+       englishName: "English (India)",
+       nativeName: "English (India)",
+       numberFormat: {
+               groupSizes: [3,2],
+               percent: {
+                       groupSizes: [3,2]
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,2],
+                       symbol: "Rs."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "dd MMMM yyyy HH:mm",
+                               F: "dd MMMM yyyy HH:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-BO", "default", {
+       name: "es-BO",
+       englishName: "Spanish (Bolivia)",
+       nativeName: "Español (Bolivia)",
+       language: "es",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "$b"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-MY", "default", {
+       name: "en-MY",
+       englishName: "English (Malaysia)",
+       nativeName: "English (Malaysia)",
+       numberFormat: {
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       symbol: "RM"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               namesShort: ["S","M","T","W","T","F","S"]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd, d MMMM, yyyy",
+                               f: "dddd, d MMMM, yyyy h:mm tt",
+                               F: "dddd, d MMMM, yyyy h:mm:ss tt",
+                               M: "d MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-SV", "default", {
+       name: "es-SV",
+       englishName: "Spanish (El Salvador)",
+       nativeName: "Español (El Salvador)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "en-SG", "default", {
+       name: "en-SG",
+       englishName: "English (Singapore)",
+       nativeName: "English (Singapore)",
+       numberFormat: {
+               percent: {
+                       pattern: ["-n%","n%"]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               namesShort: ["S","M","T","W","T","F","S"]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd, d MMMM, yyyy",
+                               f: "dddd, d MMMM, yyyy h:mm tt",
+                               F: "dddd, d MMMM, yyyy h:mm:ss tt",
+                               M: "d MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-HN", "default", {
+       name: "es-HN",
+       englishName: "Spanish (Honduras)",
+       nativeName: "Español (Honduras)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       groupSizes: [3,0],
+                       symbol: "L."
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-NI", "default", {
+       name: "es-NI",
+       englishName: "Spanish (Nicaragua)",
+       nativeName: "Español (Nicaragua)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       groupSizes: [3,0],
+                       symbol: "C$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-PR", "default", {
+       name: "es-PR",
+       englishName: "Spanish (Puerto Rico)",
+       nativeName: "Español (Puerto Rico)",
+       language: "es",
+       numberFormat: {
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               currency: {
+                       pattern: ["($ n)","$ n"],
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sá"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       AM: ["a.m.","a.m.","A.M."],
+                       PM: ["p.m.","p.m.","P.M."],
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               d: "dd/MM/yyyy",
+                               D: "dddd, dd' de 'MMMM' de 'yyyy",
+                               t: "hh:mm tt",
+                               T: "hh:mm:ss tt",
+                               f: "dddd, dd' de 'MMMM' de 'yyyy hh:mm tt",
+                               F: "dddd, dd' de 'MMMM' de 'yyyy hh:mm:ss tt",
+                               M: "dd MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "es-US", "default", {
+       name: "es-US",
+       englishName: "Spanish (United States)",
+       nativeName: "Español (Estados Unidos)",
+       language: "es",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "NeuN",
+               negativeInfinity: "-Infinito",
+               positiveInfinity: "Infinito",
+               percent: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],
+                               namesAbbr: ["dom","lun","mar","mié","jue","vie","sáb"],
+                               namesShort: ["do","lu","ma","mi","ju","vi","sa"]
+                       },
+                       months: {
+                               names: ["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre",""],
+                               namesAbbr: ["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic",""]
+                       },
+                       eras: [{"name":"d.C.","start":null,"offset":0}],
+                       patterns: {
+                               M: "dd' de 'MMMM",
+                               Y: "MMMM' de 'yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "bs-Cyrl", "default", {
+       name: "bs-Cyrl",
+       englishName: "Bosnian (Cyrillic)",
+       nativeName: "босански",
+       language: "bs-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "КМ"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недјеља","понедјељак","уторак","сриједа","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["н","п","у","с","ч","п","с"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "bs-Latn", "default", {
+       name: "bs-Latn",
+       englishName: "Bosnian (Latin)",
+       nativeName: "bosanski",
+       language: "bs-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "KM"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sr-Cyrl", "default", {
+       name: "sr-Cyrl",
+       englishName: "Serbian (Cyrillic)",
+       nativeName: "српски",
+       language: "sr-Cyrl",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-бесконачност",
+               positiveInfinity: "+бесконачност",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Дин."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["недеља","понедељак","уторак","среда","четвртак","петак","субота"],
+                               namesAbbr: ["нед","пон","уто","сре","чет","пет","суб"],
+                               namesShort: ["не","по","ут","ср","че","пе","су"]
+                       },
+                       months: {
+                               names: ["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар",""],
+                               namesAbbr: ["јан","феб","мар","апр","мај","јун","јул","авг","сеп","окт","нов","дец",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"н.е.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sr-Latn", "default", {
+       name: "sr-Latn",
+       englishName: "Serbian (Latin)",
+       nativeName: "srpski",
+       language: "sr-Latn",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-beskonačnost",
+               positiveInfinity: "+beskonačnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Din."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sre","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n.e.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "smn", "default", {
+       name: "smn",
+       englishName: "Sami (Inari)",
+       nativeName: "sämikielâ",
+       language: "smn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["pasepeivi","vuossargâ","majebargâ","koskokko","tuorâstâh","vástuppeivi","lávárdâh"],
+                               namesAbbr: ["pa","vu","ma","ko","tu","vá","lá"],
+                               namesShort: ["p","v","m","k","t","v","l"]
+                       },
+                       months: {
+                               names: ["uđđâivemáánu","kuovâmáánu","njuhčâmáánu","cuáŋuimáánu","vyesimáánu","kesimáánu","syeinimáánu","porgemáánu","čohčâmáánu","roovvâdmáánu","skammâmáánu","juovlâmáánu",""],
+                               namesAbbr: ["uđiv","kuov","njuh","cuoŋ","vyes","kesi","syei","porg","čoh","roov","ska","juov",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "MMMM d'. p. 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d'. p. 'yyyy H:mm",
+                               F: "MMMM d'. p. 'yyyy H:mm:ss",
+                               M: "MMMM d'. p. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "az-Cyrl", "default", {
+       name: "az-Cyrl",
+       englishName: "Azeri (Cyrillic)",
+       nativeName: "Азәрбајҹан дили",
+       language: "az-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "ман."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Базар","Базар ертәси","Чәршәнбә ахшамы","Чәршәнбә","Ҹүмә ахшамы","Ҹүмә","Шәнбә"],
+                               namesAbbr: ["Б","Бе","Ча","Ч","Ҹа","Ҹ","Ш"],
+                               namesShort: ["Б","Бе","Ча","Ч","Ҹа","Ҹ","Ш"]
+                       },
+                       months: {
+                               names: ["Јанвар","Феврал","Март","Апрел","Мај","Ијун","Ијул","Август","Сентјабр","Октјабр","Нојабр","Декабр",""],
+                               namesAbbr: ["Јан","Фев","Мар","Апр","Мај","Ијун","Ијул","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["јанвар","феврал","март","апрел","мај","ијун","ијул","август","сентјабр","октјабр","нојабр","декабр",""],
+                               namesAbbr: ["Јан","Фев","Мар","Апр","мая","ијун","ијул","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sms", "default", {
+       name: "sms",
+       englishName: "Sami (Skolt)",
+       nativeName: "sääm´ǩiõll",
+       language: "sms",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["pâ´sspei´vv","vuõssargg","mââibargg","seärad","nelljdpei´vv","piâtnâc","sue´vet"],
+                               namesAbbr: ["pâ","vu","mâ","se","ne","pi","su"],
+                               namesShort: ["p","v","m","s","n","p","s"]
+                       },
+                       months: {
+                               names: ["ođđee´jjmään","tä´lvvmään","pâ´zzlâšttammään","njuhččmään","vue´ssmään","ǩie´ssmään","suei´nnmään","på´rǧǧmään","čõhččmään","kålggmään","skamm´mään","rosttovmään",""],
+                               namesAbbr: ["ođjm","tä´lvv","pâzl","njuh","vue","ǩie","suei","på´r","čõh","kålg","ska","rost",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ođđee´jjmannu","tä´lvvmannu","pâ´zzlâšttammannu","njuhččmannu","vue´ssmannu","ǩie´ssmannu","suei´nnmannu","på´rǧǧmannu","čõhččmannu","kålggmannu","skamm´mannu","rosttovmannu",""],
+                               namesAbbr: ["ođjm","tä´lvv","pâzl","njuh","vue","ǩie","suei","på´r","čõh","kålg","ska","rost",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "MMMM d'. p. 'yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "MMMM d'. p. 'yyyy H:mm",
+                               F: "MMMM d'. p. 'yyyy H:mm:ss",
+                               M: "MMMM d'. p. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "zh", "default", {
+       name: "zh",
+       englishName: "Chinese",
+       nativeName: "中文",
+       language: "zh",
+       numberFormat: {
+               NaN: "非数字",
+               negativeInfinity: "负无穷大",
+               positiveInfinity: "正无穷大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["周日","周一","周二","周三","周四","周五","周六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "nn", "default", {
+       name: "nn",
+       englishName: "Norwegian (Nynorsk)",
+       nativeName: "norsk (nynorsk)",
+       language: "nn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","måndag","tysdag","onsdag","torsdag","fredag","laurdag"],
+                               namesAbbr: ["sø","må","ty","on","to","fr","la"],
+                               namesShort: ["sø","må","ty","on","to","fr","la"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "bs", "default", {
+       name: "bs",
+       englishName: "Bosnian",
+       nativeName: "bosanski",
+       language: "bs",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "KM"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sri","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "az-Latn", "default", {
+       name: "az-Latn",
+       englishName: "Azeri (Latin)",
+       nativeName: "Azərbaycan­ılı",
+       language: "az-Latn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "man."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"],
+                               namesAbbr: ["B","Be","Ça","Ç","Ca","C","Ş"],
+                               namesShort: ["B","Be","Ça","Ç","Ca","C","Ş"]
+                       },
+                       months: {
+                               names: ["Yanvar","Fevral","Mart","Aprel","May","İyun","İyul","Avgust","Sentyabr","Oktyabr","Noyabr","Dekabr",""],
+                               namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""]
+                       },
+                       monthsGenitive: {
+                               names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""],
+                               namesAbbr: ["Yan","Fev","Mar","Apr","May","İyun","İyul","Avg","Sen","Okt","Noy","Dek",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               M: "d MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sma", "default", {
+       name: "sma",
+       englishName: "Sami (Southern)",
+       nativeName: "åarjelsaemiengiele",
+       language: "sma",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["aejlege","måanta","dæjsta","gaskevåhkoe","duarsta","bearjadahke","laavvardahke"],
+                               namesAbbr: ["aej","måa","dæj","gask","duar","bearj","laav"],
+                               namesShort: ["a","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["tsïengele","goevte","njoktje","voerhtje","suehpede","ruffie","snjaltje","mïetske","skïerede","golke","rahka","goeve",""],
+                               namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""]
+                       },
+                       monthsGenitive: {
+                               names: ["tsïengelen","goevten","njoktjen","voerhtjen","suehpeden","ruffien","snjaltjen","mïetsken","skïereden","golken","rahkan","goeven",""],
+                               namesAbbr: ["tsïen","goevt","njok","voer","sueh","ruff","snja","mïet","skïer","golk","rahk","goev",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "uz-Cyrl", "default", {
+       name: "uz-Cyrl",
+       englishName: "Uzbek (Cyrillic)",
+       nativeName: "Ўзбек",
+       language: "uz-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "сўм"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["якшанба","душанба","сешанба","чоршанба","пайшанба","жума","шанба"],
+                               namesAbbr: ["якш","дш","сш","чш","пш","ж","ш"],
+                               namesShort: ["я","д","с","ч","п","ж","ш"]
+                       },
+                       months: {
+                               names: ["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["январ","феврал","март","апрел","май","июн","июл","август","сентябр","октябр","ноябр","декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","мая","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "yyyy 'йил' d-MMMM",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'йил' d-MMMM HH:mm",
+                               F: "yyyy 'йил' d-MMMM HH:mm:ss",
+                               M: "d-MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "mn-Cyrl", "default", {
+       name: "mn-Cyrl",
+       englishName: "Mongolian (Cyrillic)",
+       nativeName: "Монгол хэл",
+       language: "mn-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n$","n$"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "₮"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["Ням","Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба"],
+                               namesAbbr: ["Ня","Да","Мя","Лх","Пү","Ба","Бя"],
+                               namesShort: ["Ня","Да","Мя","Лх","Пү","Ба","Бя"]
+                       },
+                       months: {
+                               names: ["1 дүгээр сар","2 дугаар сар","3 дугаар сар","4 дүгээр сар","5 дугаар сар","6 дугаар сар","7 дугаар сар","8 дугаар сар","9 дүгээр сар","10 дугаар сар","11 дүгээр сар","12 дугаар сар",""],
+                               namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""]
+                       },
+                       monthsGenitive: {
+                               names: ["1 дүгээр сарын","2 дугаар сарын","3 дугаар сарын","4 дүгээр сарын","5 дугаар сарын","6 дугаар сарын","7 дугаар сарын","8 дугаар сарын","9 дүгээр сарын","10 дугаар сарын","11 дүгээр сарын","12 дугаар сарын",""],
+                               namesAbbr: ["I","II","III","IV","V","VI","VII","VIII","IX","X","XI","XII",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yy.MM.dd",
+                               D: "yyyy 'оны' MMMM d",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy 'оны' MMMM d H:mm",
+                               F: "yyyy 'оны' MMMM d H:mm:ss",
+                               M: "d MMMM",
+                               Y: "yyyy 'он' MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "iu-Cans", "default", {
+       name: "iu-Cans",
+       englishName: "Inuktitut (Syllabics)",
+       nativeName: "ᐃᓄᒃᑎᑐᑦ",
+       language: "iu-Cans",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["ᓈᑦᑏᖑᔭ","ᓇᒡᒐᔾᔭᐅ","ᐊᐃᑉᐱᖅ","ᐱᖓᑦᓯᖅ","ᓯᑕᒻᒥᖅ","ᑕᓪᓕᕐᒥᖅ","ᓯᕙᑖᕐᕕᒃ"],
+                               namesAbbr: ["ᓈᑦᑏ","ᓇᒡᒐ","ᐊᐃᑉᐱ","ᐱᖓᑦᓯ","ᓯᑕ","ᑕᓪᓕ","ᓯᕙᑖᕐᕕᒃ"],
+                               namesShort: ["ᓈ","ᓇ","ᐊ","ᐱ","ᓯ","ᑕ","ᓯ"]
+                       },
+                       months: {
+                               names: ["ᔮᓐᓄᐊᕆ","ᕖᕝᕗᐊᕆ","ᒫᑦᓯ","ᐄᐳᕆ","ᒪᐃ","ᔫᓂ","ᔪᓚᐃ","ᐋᒡᒌᓯ","ᓯᑎᐱᕆ","ᐅᑐᐱᕆ","ᓄᕕᐱᕆ","ᑎᓯᐱᕆ",""],
+                               namesAbbr: ["ᔮᓐᓄ","ᕖᕝᕗ","ᒫᑦᓯ","ᐄᐳᕆ","ᒪᐃ","ᔫᓂ","ᔪᓚᐃ","ᐋᒡᒌ","ᓯᑎᐱ","ᐅᑐᐱ","ᓄᕕᐱ","ᑎᓯᐱ",""]
+                       },
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "dddd,MMMM dd,yyyy",
+                               f: "dddd,MMMM dd,yyyy h:mm tt",
+                               F: "dddd,MMMM dd,yyyy h:mm:ss tt",
+                               Y: "MMMM,yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "zh-Hant", "default", {
+       name: "zh-Hant",
+       englishName: "Chinese (Traditional)",
+       nativeName: "中文(繁體)",
+       language: "zh-Hant",
+       numberFormat: {
+               NaN: "非數字",
+               negativeInfinity: "負無窮大",
+               positiveInfinity: "正無窮大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       symbol: "HK$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["週日","週一","週二","週三","週四","週五","週六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "nb", "default", {
+       name: "nb",
+       englishName: "Norwegian (Bokmål)",
+       nativeName: "norsk (bokmål)",
+       language: "nb",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               negativeInfinity: "-INF",
+               positiveInfinity: "INF",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["$ -n","$ n"],
+                       ",": " ",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],
+                               namesAbbr: ["sø","ma","ti","on","to","fr","lø"],
+                               namesShort: ["sø","ma","ti","on","to","fr","lø"]
+                       },
+                       months: {
+                               names: ["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember",""],
+                               namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "d. MMMM yyyy HH:mm",
+                               F: "d. MMMM yyyy HH:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "sr", "default", {
+       name: "sr",
+       englishName: "Serbian",
+       nativeName: "srpski",
+       language: "sr",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               negativeInfinity: "-beskonačnost",
+               positiveInfinity: "+beskonačnost",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "Din."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       firstDay: 1,
+                       days: {
+                               names: ["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],
+                               namesAbbr: ["ned","pon","uto","sre","čet","pet","sub"],
+                               namesShort: ["ne","po","ut","sr","če","pe","su"]
+                       },
+                       months: {
+                               names: ["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar",""],
+                               namesAbbr: ["jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"n.e.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d.M.yyyy",
+                               D: "d. MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d. MMMM yyyy H:mm",
+                               F: "d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tg-Cyrl", "default", {
+       name: "tg-Cyrl",
+       englishName: "Tajik (Cyrillic)",
+       nativeName: "Тоҷикӣ",
+       language: "tg-Cyrl",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               groupSizes: [3,0],
+               negativeInfinity: "-бесконечность",
+               positiveInfinity: "бесконечность",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       groupSizes: [3,0],
+                       ",": " ",
+                       ".": ";",
+                       symbol: "т.р."
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ".",
+                       days: {
+                               names: ["Яш","Душанбе","Сешанбе","Чоршанбе","Панҷшанбе","Ҷумъа","Шанбе"],
+                               namesAbbr: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"],
+                               namesShort: ["Яш","Дш","Сш","Чш","Пш","Ҷм","Шн"]
+                       },
+                       months: {
+                               names: ["Январ","Феврал","Март","Апрел","Май","Июн","Июл","Август","Сентябр","Октябр","Ноябр","Декабр",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       monthsGenitive: {
+                               names: ["январи","феврали","марти","апрели","маи","июни","июли","августи","сентябри","октябри","ноябри","декабри",""],
+                               namesAbbr: ["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd.MM.yy",
+                               D: "d MMMM yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "d MMMM yyyy H:mm",
+                               F: "d MMMM yyyy H:mm:ss",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "dsb", "default", {
+       name: "dsb",
+       englishName: "Lower Sorbian",
+       nativeName: "dolnoserbšćina",
+       language: "dsb",
+       numberFormat: {
+               ",": ".",
+               ".": ",",
+               NaN: "njedefinowane",
+               negativeInfinity: "-njekońcne",
+               positiveInfinity: "+njekońcne",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "€"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": ". ",
+                       firstDay: 1,
+                       days: {
+                               names: ["njeźela","ponjeźele","wałtora","srjoda","stwortk","pětk","sobota"],
+                               namesAbbr: ["nje","pon","wał","srj","stw","pět","sob"],
+                               namesShort: ["n","p","w","s","s","p","s"]
+                       },
+                       months: {
+                               names: ["januar","februar","měrc","apryl","maj","junij","julij","awgust","september","oktober","nowember","december",""],
+                               namesAbbr: ["jan","feb","měr","apr","maj","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       monthsGenitive: {
+                               names: ["januara","februara","měrca","apryla","maja","junija","julija","awgusta","septembra","oktobra","nowembra","decembra",""],
+                               namesAbbr: ["jan","feb","měr","apr","maj","jun","jul","awg","sep","okt","now","dec",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"po Chr.","start":null,"offset":0}],
+                       patterns: {
+                               d: "d. M. yyyy",
+                               D: "dddd, 'dnja' d. MMMM yyyy",
+                               t: "H.mm 'goź.'",
+                               T: "H:mm:ss",
+                               f: "dddd, 'dnja' d. MMMM yyyy H.mm 'goź.'",
+                               F: "dddd, 'dnja' d. MMMM yyyy H:mm:ss",
+                               M: "d. MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "smj", "default", {
+       name: "smj",
+       englishName: "Sami (Lule)",
+       nativeName: "julevusámegiella",
+       language: "smj",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       ",": ".",
+                       ".": ",",
+                       symbol: "kr"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 1,
+                       days: {
+                               names: ["ájllek","mánnodahka","dijstahka","gasskavahkko","duorastahka","bierjjedahka","lávvodahka"],
+                               namesAbbr: ["ájl","mán","dis","gas","duor","bier","láv"],
+                               namesShort: ["á","m","d","g","d","b","l"]
+                       },
+                       months: {
+                               names: ["ådåjakmánno","guovvamánno","sjnjuktjamánno","vuoratjismánno","moarmesmánno","biehtsemánno","sjnjilltjamánno","bårggemánno","ragátmánno","gålgådismánno","basádismánno","javllamánno",""],
+                               namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
+                       },
+                       monthsGenitive: {
+                               names: ["ådåjakmáno","guovvamáno","sjnjuktjamáno","vuoratjismáno","moarmesmáno","biehtsemáno","sjnjilltjamáno","bårggemáno","ragátmáno","gålgådismáno","basádismáno","javllamáno",""],
+                               namesAbbr: ["ådåj","guov","snju","vuor","moar","bieh","snji","bårg","ragá","gålg","basá","javl",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "yyyy-MM-dd",
+                               D: "MMMM d'. b. 'yyyy",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "MMMM d'. b. 'yyyy HH:mm",
+                               F: "MMMM d'. b. 'yyyy HH:mm:ss",
+                               M: "MMMM d'. b. '",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "uz-Latn", "default", {
+       name: "uz-Latn",
+       englishName: "Uzbek (Latin)",
+       nativeName: "U'zbek",
+       language: "uz-Latn",
+       numberFormat: {
+               ",": " ",
+               ".": ",",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       ",": " ",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       decimals: 0,
+                       ",": " ",
+                       ".": ",",
+                       symbol: "so'm"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["yakshanba","dushanba","seshanba","chorshanba","payshanba","juma","shanba"],
+                               namesAbbr: ["yak.","dsh.","sesh.","chr.","psh.","jm.","sh."],
+                               namesShort: ["ya","d","s","ch","p","j","sh"]
+                       },
+                       months: {
+                               names: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""],
+                               namesAbbr: ["yanvar","fevral","mart","aprel","may","iyun","iyul","avgust","sentyabr","oktyabr","noyabr","dekabr",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd/MM yyyy",
+                               D: "yyyy 'yil' d-MMMM",
+                               t: "HH:mm",
+                               T: "HH:mm:ss",
+                               f: "yyyy 'yil' d-MMMM HH:mm",
+                               F: "yyyy 'yil' d-MMMM HH:mm:ss",
+                               M: "d-MMMM",
+                               Y: "MMMM yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "mn-Mong", "default", {
+       name: "mn-Mong",
+       englishName: "Mongolian (Traditional Mongolian)",
+       nativeName: "ᠮᠤᠨᠭᠭᠤᠯ ᠬᠡᠯᠡ",
+       language: "mn-Mong",
+       numberFormat: {
+               groupSizes: [3,0],
+               NaN: "ᠲᠤᠭᠠᠠ ᠪᠤᠰᠤ",
+               negativeInfinity: "ᠰᠦᠬᠡᠷᠬᠦ ᠬᠢᠵᠠᠭᠠᠷᠭᠦᠢ ᠶᠡᠬᠡ",
+               positiveInfinity: "ᠡᠶ᠋ᠡᠷᠬᠦ ᠬᠢᠵᠠᠭᠠᠷᠭᠦᠢ ᠶᠠᠬᠡ",
+               percent: {
+                       pattern: ["-n%","n%"],
+                       groupSizes: [3,0]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       groupSizes: [3,0],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       firstDay: 1,
+                       days: {
+                               names: ["ᠭᠠᠷᠠᠭ ᠤᠨ ᠡᠳᠦᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠨᠢᠭᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠬᠣᠶᠠᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠭᠤᠷᠪᠠᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠳᠥᠷᠪᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠲᠠᠪᠤᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠵᠢᠷᠭᠤᠭᠠᠨ"],
+                               namesAbbr: ["ᠭᠠᠷᠠᠭ ᠤᠨ ᠡᠳᠦᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠨᠢᠭᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠬᠣᠶᠠᠷ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠭᠤᠷᠪᠠᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠳᠥᠷᠪᠡᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠲᠠᠪᠤᠨ","ᠭᠠᠷᠠᠭ ᠤᠨ ᠵᠢᠷᠭᠤᠭᠠᠨ"],
+                               namesShort: ["ᠡ‍","ᠨᠢ‍","ᠬᠣ‍","ᠭᠤ‍","ᠳᠥ‍","ᠲᠠ‍","ᠵᠢ‍"]
+                       },
+                       months: {
+                               names: ["ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠭᠤᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠦᠷᠪᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠠᠪᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠵᠢᠷᠭᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠤᠯᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠨᠠᠢᠮᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠶᠢᠰᠦᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ",""],
+                               namesAbbr: ["ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠭᠤᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠦᠷᠪᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠠᠪᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠵᠢᠷᠭᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠲᠤᠯᠤᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠨᠠᠢᠮᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠶᠢᠰᠦᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠨᠢᠭᠡᠳᠦᠭᠡᠷ ᠰᠠᠷ᠎ᠠ","ᠠᠷᠪᠠᠨ ᠬᠤᠶ᠋ᠠᠳᠤᠭᠠᠷ ᠰᠠᠷ᠎ᠠ",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       eras: [{"name":"ᠣᠨ ᠲᠣᠭᠠᠯᠠᠯ ᠤᠨ","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'ᠣᠨ ᠤ᠋' M'ᠰᠠᠷ᠎ᠠ  ᠢᠢᠨ 'd' ᠤ᠋ ᠡᠳᠦᠷ'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'ᠣᠨ ᠤ᠋' M'ᠰᠠᠷ᠎ᠠ  ᠢᠢᠨ 'd' ᠤ᠋ ᠡᠳᠦᠷ' H:mm",
+                               F: "yyyy'ᠣᠨ ᠤ᠋' M'ᠰᠠᠷ᠎ᠠ  ᠢᠢᠨ 'd' ᠤ᠋ ᠡᠳᠦᠷ' H:mm:ss",
+                               M: "M'ᠰᠠᠷ᠎ᠠ' d'ᠡᠳᠦᠷ'",
+                               Y: "yyyy'ᠣᠨ' M'ᠰᠠᠷ᠎ᠠ'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "iu-Latn", "default", {
+       name: "iu-Latn",
+       englishName: "Inuktitut (Latin)",
+       nativeName: "Inuktitut",
+       language: "iu-Latn",
+       numberFormat: {
+               groupSizes: [3,0],
+               percent: {
+                       groupSizes: [3,0]
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Naattiinguja","Naggajjau","Aippiq","Pingatsiq","Sitammiq","Tallirmiq","Sivataarvik"],
+                               namesAbbr: ["Nat","Nag","Aip","Pi","Sit","Tal","Siv"],
+                               namesShort: ["N","N","A","P","S","T","S"]
+                       },
+                       months: {
+                               names: ["Jaannuari","Viivvuari","Maatsi","Iipuri","Mai","Juuni","Julai","Aaggiisi","Sitipiri","Utupiri","Nuvipiri","Tisipiri",""],
+                               namesAbbr: ["Jan","Viv","Mas","Ipu","Mai","Jun","Jul","Agi","Sii","Uut","Nuv","Tis",""]
+                       },
+                       patterns: {
+                               d: "d/MM/yyyy",
+                               D: "ddd, MMMM dd,yyyy",
+                               f: "ddd, MMMM dd,yyyy h:mm tt",
+                               F: "ddd, MMMM dd,yyyy h:mm:ss tt"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "tzm-Latn", "default", {
+       name: "tzm-Latn",
+       englishName: "Tamazight (Latin)",
+       nativeName: "Tamazight",
+       language: "tzm-Latn",
+       numberFormat: {
+               pattern: ["n-"],
+               ",": ".",
+               ".": ",",
+               NaN: "Non Numérique",
+               negativeInfinity: "-Infini",
+               positiveInfinity: "+Infini",
+               percent: {
+                       ",": ".",
+                       ".": ","
+               },
+               currency: {
+                       pattern: ["-n $","n $"],
+                       symbol: "DZD"
+               }
+       },
+       calendars: {
+               standard: {
+                       "/": "-",
+                       firstDay: 6,
+                       days: {
+                               names: ["Acer","Arime","Aram","Ahad","Amhadh","Sem","Sedh"],
+                               namesAbbr: ["Ace","Ari","Ara","Aha","Amh","Sem","Sed"],
+                               namesShort: ["Ac","Ar","Ar","Ah","Am","Se","Se"]
+                       },
+                       months: {
+                               names: ["Yenayer","Furar","Maghres","Yebrir","Mayu","Yunyu","Yulyu","Ghuct","Cutenber","Ktuber","Wambir","Dujanbir",""],
+                               namesAbbr: ["Yen","Fur","Mag","Yeb","May","Yun","Yul","Ghu","Cut","Ktu","Wam","Duj",""]
+                       },
+                       AM: null,
+                       PM: null,
+                       patterns: {
+                               d: "dd-MM-yyyy",
+                               D: "dd MMMM, yyyy",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "dd MMMM, yyyy H:mm",
+                               F: "dd MMMM, yyyy H:mm:ss",
+                               M: "dd MMMM"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "ha-Latn", "default", {
+       name: "ha-Latn",
+       englishName: "Hausa (Latin)",
+       nativeName: "Hausa",
+       language: "ha-Latn",
+       numberFormat: {
+               currency: {
+                       pattern: ["$-n","$ n"],
+                       symbol: "N"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["Lahadi","Litinin","Talata","Laraba","Alhamis","Juma'a","Asabar"],
+                               namesAbbr: ["Lah","Lit","Tal","Lar","Alh","Jum","Asa"],
+                               namesShort: ["L","L","T","L","A","J","A"]
+                       },
+                       months: {
+                               names: ["Januwaru","Febreru","Maris","Afrilu","Mayu","Yuni","Yuli","Agusta","Satumba","Oktocba","Nuwamba","Disamba",""],
+                               namesAbbr: ["Jan","Feb","Mar","Afr","May","Yun","Yul","Agu","Sat","Okt","Nuw","Dis",""]
+                       },
+                       AM: ["Safe","safe","SAFE"],
+                       PM: ["Yamma","yamma","YAMMA"],
+                       eras: [{"name":"AD","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "zh-CHS", "default", {
+       name: "zh-CHS",
+       englishName: "Chinese (Simplified) Legacy",
+       nativeName: "中文(简体) 旧版",
+       language: "zh-CHS",
+       numberFormat: {
+               NaN: "非数字",
+               negativeInfinity: "负无穷大",
+               positiveInfinity: "正无穷大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       pattern: ["$-n","$n"],
+                       symbol: "¥"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["周日","周一","周二","周三","周四","周五","周六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "yyyy/M/d",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+
+Globalize.addCultureInfo( "zh-CHT", "default", {
+       name: "zh-CHT",
+       englishName: "Chinese (Traditional) Legacy",
+       nativeName: "中文(繁體) 舊版",
+       language: "zh-CHT",
+       numberFormat: {
+               NaN: "非數字",
+               negativeInfinity: "負無窮大",
+               positiveInfinity: "正無窮大",
+               percent: {
+                       pattern: ["-n%","n%"]
+               },
+               currency: {
+                       symbol: "HK$"
+               }
+       },
+       calendars: {
+               standard: {
+                       days: {
+                               names: ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],
+                               namesAbbr: ["週日","週一","週二","週三","週四","週五","週六"],
+                               namesShort: ["日","一","二","三","四","五","六"]
+                       },
+                       months: {
+                               names: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""],
+                               namesAbbr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月",""]
+                       },
+                       AM: ["上午","上午","上午"],
+                       PM: ["下午","下午","下午"],
+                       eras: [{"name":"公元","start":null,"offset":0}],
+                       patterns: {
+                               d: "d/M/yyyy",
+                               D: "yyyy'年'M'月'd'日'",
+                               t: "H:mm",
+                               T: "H:mm:ss",
+                               f: "yyyy'年'M'月'd'日' H:mm",
+                               F: "yyyy'年'M'月'd'日' H:mm:ss",
+                               M: "M'月'd'日'",
+                               Y: "yyyy'年'M'月'"
+                       }
+               }
+       }
+});
+\r
+}( this ));\r
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/jquery.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/jquery.js
new file mode 100644 (file)
index 0000000..12c7797
--- /dev/null
@@ -0,0 +1,9440 @@
+/*!
+ * jQuery JavaScript Library v1.8.2
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: Thu Sep 20 2012 21:13:05 GMT-0400 (Eastern Daylight Time)
+ */
+(function( window, undefined ) {
+var
+       // A central reference to the root jQuery(document)
+       rootjQuery,
+
+       // The deferred used on DOM ready
+       readyList,
+
+       // Use the correct document accordingly with window argument (sandbox)
+       document = window.document,
+       location = window.location,
+       navigator = window.navigator,
+
+       // Map over jQuery in case of overwrite
+       _jQuery = window.jQuery,
+
+       // Map over the $ in case of overwrite
+       _$ = window.$,
+
+       // Save a reference to some core methods
+       core_push = Array.prototype.push,
+       core_slice = Array.prototype.slice,
+       core_indexOf = Array.prototype.indexOf,
+       core_toString = Object.prototype.toString,
+       core_hasOwn = Object.prototype.hasOwnProperty,
+       core_trim = String.prototype.trim,
+
+       // Define a local copy of jQuery
+       jQuery = function( selector, context ) {
+               // The jQuery object is actually just the init constructor 'enhanced'
+               return new jQuery.fn.init( selector, context, rootjQuery );
+       },
+
+       // Used for matching numbers
+       core_pnum = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,
+
+       // Used for detecting and trimming whitespace
+       core_rnotwhite = /\S/,
+       core_rspace = /\s+/,
+
+       // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+       rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+       // A simple way to check for HTML strings
+       // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+       rquickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+       // Match a standalone tag
+       rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+       // JSON RegExp
+       rvalidchars = /^[\],:{}\s]*$/,
+       rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+       rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+       rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,
+
+       // Matches dashed string for camelizing
+       rmsPrefix = /^-ms-/,
+       rdashAlpha = /-([\da-z])/gi,
+
+       // Used by jQuery.camelCase as callback to replace()
+       fcamelCase = function( all, letter ) {
+               return ( letter + "" ).toUpperCase();
+       },
+
+       // The ready event handler and self cleanup method
+       DOMContentLoaded = function() {
+               if ( document.addEventListener ) {
+                       document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+                       jQuery.ready();
+               } else if ( document.readyState === "complete" ) {
+                       // we're here because readyState === "complete" in oldIE
+                       // which is good enough for us to call the dom ready!
+                       document.detachEvent( "onreadystatechange", DOMContentLoaded );
+                       jQuery.ready();
+               }
+       },
+
+       // [[Class]] -> type pairs
+       class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+       constructor: jQuery,
+       init: function( selector, context, rootjQuery ) {
+               var match, elem, ret, doc;
+
+               // Handle $(""), $(null), $(undefined), $(false)
+               if ( !selector ) {
+                       return this;
+               }
+
+               // Handle $(DOMElement)
+               if ( selector.nodeType ) {
+                       this.context = this[0] = selector;
+                       this.length = 1;
+                       return this;
+               }
+
+               // Handle HTML strings
+               if ( typeof selector === "string" ) {
+                       if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+                               // Assume that strings that start and end with <> are HTML and skip the regex check
+                               match = [ null, selector, null ];
+
+                       } else {
+                               match = rquickExpr.exec( selector );
+                       }
+
+                       // Match html or make sure no context is specified for #id
+                       if ( match && (match[1] || !context) ) {
+
+                               // HANDLE: $(html) -> $(array)
+                               if ( match[1] ) {
+                                       context = context instanceof jQuery ? context[0] : context;
+                                       doc = ( context && context.nodeType ? context.ownerDocument || context : document );
+
+                                       // scripts is true for back-compat
+                                       selector = jQuery.parseHTML( match[1], doc, true );
+                                       if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+                                               this.attr.call( selector, context, true );
+                                       }
+
+                                       return jQuery.merge( this, selector );
+
+                               // HANDLE: $(#id)
+                               } else {
+                                       elem = document.getElementById( match[2] );
+
+                                       // Check parentNode to catch when Blackberry 4.6 returns
+                                       // nodes that are no longer in the document #6963
+                                       if ( elem && elem.parentNode ) {
+                                               // Handle the case where IE and Opera return items
+                                               // by name instead of ID
+                                               if ( elem.id !== match[2] ) {
+                                                       return rootjQuery.find( selector );
+                                               }
+
+                                               // Otherwise, we inject the element directly into the jQuery object
+                                               this.length = 1;
+                                               this[0] = elem;
+                                       }
+
+                                       this.context = document;
+                                       this.selector = selector;
+                                       return this;
+                               }
+
+                       // HANDLE: $(expr, $(...))
+                       } else if ( !context || context.jquery ) {
+                               return ( context || rootjQuery ).find( selector );
+
+                       // HANDLE: $(expr, context)
+                       // (which is just equivalent to: $(context).find(expr)
+                       } else {
+                               return this.constructor( context ).find( selector );
+                       }
+
+               // HANDLE: $(function)
+               // Shortcut for document ready
+               } else if ( jQuery.isFunction( selector ) ) {
+                       return rootjQuery.ready( selector );
+               }
+
+               if ( selector.selector !== undefined ) {
+                       this.selector = selector.selector;
+                       this.context = selector.context;
+               }
+
+               return jQuery.makeArray( selector, this );
+       },
+
+       // Start with an empty selector
+       selector: "",
+
+       // The current version of jQuery being used
+       jquery: "1.8.2",
+
+       // The default length of a jQuery object is 0
+       length: 0,
+
+       // The number of elements contained in the matched element set
+       size: function() {
+               return this.length;
+       },
+
+       toArray: function() {
+               return core_slice.call( this );
+       },
+
+       // Get the Nth element in the matched element set OR
+       // Get the whole matched element set as a clean array
+       get: function( num ) {
+               return num == null ?
+
+                       // Return a 'clean' array
+                       this.toArray() :
+
+                       // Return just the object
+                       ( num < 0 ? this[ this.length + num ] : this[ num ] );
+       },
+
+       // Take an array of elements and push it onto the stack
+       // (returning the new matched element set)
+       pushStack: function( elems, name, selector ) {
+
+               // Build a new jQuery matched element set
+               var ret = jQuery.merge( this.constructor(), elems );
+
+               // Add the old object onto the stack (as a reference)
+               ret.prevObject = this;
+
+               ret.context = this.context;
+
+               if ( name === "find" ) {
+                       ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+               } else if ( name ) {
+                       ret.selector = this.selector + "." + name + "(" + selector + ")";
+               }
+
+               // Return the newly-formed element set
+               return ret;
+       },
+
+       // Execute a callback for every element in the matched set.
+       // (You can seed the arguments with an array of args, but this is
+       // only used internally.)
+       each: function( callback, args ) {
+               return jQuery.each( this, callback, args );
+       },
+
+       ready: function( fn ) {
+               // Add the callback
+               jQuery.ready.promise().done( fn );
+
+               return this;
+       },
+
+       eq: function( i ) {
+               i = +i;
+               return i === -1 ?
+                       this.slice( i ) :
+                       this.slice( i, i + 1 );
+       },
+
+       first: function() {
+               return this.eq( 0 );
+       },
+
+       last: function() {
+               return this.eq( -1 );
+       },
+
+       slice: function() {
+               return this.pushStack( core_slice.apply( this, arguments ),
+                       "slice", core_slice.call(arguments).join(",") );
+       },
+
+       map: function( callback ) {
+               return this.pushStack( jQuery.map(this, function( elem, i ) {
+                       return callback.call( elem, i, elem );
+               }));
+       },
+
+       end: function() {
+               return this.prevObject || this.constructor(null);
+       },
+
+       // For internal use only.
+       // Behaves like an Array's method, not like a jQuery method.
+       push: core_push,
+       sort: [].sort,
+       splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+       var options, name, src, copy, copyIsArray, clone,
+               target = arguments[0] || {},
+               i = 1,
+               length = arguments.length,
+               deep = false;
+
+       // Handle a deep copy situation
+       if ( typeof target === "boolean" ) {
+               deep = target;
+               target = arguments[1] || {};
+               // skip the boolean and the target
+               i = 2;
+       }
+
+       // Handle case when target is a string or something (possible in deep copy)
+       if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+               target = {};
+       }
+
+       // extend jQuery itself if only one argument is passed
+       if ( length === i ) {
+               target = this;
+               --i;
+       }
+
+       for ( ; i < length; i++ ) {
+               // Only deal with non-null/undefined values
+               if ( (options = arguments[ i ]) != null ) {
+                       // Extend the base object
+                       for ( name in options ) {
+                               src = target[ name ];
+                               copy = options[ name ];
+
+                               // Prevent never-ending loop
+                               if ( target === copy ) {
+                                       continue;
+                               }
+
+                               // Recurse if we're merging plain objects or arrays
+                               if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+                                       if ( copyIsArray ) {
+                                               copyIsArray = false;
+                                               clone = src && jQuery.isArray(src) ? src : [];
+
+                                       } else {
+                                               clone = src && jQuery.isPlainObject(src) ? src : {};
+                                       }
+
+                                       // Never move original objects, clone them
+                                       target[ name ] = jQuery.extend( deep, clone, copy );
+
+                               // Don't bring in undefined values
+                               } else if ( copy !== undefined ) {
+                                       target[ name ] = copy;
+                               }
+                       }
+               }
+       }
+
+       // Return the modified object
+       return target;
+};
+
+jQuery.extend({
+       noConflict: function( deep ) {
+               if ( window.$ === jQuery ) {
+                       window.$ = _$;
+               }
+
+               if ( deep && window.jQuery === jQuery ) {
+                       window.jQuery = _jQuery;
+               }
+
+               return jQuery;
+       },
+
+       // Is the DOM ready to be used? Set to true once it occurs.
+       isReady: false,
+
+       // A counter to track how many items to wait for before
+       // the ready event fires. See #6781
+       readyWait: 1,
+
+       // Hold (or release) the ready event
+       holdReady: function( hold ) {
+               if ( hold ) {
+                       jQuery.readyWait++;
+               } else {
+                       jQuery.ready( true );
+               }
+       },
+
+       // Handle when the DOM is ready
+       ready: function( wait ) {
+
+               // Abort if there are pending holds or we're already ready
+               if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+                       return;
+               }
+
+               // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+               if ( !document.body ) {
+                       return setTimeout( jQuery.ready, 1 );
+               }
+
+               // Remember that the DOM is ready
+               jQuery.isReady = true;
+
+               // If a normal DOM Ready event fired, decrement, and wait if need be
+               if ( wait !== true && --jQuery.readyWait > 0 ) {
+                       return;
+               }
+
+               // If there are functions bound, to execute
+               readyList.resolveWith( document, [ jQuery ] );
+
+               // Trigger any bound ready events
+               if ( jQuery.fn.trigger ) {
+                       jQuery( document ).trigger("ready").off("ready");
+               }
+       },
+
+       // See test/unit/core.js for details concerning isFunction.
+       // Since version 1.3, DOM methods and functions like alert
+       // aren't supported. They return false on IE (#2968).
+       isFunction: function( obj ) {
+               return jQuery.type(obj) === "function";
+       },
+
+       isArray: Array.isArray || function( obj ) {
+               return jQuery.type(obj) === "array";
+       },
+
+       isWindow: function( obj ) {
+               return obj != null && obj == obj.window;
+       },
+
+       isNumeric: function( obj ) {
+               return !isNaN( parseFloat(obj) ) && isFinite( obj );
+       },
+
+       type: function( obj ) {
+               return obj == null ?
+                       String( obj ) :
+                       class2type[ core_toString.call(obj) ] || "object";
+       },
+
+       isPlainObject: function( obj ) {
+               // Must be an Object.
+               // Because of IE, we also have to check the presence of the constructor property.
+               // Make sure that DOM nodes and window objects don't pass through, as well
+               if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+                       return false;
+               }
+
+               try {
+                       // Not own constructor property must be Object
+                       if ( obj.constructor &&
+                               !core_hasOwn.call(obj, "constructor") &&
+                               !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+                               return false;
+                       }
+               } catch ( e ) {
+                       // IE8,9 Will throw exceptions on certain host objects #9897
+                       return false;
+               }
+
+               // Own properties are enumerated firstly, so to speed up,
+               // if last one is own, then all properties are own.
+
+               var key;
+               for ( key in obj ) {}
+
+               return key === undefined || core_hasOwn.call( obj, key );
+       },
+
+       isEmptyObject: function( obj ) {
+               var name;
+               for ( name in obj ) {
+                       return false;
+               }
+               return true;
+       },
+
+       error: function( msg ) {
+               throw new Error( msg );
+       },
+
+       // data: string of html
+       // context (optional): If specified, the fragment will be created in this context, defaults to document
+       // scripts (optional): If true, will include scripts passed in the html string
+       parseHTML: function( data, context, scripts ) {
+               var parsed;
+               if ( !data || typeof data !== "string" ) {
+                       return null;
+               }
+               if ( typeof context === "boolean" ) {
+                       scripts = context;
+                       context = 0;
+               }
+               context = context || document;
+
+               // Single tag
+               if ( (parsed = rsingleTag.exec( data )) ) {
+                       return [ context.createElement( parsed[1] ) ];
+               }
+
+               parsed = jQuery.buildFragment( [ data ], context, scripts ? null : [] );
+               return jQuery.merge( [],
+                       (parsed.cacheable ? jQuery.clone( parsed.fragment ) : parsed.fragment).childNodes );
+       },
+
+       parseJSON: function( data ) {
+               if ( !data || typeof data !== "string") {
+                       return null;
+               }
+
+               // Make sure leading/trailing whitespace is removed (IE can't handle it)
+               data = jQuery.trim( data );
+
+               // Attempt to parse using the native JSON parser first
+               if ( window.JSON && window.JSON.parse ) {
+                       return window.JSON.parse( data );
+               }
+
+               // Make sure the incoming data is actual JSON
+               // Logic borrowed from http://json.org/json2.js
+               if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+                       .replace( rvalidtokens, "]" )
+                       .replace( rvalidbraces, "")) ) {
+
+                       return ( new Function( "return " + data ) )();
+
+               }
+               jQuery.error( "Invalid JSON: " + data );
+       },
+
+       // Cross-browser xml parsing
+       parseXML: function( data ) {
+               var xml, tmp;
+               if ( !data || typeof data !== "string" ) {
+                       return null;
+               }
+               try {
+                       if ( window.DOMParser ) { // Standard
+                               tmp = new DOMParser();
+                               xml = tmp.parseFromString( data , "text/xml" );
+                       } else { // IE
+                               xml = new ActiveXObject( "Microsoft.XMLDOM" );
+                               xml.async = "false";
+                               xml.loadXML( data );
+                       }
+               } catch( e ) {
+                       xml = undefined;
+               }
+               if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+                       jQuery.error( "Invalid XML: " + data );
+               }
+               return xml;
+       },
+
+       noop: function() {},
+
+       // Evaluates a script in a global context
+       // Workarounds based on findings by Jim Driscoll
+       // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+       globalEval: function( data ) {
+               if ( data && core_rnotwhite.test( data ) ) {
+                       // We use execScript on Internet Explorer
+                       // We use an anonymous function so that context is window
+                       // rather than jQuery in Firefox
+                       ( window.execScript || function( data ) {
+                               window[ "eval" ].call( window, data );
+                       } )( data );
+               }
+       },
+
+       // Convert dashed to camelCase; used by the css and data modules
+       // Microsoft forgot to hump their vendor prefix (#9572)
+       camelCase: function( string ) {
+               return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+       },
+
+       nodeName: function( elem, name ) {
+               return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+       },
+
+       // args is for internal usage only
+       each: function( obj, callback, args ) {
+               var name,
+                       i = 0,
+                       length = obj.length,
+                       isObj = length === undefined || jQuery.isFunction( obj );
+
+               if ( args ) {
+                       if ( isObj ) {
+                               for ( name in obj ) {
+                                       if ( callback.apply( obj[ name ], args ) === false ) {
+                                               break;
+                                       }
+                               }
+                       } else {
+                               for ( ; i < length; ) {
+                                       if ( callback.apply( obj[ i++ ], args ) === false ) {
+                                               break;
+                                       }
+                               }
+                       }
+
+               // A special, fast, case for the most common use of each
+               } else {
+                       if ( isObj ) {
+                               for ( name in obj ) {
+                                       if ( callback.call( obj[ name ], name, obj[ name ] ) === false ) {
+                                               break;
+                                       }
+                               }
+                       } else {
+                               for ( ; i < length; ) {
+                                       if ( callback.call( obj[ i ], i, obj[ i++ ] ) === false ) {
+                                               break;
+                                       }
+                               }
+                       }
+               }
+
+               return obj;
+       },
+
+       // Use native String.trim function wherever possible
+       trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+               function( text ) {
+                       return text == null ?
+                               "" :
+                               core_trim.call( text );
+               } :
+
+               // Otherwise use our own trimming functionality
+               function( text ) {
+                       return text == null ?
+                               "" :
+                               ( text + "" ).replace( rtrim, "" );
+               },
+
+       // results is for internal usage only
+       makeArray: function( arr, results ) {
+               var type,
+                       ret = results || [];
+
+               if ( arr != null ) {
+                       // The window, strings (and functions) also have 'length'
+                       // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+                       type = jQuery.type( arr );
+
+                       if ( arr.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( arr ) ) {
+                               core_push.call( ret, arr );
+                       } else {
+                               jQuery.merge( ret, arr );
+                       }
+               }
+
+               return ret;
+       },
+
+       inArray: function( elem, arr, i ) {
+               var len;
+
+               if ( arr ) {
+                       if ( core_indexOf ) {
+                               return core_indexOf.call( arr, elem, i );
+                       }
+
+                       len = arr.length;
+                       i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+                       for ( ; i < len; i++ ) {
+                               // Skip accessing in sparse arrays
+                               if ( i in arr && arr[ i ] === elem ) {
+                                       return i;
+                               }
+                       }
+               }
+
+               return -1;
+       },
+
+       merge: function( first, second ) {
+               var l = second.length,
+                       i = first.length,
+                       j = 0;
+
+               if ( typeof l === "number" ) {
+                       for ( ; j < l; j++ ) {
+                               first[ i++ ] = second[ j ];
+                       }
+
+               } else {
+                       while ( second[j] !== undefined ) {
+                               first[ i++ ] = second[ j++ ];
+                       }
+               }
+
+               first.length = i;
+
+               return first;
+       },
+
+       grep: function( elems, callback, inv ) {
+               var retVal,
+                       ret = [],
+                       i = 0,
+                       length = elems.length;
+               inv = !!inv;
+
+               // Go through the array, only saving the items
+               // that pass the validator function
+               for ( ; i < length; i++ ) {
+                       retVal = !!callback( elems[ i ], i );
+                       if ( inv !== retVal ) {
+                               ret.push( elems[ i ] );
+                       }
+               }
+
+               return ret;
+       },
+
+       // arg is for internal usage only
+       map: function( elems, callback, arg ) {
+               var value, key,
+                       ret = [],
+                       i = 0,
+                       length = elems.length,
+                       // jquery objects are treated as arrays
+                       isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+               // Go through the array, translating each of the items to their
+               if ( isArray ) {
+                       for ( ; i < length; i++ ) {
+                               value = callback( elems[ i ], i, arg );
+
+                               if ( value != null ) {
+                                       ret[ ret.length ] = value;
+                               }
+                       }
+
+               // Go through every key on the object,
+               } else {
+                       for ( key in elems ) {
+                               value = callback( elems[ key ], key, arg );
+
+                               if ( value != null ) {
+                                       ret[ ret.length ] = value;
+                               }
+                       }
+               }
+
+               // Flatten any nested arrays
+               return ret.concat.apply( [], ret );
+       },
+
+       // A global GUID counter for objects
+       guid: 1,
+
+       // Bind a function to a context, optionally partially applying any
+       // arguments.
+       proxy: function( fn, context ) {
+               var tmp, args, proxy;
+
+               if ( typeof context === "string" ) {
+                       tmp = fn[ context ];
+                       context = fn;
+                       fn = tmp;
+               }
+
+               // Quick check to determine if target is callable, in the spec
+               // this throws a TypeError, but we will just return undefined.
+               if ( !jQuery.isFunction( fn ) ) {
+                       return undefined;
+               }
+
+               // Simulated bind
+               args = core_slice.call( arguments, 2 );
+               proxy = function() {
+                       return fn.apply( context, args.concat( core_slice.call( arguments ) ) );
+               };
+
+               // Set the guid of unique handler to the same of original handler, so it can be removed
+               proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+               return proxy;
+       },
+
+       // Multifunctional method to get and set values of a collection
+       // The value/s can optionally be executed if it's a function
+       access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
+               var exec,
+                       bulk = key == null,
+                       i = 0,
+                       length = elems.length;
+
+               // Sets many values
+               if ( key && typeof key === "object" ) {
+                       for ( i in key ) {
+                               jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
+                       }
+                       chainable = 1;
+
+               // Sets one value
+               } else if ( value !== undefined ) {
+                       // Optionally, function values get executed if exec is true
+                       exec = pass === undefined && jQuery.isFunction( value );
+
+                       if ( bulk ) {
+                               // Bulk operations only iterate when executing function values
+                               if ( exec ) {
+                                       exec = fn;
+                                       fn = function( elem, key, value ) {
+                                               return exec.call( jQuery( elem ), value );
+                                       };
+
+                               // Otherwise they run against the entire set
+                               } else {
+                                       fn.call( elems, value );
+                                       fn = null;
+                               }
+                       }
+
+                       if ( fn ) {
+                               for (; i < length; i++ ) {
+                                       fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+                               }
+                       }
+
+                       chainable = 1;
+               }
+
+               return chainable ?
+                       elems :
+
+                       // Gets
+                       bulk ?
+                               fn.call( elems ) :
+                               length ? fn( elems[0], key ) : emptyGet;
+       },
+
+       now: function() {
+               return ( new Date() ).getTime();
+       }
+});
+
+jQuery.ready.promise = function( obj ) {
+       if ( !readyList ) {
+
+               readyList = jQuery.Deferred();
+
+               // Catch cases where $(document).ready() is called after the browser event has already occurred.
+               // we once tried to use readyState "interactive" here, but it caused issues like the one
+               // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+               if ( document.readyState === "complete" ) {
+                       // Handle it asynchronously to allow scripts the opportunity to delay ready
+                       setTimeout( jQuery.ready, 1 );
+
+               // Standards-based browsers support DOMContentLoaded
+               } else if ( document.addEventListener ) {
+                       // Use the handy event callback
+                       document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+                       // A fallback to window.onload, that will always work
+                       window.addEventListener( "load", jQuery.ready, false );
+
+               // If IE event model is used
+               } else {
+                       // Ensure firing before onload, maybe late but safe also for iframes
+                       document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+                       // A fallback to window.onload, that will always work
+                       window.attachEvent( "onload", jQuery.ready );
+
+                       // If IE and not a frame
+                       // continually check to see if the document is ready
+                       var top = false;
+
+                       try {
+                               top = window.frameElement == null && document.documentElement;
+                       } catch(e) {}
+
+                       if ( top && top.doScroll ) {
+                               (function doScrollCheck() {
+                                       if ( !jQuery.isReady ) {
+
+                                               try {
+                                                       // Use the trick by Diego Perini
+                                                       // http://javascript.nwbox.com/IEContentLoaded/
+                                                       top.doScroll("left");
+                                               } catch(e) {
+                                                       return setTimeout( doScrollCheck, 50 );
+                                               }
+
+                                               // and execute any waiting functions
+                                               jQuery.ready();
+                                       }
+                               })();
+                       }
+               }
+       }
+       return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+       class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+       var object = optionsCache[ options ] = {};
+       jQuery.each( options.split( core_rspace ), function( _, flag ) {
+               object[ flag ] = true;
+       });
+       return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *     options: an optional list of space-separated options that will change how
+ *                     the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ *     once:                   will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *     memory:                 will keep track of previous values and will call any callback added
+ *                                     after the list has been fired right away with the latest "memorized"
+ *                                     values (like a Deferred)
+ *
+ *     unique:                 will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *     stopOnFalse:    interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+       // Convert options from String-formatted to Object-formatted if needed
+       // (we check in cache first)
+       options = typeof options === "string" ?
+               ( optionsCache[ options ] || createOptions( options ) ) :
+               jQuery.extend( {}, options );
+
+       var // Last fire value (for non-forgettable lists)
+               memory,
+               // Flag to know if list was already fired
+               fired,
+               // Flag to know if list is currently firing
+               firing,
+               // First callback to fire (used internally by add and fireWith)
+               firingStart,
+               // End of the loop when firing
+               firingLength,
+               // Index of currently firing callback (modified by remove if needed)
+               firingIndex,
+               // Actual callback list
+               list = [],
+               // Stack of fire calls for repeatable lists
+               stack = !options.once && [],
+               // Fire callbacks
+               fire = function( data ) {
+                       memory = options.memory && data;
+                       fired = true;
+                       firingIndex = firingStart || 0;
+                       firingStart = 0;
+                       firingLength = list.length;
+                       firing = true;
+                       for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+                               if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+                                       memory = false; // To prevent further calls using add
+                                       break;
+                               }
+                       }
+                       firing = false;
+                       if ( list ) {
+                               if ( stack ) {
+                                       if ( stack.length ) {
+                                               fire( stack.shift() );
+                                       }
+                               } else if ( memory ) {
+                                       list = [];
+                               } else {
+                                       self.disable();
+                               }
+                       }
+               },
+               // Actual Callbacks object
+               self = {
+                       // Add a callback or a collection of callbacks to the list
+                       add: function() {
+                               if ( list ) {
+                                       // First, we save the current length
+                                       var start = list.length;
+                                       (function add( args ) {
+                                               jQuery.each( args, function( _, arg ) {
+                                                       var type = jQuery.type( arg );
+                                                       if ( type === "function" && ( !options.unique || !self.has( arg ) ) ) {
+                                                               list.push( arg );
+                                                       } else if ( arg && arg.length && type !== "string" ) {
+                                                               // Inspect recursively
+                                                               add( arg );
+                                                       }
+                                               });
+                                       })( arguments );
+                                       // Do we need to add the callbacks to the
+                                       // current firing batch?
+                                       if ( firing ) {
+                                               firingLength = list.length;
+                                       // With memory, if we're not firing then
+                                       // we should call right away
+                                       } else if ( memory ) {
+                                               firingStart = start;
+                                               fire( memory );
+                                       }
+                               }
+                               return this;
+                       },
+                       // Remove a callback from the list
+                       remove: function() {
+                               if ( list ) {
+                                       jQuery.each( arguments, function( _, arg ) {
+                                               var index;
+                                               while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+                                                       list.splice( index, 1 );
+                                                       // Handle firing indexes
+                                                       if ( firing ) {
+                                                               if ( index <= firingLength ) {
+                                                                       firingLength--;
+                                                               }
+                                                               if ( index <= firingIndex ) {
+                                                                       firingIndex--;
+                                                               }
+                                                       }
+                                               }
+                                       });
+                               }
+                               return this;
+                       },
+                       // Control if a given callback is in the list
+                       has: function( fn ) {
+                               return jQuery.inArray( fn, list ) > -1;
+                       },
+                       // Remove all callbacks from the list
+                       empty: function() {
+                               list = [];
+                               return this;
+                       },
+                       // Have the list do nothing anymore
+                       disable: function() {
+                               list = stack = memory = undefined;
+                               return this;
+                       },
+                       // Is it disabled?
+                       disabled: function() {
+                               return !list;
+                       },
+                       // Lock the list in its current state
+                       lock: function() {
+                               stack = undefined;
+                               if ( !memory ) {
+                                       self.disable();
+                               }
+                               return this;
+                       },
+                       // Is it locked?
+                       locked: function() {
+                               return !stack;
+                       },
+                       // Call all callbacks with the given context and arguments
+                       fireWith: function( context, args ) {
+                               args = args || [];
+                               args = [ context, args.slice ? args.slice() : args ];
+                               if ( list && ( !fired || stack ) ) {
+                                       if ( firing ) {
+                                               stack.push( args );
+                                       } else {
+                                               fire( args );
+                                       }
+                               }
+                               return this;
+                       },
+                       // Call all the callbacks with the given arguments
+                       fire: function() {
+                               self.fireWith( this, arguments );
+                               return this;
+                       },
+                       // To know if the callbacks have already been called at least once
+                       fired: function() {
+                               return !!fired;
+                       }
+               };
+
+       return self;
+};
+jQuery.extend({
+
+       Deferred: function( func ) {
+               var tuples = [
+                               // action, add listener, listener list, final state
+                               [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+                               [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+                               [ "notify", "progress", jQuery.Callbacks("memory") ]
+                       ],
+                       state = "pending",
+                       promise = {
+                               state: function() {
+                                       return state;
+                               },
+                               always: function() {
+                                       deferred.done( arguments ).fail( arguments );
+                                       return this;
+                               },
+                               then: function( /* fnDone, fnFail, fnProgress */ ) {
+                                       var fns = arguments;
+                                       return jQuery.Deferred(function( newDefer ) {
+                                               jQuery.each( tuples, function( i, tuple ) {
+                                                       var action = tuple[ 0 ],
+                                                               fn = fns[ i ];
+                                                       // deferred[ done | fail | progress ] for forwarding actions to newDefer
+                                                       deferred[ tuple[1] ]( jQuery.isFunction( fn ) ?
+                                                               function() {
+                                                                       var returned = fn.apply( this, arguments );
+                                                                       if ( returned && jQuery.isFunction( returned.promise ) ) {
+                                                                               returned.promise()
+                                                                                       .done( newDefer.resolve )
+                                                                                       .fail( newDefer.reject )
+                                                                                       .progress( newDefer.notify );
+                                                                       } else {
+                                                                               newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
+                                                                       }
+                                                               } :
+                                                               newDefer[ action ]
+                                                       );
+                                               });
+                                               fns = null;
+                                       }).promise();
+                               },
+                               // Get a promise for this deferred
+                               // If obj is provided, the promise aspect is added to the object
+                               promise: function( obj ) {
+                                       return obj != null ? jQuery.extend( obj, promise ) : promise;
+                               }
+                       },
+                       deferred = {};
+
+               // Keep pipe for back-compat
+               promise.pipe = promise.then;
+
+               // Add list-specific methods
+               jQuery.each( tuples, function( i, tuple ) {
+                       var list = tuple[ 2 ],
+                               stateString = tuple[ 3 ];
+
+                       // promise[ done | fail | progress ] = list.add
+                       promise[ tuple[1] ] = list.add;
+
+                       // Handle state
+                       if ( stateString ) {
+                               list.add(function() {
+                                       // state = [ resolved | rejected ]
+                                       state = stateString;
+
+                               // [ reject_list | resolve_list ].disable; progress_list.lock
+                               }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+                       }
+
+                       // deferred[ resolve | reject | notify ] = list.fire
+                       deferred[ tuple[0] ] = list.fire;
+                       deferred[ tuple[0] + "With" ] = list.fireWith;
+               });
+
+               // Make the deferred a promise
+               promise.promise( deferred );
+
+               // Call given func if any
+               if ( func ) {
+                       func.call( deferred, deferred );
+               }
+
+               // All done!
+               return deferred;
+       },
+
+       // Deferred helper
+       when: function( subordinate /* , ..., subordinateN */ ) {
+               var i = 0,
+                       resolveValues = core_slice.call( arguments ),
+                       length = resolveValues.length,
+
+                       // the count of uncompleted subordinates
+                       remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+                       // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+                       deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+                       // Update function for both resolve and progress values
+                       updateFunc = function( i, contexts, values ) {
+                               return function( value ) {
+                                       contexts[ i ] = this;
+                                       values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
+                                       if( values === progressValues ) {
+                                               deferred.notifyWith( contexts, values );
+                                       } else if ( !( --remaining ) ) {
+                                               deferred.resolveWith( contexts, values );
+                                       }
+                               };
+                       },
+
+                       progressValues, progressContexts, resolveContexts;
+
+               // add listeners to Deferred subordinates; treat others as resolved
+               if ( length > 1 ) {
+                       progressValues = new Array( length );
+                       progressContexts = new Array( length );
+                       resolveContexts = new Array( length );
+                       for ( ; i < length; i++ ) {
+                               if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+                                       resolveValues[ i ].promise()
+                                               .done( updateFunc( i, resolveContexts, resolveValues ) )
+                                               .fail( deferred.reject )
+                                               .progress( updateFunc( i, progressContexts, progressValues ) );
+                               } else {
+                                       --remaining;
+                               }
+                       }
+               }
+
+               // if we're not waiting on anything, resolve the master
+               if ( !remaining ) {
+                       deferred.resolveWith( resolveContexts, resolveValues );
+               }
+
+               return deferred.promise();
+       }
+});
+jQuery.support = (function() {
+
+       var support,
+               all,
+               a,
+               select,
+               opt,
+               input,
+               fragment,
+               eventName,
+               i,
+               isSupported,
+               clickFn,
+               div = document.createElement("div");
+
+       // Preliminary tests
+       div.setAttribute( "className", "t" );
+       div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+
+       all = div.getElementsByTagName("*");
+       a = div.getElementsByTagName("a")[ 0 ];
+       a.style.cssText = "top:1px;float:left;opacity:.5";
+
+       // Can't get basic test support
+       if ( !all || !all.length ) {
+               return {};
+       }
+
+       // First batch of supports tests
+       select = document.createElement("select");
+       opt = select.appendChild( document.createElement("option") );
+       input = div.getElementsByTagName("input")[ 0 ];
+
+       support = {
+               // IE strips leading whitespace when .innerHTML is used
+               leadingWhitespace: ( div.firstChild.nodeType === 3 ),
+
+               // Make sure that tbody elements aren't automatically inserted
+               // IE will insert them into empty tables
+               tbody: !div.getElementsByTagName("tbody").length,
+
+               // Make sure that link elements get serialized correctly by innerHTML
+               // This requires a wrapper element in IE
+               htmlSerialize: !!div.getElementsByTagName("link").length,
+
+               // Get the style information from getAttribute
+               // (IE uses .cssText instead)
+               style: /top/.test( a.getAttribute("style") ),
+
+               // Make sure that URLs aren't manipulated
+               // (IE normalizes it by default)
+               hrefNormalized: ( a.getAttribute("href") === "/a" ),
+
+               // Make sure that element opacity exists
+               // (IE uses filter instead)
+               // Use a regex to work around a WebKit issue. See #5145
+               opacity: /^0.5/.test( a.style.opacity ),
+
+               // Verify style float existence
+               // (IE uses styleFloat instead of cssFloat)
+               cssFloat: !!a.style.cssFloat,
+
+               // Make sure that if no value is specified for a checkbox
+               // that it defaults to "on".
+               // (WebKit defaults to "" instead)
+               checkOn: ( input.value === "on" ),
+
+               // Make sure that a selected-by-default option has a working selected property.
+               // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+               optSelected: opt.selected,
+
+               // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+               getSetAttribute: div.className !== "t",
+
+               // Tests for enctype support on a form(#6743)
+               enctype: !!document.createElement("form").enctype,
+
+               // Makes sure cloning an html5 element does not cause problems
+               // Where outerHTML is undefined, this still works
+               html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
+
+               // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
+               boxModel: ( document.compatMode === "CSS1Compat" ),
+
+               // Will be defined later
+               submitBubbles: true,
+               changeBubbles: true,
+               focusinBubbles: false,
+               deleteExpando: true,
+               noCloneEvent: true,
+               inlineBlockNeedsLayout: false,
+               shrinkWrapBlocks: false,
+               reliableMarginRight: true,
+               boxSizingReliable: true,
+               pixelPosition: false
+       };
+
+       // Make sure checked status is properly cloned
+       input.checked = true;
+       support.noCloneChecked = input.cloneNode( true ).checked;
+
+       // Make sure that the options inside disabled selects aren't marked as disabled
+       // (WebKit marks them as disabled)
+       select.disabled = true;
+       support.optDisabled = !opt.disabled;
+
+       // Test to see if it's possible to delete an expando from an element
+       // Fails in Internet Explorer
+       try {
+               delete div.test;
+       } catch( e ) {
+               support.deleteExpando = false;
+       }
+
+       if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+               div.attachEvent( "onclick", clickFn = function() {
+                       // Cloning a node shouldn't copy over any
+                       // bound event handlers (IE does this)
+                       support.noCloneEvent = false;
+               });
+               div.cloneNode( true ).fireEvent("onclick");
+               div.detachEvent( "onclick", clickFn );
+       }
+
+       // Check if a radio maintains its value
+       // after being appended to the DOM
+       input = document.createElement("input");
+       input.value = "t";
+       input.setAttribute( "type", "radio" );
+       support.radioValue = input.value === "t";
+
+       input.setAttribute( "checked", "checked" );
+
+       // #11217 - WebKit loses check when the name is after the checked attribute
+       input.setAttribute( "name", "t" );
+
+       div.appendChild( input );
+       fragment = document.createDocumentFragment();
+       fragment.appendChild( div.lastChild );
+
+       // WebKit doesn't clone checked state correctly in fragments
+       support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+       // Check if a disconnected checkbox will retain its checked
+       // value of true after appended to the DOM (IE6/7)
+       support.appendChecked = input.checked;
+
+       fragment.removeChild( input );
+       fragment.appendChild( div );
+
+       // Technique from Juriy Zaytsev
+       // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+       // We only care about the case where non-standard event systems
+       // are used, namely in IE. Short-circuiting here helps us to
+       // avoid an eval call (in setAttribute) which can cause CSP
+       // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+       if ( div.attachEvent ) {
+               for ( i in {
+                       submit: true,
+                       change: true,
+                       focusin: true
+               }) {
+                       eventName = "on" + i;
+                       isSupported = ( eventName in div );
+                       if ( !isSupported ) {
+                               div.setAttribute( eventName, "return;" );
+                               isSupported = ( typeof div[ eventName ] === "function" );
+                       }
+                       support[ i + "Bubbles" ] = isSupported;
+               }
+       }
+
+       // Run tests that need a body at doc ready
+       jQuery(function() {
+               var container, div, tds, marginDiv,
+                       divReset = "padding:0;margin:0;border:0;display:block;overflow:hidden;",
+                       body = document.getElementsByTagName("body")[0];
+
+               if ( !body ) {
+                       // Return for frameset docs that don't have a body
+                       return;
+               }
+
+               container = document.createElement("div");
+               container.style.cssText = "visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px";
+               body.insertBefore( container, body.firstChild );
+
+               // Construct the test element
+               div = document.createElement("div");
+               container.appendChild( div );
+
+               // Check if table cells still have offsetWidth/Height when they are set
+               // to display:none and there are still other visible table cells in a
+               // table row; if so, offsetWidth/Height are not reliable for use when
+               // determining if an element has been hidden directly using
+               // display:none (it is still safe to use offsets if a parent element is
+               // hidden; don safety goggles and see bug #4512 for more information).
+               // (only IE 8 fails this test)
+               div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
+               tds = div.getElementsByTagName("td");
+               tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
+               isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+               tds[ 0 ].style.display = "";
+               tds[ 1 ].style.display = "none";
+
+               // Check if empty table cells still have offsetWidth/Height
+               // (IE <= 8 fail this test)
+               support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+               // Check box-sizing and margin behavior
+               div.innerHTML = "";
+               div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
+               support.boxSizing = ( div.offsetWidth === 4 );
+               support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
+
+               // NOTE: To any future maintainer, we've window.getComputedStyle
+               // because jsdom on node.js will break without it.
+               if ( window.getComputedStyle ) {
+                       support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
+                       support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+
+                       // Check if div with explicit width and no margin-right incorrectly
+                       // gets computed margin-right based on width of container. For more
+                       // info see bug #3333
+                       // Fails in WebKit before Feb 2011 nightlies
+                       // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+                       marginDiv = document.createElement("div");
+                       marginDiv.style.cssText = div.style.cssText = divReset;
+                       marginDiv.style.marginRight = marginDiv.style.width = "0";
+                       div.style.width = "1px";
+                       div.appendChild( marginDiv );
+                       support.reliableMarginRight =
+                               !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
+               }
+
+               if ( typeof div.style.zoom !== "undefined" ) {
+                       // Check if natively block-level elements act like inline-block
+                       // elements when setting their display to 'inline' and giving
+                       // them layout
+                       // (IE < 8 does this)
+                       div.innerHTML = "";
+                       div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
+                       support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+                       // Check if elements with layout shrink-wrap their children
+                       // (IE 6 does this)
+                       div.style.display = "block";
+                       div.style.overflow = "visible";
+                       div.innerHTML = "<div></div>";
+                       div.firstChild.style.width = "5px";
+                       support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+
+                       container.style.zoom = 1;
+               }
+
+               // Null elements to avoid leaks in IE
+               body.removeChild( container );
+               container = div = tds = marginDiv = null;
+       });
+
+       // Null elements to avoid leaks in IE
+       fragment.removeChild( div );
+       all = a = select = opt = input = fragment = div = null;
+
+       return support;
+})();
+var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+       rmultiDash = /([A-Z])/g;
+
+jQuery.extend({
+       cache: {},
+
+       deletedIds: [],
+
+       // Remove at next major release (1.9/2.0)
+       uuid: 0,
+
+       // Unique for each copy of jQuery on the page
+       // Non-digits removed to match rinlinejQuery
+       expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ),
+
+       // The following elements throw uncatchable exceptions if you
+       // attempt to add expando properties to them.
+       noData: {
+               "embed": true,
+               // Ban all objects except for Flash (which handle expandos)
+               "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
+               "applet": true
+       },
+
+       hasData: function( elem ) {
+               elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+               return !!elem && !isEmptyDataObject( elem );
+       },
+
+       data: function( elem, name, data, pvt /* Internal Use Only */ ) {
+               if ( !jQuery.acceptData( elem ) ) {
+                       return;
+               }
+
+               var thisCache, ret,
+                       internalKey = jQuery.expando,
+                       getByName = typeof name === "string",
+
+                       // We have to handle DOM nodes and JS objects differently because IE6-7
+                       // can't GC object references properly across the DOM-JS boundary
+                       isNode = elem.nodeType,
+
+                       // Only DOM nodes need the global jQuery cache; JS object data is
+                       // attached directly to the object so GC can occur automatically
+                       cache = isNode ? jQuery.cache : elem,
+
+                       // Only defining an ID for JS objects if its cache already exists allows
+                       // the code to shortcut on the same path as a DOM node with no cache
+                       id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
+
+               // Avoid doing any more work than we need to when trying to get data on an
+               // object that has no data at all
+               if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
+                       return;
+               }
+
+               if ( !id ) {
+                       // Only DOM nodes need a new unique ID for each element since their data
+                       // ends up in the global cache
+                       if ( isNode ) {
+                               elem[ internalKey ] = id = jQuery.deletedIds.pop() || jQuery.guid++;
+                       } else {
+                               id = internalKey;
+                       }
+               }
+
+               if ( !cache[ id ] ) {
+                       cache[ id ] = {};
+
+                       // Avoids exposing jQuery metadata on plain JS objects when the object
+                       // is serialized using JSON.stringify
+                       if ( !isNode ) {
+                               cache[ id ].toJSON = jQuery.noop;
+                       }
+               }
+
+               // An object can be passed to jQuery.data instead of a key/value pair; this gets
+               // shallow copied over onto the existing cache
+               if ( typeof name === "object" || typeof name === "function" ) {
+                       if ( pvt ) {
+                               cache[ id ] = jQuery.extend( cache[ id ], name );
+                       } else {
+                               cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+                       }
+               }
+
+               thisCache = cache[ id ];
+
+               // jQuery data() is stored in a separate object inside the object's internal data
+               // cache in order to avoid key collisions between internal data and user-defined
+               // data.
+               if ( !pvt ) {
+                       if ( !thisCache.data ) {
+                               thisCache.data = {};
+                       }
+
+                       thisCache = thisCache.data;
+               }
+
+               if ( data !== undefined ) {
+                       thisCache[ jQuery.camelCase( name ) ] = data;
+               }
+
+               // Check for both converted-to-camel and non-converted data property names
+               // If a data property was specified
+               if ( getByName ) {
+
+                       // First Try to find as-is property data
+                       ret = thisCache[ name ];
+
+                       // Test for null|undefined property data
+                       if ( ret == null ) {
+
+                               // Try to find the camelCased property
+                               ret = thisCache[ jQuery.camelCase( name ) ];
+                       }
+               } else {
+                       ret = thisCache;
+               }
+
+               return ret;
+       },
+
+       removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+               if ( !jQuery.acceptData( elem ) ) {
+                       return;
+               }
+
+               var thisCache, i, l,
+
+                       isNode = elem.nodeType,
+
+                       // See jQuery.data for more information
+                       cache = isNode ? jQuery.cache : elem,
+                       id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+               // If there is already no cache entry for this object, there is no
+               // purpose in continuing
+               if ( !cache[ id ] ) {
+                       return;
+               }
+
+               if ( name ) {
+
+                       thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+                       if ( thisCache ) {
+
+                               // Support array or space separated string names for data keys
+                               if ( !jQuery.isArray( name ) ) {
+
+                                       // try the string as a key before any manipulation
+                                       if ( name in thisCache ) {
+                                               name = [ name ];
+                                       } else {
+
+                                               // split the camel cased version by spaces unless a key with the spaces exists
+                                               name = jQuery.camelCase( name );
+                                               if ( name in thisCache ) {
+                                                       name = [ name ];
+                                               } else {
+                                                       name = name.split(" ");
+                                               }
+                                       }
+                               }
+
+                               for ( i = 0, l = name.length; i < l; i++ ) {
+                                       delete thisCache[ name[i] ];
+                               }
+
+                               // If there is no data left in the cache, we want to continue
+                               // and let the cache object itself get destroyed
+                               if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
+                                       return;
+                               }
+                       }
+               }
+
+               // See jQuery.data for more information
+               if ( !pvt ) {
+                       delete cache[ id ].data;
+
+                       // Don't destroy the parent cache unless the internal data object
+                       // had been the only thing left in it
+                       if ( !isEmptyDataObject( cache[ id ] ) ) {
+                               return;
+                       }
+               }
+
+               // Destroy the cache
+               if ( isNode ) {
+                       jQuery.cleanData( [ elem ], true );
+
+               // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+               } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
+                       delete cache[ id ];
+
+               // When all else fails, null
+               } else {
+                       cache[ id ] = null;
+               }
+       },
+
+       // For internal use only.
+       _data: function( elem, name, data ) {
+               return jQuery.data( elem, name, data, true );
+       },
+
+       // A method for determining if a DOM node can handle the data expando
+       acceptData: function( elem ) {
+               var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+               // nodes accept data unless otherwise specified; rejection can be conditional
+               return !noData || noData !== true && elem.getAttribute("classid") === noData;
+       }
+});
+
+jQuery.fn.extend({
+       data: function( key, value ) {
+               var parts, part, attr, name, l,
+                       elem = this[0],
+                       i = 0,
+                       data = null;
+
+               // Gets all values
+               if ( key === undefined ) {
+                       if ( this.length ) {
+                               data = jQuery.data( elem );
+
+                               if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+                                       attr = elem.attributes;
+                                       for ( l = attr.length; i < l; i++ ) {
+                                               name = attr[i].name;
+
+                                               if ( !name.indexOf( "data-" ) ) {
+                                                       name = jQuery.camelCase( name.substring(5) );
+
+                                                       dataAttr( elem, name, data[ name ] );
+                                               }
+                                       }
+                                       jQuery._data( elem, "parsedAttrs", true );
+                               }
+                       }
+
+                       return data;
+               }
+
+               // Sets multiple values
+               if ( typeof key === "object" ) {
+                       return this.each(function() {
+                               jQuery.data( this, key );
+                       });
+               }
+
+               parts = key.split( ".", 2 );
+               parts[1] = parts[1] ? "." + parts[1] : "";
+               part = parts[1] + "!";
+
+               return jQuery.access( this, function( value ) {
+
+                       if ( value === undefined ) {
+                               data = this.triggerHandler( "getData" + part, [ parts[0] ] );
+
+                               // Try to fetch any internally stored data first
+                               if ( data === undefined && elem ) {
+                                       data = jQuery.data( elem, key );
+                                       data = dataAttr( elem, key, data );
+                               }
+
+                               return data === undefined && parts[1] ?
+                                       this.data( parts[0] ) :
+                                       data;
+                       }
+
+                       parts[1] = value;
+                       this.each(function() {
+                               var self = jQuery( this );
+
+                               self.triggerHandler( "setData" + part, parts );
+                               jQuery.data( this, key, value );
+                               self.triggerHandler( "changeData" + part, parts );
+                       });
+               }, null, value, arguments.length > 1, null, false );
+       },
+
+       removeData: function( key ) {
+               return this.each(function() {
+                       jQuery.removeData( this, key );
+               });
+       }
+});
+
+function dataAttr( elem, key, data ) {
+       // If nothing was found internally, try to fetch any
+       // data from the HTML5 data-* attribute
+       if ( data === undefined && elem.nodeType === 1 ) {
+
+               var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+               data = elem.getAttribute( name );
+
+               if ( typeof data === "string" ) {
+                       try {
+                               data = data === "true" ? true :
+                               data === "false" ? false :
+                               data === "null" ? null :
+                               // Only convert to a number if it doesn't change the string
+                               +data + "" === data ? +data :
+                               rbrace.test( data ) ? jQuery.parseJSON( data ) :
+                                       data;
+                       } catch( e ) {}
+
+                       // Make sure we set the data so it isn't changed later
+                       jQuery.data( elem, key, data );
+
+               } else {
+                       data = undefined;
+               }
+       }
+
+       return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+       var name;
+       for ( name in obj ) {
+
+               // if the public data object is empty, the private is still empty
+               if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+                       continue;
+               }
+               if ( name !== "toJSON" ) {
+                       return false;
+               }
+       }
+
+       return true;
+}
+jQuery.extend({
+       queue: function( elem, type, data ) {
+               var queue;
+
+               if ( elem ) {
+                       type = ( type || "fx" ) + "queue";
+                       queue = jQuery._data( elem, type );
+
+                       // Speed up dequeue by getting out quickly if this is just a lookup
+                       if ( data ) {
+                               if ( !queue || jQuery.isArray(data) ) {
+                                       queue = jQuery._data( elem, type, jQuery.makeArray(data) );
+                               } else {
+                                       queue.push( data );
+                               }
+                       }
+                       return queue || [];
+               }
+       },
+
+       dequeue: function( elem, type ) {
+               type = type || "fx";
+
+               var queue = jQuery.queue( elem, type ),
+                       startLength = queue.length,
+                       fn = queue.shift(),
+                       hooks = jQuery._queueHooks( elem, type ),
+                       next = function() {
+                               jQuery.dequeue( elem, type );
+                       };
+
+               // If the fx queue is dequeued, always remove the progress sentinel
+               if ( fn === "inprogress" ) {
+                       fn = queue.shift();
+                       startLength--;
+               }
+
+               if ( fn ) {
+
+                       // Add a progress sentinel to prevent the fx queue from being
+                       // automatically dequeued
+                       if ( type === "fx" ) {
+                               queue.unshift( "inprogress" );
+                       }
+
+                       // clear up the last queue stop function
+                       delete hooks.stop;
+                       fn.call( elem, next, hooks );
+               }
+
+               if ( !startLength && hooks ) {
+                       hooks.empty.fire();
+               }
+       },
+
+       // not intended for public consumption - generates a queueHooks object, or returns the current one
+       _queueHooks: function( elem, type ) {
+               var key = type + "queueHooks";
+               return jQuery._data( elem, key ) || jQuery._data( elem, key, {
+                       empty: jQuery.Callbacks("once memory").add(function() {
+                               jQuery.removeData( elem, type + "queue", true );
+                               jQuery.removeData( elem, key, true );
+                       })
+               });
+       }
+});
+
+jQuery.fn.extend({
+       queue: function( type, data ) {
+               var setter = 2;
+
+               if ( typeof type !== "string" ) {
+                       data = type;
+                       type = "fx";
+                       setter--;
+               }
+
+               if ( arguments.length < setter ) {
+                       return jQuery.queue( this[0], type );
+               }
+
+               return data === undefined ?
+                       this :
+                       this.each(function() {
+                               var queue = jQuery.queue( this, type, data );
+
+                               // ensure a hooks for this queue
+                               jQuery._queueHooks( this, type );
+
+                               if ( type === "fx" && queue[0] !== "inprogress" ) {
+                                       jQuery.dequeue( this, type );
+                               }
+                       });
+       },
+       dequeue: function( type ) {
+               return this.each(function() {
+                       jQuery.dequeue( this, type );
+               });
+       },
+       // Based off of the plugin by Clint Helfers, with permission.
+       // http://blindsignals.com/index.php/2009/07/jquery-delay/
+       delay: function( time, type ) {
+               time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+               type = type || "fx";
+
+               return this.queue( type, function( next, hooks ) {
+                       var timeout = setTimeout( next, time );
+                       hooks.stop = function() {
+                               clearTimeout( timeout );
+                       };
+               });
+       },
+       clearQueue: function( type ) {
+               return this.queue( type || "fx", [] );
+       },
+       // Get a promise resolved when queues of a certain type
+       // are emptied (fx is the type by default)
+       promise: function( type, obj ) {
+               var tmp,
+                       count = 1,
+                       defer = jQuery.Deferred(),
+                       elements = this,
+                       i = this.length,
+                       resolve = function() {
+                               if ( !( --count ) ) {
+                                       defer.resolveWith( elements, [ elements ] );
+                               }
+                       };
+
+               if ( typeof type !== "string" ) {
+                       obj = type;
+                       type = undefined;
+               }
+               type = type || "fx";
+
+               while( i-- ) {
+                       tmp = jQuery._data( elements[ i ], type + "queueHooks" );
+                       if ( tmp && tmp.empty ) {
+                               count++;
+                               tmp.empty.add( resolve );
+                       }
+               }
+               resolve();
+               return defer.promise( obj );
+       }
+});
+var nodeHook, boolHook, fixSpecified,
+       rclass = /[\t\r\n]/g,
+       rreturn = /\r/g,
+       rtype = /^(?:button|input)$/i,
+       rfocusable = /^(?:button|input|object|select|textarea)$/i,
+       rclickable = /^a(?:rea|)$/i,
+       rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+       getSetAttribute = jQuery.support.getSetAttribute;
+
+jQuery.fn.extend({
+       attr: function( name, value ) {
+               return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+       },
+
+       removeAttr: function( name ) {
+               return this.each(function() {
+                       jQuery.removeAttr( this, name );
+               });
+       },
+
+       prop: function( name, value ) {
+               return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+       },
+
+       removeProp: function( name ) {
+               name = jQuery.propFix[ name ] || name;
+               return this.each(function() {
+                       // try/catch handles cases where IE balks (such as removing a property on window)
+                       try {
+                               this[ name ] = undefined;
+                               delete this[ name ];
+                       } catch( e ) {}
+               });
+       },
+
+       addClass: function( value ) {
+               var classNames, i, l, elem,
+                       setClass, c, cl;
+
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each(function( j ) {
+                               jQuery( this ).addClass( value.call(this, j, this.className) );
+                       });
+               }
+
+               if ( value && typeof value === "string" ) {
+                       classNames = value.split( core_rspace );
+
+                       for ( i = 0, l = this.length; i < l; i++ ) {
+                               elem = this[ i ];
+
+                               if ( elem.nodeType === 1 ) {
+                                       if ( !elem.className && classNames.length === 1 ) {
+                                               elem.className = value;
+
+                                       } else {
+                                               setClass = " " + elem.className + " ";
+
+                                               for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+                                                       if ( setClass.indexOf( " " + classNames[ c ] + " " ) < 0 ) {
+                                                               setClass += classNames[ c ] + " ";
+                                                       }
+                                               }
+                                               elem.className = jQuery.trim( setClass );
+                                       }
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       removeClass: function( value ) {
+               var removes, className, elem, c, cl, i, l;
+
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each(function( j ) {
+                               jQuery( this ).removeClass( value.call(this, j, this.className) );
+                       });
+               }
+               if ( (value && typeof value === "string") || value === undefined ) {
+                       removes = ( value || "" ).split( core_rspace );
+
+                       for ( i = 0, l = this.length; i < l; i++ ) {
+                               elem = this[ i ];
+                               if ( elem.nodeType === 1 && elem.className ) {
+
+                                       className = (" " + elem.className + " ").replace( rclass, " " );
+
+                                       // loop over each item in the removal list
+                                       for ( c = 0, cl = removes.length; c < cl; c++ ) {
+                                               // Remove until there is nothing to remove,
+                                               while ( className.indexOf(" " + removes[ c ] + " ") >= 0 ) {
+                                                       className = className.replace( " " + removes[ c ] + " " , " " );
+                                               }
+                                       }
+                                       elem.className = value ? jQuery.trim( className ) : "";
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       toggleClass: function( value, stateVal ) {
+               var type = typeof value,
+                       isBool = typeof stateVal === "boolean";
+
+               if ( jQuery.isFunction( value ) ) {
+                       return this.each(function( i ) {
+                               jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+                       });
+               }
+
+               return this.each(function() {
+                       if ( type === "string" ) {
+                               // toggle individual class names
+                               var className,
+                                       i = 0,
+                                       self = jQuery( this ),
+                                       state = stateVal,
+                                       classNames = value.split( core_rspace );
+
+                               while ( (className = classNames[ i++ ]) ) {
+                                       // check each className given, space separated list
+                                       state = isBool ? state : !self.hasClass( className );
+                                       self[ state ? "addClass" : "removeClass" ]( className );
+                               }
+
+                       } else if ( type === "undefined" || type === "boolean" ) {
+                               if ( this.className ) {
+                                       // store className if set
+                                       jQuery._data( this, "__className__", this.className );
+                               }
+
+                               // toggle whole className
+                               this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+                       }
+               });
+       },
+
+       hasClass: function( selector ) {
+               var className = " " + selector + " ",
+                       i = 0,
+                       l = this.length;
+               for ( ; i < l; i++ ) {
+                       if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+                               return true;
+                       }
+               }
+
+               return false;
+       },
+
+       val: function( value ) {
+               var hooks, ret, isFunction,
+                       elem = this[0];
+
+               if ( !arguments.length ) {
+                       if ( elem ) {
+                               hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+                               if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+                                       return ret;
+                               }
+
+                               ret = elem.value;
+
+                               return typeof ret === "string" ?
+                                       // handle most common string cases
+                                       ret.replace(rreturn, "") :
+                                       // handle cases where value is null/undef or number
+                                       ret == null ? "" : ret;
+                       }
+
+                       return;
+               }
+
+               isFunction = jQuery.isFunction( value );
+
+               return this.each(function( i ) {
+                       var val,
+                               self = jQuery(this);
+
+                       if ( this.nodeType !== 1 ) {
+                               return;
+                       }
+
+                       if ( isFunction ) {
+                               val = value.call( this, i, self.val() );
+                       } else {
+                               val = value;
+                       }
+
+                       // Treat null/undefined as ""; convert numbers to string
+                       if ( val == null ) {
+                               val = "";
+                       } else if ( typeof val === "number" ) {
+                               val += "";
+                       } else if ( jQuery.isArray( val ) ) {
+                               val = jQuery.map(val, function ( value ) {
+                                       return value == null ? "" : value + "";
+                               });
+                       }
+
+                       hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+                       // If set returns undefined, fall back to normal setting
+                       if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+                               this.value = val;
+                       }
+               });
+       }
+});
+
+jQuery.extend({
+       valHooks: {
+               option: {
+                       get: function( elem ) {
+                               // attributes.value is undefined in Blackberry 4.7 but
+                               // uses .value. See #6932
+                               var val = elem.attributes.value;
+                               return !val || val.specified ? elem.value : elem.text;
+                       }
+               },
+               select: {
+                       get: function( elem ) {
+                               var value, i, max, option,
+                                       index = elem.selectedIndex,
+                                       values = [],
+                                       options = elem.options,
+                                       one = elem.type === "select-one";
+
+                               // Nothing was selected
+                               if ( index < 0 ) {
+                                       return null;
+                               }
+
+                               // Loop through all the selected options
+                               i = one ? index : 0;
+                               max = one ? index + 1 : options.length;
+                               for ( ; i < max; i++ ) {
+                                       option = options[ i ];
+
+                                       // Don't return options that are disabled or in a disabled optgroup
+                                       if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) &&
+                                                       (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
+
+                                               // Get the specific value for the option
+                                               value = jQuery( option ).val();
+
+                                               // We don't need an array for one selects
+                                               if ( one ) {
+                                                       return value;
+                                               }
+
+                                               // Multi-Selects return an array
+                                               values.push( value );
+                                       }
+                               }
+
+                               // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
+                               if ( one && !values.length && options.length ) {
+                                       return jQuery( options[ index ] ).val();
+                               }
+
+                               return values;
+                       },
+
+                       set: function( elem, value ) {
+                               var values = jQuery.makeArray( value );
+
+                               jQuery(elem).find("option").each(function() {
+                                       this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
+                               });
+
+                               if ( !values.length ) {
+                                       elem.selectedIndex = -1;
+                               }
+                               return values;
+                       }
+               }
+       },
+
+       // Unused in 1.8, left in so attrFn-stabbers won't die; remove in 1.9
+       attrFn: {},
+
+       attr: function( elem, name, value, pass ) {
+               var ret, hooks, notxml,
+                       nType = elem.nodeType;
+
+               // don't get/set attributes on text, comment and attribute nodes
+               if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+                       return;
+               }
+
+               if ( pass && jQuery.isFunction( jQuery.fn[ name ] ) ) {
+                       return jQuery( elem )[ name ]( value );
+               }
+
+               // Fallback to prop when attributes are not supported
+               if ( typeof elem.getAttribute === "undefined" ) {
+                       return jQuery.prop( elem, name, value );
+               }
+
+               notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+               // All attributes are lowercase
+               // Grab necessary hook if one is defined
+               if ( notxml ) {
+                       name = name.toLowerCase();
+                       hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
+               }
+
+               if ( value !== undefined ) {
+
+                       if ( value === null ) {
+                               jQuery.removeAttr( elem, name );
+                               return;
+
+                       } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+                               return ret;
+
+                       } else {
+                               elem.setAttribute( name, value + "" );
+                               return value;
+                       }
+
+               } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+                       return ret;
+
+               } else {
+
+                       ret = elem.getAttribute( name );
+
+                       // Non-existent attributes return null, we normalize to undefined
+                       return ret === null ?
+                               undefined :
+                               ret;
+               }
+       },
+
+       removeAttr: function( elem, value ) {
+               var propName, attrNames, name, isBool,
+                       i = 0;
+
+               if ( value && elem.nodeType === 1 ) {
+
+                       attrNames = value.split( core_rspace );
+
+                       for ( ; i < attrNames.length; i++ ) {
+                               name = attrNames[ i ];
+
+                               if ( name ) {
+                                       propName = jQuery.propFix[ name ] || name;
+                                       isBool = rboolean.test( name );
+
+                                       // See #9699 for explanation of this approach (setting first, then removal)
+                                       // Do not do this for boolean attributes (see #10870)
+                                       if ( !isBool ) {
+                                               jQuery.attr( elem, name, "" );
+                                       }
+                                       elem.removeAttribute( getSetAttribute ? name : propName );
+
+                                       // Set corresponding property to false for boolean attributes
+                                       if ( isBool && propName in elem ) {
+                                               elem[ propName ] = false;
+                                       }
+                               }
+                       }
+               }
+       },
+
+       attrHooks: {
+               type: {
+                       set: function( elem, value ) {
+                               // We can't allow the type property to be changed (since it causes problems in IE)
+                               if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+                                       jQuery.error( "type property can't be changed" );
+                               } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+                                       // Setting the type on a radio button after the value resets the value in IE6-9
+                                       // Reset value to it's default in case type is set after value
+                                       // This is for element creation
+                                       var val = elem.value;
+                                       elem.setAttribute( "type", value );
+                                       if ( val ) {
+                                               elem.value = val;
+                                       }
+                                       return value;
+                               }
+                       }
+               },
+               // Use the value property for back compat
+               // Use the nodeHook for button elements in IE6/7 (#1954)
+               value: {
+                       get: function( elem, name ) {
+                               if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+                                       return nodeHook.get( elem, name );
+                               }
+                               return name in elem ?
+                                       elem.value :
+                                       null;
+                       },
+                       set: function( elem, value, name ) {
+                               if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+                                       return nodeHook.set( elem, value, name );
+                               }
+                               // Does not return so that setAttribute is also used
+                               elem.value = value;
+                       }
+               }
+       },
+
+       propFix: {
+               tabindex: "tabIndex",
+               readonly: "readOnly",
+               "for": "htmlFor",
+               "class": "className",
+               maxlength: "maxLength",
+               cellspacing: "cellSpacing",
+               cellpadding: "cellPadding",
+               rowspan: "rowSpan",
+               colspan: "colSpan",
+               usemap: "useMap",
+               frameborder: "frameBorder",
+               contenteditable: "contentEditable"
+       },
+
+       prop: function( elem, name, value ) {
+               var ret, hooks, notxml,
+                       nType = elem.nodeType;
+
+               // don't get/set properties on text, comment and attribute nodes
+               if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+                       return;
+               }
+
+               notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+               if ( notxml ) {
+                       // Fix name and attach hooks
+                       name = jQuery.propFix[ name ] || name;
+                       hooks = jQuery.propHooks[ name ];
+               }
+
+               if ( value !== undefined ) {
+                       if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+                               return ret;
+
+                       } else {
+                               return ( elem[ name ] = value );
+                       }
+
+               } else {
+                       if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+                               return ret;
+
+                       } else {
+                               return elem[ name ];
+                       }
+               }
+       },
+
+       propHooks: {
+               tabIndex: {
+                       get: function( elem ) {
+                               // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+                               // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+                               var attributeNode = elem.getAttributeNode("tabindex");
+
+                               return attributeNode && attributeNode.specified ?
+                                       parseInt( attributeNode.value, 10 ) :
+                                       rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+                                               0 :
+                                               undefined;
+                       }
+               }
+       }
+});
+
+// Hook for boolean attributes
+boolHook = {
+       get: function( elem, name ) {
+               // Align boolean attributes with corresponding properties
+               // Fall back to attribute presence where some booleans are not supported
+               var attrNode,
+                       property = jQuery.prop( elem, name );
+               return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
+                       name.toLowerCase() :
+                       undefined;
+       },
+       set: function( elem, value, name ) {
+               var propName;
+               if ( value === false ) {
+                       // Remove boolean attributes when set to false
+                       jQuery.removeAttr( elem, name );
+               } else {
+                       // value is true since we know at this point it's type boolean and not false
+                       // Set boolean attributes to the same name and set the DOM property
+                       propName = jQuery.propFix[ name ] || name;
+                       if ( propName in elem ) {
+                               // Only set the IDL specifically if it already exists on the element
+                               elem[ propName ] = true;
+                       }
+
+                       elem.setAttribute( name, name.toLowerCase() );
+               }
+               return name;
+       }
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+       fixSpecified = {
+               name: true,
+               id: true,
+               coords: true
+       };
+
+       // Use this for any attribute in IE6/7
+       // This fixes almost every IE6/7 issue
+       nodeHook = jQuery.valHooks.button = {
+               get: function( elem, name ) {
+                       var ret;
+                       ret = elem.getAttributeNode( name );
+                       return ret && ( fixSpecified[ name ] ? ret.value !== "" : ret.specified ) ?
+                               ret.value :
+                               undefined;
+               },
+               set: function( elem, value, name ) {
+                       // Set the existing or create a new attribute node
+                       var ret = elem.getAttributeNode( name );
+                       if ( !ret ) {
+                               ret = document.createAttribute( name );
+                               elem.setAttributeNode( ret );
+                       }
+                       return ( ret.value = value + "" );
+               }
+       };
+
+       // Set width and height to auto instead of 0 on empty string( Bug #8150 )
+       // This is for removals
+       jQuery.each([ "width", "height" ], function( i, name ) {
+               jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+                       set: function( elem, value ) {
+                               if ( value === "" ) {
+                                       elem.setAttribute( name, "auto" );
+                                       return value;
+                               }
+                       }
+               });
+       });
+
+       // Set contenteditable to false on removals(#10429)
+       // Setting to empty string throws an error as an invalid value
+       jQuery.attrHooks.contenteditable = {
+               get: nodeHook.get,
+               set: function( elem, value, name ) {
+                       if ( value === "" ) {
+                               value = "false";
+                       }
+                       nodeHook.set( elem, value, name );
+               }
+       };
+}
+
+
+// Some attributes require a special call on IE
+if ( !jQuery.support.hrefNormalized ) {
+       jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
+               jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
+                       get: function( elem ) {
+                               var ret = elem.getAttribute( name, 2 );
+                               return ret === null ? undefined : ret;
+                       }
+               });
+       });
+}
+
+if ( !jQuery.support.style ) {
+       jQuery.attrHooks.style = {
+               get: function( elem ) {
+                       // Return undefined in the case of empty string
+                       // Normalize to lowercase since IE uppercases css property names
+                       return elem.style.cssText.toLowerCase() || undefined;
+               },
+               set: function( elem, value ) {
+                       return ( elem.style.cssText = value + "" );
+               }
+       };
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+       jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
+               get: function( elem ) {
+                       var parent = elem.parentNode;
+
+                       if ( parent ) {
+                               parent.selectedIndex;
+
+                               // Make sure that it also works with optgroups, see #5701
+                               if ( parent.parentNode ) {
+                                       parent.parentNode.selectedIndex;
+                               }
+                       }
+                       return null;
+               }
+       });
+}
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+       jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+if ( !jQuery.support.checkOn ) {
+       jQuery.each([ "radio", "checkbox" ], function() {
+               jQuery.valHooks[ this ] = {
+                       get: function( elem ) {
+                               // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
+                               return elem.getAttribute("value") === null ? "on" : elem.value;
+                       }
+               };
+       });
+}
+jQuery.each([ "radio", "checkbox" ], function() {
+       jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
+               set: function( elem, value ) {
+                       if ( jQuery.isArray( value ) ) {
+                               return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+                       }
+               }
+       });
+});
+var rformElems = /^(?:textarea|input|select)$/i,
+       rtypenamespace = /^([^\.]*|)(?:\.(.+)|)$/,
+       rhoverHack = /(?:^|\s)hover(\.\S+|)\b/,
+       rkeyEvent = /^key/,
+       rmouseEvent = /^(?:mouse|contextmenu)|click/,
+       rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+       hoverHack = function( events ) {
+               return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
+       };
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+       add: function( elem, types, handler, data, selector ) {
+
+               var elemData, eventHandle, events,
+                       t, tns, type, namespaces, handleObj,
+                       handleObjIn, handlers, special;
+
+               // Don't attach events to noData or text/comment nodes (allow plain objects tho)
+               if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
+                       return;
+               }
+
+               // Caller can pass in an object of custom data in lieu of the handler
+               if ( handler.handler ) {
+                       handleObjIn = handler;
+                       handler = handleObjIn.handler;
+                       selector = handleObjIn.selector;
+               }
+
+               // Make sure that the handler has a unique ID, used to find/remove it later
+               if ( !handler.guid ) {
+                       handler.guid = jQuery.guid++;
+               }
+
+               // Init the element's event structure and main handler, if this is the first
+               events = elemData.events;
+               if ( !events ) {
+                       elemData.events = events = {};
+               }
+               eventHandle = elemData.handle;
+               if ( !eventHandle ) {
+                       elemData.handle = eventHandle = function( e ) {
+                               // Discard the second event of a jQuery.event.trigger() and
+                               // when an event is called after a page has unloaded
+                               return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
+                                       jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+                                       undefined;
+                       };
+                       // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+                       eventHandle.elem = elem;
+               }
+
+               // Handle multiple events separated by a space
+               // jQuery(...).bind("mouseover mouseout", fn);
+               types = jQuery.trim( hoverHack(types) ).split( " " );
+               for ( t = 0; t < types.length; t++ ) {
+
+                       tns = rtypenamespace.exec( types[t] ) || [];
+                       type = tns[1];
+                       namespaces = ( tns[2] || "" ).split( "." ).sort();
+
+                       // If event changes its type, use the special event handlers for the changed type
+                       special = jQuery.event.special[ type ] || {};
+
+                       // If selector defined, determine special event api type, otherwise given type
+                       type = ( selector ? special.delegateType : special.bindType ) || type;
+
+                       // Update special based on newly reset type
+                       special = jQuery.event.special[ type ] || {};
+
+                       // handleObj is passed to all event handlers
+                       handleObj = jQuery.extend({
+                               type: type,
+                               origType: tns[1],
+                               data: data,
+                               handler: handler,
+                               guid: handler.guid,
+                               selector: selector,
+                               needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+                               namespace: namespaces.join(".")
+                       }, handleObjIn );
+
+                       // Init the event handler queue if we're the first
+                       handlers = events[ type ];
+                       if ( !handlers ) {
+                               handlers = events[ type ] = [];
+                               handlers.delegateCount = 0;
+
+                               // Only use addEventListener/attachEvent if the special events handler returns false
+                               if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+                                       // Bind the global event handler to the element
+                                       if ( elem.addEventListener ) {
+                                               elem.addEventListener( type, eventHandle, false );
+
+                                       } else if ( elem.attachEvent ) {
+                                               elem.attachEvent( "on" + type, eventHandle );
+                                       }
+                               }
+                       }
+
+                       if ( special.add ) {
+                               special.add.call( elem, handleObj );
+
+                               if ( !handleObj.handler.guid ) {
+                                       handleObj.handler.guid = handler.guid;
+                               }
+                       }
+
+                       // Add to the element's handler list, delegates in front
+                       if ( selector ) {
+                               handlers.splice( handlers.delegateCount++, 0, handleObj );
+                       } else {
+                               handlers.push( handleObj );
+                       }
+
+                       // Keep track of which events have ever been used, for event optimization
+                       jQuery.event.global[ type ] = true;
+               }
+
+               // Nullify elem to prevent memory leaks in IE
+               elem = null;
+       },
+
+       global: {},
+
+       // Detach an event or set of events from an element
+       remove: function( elem, types, handler, selector, mappedTypes ) {
+
+               var t, tns, type, origType, namespaces, origCount,
+                       j, events, special, eventType, handleObj,
+                       elemData = jQuery.hasData( elem ) && jQuery._data( elem );
+
+               if ( !elemData || !(events = elemData.events) ) {
+                       return;
+               }
+
+               // Once for each type.namespace in types; type may be omitted
+               types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
+               for ( t = 0; t < types.length; t++ ) {
+                       tns = rtypenamespace.exec( types[t] ) || [];
+                       type = origType = tns[1];
+                       namespaces = tns[2];
+
+                       // Unbind all events (on this namespace, if provided) for the element
+                       if ( !type ) {
+                               for ( type in events ) {
+                                       jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+                               }
+                               continue;
+                       }
+
+                       special = jQuery.event.special[ type ] || {};
+                       type = ( selector? special.delegateType : special.bindType ) || type;
+                       eventType = events[ type ] || [];
+                       origCount = eventType.length;
+                       namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
+
+                       // Remove matching events
+                       for ( j = 0; j < eventType.length; j++ ) {
+                               handleObj = eventType[ j ];
+
+                               if ( ( mappedTypes || origType === handleObj.origType ) &&
+                                        ( !handler || handler.guid === handleObj.guid ) &&
+                                        ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
+                                        ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+                                       eventType.splice( j--, 1 );
+
+                                       if ( handleObj.selector ) {
+                                               eventType.delegateCount--;
+                                       }
+                                       if ( special.remove ) {
+                                               special.remove.call( elem, handleObj );
+                                       }
+                               }
+                       }
+
+                       // Remove generic event handler if we removed something and no more handlers exist
+                       // (avoids potential for endless recursion during removal of special event handlers)
+                       if ( eventType.length === 0 && origCount !== eventType.length ) {
+                               if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+                                       jQuery.removeEvent( elem, type, elemData.handle );
+                               }
+
+                               delete events[ type ];
+                       }
+               }
+
+               // Remove the expando if it's no longer used
+               if ( jQuery.isEmptyObject( events ) ) {
+                       delete elemData.handle;
+
+                       // removeData also checks for emptiness and clears the expando if empty
+                       // so use it instead of delete
+                       jQuery.removeData( elem, "events", true );
+               }
+       },
+
+       // Events that are safe to short-circuit if no handlers are attached.
+       // Native DOM events should not be added, they may have inline handlers.
+       customEvent: {
+               "getData": true,
+               "setData": true,
+               "changeData": true
+       },
+
+       trigger: function( event, data, elem, onlyHandlers ) {
+               // Don't do events on text and comment nodes
+               if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
+                       return;
+               }
+
+               // Event object or event type
+               var cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType,
+                       type = event.type || event,
+                       namespaces = [];
+
+               // focus/blur morphs to focusin/out; ensure we're not firing them right now
+               if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+                       return;
+               }
+
+               if ( type.indexOf( "!" ) >= 0 ) {
+                       // Exclusive events trigger only for the exact event (no namespaces)
+                       type = type.slice(0, -1);
+                       exclusive = true;
+               }
+
+               if ( type.indexOf( "." ) >= 0 ) {
+                       // Namespaced trigger; create a regexp to match event type in handle()
+                       namespaces = type.split(".");
+                       type = namespaces.shift();
+                       namespaces.sort();
+               }
+
+               if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+                       // No jQuery handlers for this event type, and it can't have inline handlers
+                       return;
+               }
+
+               // Caller can pass in an Event, Object, or just an event type string
+               event = typeof event === "object" ?
+                       // jQuery.Event object
+                       event[ jQuery.expando ] ? event :
+                       // Object literal
+                       new jQuery.Event( type, event ) :
+                       // Just the event type (string)
+                       new jQuery.Event( type );
+
+               event.type = type;
+               event.isTrigger = true;
+               event.exclusive = exclusive;
+               event.namespace = namespaces.join( "." );
+               event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
+               ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
+
+               // Handle a global trigger
+               if ( !elem ) {
+
+                       // TODO: Stop taunting the data cache; remove global events and always attach to document
+                       cache = jQuery.cache;
+                       for ( i in cache ) {
+                               if ( cache[ i ].events && cache[ i ].events[ type ] ) {
+                                       jQuery.event.trigger( event, data, cache[ i ].handle.elem, true );
+                               }
+                       }
+                       return;
+               }
+
+               // Clean up the event in case it is being reused
+               event.result = undefined;
+               if ( !event.target ) {
+                       event.target = elem;
+               }
+
+               // Clone any incoming data and prepend the event, creating the handler arg list
+               data = data != null ? jQuery.makeArray( data ) : [];
+               data.unshift( event );
+
+               // Allow special events to draw outside the lines
+               special = jQuery.event.special[ type ] || {};
+               if ( special.trigger && special.trigger.apply( elem, data ) === false ) {
+                       return;
+               }
+
+               // Determine event propagation path in advance, per W3C events spec (#9951)
+               // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+               eventPath = [[ elem, special.bindType || type ]];
+               if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+                       bubbleType = special.delegateType || type;
+                       cur = rfocusMorph.test( bubbleType + type ) ? elem : elem.parentNode;
+                       for ( old = elem; cur; cur = cur.parentNode ) {
+                               eventPath.push([ cur, bubbleType ]);
+                               old = cur;
+                       }
+
+                       // Only add window if we got to document (e.g., not plain obj or detached DOM)
+                       if ( old === (elem.ownerDocument || document) ) {
+                               eventPath.push([ old.defaultView || old.parentWindow || window, bubbleType ]);
+                       }
+               }
+
+               // Fire handlers on the event path
+               for ( i = 0; i < eventPath.length && !event.isPropagationStopped(); i++ ) {
+
+                       cur = eventPath[i][0];
+                       event.type = eventPath[i][1];
+
+                       handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+                       if ( handle ) {
+                               handle.apply( cur, data );
+                       }
+                       // Note that this is a bare JS function and not a jQuery handler
+                       handle = ontype && cur[ ontype ];
+                       if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
+                               event.preventDefault();
+                       }
+               }
+               event.type = type;
+
+               // If nobody prevented the default action, do it now
+               if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+                       if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
+                               !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
+
+                               // Call a native DOM method on the target with the same name name as the event.
+                               // Can't use an .isFunction() check here because IE6/7 fails that test.
+                               // Don't do default actions on window, that's where global variables be (#6170)
+                               // IE<9 dies on focus/blur to hidden element (#1486)
+                               if ( ontype && elem[ type ] && ((type !== "focus" && type !== "blur") || event.target.offsetWidth !== 0) && !jQuery.isWindow( elem ) ) {
+
+                                       // Don't re-trigger an onFOO event when we call its FOO() method
+                                       old = elem[ ontype ];
+
+                                       if ( old ) {
+                                               elem[ ontype ] = null;
+                                       }
+
+                                       // Prevent re-triggering of the same event, since we already bubbled it above
+                                       jQuery.event.triggered = type;
+                                       elem[ type ]();
+                                       jQuery.event.triggered = undefined;
+
+                                       if ( old ) {
+                                               elem[ ontype ] = old;
+                                       }
+                               }
+                       }
+               }
+
+               return event.result;
+       },
+
+       dispatch: function( event ) {
+
+               // Make a writable jQuery.Event from the native event object
+               event = jQuery.event.fix( event || window.event );
+
+               var i, j, cur, ret, selMatch, matched, matches, handleObj, sel, related,
+                       handlers = ( (jQuery._data( this, "events" ) || {} )[ event.type ] || []),
+                       delegateCount = handlers.delegateCount,
+                       args = core_slice.call( arguments ),
+                       run_all = !event.exclusive && !event.namespace,
+                       special = jQuery.event.special[ event.type ] || {},
+                       handlerQueue = [];
+
+               // Use the fix-ed jQuery.Event rather than the (read-only) native event
+               args[0] = event;
+               event.delegateTarget = this;
+
+               // Call the preDispatch hook for the mapped type, and let it bail if desired
+               if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+                       return;
+               }
+
+               // Determine handlers that should run if there are delegated events
+               // Avoid non-left-click bubbling in Firefox (#3861)
+               if ( delegateCount && !(event.button && event.type === "click") ) {
+
+                       for ( cur = event.target; cur != this; cur = cur.parentNode || this ) {
+
+                               // Don't process clicks (ONLY) on disabled elements (#6911, #8165, #11382, #11764)
+                               if ( cur.disabled !== true || event.type !== "click" ) {
+                                       selMatch = {};
+                                       matches = [];
+                                       for ( i = 0; i < delegateCount; i++ ) {
+                                               handleObj = handlers[ i ];
+                                               sel = handleObj.selector;
+
+                                               if ( selMatch[ sel ] === undefined ) {
+                                                       selMatch[ sel ] = handleObj.needsContext ?
+                                                               jQuery( sel, this ).index( cur ) >= 0 :
+                                                               jQuery.find( sel, this, null, [ cur ] ).length;
+                                               }
+                                               if ( selMatch[ sel ] ) {
+                                                       matches.push( handleObj );
+                                               }
+                                       }
+                                       if ( matches.length ) {
+                                               handlerQueue.push({ elem: cur, matches: matches });
+                                       }
+                               }
+                       }
+               }
+
+               // Add the remaining (directly-bound) handlers
+               if ( handlers.length > delegateCount ) {
+                       handlerQueue.push({ elem: this, matches: handlers.slice( delegateCount ) });
+               }
+
+               // Run delegates first; they may want to stop propagation beneath us
+               for ( i = 0; i < handlerQueue.length && !event.isPropagationStopped(); i++ ) {
+                       matched = handlerQueue[ i ];
+                       event.currentTarget = matched.elem;
+
+                       for ( j = 0; j < matched.matches.length && !event.isImmediatePropagationStopped(); j++ ) {
+                               handleObj = matched.matches[ j ];
+
+                               // Triggered event must either 1) be non-exclusive and have no namespace, or
+                               // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+                               if ( run_all || (!event.namespace && !handleObj.namespace) || event.namespace_re && event.namespace_re.test( handleObj.namespace ) ) {
+
+                                       event.data = handleObj.data;
+                                       event.handleObj = handleObj;
+
+                                       ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+                                                       .apply( matched.elem, args );
+
+                                       if ( ret !== undefined ) {
+                                               event.result = ret;
+                                               if ( ret === false ) {
+                                                       event.preventDefault();
+                                                       event.stopPropagation();
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               // Call the postDispatch hook for the mapped type
+               if ( special.postDispatch ) {
+                       special.postDispatch.call( this, event );
+               }
+
+               return event.result;
+       },
+
+       // Includes some event props shared by KeyEvent and MouseEvent
+       // *** attrChange attrName relatedNode srcElement  are not normalized, non-W3C, deprecated, will be removed in 1.8 ***
+       props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+       fixHooks: {},
+
+       keyHooks: {
+               props: "char charCode key keyCode".split(" "),
+               filter: function( event, original ) {
+
+                       // Add which for key events
+                       if ( event.which == null ) {
+                               event.which = original.charCode != null ? original.charCode : original.keyCode;
+                       }
+
+                       return event;
+               }
+       },
+
+       mouseHooks: {
+               props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+               filter: function( event, original ) {
+                       var eventDoc, doc, body,
+                               button = original.button,
+                               fromElement = original.fromElement;
+
+                       // Calculate pageX/Y if missing and clientX/Y available
+                       if ( event.pageX == null && original.clientX != null ) {
+                               eventDoc = event.target.ownerDocument || document;
+                               doc = eventDoc.documentElement;
+                               body = eventDoc.body;
+
+                               event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+                               event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
+                       }
+
+                       // Add relatedTarget, if necessary
+                       if ( !event.relatedTarget && fromElement ) {
+                               event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+                       }
+
+                       // Add which for click: 1 === left; 2 === middle; 3 === right
+                       // Note: button is not normalized, so don't use it
+                       if ( !event.which && button !== undefined ) {
+                               event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+                       }
+
+                       return event;
+               }
+       },
+
+       fix: function( event ) {
+               if ( event[ jQuery.expando ] ) {
+                       return event;
+               }
+
+               // Create a writable copy of the event object and normalize some properties
+               var i, prop,
+                       originalEvent = event,
+                       fixHook = jQuery.event.fixHooks[ event.type ] || {},
+                       copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+               event = jQuery.Event( originalEvent );
+
+               for ( i = copy.length; i; ) {
+                       prop = copy[ --i ];
+                       event[ prop ] = originalEvent[ prop ];
+               }
+
+               // Fix target property, if necessary (#1925, IE 6/7/8 & Safari2)
+               if ( !event.target ) {
+                       event.target = originalEvent.srcElement || document;
+               }
+
+               // Target should not be a text node (#504, Safari)
+               if ( event.target.nodeType === 3 ) {
+                       event.target = event.target.parentNode;
+               }
+
+               // For mouse/key events, metaKey==false if it's undefined (#3368, #11328; IE6/7/8)
+               event.metaKey = !!event.metaKey;
+
+               return fixHook.filter? fixHook.filter( event, originalEvent ) : event;
+       },
+
+       special: {
+               load: {
+                       // Prevent triggered image.load events from bubbling to window.load
+                       noBubble: true
+               },
+
+               focus: {
+                       delegateType: "focusin"
+               },
+               blur: {
+                       delegateType: "focusout"
+               },
+
+               beforeunload: {
+                       setup: function( data, namespaces, eventHandle ) {
+                               // We only want to do this special case on windows
+                               if ( jQuery.isWindow( this ) ) {
+                                       this.onbeforeunload = eventHandle;
+                               }
+                       },
+
+                       teardown: function( namespaces, eventHandle ) {
+                               if ( this.onbeforeunload === eventHandle ) {
+                                       this.onbeforeunload = null;
+                               }
+                       }
+               }
+       },
+
+       simulate: function( type, elem, event, bubble ) {
+               // Piggyback on a donor event to simulate a different one.
+               // Fake originalEvent to avoid donor's stopPropagation, but if the
+               // simulated event prevents default then we do the same on the donor.
+               var e = jQuery.extend(
+                       new jQuery.Event(),
+                       event,
+                       { type: type,
+                               isSimulated: true,
+                               originalEvent: {}
+                       }
+               );
+               if ( bubble ) {
+                       jQuery.event.trigger( e, null, elem );
+               } else {
+                       jQuery.event.dispatch.call( elem, e );
+               }
+               if ( e.isDefaultPrevented() ) {
+                       event.preventDefault();
+               }
+       }
+};
+
+// Some plugins are using, but it's undocumented/deprecated and will be removed.
+// The 1.7 special event interface should provide all the hooks needed now.
+jQuery.event.handle = jQuery.event.dispatch;
+
+jQuery.removeEvent = document.removeEventListener ?
+       function( elem, type, handle ) {
+               if ( elem.removeEventListener ) {
+                       elem.removeEventListener( type, handle, false );
+               }
+       } :
+       function( elem, type, handle ) {
+               var name = "on" + type;
+
+               if ( elem.detachEvent ) {
+
+                       // #8545, #7054, preventing memory leaks for custom events in IE6-8 –
+                       // detachEvent needed property on element, by name of that event, to properly expose it to GC
+                       if ( typeof elem[ name ] === "undefined" ) {
+                               elem[ name ] = null;
+                       }
+
+                       elem.detachEvent( name, handle );
+               }
+       };
+
+jQuery.Event = function( src, props ) {
+       // Allow instantiation without the 'new' keyword
+       if ( !(this instanceof jQuery.Event) ) {
+               return new jQuery.Event( src, props );
+       }
+
+       // Event object
+       if ( src && src.type ) {
+               this.originalEvent = src;
+               this.type = src.type;
+
+               // Events bubbling up the document may have been marked as prevented
+               // by a handler lower down the tree; reflect the correct value.
+               this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+                       src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+       // Event type
+       } else {
+               this.type = src;
+       }
+
+       // Put explicitly provided properties onto the event object
+       if ( props ) {
+               jQuery.extend( this, props );
+       }
+
+       // Create a timestamp if incoming event doesn't have one
+       this.timeStamp = src && src.timeStamp || jQuery.now();
+
+       // Mark it as fixed
+       this[ jQuery.expando ] = true;
+};
+
+function returnFalse() {
+       return false;
+}
+function returnTrue() {
+       return true;
+}
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+       preventDefault: function() {
+               this.isDefaultPrevented = returnTrue;
+
+               var e = this.originalEvent;
+               if ( !e ) {
+                       return;
+               }
+
+               // if preventDefault exists run it on the original event
+               if ( e.preventDefault ) {
+                       e.preventDefault();
+
+               // otherwise set the returnValue property of the original event to false (IE)
+               } else {
+                       e.returnValue = false;
+               }
+       },
+       stopPropagation: function() {
+               this.isPropagationStopped = returnTrue;
+
+               var e = this.originalEvent;
+               if ( !e ) {
+                       return;
+               }
+               // if stopPropagation exists run it on the original event
+               if ( e.stopPropagation ) {
+                       e.stopPropagation();
+               }
+               // otherwise set the cancelBubble property of the original event to true (IE)
+               e.cancelBubble = true;
+       },
+       stopImmediatePropagation: function() {
+               this.isImmediatePropagationStopped = returnTrue;
+               this.stopPropagation();
+       },
+       isDefaultPrevented: returnFalse,
+       isPropagationStopped: returnFalse,
+       isImmediatePropagationStopped: returnFalse
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+       mouseenter: "mouseover",
+       mouseleave: "mouseout"
+}, function( orig, fix ) {
+       jQuery.event.special[ orig ] = {
+               delegateType: fix,
+               bindType: fix,
+
+               handle: function( event ) {
+                       var ret,
+                               target = this,
+                               related = event.relatedTarget,
+                               handleObj = event.handleObj,
+                               selector = handleObj.selector;
+
+                       // For mousenter/leave call the handler if related is outside the target.
+                       // NB: No relatedTarget if the mouse left/entered the browser window
+                       if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+                               event.type = handleObj.origType;
+                               ret = handleObj.handler.apply( this, arguments );
+                               event.type = fix;
+                       }
+                       return ret;
+               }
+       };
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+       jQuery.event.special.submit = {
+               setup: function() {
+                       // Only need this for delegated form submit events
+                       if ( jQuery.nodeName( this, "form" ) ) {
+                               return false;
+                       }
+
+                       // Lazy-add a submit handler when a descendant form may potentially be submitted
+                       jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+                               // Node name check avoids a VML-related crash in IE (#9807)
+                               var elem = e.target,
+                                       form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+                               if ( form && !jQuery._data( form, "_submit_attached" ) ) {
+                                       jQuery.event.add( form, "submit._submit", function( event ) {
+                                               event._submit_bubble = true;
+                                       });
+                                       jQuery._data( form, "_submit_attached", true );
+                               }
+                       });
+                       // return undefined since we don't need an event listener
+               },
+
+               postDispatch: function( event ) {
+                       // If form was submitted by the user, bubble the event up the tree
+                       if ( event._submit_bubble ) {
+                               delete event._submit_bubble;
+                               if ( this.parentNode && !event.isTrigger ) {
+                                       jQuery.event.simulate( "submit", this.parentNode, event, true );
+                               }
+                       }
+               },
+
+               teardown: function() {
+                       // Only need this for delegated form submit events
+                       if ( jQuery.nodeName( this, "form" ) ) {
+                               return false;
+                       }
+
+                       // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+                       jQuery.event.remove( this, "._submit" );
+               }
+       };
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+       jQuery.event.special.change = {
+
+               setup: function() {
+
+                       if ( rformElems.test( this.nodeName ) ) {
+                               // IE doesn't fire change on a check/radio until blur; trigger it on click
+                               // after a propertychange. Eat the blur-change in special.change.handle.
+                               // This still fires onchange a second time for check/radio after blur.
+                               if ( this.type === "checkbox" || this.type === "radio" ) {
+                                       jQuery.event.add( this, "propertychange._change", function( event ) {
+                                               if ( event.originalEvent.propertyName === "checked" ) {
+                                                       this._just_changed = true;
+                                               }
+                                       });
+                                       jQuery.event.add( this, "click._change", function( event ) {
+                                               if ( this._just_changed && !event.isTrigger ) {
+                                                       this._just_changed = false;
+                                               }
+                                               // Allow triggered, simulated change events (#11500)
+                                               jQuery.event.simulate( "change", this, event, true );
+                                       });
+                               }
+                               return false;
+                       }
+                       // Delegated event; lazy-add a change handler on descendant inputs
+                       jQuery.event.add( this, "beforeactivate._change", function( e ) {
+                               var elem = e.target;
+
+                               if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "_change_attached" ) ) {
+                                       jQuery.event.add( elem, "change._change", function( event ) {
+                                               if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+                                                       jQuery.event.simulate( "change", this.parentNode, event, true );
+                                               }
+                                       });
+                                       jQuery._data( elem, "_change_attached", true );
+                               }
+                       });
+               },
+
+               handle: function( event ) {
+                       var elem = event.target;
+
+                       // Swallow native change events from checkbox/radio, we already triggered them above
+                       if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+                               return event.handleObj.handler.apply( this, arguments );
+                       }
+               },
+
+               teardown: function() {
+                       jQuery.event.remove( this, "._change" );
+
+                       return !rformElems.test( this.nodeName );
+               }
+       };
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+       jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+               // Attach a single capturing handler while someone wants focusin/focusout
+               var attaches = 0,
+                       handler = function( event ) {
+                               jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+                       };
+
+               jQuery.event.special[ fix ] = {
+                       setup: function() {
+                               if ( attaches++ === 0 ) {
+                                       document.addEventListener( orig, handler, true );
+                               }
+                       },
+                       teardown: function() {
+                               if ( --attaches === 0 ) {
+                                       document.removeEventListener( orig, handler, true );
+                               }
+                       }
+               };
+       });
+}
+
+jQuery.fn.extend({
+
+       on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+               var origFn, type;
+
+               // Types can be a map of types/handlers
+               if ( typeof types === "object" ) {
+                       // ( types-Object, selector, data )
+                       if ( typeof selector !== "string" ) { // && selector != null
+                               // ( types-Object, data )
+                               data = data || selector;
+                               selector = undefined;
+                       }
+                       for ( type in types ) {
+                               this.on( type, selector, data, types[ type ], one );
+                       }
+                       return this;
+               }
+
+               if ( data == null && fn == null ) {
+                       // ( types, fn )
+                       fn = selector;
+                       data = selector = undefined;
+               } else if ( fn == null ) {
+                       if ( typeof selector === "string" ) {
+                               // ( types, selector, fn )
+                               fn = data;
+                               data = undefined;
+                       } else {
+                               // ( types, data, fn )
+                               fn = data;
+                               data = selector;
+                               selector = undefined;
+                       }
+               }
+               if ( fn === false ) {
+                       fn = returnFalse;
+               } else if ( !fn ) {
+                       return this;
+               }
+
+               if ( one === 1 ) {
+                       origFn = fn;
+                       fn = function( event ) {
+                               // Can use an empty set, since event contains the info
+                               jQuery().off( event );
+                               return origFn.apply( this, arguments );
+                       };
+                       // Use same guid so caller can remove using origFn
+                       fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+               }
+               return this.each( function() {
+                       jQuery.event.add( this, types, fn, data, selector );
+               });
+       },
+       one: function( types, selector, data, fn ) {
+               return this.on( types, selector, data, fn, 1 );
+       },
+       off: function( types, selector, fn ) {
+               var handleObj, type;
+               if ( types && types.preventDefault && types.handleObj ) {
+                       // ( event )  dispatched jQuery.Event
+                       handleObj = types.handleObj;
+                       jQuery( types.delegateTarget ).off(
+                               handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+                               handleObj.selector,
+                               handleObj.handler
+                       );
+                       return this;
+               }
+               if ( typeof types === "object" ) {
+                       // ( types-object [, selector] )
+                       for ( type in types ) {
+                               this.off( type, selector, types[ type ] );
+                       }
+                       return this;
+               }
+               if ( selector === false || typeof selector === "function" ) {
+                       // ( types [, fn] )
+                       fn = selector;
+                       selector = undefined;
+               }
+               if ( fn === false ) {
+                       fn = returnFalse;
+               }
+               return this.each(function() {
+                       jQuery.event.remove( this, types, fn, selector );
+               });
+       },
+
+       bind: function( types, data, fn ) {
+               return this.on( types, null, data, fn );
+       },
+       unbind: function( types, fn ) {
+               return this.off( types, null, fn );
+       },
+
+       live: function( types, data, fn ) {
+               jQuery( this.context ).on( types, this.selector, data, fn );
+               return this;
+       },
+       die: function( types, fn ) {
+               jQuery( this.context ).off( types, this.selector || "**", fn );
+               return this;
+       },
+
+       delegate: function( selector, types, data, fn ) {
+               return this.on( types, selector, data, fn );
+       },
+       undelegate: function( selector, types, fn ) {
+               // ( namespace ) or ( selector, types [, fn] )
+               return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+       },
+
+       trigger: function( type, data ) {
+               return this.each(function() {
+                       jQuery.event.trigger( type, data, this );
+               });
+       },
+       triggerHandler: function( type, data ) {
+               if ( this[0] ) {
+                       return jQuery.event.trigger( type, data, this[0], true );
+               }
+       },
+
+       toggle: function( fn ) {
+               // Save reference to arguments for access in closure
+               var args = arguments,
+                       guid = fn.guid || jQuery.guid++,
+                       i = 0,
+                       toggler = function( event ) {
+                               // Figure out which function to execute
+                               var lastToggle = ( jQuery._data( this, "lastToggle" + fn.guid ) || 0 ) % i;
+                               jQuery._data( this, "lastToggle" + fn.guid, lastToggle + 1 );
+
+                               // Make sure that clicks stop
+                               event.preventDefault();
+
+                               // and execute the function
+                               return args[ lastToggle ].apply( this, arguments ) || false;
+                       };
+
+               // link all the functions, so any of them can unbind this click handler
+               toggler.guid = guid;
+               while ( i < args.length ) {
+                       args[ i++ ].guid = guid;
+               }
+
+               return this.click( toggler );
+       },
+
+       hover: function( fnOver, fnOut ) {
+               return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+       }
+});
+
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+       "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+       "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+       // Handle event binding
+       jQuery.fn[ name ] = function( data, fn ) {
+               if ( fn == null ) {
+                       fn = data;
+                       data = null;
+               }
+
+               return arguments.length > 0 ?
+                       this.on( name, null, data, fn ) :
+                       this.trigger( name );
+       };
+
+       if ( rkeyEvent.test( name ) ) {
+               jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
+       }
+
+       if ( rmouseEvent.test( name ) ) {
+               jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
+       }
+});
+/*!
+ * Sizzle CSS Selector Engine
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://sizzlejs.com/
+ */
+(function( window, undefined ) {
+
+var cachedruns,
+       assertGetIdNotName,
+       Expr,
+       getText,
+       isXML,
+       contains,
+       compile,
+       sortOrder,
+       hasDuplicate,
+       outermostContext,
+
+       baseHasDuplicate = true,
+       strundefined = "undefined",
+
+       expando = ( "sizcache" + Math.random() ).replace( ".", "" ),
+
+       Token = String,
+       document = window.document,
+       docElem = document.documentElement,
+       dirruns = 0,
+       done = 0,
+       pop = [].pop,
+       push = [].push,
+       slice = [].slice,
+       // Use a stripped-down indexOf if a native one is unavailable
+       indexOf = [].indexOf || function( elem ) {
+               var i = 0,
+                       len = this.length;
+               for ( ; i < len; i++ ) {
+                       if ( this[i] === elem ) {
+                               return i;
+                       }
+               }
+               return -1;
+       },
+
+       // Augment a function for special use by Sizzle
+       markFunction = function( fn, value ) {
+               fn[ expando ] = value == null || value;
+               return fn;
+       },
+
+       createCache = function() {
+               var cache = {},
+                       keys = [];
+
+               return markFunction(function( key, value ) {
+                       // Only keep the most recent entries
+                       if ( keys.push( key ) > Expr.cacheLength ) {
+                               delete cache[ keys.shift() ];
+                       }
+
+                       return (cache[ key ] = value);
+               }, cache );
+       },
+
+       classCache = createCache(),
+       tokenCache = createCache(),
+       compilerCache = createCache(),
+
+       // Regex
+
+       // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+       whitespace = "[\\x20\\t\\r\\n\\f]",
+       // http://www.w3.org/TR/css3-syntax/#characters
+       characterEncoding = "(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",
+
+       // Loosely modeled on CSS identifier characters
+       // An unquoted value should be a CSS identifier (http://www.w3.org/TR/css3-selectors/#attribute-selectors)
+       // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+       identifier = characterEncoding.replace( "w", "w#" ),
+
+       // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+       operators = "([*^$|!~]?=)",
+       attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+               "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
+
+       // Prefer arguments not in parens/brackets,
+       //   then attribute selectors and non-pseudos (denoted by :),
+       //   then anything else
+       // These preferences are here to reduce the number of selectors
+       //   needing tokenize in the PSEUDO preFilter
+       pseudos = ":(" + characterEncoding + ")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:" + attributes + ")|[^:]|\\\\.)*|.*))\\)|)",
+
+       // For matchExpr.POS and matchExpr.needsContext
+       pos = ":(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace +
+               "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)",
+
+       // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+       rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+       rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+       rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
+       rpseudo = new RegExp( pseudos ),
+
+       // Easily-parseable/retrievable ID or TAG or CLASS selectors
+       rquickExpr = /^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,
+
+       rnot = /^:not/,
+       rsibling = /[\x20\t\r\n\f]*[+~]/,
+       rendsWithNot = /:not\($/,
+
+       rheader = /h\d/i,
+       rinputs = /input|select|textarea|button/i,
+
+       rbackslash = /\\(?!\\)/g,
+
+       matchExpr = {
+               "ID": new RegExp( "^#(" + characterEncoding + ")" ),
+               "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+               "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
+               "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+               "ATTR": new RegExp( "^" + attributes ),
+               "PSEUDO": new RegExp( "^" + pseudos ),
+               "POS": new RegExp( pos, "i" ),
+               "CHILD": new RegExp( "^:(only|nth|first|last)-child(?:\\(" + whitespace +
+                       "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+                       "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+               // For use in libraries implementing .is()
+               "needsContext": new RegExp( "^" + whitespace + "*[>+~]|" + pos, "i" )
+       },
+
+       // Support
+
+       // Used for testing something on an element
+       assert = function( fn ) {
+               var div = document.createElement("div");
+
+               try {
+                       return fn( div );
+               } catch (e) {
+                       return false;
+               } finally {
+                       // release memory in IE
+                       div = null;
+               }
+       },
+
+       // Check if getElementsByTagName("*") returns only elements
+       assertTagNameNoComments = assert(function( div ) {
+               div.appendChild( document.createComment("") );
+               return !div.getElementsByTagName("*").length;
+       }),
+
+       // Check if getAttribute returns normalized href attributes
+       assertHrefNotNormalized = assert(function( div ) {
+               div.innerHTML = "<a href='#'></a>";
+               return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
+                       div.firstChild.getAttribute("href") === "#";
+       }),
+
+       // Check if attributes should be retrieved by attribute nodes
+       assertAttributes = assert(function( div ) {
+               div.innerHTML = "<select></select>";
+               var type = typeof div.lastChild.getAttribute("multiple");
+               // IE8 returns a string for some attributes even when not present
+               return type !== "boolean" && type !== "string";
+       }),
+
+       // Check if getElementsByClassName can be trusted
+       assertUsableClassName = assert(function( div ) {
+               // Opera can't find a second classname (in 9.6)
+               div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";
+               if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
+                       return false;
+               }
+
+               // Safari 3.2 caches class attributes and doesn't catch changes
+               div.lastChild.className = "e";
+               return div.getElementsByClassName("e").length === 2;
+       }),
+
+       // Check if getElementById returns elements by name
+       // Check if getElementsByName privileges form controls or returns elements by ID
+       assertUsableName = assert(function( div ) {
+               // Inject content
+               div.id = expando + 0;
+               div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>";
+               docElem.insertBefore( div, docElem.firstChild );
+
+               // Test
+               var pass = document.getElementsByName &&
+                       // buggy browsers will return fewer than the correct 2
+                       document.getElementsByName( expando ).length === 2 +
+                       // buggy browsers will return more than the correct 0
+                       document.getElementsByName( expando + 0 ).length;
+               assertGetIdNotName = !document.getElementById( expando );
+
+               // Cleanup
+               docElem.removeChild( div );
+
+               return pass;
+       });
+
+// If slice is not available, provide a backup
+try {
+       slice.call( docElem.childNodes, 0 )[0].nodeType;
+} catch ( e ) {
+       slice = function( i ) {
+               var elem,
+                       results = [];
+               for ( ; (elem = this[i]); i++ ) {
+                       results.push( elem );
+               }
+               return results;
+       };
+}
+
+function Sizzle( selector, context, results, seed ) {
+       results = results || [];
+       context = context || document;
+       var match, elem, xml, m,
+               nodeType = context.nodeType;
+
+       if ( !selector || typeof selector !== "string" ) {
+               return results;
+       }
+
+       if ( nodeType !== 1 && nodeType !== 9 ) {
+               return [];
+       }
+
+       xml = isXML( context );
+
+       if ( !xml && !seed ) {
+               if ( (match = rquickExpr.exec( selector )) ) {
+                       // Speed-up: Sizzle("#ID")
+                       if ( (m = match[1]) ) {
+                               if ( nodeType === 9 ) {
+                                       elem = context.getElementById( m );
+                                       // Check parentNode to catch when Blackberry 4.6 returns
+                                       // nodes that are no longer in the document #6963
+                                       if ( elem && elem.parentNode ) {
+                                               // Handle the case where IE, Opera, and Webkit return items
+                                               // by name instead of ID
+                                               if ( elem.id === m ) {
+                                                       results.push( elem );
+                                                       return results;
+                                               }
+                                       } else {
+                                               return results;
+                                       }
+                               } else {
+                                       // Context is not a document
+                                       if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+                                               contains( context, elem ) && elem.id === m ) {
+                                               results.push( elem );
+                                               return results;
+                                       }
+                               }
+
+                       // Speed-up: Sizzle("TAG")
+                       } else if ( match[2] ) {
+                               push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );
+                               return results;
+
+                       // Speed-up: Sizzle(".CLASS")
+                       } else if ( (m = match[3]) && assertUsableClassName && context.getElementsByClassName ) {
+                               push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );
+                               return results;
+                       }
+               }
+       }
+
+       // All others
+       return select( selector.replace( rtrim, "$1" ), context, results, seed, xml );
+}
+
+Sizzle.matches = function( expr, elements ) {
+       return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+       return Sizzle( expr, null, null, [ elem ] ).length > 0;
+};
+
+// Returns a function to use in pseudos for input types
+function createInputPseudo( type ) {
+       return function( elem ) {
+               var name = elem.nodeName.toLowerCase();
+               return name === "input" && elem.type === type;
+       };
+}
+
+// Returns a function to use in pseudos for buttons
+function createButtonPseudo( type ) {
+       return function( elem ) {
+               var name = elem.nodeName.toLowerCase();
+               return (name === "input" || name === "button") && elem.type === type;
+       };
+}
+
+// Returns a function to use in pseudos for positionals
+function createPositionalPseudo( fn ) {
+       return markFunction(function( argument ) {
+               argument = +argument;
+               return markFunction(function( seed, matches ) {
+                       var j,
+                               matchIndexes = fn( [], seed.length, argument ),
+                               i = matchIndexes.length;
+
+                       // Match elements found at the specified indexes
+                       while ( i-- ) {
+                               if ( seed[ (j = matchIndexes[i]) ] ) {
+                                       seed[j] = !(matches[j] = seed[j]);
+                               }
+                       }
+               });
+       });
+}
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+       var node,
+               ret = "",
+               i = 0,
+               nodeType = elem.nodeType;
+
+       if ( nodeType ) {
+               if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+                       // Use textContent for elements
+                       // innerText usage removed for consistency of new lines (see #11153)
+                       if ( typeof elem.textContent === "string" ) {
+                               return elem.textContent;
+                       } else {
+                               // Traverse its children
+                               for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+                                       ret += getText( elem );
+                               }
+                       }
+               } else if ( nodeType === 3 || nodeType === 4 ) {
+                       return elem.nodeValue;
+               }
+               // Do not include comment or processing instruction nodes
+       } else {
+
+               // If no nodeType, this is expected to be an array
+               for ( ; (node = elem[i]); i++ ) {
+                       // Do not traverse comment nodes
+                       ret += getText( node );
+               }
+       }
+       return ret;
+};
+
+isXML = Sizzle.isXML = function( elem ) {
+       // documentElement is verified for cases where it doesn't yet exist
+       // (such as loading iframes in IE - #4833)
+       var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+       return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+// Element contains another
+contains = Sizzle.contains = docElem.contains ?
+       function( a, b ) {
+               var adown = a.nodeType === 9 ? a.documentElement : a,
+                       bup = b && b.parentNode;
+               return a === bup || !!( bup && bup.nodeType === 1 && adown.contains && adown.contains(bup) );
+       } :
+       docElem.compareDocumentPosition ?
+       function( a, b ) {
+               return b && !!( a.compareDocumentPosition( b ) & 16 );
+       } :
+       function( a, b ) {
+               while ( (b = b.parentNode) ) {
+                       if ( b === a ) {
+                               return true;
+                       }
+               }
+               return false;
+       };
+
+Sizzle.attr = function( elem, name ) {
+       var val,
+               xml = isXML( elem );
+
+       if ( !xml ) {
+               name = name.toLowerCase();
+       }
+       if ( (val = Expr.attrHandle[ name ]) ) {
+               return val( elem );
+       }
+       if ( xml || assertAttributes ) {
+               return elem.getAttribute( name );
+       }
+       val = elem.getAttributeNode( name );
+       return val ?
+               typeof elem[ name ] === "boolean" ?
+                       elem[ name ] ? name : null :
+                       val.specified ? val.value : null :
+               null;
+};
+
+Expr = Sizzle.selectors = {
+
+       // Can be adjusted by the user
+       cacheLength: 50,
+
+       createPseudo: markFunction,
+
+       match: matchExpr,
+
+       // IE6/7 return a modified href
+       attrHandle: assertHrefNotNormalized ?
+               {} :
+               {
+                       "href": function( elem ) {
+                               return elem.getAttribute( "href", 2 );
+                       },
+                       "type": function( elem ) {
+                               return elem.getAttribute("type");
+                       }
+               },
+
+       find: {
+               "ID": assertGetIdNotName ?
+                       function( id, context, xml ) {
+                               if ( typeof context.getElementById !== strundefined && !xml ) {
+                                       var m = context.getElementById( id );
+                                       // Check parentNode to catch when Blackberry 4.6 returns
+                                       // nodes that are no longer in the document #6963
+                                       return m && m.parentNode ? [m] : [];
+                               }
+                       } :
+                       function( id, context, xml ) {
+                               if ( typeof context.getElementById !== strundefined && !xml ) {
+                                       var m = context.getElementById( id );
+
+                                       return m ?
+                                               m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
+                                                       [m] :
+                                                       undefined :
+                                               [];
+                               }
+                       },
+
+               "TAG": assertTagNameNoComments ?
+                       function( tag, context ) {
+                               if ( typeof context.getElementsByTagName !== strundefined ) {
+                                       return context.getElementsByTagName( tag );
+                               }
+                       } :
+                       function( tag, context ) {
+                               var results = context.getElementsByTagName( tag );
+
+                               // Filter out possible comments
+                               if ( tag === "*" ) {
+                                       var elem,
+                                               tmp = [],
+                                               i = 0;
+
+                                       for ( ; (elem = results[i]); i++ ) {
+                                               if ( elem.nodeType === 1 ) {
+                                                       tmp.push( elem );
+                                               }
+                                       }
+
+                                       return tmp;
+                               }
+                               return results;
+                       },
+
+               "NAME": assertUsableName && function( tag, context ) {
+                       if ( typeof context.getElementsByName !== strundefined ) {
+                               return context.getElementsByName( name );
+                       }
+               },
+
+               "CLASS": assertUsableClassName && function( className, context, xml ) {
+                       if ( typeof context.getElementsByClassName !== strundefined && !xml ) {
+                               return context.getElementsByClassName( className );
+                       }
+               }
+       },
+
+       relative: {
+               ">": { dir: "parentNode", first: true },
+               " ": { dir: "parentNode" },
+               "+": { dir: "previousSibling", first: true },
+               "~": { dir: "previousSibling" }
+       },
+
+       preFilter: {
+               "ATTR": function( match ) {
+                       match[1] = match[1].replace( rbackslash, "" );
+
+                       // Move the given value to match[3] whether quoted or unquoted
+                       match[3] = ( match[4] || match[5] || "" ).replace( rbackslash, "" );
+
+                       if ( match[2] === "~=" ) {
+                               match[3] = " " + match[3] + " ";
+                       }
+
+                       return match.slice( 0, 4 );
+               },
+
+               "CHILD": function( match ) {
+                       /* matches from matchExpr["CHILD"]
+                               1 type (only|nth|...)
+                               2 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+                               3 xn-component of xn+y argument ([+-]?\d*n|)
+                               4 sign of xn-component
+                               5 x of xn-component
+                               6 sign of y-component
+                               7 y of y-component
+                       */
+                       match[1] = match[1].toLowerCase();
+
+                       if ( match[1] === "nth" ) {
+                               // nth-child requires argument
+                               if ( !match[2] ) {
+                                       Sizzle.error( match[0] );
+                               }
+
+                               // numeric x and y parameters for Expr.filter.CHILD
+                               // remember that false/true cast respectively to 0/1
+                               match[3] = +( match[3] ? match[4] + (match[5] || 1) : 2 * ( match[2] === "even" || match[2] === "odd" ) );
+                               match[4] = +( ( match[6] + match[7] ) || match[2] === "odd" );
+
+                       // other types prohibit arguments
+                       } else if ( match[2] ) {
+                               Sizzle.error( match[0] );
+                       }
+
+                       return match;
+               },
+
+               "PSEUDO": function( match ) {
+                       var unquoted, excess;
+                       if ( matchExpr["CHILD"].test( match[0] ) ) {
+                               return null;
+                       }
+
+                       if ( match[3] ) {
+                               match[2] = match[3];
+                       } else if ( (unquoted = match[4]) ) {
+                               // Only check arguments that contain a pseudo
+                               if ( rpseudo.test(unquoted) &&
+                                       // Get excess from tokenize (recursively)
+                                       (excess = tokenize( unquoted, true )) &&
+                                       // advance to the next closing parenthesis
+                                       (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+                                       // excess is a negative index
+                                       unquoted = unquoted.slice( 0, excess );
+                                       match[0] = match[0].slice( 0, excess );
+                               }
+                               match[2] = unquoted;
+                       }
+
+                       // Return only captures needed by the pseudo filter method (type and argument)
+                       return match.slice( 0, 3 );
+               }
+       },
+
+       filter: {
+               "ID": assertGetIdNotName ?
+                       function( id ) {
+                               id = id.replace( rbackslash, "" );
+                               return function( elem ) {
+                                       return elem.getAttribute("id") === id;
+                               };
+                       } :
+                       function( id ) {
+                               id = id.replace( rbackslash, "" );
+                               return function( elem ) {
+                                       var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+                                       return node && node.value === id;
+                               };
+                       },
+
+               "TAG": function( nodeName ) {
+                       if ( nodeName === "*" ) {
+                               return function() { return true; };
+                       }
+                       nodeName = nodeName.replace( rbackslash, "" ).toLowerCase();
+
+                       return function( elem ) {
+                               return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+                       };
+               },
+
+               "CLASS": function( className ) {
+                       var pattern = classCache[ expando ][ className ];
+                       if ( !pattern ) {
+                               pattern = classCache( className, new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)") );
+                       }
+                       return function( elem ) {
+                               return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
+                       };
+               },
+
+               "ATTR": function( name, operator, check ) {
+                       return function( elem, context ) {
+                               var result = Sizzle.attr( elem, name );
+
+                               if ( result == null ) {
+                                       return operator === "!=";
+                               }
+                               if ( !operator ) {
+                                       return true;
+                               }
+
+                               result += "";
+
+                               return operator === "=" ? result === check :
+                                       operator === "!=" ? result !== check :
+                                       operator === "^=" ? check && result.indexOf( check ) === 0 :
+                                       operator === "*=" ? check && result.indexOf( check ) > -1 :
+                                       operator === "$=" ? check && result.substr( result.length - check.length ) === check :
+                                       operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+                                       operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" :
+                                       false;
+                       };
+               },
+
+               "CHILD": function( type, argument, first, last ) {
+
+                       if ( type === "nth" ) {
+                               return function( elem ) {
+                                       var node, diff,
+                                               parent = elem.parentNode;
+
+                                       if ( first === 1 && last === 0 ) {
+                                               return true;
+                                       }
+
+                                       if ( parent ) {
+                                               diff = 0;
+                                               for ( node = parent.firstChild; node; node = node.nextSibling ) {
+                                                       if ( node.nodeType === 1 ) {
+                                                               diff++;
+                                                               if ( elem === node ) {
+                                                                       break;
+                                                               }
+                                                       }
+                                               }
+                                       }
+
+                                       // Incorporate the offset (or cast to NaN), then check against cycle size
+                                       diff -= last;
+                                       return diff === first || ( diff % first === 0 && diff / first >= 0 );
+                               };
+                       }
+
+                       return function( elem ) {
+                               var node = elem;
+
+                               switch ( type ) {
+                                       case "only":
+                                       case "first":
+                                               while ( (node = node.previousSibling) ) {
+                                                       if ( node.nodeType === 1 ) {
+                                                               return false;
+                                                       }
+                                               }
+
+                                               if ( type === "first" ) {
+                                                       return true;
+                                               }
+
+                                               node = elem;
+
+                                               /* falls through */
+                                       case "last":
+                                               while ( (node = node.nextSibling) ) {
+                                                       if ( node.nodeType === 1 ) {
+                                                               return false;
+                                                       }
+                                               }
+
+                                               return true;
+                               }
+                       };
+               },
+
+               "PSEUDO": function( pseudo, argument ) {
+                       // pseudo-class names are case-insensitive
+                       // http://www.w3.org/TR/selectors/#pseudo-classes
+                       // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+                       // Remember that setFilters inherits from pseudos
+                       var args,
+                               fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+                                       Sizzle.error( "unsupported pseudo: " + pseudo );
+
+                       // The user may use createPseudo to indicate that
+                       // arguments are needed to create the filter function
+                       // just as Sizzle does
+                       if ( fn[ expando ] ) {
+                               return fn( argument );
+                       }
+
+                       // But maintain support for old signatures
+                       if ( fn.length > 1 ) {
+                               args = [ pseudo, pseudo, "", argument ];
+                               return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+                                       markFunction(function( seed, matches ) {
+                                               var idx,
+                                                       matched = fn( seed, argument ),
+                                                       i = matched.length;
+                                               while ( i-- ) {
+                                                       idx = indexOf.call( seed, matched[i] );
+                                                       seed[ idx ] = !( matches[ idx ] = matched[i] );
+                                               }
+                                       }) :
+                                       function( elem ) {
+                                               return fn( elem, 0, args );
+                                       };
+                       }
+
+                       return fn;
+               }
+       },
+
+       pseudos: {
+               "not": markFunction(function( selector ) {
+                       // Trim the selector passed to compile
+                       // to avoid treating leading and trailing
+                       // spaces as combinators
+                       var input = [],
+                               results = [],
+                               matcher = compile( selector.replace( rtrim, "$1" ) );
+
+                       return matcher[ expando ] ?
+                               markFunction(function( seed, matches, context, xml ) {
+                                       var elem,
+                                               unmatched = matcher( seed, null, xml, [] ),
+                                               i = seed.length;
+
+                                       // Match elements unmatched by `matcher`
+                                       while ( i-- ) {
+                                               if ( (elem = unmatched[i]) ) {
+                                                       seed[i] = !(matches[i] = elem);
+                                               }
+                                       }
+                               }) :
+                               function( elem, context, xml ) {
+                                       input[0] = elem;
+                                       matcher( input, null, xml, results );
+                                       return !results.pop();
+                               };
+               }),
+
+               "has": markFunction(function( selector ) {
+                       return function( elem ) {
+                               return Sizzle( selector, elem ).length > 0;
+                       };
+               }),
+
+               "contains": markFunction(function( text ) {
+                       return function( elem ) {
+                               return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+                       };
+               }),
+
+               "enabled": function( elem ) {
+                       return elem.disabled === false;
+               },
+
+               "disabled": function( elem ) {
+                       return elem.disabled === true;
+               },
+
+               "checked": function( elem ) {
+                       // In CSS3, :checked should return both checked and selected elements
+                       // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+                       var nodeName = elem.nodeName.toLowerCase();
+                       return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+               },
+
+               "selected": function( elem ) {
+                       // Accessing this property makes selected-by-default
+                       // options in Safari work properly
+                       if ( elem.parentNode ) {
+                               elem.parentNode.selectedIndex;
+                       }
+
+                       return elem.selected === true;
+               },
+
+               "parent": function( elem ) {
+                       return !Expr.pseudos["empty"]( elem );
+               },
+
+               "empty": function( elem ) {
+                       // http://www.w3.org/TR/selectors/#empty-pseudo
+                       // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+                       //   not comment, processing instructions, or others
+                       // Thanks to Diego Perini for the nodeName shortcut
+                       //   Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+                       var nodeType;
+                       elem = elem.firstChild;
+                       while ( elem ) {
+                               if ( elem.nodeName > "@" || (nodeType = elem.nodeType) === 3 || nodeType === 4 ) {
+                                       return false;
+                               }
+                               elem = elem.nextSibling;
+                       }
+                       return true;
+               },
+
+               "header": function( elem ) {
+                       return rheader.test( elem.nodeName );
+               },
+
+               "text": function( elem ) {
+                       var type, attr;
+                       // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+                       // use getAttribute instead to test this case
+                       return elem.nodeName.toLowerCase() === "input" &&
+                               (type = elem.type) === "text" &&
+                               ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === type );
+               },
+
+               // Input types
+               "radio": createInputPseudo("radio"),
+               "checkbox": createInputPseudo("checkbox"),
+               "file": createInputPseudo("file"),
+               "password": createInputPseudo("password"),
+               "image": createInputPseudo("image"),
+
+               "submit": createButtonPseudo("submit"),
+               "reset": createButtonPseudo("reset"),
+
+               "button": function( elem ) {
+                       var name = elem.nodeName.toLowerCase();
+                       return name === "input" && elem.type === "button" || name === "button";
+               },
+
+               "input": function( elem ) {
+                       return rinputs.test( elem.nodeName );
+               },
+
+               "focus": function( elem ) {
+                       var doc = elem.ownerDocument;
+                       return elem === doc.activeElement && (!doc.hasFocus || doc.hasFocus()) && !!(elem.type || elem.href);
+               },
+
+               "active": function( elem ) {
+                       return elem === elem.ownerDocument.activeElement;
+               },
+
+               // Positional types
+               "first": createPositionalPseudo(function( matchIndexes, length, argument ) {
+                       return [ 0 ];
+               }),
+
+               "last": createPositionalPseudo(function( matchIndexes, length, argument ) {
+                       return [ length - 1 ];
+               }),
+
+               "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+                       return [ argument < 0 ? argument + length : argument ];
+               }),
+
+               "even": createPositionalPseudo(function( matchIndexes, length, argument ) {
+                       for ( var i = 0; i < length; i += 2 ) {
+                               matchIndexes.push( i );
+                       }
+                       return matchIndexes;
+               }),
+
+               "odd": createPositionalPseudo(function( matchIndexes, length, argument ) {
+                       for ( var i = 1; i < length; i += 2 ) {
+                               matchIndexes.push( i );
+                       }
+                       return matchIndexes;
+               }),
+
+               "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+                       for ( var i = argument < 0 ? argument + length : argument; --i >= 0; ) {
+                               matchIndexes.push( i );
+                       }
+                       return matchIndexes;
+               }),
+
+               "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+                       for ( var i = argument < 0 ? argument + length : argument; ++i < length; ) {
+                               matchIndexes.push( i );
+                       }
+                       return matchIndexes;
+               })
+       }
+};
+
+function siblingCheck( a, b, ret ) {
+       if ( a === b ) {
+               return ret;
+       }
+
+       var cur = a.nextSibling;
+
+       while ( cur ) {
+               if ( cur === b ) {
+                       return -1;
+               }
+
+               cur = cur.nextSibling;
+       }
+
+       return 1;
+}
+
+sortOrder = docElem.compareDocumentPosition ?
+       function( a, b ) {
+               if ( a === b ) {
+                       hasDuplicate = true;
+                       return 0;
+               }
+
+               return ( !a.compareDocumentPosition || !b.compareDocumentPosition ?
+                       a.compareDocumentPosition :
+                       a.compareDocumentPosition(b) & 4
+               ) ? -1 : 1;
+       } :
+       function( a, b ) {
+               // The nodes are identical, we can exit early
+               if ( a === b ) {
+                       hasDuplicate = true;
+                       return 0;
+
+               // Fallback to using sourceIndex (in IE) if it's available on both nodes
+               } else if ( a.sourceIndex && b.sourceIndex ) {
+                       return a.sourceIndex - b.sourceIndex;
+               }
+
+               var al, bl,
+                       ap = [],
+                       bp = [],
+                       aup = a.parentNode,
+                       bup = b.parentNode,
+                       cur = aup;
+
+               // If the nodes are siblings (or identical) we can do a quick check
+               if ( aup === bup ) {
+                       return siblingCheck( a, b );
+
+               // If no parents were found then the nodes are disconnected
+               } else if ( !aup ) {
+                       return -1;
+
+               } else if ( !bup ) {
+                       return 1;
+               }
+
+               // Otherwise they're somewhere else in the tree so we need
+               // to build up a full list of the parentNodes for comparison
+               while ( cur ) {
+                       ap.unshift( cur );
+                       cur = cur.parentNode;
+               }
+
+               cur = bup;
+
+               while ( cur ) {
+                       bp.unshift( cur );
+                       cur = cur.parentNode;
+               }
+
+               al = ap.length;
+               bl = bp.length;
+
+               // Start walking down the tree looking for a discrepancy
+               for ( var i = 0; i < al && i < bl; i++ ) {
+                       if ( ap[i] !== bp[i] ) {
+                               return siblingCheck( ap[i], bp[i] );
+                       }
+               }
+
+               // We ended someplace up the tree so do a sibling check
+               return i === al ?
+                       siblingCheck( a, bp[i], -1 ) :
+                       siblingCheck( ap[i], b, 1 );
+       };
+
+// Always assume the presence of duplicates if sort doesn't
+// pass them to our comparison function (as in Google Chrome).
+[0, 0].sort( sortOrder );
+baseHasDuplicate = !hasDuplicate;
+
+// Document sorting and removing duplicates
+Sizzle.uniqueSort = function( results ) {
+       var elem,
+               i = 1;
+
+       hasDuplicate = baseHasDuplicate;
+       results.sort( sortOrder );
+
+       if ( hasDuplicate ) {
+               for ( ; (elem = results[i]); i++ ) {
+                       if ( elem === results[ i - 1 ] ) {
+                               results.splice( i--, 1 );
+                       }
+               }
+       }
+
+       return results;
+};
+
+Sizzle.error = function( msg ) {
+       throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+function tokenize( selector, parseOnly ) {
+       var matched, match, tokens, type, soFar, groups, preFilters,
+               cached = tokenCache[ expando ][ selector ];
+
+       if ( cached ) {
+               return parseOnly ? 0 : cached.slice( 0 );
+       }
+
+       soFar = selector;
+       groups = [];
+       preFilters = Expr.preFilter;
+
+       while ( soFar ) {
+
+               // Comma and first run
+               if ( !matched || (match = rcomma.exec( soFar )) ) {
+                       if ( match ) {
+                               soFar = soFar.slice( match[0].length );
+                       }
+                       groups.push( tokens = [] );
+               }
+
+               matched = false;
+
+               // Combinators
+               if ( (match = rcombinators.exec( soFar )) ) {
+                       tokens.push( matched = new Token( match.shift() ) );
+                       soFar = soFar.slice( matched.length );
+
+                       // Cast descendant combinators to space
+                       matched.type = match[0].replace( rtrim, " " );
+               }
+
+               // Filters
+               for ( type in Expr.filter ) {
+                       if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+                               // The last two arguments here are (context, xml) for backCompat
+                               (match = preFilters[ type ]( match, document, true ))) ) {
+
+                               tokens.push( matched = new Token( match.shift() ) );
+                               soFar = soFar.slice( matched.length );
+                               matched.type = type;
+                               matched.matches = match;
+                       }
+               }
+
+               if ( !matched ) {
+                       break;
+               }
+       }
+
+       // Return the length of the invalid excess
+       // if we're just parsing
+       // Otherwise, throw an error or return tokens
+       return parseOnly ?
+               soFar.length :
+               soFar ?
+                       Sizzle.error( selector ) :
+                       // Cache the tokens
+                       tokenCache( selector, groups ).slice( 0 );
+}
+
+function addCombinator( matcher, combinator, base ) {
+       var dir = combinator.dir,
+               checkNonElements = base && combinator.dir === "parentNode",
+               doneName = done++;
+
+       return combinator.first ?
+               // Check against closest ancestor/preceding element
+               function( elem, context, xml ) {
+                       while ( (elem = elem[ dir ]) ) {
+                               if ( checkNonElements || elem.nodeType === 1  ) {
+                                       return matcher( elem, context, xml );
+                               }
+                       }
+               } :
+
+               // Check against all ancestor/preceding elements
+               function( elem, context, xml ) {
+                       // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+                       if ( !xml ) {
+                               var cache,
+                                       dirkey = dirruns + " " + doneName + " ",
+                                       cachedkey = dirkey + cachedruns;
+                               while ( (elem = elem[ dir ]) ) {
+                                       if ( checkNonElements || elem.nodeType === 1 ) {
+                                               if ( (cache = elem[ expando ]) === cachedkey ) {
+                                                       return elem.sizset;
+                                               } else if ( typeof cache === "string" && cache.indexOf(dirkey) === 0 ) {
+                                                       if ( elem.sizset ) {
+                                                               return elem;
+                                                       }
+                                               } else {
+                                                       elem[ expando ] = cachedkey;
+                                                       if ( matcher( elem, context, xml ) ) {
+                                                               elem.sizset = true;
+                                                               return elem;
+                                                       }
+                                                       elem.sizset = false;
+                                               }
+                                       }
+                               }
+                       } else {
+                               while ( (elem = elem[ dir ]) ) {
+                                       if ( checkNonElements || elem.nodeType === 1 ) {
+                                               if ( matcher( elem, context, xml ) ) {
+                                                       return elem;
+                                               }
+                                       }
+                               }
+                       }
+               };
+}
+
+function elementMatcher( matchers ) {
+       return matchers.length > 1 ?
+               function( elem, context, xml ) {
+                       var i = matchers.length;
+                       while ( i-- ) {
+                               if ( !matchers[i]( elem, context, xml ) ) {
+                                       return false;
+                               }
+                       }
+                       return true;
+               } :
+               matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+       var elem,
+               newUnmatched = [],
+               i = 0,
+               len = unmatched.length,
+               mapped = map != null;
+
+       for ( ; i < len; i++ ) {
+               if ( (elem = unmatched[i]) ) {
+                       if ( !filter || filter( elem, context, xml ) ) {
+                               newUnmatched.push( elem );
+                               if ( mapped ) {
+                                       map.push( i );
+                               }
+                       }
+               }
+       }
+
+       return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+       if ( postFilter && !postFilter[ expando ] ) {
+               postFilter = setMatcher( postFilter );
+       }
+       if ( postFinder && !postFinder[ expando ] ) {
+               postFinder = setMatcher( postFinder, postSelector );
+       }
+       return markFunction(function( seed, results, context, xml ) {
+               // Positional selectors apply to seed elements, so it is invalid to follow them with relative ones
+               if ( seed && postFinder ) {
+                       return;
+               }
+
+               var i, elem, postFilterIn,
+                       preMap = [],
+                       postMap = [],
+                       preexisting = results.length,
+
+                       // Get initial elements from seed or context
+                       elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [], seed ),
+
+                       // Prefilter to get matcher input, preserving a map for seed-results synchronization
+                       matcherIn = preFilter && ( seed || !selector ) ?
+                               condense( elems, preMap, preFilter, context, xml ) :
+                               elems,
+
+                       matcherOut = matcher ?
+                               // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+                               postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+                                       // ...intermediate processing is necessary
+                                       [] :
+
+                                       // ...otherwise use results directly
+                                       results :
+                               matcherIn;
+
+               // Find primary matches
+               if ( matcher ) {
+                       matcher( matcherIn, matcherOut, context, xml );
+               }
+
+               // Apply postFilter
+               if ( postFilter ) {
+                       postFilterIn = condense( matcherOut, postMap );
+                       postFilter( postFilterIn, [], context, xml );
+
+                       // Un-match failing elements by moving them back to matcherIn
+                       i = postFilterIn.length;
+                       while ( i-- ) {
+                               if ( (elem = postFilterIn[i]) ) {
+                                       matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+                               }
+                       }
+               }
+
+               // Keep seed and results synchronized
+               if ( seed ) {
+                       // Ignore postFinder because it can't coexist with seed
+                       i = preFilter && matcherOut.length;
+                       while ( i-- ) {
+                               if ( (elem = matcherOut[i]) ) {
+                                       seed[ preMap[i] ] = !(results[ preMap[i] ] = elem);
+                               }
+                       }
+               } else {
+                       matcherOut = condense(
+                               matcherOut === results ?
+                                       matcherOut.splice( preexisting, matcherOut.length ) :
+                                       matcherOut
+                       );
+                       if ( postFinder ) {
+                               postFinder( null, results, matcherOut, xml );
+                       } else {
+                               push.apply( results, matcherOut );
+                       }
+               }
+       });
+}
+
+function matcherFromTokens( tokens ) {
+       var checkContext, matcher, j,
+               len = tokens.length,
+               leadingRelative = Expr.relative[ tokens[0].type ],
+               implicitRelative = leadingRelative || Expr.relative[" "],
+               i = leadingRelative ? 1 : 0,
+
+               // The foundational matcher ensures that elements are reachable from top-level context(s)
+               matchContext = addCombinator( function( elem ) {
+                       return elem === checkContext;
+               }, implicitRelative, true ),
+               matchAnyContext = addCombinator( function( elem ) {
+                       return indexOf.call( checkContext, elem ) > -1;
+               }, implicitRelative, true ),
+               matchers = [ function( elem, context, xml ) {
+                       return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+                               (checkContext = context).nodeType ?
+                                       matchContext( elem, context, xml ) :
+                                       matchAnyContext( elem, context, xml ) );
+               } ];
+
+       for ( ; i < len; i++ ) {
+               if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+                       matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ];
+               } else {
+                       // The concatenated values are (context, xml) for backCompat
+                       matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+                       // Return special upon seeing a positional matcher
+                       if ( matcher[ expando ] ) {
+                               // Find the next relative operator (if any) for proper handling
+                               j = ++i;
+                               for ( ; j < len; j++ ) {
+                                       if ( Expr.relative[ tokens[j].type ] ) {
+                                               break;
+                                       }
+                               }
+                               return setMatcher(
+                                       i > 1 && elementMatcher( matchers ),
+                                       i > 1 && tokens.slice( 0, i - 1 ).join("").replace( rtrim, "$1" ),
+                                       matcher,
+                                       i < j && matcherFromTokens( tokens.slice( i, j ) ),
+                                       j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+                                       j < len && tokens.join("")
+                               );
+                       }
+                       matchers.push( matcher );
+               }
+       }
+
+       return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+       var bySet = setMatchers.length > 0,
+               byElement = elementMatchers.length > 0,
+               superMatcher = function( seed, context, xml, results, expandContext ) {
+                       var elem, j, matcher,
+                               setMatched = [],
+                               matchedCount = 0,
+                               i = "0",
+                               unmatched = seed && [],
+                               outermost = expandContext != null,
+                               contextBackup = outermostContext,
+                               // We must always have either seed elements or context
+                               elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+                               // Nested matchers should use non-integer dirruns
+                               dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E);
+
+                       if ( outermost ) {
+                               outermostContext = context !== document && context;
+                               cachedruns = superMatcher.el;
+                       }
+
+                       // Add elements passing elementMatchers directly to results
+                       for ( ; (elem = elems[i]) != null; i++ ) {
+                               if ( byElement && elem ) {
+                                       for ( j = 0; (matcher = elementMatchers[j]); j++ ) {
+                                               if ( matcher( elem, context, xml ) ) {
+                                                       results.push( elem );
+                                                       break;
+                                               }
+                                       }
+                                       if ( outermost ) {
+                                               dirruns = dirrunsUnique;
+                                               cachedruns = ++superMatcher.el;
+                                       }
+                               }
+
+                               // Track unmatched elements for set filters
+                               if ( bySet ) {
+                                       // They will have gone through all possible matchers
+                                       if ( (elem = !matcher && elem) ) {
+                                               matchedCount--;
+                                       }
+
+                                       // Lengthen the array for every element, matched or not
+                                       if ( seed ) {
+                                               unmatched.push( elem );
+                                       }
+                               }
+                       }
+
+                       // Apply set filters to unmatched elements
+                       matchedCount += i;
+                       if ( bySet && i !== matchedCount ) {
+                               for ( j = 0; (matcher = setMatchers[j]); j++ ) {
+                                       matcher( unmatched, setMatched, context, xml );
+                               }
+
+                               if ( seed ) {
+                                       // Reintegrate element matches to eliminate the need for sorting
+                                       if ( matchedCount > 0 ) {
+                                               while ( i-- ) {
+                                                       if ( !(unmatched[i] || setMatched[i]) ) {
+                                                               setMatched[i] = pop.call( results );
+                                                       }
+                                               }
+                                       }
+
+                                       // Discard index placeholder values to get only actual matches
+                                       setMatched = condense( setMatched );
+                               }
+
+                               // Add matches to results
+                               push.apply( results, setMatched );
+
+                               // Seedless set matches succeeding multiple successful matchers stipulate sorting
+                               if ( outermost && !seed && setMatched.length > 0 &&
+                                       ( matchedCount + setMatchers.length ) > 1 ) {
+
+                                       Sizzle.uniqueSort( results );
+                               }
+                       }
+
+                       // Override manipulation of globals by nested matchers
+                       if ( outermost ) {
+                               dirruns = dirrunsUnique;
+                               outermostContext = contextBackup;
+                       }
+
+                       return unmatched;
+               };
+
+       superMatcher.el = 0;
+       return bySet ?
+               markFunction( superMatcher ) :
+               superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+       var i,
+               setMatchers = [],
+               elementMatchers = [],
+               cached = compilerCache[ expando ][ selector ];
+
+       if ( !cached ) {
+               // Generate a function of recursive functions that can be used to check each element
+               if ( !group ) {
+                       group = tokenize( selector );
+               }
+               i = group.length;
+               while ( i-- ) {
+                       cached = matcherFromTokens( group[i] );
+                       if ( cached[ expando ] ) {
+                               setMatchers.push( cached );
+                       } else {
+                               elementMatchers.push( cached );
+                       }
+               }
+
+               // Cache the compiled function
+               cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+       }
+       return cached;
+};
+
+function multipleContexts( selector, contexts, results, seed ) {
+       var i = 0,
+               len = contexts.length;
+       for ( ; i < len; i++ ) {
+               Sizzle( selector, contexts[i], results, seed );
+       }
+       return results;
+}
+
+function select( selector, context, results, seed, xml ) {
+       var i, tokens, token, type, find,
+               match = tokenize( selector ),
+               j = match.length;
+
+       if ( !seed ) {
+               // Try to minimize operations if there is only one group
+               if ( match.length === 1 ) {
+
+                       // Take a shortcut and set the context if the root selector is an ID
+                       tokens = match[0] = match[0].slice( 0 );
+                       if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+                                       context.nodeType === 9 && !xml &&
+                                       Expr.relative[ tokens[1].type ] ) {
+
+                               context = Expr.find["ID"]( token.matches[0].replace( rbackslash, "" ), context, xml )[0];
+                               if ( !context ) {
+                                       return results;
+                               }
+
+                               selector = selector.slice( tokens.shift().length );
+                       }
+
+                       // Fetch a seed set for right-to-left matching
+                       for ( i = matchExpr["POS"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) {
+                               token = tokens[i];
+
+                               // Abort if we hit a combinator
+                               if ( Expr.relative[ (type = token.type) ] ) {
+                                       break;
+                               }
+                               if ( (find = Expr.find[ type ]) ) {
+                                       // Search, expanding context for leading sibling combinators
+                                       if ( (seed = find(
+                                               token.matches[0].replace( rbackslash, "" ),
+                                               rsibling.test( tokens[0].type ) && context.parentNode || context,
+                                               xml
+                                       )) ) {
+
+                                               // If seed is empty or no tokens remain, we can return early
+                                               tokens.splice( i, 1 );
+                                               selector = seed.length && tokens.join("");
+                                               if ( !selector ) {
+                                                       push.apply( results, slice.call( seed, 0 ) );
+                                                       return results;
+                                               }
+
+                                               break;
+                                       }
+                               }
+                       }
+               }
+       }
+
+       // Compile and execute a filtering function
+       // Provide `match` to avoid retokenization if we modified the selector above
+       compile( selector, match )(
+               seed,
+               context,
+               xml,
+               results,
+               rsibling.test( selector )
+       );
+       return results;
+}
+
+if ( document.querySelectorAll ) {
+       (function() {
+               var disconnectedMatch,
+                       oldSelect = select,
+                       rescape = /'|\\/g,
+                       rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
+
+                       // qSa(:focus) reports false when true (Chrome 21),
+                       // A support test would require too much code (would include document ready)
+                       rbuggyQSA = [":focus"],
+
+                       // matchesSelector(:focus) reports false when true (Chrome 21),
+                       // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+                       // A support test would require too much code (would include document ready)
+                       // just skip matchesSelector for :active
+                       rbuggyMatches = [ ":active", ":focus" ],
+                       matches = docElem.matchesSelector ||
+                               docElem.mozMatchesSelector ||
+                               docElem.webkitMatchesSelector ||
+                               docElem.oMatchesSelector ||
+                               docElem.msMatchesSelector;
+
+               // Build QSA regex
+               // Regex strategy adopted from Diego Perini
+               assert(function( div ) {
+                       // Select is set to empty string on purpose
+                       // This is to test IE's treatment of not explictly
+                       // setting a boolean content attribute,
+                       // since its presence should be enough
+                       // http://bugs.jquery.com/ticket/12359
+                       div.innerHTML = "<select><option selected=''></option></select>";
+
+                       // IE8 - Some boolean attributes are not treated correctly
+                       if ( !div.querySelectorAll("[selected]").length ) {
+                               rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
+                       }
+
+                       // Webkit/Opera - :checked should return selected option elements
+                       // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+                       // IE8 throws error here (do not put tests after this one)
+                       if ( !div.querySelectorAll(":checked").length ) {
+                               rbuggyQSA.push(":checked");
+                       }
+               });
+
+               assert(function( div ) {
+
+                       // Opera 10-12/IE9 - ^= $= *= and empty values
+                       // Should not select anything
+                       div.innerHTML = "<p test=''></p>";
+                       if ( div.querySelectorAll("[test^='']").length ) {
+                               rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
+                       }
+
+                       // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+                       // IE8 throws error here (do not put tests after this one)
+                       div.innerHTML = "<input type='hidden'/>";
+                       if ( !div.querySelectorAll(":enabled").length ) {
+                               rbuggyQSA.push(":enabled", ":disabled");
+                       }
+               });
+
+               // rbuggyQSA always contains :focus, so no need for a length check
+               rbuggyQSA = /* rbuggyQSA.length && */ new RegExp( rbuggyQSA.join("|") );
+
+               select = function( selector, context, results, seed, xml ) {
+                       // Only use querySelectorAll when not filtering,
+                       // when this is not xml,
+                       // and when no QSA bugs apply
+                       if ( !seed && !xml && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+                               var groups, i,
+                                       old = true,
+                                       nid = expando,
+                                       newContext = context,
+                                       newSelector = context.nodeType === 9 && selector;
+
+                               // qSA works strangely on Element-rooted queries
+                               // We can work around this by specifying an extra ID on the root
+                               // and working up from there (Thanks to Andrew Dupont for the technique)
+                               // IE 8 doesn't work on object elements
+                               if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+                                       groups = tokenize( selector );
+
+                                       if ( (old = context.getAttribute("id")) ) {
+                                               nid = old.replace( rescape, "\\$&" );
+                                       } else {
+                                               context.setAttribute( "id", nid );
+                                       }
+                                       nid = "[id='" + nid + "'] ";
+
+                                       i = groups.length;
+                                       while ( i-- ) {
+                                               groups[i] = nid + groups[i].join("");
+                                       }
+                                       newContext = rsibling.test( selector ) && context.parentNode || context;
+                                       newSelector = groups.join(",");
+                               }
+
+                               if ( newSelector ) {
+                                       try {
+                                               push.apply( results, slice.call( newContext.querySelectorAll(
+                                                       newSelector
+                                               ), 0 ) );
+                                               return results;
+                                       } catch(qsaError) {
+                                       } finally {
+                                               if ( !old ) {
+                                                       context.removeAttribute("id");
+                                               }
+                                       }
+                               }
+                       }
+
+                       return oldSelect( selector, context, results, seed, xml );
+               };
+
+               if ( matches ) {
+                       assert(function( div ) {
+                               // Check to see if it's possible to do matchesSelector
+                               // on a disconnected node (IE 9)
+                               disconnectedMatch = matches.call( div, "div" );
+
+                               // This should fail with an exception
+                               // Gecko does not error, returns false instead
+                               try {
+                                       matches.call( div, "[test!='']:sizzle" );
+                                       rbuggyMatches.push( "!=", pseudos );
+                               } catch ( e ) {}
+                       });
+
+                       // rbuggyMatches always contains :active and :focus, so no need for a length check
+                       rbuggyMatches = /* rbuggyMatches.length && */ new RegExp( rbuggyMatches.join("|") );
+
+                       Sizzle.matchesSelector = function( elem, expr ) {
+                               // Make sure that attribute selectors are quoted
+                               expr = expr.replace( rattributeQuotes, "='$1']" );
+
+                               // rbuggyMatches always contains :active, so no need for an existence check
+                               if ( !isXML( elem ) && !rbuggyMatches.test( expr ) && (!rbuggyQSA || !rbuggyQSA.test( expr )) ) {
+                                       try {
+                                               var ret = matches.call( elem, expr );
+
+                                               // IE 9's matchesSelector returns false on disconnected nodes
+                                               if ( ret || disconnectedMatch ||
+                                                               // As well, disconnected nodes are said to be in a document
+                                                               // fragment in IE 9
+                                                               elem.document && elem.document.nodeType !== 11 ) {
+                                                       return ret;
+                                               }
+                                       } catch(e) {}
+                               }
+
+                               return Sizzle( expr, null, null, [ elem ] ).length > 0;
+                       };
+               }
+       })();
+}
+
+// Deprecated
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Back-compat
+function setFilters() {}
+Expr.filters = setFilters.prototype = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+// Override sizzle attribute retrieval
+Sizzle.attr = jQuery.attr;
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
+var runtil = /Until$/,
+       rparentsprev = /^(?:parents|prev(?:Until|All))/,
+       isSimple = /^.[^:#\[\.,]*$/,
+       rneedsContext = jQuery.expr.match.needsContext,
+       // methods guaranteed to produce a unique set when starting from a unique set
+       guaranteedUnique = {
+               children: true,
+               contents: true,
+               next: true,
+               prev: true
+       };
+
+jQuery.fn.extend({
+       find: function( selector ) {
+               var i, l, length, n, r, ret,
+                       self = this;
+
+               if ( typeof selector !== "string" ) {
+                       return jQuery( selector ).filter(function() {
+                               for ( i = 0, l = self.length; i < l; i++ ) {
+                                       if ( jQuery.contains( self[ i ], this ) ) {
+                                               return true;
+                                       }
+                               }
+                       });
+               }
+
+               ret = this.pushStack( "", "find", selector );
+
+               for ( i = 0, l = this.length; i < l; i++ ) {
+                       length = ret.length;
+                       jQuery.find( selector, this[i], ret );
+
+                       if ( i > 0 ) {
+                               // Make sure that the results are unique
+                               for ( n = length; n < ret.length; n++ ) {
+                                       for ( r = 0; r < length; r++ ) {
+                                               if ( ret[r] === ret[n] ) {
+                                                       ret.splice(n--, 1);
+                                                       break;
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               return ret;
+       },
+
+       has: function( target ) {
+               var i,
+                       targets = jQuery( target, this ),
+                       len = targets.length;
+
+               return this.filter(function() {
+                       for ( i = 0; i < len; i++ ) {
+                               if ( jQuery.contains( this, targets[i] ) ) {
+                                       return true;
+                               }
+                       }
+               });
+       },
+
+       not: function( selector ) {
+               return this.pushStack( winnow(this, selector, false), "not", selector);
+       },
+
+       filter: function( selector ) {
+               return this.pushStack( winnow(this, selector, true), "filter", selector );
+       },
+
+       is: function( selector ) {
+               return !!selector && (
+                       typeof selector === "string" ?
+                               // If this is a positional/relative selector, check membership in the returned set
+                               // so $("p:first").is("p:last") won't return true for a doc with two "p".
+                               rneedsContext.test( selector ) ?
+                                       jQuery( selector, this.context ).index( this[0] ) >= 0 :
+                                       jQuery.filter( selector, this ).length > 0 :
+                               this.filter( selector ).length > 0 );
+       },
+
+       closest: function( selectors, context ) {
+               var cur,
+                       i = 0,
+                       l = this.length,
+                       ret = [],
+                       pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+                               jQuery( selectors, context || this.context ) :
+                               0;
+
+               for ( ; i < l; i++ ) {
+                       cur = this[i];
+
+                       while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {
+                               if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
+                                       ret.push( cur );
+                                       break;
+                               }
+                               cur = cur.parentNode;
+                       }
+               }
+
+               ret = ret.length > 1 ? jQuery.unique( ret ) : ret;
+
+               return this.pushStack( ret, "closest", selectors );
+       },
+
+       // Determine the position of an element within
+       // the matched set of elements
+       index: function( elem ) {
+
+               // No argument, return index in parent
+               if ( !elem ) {
+                       return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1;
+               }
+
+               // index in selector
+               if ( typeof elem === "string" ) {
+                       return jQuery.inArray( this[0], jQuery( elem ) );
+               }
+
+               // Locate the position of the desired element
+               return jQuery.inArray(
+                       // If it receives a jQuery object, the first element is used
+                       elem.jquery ? elem[0] : elem, this );
+       },
+
+       add: function( selector, context ) {
+               var set = typeof selector === "string" ?
+                               jQuery( selector, context ) :
+                               jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+                       all = jQuery.merge( this.get(), set );
+
+               return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
+                       all :
+                       jQuery.unique( all ) );
+       },
+
+       addBack: function( selector ) {
+               return this.add( selector == null ?
+                       this.prevObject : this.prevObject.filter(selector)
+               );
+       }
+});
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+// A painfully simple check to see if an element is disconnected
+// from a document (should be improved, where feasible).
+function isDisconnected( node ) {
+       return !node || !node.parentNode || node.parentNode.nodeType === 11;
+}
+
+function sibling( cur, dir ) {
+       do {
+               cur = cur[ dir ];
+       } while ( cur && cur.nodeType !== 1 );
+
+       return cur;
+}
+
+jQuery.each({
+       parent: function( elem ) {
+               var parent = elem.parentNode;
+               return parent && parent.nodeType !== 11 ? parent : null;
+       },
+       parents: function( elem ) {
+               return jQuery.dir( elem, "parentNode" );
+       },
+       parentsUntil: function( elem, i, until ) {
+               return jQuery.dir( elem, "parentNode", until );
+       },
+       next: function( elem ) {
+               return sibling( elem, "nextSibling" );
+       },
+       prev: function( elem ) {
+               return sibling( elem, "previousSibling" );
+       },
+       nextAll: function( elem ) {
+               return jQuery.dir( elem, "nextSibling" );
+       },
+       prevAll: function( elem ) {
+               return jQuery.dir( elem, "previousSibling" );
+       },
+       nextUntil: function( elem, i, until ) {
+               return jQuery.dir( elem, "nextSibling", until );
+       },
+       prevUntil: function( elem, i, until ) {
+               return jQuery.dir( elem, "previousSibling", until );
+       },
+       siblings: function( elem ) {
+               return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+       },
+       children: function( elem ) {
+               return jQuery.sibling( elem.firstChild );
+       },
+       contents: function( elem ) {
+               return jQuery.nodeName( elem, "iframe" ) ?
+                       elem.contentDocument || elem.contentWindow.document :
+                       jQuery.merge( [], elem.childNodes );
+       }
+}, function( name, fn ) {
+       jQuery.fn[ name ] = function( until, selector ) {
+               var ret = jQuery.map( this, fn, until );
+
+               if ( !runtil.test( name ) ) {
+                       selector = until;
+               }
+
+               if ( selector && typeof selector === "string" ) {
+                       ret = jQuery.filter( selector, ret );
+               }
+
+               ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
+
+               if ( this.length > 1 && rparentsprev.test( name ) ) {
+                       ret = ret.reverse();
+               }
+
+               return this.pushStack( ret, name, core_slice.call( arguments ).join(",") );
+       };
+});
+
+jQuery.extend({
+       filter: function( expr, elems, not ) {
+               if ( not ) {
+                       expr = ":not(" + expr + ")";
+               }
+
+               return elems.length === 1 ?
+                       jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
+                       jQuery.find.matches(expr, elems);
+       },
+
+       dir: function( elem, dir, until ) {
+               var matched = [],
+                       cur = elem[ dir ];
+
+               while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+                       if ( cur.nodeType === 1 ) {
+                               matched.push( cur );
+                       }
+                       cur = cur[dir];
+               }
+               return matched;
+       },
+
+       sibling: function( n, elem ) {
+               var r = [];
+
+               for ( ; n; n = n.nextSibling ) {
+                       if ( n.nodeType === 1 && n !== elem ) {
+                               r.push( n );
+                       }
+               }
+
+               return r;
+       }
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, keep ) {
+
+       // Can't pass null or undefined to indexOf in Firefox 4
+       // Set to 0 to skip string check
+       qualifier = qualifier || 0;
+
+       if ( jQuery.isFunction( qualifier ) ) {
+               return jQuery.grep(elements, function( elem, i ) {
+                       var retVal = !!qualifier.call( elem, i, elem );
+                       return retVal === keep;
+               });
+
+       } else if ( qualifier.nodeType ) {
+               return jQuery.grep(elements, function( elem, i ) {
+                       return ( elem === qualifier ) === keep;
+               });
+
+       } else if ( typeof qualifier === "string" ) {
+               var filtered = jQuery.grep(elements, function( elem ) {
+                       return elem.nodeType === 1;
+               });
+
+               if ( isSimple.test( qualifier ) ) {
+                       return jQuery.filter(qualifier, filtered, !keep);
+               } else {
+                       qualifier = jQuery.filter( qualifier, filtered );
+               }
+       }
+
+       return jQuery.grep(elements, function( elem, i ) {
+               return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
+       });
+}
+function createSafeFragment( document ) {
+       var list = nodeNames.split( "|" ),
+       safeFrag = document.createDocumentFragment();
+
+       if ( safeFrag.createElement ) {
+               while ( list.length ) {
+                       safeFrag.createElement(
+                               list.pop()
+                       );
+               }
+       }
+       return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+               "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+       rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
+       rleadingWhitespace = /^\s+/,
+       rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+       rtagName = /<([\w:]+)/,
+       rtbody = /<tbody/i,
+       rhtml = /<|&#?\w+;/,
+       rnoInnerhtml = /<(?:script|style|link)/i,
+       rnocache = /<(?:script|object|embed|option|style)/i,
+       rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
+       rcheckableType = /^(?:checkbox|radio)$/,
+       // checked="checked" or checked
+       rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+       rscriptType = /\/(java|ecma)script/i,
+       rcleanScript = /^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,
+       wrapMap = {
+               option: [ 1, "<select multiple='multiple'>", "</select>" ],
+               legend: [ 1, "<fieldset>", "</fieldset>" ],
+               thead: [ 1, "<table>", "</table>" ],
+               tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+               td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+               col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+               area: [ 1, "<map>", "</map>" ],
+               _default: [ 0, "", "" ]
+       },
+       safeFragment = createSafeFragment( document ),
+       fragmentDiv = safeFragment.appendChild( document.createElement("div") );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+// unless wrapped in a div with non-breaking characters in front of it.
+if ( !jQuery.support.htmlSerialize ) {
+       wrapMap._default = [ 1, "X<div>", "</div>" ];
+}
+
+jQuery.fn.extend({
+       text: function( value ) {
+               return jQuery.access( this, function( value ) {
+                       return value === undefined ?
+                               jQuery.text( this ) :
+                               this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+               }, null, value, arguments.length );
+       },
+
+       wrapAll: function( html ) {
+               if ( jQuery.isFunction( html ) ) {
+                       return this.each(function(i) {
+                               jQuery(this).wrapAll( html.call(this, i) );
+                       });
+               }
+
+               if ( this[0] ) {
+                       // The elements to wrap the target around
+                       var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+                       if ( this[0].parentNode ) {
+                               wrap.insertBefore( this[0] );
+                       }
+
+                       wrap.map(function() {
+                               var elem = this;
+
+                               while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+                                       elem = elem.firstChild;
+                               }
+
+                               return elem;
+                       }).append( this );
+               }
+
+               return this;
+       },
+
+       wrapInner: function( html ) {
+               if ( jQuery.isFunction( html ) ) {
+                       return this.each(function(i) {
+                               jQuery(this).wrapInner( html.call(this, i) );
+                       });
+               }
+
+               return this.each(function() {
+                       var self = jQuery( this ),
+                               contents = self.contents();
+
+                       if ( contents.length ) {
+                               contents.wrapAll( html );
+
+                       } else {
+                               self.append( html );
+                       }
+               });
+       },
+
+       wrap: function( html ) {
+               var isFunction = jQuery.isFunction( html );
+
+               return this.each(function(i) {
+                       jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+               });
+       },
+
+       unwrap: function() {
+               return this.parent().each(function() {
+                       if ( !jQuery.nodeName( this, "body" ) ) {
+                               jQuery( this ).replaceWith( this.childNodes );
+                       }
+               }).end();
+       },
+
+       append: function() {
+               return this.domManip(arguments, true, function( elem ) {
+                       if ( this.nodeType === 1 || this.nodeType === 11 ) {
+                               this.appendChild( elem );
+                       }
+               });
+       },
+
+       prepend: function() {
+               return this.domManip(arguments, true, function( elem ) {
+                       if ( this.nodeType === 1 || this.nodeType === 11 ) {
+                               this.insertBefore( elem, this.firstChild );
+                       }
+               });
+       },
+
+       before: function() {
+               if ( !isDisconnected( this[0] ) ) {
+                       return this.domManip(arguments, false, function( elem ) {
+                               this.parentNode.insertBefore( elem, this );
+                       });
+               }
+
+               if ( arguments.length ) {
+                       var set = jQuery.clean( arguments );
+                       return this.pushStack( jQuery.merge( set, this ), "before", this.selector );
+               }
+       },
+
+       after: function() {
+               if ( !isDisconnected( this[0] ) ) {
+                       return this.domManip(arguments, false, function( elem ) {
+                               this.parentNode.insertBefore( elem, this.nextSibling );
+                       });
+               }
+
+               if ( arguments.length ) {
+                       var set = jQuery.clean( arguments );
+                       return this.pushStack( jQuery.merge( this, set ), "after", this.selector );
+               }
+       },
+
+       // keepData is for internal use only--do not document
+       remove: function( selector, keepData ) {
+               var elem,
+                       i = 0;
+
+               for ( ; (elem = this[i]) != null; i++ ) {
+                       if ( !selector || jQuery.filter( selector, [ elem ] ).length ) {
+                               if ( !keepData && elem.nodeType === 1 ) {
+                                       jQuery.cleanData( elem.getElementsByTagName("*") );
+                                       jQuery.cleanData( [ elem ] );
+                               }
+
+                               if ( elem.parentNode ) {
+                                       elem.parentNode.removeChild( elem );
+                               }
+                       }
+               }
+
+               return this;
+       },
+
+       empty: function() {
+               var elem,
+                       i = 0;
+
+               for ( ; (elem = this[i]) != null; i++ ) {
+                       // Remove element nodes and prevent memory leaks
+                       if ( elem.nodeType === 1 ) {
+                               jQuery.cleanData( elem.getElementsByTagName("*") );
+                       }
+
+                       // Remove any remaining nodes
+                       while ( elem.firstChild ) {
+                               elem.removeChild( elem.firstChild );
+                       }
+               }
+
+               return this;
+       },
+
+       clone: function( dataAndEvents, deepDataAndEvents ) {
+               dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+               deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+               return this.map( function () {
+                       return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+               });
+       },
+
+       html: function( value ) {
+               return jQuery.access( this, function( value ) {
+                       var elem = this[0] || {},
+                               i = 0,
+                               l = this.length;
+
+                       if ( value === undefined ) {
+                               return elem.nodeType === 1 ?
+                                       elem.innerHTML.replace( rinlinejQuery, "" ) :
+                                       undefined;
+                       }
+
+                       // See if we can take a shortcut and just use innerHTML
+                       if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+                               ( jQuery.support.htmlSerialize || !rnoshimcache.test( value )  ) &&
+                               ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
+                               !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
+
+                               value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+                               try {
+                                       for (; i < l; i++ ) {
+                                               // Remove element nodes and prevent memory leaks
+                                               elem = this[i] || {};
+                                               if ( elem.nodeType === 1 ) {
+                                                       jQuery.cleanData( elem.getElementsByTagName( "*" ) );
+                                                       elem.innerHTML = value;
+                                               }
+                                       }
+
+                                       elem = 0;
+
+                               // If using innerHTML throws an exception, use the fallback method
+                               } catch(e) {}
+                       }
+
+                       if ( elem ) {
+                               this.empty().append( value );
+                       }
+               }, null, value, arguments.length );
+       },
+
+       replaceWith: function( value ) {
+               if ( !isDisconnected( this[0] ) ) {
+                       // Make sure that the elements are removed from the DOM before they are inserted
+                       // this can help fix replacing a parent with child elements
+                       if ( jQuery.isFunction( value ) ) {
+                               return this.each(function(i) {
+                                       var self = jQuery(this), old = self.html();
+                                       self.replaceWith( value.call( this, i, old ) );
+                               });
+                       }
+
+                       if ( typeof value !== "string" ) {
+                               value = jQuery( value ).detach();
+                       }
+
+                       return this.each(function() {
+                               var next = this.nextSibling,
+                                       parent = this.parentNode;
+
+                               jQuery( this ).remove();
+
+                               if ( next ) {
+                                       jQuery(next).before( value );
+                               } else {
+                                       jQuery(parent).append( value );
+                               }
+                       });
+               }
+
+               return this.length ?
+                       this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value ) :
+                       this;
+       },
+
+       detach: function( selector ) {
+               return this.remove( selector, true );
+       },
+
+       domManip: function( args, table, callback ) {
+
+               // Flatten any nested arrays
+               args = [].concat.apply( [], args );
+
+               var results, first, fragment, iNoClone,
+                       i = 0,
+                       value = args[0],
+                       scripts = [],
+                       l = this.length;
+
+               // We can't cloneNode fragments that contain checked, in WebKit
+               if ( !jQuery.support.checkClone && l > 1 && typeof value === "string" && rchecked.test( value ) ) {
+                       return this.each(function() {
+                               jQuery(this).domManip( args, table, callback );
+                       });
+               }
+
+               if ( jQuery.isFunction(value) ) {
+                       return this.each(function(i) {
+                               var self = jQuery(this);
+                               args[0] = value.call( this, i, table ? self.html() : undefined );
+                               self.domManip( args, table, callback );
+                       });
+               }
+
+               if ( this[0] ) {
+                       results = jQuery.buildFragment( args, this, scripts );
+                       fragment = results.fragment;
+                       first = fragment.firstChild;
+
+                       if ( fragment.childNodes.length === 1 ) {
+                               fragment = first;
+                       }
+
+                       if ( first ) {
+                               table = table && jQuery.nodeName( first, "tr" );
+
+                               // Use the original fragment for the last item instead of the first because it can end up
+                               // being emptied incorrectly in certain situations (#8070).
+                               // Fragments from the fragment cache must always be cloned and never used in place.
+                               for ( iNoClone = results.cacheable || l - 1; i < l; i++ ) {
+                                       callback.call(
+                                               table && jQuery.nodeName( this[i], "table" ) ?
+                                                       findOrAppend( this[i], "tbody" ) :
+                                                       this[i],
+                                               i === iNoClone ?
+                                                       fragment :
+                                                       jQuery.clone( fragment, true, true )
+                                       );
+                               }
+                       }
+
+                       // Fix #11809: Avoid leaking memory
+                       fragment = first = null;
+
+                       if ( scripts.length ) {
+                               jQuery.each( scripts, function( i, elem ) {
+                                       if ( elem.src ) {
+                                               if ( jQuery.ajax ) {
+                                                       jQuery.ajax({
+                                                               url: elem.src,
+                                                               type: "GET",
+                                                               dataType: "script",
+                                                               async: false,
+                                                               global: false,
+                                                               "throws": true
+                                                       });
+                                               } else {
+                                                       jQuery.error("no ajax");
+                                               }
+                                       } else {
+                                               jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) );
+                                       }
+
+                                       if ( elem.parentNode ) {
+                                               elem.parentNode.removeChild( elem );
+                                       }
+                               });
+                       }
+               }
+
+               return this;
+       }
+});
+
+function findOrAppend( elem, tag ) {
+       return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
+}
+
+function cloneCopyEvent( src, dest ) {
+
+       if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+               return;
+       }
+
+       var type, i, l,
+               oldData = jQuery._data( src ),
+               curData = jQuery._data( dest, oldData ),
+               events = oldData.events;
+
+       if ( events ) {
+               delete curData.handle;
+               curData.events = {};
+
+               for ( type in events ) {
+                       for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+                               jQuery.event.add( dest, type, events[ type ][ i ] );
+                       }
+               }
+       }
+
+       // make the cloned public data object a copy from the original
+       if ( curData.data ) {
+               curData.data = jQuery.extend( {}, curData.data );
+       }
+}
+
+function cloneFixAttributes( src, dest ) {
+       var nodeName;
+
+       // We do not need to do anything for non-Elements
+       if ( dest.nodeType !== 1 ) {
+               return;
+       }
+
+       // clearAttributes removes the attributes, which we don't want,
+       // but also removes the attachEvent events, which we *do* want
+       if ( dest.clearAttributes ) {
+               dest.clearAttributes();
+       }
+
+       // mergeAttributes, in contrast, only merges back on the
+       // original attributes, not the events
+       if ( dest.mergeAttributes ) {
+               dest.mergeAttributes( src );
+       }
+
+       nodeName = dest.nodeName.toLowerCase();
+
+       if ( nodeName === "object" ) {
+               // IE6-10 improperly clones children of object elements using classid.
+               // IE10 throws NoModificationAllowedError if parent is null, #12132.
+               if ( dest.parentNode ) {
+                       dest.outerHTML = src.outerHTML;
+               }
+
+               // This path appears unavoidable for IE9. When cloning an object
+               // element in IE9, the outerHTML strategy above is not sufficient.
+               // If the src has innerHTML and the destination does not,
+               // copy the src.innerHTML into the dest.innerHTML. #10324
+               if ( jQuery.support.html5Clone && (src.innerHTML && !jQuery.trim(dest.innerHTML)) ) {
+                       dest.innerHTML = src.innerHTML;
+               }
+
+       } else if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
+               // IE6-8 fails to persist the checked state of a cloned checkbox
+               // or radio button. Worse, IE6-7 fail to give the cloned element
+               // a checked appearance if the defaultChecked value isn't also set
+
+               dest.defaultChecked = dest.checked = src.checked;
+
+               // IE6-7 get confused and end up setting the value of a cloned
+               // checkbox/radio button to an empty string instead of "on"
+               if ( dest.value !== src.value ) {
+                       dest.value = src.value;
+               }
+
+       // IE6-8 fails to return the selected option to the default selected
+       // state when cloning options
+       } else if ( nodeName === "option" ) {
+               dest.selected = src.defaultSelected;
+
+       // IE6-8 fails to set the defaultValue to the correct value when
+       // cloning other types of input fields
+       } else if ( nodeName === "input" || nodeName === "textarea" ) {
+               dest.defaultValue = src.defaultValue;
+
+       // IE blanks contents when cloning scripts
+       } else if ( nodeName === "script" && dest.text !== src.text ) {
+               dest.text = src.text;
+       }
+
+       // Event data gets referenced instead of copied if the expando
+       // gets copied too
+       dest.removeAttribute( jQuery.expando );
+}
+
+jQuery.buildFragment = function( args, context, scripts ) {
+       var fragment, cacheable, cachehit,
+               first = args[ 0 ];
+
+       // Set context from what may come in as undefined or a jQuery collection or a node
+       // Updated to fix #12266 where accessing context[0] could throw an exception in IE9/10 &
+       // also doubles as fix for #8950 where plain objects caused createDocumentFragment exception
+       context = context || document;
+       context = !context.nodeType && context[0] || context;
+       context = context.ownerDocument || context;
+
+       // Only cache "small" (1/2 KB) HTML strings that are associated with the main document
+       // Cloning options loses the selected state, so don't cache them
+       // IE 6 doesn't like it when you put <object> or <embed> elements in a fragment
+       // Also, WebKit does not clone 'checked' attributes on cloneNode, so don't cache
+       // Lastly, IE6,7,8 will not correctly reuse cached fragments that were created from unknown elems #10501
+       if ( args.length === 1 && typeof first === "string" && first.length < 512 && context === document &&
+               first.charAt(0) === "<" && !rnocache.test( first ) &&
+               (jQuery.support.checkClone || !rchecked.test( first )) &&
+               (jQuery.support.html5Clone || !rnoshimcache.test( first )) ) {
+
+               // Mark cacheable and look for a hit
+               cacheable = true;
+               fragment = jQuery.fragments[ first ];
+               cachehit = fragment !== undefined;
+       }
+
+       if ( !fragment ) {
+               fragment = context.createDocumentFragment();
+               jQuery.clean( args, context, fragment, scripts );
+
+               // Update the cache, but only store false
+               // unless this is a second parsing of the same content
+               if ( cacheable ) {
+                       jQuery.fragments[ first ] = cachehit && fragment;
+               }
+       }
+
+       return { fragment: fragment, cacheable: cacheable };
+};
+
+jQuery.fragments = {};
+
+jQuery.each({
+       appendTo: "append",
+       prependTo: "prepend",
+       insertBefore: "before",
+       insertAfter: "after",
+       replaceAll: "replaceWith"
+}, function( name, original ) {
+       jQuery.fn[ name ] = function( selector ) {
+               var elems,
+                       i = 0,
+                       ret = [],
+                       insert = jQuery( selector ),
+                       l = insert.length,
+                       parent = this.length === 1 && this[0].parentNode;
+
+               if ( (parent == null || parent && parent.nodeType === 11 && parent.childNodes.length === 1) && l === 1 ) {
+                       insert[ original ]( this[0] );
+                       return this;
+               } else {
+                       for ( ; i < l; i++ ) {
+                               elems = ( i > 0 ? this.clone(true) : this ).get();
+                               jQuery( insert[i] )[ original ]( elems );
+                               ret = ret.concat( elems );
+                       }
+
+                       return this.pushStack( ret, name, insert.selector );
+               }
+       };
+});
+
+function getAll( elem ) {
+       if ( typeof elem.getElementsByTagName !== "undefined" ) {
+               return elem.getElementsByTagName( "*" );
+
+       } else if ( typeof elem.querySelectorAll !== "undefined" ) {
+               return elem.querySelectorAll( "*" );
+
+       } else {
+               return [];
+       }
+}
+
+// Used in clean, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+       if ( rcheckableType.test( elem.type ) ) {
+               elem.defaultChecked = elem.checked;
+       }
+}
+
+jQuery.extend({
+       clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+               var srcElements,
+                       destElements,
+                       i,
+                       clone;
+
+               if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
+                       clone = elem.cloneNode( true );
+
+               // IE<=8 does not properly clone detached, unknown element nodes
+               } else {
+                       fragmentDiv.innerHTML = elem.outerHTML;
+                       fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
+               }
+
+               if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+                               (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+                       // IE copies events bound via attachEvent when using cloneNode.
+                       // Calling detachEvent on the clone will also remove the events
+                       // from the original. In order to get around this, we use some
+                       // proprietary methods to clear the events. Thanks to MooTools
+                       // guys for this hotness.
+
+                       cloneFixAttributes( elem, clone );
+
+                       // Using Sizzle here is crazy slow, so we use getElementsByTagName instead
+                       srcElements = getAll( elem );
+                       destElements = getAll( clone );
+
+                       // Weird iteration because IE will replace the length property
+                       // with an element if you are cloning the body and one of the
+                       // elements on the page has a name or id of "length"
+                       for ( i = 0; srcElements[i]; ++i ) {
+                               // Ensure that the destination node is not null; Fixes #9587
+                               if ( destElements[i] ) {
+                                       cloneFixAttributes( srcElements[i], destElements[i] );
+                               }
+                       }
+               }
+
+               // Copy the events from the original to the clone
+               if ( dataAndEvents ) {
+                       cloneCopyEvent( elem, clone );
+
+                       if ( deepDataAndEvents ) {
+                               srcElements = getAll( elem );
+                               destElements = getAll( clone );
+
+                               for ( i = 0; srcElements[i]; ++i ) {
+                                       cloneCopyEvent( srcElements[i], destElements[i] );
+                               }
+                       }
+               }
+
+               srcElements = destElements = null;
+
+               // Return the cloned set
+               return clone;
+       },
+
+       clean: function( elems, context, fragment, scripts ) {
+               var i, j, elem, tag, wrap, depth, div, hasBody, tbody, len, handleScript, jsTags,
+                       safe = context === document && safeFragment,
+                       ret = [];
+
+               // Ensure that context is a document
+               if ( !context || typeof context.createDocumentFragment === "undefined" ) {
+                       context = document;
+               }
+
+               // Use the already-created safe fragment if context permits
+               for ( i = 0; (elem = elems[i]) != null; i++ ) {
+                       if ( typeof elem === "number" ) {
+                               elem += "";
+                       }
+
+                       if ( !elem ) {
+                               continue;
+                       }
+
+                       // Convert html string into DOM nodes
+                       if ( typeof elem === "string" ) {
+                               if ( !rhtml.test( elem ) ) {
+                                       elem = context.createTextNode( elem );
+                               } else {
+                                       // Ensure a safe container in which to render the html
+                                       safe = safe || createSafeFragment( context );
+                                       div = context.createElement("div");
+                                       safe.appendChild( div );
+
+                                       // Fix "XHTML"-style tags in all browsers
+                                       elem = elem.replace(rxhtmlTag, "<$1></$2>");
+
+                                       // Go to html and back, then peel off extra wrappers
+                                       tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
+                                       wrap = wrapMap[ tag ] || wrapMap._default;
+                                       depth = wrap[0];
+                                       div.innerHTML = wrap[1] + elem + wrap[2];
+
+                                       // Move to the right depth
+                                       while ( depth-- ) {
+                                               div = div.lastChild;
+                                       }
+
+                                       // Remove IE's autoinserted <tbody> from table fragments
+                                       if ( !jQuery.support.tbody ) {
+
+                                               // String was a <table>, *may* have spurious <tbody>
+                                               hasBody = rtbody.test(elem);
+                                                       tbody = tag === "table" && !hasBody ?
+                                                               div.firstChild && div.firstChild.childNodes :
+
+                                                               // String was a bare <thead> or <tfoot>
+                                                               wrap[1] === "<table>" && !hasBody ?
+                                                                       div.childNodes :
+                                                                       [];
+
+                                               for ( j = tbody.length - 1; j >= 0 ; --j ) {
+                                                       if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
+                                                               tbody[ j ].parentNode.removeChild( tbody[ j ] );
+                                                       }
+                                               }
+                                       }
+
+                                       // IE completely kills leading whitespace when innerHTML is used
+                                       if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+                                               div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
+                                       }
+
+                                       elem = div.childNodes;
+
+                                       // Take out of fragment container (we need a fresh div each time)
+                                       div.parentNode.removeChild( div );
+                               }
+                       }
+
+                       if ( elem.nodeType ) {
+                               ret.push( elem );
+                       } else {
+                               jQuery.merge( ret, elem );
+                       }
+               }
+
+               // Fix #11356: Clear elements from safeFragment
+               if ( div ) {
+                       elem = div = safe = null;
+               }
+
+               // Reset defaultChecked for any radios and checkboxes
+               // about to be appended to the DOM in IE 6/7 (#8060)
+               if ( !jQuery.support.appendChecked ) {
+                       for ( i = 0; (elem = ret[i]) != null; i++ ) {
+                               if ( jQuery.nodeName( elem, "input" ) ) {
+                                       fixDefaultChecked( elem );
+                               } else if ( typeof elem.getElementsByTagName !== "undefined" ) {
+                                       jQuery.grep( elem.getElementsByTagName("input"), fixDefaultChecked );
+                               }
+                       }
+               }
+
+               // Append elements to a provided document fragment
+               if ( fragment ) {
+                       // Special handling of each script element
+                       handleScript = function( elem ) {
+                               // Check if we consider it executable
+                               if ( !elem.type || rscriptType.test( elem.type ) ) {
+                                       // Detach the script and store it in the scripts array (if provided) or the fragment
+                                       // Return truthy to indicate that it has been handled
+                                       return scripts ?
+                                               scripts.push( elem.parentNode ? elem.parentNode.removeChild( elem ) : elem ) :
+                                               fragment.appendChild( elem );
+                               }
+                       };
+
+                       for ( i = 0; (elem = ret[i]) != null; i++ ) {
+                               // Check if we're done after handling an executable script
+                               if ( !( jQuery.nodeName( elem, "script" ) && handleScript( elem ) ) ) {
+                                       // Append to fragment and handle embedded scripts
+                                       fragment.appendChild( elem );
+                                       if ( typeof elem.getElementsByTagName !== "undefined" ) {
+                                               // handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
+                                               jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
+
+                                               // Splice the scripts into ret after their former ancestor and advance our index beyond them
+                                               ret.splice.apply( ret, [i + 1, 0].concat( jsTags ) );
+                                               i += jsTags.length;
+                                       }
+                               }
+                       }
+               }
+
+               return ret;
+       },
+
+       cleanData: function( elems, /* internal */ acceptData ) {
+               var data, id, elem, type,
+                       i = 0,
+                       internalKey = jQuery.expando,
+                       cache = jQuery.cache,
+                       deleteExpando = jQuery.support.deleteExpando,
+                       special = jQuery.event.special;
+
+               for ( ; (elem = elems[i]) != null; i++ ) {
+
+                       if ( acceptData || jQuery.acceptData( elem ) ) {
+
+                               id = elem[ internalKey ];
+                               data = id && cache[ id ];
+
+                               if ( data ) {
+                                       if ( data.events ) {
+                                               for ( type in data.events ) {
+                                                       if ( special[ type ] ) {
+                                                               jQuery.event.remove( elem, type );
+
+                                                       // This is a shortcut to avoid jQuery.event.remove's overhead
+                                                       } else {
+                                                               jQuery.removeEvent( elem, type, data.handle );
+                                                       }
+                                               }
+                                       }
+
+                                       // Remove cache only if it was not already removed by jQuery.event.remove
+                                       if ( cache[ id ] ) {
+
+                                               delete cache[ id ];
+
+                                               // IE does not allow us to delete expando properties from nodes,
+                                               // nor does it have a removeAttribute function on Document nodes;
+                                               // we must handle all of these cases
+                                               if ( deleteExpando ) {
+                                                       delete elem[ internalKey ];
+
+                                               } else if ( elem.removeAttribute ) {
+                                                       elem.removeAttribute( internalKey );
+
+                                               } else {
+                                                       elem[ internalKey ] = null;
+                                               }
+
+                                               jQuery.deletedIds.push( id );
+                                       }
+                               }
+                       }
+               }
+       }
+});
+// Limit scope pollution from any deprecated API
+(function() {
+
+var matched, browser;
+
+// Use of jQuery.browser is frowned upon.
+// More details: http://api.jquery.com/jQuery.browser
+// jQuery.uaMatch maintained for back-compat
+jQuery.uaMatch = function( ua ) {
+       ua = ua.toLowerCase();
+
+       var match = /(chrome)[ \/]([\w.]+)/.exec( ua ) ||
+               /(webkit)[ \/]([\w.]+)/.exec( ua ) ||
+               /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( ua ) ||
+               /(msie) ([\w.]+)/.exec( ua ) ||
+               ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( ua ) ||
+               [];
+
+       return {
+               browser: match[ 1 ] || "",
+               version: match[ 2 ] || "0"
+       };
+};
+
+matched = jQuery.uaMatch( navigator.userAgent );
+browser = {};
+
+if ( matched.browser ) {
+       browser[ matched.browser ] = true;
+       browser.version = matched.version;
+}
+
+// Chrome is Webkit, but Webkit is also Safari.
+if ( browser.chrome ) {
+       browser.webkit = true;
+} else if ( browser.webkit ) {
+       browser.safari = true;
+}
+
+jQuery.browser = browser;
+
+jQuery.sub = function() {
+       function jQuerySub( selector, context ) {
+               return new jQuerySub.fn.init( selector, context );
+       }
+       jQuery.extend( true, jQuerySub, this );
+       jQuerySub.superclass = this;
+       jQuerySub.fn = jQuerySub.prototype = this();
+       jQuerySub.fn.constructor = jQuerySub;
+       jQuerySub.sub = this.sub;
+       jQuerySub.fn.init = function init( selector, context ) {
+               if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+                       context = jQuerySub( context );
+               }
+
+               return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+       };
+       jQuerySub.fn.init.prototype = jQuerySub.fn;
+       var rootjQuerySub = jQuerySub(document);
+       return jQuerySub;
+};
+
+})();
+var curCSS, iframe, iframeDoc,
+       ralpha = /alpha\([^)]*\)/i,
+       ropacity = /opacity=([^)]*)/,
+       rposition = /^(top|right|bottom|left)$/,
+       // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+       // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+       rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+       rmargin = /^margin/,
+       rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
+       rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
+       rrelNum = new RegExp( "^([-+])=(" + core_pnum + ")", "i" ),
+       elemdisplay = {},
+
+       cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+       cssNormalTransform = {
+               letterSpacing: 0,
+               fontWeight: 400
+       },
+
+       cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+       cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
+
+       eventsToggle = jQuery.fn.toggle;
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+       // shortcut for names that are not vendor prefixed
+       if ( name in style ) {
+               return name;
+       }
+
+       // check for vendor prefixed names
+       var capName = name.charAt(0).toUpperCase() + name.slice(1),
+               origName = name,
+               i = cssPrefixes.length;
+
+       while ( i-- ) {
+               name = cssPrefixes[ i ] + capName;
+               if ( name in style ) {
+                       return name;
+               }
+       }
+
+       return origName;
+}
+
+function isHidden( elem, el ) {
+       elem = el || elem;
+       return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+}
+
+function showHide( elements, show ) {
+       var elem, display,
+               values = [],
+               index = 0,
+               length = elements.length;
+
+       for ( ; index < length; index++ ) {
+               elem = elements[ index ];
+               if ( !elem.style ) {
+                       continue;
+               }
+               values[ index ] = jQuery._data( elem, "olddisplay" );
+               if ( show ) {
+                       // Reset the inline display of this element to learn if it is
+                       // being hidden by cascaded rules or not
+                       if ( !values[ index ] && elem.style.display === "none" ) {
+                               elem.style.display = "";
+                       }
+
+                       // Set elements which have been overridden with display: none
+                       // in a stylesheet to whatever the default browser style is
+                       // for such an element
+                       if ( elem.style.display === "" && isHidden( elem ) ) {
+                               values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
+                       }
+               } else {
+                       display = curCSS( elem, "display" );
+
+                       if ( !values[ index ] && display !== "none" ) {
+                               jQuery._data( elem, "olddisplay", display );
+                       }
+               }
+       }
+
+       // Set the display of most of the elements in a second loop
+       // to avoid the constant reflow
+       for ( index = 0; index < length; index++ ) {
+               elem = elements[ index ];
+               if ( !elem.style ) {
+                       continue;
+               }
+               if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+                       elem.style.display = show ? values[ index ] || "" : "none";
+               }
+       }
+
+       return elements;
+}
+
+jQuery.fn.extend({
+       css: function( name, value ) {
+               return jQuery.access( this, function( elem, name, value ) {
+                       return value !== undefined ?
+                               jQuery.style( elem, name, value ) :
+                               jQuery.css( elem, name );
+               }, name, value, arguments.length > 1 );
+       },
+       show: function() {
+               return showHide( this, true );
+       },
+       hide: function() {
+               return showHide( this );
+       },
+       toggle: function( state, fn2 ) {
+               var bool = typeof state === "boolean";
+
+               if ( jQuery.isFunction( state ) && jQuery.isFunction( fn2 ) ) {
+                       return eventsToggle.apply( this, arguments );
+               }
+
+               return this.each(function() {
+                       if ( bool ? state : isHidden( this ) ) {
+                               jQuery( this ).show();
+                       } else {
+                               jQuery( this ).hide();
+                       }
+               });
+       }
+});
+
+jQuery.extend({
+       // Add in style property hooks for overriding the default
+       // behavior of getting and setting a style property
+       cssHooks: {
+               opacity: {
+                       get: function( elem, computed ) {
+                               if ( computed ) {
+                                       // We should always get a number back from opacity
+                                       var ret = curCSS( elem, "opacity" );
+                                       return ret === "" ? "1" : ret;
+
+                               }
+                       }
+               }
+       },
+
+       // Exclude the following css properties to add px
+       cssNumber: {
+               "fillOpacity": true,
+               "fontWeight": true,
+               "lineHeight": true,
+               "opacity": true,
+               "orphans": true,
+               "widows": true,
+               "zIndex": true,
+               "zoom": true
+       },
+
+       // Add in properties whose names you wish to fix before
+       // setting or getting the value
+       cssProps: {
+               // normalize float css property
+               "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+       },
+
+       // Get and set the style property on a DOM Node
+       style: function( elem, name, value, extra ) {
+               // Don't set styles on text and comment nodes
+               if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+                       return;
+               }
+
+               // Make sure that we're working with the right name
+               var ret, type, hooks,
+                       origName = jQuery.camelCase( name ),
+                       style = elem.style;
+
+               name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+               // gets hook for the prefixed version
+               // followed by the unprefixed version
+               hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+               // Check if we're setting a value
+               if ( value !== undefined ) {
+                       type = typeof value;
+
+                       // convert relative number strings (+= or -=) to relative numbers. #7345
+                       if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+                               value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+                               // Fixes bug #9237
+                               type = "number";
+                       }
+
+                       // Make sure that NaN and null values aren't set. See: #7116
+                       if ( value == null || type === "number" && isNaN( value ) ) {
+                               return;
+                       }
+
+                       // If a number was passed in, add 'px' to the (except for certain CSS properties)
+                       if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+                               value += "px";
+                       }
+
+                       // If a hook was provided, use that value, otherwise just set the specified value
+                       if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+                               // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+                               // Fixes bug #5509
+                               try {
+                                       style[ name ] = value;
+                               } catch(e) {}
+                       }
+
+               } else {
+                       // If a hook was provided get the non-computed value from there
+                       if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+                               return ret;
+                       }
+
+                       // Otherwise just get the value from the style object
+                       return style[ name ];
+               }
+       },
+
+       css: function( elem, name, numeric, extra ) {
+               var val, num, hooks,
+                       origName = jQuery.camelCase( name );
+
+               // Make sure that we're working with the right name
+               name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+               // gets hook for the prefixed version
+               // followed by the unprefixed version
+               hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+               // If a hook was provided get the computed value from there
+               if ( hooks && "get" in hooks ) {
+                       val = hooks.get( elem, true, extra );
+               }
+
+               // Otherwise, if a way to get the computed value exists, use that
+               if ( val === undefined ) {
+                       val = curCSS( elem, name );
+               }
+
+               //convert "normal" to computed value
+               if ( val === "normal" && name in cssNormalTransform ) {
+                       val = cssNormalTransform[ name ];
+               }
+
+               // Return, converting to number if forced or a qualifier was provided and val looks numeric
+               if ( numeric || extra !== undefined ) {
+                       num = parseFloat( val );
+                       return numeric || jQuery.isNumeric( num ) ? num || 0 : val;
+               }
+               return val;
+       },
+
+       // A method for quickly swapping in/out CSS properties to get correct calculations
+       swap: function( elem, options, callback ) {
+               var ret, name,
+                       old = {};
+
+               // Remember the old values, and insert the new ones
+               for ( name in options ) {
+                       old[ name ] = elem.style[ name ];
+                       elem.style[ name ] = options[ name ];
+               }
+
+               ret = callback.call( elem );
+
+               // Revert the old values
+               for ( name in options ) {
+                       elem.style[ name ] = old[ name ];
+               }
+
+               return ret;
+       }
+});
+
+// NOTE: To any future maintainer, we've window.getComputedStyle
+// because jsdom on node.js will break without it.
+if ( window.getComputedStyle ) {
+       curCSS = function( elem, name ) {
+               var ret, width, minWidth, maxWidth,
+                       computed = window.getComputedStyle( elem, null ),
+                       style = elem.style;
+
+               if ( computed ) {
+
+                       ret = computed[ name ];
+                       if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+                               ret = jQuery.style( elem, name );
+                       }
+
+                       // A tribute to the "awesome hack by Dean Edwards"
+                       // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
+                       // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+                       // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+                       if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+                               width = style.width;
+                               minWidth = style.minWidth;
+                               maxWidth = style.maxWidth;
+
+                               style.minWidth = style.maxWidth = style.width = ret;
+                               ret = computed.width;
+
+                               style.width = width;
+                               style.minWidth = minWidth;
+                               style.maxWidth = maxWidth;
+                       }
+               }
+
+               return ret;
+       };
+} else if ( document.documentElement.currentStyle ) {
+       curCSS = function( elem, name ) {
+               var left, rsLeft,
+                       ret = elem.currentStyle && elem.currentStyle[ name ],
+                       style = elem.style;
+
+               // Avoid setting ret to empty string here
+               // so we don't default to auto
+               if ( ret == null && style && style[ name ] ) {
+                       ret = style[ name ];
+               }
+
+               // From the awesome hack by Dean Edwards
+               // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+               // If we're not dealing with a regular pixel number
+               // but a number that has a weird ending, we need to convert it to pixels
+               // but not position css attributes, as those are proportional to the parent element instead
+               // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
+               if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
+
+                       // Remember the original values
+                       left = style.left;
+                       rsLeft = elem.runtimeStyle && elem.runtimeStyle.left;
+
+                       // Put in the new values to get a computed value out
+                       if ( rsLeft ) {
+                               elem.runtimeStyle.left = elem.currentStyle.left;
+                       }
+                       style.left = name === "fontSize" ? "1em" : ret;
+                       ret = style.pixelLeft + "px";
+
+                       // Revert the changed values
+                       style.left = left;
+                       if ( rsLeft ) {
+                               elem.runtimeStyle.left = rsLeft;
+                       }
+               }
+
+               return ret === "" ? "auto" : ret;
+       };
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+       var matches = rnumsplit.exec( value );
+       return matches ?
+                       Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+                       value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox ) {
+       var i = extra === ( isBorderBox ? "border" : "content" ) ?
+               // If we already have the right measurement, avoid augmentation
+               4 :
+               // Otherwise initialize for horizontal or vertical properties
+               name === "width" ? 1 : 0,
+
+               val = 0;
+
+       for ( ; i < 4; i += 2 ) {
+               // both box models exclude margin, so add it if we want it
+               if ( extra === "margin" ) {
+                       // we use jQuery.css instead of curCSS here
+                       // because of the reliableMarginRight CSS hook!
+                       val += jQuery.css( elem, extra + cssExpand[ i ], true );
+               }
+
+               // From this point on we use curCSS for maximum performance (relevant in animations)
+               if ( isBorderBox ) {
+                       // border-box includes padding, so remove it if we want content
+                       if ( extra === "content" ) {
+                               val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
+                       }
+
+                       // at this point, extra isn't border nor margin, so remove border
+                       if ( extra !== "margin" ) {
+                               val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+                       }
+               } else {
+                       // at this point, extra isn't content, so add padding
+                       val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
+
+                       // at this point, extra isn't content nor padding, so add border
+                       if ( extra !== "padding" ) {
+                               val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
+                       }
+               }
+       }
+
+       return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+       // Start with offset property, which is equivalent to the border-box value
+       var val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+               valueIsBorderBox = true,
+               isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box";
+
+       // some non-html elements return undefined for offsetWidth, so check for null/undefined
+       // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+       // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+       if ( val <= 0 || val == null ) {
+               // Fall back to computed then uncomputed css if necessary
+               val = curCSS( elem, name );
+               if ( val < 0 || val == null ) {
+                       val = elem.style[ name ];
+               }
+
+               // Computed unit is not pixels. Stop here and return.
+               if ( rnumnonpx.test(val) ) {
+                       return val;
+               }
+
+               // we need the check for style in case a browser which returns unreliable values
+               // for getComputedStyle silently falls back to the reliable elem.style
+               valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
+
+               // Normalize "", auto, and prepare for extra
+               val = parseFloat( val ) || 0;
+       }
+
+       // use the active box-sizing model to add/subtract irrelevant styles
+       return ( val +
+               augmentWidthOrHeight(
+                       elem,
+                       name,
+                       extra || ( isBorderBox ? "border" : "content" ),
+                       valueIsBorderBox
+               )
+       ) + "px";
+}
+
+
+// Try to determine the default display value of an element
+function css_defaultDisplay( nodeName ) {
+       if ( elemdisplay[ nodeName ] ) {
+               return elemdisplay[ nodeName ];
+       }
+
+       var elem = jQuery( "<" + nodeName + ">" ).appendTo( document.body ),
+               display = elem.css("display");
+       elem.remove();
+
+       // If the simple way fails,
+       // get element's real default display by attaching it to a temp iframe
+       if ( display === "none" || display === "" ) {
+               // Use the already-created iframe if possible
+               iframe = document.body.appendChild(
+                       iframe || jQuery.extend( document.createElement("iframe"), {
+                               frameBorder: 0,
+                               width: 0,
+                               height: 0
+                       })
+               );
+
+               // Create a cacheable copy of the iframe document on first call.
+               // IE and Opera will allow us to reuse the iframeDoc without re-writing the fake HTML
+               // document to it; WebKit & Firefox won't allow reusing the iframe document.
+               if ( !iframeDoc || !iframe.createElement ) {
+                       iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
+                       iframeDoc.write("<!doctype html><html><body>");
+                       iframeDoc.close();
+               }
+
+               elem = iframeDoc.body.appendChild( iframeDoc.createElement(nodeName) );
+
+               display = curCSS( elem, "display" );
+               document.body.removeChild( iframe );
+       }
+
+       // Store the correct default display
+       elemdisplay[ nodeName ] = display;
+
+       return display;
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+       jQuery.cssHooks[ name ] = {
+               get: function( elem, computed, extra ) {
+                       if ( computed ) {
+                               // certain elements can have dimension info if we invisibly show them
+                               // however, it must have a current display style that would benefit from this
+                               if ( elem.offsetWidth === 0 && rdisplayswap.test( curCSS( elem, "display" ) ) ) {
+                                       return jQuery.swap( elem, cssShow, function() {
+                                               return getWidthOrHeight( elem, name, extra );
+                                       });
+                               } else {
+                                       return getWidthOrHeight( elem, name, extra );
+                               }
+                       }
+               },
+
+               set: function( elem, value, extra ) {
+                       return setPositiveNumber( elem, value, extra ?
+                               augmentWidthOrHeight(
+                                       elem,
+                                       name,
+                                       extra,
+                                       jQuery.support.boxSizing && jQuery.css( elem, "boxSizing" ) === "border-box"
+                               ) : 0
+                       );
+               }
+       };
+});
+
+if ( !jQuery.support.opacity ) {
+       jQuery.cssHooks.opacity = {
+               get: function( elem, computed ) {
+                       // IE uses filters for opacity
+                       return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+                               ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
+                               computed ? "1" : "";
+               },
+
+               set: function( elem, value ) {
+                       var style = elem.style,
+                               currentStyle = elem.currentStyle,
+                               opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+                               filter = currentStyle && currentStyle.filter || style.filter || "";
+
+                       // IE has trouble with opacity if it does not have layout
+                       // Force it by setting the zoom level
+                       style.zoom = 1;
+
+                       // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+                       if ( value >= 1 && jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
+                               style.removeAttribute ) {
+
+                               // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+                               // if "filter:" is present at all, clearType is disabled, we want to avoid this
+                               // style.removeAttribute is IE Only, but so apparently is this code path...
+                               style.removeAttribute( "filter" );
+
+                               // if there there is no filter style applied in a css rule, we are done
+                               if ( currentStyle && !currentStyle.filter ) {
+                                       return;
+                               }
+                       }
+
+                       // otherwise, set new filter values
+                       style.filter = ralpha.test( filter ) ?
+                               filter.replace( ralpha, opacity ) :
+                               filter + " " + opacity;
+               }
+       };
+}
+
+// These hooks cannot be added until DOM ready because the support test
+// for it is not run until after DOM ready
+jQuery(function() {
+       if ( !jQuery.support.reliableMarginRight ) {
+               jQuery.cssHooks.marginRight = {
+                       get: function( elem, computed ) {
+                               // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+                               // Work around by temporarily setting element display to inline-block
+                               return jQuery.swap( elem, { "display": "inline-block" }, function() {
+                                       if ( computed ) {
+                                               return curCSS( elem, "marginRight" );
+                                       }
+                               });
+                       }
+               };
+       }
+
+       // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+       // getComputedStyle returns percent when specified for top/left/bottom/right
+       // rather than make the css module depend on the offset module, we just check for it here
+       if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
+               jQuery.each( [ "top", "left" ], function( i, prop ) {
+                       jQuery.cssHooks[ prop ] = {
+                               get: function( elem, computed ) {
+                                       if ( computed ) {
+                                               var ret = curCSS( elem, prop );
+                                               // if curCSS returns percentage, fallback to offset
+                                               return rnumnonpx.test( ret ) ? jQuery( elem ).position()[ prop ] + "px" : ret;
+                                       }
+                               }
+                       };
+               });
+       }
+
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+       jQuery.expr.filters.hidden = function( elem ) {
+               return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || curCSS( elem, "display" )) === "none");
+       };
+
+       jQuery.expr.filters.visible = function( elem ) {
+               return !jQuery.expr.filters.hidden( elem );
+       };
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+       margin: "",
+       padding: "",
+       border: "Width"
+}, function( prefix, suffix ) {
+       jQuery.cssHooks[ prefix + suffix ] = {
+               expand: function( value ) {
+                       var i,
+
+                               // assumes a single number if not a string
+                               parts = typeof value === "string" ? value.split(" ") : [ value ],
+                               expanded = {};
+
+                       for ( i = 0; i < 4; i++ ) {
+                               expanded[ prefix + cssExpand[ i ] + suffix ] =
+                                       parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+                       }
+
+                       return expanded;
+               }
+       };
+
+       if ( !rmargin.test( prefix ) ) {
+               jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+       }
+});
+var r20 = /%20/g,
+       rbracket = /\[\]$/,
+       rCRLF = /\r?\n/g,
+       rinput = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
+       rselectTextarea = /^(?:select|textarea)/i;
+
+jQuery.fn.extend({
+       serialize: function() {
+               return jQuery.param( this.serializeArray() );
+       },
+       serializeArray: function() {
+               return this.map(function(){
+                       return this.elements ? jQuery.makeArray( this.elements ) : this;
+               })
+               .filter(function(){
+                       return this.name && !this.disabled &&
+                               ( this.checked || rselectTextarea.test( this.nodeName ) ||
+                                       rinput.test( this.type ) );
+               })
+               .map(function( i, elem ){
+                       var val = jQuery( this ).val();
+
+                       return val == null ?
+                               null :
+                               jQuery.isArray( val ) ?
+                                       jQuery.map( val, function( val, i ){
+                                               return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+                                       }) :
+                                       { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+               }).get();
+       }
+});
+
+//Serialize an array of form elements or a set of
+//key/values into a query string
+jQuery.param = function( a, traditional ) {
+       var prefix,
+               s = [],
+               add = function( key, value ) {
+                       // If value is a function, invoke it and return its value
+                       value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+                       s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+               };
+
+       // Set traditional to true for jQuery <= 1.3.2 behavior.
+       if ( traditional === undefined ) {
+               traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+       }
+
+       // If an array was passed in, assume that it is an array of form elements.
+       if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+               // Serialize the form elements
+               jQuery.each( a, function() {
+                       add( this.name, this.value );
+               });
+
+       } else {
+               // If traditional, encode the "old" way (the way 1.3.2 or older
+               // did it), otherwise encode params recursively.
+               for ( prefix in a ) {
+                       buildParams( prefix, a[ prefix ], traditional, add );
+               }
+       }
+
+       // Return the resulting serialization
+       return s.join( "&" ).replace( r20, "+" );
+};
+
+function buildParams( prefix, obj, traditional, add ) {
+       var name;
+
+       if ( jQuery.isArray( obj ) ) {
+               // Serialize array item.
+               jQuery.each( obj, function( i, v ) {
+                       if ( traditional || rbracket.test( prefix ) ) {
+                               // Treat each array item as a scalar.
+                               add( prefix, v );
+
+                       } else {
+                               // If array item is non-scalar (array or object), encode its
+                               // numeric index to resolve deserialization ambiguity issues.
+                               // Note that rack (as of 1.0.0) can't currently deserialize
+                               // nested arrays properly, and attempting to do so may cause
+                               // a server error. Possible fixes are to modify rack's
+                               // deserialization algorithm or to provide an option or flag
+                               // to force array serialization to be shallow.
+                               buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+                       }
+               });
+
+       } else if ( !traditional && jQuery.type( obj ) === "object" ) {
+               // Serialize object item.
+               for ( name in obj ) {
+                       buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+               }
+
+       } else {
+               // Serialize scalar item.
+               add( prefix, obj );
+       }
+}
+var
+       // Document location
+       ajaxLocParts,
+       ajaxLocation,
+
+       rhash = /#.*$/,
+       rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+       // #7653, #8125, #8152: local protocol detection
+       rlocalProtocol = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
+       rnoContent = /^(?:GET|HEAD)$/,
+       rprotocol = /^\/\//,
+       rquery = /\?/,
+       rscript = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
+       rts = /([?&])_=[^&]*/,
+       rurl = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
+
+       // Keep a copy of the old load method
+       _load = jQuery.fn.load,
+
+       /* Prefilters
+        * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+        * 2) These are called:
+        *    - BEFORE asking for a transport
+        *    - AFTER param serialization (s.data is a string if s.processData is true)
+        * 3) key is the dataType
+        * 4) the catchall symbol "*" can be used
+        * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+        */
+       prefilters = {},
+
+       /* Transports bindings
+        * 1) key is the dataType
+        * 2) the catchall symbol "*" can be used
+        * 3) selection will start with transport dataType and THEN go to "*" if needed
+        */
+       transports = {},
+
+       // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+       allTypes = ["*/"] + ["*"];
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+       ajaxLocation = location.href;
+} catch( e ) {
+       // Use the href attribute of an A element
+       // since IE will modify it given document.location
+       ajaxLocation = document.createElement( "a" );
+       ajaxLocation.href = "";
+       ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+       // dataTypeExpression is optional and defaults to "*"
+       return function( dataTypeExpression, func ) {
+
+               if ( typeof dataTypeExpression !== "string" ) {
+                       func = dataTypeExpression;
+                       dataTypeExpression = "*";
+               }
+
+               var dataType, list, placeBefore,
+                       dataTypes = dataTypeExpression.toLowerCase().split( core_rspace ),
+                       i = 0,
+                       length = dataTypes.length;
+
+               if ( jQuery.isFunction( func ) ) {
+                       // For each dataType in the dataTypeExpression
+                       for ( ; i < length; i++ ) {
+                               dataType = dataTypes[ i ];
+                               // We control if we're asked to add before
+                               // any existing element
+                               placeBefore = /^\+/.test( dataType );
+                               if ( placeBefore ) {
+                                       dataType = dataType.substr( 1 ) || "*";
+                               }
+                               list = structure[ dataType ] = structure[ dataType ] || [];
+                               // then we add to the structure accordingly
+                               list[ placeBefore ? "unshift" : "push" ]( func );
+                       }
+               }
+       };
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR,
+               dataType /* internal */, inspected /* internal */ ) {
+
+       dataType = dataType || options.dataTypes[ 0 ];
+       inspected = inspected || {};
+
+       inspected[ dataType ] = true;
+
+       var selection,
+               list = structure[ dataType ],
+               i = 0,
+               length = list ? list.length : 0,
+               executeOnly = ( structure === prefilters );
+
+       for ( ; i < length && ( executeOnly || !selection ); i++ ) {
+               selection = list[ i ]( options, originalOptions, jqXHR );
+               // If we got redirected to another dataType
+               // we try there if executing only and not done already
+               if ( typeof selection === "string" ) {
+                       if ( !executeOnly || inspected[ selection ] ) {
+                               selection = undefined;
+                       } else {
+                               options.dataTypes.unshift( selection );
+                               selection = inspectPrefiltersOrTransports(
+                                               structure, options, originalOptions, jqXHR, selection, inspected );
+                       }
+               }
+       }
+       // If we're only executing or nothing was selected
+       // we try the catchall dataType if not done already
+       if ( ( executeOnly || !selection ) && !inspected[ "*" ] ) {
+               selection = inspectPrefiltersOrTransports(
+                               structure, options, originalOptions, jqXHR, "*", inspected );
+       }
+       // unnecessary when only executing (prefilters)
+       // but it'll be ignored by the caller in that case
+       return selection;
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+       var key, deep,
+               flatOptions = jQuery.ajaxSettings.flatOptions || {};
+       for ( key in src ) {
+               if ( src[ key ] !== undefined ) {
+                       ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
+               }
+       }
+       if ( deep ) {
+               jQuery.extend( true, target, deep );
+       }
+}
+
+jQuery.fn.load = function( url, params, callback ) {
+       if ( typeof url !== "string" && _load ) {
+               return _load.apply( this, arguments );
+       }
+
+       // Don't do a request if no elements are being requested
+       if ( !this.length ) {
+               return this;
+       }
+
+       var selector, type, response,
+               self = this,
+               off = url.indexOf(" ");
+
+       if ( off >= 0 ) {
+               selector = url.slice( off, url.length );
+               url = url.slice( 0, off );
+       }
+
+       // If it's a function
+       if ( jQuery.isFunction( params ) ) {
+
+               // We assume that it's the callback
+               callback = params;
+               params = undefined;
+
+       // Otherwise, build a param string
+       } else if ( params && typeof params === "object" ) {
+               type = "POST";
+       }
+
+       // Request the remote document
+       jQuery.ajax({
+               url: url,
+
+               // if "type" variable is undefined, then "GET" method will be used
+               type: type,
+               dataType: "html",
+               data: params,
+               complete: function( jqXHR, status ) {
+                       if ( callback ) {
+                               self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+                       }
+               }
+       }).done(function( responseText ) {
+
+               // Save response for use in complete callback
+               response = arguments;
+
+               // See if a selector was specified
+               self.html( selector ?
+
+                       // Create a dummy div to hold the results
+                       jQuery("<div>")
+
+                               // inject the contents of the document in, removing the scripts
+                               // to avoid any 'Permission Denied' errors in IE
+                               .append( responseText.replace( rscript, "" ) )
+
+                               // Locate the specified elements
+                               .find( selector ) :
+
+                       // If not, just inject the full result
+                       responseText );
+
+       });
+
+       return this;
+};
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split( " " ), function( i, o ){
+       jQuery.fn[ o ] = function( f ){
+               return this.on( o, f );
+       };
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+       jQuery[ method ] = function( url, data, callback, type ) {
+               // shift arguments if data argument was omitted
+               if ( jQuery.isFunction( data ) ) {
+                       type = type || callback;
+                       callback = data;
+                       data = undefined;
+               }
+
+               return jQuery.ajax({
+                       type: method,
+                       url: url,
+                       data: data,
+                       success: callback,
+                       dataType: type
+               });
+       };
+});
+
+jQuery.extend({
+
+       getScript: function( url, callback ) {
+               return jQuery.get( url, undefined, callback, "script" );
+       },
+
+       getJSON: function( url, data, callback ) {
+               return jQuery.get( url, data, callback, "json" );
+       },
+
+       // Creates a full fledged settings object into target
+       // with both ajaxSettings and settings fields.
+       // If target is omitted, writes into ajaxSettings.
+       ajaxSetup: function( target, settings ) {
+               if ( settings ) {
+                       // Building a settings object
+                       ajaxExtend( target, jQuery.ajaxSettings );
+               } else {
+                       // Extending ajaxSettings
+                       settings = target;
+                       target = jQuery.ajaxSettings;
+               }
+               ajaxExtend( target, settings );
+               return target;
+       },
+
+       ajaxSettings: {
+               url: ajaxLocation,
+               isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+               global: true,
+               type: "GET",
+               contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+               processData: true,
+               async: true,
+               /*
+               timeout: 0,
+               data: null,
+               dataType: null,
+               username: null,
+               password: null,
+               cache: null,
+               throws: false,
+               traditional: false,
+               headers: {},
+               */
+
+               accepts: {
+                       xml: "application/xml, text/xml",
+                       html: "text/html",
+                       text: "text/plain",
+                       json: "application/json, text/javascript",
+                       "*": allTypes
+               },
+
+               contents: {
+                       xml: /xml/,
+                       html: /html/,
+                       json: /json/
+               },
+
+               responseFields: {
+                       xml: "responseXML",
+                       text: "responseText"
+               },
+
+               // List of data converters
+               // 1) key format is "source_type destination_type" (a single space in-between)
+               // 2) the catchall symbol "*" can be used for source_type
+               converters: {
+
+                       // Convert anything to text
+                       "* text": window.String,
+
+                       // Text to html (true = no transformation)
+                       "text html": true,
+
+                       // Evaluate text as a json expression
+                       "text json": jQuery.parseJSON,
+
+                       // Parse text as xml
+                       "text xml": jQuery.parseXML
+               },
+
+               // For options that shouldn't be deep extended:
+               // you can add your own custom options here if
+               // and when you create one that shouldn't be
+               // deep extended (see ajaxExtend)
+               flatOptions: {
+                       context: true,
+                       url: true
+               }
+       },
+
+       ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+       ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+       // Main method
+       ajax: function( url, options ) {
+
+               // If url is an object, simulate pre-1.5 signature
+               if ( typeof url === "object" ) {
+                       options = url;
+                       url = undefined;
+               }
+
+               // Force options to be an object
+               options = options || {};
+
+               var // ifModified key
+                       ifModifiedKey,
+                       // Response headers
+                       responseHeadersString,
+                       responseHeaders,
+                       // transport
+                       transport,
+                       // timeout handle
+                       timeoutTimer,
+                       // Cross-domain detection vars
+                       parts,
+                       // To know if global events are to be dispatched
+                       fireGlobals,
+                       // Loop variable
+                       i,
+                       // Create the final options object
+                       s = jQuery.ajaxSetup( {}, options ),
+                       // Callbacks context
+                       callbackContext = s.context || s,
+                       // Context for global events
+                       // It's the callbackContext if one was provided in the options
+                       // and if it's a DOM node or a jQuery collection
+                       globalEventContext = callbackContext !== s &&
+                               ( callbackContext.nodeType || callbackContext instanceof jQuery ) ?
+                                               jQuery( callbackContext ) : jQuery.event,
+                       // Deferreds
+                       deferred = jQuery.Deferred(),
+                       completeDeferred = jQuery.Callbacks( "once memory" ),
+                       // Status-dependent callbacks
+                       statusCode = s.statusCode || {},
+                       // Headers (they are sent all at once)
+                       requestHeaders = {},
+                       requestHeadersNames = {},
+                       // The jqXHR state
+                       state = 0,
+                       // Default abort message
+                       strAbort = "canceled",
+                       // Fake xhr
+                       jqXHR = {
+
+                               readyState: 0,
+
+                               // Caches the header
+                               setRequestHeader: function( name, value ) {
+                                       if ( !state ) {
+                                               var lname = name.toLowerCase();
+                                               name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+                                               requestHeaders[ name ] = value;
+                                       }
+                                       return this;
+                               },
+
+                               // Raw string
+                               getAllResponseHeaders: function() {
+                                       return state === 2 ? responseHeadersString : null;
+                               },
+
+                               // Builds headers hashtable if needed
+                               getResponseHeader: function( key ) {
+                                       var match;
+                                       if ( state === 2 ) {
+                                               if ( !responseHeaders ) {
+                                                       responseHeaders = {};
+                                                       while( ( match = rheaders.exec( responseHeadersString ) ) ) {
+                                                               responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+                                                       }
+                                               }
+                                               match = responseHeaders[ key.toLowerCase() ];
+                                       }
+                                       return match === undefined ? null : match;
+                               },
+
+                               // Overrides response content-type header
+                               overrideMimeType: function( type ) {
+                                       if ( !state ) {
+                                               s.mimeType = type;
+                                       }
+                                       return this;
+                               },
+
+                               // Cancel the request
+                               abort: function( statusText ) {
+                                       statusText = statusText || strAbort;
+                                       if ( transport ) {
+                                               transport.abort( statusText );
+                                       }
+                                       done( 0, statusText );
+                                       return this;
+                               }
+                       };
+
+               // Callback for when everything is done
+               // It is defined here because jslint complains if it is declared
+               // at the end of the function (which would be more logical and readable)
+               function done( status, nativeStatusText, responses, headers ) {
+                       var isSuccess, success, error, response, modified,
+                               statusText = nativeStatusText;
+
+                       // Called once
+                       if ( state === 2 ) {
+                               return;
+                       }
+
+                       // State is "done" now
+                       state = 2;
+
+                       // Clear timeout if it exists
+                       if ( timeoutTimer ) {
+                               clearTimeout( timeoutTimer );
+                       }
+
+                       // Dereference transport for early garbage collection
+                       // (no matter how long the jqXHR object will be used)
+                       transport = undefined;
+
+                       // Cache response headers
+                       responseHeadersString = headers || "";
+
+                       // Set readyState
+                       jqXHR.readyState = status > 0 ? 4 : 0;
+
+                       // Get response data
+                       if ( responses ) {
+                               response = ajaxHandleResponses( s, jqXHR, responses );
+                       }
+
+                       // If successful, handle type chaining
+                       if ( status >= 200 && status < 300 || status === 304 ) {
+
+                               // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+                               if ( s.ifModified ) {
+
+                                       modified = jqXHR.getResponseHeader("Last-Modified");
+                                       if ( modified ) {
+                                               jQuery.lastModified[ ifModifiedKey ] = modified;
+                                       }
+                                       modified = jqXHR.getResponseHeader("Etag");
+                                       if ( modified ) {
+                                               jQuery.etag[ ifModifiedKey ] = modified;
+                                       }
+                               }
+
+                               // If not modified
+                               if ( status === 304 ) {
+
+                                       statusText = "notmodified";
+                                       isSuccess = true;
+
+                               // If we have data
+                               } else {
+
+                                       isSuccess = ajaxConvert( s, response );
+                                       statusText = isSuccess.state;
+                                       success = isSuccess.data;
+                                       error = isSuccess.error;
+                                       isSuccess = !error;
+                               }
+                       } else {
+                               // We extract error from statusText
+                               // then normalize statusText and status for non-aborts
+                               error = statusText;
+                               if ( !statusText || status ) {
+                                       statusText = "error";
+                                       if ( status < 0 ) {
+                                               status = 0;
+                                       }
+                               }
+                       }
+
+                       // Set data for the fake xhr object
+                       jqXHR.status = status;
+                       jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+                       // Success/Error
+                       if ( isSuccess ) {
+                               deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+                       } else {
+                               deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+                       }
+
+                       // Status-dependent callbacks
+                       jqXHR.statusCode( statusCode );
+                       statusCode = undefined;
+
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajax" + ( isSuccess ? "Success" : "Error" ),
+                                               [ jqXHR, s, isSuccess ? success : error ] );
+                       }
+
+                       // Complete
+                       completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+                               // Handle the global AJAX counter
+                               if ( !( --jQuery.active ) ) {
+                                       jQuery.event.trigger( "ajaxStop" );
+                               }
+                       }
+               }
+
+               // Attach deferreds
+               deferred.promise( jqXHR );
+               jqXHR.success = jqXHR.done;
+               jqXHR.error = jqXHR.fail;
+               jqXHR.complete = completeDeferred.add;
+
+               // Status-dependent callbacks
+               jqXHR.statusCode = function( map ) {
+                       if ( map ) {
+                               var tmp;
+                               if ( state < 2 ) {
+                                       for ( tmp in map ) {
+                                               statusCode[ tmp ] = [ statusCode[tmp], map[tmp] ];
+                                       }
+                               } else {
+                                       tmp = map[ jqXHR.status ];
+                                       jqXHR.always( tmp );
+                               }
+                       }
+                       return this;
+               };
+
+               // Remove hash character (#7531: and string promotion)
+               // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+               // We also use the url parameter if available
+               s.url = ( ( url || s.url ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+               // Extract dataTypes list
+               s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().split( core_rspace );
+
+               // A cross-domain request is in order when we have a protocol:host:port mismatch
+               if ( s.crossDomain == null ) {
+                       parts = rurl.exec( s.url.toLowerCase() ) || false;
+                       s.crossDomain = parts && ( parts.join(":") + ( parts[ 3 ] ? "" : parts[ 1 ] === "http:" ? 80 : 443 ) ) !==
+                               ( ajaxLocParts.join(":") + ( ajaxLocParts[ 3 ] ? "" : ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) );
+               }
+
+               // Convert data if not already a string
+               if ( s.data && s.processData && typeof s.data !== "string" ) {
+                       s.data = jQuery.param( s.data, s.traditional );
+               }
+
+               // Apply prefilters
+               inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+               // If request was aborted inside a prefilter, stop there
+               if ( state === 2 ) {
+                       return jqXHR;
+               }
+
+               // We can fire global events as of now if asked to
+               fireGlobals = s.global;
+
+               // Uppercase the type
+               s.type = s.type.toUpperCase();
+
+               // Determine if request has content
+               s.hasContent = !rnoContent.test( s.type );
+
+               // Watch for a new set of requests
+               if ( fireGlobals && jQuery.active++ === 0 ) {
+                       jQuery.event.trigger( "ajaxStart" );
+               }
+
+               // More options handling for requests with no content
+               if ( !s.hasContent ) {
+
+                       // If data is available, append data to url
+                       if ( s.data ) {
+                               s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.data;
+                               // #9682: remove data so that it's not used in an eventual retry
+                               delete s.data;
+                       }
+
+                       // Get ifModifiedKey before adding the anti-cache parameter
+                       ifModifiedKey = s.url;
+
+                       // Add anti-cache in url if needed
+                       if ( s.cache === false ) {
+
+                               var ts = jQuery.now(),
+                                       // try replacing _= if it is there
+                                       ret = s.url.replace( rts, "$1_=" + ts );
+
+                               // if nothing was replaced, add timestamp to the end
+                               s.url = ret + ( ( ret === s.url ) ? ( rquery.test( s.url ) ? "&" : "?" ) + "_=" + ts : "" );
+                       }
+               }
+
+               // Set the correct header, if data is being sent
+               if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+                       jqXHR.setRequestHeader( "Content-Type", s.contentType );
+               }
+
+               // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+               if ( s.ifModified ) {
+                       ifModifiedKey = ifModifiedKey || s.url;
+                       if ( jQuery.lastModified[ ifModifiedKey ] ) {
+                               jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ ifModifiedKey ] );
+                       }
+                       if ( jQuery.etag[ ifModifiedKey ] ) {
+                               jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ ifModifiedKey ] );
+                       }
+               }
+
+               // Set the Accepts header for the server, depending on the dataType
+               jqXHR.setRequestHeader(
+                       "Accept",
+                       s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+                               s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+                               s.accepts[ "*" ]
+               );
+
+               // Check for headers option
+               for ( i in s.headers ) {
+                       jqXHR.setRequestHeader( i, s.headers[ i ] );
+               }
+
+               // Allow custom headers/mimetypes and early abort
+               if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+                               // Abort if not done already and return
+                               return jqXHR.abort();
+
+               }
+
+               // aborting is no longer a cancellation
+               strAbort = "abort";
+
+               // Install callbacks on deferreds
+               for ( i in { success: 1, error: 1, complete: 1 } ) {
+                       jqXHR[ i ]( s[ i ] );
+               }
+
+               // Get transport
+               transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+               // If no transport, we auto-abort
+               if ( !transport ) {
+                       done( -1, "No Transport" );
+               } else {
+                       jqXHR.readyState = 1;
+                       // Send global event
+                       if ( fireGlobals ) {
+                               globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+                       }
+                       // Timeout
+                       if ( s.async && s.timeout > 0 ) {
+                               timeoutTimer = setTimeout( function(){
+                                       jqXHR.abort( "timeout" );
+                               }, s.timeout );
+                       }
+
+                       try {
+                               state = 1;
+                               transport.send( requestHeaders, done );
+                       } catch (e) {
+                               // Propagate exception as error if not done
+                               if ( state < 2 ) {
+                                       done( -1, e );
+                               // Simply rethrow otherwise
+                               } else {
+                                       throw e;
+                               }
+                       }
+               }
+
+               return jqXHR;
+       },
+
+       // Counter for holding the number of active queries
+       active: 0,
+
+       // Last-Modified header cache for next request
+       lastModified: {},
+       etag: {}
+
+});
+
+/* Handles responses to an ajax request:
+ * - sets all responseXXX fields accordingly
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+
+       var ct, type, finalDataType, firstDataType,
+               contents = s.contents,
+               dataTypes = s.dataTypes,
+               responseFields = s.responseFields;
+
+       // Fill responseXXX fields
+       for ( type in responseFields ) {
+               if ( type in responses ) {
+                       jqXHR[ responseFields[type] ] = responses[ type ];
+               }
+       }
+
+       // Remove auto dataType and get content-type in the process
+       while( dataTypes[ 0 ] === "*" ) {
+               dataTypes.shift();
+               if ( ct === undefined ) {
+                       ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
+               }
+       }
+
+       // Check if we're dealing with a known content-type
+       if ( ct ) {
+               for ( type in contents ) {
+                       if ( contents[ type ] && contents[ type ].test( ct ) ) {
+                               dataTypes.unshift( type );
+                               break;
+                       }
+               }
+       }
+
+       // Check to see if we have a response for the expected dataType
+       if ( dataTypes[ 0 ] in responses ) {
+               finalDataType = dataTypes[ 0 ];
+       } else {
+               // Try convertible dataTypes
+               for ( type in responses ) {
+                       if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+                               finalDataType = type;
+                               break;
+                       }
+                       if ( !firstDataType ) {
+                               firstDataType = type;
+                       }
+               }
+               // Or just use first one
+               finalDataType = finalDataType || firstDataType;
+       }
+
+       // If we found a dataType
+       // We add the dataType to the list if needed
+       // and return the corresponding response
+       if ( finalDataType ) {
+               if ( finalDataType !== dataTypes[ 0 ] ) {
+                       dataTypes.unshift( finalDataType );
+               }
+               return responses[ finalDataType ];
+       }
+}
+
+// Chain conversions given the request and the original response
+function ajaxConvert( s, response ) {
+
+       var conv, conv2, current, tmp,
+               // Work with a copy of dataTypes in case we need to modify it for conversion
+               dataTypes = s.dataTypes.slice(),
+               prev = dataTypes[ 0 ],
+               converters = {},
+               i = 0;
+
+       // Apply the dataFilter if provided
+       if ( s.dataFilter ) {
+               response = s.dataFilter( response, s.dataType );
+       }
+
+       // Create converters map with lowercased keys
+       if ( dataTypes[ 1 ] ) {
+               for ( conv in s.converters ) {
+                       converters[ conv.toLowerCase() ] = s.converters[ conv ];
+               }
+       }
+
+       // Convert to each sequential dataType, tolerating list modification
+       for ( ; (current = dataTypes[++i]); ) {
+
+               // There's only work to do if current dataType is non-auto
+               if ( current !== "*" ) {
+
+                       // Convert response if prev dataType is non-auto and differs from current
+                       if ( prev !== "*" && prev !== current ) {
+
+                               // Seek a direct converter
+                               conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+                               // If none found, seek a pair
+                               if ( !conv ) {
+                                       for ( conv2 in converters ) {
+
+                                               // If conv2 outputs current
+                                               tmp = conv2.split(" ");
+                                               if ( tmp[ 1 ] === current ) {
+
+                                                       // If prev can be converted to accepted input
+                                                       conv = converters[ prev + " " + tmp[ 0 ] ] ||
+                                                               converters[ "* " + tmp[ 0 ] ];
+                                                       if ( conv ) {
+                                                               // Condense equivalence converters
+                                                               if ( conv === true ) {
+                                                                       conv = converters[ conv2 ];
+
+                                                               // Otherwise, insert the intermediate dataType
+                                                               } else if ( converters[ conv2 ] !== true ) {
+                                                                       current = tmp[ 0 ];
+                                                                       dataTypes.splice( i--, 0, current );
+                                                               }
+
+                                                               break;
+                                                       }
+                                               }
+                                       }
+                               }
+
+                               // Apply converter (if not an equivalence)
+                               if ( conv !== true ) {
+
+                                       // Unless errors are allowed to bubble, catch and return them
+                                       if ( conv && s["throws"] ) {
+                                               response = conv( response );
+                                       } else {
+                                               try {
+                                                       response = conv( response );
+                                               } catch ( e ) {
+                                                       return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+                                               }
+                                       }
+                               }
+                       }
+
+                       // Update prev for next iteration
+                       prev = current;
+               }
+       }
+
+       return { state: "success", data: response };
+}
+var oldCallbacks = [],
+       rquestion = /\?/,
+       rjsonp = /(=)\?(?=&|$)|\?\?/,
+       nonce = jQuery.now();
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+       jsonp: "callback",
+       jsonpCallback: function() {
+               var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
+               this[ callback ] = true;
+               return callback;
+       }
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+       var callbackName, overwritten, responseContainer,
+               data = s.data,
+               url = s.url,
+               hasCallback = s.jsonp !== false,
+               replaceInUrl = hasCallback && rjsonp.test( url ),
+               replaceInData = hasCallback && !replaceInUrl && typeof data === "string" &&
+                       !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") &&
+                       rjsonp.test( data );
+
+       // Handle iff the expected data type is "jsonp" or we have a parameter to set
+       if ( s.dataTypes[ 0 ] === "jsonp" || replaceInUrl || replaceInData ) {
+
+               // Get callback name, remembering preexisting value associated with it
+               callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+                       s.jsonpCallback() :
+                       s.jsonpCallback;
+               overwritten = window[ callbackName ];
+
+               // Insert callback into url or form data
+               if ( replaceInUrl ) {
+                       s.url = url.replace( rjsonp, "$1" + callbackName );
+               } else if ( replaceInData ) {
+                       s.data = data.replace( rjsonp, "$1" + callbackName );
+               } else if ( hasCallback ) {
+                       s.url += ( rquestion.test( url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+               }
+
+               // Use data converter to retrieve json after script execution
+               s.converters["script json"] = function() {
+                       if ( !responseContainer ) {
+                               jQuery.error( callbackName + " was not called" );
+                       }
+                       return responseContainer[ 0 ];
+               };
+
+               // force json dataType
+               s.dataTypes[ 0 ] = "json";
+
+               // Install callback
+               window[ callbackName ] = function() {
+                       responseContainer = arguments;
+               };
+
+               // Clean-up function (fires after converters)
+               jqXHR.always(function() {
+                       // Restore preexisting value
+                       window[ callbackName ] = overwritten;
+
+                       // Save back as free
+                       if ( s[ callbackName ] ) {
+                               // make sure that re-using the options doesn't screw things around
+                               s.jsonpCallback = originalSettings.jsonpCallback;
+
+                               // save the callback name for future use
+                               oldCallbacks.push( callbackName );
+                       }
+
+                       // Call if it was a function and we have a response
+                       if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+                               overwritten( responseContainer[ 0 ] );
+                       }
+
+                       responseContainer = overwritten = undefined;
+               });
+
+               // Delegate to script
+               return "script";
+       }
+});
+// Install script dataType
+jQuery.ajaxSetup({
+       accepts: {
+               script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+       },
+       contents: {
+               script: /javascript|ecmascript/
+       },
+       converters: {
+               "text script": function( text ) {
+                       jQuery.globalEval( text );
+                       return text;
+               }
+       }
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+       if ( s.cache === undefined ) {
+               s.cache = false;
+       }
+       if ( s.crossDomain ) {
+               s.type = "GET";
+               s.global = false;
+       }
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+       // This transport only deals with cross domain requests
+       if ( s.crossDomain ) {
+
+               var script,
+                       head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
+
+               return {
+
+                       send: function( _, callback ) {
+
+                               script = document.createElement( "script" );
+
+                               script.async = "async";
+
+                               if ( s.scriptCharset ) {
+                                       script.charset = s.scriptCharset;
+                               }
+
+                               script.src = s.url;
+
+                               // Attach handlers for all browsers
+                               script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+                                       if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+                                               // Handle memory leak in IE
+                                               script.onload = script.onreadystatechange = null;
+
+                                               // Remove the script
+                                               if ( head && script.parentNode ) {
+                                                       head.removeChild( script );
+                                               }
+
+                                               // Dereference the script
+                                               script = undefined;
+
+                                               // Callback if not abort
+                                               if ( !isAbort ) {
+                                                       callback( 200, "success" );
+                                               }
+                                       }
+                               };
+                               // Use insertBefore instead of appendChild  to circumvent an IE6 bug.
+                               // This arises when a base node is used (#2709 and #4378).
+                               head.insertBefore( script, head.firstChild );
+                       },
+
+                       abort: function() {
+                               if ( script ) {
+                                       script.onload( 0, 1 );
+                               }
+                       }
+               };
+       }
+});
+var xhrCallbacks,
+       // #5280: Internet Explorer will keep connections alive if we don't abort on unload
+       xhrOnUnloadAbort = window.ActiveXObject ? function() {
+               // Abort all pending requests
+               for ( var key in xhrCallbacks ) {
+                       xhrCallbacks[ key ]( 0, 1 );
+               }
+       } : false,
+       xhrId = 0;
+
+// Functions to create xhrs
+function createStandardXHR() {
+       try {
+               return new window.XMLHttpRequest();
+       } catch( e ) {}
+}
+
+function createActiveXHR() {
+       try {
+               return new window.ActiveXObject( "Microsoft.XMLHTTP" );
+       } catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+       /* Microsoft failed to properly
+        * implement the XMLHttpRequest in IE7 (can't request local files),
+        * so we use the ActiveXObject when it is available
+        * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+        * we need a fallback.
+        */
+       function() {
+               return !this.isLocal && createStandardXHR() || createActiveXHR();
+       } :
+       // For all other browsers, use the standard XMLHttpRequest object
+       createStandardXHR;
+
+// Determine support properties
+(function( xhr ) {
+       jQuery.extend( jQuery.support, {
+               ajax: !!xhr,
+               cors: !!xhr && ( "withCredentials" in xhr )
+       });
+})( jQuery.ajaxSettings.xhr() );
+
+// Create transport if the browser can provide an xhr
+if ( jQuery.support.ajax ) {
+
+       jQuery.ajaxTransport(function( s ) {
+               // Cross domain only allowed if supported through XMLHttpRequest
+               if ( !s.crossDomain || jQuery.support.cors ) {
+
+                       var callback;
+
+                       return {
+                               send: function( headers, complete ) {
+
+                                       // Get a new xhr
+                                       var handle, i,
+                                               xhr = s.xhr();
+
+                                       // Open the socket
+                                       // Passing null username, generates a login popup on Opera (#2865)
+                                       if ( s.username ) {
+                                               xhr.open( s.type, s.url, s.async, s.username, s.password );
+                                       } else {
+                                               xhr.open( s.type, s.url, s.async );
+                                       }
+
+                                       // Apply custom fields if provided
+                                       if ( s.xhrFields ) {
+                                               for ( i in s.xhrFields ) {
+                                                       xhr[ i ] = s.xhrFields[ i ];
+                                               }
+                                       }
+
+                                       // Override mime type if needed
+                                       if ( s.mimeType && xhr.overrideMimeType ) {
+                                               xhr.overrideMimeType( s.mimeType );
+                                       }
+
+                                       // X-Requested-With header
+                                       // For cross-domain requests, seeing as conditions for a preflight are
+                                       // akin to a jigsaw puzzle, we simply never set it to be sure.
+                                       // (it can always be set on a per-request basis or even using ajaxSetup)
+                                       // For same-domain requests, won't change header if already provided.
+                                       if ( !s.crossDomain && !headers["X-Requested-With"] ) {
+                                               headers[ "X-Requested-With" ] = "XMLHttpRequest";
+                                       }
+
+                                       // Need an extra try/catch for cross domain requests in Firefox 3
+                                       try {
+                                               for ( i in headers ) {
+                                                       xhr.setRequestHeader( i, headers[ i ] );
+                                               }
+                                       } catch( _ ) {}
+
+                                       // Do send the request
+                                       // This may raise an exception which is actually
+                                       // handled in jQuery.ajax (so no try/catch here)
+                                       xhr.send( ( s.hasContent && s.data ) || null );
+
+                                       // Listener
+                                       callback = function( _, isAbort ) {
+
+                                               var status,
+                                                       statusText,
+                                                       responseHeaders,
+                                                       responses,
+                                                       xml;
+
+                                               // Firefox throws exceptions when accessing properties
+                                               // of an xhr when a network error occurred
+                                               // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+                                               try {
+
+                                                       // Was never called and is aborted or complete
+                                                       if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+                                                               // Only called once
+                                                               callback = undefined;
+
+                                                               // Do not keep as active anymore
+                                                               if ( handle ) {
+                                                                       xhr.onreadystatechange = jQuery.noop;
+                                                                       if ( xhrOnUnloadAbort ) {
+                                                                               delete xhrCallbacks[ handle ];
+                                                                       }
+                                                               }
+
+                                                               // If it's an abort
+                                                               if ( isAbort ) {
+                                                                       // Abort it manually if needed
+                                                                       if ( xhr.readyState !== 4 ) {
+                                                                               xhr.abort();
+                                                                       }
+                                                               } else {
+                                                                       status = xhr.status;
+                                                                       responseHeaders = xhr.getAllResponseHeaders();
+                                                                       responses = {};
+                                                                       xml = xhr.responseXML;
+
+                                                                       // Construct response list
+                                                                       if ( xml && xml.documentElement /* #4958 */ ) {
+                                                                               responses.xml = xml;
+                                                                       }
+
+                                                                       // When requesting binary data, IE6-9 will throw an exception
+                                                                       // on any attempt to access responseText (#11426)
+                                                                       try {
+                                                                               responses.text = xhr.responseText;
+                                                                       } catch( _ ) {
+                                                                       }
+
+                                                                       // Firefox throws an exception when accessing
+                                                                       // statusText for faulty cross-domain requests
+                                                                       try {
+                                                                               statusText = xhr.statusText;
+                                                                       } catch( e ) {
+                                                                               // We normalize with Webkit giving an empty statusText
+                                                                               statusText = "";
+                                                                       }
+
+                                                                       // Filter status for non standard behaviors
+
+                                                                       // If the request is local and we have data: assume a success
+                                                                       // (success with no data won't get notified, that's the best we
+                                                                       // can do given current implementations)
+                                                                       if ( !status && s.isLocal && !s.crossDomain ) {
+                                                                               status = responses.text ? 200 : 404;
+                                                                       // IE - #1450: sometimes returns 1223 when it should be 204
+                                                                       } else if ( status === 1223 ) {
+                                                                               status = 204;
+                                                                       }
+                                                               }
+                                                       }
+                                               } catch( firefoxAccessException ) {
+                                                       if ( !isAbort ) {
+                                                               complete( -1, firefoxAccessException );
+                                                       }
+                                               }
+
+                                               // Call complete if needed
+                                               if ( responses ) {
+                                                       complete( status, statusText, responses, responseHeaders );
+                                               }
+                                       };
+
+                                       if ( !s.async ) {
+                                               // if we're in sync mode we fire the callback
+                                               callback();
+                                       } else if ( xhr.readyState === 4 ) {
+                                               // (IE6 & IE7) if it's in cache and has been
+                                               // retrieved directly we need to fire the callback
+                                               setTimeout( callback, 0 );
+                                       } else {
+                                               handle = ++xhrId;
+                                               if ( xhrOnUnloadAbort ) {
+                                                       // Create the active xhrs callbacks list if needed
+                                                       // and attach the unload handler
+                                                       if ( !xhrCallbacks ) {
+                                                               xhrCallbacks = {};
+                                                               jQuery( window ).unload( xhrOnUnloadAbort );
+                                                       }
+                                                       // Add to list of active xhrs callbacks
+                                                       xhrCallbacks[ handle ] = callback;
+                                               }
+                                               xhr.onreadystatechange = callback;
+                                       }
+                               },
+
+                               abort: function() {
+                                       if ( callback ) {
+                                               callback(0,1);
+                                       }
+                               }
+                       };
+               }
+       });
+}
+var fxNow, timerId,
+       rfxtypes = /^(?:toggle|show|hide)$/,
+       rfxnum = new RegExp( "^(?:([-+])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
+       rrun = /queueHooks$/,
+       animationPrefilters = [ defaultPrefilter ],
+       tweeners = {
+               "*": [function( prop, value ) {
+                       var end, unit,
+                               tween = this.createTween( prop, value ),
+                               parts = rfxnum.exec( value ),
+                               target = tween.cur(),
+                               start = +target || 0,
+                               scale = 1,
+                               maxIterations = 20;
+
+                       if ( parts ) {
+                               end = +parts[2];
+                               unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+
+                               // We need to compute starting value
+                               if ( unit !== "px" && start ) {
+                                       // Iteratively approximate from a nonzero starting point
+                                       // Prefer the current property, because this process will be trivial if it uses the same units
+                                       // Fallback to end or a simple constant
+                                       start = jQuery.css( tween.elem, prop, true ) || end || 1;
+
+                                       do {
+                                               // If previous iteration zeroed out, double until we get *something*
+                                               // Use a string for doubling factor so we don't accidentally see scale as unchanged below
+                                               scale = scale || ".5";
+
+                                               // Adjust and apply
+                                               start = start / scale;
+                                               jQuery.style( tween.elem, prop, start + unit );
+
+                                       // Update scale, tolerating zero or NaN from tween.cur()
+                                       // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
+                                       } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+                               }
+
+                               tween.unit = unit;
+                               tween.start = start;
+                               // If a +=/-= token was provided, we're doing a relative animation
+                               tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;
+                       }
+                       return tween;
+               }]
+       };
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+       setTimeout(function() {
+               fxNow = undefined;
+       }, 0 );
+       return ( fxNow = jQuery.now() );
+}
+
+function createTweens( animation, props ) {
+       jQuery.each( props, function( prop, value ) {
+               var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+                       index = 0,
+                       length = collection.length;
+               for ( ; index < length; index++ ) {
+                       if ( collection[ index ].call( animation, prop, value ) ) {
+
+                               // we're done with this property
+                               return;
+                       }
+               }
+       });
+}
+
+function Animation( elem, properties, options ) {
+       var result,
+               index = 0,
+               tweenerIndex = 0,
+               length = animationPrefilters.length,
+               deferred = jQuery.Deferred().always( function() {
+                       // don't match elem in the :animated selector
+                       delete tick.elem;
+               }),
+               tick = function() {
+                       var currentTime = fxNow || createFxNow(),
+                               remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+                               percent = 1 - ( remaining / animation.duration || 0 ),
+                               index = 0,
+                               length = animation.tweens.length;
+
+                       for ( ; index < length ; index++ ) {
+                               animation.tweens[ index ].run( percent );
+                       }
+
+                       deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+                       if ( percent < 1 && length ) {
+                               return remaining;
+                       } else {
+                               deferred.resolveWith( elem, [ animation ] );
+                               return false;
+                       }
+               },
+               animation = deferred.promise({
+                       elem: elem,
+                       props: jQuery.extend( {}, properties ),
+                       opts: jQuery.extend( true, { specialEasing: {} }, options ),
+                       originalProperties: properties,
+                       originalOptions: options,
+                       startTime: fxNow || createFxNow(),
+                       duration: options.duration,
+                       tweens: [],
+                       createTween: function( prop, end, easing ) {
+                               var tween = jQuery.Tween( elem, animation.opts, prop, end,
+                                               animation.opts.specialEasing[ prop ] || animation.opts.easing );
+                               animation.tweens.push( tween );
+                               return tween;
+                       },
+                       stop: function( gotoEnd ) {
+                               var index = 0,
+                                       // if we are going to the end, we want to run all the tweens
+                                       // otherwise we skip this part
+                                       length = gotoEnd ? animation.tweens.length : 0;
+
+                               for ( ; index < length ; index++ ) {
+                                       animation.tweens[ index ].run( 1 );
+                               }
+
+                               // resolve when we played the last frame
+                               // otherwise, reject
+                               if ( gotoEnd ) {
+                                       deferred.resolveWith( elem, [ animation, gotoEnd ] );
+                               } else {
+                                       deferred.rejectWith( elem, [ animation, gotoEnd ] );
+                               }
+                               return this;
+                       }
+               }),
+               props = animation.props;
+
+       propFilter( props, animation.opts.specialEasing );
+
+       for ( ; index < length ; index++ ) {
+               result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+               if ( result ) {
+                       return result;
+               }
+       }
+
+       createTweens( animation, props );
+
+       if ( jQuery.isFunction( animation.opts.start ) ) {
+               animation.opts.start.call( elem, animation );
+       }
+
+       jQuery.fx.timer(
+               jQuery.extend( tick, {
+                       anim: animation,
+                       queue: animation.opts.queue,
+                       elem: elem
+               })
+       );
+
+       // attach callbacks from options
+       return animation.progress( animation.opts.progress )
+               .done( animation.opts.done, animation.opts.complete )
+               .fail( animation.opts.fail )
+               .always( animation.opts.always );
+}
+
+function propFilter( props, specialEasing ) {
+       var index, name, easing, value, hooks;
+
+       // camelCase, specialEasing and expand cssHook pass
+       for ( index in props ) {
+               name = jQuery.camelCase( index );
+               easing = specialEasing[ name ];
+               value = props[ index ];
+               if ( jQuery.isArray( value ) ) {
+                       easing = value[ 1 ];
+                       value = props[ index ] = value[ 0 ];
+               }
+
+               if ( index !== name ) {
+                       props[ name ] = value;
+                       delete props[ index ];
+               }
+
+               hooks = jQuery.cssHooks[ name ];
+               if ( hooks && "expand" in hooks ) {
+                       value = hooks.expand( value );
+                       delete props[ name ];
+
+                       // not quite $.extend, this wont overwrite keys already present.
+                       // also - reusing 'index' from above because we have the correct "name"
+                       for ( index in value ) {
+                               if ( !( index in props ) ) {
+                                       props[ index ] = value[ index ];
+                                       specialEasing[ index ] = easing;
+                               }
+                       }
+               } else {
+                       specialEasing[ name ] = easing;
+               }
+       }
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+       tweener: function( props, callback ) {
+               if ( jQuery.isFunction( props ) ) {
+                       callback = props;
+                       props = [ "*" ];
+               } else {
+                       props = props.split(" ");
+               }
+
+               var prop,
+                       index = 0,
+                       length = props.length;
+
+               for ( ; index < length ; index++ ) {
+                       prop = props[ index ];
+                       tweeners[ prop ] = tweeners[ prop ] || [];
+                       tweeners[ prop ].unshift( callback );
+               }
+       },
+
+       prefilter: function( callback, prepend ) {
+               if ( prepend ) {
+                       animationPrefilters.unshift( callback );
+               } else {
+                       animationPrefilters.push( callback );
+               }
+       }
+});
+
+function defaultPrefilter( elem, props, opts ) {
+       var index, prop, value, length, dataShow, tween, hooks, oldfire,
+               anim = this,
+               style = elem.style,
+               orig = {},
+               handled = [],
+               hidden = elem.nodeType && isHidden( elem );
+
+       // handle queue: false promises
+       if ( !opts.queue ) {
+               hooks = jQuery._queueHooks( elem, "fx" );
+               if ( hooks.unqueued == null ) {
+                       hooks.unqueued = 0;
+                       oldfire = hooks.empty.fire;
+                       hooks.empty.fire = function() {
+                               if ( !hooks.unqueued ) {
+                                       oldfire();
+                               }
+                       };
+               }
+               hooks.unqueued++;
+
+               anim.always(function() {
+                       // doing this makes sure that the complete handler will be called
+                       // before this completes
+                       anim.always(function() {
+                               hooks.unqueued--;
+                               if ( !jQuery.queue( elem, "fx" ).length ) {
+                                       hooks.empty.fire();
+                               }
+                       });
+               });
+       }
+
+       // height/width overflow pass
+       if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+               // Make sure that nothing sneaks out
+               // Record all 3 overflow attributes because IE does not
+               // change the overflow attribute when overflowX and
+               // overflowY are set to the same value
+               opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+               // Set display property to inline-block for height/width
+               // animations on inline elements that are having width/height animated
+               if ( jQuery.css( elem, "display" ) === "inline" &&
+                               jQuery.css( elem, "float" ) === "none" ) {
+
+                       // inline-level elements accept inline-block;
+                       // block-level elements need to be inline with layout
+                       if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
+                               style.display = "inline-block";
+
+                       } else {
+                               style.zoom = 1;
+                       }
+               }
+       }
+
+       if ( opts.overflow ) {
+               style.overflow = "hidden";
+               if ( !jQuery.support.shrinkWrapBlocks ) {
+                       anim.done(function() {
+                               style.overflow = opts.overflow[ 0 ];
+                               style.overflowX = opts.overflow[ 1 ];
+                               style.overflowY = opts.overflow[ 2 ];
+                       });
+               }
+       }
+
+
+       // show/hide pass
+       for ( index in props ) {
+               value = props[ index ];
+               if ( rfxtypes.exec( value ) ) {
+                       delete props[ index ];
+                       if ( value === ( hidden ? "hide" : "show" ) ) {
+                               continue;
+                       }
+                       handled.push( index );
+               }
+       }
+
+       length = handled.length;
+       if ( length ) {
+               dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} );
+               if ( hidden ) {
+                       jQuery( elem ).show();
+               } else {
+                       anim.done(function() {
+                               jQuery( elem ).hide();
+                       });
+               }
+               anim.done(function() {
+                       var prop;
+                       jQuery.removeData( elem, "fxshow", true );
+                       for ( prop in orig ) {
+                               jQuery.style( elem, prop, orig[ prop ] );
+                       }
+               });
+               for ( index = 0 ; index < length ; index++ ) {
+                       prop = handled[ index ];
+                       tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );
+                       orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );
+
+                       if ( !( prop in dataShow ) ) {
+                               dataShow[ prop ] = tween.start;
+                               if ( hidden ) {
+                                       tween.end = tween.start;
+                                       tween.start = prop === "width" || prop === "height" ? 1 : 0;
+                               }
+                       }
+               }
+       }
+}
+
+function Tween( elem, options, prop, end, easing ) {
+       return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+       constructor: Tween,
+       init: function( elem, options, prop, end, easing, unit ) {
+               this.elem = elem;
+               this.prop = prop;
+               this.easing = easing || "swing";
+               this.options = options;
+               this.start = this.now = this.cur();
+               this.end = end;
+               this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+       },
+       cur: function() {
+               var hooks = Tween.propHooks[ this.prop ];
+
+               return hooks && hooks.get ?
+                       hooks.get( this ) :
+                       Tween.propHooks._default.get( this );
+       },
+       run: function( percent ) {
+               var eased,
+                       hooks = Tween.propHooks[ this.prop ];
+
+               if ( this.options.duration ) {
+                       this.pos = eased = jQuery.easing[ this.easing ](
+                               percent, this.options.duration * percent, 0, 1, this.options.duration
+                       );
+               } else {
+                       this.pos = eased = percent;
+               }
+               this.now = ( this.end - this.start ) * eased + this.start;
+
+               if ( this.options.step ) {
+                       this.options.step.call( this.elem, this.now, this );
+               }
+
+               if ( hooks && hooks.set ) {
+                       hooks.set( this );
+               } else {
+                       Tween.propHooks._default.set( this );
+               }
+               return this;
+       }
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+       _default: {
+               get: function( tween ) {
+                       var result;
+
+                       if ( tween.elem[ tween.prop ] != null &&
+                               (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+                               return tween.elem[ tween.prop ];
+                       }
+
+                       // passing any value as a 4th parameter to .css will automatically
+                       // attempt a parseFloat and fallback to a string if the parse fails
+                       // so, simple values such as "10px" are parsed to Float.
+                       // complex values such as "rotate(1rad)" are returned as is.
+                       result = jQuery.css( tween.elem, tween.prop, false, "" );
+                       // Empty strings, null, undefined and "auto" are converted to 0.
+                       return !result || result === "auto" ? 0 : result;
+               },
+               set: function( tween ) {
+                       // use step hook for back compat - use cssHook if its there - use .style if its
+                       // available and use plain properties where available
+                       if ( jQuery.fx.step[ tween.prop ] ) {
+                               jQuery.fx.step[ tween.prop ]( tween );
+                       } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+                               jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+                       } else {
+                               tween.elem[ tween.prop ] = tween.now;
+                       }
+               }
+       }
+};
+
+// Remove in 2.0 - this supports IE8's panic based approach
+// to setting things on disconnected nodes
+
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+       set: function( tween ) {
+               if ( tween.elem.nodeType && tween.elem.parentNode ) {
+                       tween.elem[ tween.prop ] = tween.now;
+               }
+       }
+};
+
+jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
+       var cssFn = jQuery.fn[ name ];
+       jQuery.fn[ name ] = function( speed, easing, callback ) {
+               return speed == null || typeof speed === "boolean" ||
+                       // special check for .toggle( handler, handler, ... )
+                       ( !i && jQuery.isFunction( speed ) && jQuery.isFunction( easing ) ) ?
+                       cssFn.apply( this, arguments ) :
+                       this.animate( genFx( name, true ), speed, easing, callback );
+       };
+});
+
+jQuery.fn.extend({
+       fadeTo: function( speed, to, easing, callback ) {
+
+               // show any hidden elements after setting opacity to 0
+               return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+                       // animate to the value specified
+                       .end().animate({ opacity: to }, speed, easing, callback );
+       },
+       animate: function( prop, speed, easing, callback ) {
+               var empty = jQuery.isEmptyObject( prop ),
+                       optall = jQuery.speed( speed, easing, callback ),
+                       doAnimation = function() {
+                               // Operate on a copy of prop so per-property easing won't be lost
+                               var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+                               // Empty animations resolve immediately
+                               if ( empty ) {
+                                       anim.stop( true );
+                               }
+                       };
+
+               return empty || optall.queue === false ?
+                       this.each( doAnimation ) :
+                       this.queue( optall.queue, doAnimation );
+       },
+       stop: function( type, clearQueue, gotoEnd ) {
+               var stopQueue = function( hooks ) {
+                       var stop = hooks.stop;
+                       delete hooks.stop;
+                       stop( gotoEnd );
+               };
+
+               if ( typeof type !== "string" ) {
+                       gotoEnd = clearQueue;
+                       clearQueue = type;
+                       type = undefined;
+               }
+               if ( clearQueue && type !== false ) {
+                       this.queue( type || "fx", [] );
+               }
+
+               return this.each(function() {
+                       var dequeue = true,
+                               index = type != null && type + "queueHooks",
+                               timers = jQuery.timers,
+                               data = jQuery._data( this );
+
+                       if ( index ) {
+                               if ( data[ index ] && data[ index ].stop ) {
+                                       stopQueue( data[ index ] );
+                               }
+                       } else {
+                               for ( index in data ) {
+                                       if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+                                               stopQueue( data[ index ] );
+                                       }
+                               }
+                       }
+
+                       for ( index = timers.length; index--; ) {
+                               if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+                                       timers[ index ].anim.stop( gotoEnd );
+                                       dequeue = false;
+                                       timers.splice( index, 1 );
+                               }
+                       }
+
+                       // start the next in the queue if the last step wasn't forced
+                       // timers currently will call their complete callbacks, which will dequeue
+                       // but only if they were gotoEnd
+                       if ( dequeue || !gotoEnd ) {
+                               jQuery.dequeue( this, type );
+                       }
+               });
+       }
+});
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+       var which,
+               attrs = { height: type },
+               i = 0;
+
+       // if we include width, step value is 1 to do all cssExpand values,
+       // if we don't include width, step value is 2 to skip over Left and Right
+       includeWidth = includeWidth? 1 : 0;
+       for( ; i < 4 ; i += 2 - includeWidth ) {
+               which = cssExpand[ i ];
+               attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+       }
+
+       if ( includeWidth ) {
+               attrs.opacity = attrs.width = type;
+       }
+
+       return attrs;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+       slideDown: genFx("show"),
+       slideUp: genFx("hide"),
+       slideToggle: genFx("toggle"),
+       fadeIn: { opacity: "show" },
+       fadeOut: { opacity: "hide" },
+       fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+       jQuery.fn[ name ] = function( speed, easing, callback ) {
+               return this.animate( props, speed, easing, callback );
+       };
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+       var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+               complete: fn || !fn && easing ||
+                       jQuery.isFunction( speed ) && speed,
+               duration: speed,
+               easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+       };
+
+       opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+               opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+       // normalize opt.queue - true/undefined/null -> "fx"
+       if ( opt.queue == null || opt.queue === true ) {
+               opt.queue = "fx";
+       }
+
+       // Queueing
+       opt.old = opt.complete;
+
+       opt.complete = function() {
+               if ( jQuery.isFunction( opt.old ) ) {
+                       opt.old.call( this );
+               }
+
+               if ( opt.queue ) {
+                       jQuery.dequeue( this, opt.queue );
+               }
+       };
+
+       return opt;
+};
+
+jQuery.easing = {
+       linear: function( p ) {
+               return p;
+       },
+       swing: function( p ) {
+               return 0.5 - Math.cos( p*Math.PI ) / 2;
+       }
+};
+
+jQuery.timers = [];
+jQuery.fx = Tween.prototype.init;
+jQuery.fx.tick = function() {
+       var timer,
+               timers = jQuery.timers,
+               i = 0;
+
+       for ( ; i < timers.length; i++ ) {
+               timer = timers[ i ];
+               // Checks the timer has not already been removed
+               if ( !timer() && timers[ i ] === timer ) {
+                       timers.splice( i--, 1 );
+               }
+       }
+
+       if ( !timers.length ) {
+               jQuery.fx.stop();
+       }
+};
+
+jQuery.fx.timer = function( timer ) {
+       if ( timer() && jQuery.timers.push( timer ) && !timerId ) {
+               timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+       }
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.stop = function() {
+       clearInterval( timerId );
+       timerId = null;
+};
+
+jQuery.fx.speeds = {
+       slow: 600,
+       fast: 200,
+       // Default speed
+       _default: 400
+};
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+       jQuery.expr.filters.animated = function( elem ) {
+               return jQuery.grep(jQuery.timers, function( fn ) {
+                       return elem === fn.elem;
+               }).length;
+       };
+}
+var rroot = /^(?:body|html)$/i;
+
+jQuery.fn.offset = function( options ) {
+       if ( arguments.length ) {
+               return options === undefined ?
+                       this :
+                       this.each(function( i ) {
+                               jQuery.offset.setOffset( this, options, i );
+                       });
+       }
+
+       var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft,
+               box = { top: 0, left: 0 },
+               elem = this[ 0 ],
+               doc = elem && elem.ownerDocument;
+
+       if ( !doc ) {
+               return;
+       }
+
+       if ( (body = doc.body) === elem ) {
+               return jQuery.offset.bodyOffset( elem );
+       }
+
+       docElem = doc.documentElement;
+
+       // Make sure it's not a disconnected DOM node
+       if ( !jQuery.contains( docElem, elem ) ) {
+               return box;
+       }
+
+       // If we don't have gBCR, just use 0,0 rather than error
+       // BlackBerry 5, iOS 3 (original iPhone)
+       if ( typeof elem.getBoundingClientRect !== "undefined" ) {
+               box = elem.getBoundingClientRect();
+       }
+       win = getWindow( doc );
+       clientTop  = docElem.clientTop  || body.clientTop  || 0;
+       clientLeft = docElem.clientLeft || body.clientLeft || 0;
+       scrollTop  = win.pageYOffset || docElem.scrollTop;
+       scrollLeft = win.pageXOffset || docElem.scrollLeft;
+       return {
+               top: box.top  + scrollTop  - clientTop,
+               left: box.left + scrollLeft - clientLeft
+       };
+};
+
+jQuery.offset = {
+
+       bodyOffset: function( body ) {
+               var top = body.offsetTop,
+                       left = body.offsetLeft;
+
+               if ( jQuery.support.doesNotIncludeMarginInBodyOffset ) {
+                       top  += parseFloat( jQuery.css(body, "marginTop") ) || 0;
+                       left += parseFloat( jQuery.css(body, "marginLeft") ) || 0;
+               }
+
+               return { top: top, left: left };
+       },
+
+       setOffset: function( elem, options, i ) {
+               var position = jQuery.css( elem, "position" );
+
+               // set position first, in-case top/left are set even on static elem
+               if ( position === "static" ) {
+                       elem.style.position = "relative";
+               }
+
+               var curElem = jQuery( elem ),
+                       curOffset = curElem.offset(),
+                       curCSSTop = jQuery.css( elem, "top" ),
+                       curCSSLeft = jQuery.css( elem, "left" ),
+                       calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+                       props = {}, curPosition = {}, curTop, curLeft;
+
+               // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+               if ( calculatePosition ) {
+                       curPosition = curElem.position();
+                       curTop = curPosition.top;
+                       curLeft = curPosition.left;
+               } else {
+                       curTop = parseFloat( curCSSTop ) || 0;
+                       curLeft = parseFloat( curCSSLeft ) || 0;
+               }
+
+               if ( jQuery.isFunction( options ) ) {
+                       options = options.call( elem, i, curOffset );
+               }
+
+               if ( options.top != null ) {
+                       props.top = ( options.top - curOffset.top ) + curTop;
+               }
+               if ( options.left != null ) {
+                       props.left = ( options.left - curOffset.left ) + curLeft;
+               }
+
+               if ( "using" in options ) {
+                       options.using.call( elem, props );
+               } else {
+                       curElem.css( props );
+               }
+       }
+};
+
+
+jQuery.fn.extend({
+
+       position: function() {
+               if ( !this[0] ) {
+                       return;
+               }
+
+               var elem = this[0],
+
+               // Get *real* offsetParent
+               offsetParent = this.offsetParent(),
+
+               // Get correct offsets
+               offset       = this.offset(),
+               parentOffset = rroot.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
+
+               // Subtract element margins
+               // note: when an element has margin: auto the offsetLeft and marginLeft
+               // are the same in Safari causing offset.left to incorrectly be 0
+               offset.top  -= parseFloat( jQuery.css(elem, "marginTop") ) || 0;
+               offset.left -= parseFloat( jQuery.css(elem, "marginLeft") ) || 0;
+
+               // Add offsetParent borders
+               parentOffset.top  += parseFloat( jQuery.css(offsetParent[0], "borderTopWidth") ) || 0;
+               parentOffset.left += parseFloat( jQuery.css(offsetParent[0], "borderLeftWidth") ) || 0;
+
+               // Subtract the two offsets
+               return {
+                       top:  offset.top  - parentOffset.top,
+                       left: offset.left - parentOffset.left
+               };
+       },
+
+       offsetParent: function() {
+               return this.map(function() {
+                       var offsetParent = this.offsetParent || document.body;
+                       while ( offsetParent && (!rroot.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
+                               offsetParent = offsetParent.offsetParent;
+                       }
+                       return offsetParent || document.body;
+               });
+       }
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
+       var top = /Y/.test( prop );
+
+       jQuery.fn[ method ] = function( val ) {
+               return jQuery.access( this, function( elem, method, val ) {
+                       var win = getWindow( elem );
+
+                       if ( val === undefined ) {
+                               return win ? (prop in win) ? win[ prop ] :
+                                       win.document.documentElement[ method ] :
+                                       elem[ method ];
+                       }
+
+                       if ( win ) {
+                               win.scrollTo(
+                                       !top ? val : jQuery( win ).scrollLeft(),
+                                        top ? val : jQuery( win ).scrollTop()
+                               );
+
+                       } else {
+                               elem[ method ] = val;
+                       }
+               }, method, val, arguments.length, null );
+       };
+});
+
+function getWindow( elem ) {
+       return jQuery.isWindow( elem ) ?
+               elem :
+               elem.nodeType === 9 ?
+                       elem.defaultView || elem.parentWindow :
+                       false;
+}
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+       jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+               // margin is only for outerHeight, outerWidth
+               jQuery.fn[ funcName ] = function( margin, value ) {
+                       var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+                               extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+                       return jQuery.access( this, function( elem, type, value ) {
+                               var doc;
+
+                               if ( jQuery.isWindow( elem ) ) {
+                                       // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+                                       // isn't a whole lot we can do. See pull request at this URL for discussion:
+                                       // https://github.com/jquery/jquery/pull/764
+                                       return elem.document.documentElement[ "client" + name ];
+                               }
+
+                               // Get document width or height
+                               if ( elem.nodeType === 9 ) {
+                                       doc = elem.documentElement;
+
+                                       // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
+                                       // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
+                                       return Math.max(
+                                               elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+                                               elem.body[ "offset" + name ], doc[ "offset" + name ],
+                                               doc[ "client" + name ]
+                                       );
+                               }
+
+                               return value === undefined ?
+                                       // Get width or height on the element, requesting but not forcing parseFloat
+                                       jQuery.css( elem, type, value, extra ) :
+
+                                       // Set width or height on the element
+                                       jQuery.style( elem, type, value, extra );
+                       }, type, chainable ? margin : undefined, chainable, null );
+               };
+       });
+});
+// Expose jQuery to the global object
+window.jQuery = window.$ = jQuery;
+
+// Expose jQuery as an AMD module, but only for AMD loaders that
+// understand the issues with loading multiple versions of jQuery
+// in a page that all might call define(). The loader will indicate
+// they have special allowances for multiple jQuery versions by
+// specifying define.amd.jQuery = true. Register as a named module,
+// since jQuery can be concatenated with other files that may use define,
+// but not use a proper concatenation script that understands anonymous
+// AMD modules. A named AMD is safest and most robust way to register.
+// Lowercase jquery is used because AMD module names are derived from
+// file names, and jQuery is normally delivered in a lowercase file name.
+// Do this after creating the global so that if an AMD module wants to call
+// noConflict to hide this version of jQuery, it will work.
+if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
+       define( "jquery", [], function () { return jQuery; } );
+}
+
+})( window );
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/jquery.min.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/jquery.min.js
new file mode 100644 (file)
index 0000000..bc3fbc8
--- /dev/null
@@ -0,0 +1,2 @@
+/*! jQuery v1.8.2 jquery.com | jquery.org/license */
+(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bY(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bW.length;while(e--){b=bW[e]+c;if(b in a)return b}return d}function bZ(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function b$(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bZ(c)&&(e[f]=p._data(c,"olddisplay",cc(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b_(a,b,c){var d=bP.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function ca(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bV[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bV[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bV[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bV[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bV[e]+"Width"))||0));return f}function cb(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0||d==null){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bQ.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+ca(a,b,c||(f?"border":"content"),e)+"px"}function cc(a){if(bS[a])return bS[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cA(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cv;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cA(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cA(a,c,d,e,"*",g)),h}function cB(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cC(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cD(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cL(){try{return new a.XMLHttpRequest}catch(b){}}function cM(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cU(){return setTimeout(function(){cN=b},0),cN=p.now()}function cV(a,b){p.each(b,function(b,c){var d=(cT[b]||[]).concat(cT["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cW(a,b,c){var d,e=0,f=0,g=cS.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cN||cU(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cN||cU(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cX(k,j.opts.specialEasing);for(;e<g;e++){d=cS[e].call(j,a,k,j.opts);if(d)return d}return cV(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cX(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cY(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bZ(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cc(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cP.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cZ(a,b,c,d,e){return new cZ.prototype.init(a,b,c,d,e)}function c$(a,b){var c,d={height:a},e=0;b=b?1:0;for(;e<4;e+=2-b)c=bV[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function da(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.2",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o&&!o.call(" ")?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":(a+"").replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete")setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){var e=p.type(c);e==="function"&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&e!=="string"&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return a!=null?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||p.guid++:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")||(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)d=p._data(g[h],a+"queueHooks"),d&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)f.indexOf(" "+b[g]+" ")<0&&(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>=0)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>=0)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,d+""),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=b+""}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,needsContext:f&&p.expr.match.needsContext.test(f),namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=k.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click"))for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){h={},j=[];for(d=0;d<q;d++)l=o[d],m=l.selector,h[m]===b&&(h[m]=l.needsContext?p(m,this).index(f)>=0:p.find(m,this,null,[f]).length),h[m]&&j.push(l);j.length&&u.push({elem:f,matches:j})}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){i=u[d],c.currentTarget=i.elem;for(e=0;e<i.matches.length&&!c.isImmediatePropagationStopped();e++){l=i.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,g=((p.event.special[l.origType]||{}).handle||l.handler).apply(i.elem,r),g!==b&&(c.result=g,g===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),!V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length===1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bc(a,b,c,d){c=c||[],b=b||r;var e,f,i,j,k=b.nodeType;if(!a||typeof a!="string")return c;if(k!==1&&k!==9)return[];i=g(b);if(!i&&!d)if(e=P.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&h(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return w.apply(c,x.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&_&&b.getElementsByClassName)return w.apply(c,x.call(b.getElementsByClassName(j),0)),c}return bp(a.replace(L,"$1"),b,c,d,i)}function bd(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function be(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bf(a){return z(function(b){return b=+b,z(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function bg(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bh(a,b){var c,d,f,g,h,i,j,k=C[o][a];if(k)return b?0:k.slice(0);h=a,i=[],j=e.preFilter;while(h){if(!c||(d=M.exec(h)))d&&(h=h.slice(d[0].length)),i.push(f=[]);c=!1;if(d=N.exec(h))f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=d[0].replace(L," ");for(g in e.filter)(d=W[g].exec(h))&&(!j[g]||(d=j[g](d,r,!0)))&&(f.push(c=new q(d.shift())),h=h.slice(c.length),c.type=g,c.matches=d);if(!c)break}return b?h.length:h?bc.error(a):C(a,i).slice(0)}function bi(a,b,d){var e=b.dir,f=d&&b.dir==="parentNode",g=u++;return b.first?function(b,c,d){while(b=b[e])if(f||b.nodeType===1)return a(b,c,d)}:function(b,d,h){if(!h){var i,j=t+" "+g+" ",k=j+c;while(b=b[e])if(f||b.nodeType===1){if((i=b[o])===k)return b.sizset;if(typeof i=="string"&&i.indexOf(j)===0){if(b.sizset)return b}else{b[o]=k;if(a(b,d,h))return b.sizset=!0,b;b.sizset=!1}}}else while(b=b[e])if(f||b.nodeType===1)if(a(b,d,h))return b}}function bj(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function bk(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h<i;h++)if(f=a[h])if(!c||c(f,d,e))g.push(f),j&&b.push(h);return g}function bl(a,b,c,d,e,f){return d&&!d[o]&&(d=bl(d)),e&&!e[o]&&(e=bl(e,f)),z(function(f,g,h,i){if(f&&e)return;var j,k,l,m=[],n=[],o=g.length,p=f||bo(b||"*",h.nodeType?[h]:h,[],f),q=a&&(f||!b)?bk(p,m,a,h,i):p,r=c?e||(f?a:o||d)?[]:g:q;c&&c(q,r,h,i);if(d){l=bk(r,n),d(l,[],h,i),j=l.length;while(j--)if(k=l[j])r[n[j]]=!(q[n[j]]=k)}if(f){j=a&&r.length;while(j--)if(k=r[j])f[m[j]]=!(g[m[j]]=k)}else r=bk(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):w.apply(g,r)})}function bm(a){var b,c,d,f=a.length,g=e.relative[a[0].type],h=g||e.relative[" "],i=g?1:0,j=bi(function(a){return a===b},h,!0),k=bi(function(a){return y.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==l)||((b=c).nodeType?j(a,c,d):k(a,c,d))}];for(;i<f;i++)if(c=e.relative[a[i].type])m=[bi(bj(m),c)];else{c=e.filter[a[i].type].apply(null,a[i].matches);if(c[o]){d=++i;for(;d<f;d++)if(e.relative[a[d].type])break;return bl(i>1&&bj(m),i>1&&a.slice(0,i-1).join("").replace(L,"$1"),c,i<d&&bm(a.slice(i,d)),d<f&&bm(a=a.slice(d)),d<f&&a.join(""))}m.push(c)}return bj(m)}function bn(a,b){var d=b.length>0,f=a.length>0,g=function(h,i,j,k,m){var n,o,p,q=[],s=0,u="0",x=h&&[],y=m!=null,z=l,A=h||f&&e.find.TAG("*",m&&i.parentNode||i),B=t+=z==null?1:Math.E;y&&(l=i!==r&&i,c=g.el);for(;(n=A[u])!=null;u++){if(f&&n){for(o=0;p=a[o];o++)if(p(n,i,j)){k.push(n);break}y&&(t=B,c=++g.el)}d&&((n=!p&&n)&&s--,h&&x.push(n))}s+=u;if(d&&u!==s){for(o=0;p=b[o];o++)p(x,q,i,j);if(h){if(s>0)while(u--)!x[u]&&!q[u]&&(q[u]=v.call(k));q=bk(q)}w.apply(k,q),y&&!h&&q.length>0&&s+b.length>1&&bc.uniqueSort(k)}return y&&(t=B,l=z),x};return g.el=0,d?z(g):g}function bo(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)bc(a,b[e],c,d);return c}function bp(a,b,c,d,f){var g,h,j,k,l,m=bh(a),n=m.length;if(!d&&m.length===1){h=m[0]=m[0].slice(0);if(h.length>2&&(j=h[0]).type==="ID"&&b.nodeType===9&&!f&&e.relative[h[1].type]){b=e.find.ID(j.matches[0].replace(V,""),b,f)[0];if(!b)return c;a=a.slice(h.shift().length)}for(g=W.POS.test(a)?-1:h.length-1;g>=0;g--){j=h[g];if(e.relative[k=j.type])break;if(l=e.find[k])if(d=l(j.matches[0].replace(V,""),R.test(h[0].type)&&b.parentNode||b,f)){h.splice(g,1),a=d.length&&h.join("");if(!a)return w.apply(c,x.call(d,0)),c;break}}}return i(a,m)(d,b,f,c,R.test(a)),c}function bq(){}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=String,r=a.document,s=r.documentElement,t=0,u=0,v=[].pop,w=[].push,x=[].slice,y=[].indexOf||function(a){var b=0,c=this.length;for(;b<c;b++)if(this[b]===a)return b;return-1},z=function(a,b){return a[o]=b==null||b,a},A=function(){var a={},b=[];return z(function(c,d){return b.push(c)>e.cacheLength&&delete a[b.shift()],a[c]=d},a)},B=A(),C=A(),D=A(),E="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",G=F.replace("w","w#"),H="([*^$|!~]?=)",I="\\["+E+"*("+F+")"+E+"*(?:"+H+E+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+G+")|)|)"+E+"*\\]",J=":("+F+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+I+")|[^:]|\\\\.)*|.*))\\)|)",K=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+E+"*((?:-\\d)?\\d*)"+E+"*\\)|)(?=[^-]|$)",L=new RegExp("^"+E+"+|((?:^|[^\\\\])(?:\\\\.)*)"+E+"+$","g"),M=new RegExp("^"+E+"*,"+E+"*"),N=new RegExp("^"+E+"*([\\x20\\t\\r\\n\\f>+~])"+E+"*"),O=new RegExp(J),P=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,Q=/^:not/,R=/[\x20\t\r\n\f]*[+~]/,S=/:not\($/,T=/h\d/i,U=/input|select|textarea|button/i,V=/\\(?!\\)/g,W={ID:new RegExp("^#("+F+")"),CLASS:new RegExp("^\\.("+F+")"),NAME:new RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:new RegExp("^("+F.replace("w","w*")+")"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+J),POS:new RegExp(K,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+E+"*(even|odd|(([+-]|)(\\d*)n|)"+E+"*(?:([+-]|)"+E+"*(\\d+)|))"+E+"*\\)|)","i"),needsContext:new RegExp("^"+E+"*[>+~]|"+K,"i")},X=function(a){var b=r.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},Y=X(function(a){return a.appendChild(r.createComment("")),!a.getElementsByTagName("*").length}),Z=X(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),$=X(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),_=X(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),ba=X(function(a){a.id=o+0,a.innerHTML="<a name='"+o+"'></a><div name='"+o+"'></div>",s.insertBefore(a,s.firstChild);var b=r.getElementsByName&&r.getElementsByName(o).length===2+r.getElementsByName(o+0).length;return d=!r.getElementById(o),s.removeChild(a),b});try{x.call(s.childNodes,0)[0].nodeType}catch(bb){x=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}bc.matches=function(a,b){return bc(a,null,null,b)},bc.matchesSelector=function(a,b){return bc(b,null,null,[a]).length>0},f=bc.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=f(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=f(b);return c},g=bc.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},h=bc.contains=s.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:s.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc.attr=function(a,b){var c,d=g(a);return d||(b=b.toLowerCase()),(c=e.attrHandle[b])?c(a):d||$?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},e=bc.selectors={cacheLength:50,createPseudo:z,match:W,attrHandle:Z?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:d?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:Y?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:ba&&function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:_&&function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(V,""),a[3]=(a[4]||a[5]||"").replace(V,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||bc.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&bc.error(a[0]),a},PSEUDO:function(a){var b,c;if(W.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(b=a[4])O.test(b)&&(c=bh(b,!0))&&(c=b.indexOf(")",b.length-c)-b.length)&&(b=b.slice(0,c),a[0]=a[0].slice(0,c)),a[2]=b;return a.slice(0,3)}},filter:{ID:d?function(a){return a=a.replace(V,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(V,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(V,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=B[o][a];return b||(b=B(a,new RegExp("(^|"+E+")"+a+"("+E+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return function(d,e){var f=bc.attr(d,a);return f==null?b==="!=":b?(f+="",b==="="?f===c:b==="!="?f!==c:b==="^="?c&&f.indexOf(c)===0:b==="*="?c&&f.indexOf(c)>-1:b==="$="?c&&f.substr(f.length-c.length)===c:b==="~="?(" "+f+" ").indexOf(c)>-1:b==="|="?f===c||f.substr(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d){return a==="nth"?function(a){var b,e,f=a.parentNode;if(c===1&&d===0)return!0;if(f){e=0;for(b=f.firstChild;b;b=b.nextSibling)if(b.nodeType===1){e++;if(a===b)break}}return e-=d,e===c||e%c===0&&e/c>=0}:function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b){var c,d=e.pseudos[a]||e.setFilters[a.toLowerCase()]||bc.error("unsupported pseudo: "+a);return d[o]?d(b):d.length>1?(c=[a,a,"",b],e.setFilters.hasOwnProperty(a.toLowerCase())?z(function(a,c){var e,f=d(a,b),g=f.length;while(g--)e=y.call(a,f[g]),a[e]=!(c[e]=f[g])}):function(a){return d(a,0,c)}):d}},pseudos:{not:z(function(a){var b=[],c=[],d=i(a.replace(L,"$1"));return d[o]?z(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)if(f=g[h])a[h]=!(b[h]=f)}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:z(function(a){return function(b){return bc(a,b).length>0}}),contains:z(function(a){return function(b){return(b.textContent||b.innerText||f(b)).indexOf(a)>-1}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!e.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},header:function(a){return T.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:bd("radio"),checkbox:bd("checkbox"),file:bd("file"),password:bd("password"),image:bd("image"),submit:be("submit"),reset:be("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return U.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement},first:bf(function(a,b,c){return[0]}),last:bf(function(a,b,c){return[b-1]}),eq:bf(function(a,b,c){return[c<0?c+b:c]}),even:bf(function(a,b,c){for(var d=0;d<b;d+=2)a.push(d);return a}),odd:bf(function(a,b,c){for(var d=1;d<b;d+=2)a.push(d);return a}),lt:bf(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:bf(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},j=s.compareDocumentPosition?function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,h=b.parentNode,i=g;if(g===h)return bg(a,b);if(!g)return-1;if(!h)return 1;while(i)e.unshift(i),i=i.parentNode;i=h;while(i)f.unshift(i),i=i.parentNode;c=e.length,d=f.length;for(var j=0;j<c&&j<d;j++)if(e[j]!==f[j])return bg(e[j],f[j]);return j===c?bg(a,f[j],-1):bg(e[j],b,1)},[0,0].sort(j),m=!k,bc.uniqueSort=function(a){var b,c=1;k=m,a.sort(j);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1);return a},bc.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},i=bc.compile=function(a,b){var c,d=[],e=[],f=D[o][a];if(!f){b||(b=bh(a)),c=b.length;while(c--)f=bm(b[c]),f[o]?d.push(f):e.push(f);f=D(a,bn(e,d))}return f},r.querySelectorAll&&function(){var a,b=bp,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[":focus"],f=[":active",":focus"],h=s.matchesSelector||s.mozMatchesSelector||s.webkitMatchesSelector||s.oMatchesSelector||s.msMatchesSelector;X(function(a){a.innerHTML="<select><option selected=''></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+E+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),X(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+E+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'/>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=new RegExp(e.join("|")),bp=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a))){var i,j,k=!0,l=o,m=d,n=d.nodeType===9&&a;if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){i=bh(a),(k=d.getAttribute("id"))?l=k.replace(c,"\\$&"):d.setAttribute("id",l),l="[id='"+l+"'] ",j=i.length;while(j--)i[j]=l+i[j].join("");m=R.test(a)&&d.parentNode||d,n=i.join(",")}if(n)try{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}return b(a,d,f,g,h)},h&&(X(function(b){a=h.call(b,"div");try{h.call(b,"[test!='']:sizzle"),f.push("!=",J)}catch(c){}}),f=new RegExp(f.join("|")),bc.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!g(b)&&!f.test(c)&&(!e||!e.test(c)))try{var i=h.call(b,c);if(i||a||b.document&&b.document.nodeType!==11)return i}catch(j){}return bc(c,null,null,[b]).length>0})}(),e.pseudos.nth=e.pseudos.eq,e.filters=bq.prototype=e.pseudos,e.setFilters=new bq,bc.attr=p.attr,p.find=bc,p.expr=bc.selectors,p.expr[":"]=p.expr.pseudos,p.unique=bc.uniqueSort,p.text=bc.getText,p.isXMLDoc=bc.isXML,p.contains=bc.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=!c.nodeType&&c[0]||c,c=c.ownerDocument||c,a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cs=/([?&])_=[^&]*/,ct=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,cu=p.fn.load,cv={},cw={},cx=["*/"]+["*"];try{ck=f.href}catch(cy){ck=e.createElement("a"),ck.href="",ck=ck.href}cj=ct.exec(ck.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&cu)return cu.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):c&&typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cr,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cB(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cB(a,b),a},ajaxSettings:{url:ck,isLocal:cn.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cx},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cz(cv),ajaxTransport:cz(cw),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cC(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cD(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=(c||y)+"",k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cm.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(cl,"").replace(cp,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=ct.exec(l.url.toLowerCase())||!1,l.crossDomain=i&&i.join(":")+(i[3]?"":i[1]==="http:"?80:443)!==cj.join(":")+(cj[3]?"":cj[1]==="http:"?80:443)),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cA(cv,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!co.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cq.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cs,"$1_="+z);l.url=A+(A===l.url?(cq.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cx+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cA(cw,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cE=[],cF=/\?/,cG=/(=)\?(?=&|$)|\?\?/,cH=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cE.pop()||p.expando+"_"+cH++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cG.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cG.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cG,"$1"+f):m?c.data=i.replace(cG,"$1"+f):k&&(c.url+=(cF.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cE.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cI,cJ=a.ActiveXObject?function(){for(var a in cI)cI[a](0,1)}:!1,cK=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cL()||cM()}:cL,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cJ&&delete cI[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cK,cJ&&(cI||(cI={},p(a).unload(cJ)),cI[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cN,cO,cP=/^(?:toggle|show|hide)$/,cQ=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cR=/queueHooks$/,cS=[cY],cT={"*":[function(a,b){var c,d,e=this.createTween(a,b),f=cQ.exec(b),g=e.cur(),h=+g||0,i=1,j=20;if(f){c=+f[2],d=f[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&h){h=p.css(e.elem,a,!0)||c||1;do i=i||".5",h=h/i,p.style(e.elem,a,h+d);while(i!==(i=e.cur()/g)&&i!==1&&--j)}e.unit=d,e.start=h,e.end=f[1]?h+(f[1]+1)*c:c}return e}]};p.Animation=p.extend(cW,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cT[c]=cT[c]||[],cT[c].unshift(b)},prefilter:function(a,b){b?cS.unshift(a):cS.push(a)}}),p.Tween=cZ,cZ.prototype={constructor:cZ,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cZ.propHooks[this.prop];return a&&a.get?a.get(this):cZ.propHooks._default.get(this)},run:function(a){var b,c=cZ.propHooks[this.prop];return this.options.duration?this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cZ.propHooks._default.set(this),this}},cZ.prototype.init.prototype=cZ.prototype,cZ.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cZ.propHooks.scrollTop=cZ.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(c$(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bZ).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cW(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cR.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:c$("show"),slideUp:c$("hide"),slideToggle:c$("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cZ.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cO&&(cO=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cO),cO=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c_=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j={top:0,left:0},k=this[0],l=k&&k.ownerDocument;if(!l)return;return(d=l.body)===k?p.offset.bodyOffset(k):(c=l.documentElement,p.contains(c,k)?(typeof k.getBoundingClientRect!="undefined"&&(j=k.getBoundingClientRect()),e=da(l),f=c.clientTop||d.clientTop||0,g=c.clientLeft||d.clientLeft||0,h=e.pageYOffset||c.scrollTop,i=e.pageXOffset||c.scrollLeft,{top:j.top+h-f,left:j.left+i-g}):j)},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c_.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c_.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=da(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g,null)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window);
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js
new file mode 100644 (file)
index 0000000..1e105f2
--- /dev/null
@@ -0,0 +1,10140 @@
+/*
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
+ *
+ * Uses the built in easing capabilities added In jQuery 1.1
+ * to offer multiple easing options
+ *
+ * TERMS OF USE - jQuery Easing
+ * 
+ * Open source under the BSD License. 
+ * 
+ * Copyright © 2008 George McGinley Smith
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without modification, 
+ * are permitted provided that the following conditions are met:
+ * 
+ * Redistributions of source code must retain the above copyright notice, this list of 
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list 
+ * of conditions and the following disclaimer in the documentation and/or other materials 
+ * provided with the distribution.
+ * 
+ * Neither the name of the author nor the names of contributors may be used to endorse 
+ * or promote products derived from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
+ * OF THE POSSIBILITY OF SUCH DAMAGE. 
+ *
+*/
+
+// t: current time, b: begInnIng value, c: change In value, d: duration
+jQuery.easing['jswing'] = jQuery.easing['swing'];
+
+jQuery.extend( jQuery.easing,
+{
+       def: 'easeOutQuad',
+       swing: function (x, t, b, c, d) {
+               //alert(jQuery.easing.default);
+               return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
+       },
+       easeInQuad: function (x, t, b, c, d) {
+               return c*(t/=d)*t + b;
+       },
+       easeOutQuad: function (x, t, b, c, d) {
+               return -c *(t/=d)*(t-2) + b;
+       },
+       easeInOutQuad: function (x, t, b, c, d) {
+               if ((t/=d/2) < 1) return c/2*t*t + b;
+               return -c/2 * ((--t)*(t-2) - 1) + b;
+       },
+       easeInCubic: function (x, t, b, c, d) {
+               return c*(t/=d)*t*t + b;
+       },
+       easeOutCubic: function (x, t, b, c, d) {
+               return c*((t=t/d-1)*t*t + 1) + b;
+       },
+       easeInOutCubic: function (x, t, b, c, d) {
+               if ((t/=d/2) < 1) return c/2*t*t*t + b;
+               return c/2*((t-=2)*t*t + 2) + b;
+       },
+       easeInQuart: function (x, t, b, c, d) {
+               return c*(t/=d)*t*t*t + b;
+       },
+       easeOutQuart: function (x, t, b, c, d) {
+               return -c * ((t=t/d-1)*t*t*t - 1) + b;
+       },
+       easeInOutQuart: function (x, t, b, c, d) {
+               if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
+               return -c/2 * ((t-=2)*t*t*t - 2) + b;
+       },
+       easeInQuint: function (x, t, b, c, d) {
+               return c*(t/=d)*t*t*t*t + b;
+       },
+       easeOutQuint: function (x, t, b, c, d) {
+               return c*((t=t/d-1)*t*t*t*t + 1) + b;
+       },
+       easeInOutQuint: function (x, t, b, c, d) {
+               if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
+               return c/2*((t-=2)*t*t*t*t + 2) + b;
+       },
+       easeInSine: function (x, t, b, c, d) {
+               return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
+       },
+       easeOutSine: function (x, t, b, c, d) {
+               return c * Math.sin(t/d * (Math.PI/2)) + b;
+       },
+       easeInOutSine: function (x, t, b, c, d) {
+               return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
+       },
+       easeInExpo: function (x, t, b, c, d) {
+               return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
+       },
+       easeOutExpo: function (x, t, b, c, d) {
+               return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
+       },
+       easeInOutExpo: function (x, t, b, c, d) {
+               if (t==0) return b;
+               if (t==d) return b+c;
+               if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
+               return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
+       },
+       easeInCirc: function (x, t, b, c, d) {
+               return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
+       },
+       easeOutCirc: function (x, t, b, c, d) {
+               return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
+       },
+       easeInOutCirc: function (x, t, b, c, d) {
+               if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
+               return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
+       },
+       easeInElastic: function (x, t, b, c, d) {
+               var s=1.70158;var p=0;var a=c;
+               if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
+               if (a < Math.abs(c)) { a=c; var s=p/4; }
+               else var s = p/(2*Math.PI) * Math.asin (c/a);
+               return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+       },
+       easeOutElastic: function (x, t, b, c, d) {
+               var s=1.70158;var p=0;var a=c;
+               if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
+               if (a < Math.abs(c)) { a=c; var s=p/4; }
+               else var s = p/(2*Math.PI) * Math.asin (c/a);
+               return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
+       },
+       easeInOutElastic: function (x, t, b, c, d) {
+               var s=1.70158;var p=0;var a=c;
+               if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
+               if (a < Math.abs(c)) { a=c; var s=p/4; }
+               else var s = p/(2*Math.PI) * Math.asin (c/a);
+               if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+               return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
+       },
+       easeInBack: function (x, t, b, c, d, s) {
+               if (s == undefined) s = 1.70158;
+               return c*(t/=d)*t*((s+1)*t - s) + b;
+       },
+       easeOutBack: function (x, t, b, c, d, s) {
+               if (s == undefined) s = 1.70158;
+               return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
+       },
+       easeInOutBack: function (x, t, b, c, d, s) {
+               if (s == undefined) s = 1.70158; 
+               if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
+               return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
+       },
+       easeInBounce: function (x, t, b, c, d) {
+               return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
+       },
+       easeOutBounce: function (x, t, b, c, d) {
+               if ((t/=d) < (1/2.75)) {
+                       return c*(7.5625*t*t) + b;
+               } else if (t < (2/2.75)) {
+                       return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
+               } else if (t < (2.5/2.75)) {
+                       return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
+               } else {
+                       return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
+               }
+       },
+       easeInOutBounce: function (x, t, b, c, d) {
+               if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
+               return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
+       }
+});
+
+/*
+ *
+ * TERMS OF USE - EASING EQUATIONS
+ * 
+ * Open source under the BSD License. 
+ * 
+ * Copyright © 2001 Robert Penner
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without modification, 
+ * are permitted provided that the following conditions are met:
+ * 
+ * Redistributions of source code must retain the above copyright notice, this list of 
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list 
+ * of conditions and the following disclaimer in the documentation and/or other materials 
+ * provided with the distribution.
+ * 
+ * Neither the name of the author nor the names of contributors may be used to endorse 
+ * or promote products derived from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
+ * OF THE POSSIBILITY OF SUCH DAMAGE. 
+ *
+ *//*!
+ * jQuery Templates Plugin 1.0.0pre
+ * http://github.com/jquery/jquery-tmpl
+ * Requires jQuery 1.4.2
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */
+(function( jQuery, undefined ){
+       var oldManip = jQuery.fn.domManip, tmplItmAtt = "_tmplitem", htmlExpr = /^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,
+               newTmplItems = {}, wrappedItems = {}, appendToTmplItems, topTmplItem = { key: 0, data: {} }, itemKey = 0, cloneIndex = 0, stack = [];
+
+       function newTmplItem( options, parentItem, fn, data ) {
+               // Returns a template item data structure for a new rendered instance of a template (a 'template item').
+               // The content field is a hierarchical array of strings and nested items (to be
+               // removed and replaced by nodes field of dom elements, once inserted in DOM).
+               var newItem = {
+                       data: data || (data === 0 || data === false) ? data : (parentItem ? parentItem.data : {}),
+                       _wrap: parentItem ? parentItem._wrap : null,
+                       tmpl: null,
+                       parent: parentItem || null,
+                       nodes: [],
+                       calls: tiCalls,
+                       nest: tiNest,
+                       wrap: tiWrap,
+                       html: tiHtml,
+                       update: tiUpdate
+               };
+               if ( options ) {
+                       jQuery.extend( newItem, options, { nodes: [], parent: parentItem });
+               }
+               if ( fn ) {
+                       // Build the hierarchical content to be used during insertion into DOM
+                       newItem.tmpl = fn;
+                       newItem._ctnt = newItem._ctnt || newItem.tmpl( jQuery, newItem );
+                       newItem.key = ++itemKey;
+                       // Keep track of new template item, until it is stored as jQuery Data on DOM element
+                       (stack.length ? wrappedItems : newTmplItems)[itemKey] = newItem;
+               }
+               return newItem;
+       }
+
+       // Override appendTo etc., in order to provide support for targeting multiple elements. (This code would disappear if integrated in jquery core).
+       jQuery.each({
+               appendTo: "append",
+               prependTo: "prepend",
+               insertBefore: "before",
+               insertAfter: "after",
+               replaceAll: "replaceWith"
+       }, function( name, original ) {
+               jQuery.fn[ name ] = function( selector ) {
+                       var ret = [], insert = jQuery( selector ), elems, i, l, tmplItems,
+                               parent = this.length === 1 && this[0].parentNode;
+
+                       appendToTmplItems = newTmplItems || {};
+                       if ( parent && parent.nodeType === 11 && parent.childNodes.length === 1 && insert.length === 1 ) {
+                               insert[ original ]( this[0] );
+                               ret = this;
+                       } else {
+                               for ( i = 0, l = insert.length; i < l; i++ ) {
+                                       cloneIndex = i;
+                                       elems = (i > 0 ? this.clone(true) : this).get();
+                                       jQuery( insert[i] )[ original ]( elems );
+                                       ret = ret.concat( elems );
+                               }
+                               cloneIndex = 0;
+                               ret = this.pushStack( ret, name, insert.selector );
+                       }
+                       tmplItems = appendToTmplItems;
+                       appendToTmplItems = null;
+                       jQuery.tmpl.complete( tmplItems );
+                       return ret;
+               };
+       });
+
+       jQuery.fn.extend({
+               // Use first wrapped element as template markup.
+               // Return wrapped set of template items, obtained by rendering template against data.
+               tmpl: function( data, options, parentItem ) {
+                       return jQuery.tmpl( this[0], data, options, parentItem );
+               },
+
+               // Find which rendered template item the first wrapped DOM element belongs to
+               tmplItem: function() {
+                       return jQuery.tmplItem( this[0] );
+               },
+
+               // Consider the first wrapped element as a template declaration, and get the compiled template or store it as a named template.
+               template: function( name ) {
+                       return jQuery.template( name, this[0] );
+               },
+
+               domManip: function( args, table, callback, options ) {
+                       if ( args[0] && jQuery.isArray( args[0] )) {
+                               var dmArgs = jQuery.makeArray( arguments ), elems = args[0], elemsLength = elems.length, i = 0, tmplItem;
+                               while ( i < elemsLength && !(tmplItem = jQuery.data( elems[i++], "tmplItem" ))) {}
+                               if ( tmplItem && cloneIndex ) {
+                                       dmArgs[2] = function( fragClone ) {
+                                               // Handler called by oldManip when rendered template has been inserted into DOM.
+                                               jQuery.tmpl.afterManip( this, fragClone, callback );
+                                       };
+                               }
+                               oldManip.apply( this, dmArgs );
+                       } else {
+                               oldManip.apply( this, arguments );
+                       }
+                       cloneIndex = 0;
+                       if ( !appendToTmplItems ) {
+                               jQuery.tmpl.complete( newTmplItems );
+                       }
+                       return this;
+               }
+       });
+
+       jQuery.extend({
+               // Return wrapped set of template items, obtained by rendering template against data.
+               tmpl: function( tmpl, data, options, parentItem ) {
+                       var ret, topLevel = !parentItem;
+                       if ( topLevel ) {
+                               // This is a top-level tmpl call (not from a nested template using {{tmpl}})
+                               parentItem = topTmplItem;
+                               tmpl = jQuery.template[tmpl] || jQuery.template( null, tmpl );
+                               wrappedItems = {}; // Any wrapped items will be rebuilt, since this is top level
+                       } else if ( !tmpl ) {
+                               // The template item is already associated with DOM - this is a refresh.
+                               // Re-evaluate rendered template for the parentItem
+                               tmpl = parentItem.tmpl;
+                               newTmplItems[parentItem.key] = parentItem;
+                               parentItem.nodes = [];
+                               if ( parentItem.wrapped ) {
+                                       updateWrapped( parentItem, parentItem.wrapped );
+                               }
+                               // Rebuild, without creating a new template item
+                               return jQuery( build( parentItem, null, parentItem.tmpl( jQuery, parentItem ) ));
+                       }
+                       if ( !tmpl ) {
+                               return []; // Could throw...
+                       }
+                       if ( typeof data === "function" ) {
+                               data = data.call( parentItem || {} );
+                       }
+                       if ( options && options.wrapped ) {
+                               updateWrapped( options, options.wrapped );
+                       }
+                       ret = jQuery.isArray( data ) ?
+                               jQuery.map( data, function( dataItem ) {
+                                       return dataItem ? newTmplItem( options, parentItem, tmpl, dataItem ) : null;
+                               }) :
+                               [ newTmplItem( options, parentItem, tmpl, data ) ];
+                       return topLevel ? jQuery( build( parentItem, null, ret ) ) : ret;
+               },
+
+               // Return rendered template item for an element.
+               tmplItem: function( elem ) {
+                       var tmplItem;
+                       if ( elem instanceof jQuery ) {
+                               elem = elem[0];
+                       }
+                       while ( elem && elem.nodeType === 1 && !(tmplItem = jQuery.data( elem, "tmplItem" )) && (elem = elem.parentNode) ) {}
+                       return tmplItem || topTmplItem;
+               },
+
+               // Set:
+               // Use $.template( name, tmpl ) to cache a named template,
+               // where tmpl is a template string, a script element or a jQuery instance wrapping a script element, etc.
+               // Use $( "selector" ).template( name ) to provide access by name to a script block template declaration.
+
+               // Get:
+               // Use $.template( name ) to access a cached template.
+               // Also $( selectorToScriptBlock ).template(), or $.template( null, templateString )
+               // will return the compiled template, without adding a name reference.
+               // If templateString includes at least one HTML tag, $.template( templateString ) is equivalent
+               // to $.template( null, templateString )
+               template: function( name, tmpl ) {
+                       if (tmpl) {
+                               // Compile template and associate with name
+                               if ( typeof tmpl === "string" ) {
+                                       // This is an HTML string being passed directly in.
+                                       tmpl = buildTmplFn( tmpl );
+                               } else if ( tmpl instanceof jQuery ) {
+                                       tmpl = tmpl[0] || {};
+                               }
+                               if ( tmpl.nodeType ) {
+                                       // If this is a template block, use cached copy, or generate tmpl function and cache.
+                                       tmpl = jQuery.data( tmpl, "tmpl" ) || jQuery.data( tmpl, "tmpl", buildTmplFn( tmpl.innerHTML ));
+                                       // Issue: In IE, if the container element is not a script block, the innerHTML will remove quotes from attribute values whenever the value does not include white space.
+                                       // This means that foo="${x}" will not work if the value of x includes white space: foo="${x}" -> foo=value of x.
+                                       // To correct this, include space in tag: foo="${ x }" -> foo="value of x"
+                               }
+                               return typeof name === "string" ? (jQuery.template[name] = tmpl) : tmpl;
+                       }
+                       // Return named compiled template
+                       return name ? (typeof name !== "string" ? jQuery.template( null, name ):
+                               (jQuery.template[name] ||
+                                       // If not in map, and not containing at least on HTML tag, treat as a selector.
+                                       // (If integrated with core, use quickExpr.exec)
+                                       jQuery.template( null, htmlExpr.test( name ) ? name : jQuery( name )))) : null;
+               },
+
+               encode: function( text ) {
+                       // Do HTML encoding replacing < > & and ' and " by corresponding entities.
+                       return ("" + text).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;");
+               }
+       });
+
+       jQuery.extend( jQuery.tmpl, {
+               tag: {
+                       "tmpl": {
+                               _default: { $2: "null" },
+                               open: "if($notnull_1){__=__.concat($item.nest($1,$2));}"
+                               // tmpl target parameter can be of type function, so use $1, not $1a (so not auto detection of functions)
+                               // This means that {{tmpl foo}} treats foo as a template (which IS a function).
+                               // Explicit parens can be used if foo is a function that returns a template: {{tmpl foo()}}.
+                       },
+                       "wrap": {
+                               _default: { $2: "null" },
+                               open: "$item.calls(__,$1,$2);__=[];",
+                               close: "call=$item.calls();__=call._.concat($item.wrap(call,__));"
+                       },
+                       "each": {
+                               _default: { $2: "$index, $value" },
+                               open: "if($notnull_1){$.each($1a,function($2){with(this){",
+                               close: "}});}"
+                       },
+                       "if": {
+                               open: "if(($notnull_1) && $1a){",
+                               close: "}"
+                       },
+                       "else": {
+                               _default: { $1: "true" },
+                               open: "}else if(($notnull_1) && $1a){"
+                       },
+                       "html": {
+                               // Unecoded expression evaluation.
+                               open: "if($notnull_1){__.push($1a);}"
+                       },
+                       "=": {
+                               // Encoded expression evaluation. Abbreviated form is ${}.
+                               _default: { $1: "$data" },
+                               open: "if($notnull_1){__.push($.encode($1a));}"
+                       },
+                       "!": {
+                               // Comment tag. Skipped by parser
+                               open: ""
+                       }
+               },
+
+               // This stub can be overridden, e.g. in jquery.tmplPlus for providing rendered events
+               complete: function( items ) {
+                       newTmplItems = {};
+               },
+
+               // Call this from code which overrides domManip, or equivalent
+               // Manage cloning/storing template items etc.
+               afterManip: function afterManip( elem, fragClone, callback ) {
+                       // Provides cloned fragment ready for fixup prior to and after insertion into DOM
+                       var content = fragClone.nodeType === 11 ?
+                               jQuery.makeArray(fragClone.childNodes) :
+                               fragClone.nodeType === 1 ? [fragClone] : [];
+
+                       // Return fragment to original caller (e.g. append) for DOM insertion
+                       callback.call( elem, fragClone );
+
+                       // Fragment has been inserted:- Add inserted nodes to tmplItem data structure. Replace inserted element annotations by jQuery.data.
+                       storeTmplItems( content );
+                       cloneIndex++;
+               }
+       });
+
+       //========================== Private helper functions, used by code above ==========================
+
+       function build( tmplItem, nested, content ) {
+               // Convert hierarchical content into flat string array
+               // and finally return array of fragments ready for DOM insertion
+               var frag, ret = content ? jQuery.map( content, function( item ) {
+                       return (typeof item === "string") ?
+                               // Insert template item annotations, to be converted to jQuery.data( "tmplItem" ) when elems are inserted into DOM.
+                               (tmplItem.key ? item.replace( /(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g, "$1 " + tmplItmAtt + "=\"" + tmplItem.key + "\" $2" ) : item) :
+                               // This is a child template item. Build nested template.
+                               build( item, tmplItem, item._ctnt );
+               }) :
+               // If content is not defined, insert tmplItem directly. Not a template item. May be a string, or a string array, e.g. from {{html $item.html()}}.
+               tmplItem;
+               if ( nested ) {
+                       return ret;
+               }
+
+               // top-level template
+               ret = ret.join("");
+
+               // Support templates which have initial or final text nodes, or consist only of text
+               // Also support HTML entities within the HTML markup.
+               ret.replace( /^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/, function( all, before, middle, after) {
+                       frag = jQuery( middle ).get();
+
+                       storeTmplItems( frag );
+                       if ( before ) {
+                               frag = unencode( before ).concat(frag);
+                       }
+                       if ( after ) {
+                               frag = frag.concat(unencode( after ));
+                       }
+               });
+               return frag ? frag : unencode( ret );
+       }
+
+       function unencode( text ) {
+               // Use createElement, since createTextNode will not render HTML entities correctly
+               var el = document.createElement( "div" );
+               el.innerHTML = text;
+               return jQuery.makeArray(el.childNodes);
+       }
+
+       // Generate a reusable function that will serve to render a template against data
+       function buildTmplFn( markup ) {
+               return new Function("jQuery","$item",
+                       // Use the variable __ to hold a string array while building the compiled template. (See https://github.com/jquery/jquery-tmpl/issues#issue/10).
+                       "var $=jQuery,call,__=[],$data=$item.data;" +
+
+                       // Introduce the data as local variables using with(){}
+                       "with($data){__.push('" +
+
+                       // Convert the template into pure JavaScript
+                       jQuery.trim(markup)
+                               .replace( /([\\'])/g, "\\$1" )
+                               .replace( /[\r\t\n]/g, " " )
+                               .replace( /\$\{([^\}]*)\}/g, "{{= $1}}" )
+                               .replace( /\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,
+                               function( all, slash, type, fnargs, target, parens, args ) {
+                                       var tag = jQuery.tmpl.tag[ type ], def, expr, exprAutoFnDetect;
+                                       if ( !tag ) {
+                                               throw "Unknown template tag: " + type;
+                                       }
+                                       def = tag._default || [];
+                                       if ( parens && !/\w$/.test(target)) {
+                                               target += parens;
+                                               parens = "";
+                                       }
+                                       if ( target ) {
+                                               target = unescape( target );
+                                               args = args ? ("," + unescape( args ) + ")") : (parens ? ")" : "");
+                                               // Support for target being things like a.toLowerCase();
+                                               // In that case don't call with template item as 'this' pointer. Just evaluate...
+                                               expr = parens ? (target.indexOf(".") > -1 ? target + unescape( parens ) : ("(" + target + ").call($item" + args)) : target;
+                                               exprAutoFnDetect = parens ? expr : "(typeof(" + target + ")==='function'?(" + target + ").call($item):(" + target + "))";
+                                       } else {
+                                               exprAutoFnDetect = expr = def.$1 || "null";
+                                       }
+                                       fnargs = unescape( fnargs );
+                                       return "');" +
+                                               tag[ slash ? "close" : "open" ]
+                                                       .split( "$notnull_1" ).join( target ? "typeof(" + target + ")!=='undefined' && (" + target + ")!=null" : "true" )
+                                                       .split( "$1a" ).join( exprAutoFnDetect )
+                                                       .split( "$1" ).join( expr )
+                                                       .split( "$2" ).join( fnargs || def.$2 || "" ) +
+                                               "__.push('";
+                               }) +
+                       "');}return __;"
+               );
+       }
+       function updateWrapped( options, wrapped ) {
+               // Build the wrapped content.
+               options._wrap = build( options, true,
+                       // Suport imperative scenario in which options.wrapped can be set to a selector or an HTML string.
+                       jQuery.isArray( wrapped ) ? wrapped : [htmlExpr.test( wrapped ) ? wrapped : jQuery( wrapped ).html()]
+               ).join("");
+       }
+
+       function unescape( args ) {
+               return args ? args.replace( /\\'/g, "'").replace(/\\\\/g, "\\" ) : null;
+       }
+       function outerHtml( elem ) {
+               var div = document.createElement("div");
+               div.appendChild( elem.cloneNode(true) );
+               return div.innerHTML;
+       }
+
+       // Store template items in jQuery.data(), ensuring a unique tmplItem data data structure for each rendered template instance.
+       function storeTmplItems( content ) {
+               var keySuffix = "_" + cloneIndex, elem, elems, newClonedItems = {}, i, l, m;
+               for ( i = 0, l = content.length; i < l; i++ ) {
+                       if ( (elem = content[i]).nodeType !== 1 ) {
+                               continue;
+                       }
+                       elems = elem.getElementsByTagName("*");
+                       for ( m = elems.length - 1; m >= 0; m-- ) {
+                               processItemKey( elems[m] );
+                       }
+                       processItemKey( elem );
+               }
+               function processItemKey( el ) {
+                       var pntKey, pntNode = el, pntItem, tmplItem, key;
+                       // Ensure that each rendered template inserted into the DOM has its own template item,
+                       if ( (key = el.getAttribute( tmplItmAtt ))) {
+                               while ( pntNode.parentNode && (pntNode = pntNode.parentNode).nodeType === 1 && !(pntKey = pntNode.getAttribute( tmplItmAtt ))) { }
+                               if ( pntKey !== key ) {
+                                       // The next ancestor with a _tmplitem expando is on a different key than this one.
+                                       // So this is a top-level element within this template item
+                                       // Set pntNode to the key of the parentNode, or to 0 if pntNode.parentNode is null, or pntNode is a fragment.
+                                       pntNode = pntNode.parentNode ? (pntNode.nodeType === 11 ? 0 : (pntNode.getAttribute( tmplItmAtt ) || 0)) : 0;
+                                       if ( !(tmplItem = newTmplItems[key]) ) {
+                                               // The item is for wrapped content, and was copied from the temporary parent wrappedItem.
+                                               tmplItem = wrappedItems[key];
+                                               tmplItem = newTmplItem( tmplItem, newTmplItems[pntNode]||wrappedItems[pntNode] );
+                                               tmplItem.key = ++itemKey;
+                                               newTmplItems[itemKey] = tmplItem;
+                                       }
+                                       if ( cloneIndex ) {
+                                               cloneTmplItem( key );
+                                       }
+                               }
+                               el.removeAttribute( tmplItmAtt );
+                       } else if ( cloneIndex && (tmplItem = jQuery.data( el, "tmplItem" )) ) {
+                               // This was a rendered element, cloned during append or appendTo etc.
+                               // TmplItem stored in jQuery data has already been cloned in cloneCopyEvent. We must replace it with a fresh cloned tmplItem.
+                               cloneTmplItem( tmplItem.key );
+                               newTmplItems[tmplItem.key] = tmplItem;
+                               pntNode = jQuery.data( el.parentNode, "tmplItem" );
+                               pntNode = pntNode ? pntNode.key : 0;
+                       }
+                       if ( tmplItem ) {
+                               pntItem = tmplItem;
+                               // Find the template item of the parent element.
+                               // (Using !=, not !==, since pntItem.key is number, and pntNode may be a string)
+                               while ( pntItem && pntItem.key != pntNode ) {
+                                       // Add this element as a top-level node for this rendered template item, as well as for any
+                                       // ancestor items between this item and the item of its parent element
+                                       pntItem.nodes.push( el );
+                                       pntItem = pntItem.parent;
+                               }
+                               // Delete content built during rendering - reduce API surface area and memory use, and avoid exposing of stale data after rendering...
+                               delete tmplItem._ctnt;
+                               delete tmplItem._wrap;
+                               // Store template item as jQuery data on the element
+                               jQuery.data( el, "tmplItem", tmplItem );
+                       }
+                       function cloneTmplItem( key ) {
+                               key = key + keySuffix;
+                               tmplItem = newClonedItems[key] =
+                                       (newClonedItems[key] || newTmplItem( tmplItem, newTmplItems[tmplItem.parent.key + keySuffix] || tmplItem.parent ));
+                       }
+               }
+       }
+
+       //---- Helper functions for template item ----
+
+       function tiCalls( content, tmpl, data, options ) {
+               if ( !content ) {
+                       return stack.pop();
+               }
+               stack.push({ _: content, tmpl: tmpl, item:this, data: data, options: options });
+       }
+
+       function tiNest( tmpl, data, options ) {
+               // nested template, using {{tmpl}} tag
+               return jQuery.tmpl( jQuery.template( tmpl ), data, options, this );
+       }
+
+       function tiWrap( call, wrapped ) {
+               // nested template, using {{wrap}} tag
+               var options = call.options || {};
+               options.wrapped = wrapped;
+               // Apply the template, which may incorporate wrapped content,
+               return jQuery.tmpl( jQuery.template( call.tmpl ), call.data, options, call.item );
+       }
+
+       function tiHtml( filter, textOnly ) {
+               var wrapped = this._wrap;
+               return jQuery.map(
+                       jQuery( jQuery.isArray( wrapped ) ? wrapped.join("") : wrapped ).filter( filter || "*" ),
+                       function(e) {
+                               return textOnly ?
+                                       e.innerText || e.textContent :
+                                       e.outerHTML || outerHtml(e);
+                       });
+       }
+
+       function tiUpdate() {
+               var coll = this.nodes;
+               jQuery.tmpl( null, null, null, this).insertBefore( coll[0] );
+               jQuery( coll ).remove();
+       }
+})( jQuery );
+/*
+* jQuery Mobile Framework Git Build: SHA1: 8f3c14b8b7b116570e29760a99cbdb8ca27a0307 <> Date: Mon Jan 28 22:00:34 2013 +0900
+* http://jquerymobile.com
+*
+* Copyright 2012 jQuery Foundation and other contributors
+* Released under the MIT license.
+* http://jquery.org/license
+*
+*/
+
+
+(function ( root, doc, factory ) {
+       if ( typeof define === "function" && define.amd ) {
+               // AMD. Register as an anonymous module.
+               define( [ "jquery" ], function ( $ ) {
+                       factory( $, root, doc );
+                       return $.mobile;
+               });
+       } else {
+               // Browser globals
+               factory( root.jQuery, root, doc );
+       }
+}( this, document, function ( jQuery, window, document, undefined ) {
+(function( $, window, undefined ) {
+
+       var nsNormalizeDict = {};
+
+       // jQuery.mobile configurable options
+       $.mobile = $.extend( {}, {
+
+               // Version of the jQuery Mobile Framework
+               version: "1.2.0",
+
+               // Namespace used framework-wide for data-attrs. Default is no namespace
+               ns: "",
+
+               // Define the url parameter used for referencing widget-generated sub-pages.
+               // Translates to to example.html&ui-page=subpageIdentifier
+               // hash segment before &ui-page= is used to make Ajax request
+               subPageUrlKey: "ui-page",
+
+               // Class assigned to page currently in view, and during transitions
+               activePageClass: "ui-page-active",
+
+               // Class used for "active" button state, from CSS framework
+               activeBtnClass: "ui-btn-active",
+
+               // Class used for "focus" form element state, from CSS framework
+               focusClass: "ui-focus",
+
+               // Automatically handle clicks and form submissions through Ajax, when same-domain
+               ajaxEnabled: true,
+
+               // Automatically load and show pages based on location.hash
+               hashListeningEnabled: true,
+
+               // disable to prevent jquery from bothering with links
+               linkBindingEnabled: true,
+
+               // Set default page transition - 'none' for no transitions
+               defaultPageTransition: "fade",
+
+               // Set maximum window width for transitions to apply - 'false' for no limit
+               maxTransitionWidth: false,
+
+               // Minimum scroll distance that will be remembered when returning to a page
+               minScrollBack: 250,
+
+               // DEPRECATED: the following property is no longer in use, but defined until 2.0 to prevent conflicts
+               touchOverflowEnabled: false,
+
+               // Set default dialog transition - 'none' for no transitions
+               defaultDialogTransition: "pop",
+
+               // Error response message - appears when an Ajax page request fails
+               pageLoadErrorMessage: "Error Loading Page",
+
+               // For error messages, which theme does the box uses?
+               pageLoadErrorMessageTheme: "e",
+
+               // replace calls to window.history.back with phonegaps navigation helper
+               // where it is provided on the window object
+               phonegapNavigationEnabled: false,
+
+               //automatically initialize the DOM when it's ready
+               autoInitializePage: true,
+
+               pushStateEnabled: true,
+
+               // allows users to opt in to ignoring content by marking a parent element as
+               // data-ignored
+               ignoreContentEnabled: false,
+
+               // turn of binding to the native orientationchange due to android orientation behavior
+               orientationChangeEnabled: true,
+
+               buttonMarkup: {
+                       hoverDelay: 200
+               },
+
+               // TODO might be useful upstream in jquery itself ?
+               keyCode: {
+                       ALT: 18,
+                       BACKSPACE: 8,
+                       CAPS_LOCK: 20,
+                       COMMA: 188,
+                       COMMAND: 91,
+                       COMMAND_LEFT: 91, // COMMAND
+                       COMMAND_RIGHT: 93,
+                       CONTROL: 17,
+                       DELETE: 46,
+                       DOWN: 40,
+                       END: 35,
+                       ENTER: 13,
+                       ESCAPE: 27,
+                       HOME: 36,
+                       INSERT: 45,
+                       LEFT: 37,
+                       MENU: 93, // COMMAND_RIGHT
+                       NUMPAD_ADD: 107,
+                       NUMPAD_DECIMAL: 110,
+                       NUMPAD_DIVIDE: 111,
+                       NUMPAD_ENTER: 108,
+                       NUMPAD_MULTIPLY: 106,
+                       NUMPAD_SUBTRACT: 109,
+                       PAGE_DOWN: 34,
+                       PAGE_UP: 33,
+                       PERIOD: 190,
+                       RIGHT: 39,
+                       SHIFT: 16,
+                       SPACE: 32,
+                       TAB: 9,
+                       UP: 38,
+                       WINDOWS: 91 // COMMAND
+               },
+
+               // Scroll page vertically: scroll to 0 to hide iOS address bar, or pass a Y value
+               silentScroll: function( ypos ) {
+                       if ( $.type( ypos ) !== "number" ) {
+                               ypos = $.mobile.defaultHomeScroll;
+                       }
+
+                       // prevent scrollstart and scrollstop events
+                       $.event.special.scrollstart.enabled = false;
+
+                       setTimeout( function() {
+                               window.scrollTo( 0, ypos );
+                               $( document ).trigger( "silentscroll", { x: 0, y: ypos });
+                       }, 20 );
+
+                       setTimeout( function() {
+                               $.event.special.scrollstart.enabled = true;
+                       }, 150 );
+               },
+
+               // Expose our cache for testing purposes.
+               nsNormalizeDict: nsNormalizeDict,
+
+               // Take a data attribute property, prepend the namespace
+               // and then camel case the attribute string. Add the result
+               // to our nsNormalizeDict so we don't have to do this again.
+               nsNormalize: function( prop ) {
+                       if ( !prop ) {
+                               return;
+                       }
+
+                       return nsNormalizeDict[ prop ] || ( nsNormalizeDict[ prop ] = $.camelCase( $.mobile.ns + prop ) );
+               },
+
+               // Find the closest parent with a theme class on it. Note that
+               // we are not using $.fn.closest() on purpose here because this
+               // method gets called quite a bit and we need it to be as fast
+               // as possible.
+               getInheritedTheme: function( el, defaultTheme ) {
+                       var e = el[ 0 ],
+                               ltr = "",
+                               re = /ui-(bar|body|overlay)-([a-z])\b/,
+                               c, m;
+
+                       while ( e ) {
+                               c = e.className || "";
+                               if ( c && ( m = re.exec( c ) ) && ( ltr = m[ 2 ] ) ) {
+                                       // We found a parent with a theme class
+                                       // on it so bail from this loop.
+                                       break;
+                               }
+
+                               e = e.parentNode;
+                       }
+
+                       // Return the theme letter we found, if none, return the
+                       // specified default.
+
+                       return ltr || defaultTheme || "a";
+               },
+
+               // TODO the following $ and $.fn extensions can/probably should be moved into jquery.mobile.core.helpers
+               //
+               // Find the closest javascript page element to gather settings data jsperf test
+               // http://jsperf.com/single-complex-selector-vs-many-complex-selectors/edit
+               // possibly naive, but it shows that the parsing overhead for *just* the page selector vs
+               // the page and dialog selector is negligable. This could probably be speed up by
+               // doing a similar parent node traversal to the one found in the inherited theme code above
+               closestPageData: function( $target ) {
+                       return $target
+                               .closest( ':jqmData(role="page"), :jqmData(role="dialog")' )
+                               .data( "page" );
+               },
+
+               enhanceable: function( $set ) {
+                       return this.haveParents( $set, "enhance" );
+               },
+
+               hijackable: function( $set ) {
+                       return this.haveParents( $set, "ajax" );
+               },
+
+               haveParents: function( $set, attr ) {
+                       if ( !$.mobile.ignoreContentEnabled ) {
+                               return $set;
+                       }
+
+                       var count = $set.length,
+                               $newSet = $(),
+                               e, $element, excluded;
+
+                       for ( var i = 0; i < count; i++ ) {
+                               $element = $set.eq( i );
+                               excluded = false;
+                               e = $set[ i ];
+
+                               while ( e ) {
+                                       var c = e.getAttribute ? e.getAttribute( "data-" + $.mobile.ns + attr ) : "";
+
+                                       if ( c === "false" ) {
+                                               excluded = true;
+                                               break;
+                                       }
+
+                                       e = e.parentNode;
+                               }
+
+                               if ( !excluded ) {
+                                       $newSet = $newSet.add( $element );
+                               }
+                       }
+
+                       return $newSet;
+               },
+
+               getScreenHeight: function() {
+                       // Native innerHeight returns more accurate value for this across platforms,
+                       // jQuery version is here as a normalized fallback for platforms like Symbian
+                       return window.innerHeight || $( window ).height();
+               }
+       }, $.mobile );
+
+       // Mobile version of data and removeData and hasData methods
+       // ensures all data is set and retrieved using jQuery Mobile's data namespace
+       $.fn.jqmData = function( prop, value ) {
+               var result;
+               if ( typeof prop !== "undefined" ) {
+                       if ( prop ) {
+                               prop = $.mobile.nsNormalize( prop );
+                       }
+
+                       // undefined is permitted as an explicit input for the second param
+                       // in this case it returns the value and does not set it to undefined
+                       if( arguments.length < 2 || value === undefined ){
+                               result = this.data( prop );
+                       } else {
+                               result = this.data( prop, value );
+                       }
+               }
+               return result;
+       };
+
+       $.jqmData = function( elem, prop, value ) {
+               var result;
+               if ( typeof prop !== "undefined" ) {
+                       result = $.data( elem, prop ? $.mobile.nsNormalize( prop ) : prop, value );
+               }
+               return result;
+       };
+
+       $.fn.jqmRemoveData = function( prop ) {
+               return this.removeData( $.mobile.nsNormalize( prop ) );
+       };
+
+       $.jqmRemoveData = function( elem, prop ) {
+               return $.removeData( elem, $.mobile.nsNormalize( prop ) );
+       };
+
+       $.fn.removeWithDependents = function() {
+               $.removeWithDependents( this );
+       };
+
+       $.removeWithDependents = function( elem ) {
+               var $elem = $( elem );
+
+               ( $elem.jqmData( 'dependents' ) || $() ).remove();
+               $elem.remove();
+       };
+
+       $.fn.addDependents = function( newDependents ) {
+               $.addDependents( $( this ), newDependents );
+       };
+
+       $.addDependents = function( elem, newDependents ) {
+               var dependents = $( elem ).jqmData( 'dependents' ) || $();
+
+               $( elem ).jqmData( 'dependents', $.merge( dependents, newDependents ) );
+       };
+
+       // note that this helper doesn't attempt to handle the callback
+       // or setting of an html elements text, its only purpose is
+       // to return the html encoded version of the text in all cases. (thus the name)
+       $.fn.getEncodedText = function() {
+               return $( "<div/>" ).text( $( this ).text() ).html();
+       };
+
+       // fluent helper function for the mobile namespaced equivalent
+       $.fn.jqmEnhanceable = function() {
+               return $.mobile.enhanceable( this );
+       };
+
+       $.fn.jqmHijackable = function() {
+               return $.mobile.hijackable( this );
+       };
+
+       // Monkey-patching Sizzle to filter the :jqmData selector
+       var oldFind = $.find,
+               jqmDataRE = /:jqmData\(([^)]*)\)/g;
+
+       $.find = function( selector, context, ret, extra ) {
+               selector = selector.replace( jqmDataRE, "[data-" + ( $.mobile.ns || "" ) + "$1]" );
+
+               return oldFind.call( this, selector, context, ret, extra );
+       };
+
+       $.extend( $.find, oldFind );
+
+       $.find.matches = function( expr, set ) {
+               return $.find( expr, null, null, set );
+       };
+
+       $.find.matchesSelector = function( node, expr ) {
+               return $.find( expr, null, null, [ node ] ).length > 0;
+       };
+})( jQuery, this );
+
+
+/*!
+ * jQuery UI Widget v1.9.0-beta.1
+ *
+ * Copyright 2012, https://github.com/jquery/jquery-ui/blob/1.9.0-beta.1/AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Widget
+ */
+(function( $, undefined ) {
+
+var uuid = 0,
+       slice = Array.prototype.slice,
+       _cleanData = $.cleanData;
+$.cleanData = function( elems ) {
+       for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+               try {
+                       $( elem ).triggerHandler( "remove" );
+               // http://bugs.jquery.com/ticket/8235
+               } catch( e ) {}
+       }
+       _cleanData( elems );
+};
+
+$.widget = function( name, base, prototype ) {
+       var fullName, existingConstructor, constructor, basePrototype,
+               namespace = name.split( "." )[ 0 ];
+
+       name = name.split( "." )[ 1 ];
+       fullName = namespace + "-" + name;
+
+       if ( !prototype ) {
+               prototype = base;
+               base = $.Widget;
+       }
+
+       // create selector for plugin
+       $.expr[ ":" ][ fullName ] = function( elem ) {
+               return !!$.data( elem, fullName );
+       };
+
+       $[ namespace ] = $[ namespace ] || {};
+       existingConstructor = $[ namespace ][ name ];
+       constructor = $[ namespace ][ name ] = function( options, element ) {
+               // allow instantiation without "new" keyword
+               if ( !this._createWidget ) {
+                       return new constructor( options, element );
+               }
+
+               // allow instantiation without initializing for simple inheritance
+               // must use "new" keyword (the code above always passes args)
+               if ( arguments.length ) {
+                       this._createWidget( options, element );
+               }
+       };
+       // extend with the existing constructor to carry over any static properties
+       $.extend( constructor, existingConstructor, {
+               version: prototype.version,
+               // copy the object used to create the prototype in case we need to
+               // redefine the widget later
+               _proto: $.extend( {}, prototype ),
+               // track widgets that inherit from this widget in case this widget is
+               // redefined after a widget inherits from it
+               _childConstructors: []
+       });
+
+       basePrototype = new base();
+       // we need to make the options hash a property directly on the new instance
+       // otherwise we'll modify the options hash on the prototype that we're
+       // inheriting from
+       basePrototype.options = $.widget.extend( {}, basePrototype.options );
+       $.each( prototype, function( prop, value ) {
+               if ( $.isFunction( value ) ) {
+                       prototype[ prop ] = (function() {
+                               var _super = function() {
+                                               return base.prototype[ prop ].apply( this, arguments );
+                                       },
+                                       _superApply = function( args ) {
+                                               return base.prototype[ prop ].apply( this, args );
+                                       };
+                               return function() {
+                                       var __super = this._super,
+                                               __superApply = this._superApply,
+                                               returnValue;
+
+                                       this._super = _super;
+                                       this._superApply = _superApply;
+
+                                       returnValue = value.apply( this, arguments );
+
+                                       this._super = __super;
+                                       this._superApply = __superApply;
+
+                                       return returnValue;
+                               };
+                       })();
+               }
+       });
+       constructor.prototype = $.widget.extend( basePrototype, {
+               // TODO: remove support for widgetEventPrefix
+               // always use the name + a colon as the prefix, e.g., draggable:start
+               // don't prefix for widgets that aren't DOM-based
+               widgetEventPrefix: name
+       }, prototype, {
+               constructor: constructor,
+               namespace: namespace,
+               widgetName: name,
+               // TODO remove widgetBaseClass, see #8155
+               widgetBaseClass: fullName,
+               widgetFullName: fullName
+       });
+
+       // If this widget is being redefined then we need to find all widgets that
+       // are inheriting from it and redefine all of them so that they inherit from
+       // the new version of this widget. We're essentially trying to replace one
+       // level in the prototype chain.
+       if ( existingConstructor ) {
+               $.each( existingConstructor._childConstructors, function( i, child ) {
+                       var childPrototype = child.prototype;
+
+                       // redefine the child widget using the same prototype that was
+                       // originally used, but inherit from the new version of the base
+                       $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
+               });
+               // remove the list of existing child constructors from the old constructor
+               // so the old child constructors can be garbage collected
+               delete existingConstructor._childConstructors;
+       } else {
+               base._childConstructors.push( constructor );
+       }
+
+       $.widget.bridge( name, constructor );
+};
+
+$.widget.extend = function( target ) {
+       var input = slice.call( arguments, 1 ),
+               inputIndex = 0,
+               inputLength = input.length,
+               key,
+               value;
+       for ( ; inputIndex < inputLength; inputIndex++ ) {
+               for ( key in input[ inputIndex ] ) {
+                       value = input[ inputIndex ][ key ];
+                       if (input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
+                               target[ key ] = $.isPlainObject( value ) ? $.widget.extend( {}, target[ key ], value ) : value;
+                       }
+               }
+       }
+       return target;
+};
+
+$.widget.bridge = function( name, object ) {
+       var fullName = object.prototype.widgetFullName;
+       $.fn[ name ] = function( options ) {
+               var isMethodCall = typeof options === "string",
+                       args = slice.call( arguments, 1 ),
+                       returnValue = this;
+
+               // allow multiple hashes to be passed on init
+               options = !isMethodCall && args.length ?
+                       $.widget.extend.apply( null, [ options ].concat(args) ) :
+                       options;
+
+               if ( isMethodCall ) {
+                       this.each(function() {
+                               var methodValue,
+                                       instance = $.data( this, fullName );
+                               if ( !instance ) {
+                                       return $.error( "cannot call methods on " + name + " prior to initialization; " +
+                                               "attempted to call method '" + options + "'" );
+                               }
+                               if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
+                                       return $.error( "no such method '" + options + "' for " + name + " widget instance" );
+                               }
+                               methodValue = instance[ options ].apply( instance, args );
+                               if ( methodValue !== instance && methodValue !== undefined ) {
+                                       returnValue = methodValue && methodValue.jquery ?
+                                               returnValue.pushStack( methodValue.get() ) :
+                                               methodValue;
+                                       return false;
+                               }
+                       });
+               } else {
+                       this.each(function() {
+                               var instance = $.data( this, fullName );
+                               if ( instance ) {
+                                       instance.option( options || {} )._init();
+                               } else {
+                                       new object( options, this );
+                               }
+                       });
+               }
+
+               return returnValue;
+       };
+};
+
+$.Widget = function( options, element ) {};
+$.Widget._childConstructors = [];
+
+$.Widget.prototype = {
+       widgetName: "widget",
+       widgetEventPrefix: "",
+       defaultElement: "<div>",
+       options: {
+               disabled: false,
+
+               // callbacks
+               create: null
+       },
+       _createWidget: function( options, element ) {
+               element = $( element || this.defaultElement || this )[ 0 ];
+               this.element = $( element );
+               this.uuid = uuid++;
+               this.eventNamespace = "." + this.widgetName + this.uuid;
+               this.options = $.widget.extend( {},
+                       this.options,
+                       this._getCreateOptions(),
+                       options );
+
+               this.bindings = $();
+               this.hoverable = $();
+               this.focusable = $();
+
+               if ( element !== this ) {
+                       // 1.9 BC for #7810
+                       // TODO remove dual storage
+                       $.data( element, this.widgetName, this );
+                       $.data( element, this.widgetFullName, this );
+                       this._on({ remove: "destroy" });
+                       this.document = $( element.style ?
+                               // element within the document
+                               element.ownerDocument :
+                               // element is window or document
+                               element.document || element );
+                       this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
+               }
+
+               this._create();
+               this._trigger( "create", null, this._getCreateEventData() );
+               this._init();
+       },
+       _getCreateOptions: $.noop,
+       _getCreateEventData: $.noop,
+       _create: $.noop,
+       _init: $.noop,
+
+       destroy: function() {
+               this._destroy();
+               // we can probably remove the unbind calls in 2.0
+               // all event bindings should go through this._on()
+               this.element
+                       .unbind( this.eventNamespace )
+                       // 1.9 BC for #7810
+                       // TODO remove dual storage
+                       .removeData( this.widgetName )
+                       .removeData( this.widgetFullName )
+                       // support: jquery <1.6.3
+                       // http://bugs.jquery.com/ticket/9413
+                       .removeData( $.camelCase( this.widgetFullName ) );
+               this.widget()
+                       .unbind( this.eventNamespace )
+                       .removeAttr( "aria-disabled" )
+                       .removeClass(
+                               this.widgetFullName + "-disabled " +
+                               "ui-state-disabled" );
+
+               // clean up events and states
+               this.bindings.unbind( this.eventNamespace );
+               this.hoverable.removeClass( "ui-state-hover" );
+               this.focusable.removeClass( "ui-state-focus" );
+       },
+       _destroy: $.noop,
+
+       widget: function() {
+               return this.element;
+       },
+
+       option: function( key, value ) {
+               var options = key,
+                       parts,
+                       curOption,
+                       i;
+
+               if ( arguments.length === 0 ) {
+                       // don't return a reference to the internal hash
+                       return $.widget.extend( {}, this.options );
+               }
+
+               if ( typeof key === "string" ) {
+                       // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
+                       options = {};
+                       parts = key.split( "." );
+                       key = parts.shift();
+                       if ( parts.length ) {
+                               curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
+                               for ( i = 0; i < parts.length - 1; i++ ) {
+                                       curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
+                                       curOption = curOption[ parts[ i ] ];
+                               }
+                               key = parts.pop();
+                               if ( value === undefined ) {
+                                       return curOption[ key ] === undefined ? null : curOption[ key ];
+                               }
+                               curOption[ key ] = value;
+                       } else {
+                               if ( value === undefined ) {
+                                       return this.options[ key ] === undefined ? null : this.options[ key ];
+                               }
+                               options[ key ] = value;
+                       }
+               }
+
+               this._setOptions( options );
+
+               return this;
+       },
+       _setOptions: function( options ) {
+               var key;
+
+               for ( key in options ) {
+                       this._setOption( key, options[ key ] );
+               }
+
+               return this;
+       },
+       _setOption: function( key, value ) {
+               this.options[ key ] = value;
+
+               if ( key === "disabled" ) {
+                       this.widget()
+                               .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
+                               .attr( "aria-disabled", value );
+                       this.hoverable.removeClass( "ui-state-hover" );
+                       this.focusable.removeClass( "ui-state-focus" );
+               }
+
+               return this;
+       },
+
+       enable: function() {
+               return this._setOption( "disabled", false );
+       },
+       disable: function() {
+               return this._setOption( "disabled", true );
+       },
+
+       _on: function( element, handlers ) {
+               // no element argument, shuffle and use this.element
+               if ( !handlers ) {
+                       handlers = element;
+                       element = this.element;
+               } else {
+                       // accept selectors, DOM elements
+                       element = $( element );
+                       this.bindings = this.bindings.add( element );
+               }
+
+               var instance = this;
+               $.each( handlers, function( event, handler ) {
+                       function handlerProxy() {
+                               // allow widgets to customize the disabled handling
+                               // - disabled as an array instead of boolean
+                               // - disabled class as method for disabling individual parts
+                               if ( instance.options.disabled === true ||
+                                               $( this ).hasClass( "ui-state-disabled" ) ) {
+                                       return;
+                               }
+                               return ( typeof handler === "string" ? instance[ handler ] : handler )
+                                       .apply( instance, arguments );
+                       }
+
+                       // copy the guid so direct unbinding works
+                       if ( typeof handler !== "string" ) {
+                               handlerProxy.guid = handler.guid =
+                                       handler.guid || handlerProxy.guid || $.guid++;
+                       }
+
+                       var match = event.match( /^(\w+)\s*(.*)$/ ),
+                               eventName = match[1] + instance.eventNamespace,
+                               selector = match[2];
+                       if ( selector ) {
+                               instance.widget().delegate( selector, eventName, handlerProxy );
+                       } else {
+                               element.bind( eventName, handlerProxy );
+                       }
+               });
+       },
+
+       _off: function( element, eventName ) {
+               eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
+               element.unbind( eventName ).undelegate( eventName );
+       },
+
+       _delay: function( handler, delay ) {
+               function handlerProxy() {
+                       return ( typeof handler === "string" ? instance[ handler ] : handler )
+                               .apply( instance, arguments );
+               }
+               var instance = this;
+               return setTimeout( handlerProxy, delay || 0 );
+       },
+
+       _hoverable: function( element ) {
+               this.hoverable = this.hoverable.add( element );
+               this._on( element, {
+                       mouseenter: function( event ) {
+                               $( event.currentTarget ).addClass( "ui-state-hover" );
+                       },
+                       mouseleave: function( event ) {
+                               $( event.currentTarget ).removeClass( "ui-state-hover" );
+                       }
+               });
+       },
+
+       _focusable: function( element ) {
+               this.focusable = this.focusable.add( element );
+               this._on( element, {
+                       focusin: function( event ) {
+                               $( event.currentTarget ).addClass( "ui-state-focus" );
+                       },
+                       focusout: function( event ) {
+                               $( event.currentTarget ).removeClass( "ui-state-focus" );
+                       }
+               });
+       },
+
+       _trigger: function( type, event, data ) {
+               var prop, orig,
+                       callback = this.options[ type ];
+
+               data = data || {};
+               event = $.Event( event );
+               event.type = ( type === this.widgetEventPrefix ?
+                       type :
+                       this.widgetEventPrefix + type ).toLowerCase();
+               // the original event may come from any element
+               // so we need to reset the target on the new event
+               event.target = this.element[ 0 ];
+
+               // copy original event properties over to the new event
+               orig = event.originalEvent;
+               if ( orig ) {
+                       for ( prop in orig ) {
+                               if ( !( prop in event ) ) {
+                                       event[ prop ] = orig[ prop ];
+                               }
+                       }
+               }
+
+               this.element.trigger( event, data );
+               return !( $.isFunction( callback ) &&
+                       callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
+                       event.isDefaultPrevented() );
+       }
+};
+
+$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
+       $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
+               if ( typeof options === "string" ) {
+                       options = { effect: options };
+               }
+               var hasOptions,
+                       effectName = !options ?
+                               method :
+                               options === true || typeof options === "number" ?
+                                       defaultEffect :
+                                       options.effect || defaultEffect;
+               options = options || {};
+               if ( typeof options === "number" ) {
+                       options = { duration: options };
+               }
+               hasOptions = !$.isEmptyObject( options );
+               options.complete = callback;
+               if ( options.delay ) {
+                       element.delay( options.delay );
+               }
+               if ( hasOptions && $.effects && ( $.effects.effect[ effectName ] || $.uiBackCompat !== false && $.effects[ effectName ] ) ) {
+                       element[ method ]( options );
+               } else if ( effectName !== method && element[ effectName ] ) {
+                       element[ effectName ]( options.duration, options.easing, callback );
+               } else {
+                       element.queue(function( next ) {
+                               $( this )[ method ]();
+                               if ( callback ) {
+                                       callback.call( element[ 0 ] );
+                               }
+                               next();
+                       });
+               }
+       };
+});
+
+// DEPRECATED
+if ( $.uiBackCompat !== false ) {
+       $.Widget.prototype._getCreateOptions = function() {
+               return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
+       };
+}
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.widget", {
+       // decorate the parent _createWidget to trigger `widgetinit` for users
+       // who wish to do post post `widgetcreate` alterations/additions
+       //
+       // TODO create a pull request for jquery ui to trigger this event
+       // in the original _createWidget
+       _createWidget: function() {
+               $.Widget.prototype._createWidget.apply( this, arguments );
+               this._trigger( 'init' );
+       },
+
+       _getCreateOptions: function() {
+
+               var elem = this.element,
+                       options = {};
+
+               $.each( this.options, function( option ) {
+
+                       var value = elem.jqmData( option.replace( /[A-Z]/g, function( c ) {
+                                                       return "-" + c.toLowerCase();
+                                               })
+                                       );
+
+                       if ( value !== undefined ) {
+                               options[ option ] = value;
+                       }
+               });
+
+               return options;
+       },
+
+       enhanceWithin: function( target, useKeepNative ) {
+               this.enhance( $( this.options.initSelector, $( target )), useKeepNative );
+       },
+
+       enhance: function( targets, useKeepNative ) {
+               var page, keepNative, $widgetElements = $( targets ), self = this;
+
+               // if ignoreContentEnabled is set to true the framework should
+               // only enhance the selected elements when they do NOT have a
+               // parent with the data-namespace-ignore attribute
+               $widgetElements = $.mobile.enhanceable( $widgetElements );
+
+               if ( useKeepNative && $widgetElements.length ) {
+                       // TODO remove dependency on the page widget for the keepNative.
+                       // Currently the keepNative value is defined on the page prototype so
+                       // the method is as well
+                       page = $.mobile.closestPageData( $widgetElements );
+                       keepNative = ( page && page.keepNativeSelector()) || "";
+
+                       $widgetElements = $widgetElements.not( keepNative );
+               }
+
+               $widgetElements[ this.widgetName ]();
+       },
+
+       raise: function( msg ) {
+               throw "Widget [" + this.widgetName + "]: " + msg;
+       }
+});
+
+})( jQuery );
+
+
+(function( $, window ) {
+       // DEPRECATED
+       // NOTE global mobile object settings
+       $.extend( $.mobile, {
+               // DEPRECATED Should the text be visble in the loading message?
+               loadingMessageTextVisible: undefined,
+
+               // DEPRECATED When the text is visible, what theme does the loading box use?
+               loadingMessageTheme: undefined,
+
+               // DEPRECATED default message setting
+               loadingMessage: undefined,
+
+               // DEPRECATED
+               // Turn on/off page loading message. Theme doubles as an object argument
+               // with the following shape: { theme: '', text: '', html: '', textVisible: '' }
+               // NOTE that the $.mobile.loading* settings and params past the first are deprecated
+               showPageLoadingMsg: function( theme, msgText, textonly ) {
+                       $.mobile.loading( 'show', theme, msgText, textonly );
+               },
+
+               // DEPRECATED
+               hidePageLoadingMsg: function() {
+                       $.mobile.loading( 'hide' );
+               },
+
+               loading: function() {
+                       this.loaderWidget.loader.apply( this.loaderWidget, arguments );
+               }
+       });
+
+       // TODO move loader class down into the widget settings
+       var loaderClass = "ui-loader", $html = $( "html" ), $window = $( window );
+
+       $.widget( "mobile.loader", {
+               // NOTE if the global config settings are defined they will override these
+               //      options
+               options: {
+                       // the theme for the loading message
+                       theme: "a",
+
+                       // whether the text in the loading message is shown
+                       textVisible: false,
+
+                       // custom html for the inner content of the loading message
+                       html: "",
+
+                       // the text to be displayed when the popup is shown
+                       text: "loading"
+               },
+
+               defaultHtml: "<div class='" + loaderClass + "'>" +
+                       "<span class='ui-icon ui-icon-loading'></span>" +
+                       "<h1></h1>" +
+                       "</div>",
+
+               // For non-fixed supportin browsers. Position at y center (if scrollTop supported), above the activeBtn (if defined), or just 100px from top
+               fakeFixLoader: function() {
+                       var activeBtn = $( "." + $.mobile.activeBtnClass ).first();
+
+                       this.element
+                               .css({
+                                       top: $.support.scrollTop && $window.scrollTop() + $window.height() / 2 ||
+                                               activeBtn.length && activeBtn.offset().top || 100
+                               });
+               },
+
+               // check position of loader to see if it appears to be "fixed" to center
+               // if not, use abs positioning
+               checkLoaderPosition: function() {
+                       var offset = this.element.offset(),
+                               scrollTop = $window.scrollTop(),
+                               screenHeight = $.mobile.getScreenHeight();
+
+                       if ( offset.top < scrollTop || ( offset.top - scrollTop ) > screenHeight ) {
+                               this.element.addClass( "ui-loader-fakefix" );
+                               this.fakeFixLoader();
+                               $window
+                                       .unbind( "scroll", this.checkLoaderPosition )
+                                       .bind( "scroll", this.fakeFixLoader );
+                       }
+               },
+
+               resetHtml: function() {
+                       this.element.html( $( this.defaultHtml ).html() );
+               },
+
+               // Turn on/off page loading message. Theme doubles as an object argument
+               // with the following shape: { theme: '', text: '', html: '', textVisible: '' }
+               // NOTE that the $.mobile.loading* settings and params past the first are deprecated
+               // TODO sweet jesus we need to break some of this out
+               show: function( theme, msgText, textonly ) {
+                       var textVisible, message, $header, loadSettings;
+
+                       this.resetHtml();
+
+                       // use the prototype options so that people can set them globally at
+                       // mobile init. Consistency, it's what's for dinner
+                       if ( $.type(theme) === "object" ) {
+                               loadSettings = $.extend( {}, this.options, theme );
+
+                               // prefer object property from the param then the old theme setting
+                               theme = loadSettings.theme || $.mobile.loadingMessageTheme;
+                       } else {
+                               loadSettings = this.options;
+
+                               // here we prefer the them value passed as a string argument, then
+                               // we prefer the global option because we can't use undefined default
+                               // prototype options, then the prototype option
+                               theme = theme || $.mobile.loadingMessageTheme || loadSettings.theme;
+                       }
+
+                       // set the message text, prefer the param, then the settings object
+                       // then loading message
+                       message = msgText || $.mobile.loadingMessage || loadSettings.text;
+
+                       // prepare the dom
+                       $html.addClass( "ui-loading" );
+
+                       if ( $.mobile.loadingMessage !== false || loadSettings.html ) {
+                               // boolean values require a bit more work :P, supports object properties
+                               // and old settings
+                               if ( $.mobile.loadingMessageTextVisible !== undefined ) {
+                                       textVisible = $.mobile.loadingMessageTextVisible;
+                               } else {
+                                       textVisible = loadSettings.textVisible;
+                               }
+
+                               // add the proper css given the options (theme, text, etc)
+                               // Force text visibility if the second argument was supplied, or
+                               // if the text was explicitly set in the object args
+                               this.element.attr("class", loaderClass +
+                                       " ui-corner-all ui-body-" + theme +
+                                       " ui-loader-" + ( textVisible || msgText || theme.text ? "verbose" : "default" ) +
+                                       ( loadSettings.textonly || textonly ? " ui-loader-textonly" : "" ) );
+
+                               // TODO verify that jquery.fn.html is ok to use in both cases here
+                               //      this might be overly defensive in preventing unknowing xss
+                               // if the html attribute is defined on the loading settings, use that
+                               // otherwise use the fallbacks from above
+                               if ( loadSettings.html ) {
+                                       this.element.html( loadSettings.html );
+                               } else {
+                                       this.element.find( "h1" ).text( message );
+                               }
+
+                               // attach the loader to the DOM
+                               this.element.appendTo( $.mobile.pageContainer );
+
+                               // check that the loader is visible
+                               this.checkLoaderPosition();
+
+                               // on scroll check the loader position
+                               $window.bind( "scroll", $.proxy( this.checkLoaderPosition, this ) );
+                       }
+               },
+
+               hide: function() {
+                       $html.removeClass( "ui-loading" );
+
+                       if ( $.mobile.loadingMessage ) {
+                               this.element.removeClass( "ui-loader-fakefix" );
+                       }
+
+                       $( window ).unbind( "scroll", $.proxy( this.fakeFixLoader, this) );
+                       $( window ).unbind( "scroll", $.proxy( this.checkLoaderPosition, this ) );
+               }
+       });
+
+       $window.bind( 'pagecontainercreate', function() {
+               $.mobile.loaderWidget = $.mobile.loaderWidget || $( $.mobile.loader.prototype.defaultHtml ).loader();
+       });
+})(jQuery, this);
+
+
+
+// This plugin is an experiment for abstracting away the touch and mouse
+// events so that developers don't have to worry about which method of input
+// the device their document is loaded on supports.
+//
+// The idea here is to allow the developer to register listeners for the
+// basic mouse events, such as mousedown, mousemove, mouseup, and click,
+// and the plugin will take care of registering the correct listeners
+// behind the scenes to invoke the listener at the fastest possible time
+// for that device, while still retaining the order of event firing in
+// the traditional mouse environment, should multiple handlers be registered
+// on the same element for different events.
+//
+// The current version exposes the following virtual events to jQuery bind methods:
+// "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel"
+
+(function( $, window, document, undefined ) {
+
+var dataPropertyName = "virtualMouseBindings",
+       touchTargetPropertyName = "virtualTouchID",
+       virtualEventNames = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split( " " ),
+       touchEventProps = "clientX clientY pageX pageY screenX screenY".split( " " ),
+       mouseHookProps = $.event.mouseHooks ? $.event.mouseHooks.props : [],
+       mouseEventProps = $.event.props.concat( mouseHookProps ),
+       activeDocHandlers = {},
+       resetTimerID = 0,
+       startX = 0,
+       startY = 0,
+       didScroll = false,
+       clickBlockList = [],
+       blockMouseTriggers = false,
+       blockTouchTriggers = false,
+       eventCaptureSupported = "addEventListener" in document,
+       $document = $( document ),
+       nextTouchID = 1,
+       lastTouchID = 0, threshold;
+
+$.vmouse = {
+       moveDistanceThreshold: 10,
+       clickDistanceThreshold: 10,
+       resetTimerDuration: 1500
+};
+
+function getNativeEvent( event ) {
+
+       while ( event && typeof event.originalEvent !== "undefined" ) {
+               event = event.originalEvent;
+       }
+       return event;
+}
+
+function createVirtualEvent( event, eventType ) {
+
+       var t = event.type,
+               oe, props, ne, prop, ct, touch, i, j, len;
+
+       event = $.Event( event );
+       event.type = eventType;
+
+       oe = event.originalEvent;
+       props = $.event.props;
+
+       // addresses separation of $.event.props in to $.event.mouseHook.props and Issue 3280
+       // https://github.com/jquery/jquery-mobile/issues/3280
+       if ( t.search( /^(mouse|click)/ ) > -1 ) {
+               props = mouseEventProps;
+       }
+
+       // copy original event properties over to the new event
+       // this would happen if we could call $.event.fix instead of $.Event
+       // but we don't have a way to force an event to be fixed multiple times
+       if ( oe ) {
+               for ( i = props.length, prop; i; ) {
+                       prop = props[ --i ];
+                       event[ prop ] = oe[ prop ];
+               }
+       }
+
+       // make sure that if the mouse and click virtual events are generated
+       // without a .which one is defined
+       if ( t.search(/mouse(down|up)|click/) > -1 && !event.which ) {
+               event.which = 1;
+       }
+
+       if ( t.search(/^touch/) !== -1 ) {
+               ne = getNativeEvent( oe );
+               t = ne.touches;
+               ct = ne.changedTouches;
+               touch = ( t && t.length ) ? t[0] : ( ( ct && ct.length ) ? ct[ 0 ] : undefined );
+
+               if ( touch ) {
+                       for ( j = 0, len = touchEventProps.length; j < len; j++) {
+                               prop = touchEventProps[ j ];
+                               event[ prop ] = touch[ prop ];
+                       }
+               }
+       }
+
+       return event;
+}
+
+function getVirtualBindingFlags( element ) {
+
+       var flags = {},
+               b, k;
+
+       while ( element ) {
+
+               b = $.data( element, dataPropertyName );
+
+               for (  k in b ) {
+                       if ( b[ k ] ) {
+                               flags[ k ] = flags.hasVirtualBinding = true;
+                       }
+               }
+               element = element.parentNode;
+       }
+       return flags;
+}
+
+function getClosestElementWithVirtualBinding( element, eventType ) {
+       var b;
+       while ( element ) {
+
+               b = $.data( element, dataPropertyName );
+
+               if ( b && ( !eventType || b[ eventType ] ) ) {
+                       return element;
+               }
+               element = element.parentNode;
+       }
+       return null;
+}
+
+function enableTouchBindings() {
+       blockTouchTriggers = false;
+}
+
+function disableTouchBindings() {
+       blockTouchTriggers = true;
+}
+
+function enableMouseBindings() {
+       lastTouchID = 0;
+       clickBlockList.length = 0;
+       blockMouseTriggers = false;
+
+       // When mouse bindings are enabled, our
+       // touch bindings are disabled.
+       disableTouchBindings();
+}
+
+function disableMouseBindings() {
+       // When mouse bindings are disabled, our
+       // touch bindings are enabled.
+       enableTouchBindings();
+}
+
+function startResetTimer() {
+       clearResetTimer();
+       resetTimerID = setTimeout( function() {
+               resetTimerID = 0;
+               enableMouseBindings();
+       }, $.vmouse.resetTimerDuration );
+}
+
+function clearResetTimer() {
+       if ( resetTimerID ) {
+               clearTimeout( resetTimerID );
+               resetTimerID = 0;
+       }
+}
+
+function triggerVirtualEvent( eventType, event, flags ) {
+       var ve;
+
+       if ( ( flags && flags[ eventType ] ) ||
+                               ( !flags && getClosestElementWithVirtualBinding( event.target, eventType ) ) ) {
+
+               ve = createVirtualEvent( event, eventType );
+
+               $( event.target).trigger( ve );
+       }
+
+       return ve;
+}
+
+function mouseEventCallback( event ) {
+       var touchID = $.data( event.target, touchTargetPropertyName );
+
+       if ( ( $.support.touch === true ) && ( touchID === undefined ) ) {
+               return;
+       }
+
+       if ( !blockMouseTriggers && ( !lastTouchID || lastTouchID !== touchID ) ) {
+               var ve = triggerVirtualEvent( "v" + event.type, event );
+               if ( ve ) {
+                       if ( ve.isDefaultPrevented() ) {
+                               event.preventDefault();
+                       }
+                       if ( ve.isPropagationStopped() ) {
+                               event.stopPropagation();
+                       }
+                       if ( ve.isImmediatePropagationStopped() ) {
+                               event.stopImmediatePropagation();
+                       }
+               }
+       }
+}
+
+function handleTouchStart( event ) {
+
+       var touches = getNativeEvent( event ).touches,
+               target, flags;
+
+       if ( touches && touches.length === 1 ) {
+
+               target = event.target;
+               flags = getVirtualBindingFlags( target );
+
+               if ( flags.hasVirtualBinding ) {
+
+                       lastTouchID = nextTouchID++;
+                       $.data( target, touchTargetPropertyName, lastTouchID );
+
+                       clearResetTimer();
+
+                       disableMouseBindings();
+                       didScroll = false;
+
+                       var t = getNativeEvent( event ).touches[ 0 ];
+                       startX = t.pageX;
+                       startY = t.pageY;
+
+                       triggerVirtualEvent( "vmouseover", event, flags );
+                       triggerVirtualEvent( "vmousedown", event, flags );
+               }
+       }
+}
+
+function handleScroll( event ) {
+       if ( blockTouchTriggers ) {
+               return;
+       }
+
+       if ( !didScroll ) {
+               triggerVirtualEvent( "vmousecancel", event, getVirtualBindingFlags( event.target ) );
+       }
+
+       didScroll = true;
+       startResetTimer();
+}
+
+function handleTouchMove( event ) {
+       if ( blockTouchTriggers ) {
+               return;
+       }
+
+       var t = getNativeEvent( event ).touches[ 0 ],
+               didCancel = didScroll,
+               moveThreshold = $.vmouse.moveDistanceThreshold,
+               flags = getVirtualBindingFlags( event.target );
+
+               didScroll = didScroll ||
+                       ( Math.abs( t.pageX - startX ) > moveThreshold ||
+                               Math.abs( t.pageY - startY ) > moveThreshold );
+
+
+       if ( didScroll && !didCancel ) {
+               triggerVirtualEvent( "vmousecancel", event, flags );
+       }
+
+       triggerVirtualEvent( "vmousemove", event, flags );
+       startResetTimer();
+}
+
+function handleTouchEnd( event ) {
+       if ( blockTouchTriggers ) {
+               return;
+       }
+
+       disableTouchBindings();
+
+       var flags = getVirtualBindingFlags( event.target ),
+               t;
+       triggerVirtualEvent( "vmouseup", event, flags );
+
+       if ( !didScroll ) {
+               var ve = triggerVirtualEvent( "vclick", event, flags );
+               if ( ve && ve.isDefaultPrevented() ) {
+                       // The target of the mouse events that follow the touchend
+                       // event don't necessarily match the target used during the
+                       // touch. This means we need to rely on coordinates for blocking
+                       // any click that is generated.
+                       t = getNativeEvent( event ).changedTouches[ 0 ];
+                       clickBlockList.push({
+                               touchID: lastTouchID,
+                               target: event.target,
+                               x: t.clientX,
+                               y: t.clientY
+                       });
+
+                       // Prevent any mouse events that follow from triggering
+                       // virtual event notifications.
+                       blockMouseTriggers = true;
+               }
+       }
+       triggerVirtualEvent( "vmouseout", event, flags);
+       didScroll = false;
+
+       startResetTimer();
+}
+
+function hasVirtualBindings( ele ) {
+       var bindings = $.data( ele, dataPropertyName ),
+               k;
+
+       if ( bindings ) {
+               for ( k in bindings ) {
+                       if ( bindings[ k ] ) {
+                               return true;
+                       }
+               }
+       }
+       return false;
+}
+
+function dummyMouseHandler() {}
+
+function getSpecialEventObject( eventType ) {
+       var realType = eventType.substr( 1 );
+
+       return {
+               setup: function( data, namespace ) {
+                       // If this is the first virtual mouse binding for this element,
+                       // add a bindings object to its data.
+
+                       if ( !hasVirtualBindings( this ) ) {
+                               $.data( this, dataPropertyName, {} );
+                       }
+
+                       // If setup is called, we know it is the first binding for this
+                       // eventType, so initialize the count for the eventType to zero.
+                       var bindings = $.data( this, dataPropertyName );
+                       bindings[ eventType ] = true;
+
+                       // If this is the first virtual mouse event for this type,
+                       // register a global handler on the document.
+
+                       activeDocHandlers[ eventType ] = ( activeDocHandlers[ eventType ] || 0 ) + 1;
+
+                       if ( activeDocHandlers[ eventType ] === 1 ) {
+                               $document.bind( realType, mouseEventCallback );
+                       }
+
+                       // Some browsers, like Opera Mini, won't dispatch mouse/click events
+                       // for elements unless they actually have handlers registered on them.
+                       // To get around this, we register dummy handlers on the elements.
+
+                       $( this ).bind( realType, dummyMouseHandler );
+
+                       // For now, if event capture is not supported, we rely on mouse handlers.
+                       if ( eventCaptureSupported ) {
+                               // If this is the first virtual mouse binding for the document,
+                               // register our touchstart handler on the document.
+
+                               activeDocHandlers[ "touchstart" ] = ( activeDocHandlers[ "touchstart" ] || 0) + 1;
+
+                               if ( activeDocHandlers[ "touchstart" ] === 1 ) {
+                                       $document.bind( "touchstart", handleTouchStart )
+                                               .bind( "touchend", handleTouchEnd )
+
+                                               // On touch platforms, touching the screen and then dragging your finger
+                                               // causes the window content to scroll after some distance threshold is
+                                               // exceeded. On these platforms, a scroll prevents a click event from being
+                                               // dispatched, and on some platforms, even the touchend is suppressed. To
+                                               // mimic the suppression of the click event, we need to watch for a scroll
+                                               // event. Unfortunately, some platforms like iOS don't dispatch scroll
+                                               // events until *AFTER* the user lifts their finger (touchend). This means
+                                               // we need to watch both scroll and touchmove events to figure out whether
+                                               // or not a scroll happenens before the touchend event is fired.
+
+                                               .bind( "touchmove", handleTouchMove )
+                                               .bind( "scroll", handleScroll );
+                               }
+                       }
+               },
+
+               teardown: function( data, namespace ) {
+                       // If this is the last virtual binding for this eventType,
+                       // remove its global handler from the document.
+
+                       --activeDocHandlers[ eventType ];
+
+                       if ( !activeDocHandlers[ eventType ] ) {
+                               $document.unbind( realType, mouseEventCallback );
+                       }
+
+                       if ( eventCaptureSupported ) {
+                               // If this is the last virtual mouse binding in existence,
+                               // remove our document touchstart listener.
+
+                               --activeDocHandlers[ "touchstart" ];
+
+                               if ( !activeDocHandlers[ "touchstart" ] ) {
+                                       $document.unbind( "touchstart", handleTouchStart )
+                                               .unbind( "touchmove", handleTouchMove )
+                                               .unbind( "touchend", handleTouchEnd )
+                                               .unbind( "scroll", handleScroll );
+                               }
+                       }
+
+                       var $this = $( this ),
+                               bindings = $.data( this, dataPropertyName );
+
+                       // teardown may be called when an element was
+                       // removed from the DOM. If this is the case,
+                       // jQuery core may have already stripped the element
+                       // of any data bindings so we need to check it before
+                       // using it.
+                       if ( bindings ) {
+                               bindings[ eventType ] = false;
+                       }
+
+                       // Unregister the dummy event handler.
+
+                       $this.unbind( realType, dummyMouseHandler );
+
+                       // If this is the last virtual mouse binding on the
+                       // element, remove the binding data from the element.
+
+                       if ( !hasVirtualBindings( this ) ) {
+                               $this.removeData( dataPropertyName );
+                       }
+               }
+       };
+}
+
+// Expose our custom events to the jQuery bind/unbind mechanism.
+
+for ( var i = 0; i < virtualEventNames.length; i++ ) {
+       $.event.special[ virtualEventNames[ i ] ] = getSpecialEventObject( virtualEventNames[ i ] );
+}
+
+// Add a capture click handler to block clicks.
+// Note that we require event capture support for this so if the device
+// doesn't support it, we punt for now and rely solely on mouse events.
+if ( eventCaptureSupported ) {
+       document.addEventListener( "click", function( e ) {
+               var cnt = clickBlockList.length,
+                       target = e.target,
+                       x, y, ele, i, o, touchID;
+
+               if ( cnt ) {
+                       x = e.clientX;
+                       y = e.clientY;
+                       threshold = $.vmouse.clickDistanceThreshold;
+
+                       // The idea here is to run through the clickBlockList to see if
+                       // the current click event is in the proximity of one of our
+                       // vclick events that had preventDefault() called on it. If we find
+                       // one, then we block the click.
+                       //
+                       // Why do we have to rely on proximity?
+                       //
+                       // Because the target of the touch event that triggered the vclick
+                       // can be different from the target of the click event synthesized
+                       // by the browser. The target of a mouse/click event that is syntehsized
+                       // from a touch event seems to be implementation specific. For example,
+                       // some browsers will fire mouse/click events for a link that is near
+                       // a touch event, even though the target of the touchstart/touchend event
+                       // says the user touched outside the link. Also, it seems that with most
+                       // browsers, the target of the mouse/click event is not calculated until the
+                       // time it is dispatched, so if you replace an element that you touched
+                       // with another element, the target of the mouse/click will be the new
+                       // element underneath that point.
+                       //
+                       // Aside from proximity, we also check to see if the target and any
+                       // of its ancestors were the ones that blocked a click. This is necessary
+                       // because of the strange mouse/click target calculation done in the
+                       // Android 2.1 browser, where if you click on an element, and there is a
+                       // mouse/click handler on one of its ancestors, the target will be the
+                       // innermost child of the touched element, even if that child is no where
+                       // near the point of touch.
+
+                       ele = target;
+
+                       while ( ele ) {
+                               for ( i = 0; i < cnt; i++ ) {
+                                       o = clickBlockList[ i ];
+                                       touchID = 0;
+
+                                       if ( ( ele === target && target === o.target && Math.abs( o.x - x ) < threshold && Math.abs( o.y - y ) < threshold ) ||
+                                                               $.data( ele, touchTargetPropertyName ) === o.touchID ) {
+                                               // XXX: We may want to consider removing matches from the block list
+                                               //      instead of waiting for the reset timer to fire.
+                                               e.preventDefault();
+                                               e.stopPropagation();
+                                               return;
+                                       }
+                               }
+                               ele = ele.parentNode;
+                       }
+               }
+       }, true);
+}
+})( jQuery, window, document );
+
+       (function( $, undefined ) {
+               var support = {
+                       touch: "ontouchend" in document
+               };
+
+               $.mobile = $.mobile || {};
+               $.mobile.support = $.mobile.support || {};
+               $.extend( $.support, support );
+               $.extend( $.mobile.support, support );
+       }( jQuery ));
+
+
+(function( $, window, undefined ) {
+       // add new event shortcuts
+       $.each( ( "touchstart touchmove touchend " +
+               "tap taphold " +
+               "swipe swipeleft swiperight " +
+               "scrollstart scrollstop" ).split( " " ), function( i, name ) {
+
+               $.fn[ name ] = function( fn ) {
+                       return fn ? this.bind( name, fn ) : this.trigger( name );
+               };
+
+               // jQuery < 1.8
+               if ( $.attrFn ) {
+                       $.attrFn[ name ] = true;
+               }
+       });
+
+       var supportTouch = $.mobile.support.touch,
+               scrollEvent = "touchmove scroll",
+               touchStartEvent = supportTouch ? "touchstart" : "mousedown",
+               touchStopEvent = supportTouch ? "touchend" : "mouseup",
+               touchMoveEvent = supportTouch ? "touchmove" : "mousemove";
+
+       function triggerCustomEvent( obj, eventType, event ) {
+               var originalType = event.type;
+               event.type = eventType;
+               // event.liveFired is already set by basic events, e.g. vclick, which is fired already.
+               // To fire this custom event, event.liveFired must be cleared.
+               event.liveFired = undefined;
+
+               $.event.handle.call( obj, event );
+               event.type = originalType;
+       }
+
+       // also handles scrollstop
+       $.event.special.scrollstart = {
+
+               enabled: true,
+
+               setup: function() {
+
+                       var thisObject = this,
+                               $this = $( thisObject ),
+                               scrolling,
+                               timer;
+
+                       function trigger( event, state ) {
+                               scrolling = state;
+                               triggerCustomEvent( thisObject, scrolling ? "scrollstart" : "scrollstop", event );
+                       }
+
+                       // iPhone triggers scroll after a small delay; use touchmove instead
+                       $this.bind( scrollEvent, function( event ) {
+
+                               if ( !$.event.special.scrollstart.enabled ) {
+                                       return;
+                               }
+
+                               if ( !scrolling ) {
+                                       trigger( event, true );
+                               }
+
+                               clearTimeout( timer );
+                               timer = setTimeout( function() {
+                                       trigger( event, false );
+                               }, 50 );
+                       });
+               }
+       };
+
+       // also handles taphold
+       $.event.special.tap = {
+               tapholdThreshold: 750,
+
+               setup: function() {
+                       var thisObject = this,
+                               $this = $( thisObject );
+
+                       $this.bind( "vmousedown", function( event ) {
+
+                               if ( event.which && event.which !== 1 ) {
+                                       return false;
+                               }
+
+                               var origTarget = event.target,
+                                       origEvent = event.originalEvent,
+                                       timer;
+
+                               function clearTapTimer() {
+                                       clearTimeout( timer );
+                               }
+
+                               function clearTapHandlers() {
+                                       clearTapTimer();
+
+                                       $this.unbind( "vclick", clickHandler )
+                                               .unbind( "vmouseup", clearTapTimer );
+                                       $( document ).unbind( "vmousecancel", clearTapHandlers );
+                               }
+
+                               function clickHandler( event ) {
+                                       clearTapHandlers();
+
+                                       // ONLY trigger a 'tap' event if the start target is
+                                       // the same as the stop target.
+                                       if ( origTarget === event.target ) {
+                                               triggerCustomEvent( thisObject, "tap", event );
+                                       }
+                               }
+
+                               $this.bind( "vmouseup", clearTapTimer )
+                                       .bind( "vclick", clickHandler );
+                               $( document ).bind( "vmousecancel", clearTapHandlers );
+
+                               timer = setTimeout( function() {
+                                       triggerCustomEvent( thisObject, "taphold", $.Event( "taphold", { target: origTarget } ) );
+                               }, $.event.special.tap.tapholdThreshold );
+                       });
+               }
+       };
+
+       // also handles swipeleft, swiperight
+       $.event.special.swipe = {
+               scrollSupressionThreshold: 30, // More than this horizontal displacement, and we will suppress scrolling.
+
+               durationThreshold: 1000, // More time than this, and it isn't a swipe.
+
+               horizontalDistanceThreshold: 30,  // Swipe horizontal displacement must be more than this.
+
+               verticalDistanceThreshold: 75,  // Swipe vertical displacement must be less than this.
+
+               setup: function() {
+                       var thisObject = this,
+                               $this = $( thisObject );
+
+                       $this.bind( touchStartEvent, function( event ) {
+                               var data = event.originalEvent.touches ?
+                                               event.originalEvent.touches[ 0 ] : event,
+                                       start = {
+                                               time: ( new Date() ).getTime(),
+                                               coords: [ data.pageX, data.pageY ],
+                                               origin: $( event.target )
+                                       },
+                                       stop;
+
+                               function moveHandler( event ) {
+
+                                       if ( !start ) {
+                                               return;
+                                       }
+
+                                       var data = event.originalEvent.touches ?
+                                               event.originalEvent.touches[ 0 ] : event;
+
+                                       stop = {
+                                               time: ( new Date() ).getTime(),
+                                               coords: [ data.pageX, data.pageY ]
+                                       };
+
+                                       // prevent scrolling
+                                       if ( Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.scrollSupressionThreshold ) {
+                                               event.preventDefault();
+                                       }
+                               }
+
+                               $this.bind( touchMoveEvent, moveHandler )
+                                       .one( touchStopEvent, function( event ) {
+                                               $this.unbind( touchMoveEvent, moveHandler );
+
+                                               if ( start && stop ) {
+                                                       if ( stop.time - start.time < $.event.special.swipe.durationThreshold &&
+                                                               Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.horizontalDistanceThreshold &&
+                                                               Math.abs( start.coords[ 1 ] - stop.coords[ 1 ] ) < $.event.special.swipe.verticalDistanceThreshold ) {
+
+                                                               start.origin.trigger( "swipe" )
+                                                                       .trigger( start.coords[0] > stop.coords[ 0 ] ? "swipeleft" : "swiperight" );
+                                                       }
+                                               }
+                                               start = stop = undefined;
+                                       });
+                       });
+               }
+       };
+       $.each({
+               scrollstop: "scrollstart",
+               taphold: "tap",
+               swipeleft: "swipe",
+               swiperight: "swipe"
+       }, function( event, sourceEvent ) {
+
+               $.event.special[ event ] = {
+                       setup: function() {
+                               $( this ).bind( sourceEvent, $.noop );
+                       }
+               };
+       });
+
+})( jQuery, this );
+
+       (function( $, undefined ) {
+               $.extend( $.support, {
+                       orientation: "orientation" in window && "onorientationchange" in window
+               });
+       }( jQuery ));
+
+
+       // throttled resize event
+       (function( $ ) {
+               $.event.special.throttledresize = {
+                       setup: function() {
+                               $( this ).bind( "resize", handler );
+                       },
+                       teardown: function() {
+                               $( this ).unbind( "resize", handler );
+                       }
+               };
+
+               var throttle = 250,
+                       handler = function() {
+                               curr = ( new Date() ).getTime();
+                               diff = curr - lastCall;
+
+                               if ( diff >= throttle ) {
+
+                                       lastCall = curr;
+                                       $( this ).trigger( "throttledresize" );
+
+                               } else {
+
+                                       if ( heldCall ) {
+                                               clearTimeout( heldCall );
+                                       }
+
+                                       // Promise a held call will still execute
+                                       heldCall = setTimeout( handler, throttle - diff );
+                               }
+                       },
+                       lastCall = 0,
+                       heldCall,
+                       curr,
+                       diff;
+       })( jQuery );
+
+(function( $, window ) {
+       var win = $( window ),
+               event_name = "orientationchange",
+               special_event,
+               get_orientation,
+               last_orientation,
+               initial_orientation_is_landscape,
+               initial_orientation_is_default,
+               portrait_map = { "0": true, "180": true };
+
+       // It seems that some device/browser vendors use window.orientation values 0 and 180 to
+       // denote the "default" orientation. For iOS devices, and most other smart-phones tested,
+       // the default orientation is always "portrait", but in some Android and RIM based tablets,
+       // the default orientation is "landscape". The following code attempts to use the window
+       // dimensions to figure out what the current orientation is, and then makes adjustments
+       // to the to the portrait_map if necessary, so that we can properly decode the
+       // window.orientation value whenever get_orientation() is called.
+       //
+       // Note that we used to use a media query to figure out what the orientation the browser
+       // thinks it is in:
+       //
+       //     initial_orientation_is_landscape = $.mobile.media("all and (orientation: landscape)");
+       //
+       // but there was an iPhone/iPod Touch bug beginning with iOS 4.2, up through iOS 5.1,
+       // where the browser *ALWAYS* applied the landscape media query. This bug does not
+       // happen on iPad.
+
+       if ( $.support.orientation ) {
+
+               // Check the window width and height to figure out what the current orientation
+               // of the device is at this moment. Note that we've initialized the portrait map
+               // values to 0 and 180, *AND* we purposely check for landscape so that if we guess
+               // wrong, , we default to the assumption that portrait is the default orientation.
+               // We use a threshold check below because on some platforms like iOS, the iPhone
+               // form-factor can report a larger width than height if the user turns on the
+               // developer console. The actual threshold value is somewhat arbitrary, we just
+               // need to make sure it is large enough to exclude the developer console case.
+
+               var ww = window.innerWidth || $( window ).width(),
+                       wh = window.innerHeight || $( window ).height(),
+                       landscape_threshold = 50;
+
+               initial_orientation_is_landscape = ww > wh && ( ww - wh ) > landscape_threshold;
+
+
+               // Now check to see if the current window.orientation is 0 or 180.
+               initial_orientation_is_default = portrait_map[ window.orientation ];
+
+               // If the initial orientation is landscape, but window.orientation reports 0 or 180, *OR*
+               // if the initial orientation is portrait, but window.orientation reports 90 or -90, we
+               // need to flip our portrait_map values because landscape is the default orientation for
+               // this device/browser.
+               if ( ( initial_orientation_is_landscape && initial_orientation_is_default ) || ( !initial_orientation_is_landscape && !initial_orientation_is_default ) ) {
+                       portrait_map = { "-90": true, "90": true };
+               }
+       }
+
+       $.event.special.orientationchange = $.extend( {}, $.event.special.orientationchange, {
+               setup: function() {
+                       // If the event is supported natively, return false so that jQuery
+                       // will bind to the event using DOM methods.
+                       if ( $.support.orientation && !$.event.special.orientationchange.disabled ) {
+                               return false;
+                       }
+
+                       // Get the current orientation to avoid initial double-triggering.
+                       last_orientation = get_orientation();
+
+                       // Because the orientationchange event doesn't exist, simulate the
+                       // event by testing window dimensions on resize.
+                       win.bind( "throttledresize", handler );
+               },
+               teardown: function() {
+                       // If the event is not supported natively, return false so that
+                       // jQuery will unbind the event using DOM methods.
+                       if ( $.support.orientation && !$.event.special.orientationchange.disabled ) {
+                               return false;
+                       }
+
+                       // Because the orientationchange event doesn't exist, unbind the
+                       // resize event handler.
+                       win.unbind( "throttledresize", handler );
+               },
+               add: function( handleObj ) {
+                       // Save a reference to the bound event handler.
+                       var old_handler = handleObj.handler;
+
+
+                       handleObj.handler = function( event ) {
+                               // Modify event object, adding the .orientation property.
+                               event.orientation = get_orientation();
+
+                               // Call the originally-bound event handler and return its result.
+                               return old_handler.apply( this, arguments );
+                       };
+               }
+       });
+
+       // If the event is not supported natively, this handler will be bound to
+       // the window resize event to simulate the orientationchange event.
+       function handler() {
+               // Get the current orientation.
+               var orientation = get_orientation();
+
+               if ( orientation !== last_orientation ) {
+                       // The orientation has changed, so trigger the orientationchange event.
+                       last_orientation = orientation;
+                       win.trigger( event_name );
+               }
+       }
+
+       // Get the current page orientation. This method is exposed publicly, should it
+       // be needed, as jQuery.event.special.orientationchange.orientation()
+       $.event.special.orientationchange.orientation = get_orientation = function() {
+               var isPortrait = true, elem = document.documentElement;
+
+               // prefer window orientation to the calculation based on screensize as
+               // the actual screen resize takes place before or after the orientation change event
+               // has been fired depending on implementation (eg android 2.3 is before, iphone after).
+               // More testing is required to determine if a more reliable method of determining the new screensize
+               // is possible when orientationchange is fired. (eg, use media queries + element + opacity)
+               if ( $.support.orientation ) {
+                       // if the window orientation registers as 0 or 180 degrees report
+                       // portrait, otherwise landscape
+                       isPortrait = portrait_map[ window.orientation ];
+               } else {
+                       isPortrait = elem && elem.clientWidth / elem.clientHeight < 1.1;
+               }
+
+               return isPortrait ? "portrait" : "landscape";
+       };
+
+       $.fn[ event_name ] = function( fn ) {
+               return fn ? this.bind( event_name, fn ) : this.trigger( event_name );
+       };
+
+       // jQuery < 1.8
+       if ( $.attrFn ) {
+               $.attrFn[ event_name ] = true;
+       }
+
+}( jQuery, this ));
+
+
+(function( $, undefined ) {
+
+var $window = $( window ),
+       $html = $( "html" );
+
+/* $.mobile.media method: pass a CSS media type or query and get a bool return
+       note: this feature relies on actual media query support for media queries, though types will work most anywhere
+       examples:
+               $.mobile.media('screen') // tests for screen media type
+               $.mobile.media('screen and (min-width: 480px)') // tests for screen media type with window width > 480px
+               $.mobile.media('@media screen and (-webkit-min-device-pixel-ratio: 2)') // tests for webkit 2x pixel ratio (iPhone 4)
+*/
+$.mobile.media = (function() {
+       // TODO: use window.matchMedia once at least one UA implements it
+       var cache = {},
+               testDiv = $( "<div id='jquery-mediatest'></div>" ),
+               fakeBody = $( "<body>" ).append( testDiv );
+
+       return function( query ) {
+               if ( !( query in cache ) ) {
+                       var styleBlock = document.createElement( "style" ),
+                               cssrule = "@media " + query + " { #jquery-mediatest { position:absolute; } }";
+
+                       //must set type for IE!
+                       styleBlock.type = "text/css";
+
+                       if ( styleBlock.styleSheet ) {
+                               styleBlock.styleSheet.cssText = cssrule;
+                       } else {
+                               styleBlock.appendChild( document.createTextNode(cssrule) );
+                       }
+
+                       $html.prepend( fakeBody ).prepend( styleBlock );
+                       cache[ query ] = testDiv.css( "position" ) === "absolute";
+                       fakeBody.add( styleBlock ).remove();
+               }
+               return cache[ query ];
+       };
+})();
+
+})(jQuery);
+
+(function( $, undefined ) {
+
+// thx Modernizr
+function propExists( prop ) {
+       var uc_prop = prop.charAt( 0 ).toUpperCase() + prop.substr( 1 ),
+               props = ( prop + " " + vendors.join( uc_prop + " " ) + uc_prop ).split( " " );
+
+       for ( var v in props ) {
+               if ( fbCSS[ props[ v ] ] !== undefined ) {
+                       return true;
+               }
+       }
+}
+
+var fakeBody = $( "<body>" ).prependTo( "html" ),
+       fbCSS = fakeBody[ 0 ].style,
+       vendors = [ "Webkit", "Moz", "O" ],
+       webos = "palmGetResource" in window, //only used to rule out scrollTop
+       opera = window.opera,
+       operamini = window.operamini && ({}).toString.call( window.operamini ) === "[object OperaMini]",
+       bb = window.blackberry && !propExists( "-webkit-transform" ); //only used to rule out box shadow, as it's filled opaque on BB 5 and lower
+
+
+function validStyle( prop, value, check_vend ) {
+       var div = document.createElement( 'div' ),
+               uc = function( txt ) {
+                       return txt.charAt( 0 ).toUpperCase() + txt.substr( 1 );
+               },
+               vend_pref = function( vend ) {
+                       return  "-" + vend.charAt( 0 ).toLowerCase() + vend.substr( 1 ) + "-";
+               },
+               check_style = function( vend ) {
+                       var vend_prop = vend_pref( vend ) + prop + ": " + value + ";",
+                               uc_vend = uc( vend ),
+                               propStyle = uc_vend + uc( prop );
+
+                       div.setAttribute( "style", vend_prop );
+
+                       if ( !!div.style[ propStyle ] ) {
+                               ret = true;
+                       }
+               },
+               check_vends = check_vend ? [ check_vend ] : vendors,
+               ret;
+
+       for( var i = 0; i < check_vends.length; i++ ) {
+               check_style( check_vends[i] );
+       }
+       return !!ret;
+}
+
+// Thanks to Modernizr src for this test idea. `perspective` check is limited to Moz to prevent a false positive for 3D transforms on Android.
+function transform3dTest() {
+       var prop = "transform-3d";
+       return validStyle( 'perspective', '10px', 'moz' ) || $.mobile.media( "(-" + vendors.join( "-" + prop + "),(-" ) + "-" + prop + "),(" + prop + ")" );
+}
+
+// Test for dynamic-updating base tag support ( allows us to avoid href,src attr rewriting )
+function baseTagTest() {
+       var fauxBase = location.protocol + "//" + location.host + location.pathname + "ui-dir/",
+               base = $( "head base" ),
+               fauxEle = null,
+               href = "",
+               link, rebase;
+
+       if ( !base.length ) {
+               base = fauxEle = $( "<base>", { "href": fauxBase }).appendTo( "head" );
+       } else {
+               href = base.attr( "href" );
+       }
+
+       link = $( "<a href='testurl' />" ).prependTo( fakeBody );
+       rebase = link[ 0 ].href;
+       base[ 0 ].href = href || location.pathname;
+
+       if ( fauxEle ) {
+               fauxEle.remove();
+       }
+       return rebase.indexOf( fauxBase ) === 0;
+}
+
+// Thanks Modernizr
+function cssPointerEventsTest() {
+       var element = document.createElement( 'x' ),
+               documentElement = document.documentElement,
+               getComputedStyle = window.getComputedStyle,
+               supports;
+
+       if ( !( 'pointerEvents' in element.style ) ) {
+               return false;
+       }
+
+       element.style.pointerEvents = 'auto';
+       element.style.pointerEvents = 'x';
+       documentElement.appendChild( element );
+       supports = getComputedStyle &&
+       getComputedStyle( element, '' ).pointerEvents === 'auto';
+       documentElement.removeChild( element );
+       return !!supports;
+}
+
+function boundingRect() {
+       var div = document.createElement( "div" );
+       return typeof div.getBoundingClientRect !== "undefined";
+}
+
+// non-UA-based IE version check by James Padolsey, modified by jdalton - from http://gist.github.com/527683
+// allows for inclusion of IE 6+, including Windows Mobile 7
+$.extend( $.mobile, { browser: {} } );
+$.mobile.browser.ie = (function() {
+       var v = 3,
+               div = document.createElement( "div" ),
+               a = div.all || [];
+
+       do {
+               div.innerHTML = "<!--[if gt IE " + ( ++v ) + "]><br><![endif]-->";
+       } while( a[0] );
+
+       return v > 4 ? v : !v;
+})();
+
+
+$.extend( $.support, {
+       cssTransitions: "WebKitTransitionEvent" in window || validStyle( 'transition', 'height 100ms linear' ) && !opera,
+       pushState: "pushState" in history && "replaceState" in history,
+       mediaquery: $.mobile.media( "only all" ),
+       cssPseudoElement: !!propExists( "content" ),
+       touchOverflow: !!propExists( "overflowScrolling" ),
+       cssTransform3d: transform3dTest(),
+       boxShadow: !!propExists( "boxShadow" ) && !bb,
+       scrollTop: ( "pageXOffset" in window || "scrollTop" in document.documentElement || "scrollTop" in fakeBody[ 0 ] ) && !webos && !operamini,
+       dynamicBaseTag: baseTagTest(),
+       cssPointerEvents: cssPointerEventsTest(),
+       boundingRect: boundingRect()
+});
+
+fakeBody.remove();
+
+
+// $.mobile.ajaxBlacklist is used to override ajaxEnabled on platforms that have known conflicts with hash history updates (BB5, Symbian)
+// or that generally work better browsing in regular http for full page refreshes (Opera Mini)
+// Note: This detection below is used as a last resort.
+// We recommend only using these detection methods when all other more reliable/forward-looking approaches are not possible
+var nokiaLTE7_3 = (function() {
+
+       var ua = window.navigator.userAgent;
+
+       //The following is an attempt to match Nokia browsers that are running Symbian/s60, with webkit, version 7.3 or older
+       return ua.indexOf( "Nokia" ) > -1 &&
+                       ( ua.indexOf( "Symbian/3" ) > -1 || ua.indexOf( "Series60/5" ) > -1 ) &&
+                       ua.indexOf( "AppleWebKit" ) > -1 &&
+                       ua.match( /(BrowserNG|NokiaBrowser)\/7\.[0-3]/ );
+})();
+
+// Support conditions that must be met in order to proceed
+// default enhanced qualifications are media query support OR IE 7+
+
+$.mobile.gradeA = function() {
+       return ( $.support.mediaquery || $.mobile.browser.ie && $.mobile.browser.ie >= 7 ) && ( $.support.boundingRect || $.fn.jquery.match(/1\.[0-7+]\.[0-9+]?/) !== null );
+};
+
+$.mobile.ajaxBlacklist =
+                       // BlackBerry browsers, pre-webkit
+                       window.blackberry && !window.WebKitPoint ||
+                       // Opera Mini
+                       operamini ||
+                       // Symbian webkits pre 7.3
+                       nokiaLTE7_3;
+
+// Lastly, this workaround is the only way we've found so far to get pre 7.3 Symbian webkit devices
+// to render the stylesheets when they're referenced before this script, as we'd recommend doing.
+// This simply reappends the CSS in place, which for some reason makes it apply
+if ( nokiaLTE7_3 ) {
+       $(function() {
+               $( "head link[rel='stylesheet']" ).attr( "rel", "alternate stylesheet" ).attr( "rel", "stylesheet" );
+       });
+}
+
+// For ruling out shadows via css
+if ( !$.support.boxShadow ) {
+       $( "html" ).addClass( "ui-mobile-nosupport-boxshadow" );
+}
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.page", $.mobile.widget, {
+       options: {
+               theme: "c",
+               domCache: false,
+               keepNativeDefault: ":jqmData(role='none'), :jqmData(role='nojs')"
+       },
+
+       _create: function() {
+               
+               var self = this;
+               
+               // if false is returned by the callbacks do not create the page
+               if ( self._trigger( "beforecreate" ) === false ) {
+                       return false;
+               }
+
+               self.element
+                       .attr( "tabindex", "0" )
+                       .addClass( "ui-page ui-body-" + self.options.theme )
+                       .bind( "pagebeforehide", function() {
+                               self.removeContainerBackground();
+                       } )
+                       .bind( "pagebeforeshow", function() {
+                               self.setContainerBackground();
+                       } );
+
+       },
+       
+       refresh: function() {
+               $( this.element ).children( ".ui-content" ).trigger("updatelayout", ["external"]);
+       },
+
+       /* GUI Builder only : redesign page when user drag&drop header, footer */
+       setToolbar: function () {
+               $( this.element ).trigger( "pagebeforeshow" );
+       },
+
+       removeContainerBackground: function() {
+               $.mobile.pageContainer.removeClass( "ui-overlay-" + $.mobile.getInheritedTheme( this.element.parent() ) );
+       },
+       
+       // set the page container background to the page theme
+       setContainerBackground: function( theme ) {
+               if ( this.options.theme ) {
+                       $.mobile.pageContainer.addClass( "ui-overlay-" + ( theme || this.options.theme ) );
+               }
+       },
+
+       addBackBtn : function ( target ) {
+               var $dest = $( ".ui-page-active .ui-footer" );
+
+               if ( target == "header" ) {
+                       $dest = $( ".ui-page-active .ui-header" );
+               }
+               backBtn = $( "<a href='#' class='ui-btn-back' data-" + $.mobile.ns + "rel='back'></a>" )
+                       .buttonMarkup( {icon: "header-back-btn", theme : "s"} );
+               if ( !$dest.find( ".ui-btn-back").length ) {
+                       backBtn.prependTo( $dest );
+               }
+       },
+
+       keepNativeSelector: function() {
+               var options = this.options,
+                       keepNativeDefined = options.keepNative && $.trim( options.keepNative );
+
+               if ( keepNativeDefined && options.keepNative !== options.keepNativeDefault ) {
+                       return [options.keepNative, options.keepNativeDefault].join( ", " );
+               }
+
+               return options.keepNativeDefault;
+       }
+});
+})( jQuery );
+
+// Script: jQuery hashchange event
+// 
+// *Version: 1.3, Last updated: 7/21/2010*
+// 
+// Project Home - http://benalman.com/projects/jquery-hashchange-plugin/
+// GitHub       - http://github.com/cowboy/jquery-hashchange/
+// Source       - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.js
+// (Minified)   - http://github.com/cowboy/jquery-hashchange/raw/master/jquery.ba-hashchange.min.js (0.8kb gzipped)
+// 
+// About: License
+// 
+// Copyright (c) 2010 "Cowboy" Ben Alman,
+// Dual licensed under the MIT and GPL licenses.
+// http://benalman.com/about/license/
+// 
+// About: Examples
+// 
+// These working examples, complete with fully commented code, illustrate a few
+// ways in which this plugin can be used.
+// 
+// hashchange event - http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/
+// document.domain - http://benalman.com/code/projects/jquery-hashchange/examples/document_domain/
+// 
+// About: Support and Testing
+// 
+// Information about what version or versions of jQuery this plugin has been
+// tested with, what browsers it has been tested in, and where the unit tests
+// reside (so you can test it yourself).
+// 
+// jQuery Versions - 1.2.6, 1.3.2, 1.4.1, 1.4.2
+// Browsers Tested - Internet Explorer 6-8, Firefox 2-4, Chrome 5-6, Safari 3.2-5,
+//                   Opera 9.6-10.60, iPhone 3.1, Android 1.6-2.2, BlackBerry 4.6-5.
+// Unit Tests      - http://benalman.com/code/projects/jquery-hashchange/unit/
+// 
+// About: Known issues
+// 
+// While this jQuery hashchange event implementation is quite stable and
+// robust, there are a few unfortunate browser bugs surrounding expected
+// hashchange event-based behaviors, independent of any JavaScript
+// window.onhashchange abstraction. See the following examples for more
+// information:
+// 
+// Chrome: Back Button - http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/
+// Firefox: Remote XMLHttpRequest - http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/
+// WebKit: Back Button in an Iframe - http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/
+// Safari: Back Button from a different domain - http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/
+// 
+// Also note that should a browser natively support the window.onhashchange 
+// event, but not report that it does, the fallback polling loop will be used.
+// 
+// About: Release History
+// 
+// 1.3   - (7/21/2010) Reorganized IE6/7 Iframe code to make it more
+//         "removable" for mobile-only development. Added IE6/7 document.title
+//         support. Attempted to make Iframe as hidden as possible by using
+//         techniques from http://www.paciellogroup.com/blog/?p=604. Added 
+//         support for the "shortcut" format $(window).hashchange( fn ) and
+//         $(window).hashchange() like jQuery provides for built-in events.
+//         Renamed jQuery.hashchangeDelay to <jQuery.fn.hashchange.delay> and
+//         lowered its default value to 50. Added <jQuery.fn.hashchange.domain>
+//         and <jQuery.fn.hashchange.src> properties plus document-domain.html
+//         file to address access denied issues when setting document.domain in
+//         IE6/7.
+// 1.2   - (2/11/2010) Fixed a bug where coming back to a page using this plugin
+//         from a page on another domain would cause an error in Safari 4. Also,
+//         IE6/7 Iframe is now inserted after the body (this actually works),
+//         which prevents the page from scrolling when the event is first bound.
+//         Event can also now be bound before DOM ready, but it won't be usable
+//         before then in IE6/7.
+// 1.1   - (1/21/2010) Incorporated document.documentMode test to fix IE8 bug
+//         where browser version is incorrectly reported as 8.0, despite
+//         inclusion of the X-UA-Compatible IE=EmulateIE7 meta tag.
+// 1.0   - (1/9/2010) Initial Release. Broke out the jQuery BBQ event.special
+//         window.onhashchange functionality into a separate plugin for users
+//         who want just the basic event & back button support, without all the
+//         extra awesomeness that BBQ provides. This plugin will be included as
+//         part of jQuery BBQ, but also be available separately.
+
+(function( $, window, undefined ) {
+  // Reused string.
+  var str_hashchange = 'hashchange',
+    
+    // Method / object references.
+    doc = document,
+    fake_onhashchange,
+    special = $.event.special,
+    
+    // Does the browser support window.onhashchange? Note that IE8 running in
+    // IE7 compatibility mode reports true for 'onhashchange' in window, even
+    // though the event isn't supported, so also test document.documentMode.
+    doc_mode = doc.documentMode,
+    supports_onhashchange = 'on' + str_hashchange in window && ( doc_mode === undefined || doc_mode > 7 );
+  
+  // Get location.hash (or what you'd expect location.hash to be) sans any
+  // leading #. Thanks for making this necessary, Firefox!
+  function get_fragment( url ) {
+    url = url || location.href;
+    return '#' + url.replace( /^[^#]*#?(.*)$/, '$1' );
+  };
+  
+  // Method: jQuery.fn.hashchange
+  // 
+  // Bind a handler to the window.onhashchange event or trigger all bound
+  // window.onhashchange event handlers. This behavior is consistent with
+  // jQuery's built-in event handlers.
+  // 
+  // Usage:
+  // 
+  // > jQuery(window).hashchange( [ handler ] );
+  // 
+  // Arguments:
+  // 
+  //  handler - (Function) Optional handler to be bound to the hashchange
+  //    event. This is a "shortcut" for the more verbose form:
+  //    jQuery(window).bind( 'hashchange', handler ). If handler is omitted,
+  //    all bound window.onhashchange event handlers will be triggered. This
+  //    is a shortcut for the more verbose
+  //    jQuery(window).trigger( 'hashchange' ). These forms are described in
+  //    the <hashchange event> section.
+  // 
+  // Returns:
+  // 
+  //  (jQuery) The initial jQuery collection of elements.
+  
+  // Allow the "shortcut" format $(elem).hashchange( fn ) for binding and
+  // $(elem).hashchange() for triggering, like jQuery does for built-in events.
+  $.fn[ str_hashchange ] = function( fn ) {
+    return fn ? this.bind( str_hashchange, fn ) : this.trigger( str_hashchange );
+  };
+  
+  // Property: jQuery.fn.hashchange.delay
+  // 
+  // The numeric interval (in milliseconds) at which the <hashchange event>
+  // polling loop executes. Defaults to 50.
+  
+  // Property: jQuery.fn.hashchange.domain
+  // 
+  // If you're setting document.domain in your JavaScript, and you want hash
+  // history to work in IE6/7, not only must this property be set, but you must
+  // also set document.domain BEFORE jQuery is loaded into the page. This
+  // property is only applicable if you are supporting IE6/7 (or IE8 operating
+  // in "IE7 compatibility" mode).
+  // 
+  // In addition, the <jQuery.fn.hashchange.src> property must be set to the
+  // path of the included "document-domain.html" file, which can be renamed or
+  // modified if necessary (note that the document.domain specified must be the
+  // same in both your main JavaScript as well as in this file).
+  // 
+  // Usage:
+  // 
+  // jQuery.fn.hashchange.domain = document.domain;
+  
+  // Property: jQuery.fn.hashchange.src
+  // 
+  // If, for some reason, you need to specify an Iframe src file (for example,
+  // when setting document.domain as in <jQuery.fn.hashchange.domain>), you can
+  // do so using this property. Note that when using this property, history
+  // won't be recorded in IE6/7 until the Iframe src file loads. This property
+  // is only applicable if you are supporting IE6/7 (or IE8 operating in "IE7
+  // compatibility" mode).
+  // 
+  // Usage:
+  // 
+  // jQuery.fn.hashchange.src = 'path/to/file.html';
+  
+  $.fn[ str_hashchange ].delay = 50;
+  /*
+  $.fn[ str_hashchange ].domain = null;
+  $.fn[ str_hashchange ].src = null;
+  */
+  
+  // Event: hashchange event
+  // 
+  // Fired when location.hash changes. In browsers that support it, the native
+  // HTML5 window.onhashchange event is used, otherwise a polling loop is
+  // initialized, running every <jQuery.fn.hashchange.delay> milliseconds to
+  // see if the hash has changed. In IE6/7 (and IE8 operating in "IE7
+  // compatibility" mode), a hidden Iframe is created to allow the back button
+  // and hash-based history to work.
+  // 
+  // Usage as described in <jQuery.fn.hashchange>:
+  // 
+  // > // Bind an event handler.
+  // > jQuery(window).hashchange( function(e) {
+  // >   var hash = location.hash;
+  // >   ...
+  // > });
+  // > 
+  // > // Manually trigger the event handler.
+  // > jQuery(window).hashchange();
+  // 
+  // A more verbose usage that allows for event namespacing:
+  // 
+  // > // Bind an event handler.
+  // > jQuery(window).bind( 'hashchange', function(e) {
+  // >   var hash = location.hash;
+  // >   ...
+  // > });
+  // > 
+  // > // Manually trigger the event handler.
+  // > jQuery(window).trigger( 'hashchange' );
+  // 
+  // Additional Notes:
+  // 
+  // * The polling loop and Iframe are not created until at least one handler
+  //   is actually bound to the 'hashchange' event.
+  // * If you need the bound handler(s) to execute immediately, in cases where
+  //   a location.hash exists on page load, via bookmark or page refresh for
+  //   example, use jQuery(window).hashchange() or the more verbose 
+  //   jQuery(window).trigger( 'hashchange' ).
+  // * The event can be bound before DOM ready, but since it won't be usable
+  //   before then in IE6/7 (due to the necessary Iframe), recommended usage is
+  //   to bind it inside a DOM ready handler.
+  
+  // Override existing $.event.special.hashchange methods (allowing this plugin
+  // to be defined after jQuery BBQ in BBQ's source code).
+  special[ str_hashchange ] = $.extend( special[ str_hashchange ], {
+    
+    // Called only when the first 'hashchange' event is bound to window.
+    setup: function() {
+      // If window.onhashchange is supported natively, there's nothing to do..
+      if ( supports_onhashchange ) { return false; }
+      
+      // Otherwise, we need to create our own. And we don't want to call this
+      // until the user binds to the event, just in case they never do, since it
+      // will create a polling loop and possibly even a hidden Iframe.
+      $( fake_onhashchange.start );
+    },
+    
+    // Called only when the last 'hashchange' event is unbound from window.
+    teardown: function() {
+      // If window.onhashchange is supported natively, there's nothing to do..
+      if ( supports_onhashchange ) { return false; }
+      
+      // Otherwise, we need to stop ours (if possible).
+      $( fake_onhashchange.stop );
+    }
+    
+  });
+  
+  // fake_onhashchange does all the work of triggering the window.onhashchange
+  // event for browsers that don't natively support it, including creating a
+  // polling loop to watch for hash changes and in IE 6/7 creating a hidden
+  // Iframe to enable back and forward.
+  fake_onhashchange = (function() {
+    var self = {},
+      timeout_id,
+      
+      // Remember the initial hash so it doesn't get triggered immediately.
+      last_hash = get_fragment(),
+      
+      fn_retval = function( val ) { return val; },
+      history_set = fn_retval,
+      history_get = fn_retval;
+    
+    // Start the polling loop.
+    self.start = function() {
+      timeout_id || poll();
+    };
+    
+    // Stop the polling loop.
+    self.stop = function() {
+      timeout_id && clearTimeout( timeout_id );
+      timeout_id = undefined;
+    };
+    
+    // This polling loop checks every $.fn.hashchange.delay milliseconds to see
+    // if location.hash has changed, and triggers the 'hashchange' event on
+    // window when necessary.
+    function poll() {
+      var hash = get_fragment(),
+        history_hash = history_get( last_hash );
+      
+      if ( hash !== last_hash ) {
+        history_set( last_hash = hash, history_hash );
+        
+        $(window).trigger( str_hashchange );
+        
+      } else if ( history_hash !== last_hash ) {
+        location.href = location.href.replace( /#.*/, '' ) + history_hash;
+      }
+      
+      timeout_id = setTimeout( poll, $.fn[ str_hashchange ].delay );
+    };
+    
+    // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+    // vvvvvvvvvvvvvvvvvvv REMOVE IF NOT SUPPORTING IE6/7/8 vvvvvvvvvvvvvvvvvvv
+    // vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
+    $.browser.msie && !supports_onhashchange && (function() {
+      // Not only do IE6/7 need the "magical" Iframe treatment, but so does IE8
+      // when running in "IE7 compatibility" mode.
+      
+      var iframe,
+        iframe_src;
+      
+      // When the event is bound and polling starts in IE 6/7, create a hidden
+      // Iframe for history handling.
+      self.start = function() {
+        if ( !iframe ) {
+          iframe_src = $.fn[ str_hashchange ].src;
+          iframe_src = iframe_src && iframe_src + get_fragment();
+          
+          // Create hidden Iframe. Attempt to make Iframe as hidden as possible
+          // by using techniques from http://www.paciellogroup.com/blog/?p=604.
+          iframe = $('<iframe tabindex="-1" title="empty"/>').hide()
+            
+            // When Iframe has completely loaded, initialize the history and
+            // start polling.
+            .one( 'load', function() {
+              iframe_src || history_set( get_fragment() );
+              poll();
+            })
+            
+            // Load Iframe src if specified, otherwise nothing.
+            .attr( 'src', iframe_src || 'javascript:0' )
+            
+            // Append Iframe after the end of the body to prevent unnecessary
+            // initial page scrolling (yes, this works).
+            .insertAfter( 'body' )[0].contentWindow;
+          
+          // Whenever `document.title` changes, update the Iframe's title to
+          // prettify the back/next history menu entries. Since IE sometimes
+          // errors with "Unspecified error" the very first time this is set
+          // (yes, very useful) wrap this with a try/catch block.
+          doc.onpropertychange = function() {
+            try {
+              if ( event.propertyName === 'title' ) {
+                iframe.document.title = doc.title;
+              }
+            } catch(e) {}
+          };
+          
+        }
+      };
+      
+      // Override the "stop" method since an IE6/7 Iframe was created. Even
+      // if there are no longer any bound event handlers, the polling loop
+      // is still necessary for back/next to work at all!
+      self.stop = fn_retval;
+      
+      // Get history by looking at the hidden Iframe's location.hash.
+      history_get = function() {
+        return get_fragment( iframe.location.href );
+      };
+      
+      // Set a new history item by opening and then closing the Iframe
+      // document, *then* setting its location.hash. If document.domain has
+      // been set, update that as well.
+      history_set = function( hash, history_hash ) {
+        var iframe_doc = iframe.document,
+          domain = $.fn[ str_hashchange ].domain;
+        
+        if ( hash !== history_hash ) {
+          // Update Iframe with any initial `document.title` that might be set.
+          iframe_doc.title = doc.title;
+          
+          // Opening the Iframe's document after it has been closed is what
+          // actually adds a history entry.
+          iframe_doc.open();
+          
+          // Set document.domain for the Iframe document as well, if necessary.
+          domain && iframe_doc.write( '<script>document.domain="' + domain + '"</script>' );
+          
+          iframe_doc.close();
+          
+          // Update the Iframe's hash, for great justice.
+          iframe.location.hash = hash;
+        }
+      };
+      
+    })();
+    // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    // ^^^^^^^^^^^^^^^^^^^ REMOVE IF NOT SUPPORTING IE6/7/8 ^^^^^^^^^^^^^^^^^^^
+    // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    
+    return self;
+  })();
+  
+})(jQuery,this);
+
+
+(function( $, window, undefined ) {
+
+var createHandler = function( sequential ) {
+
+       // Default to sequential
+       if ( sequential === undefined ) {
+               sequential = true;
+       }
+
+       return function( name, reverse, $to, $from ) {
+
+               var deferred = new $.Deferred(),
+                       reverseClass = reverse ? " reverse" : "",
+                       active  = $.mobile.urlHistory.getActive(),
+                       toScroll = active.lastScroll || $.mobile.defaultHomeScroll,
+                       screenHeight = $.mobile.getScreenHeight(),
+                       maxTransitionOverride = $.mobile.maxTransitionWidth !== false && $( window ).width() > $.mobile.maxTransitionWidth,
+                       none = !$.support.cssTransitions || maxTransitionOverride || !name || name === "none" || Math.max( $( window ).scrollTop(), toScroll ) > $.mobile.getMaxScrollForTransition(),
+                       toPreClass = " ui-page-pre-in",
+                       toggleViewportClass = function() {
+                               $.mobile.pageContainer.toggleClass( "ui-mobile-viewport-transitioning viewport-" + name );
+                       },
+                       scrollPage = function() {
+                               // Prevent blinking on page scrolling in Tizen/Android devices.
+                               // Don't scoll window, when current scroll top(scrollTop()) is already at toScroll,
+                               // or when current scroll top is 0 and toScroll is same to defaultHomeScroll
+                               // (which means the top position of page). In these case, page scrolling is not needed.
+                               var st = $( window ).scrollTop();
+                               if( st === toScroll || ( $.mobile.defaultHomeScroll === toScroll && st == 0 ) ) {
+                                       return;
+                               }
+
+                               // By using scrollTo instead of silentScroll, we can keep things better in order
+                               // Just to be precautios, disable scrollstart listening like silentScroll would
+                               $.event.special.scrollstart.enabled = false;
+
+                               window.scrollTo( 0, toScroll );
+
+                               // reenable scrollstart listening like silentScroll would
+                               setTimeout( function() {
+                                       $.event.special.scrollstart.enabled = true;
+                               }, 150 );
+                       },
+                       cleanFrom = function() {
+                               $from
+                                       .removeClass( $.mobile.activePageClass + " out in reverse " + name )
+                                       .height( "" );
+                       },
+                       startOut = function() {
+                               // if it's not sequential, call the doneOut transition to start the TO page animating in simultaneously
+                               if ( !sequential ) {
+                                       doneOut();
+                               }
+                               else {
+                                       $from.animationComplete( doneOut );
+                               }
+
+                               // Set the from page's height and start it transitioning out
+                               // Note: setting an explicit height helps eliminate tiling in the transitions
+                               $from
+                                       .height( screenHeight + $( window ).scrollTop() )
+                                       .addClass( name + " out" + reverseClass );
+                       },
+
+                       doneOut = function() {
+
+                               if ( $from && sequential ) {
+                                       cleanFrom();
+                               }
+
+                               startIn();
+                       },
+
+                       startIn = function() {
+
+                               // Prevent flickering in phonegap container: see comments at #4024 regarding iOS
+                               $to.css( "z-index", -10 );
+
+                               $to.addClass( $.mobile.activePageClass + toPreClass );
+
+                               // Send focus to page as it is now display: block
+                               $.mobile.focusPage( $to );
+
+                               // Set to page height
+                               $to.height( screenHeight + toScroll );
+
+                               scrollPage();
+
+                               // Restores visibility of the new page: added together with $to.css( "z-index", -10 );
+                               $to.css( "z-index", "" );
+
+                               if ( !none ) {
+                                       $to.animationComplete( doneIn );
+                               }
+
+                               $to
+                                       .removeClass( toPreClass )
+                                       .addClass( name + " in" + reverseClass );
+
+                               if ( none ) {
+                                       setTimeout( doneIn, 0 );
+                               }
+
+                       },
+
+                       doneIn = function() {
+
+                               if ( !sequential ) {
+
+                                       if ( $from ) {
+                                               cleanFrom();
+                                       }
+                               }
+
+                               $to
+                                       .removeClass( "out in reverse " + name )
+                                       .height( "" );
+
+                               toggleViewportClass();
+
+                               // In some browsers (iOS5), 3D transitions block the ability to scroll to the desired location during transition
+                               // This ensures we jump to that spot after the fact, if we aren't there already.
+                               if ( $( window ).scrollTop() !== toScroll ) {
+                                       scrollPage();
+                               }
+
+                               deferred.resolve( name, reverse, $to, $from, true );
+                       };
+
+               toggleViewportClass();
+
+               if ( $from && !none ) {
+                       startOut();
+               }
+               else {
+                       doneOut();
+               }
+
+               return deferred.promise();
+       };
+};
+
+// generate the handlers from the above
+var sequentialHandler = createHandler(),
+       simultaneousHandler = createHandler( false ),
+       defaultGetMaxScrollForTransition = function() {
+               return $.mobile.getScreenHeight() * 3;
+       };
+
+// Make our transition handler the public default.
+$.mobile.defaultTransitionHandler = sequentialHandler;
+
+//transition handler dictionary for 3rd party transitions
+$.mobile.transitionHandlers = {
+       "default": $.mobile.defaultTransitionHandler,
+       "sequential": sequentialHandler,
+       "simultaneous": simultaneousHandler
+};
+
+$.mobile.transitionFallbacks = {};
+
+// If transition is defined, check if css 3D transforms are supported, and if not, if a fallback is specified
+$.mobile._maybeDegradeTransition = function( transition ) {
+               if ( transition && !$.support.cssTransform3d && $.mobile.transitionFallbacks[ transition ] ) {
+                       transition = $.mobile.transitionFallbacks[ transition ];
+               }
+
+               return transition;
+};
+
+// Set the getMaxScrollForTransition to default if no implementation was set by user
+$.mobile.getMaxScrollForTransition = $.mobile.getMaxScrollForTransition || defaultGetMaxScrollForTransition;
+})( jQuery, this );
+
+(function( $, undefined ) {
+
+       //define vars for interal use
+       var $window = $( window ),
+               $html = $( 'html' ),
+               $head = $( 'head' ),
+
+               //url path helpers for use in relative url management
+               path = {
+
+                       // This scary looking regular expression parses an absolute URL or its relative
+                       // variants (protocol, site, document, query, and hash), into the various
+                       // components (protocol, host, path, query, fragment, etc that make up the
+                       // URL as well as some other commonly used sub-parts. When used with RegExp.exec()
+                       // or String.match, it parses the URL into a results array that looks like this:
+                       //
+                       //     [0]: http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234&type=unread#msg-content
+                       //     [1]: http://jblas:password@mycompany.com:8080/mail/inbox?msg=1234&type=unread
+                       //     [2]: http://jblas:password@mycompany.com:8080/mail/inbox
+                       //     [3]: http://jblas:password@mycompany.com:8080
+                       //     [4]: http:
+                       //     [5]: //
+                       //     [6]: jblas:password@mycompany.com:8080
+                       //     [7]: jblas:password
+                       //     [8]: jblas
+                       //     [9]: password
+                       //    [10]: mycompany.com:8080
+                       //    [11]: mycompany.com
+                       //    [12]: 8080
+                       //    [13]: /mail/inbox
+                       //    [14]: /mail/
+                       //    [15]: inbox
+                       //    [16]: ?msg=1234&type=unread
+                       //    [17]: #msg-content
+                       //
+                       urlParseRE: /^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,
+
+                       // Abstraction to address xss (Issue #4787) by removing the authority in
+                       // browsers that auto   decode it. All references to location.href should be
+                       // replaced with a call to this method so that it can be dealt with properly here
+                       getLocation: function( url ) {
+                               var uri = url ? this.parseUrl( url ) : location,
+                                       hash = this.parseUrl( url || location.href ).hash;
+
+                               // mimic the browser with an empty string when the hash is empty
+                               hash = hash === "#" ? "" : hash;
+
+                               // Make sure to parse the url or the location object for the hash because using location.hash
+                               // is autodecoded in firefox, the rest of the url should be from the object (location unless
+                               // we're testing) to avoid the inclusion of the authority
+                               return uri.protocol + "//" + uri.host + uri.pathname + uri.search + hash;
+                       },
+
+                       parseLocation: function() {
+                               return this.parseUrl( this.getLocation() );
+                       },
+
+                       //Parse a URL into a structure that allows easy access to
+                       //all of the URL components by name.
+                       parseUrl: function( url ) {
+                               // If we're passed an object, we'll assume that it is
+                               // a parsed url object and just return it back to the caller.
+                               if ( $.type( url ) === "object" ) {
+                                       return url;
+                               }
+
+                               var matches = path.urlParseRE.exec( url || "" ) || [];
+
+                                       // Create an object that allows the caller to access the sub-matches
+                                       // by name. Note that IE returns an empty string instead of undefined,
+                                       // like all other browsers do, so we normalize everything so its consistent
+                                       // no matter what browser we're running on.
+                                       return {
+                                               href:         matches[  0 ] || "",
+                                               hrefNoHash:   matches[  1 ] || "",
+                                               hrefNoSearch: matches[  2 ] || "",
+                                               domain:       matches[  3 ] || "",
+                                               protocol:     matches[  4 ] || "",
+                                               doubleSlash:  matches[  5 ] || "",
+                                               authority:    matches[  6 ] || "",
+                                               username:     matches[  8 ] || "",
+                                               password:     matches[  9 ] || "",
+                                               host:         matches[ 10 ] || "",
+                                               hostname:     matches[ 11 ] || "",
+                                               port:         matches[ 12 ] || "",
+                                               pathname:     matches[ 13 ] || "",
+                                               directory:    matches[ 14 ] || "",
+                                               filename:     matches[ 15 ] || "",
+                                               search:       matches[ 16 ] || "",
+                                               hash:         matches[ 17 ] || ""
+                                       };
+                       },
+
+                       //Turn relPath into an asbolute path. absPath is
+                       //an optional absolute path which describes what
+                       //relPath is relative to.
+                       makePathAbsolute: function( relPath, absPath ) {
+                               if ( relPath && relPath.charAt( 0 ) === "/" ) {
+                                       return relPath;
+                               }
+
+                               relPath = relPath || "";
+                               absPath = absPath ? absPath.replace( /^\/|(\/[^\/]*|[^\/]+)$/g, "" ) : "";
+
+                               var absStack = absPath ? absPath.split( "/" ) : [],
+                                       relStack = relPath.split( "/" );
+                               for ( var i = 0; i < relStack.length; i++ ) {
+                                       var d = relStack[ i ];
+                                       switch ( d ) {
+                                               case ".":
+                                                       break;
+                                               case "..":
+                                                       if ( absStack.length ) {
+                                                               absStack.pop();
+                                                       }
+                                                       break;
+                                               default:
+                                                       absStack.push( d );
+                                                       break;
+                                       }
+                               }
+                               return "/" + absStack.join( "/" );
+                       },
+
+                       //Returns true if both urls have the same domain.
+                       isSameDomain: function( absUrl1, absUrl2 ) {
+                               return path.parseUrl( absUrl1 ).domain === path.parseUrl( absUrl2 ).domain;
+                       },
+
+                       //Returns true for any relative variant.
+                       isRelativeUrl: function( url ) {
+                               // All relative Url variants have one thing in common, no protocol.
+                               return path.parseUrl( url ).protocol === "";
+                       },
+
+                       //Returns true for an absolute url.
+                       isAbsoluteUrl: function( url ) {
+                               return path.parseUrl( url ).protocol !== "";
+                       },
+
+                       //Turn the specified realtive URL into an absolute one. This function
+                       //can handle all relative variants (protocol, site, document, query, fragment).
+                       makeUrlAbsolute: function( relUrl, absUrl ) {
+                               if ( !path.isRelativeUrl( relUrl ) ) {
+                                       return relUrl;
+                               }
+
+                               if ( absUrl === undefined ) {
+                                       absUrl = documentBase;
+                               }
+
+                               var relObj = path.parseUrl( relUrl ),
+                                       absObj = path.parseUrl( absUrl ),
+                                       protocol = relObj.protocol || absObj.protocol,
+                                       doubleSlash = relObj.protocol ? relObj.doubleSlash : ( relObj.doubleSlash || absObj.doubleSlash ),
+                                       authority = relObj.authority || absObj.authority,
+                                       hasPath = relObj.pathname !== "",
+                                       pathname = path.makePathAbsolute( relObj.pathname || absObj.filename, absObj.pathname ),
+                                       search = relObj.search || ( !hasPath && absObj.search ) || "",
+                                       hash = relObj.hash;
+
+                               return protocol + doubleSlash + authority + pathname + search + hash;
+                       },
+
+                       //Add search (aka query) params to the specified url.
+                       addSearchParams: function( url, params ) {
+                               var u = path.parseUrl( url ),
+                                       p = ( typeof params === "object" ) ? $.param( params ) : params,
+                                       s = u.search || "?";
+                               return u.hrefNoSearch + s + ( s.charAt( s.length - 1 ) !== "?" ? "&" : "" ) + p + ( u.hash || "" );
+                       },
+
+                       convertUrlToDataUrl: function( absUrl ) {
+                               var u = path.parseUrl( absUrl );
+                               if ( path.isEmbeddedPage( u ) ) {
+                                       // For embedded pages, remove the dialog hash key as in getFilePath(),
+                                       // otherwise the Data Url won't match the id of the embedded Page.
+                                       return u.hash.split( dialogHashKey )[0].replace( /^#/, "" );
+                               } else if ( path.isSameDomain( u, documentBase ) ) {
+                                       return u.hrefNoHash.replace( documentBase.domain, "" ).split( dialogHashKey )[0];
+                               }
+
+                               return window.decodeURIComponent(absUrl);
+                       },
+
+                       //get path from current hash, or from a file path
+                       get: function( newPath ) {
+                               if ( newPath === undefined ) {
+                                       newPath = path.parseLocation().hash;
+                               }
+                               return path.stripHash( newPath ).replace( /[^\/]*\.[^\/*]+$/, '' );
+                       },
+
+                       //return the substring of a filepath before the sub-page key, for making a server request
+                       getFilePath: function( path ) {
+                               var splitkey = '&' + $.mobile.subPageUrlKey;
+                               return path && path.split( splitkey )[0].split( dialogHashKey )[0];
+                       },
+
+                       //set location hash to path
+                       set: function( path ) {
+                               location.hash = path;
+                       },
+
+                       //test if a given url (string) is a path
+                       //NOTE might be exceptionally naive
+                       isPath: function( url ) {
+                               return ( /\// ).test( url );
+                       },
+
+                       //return a url path with the window's location protocol/hostname/pathname removed
+                       clean: function( url ) {
+                               return url.replace( documentBase.domain, "" );
+                       },
+
+                       //just return the url without an initial #
+                       stripHash: function( url ) {
+                               return url.replace( /^#/, "" );
+                       },
+
+                       //remove the preceding hash, any query params, and dialog notations
+                       cleanHash: function( hash ) {
+                               return path.stripHash( hash.replace( /\?.*$/, "" ).replace( dialogHashKey, "" ) );
+                       },
+
+                       isHashValid: function( hash ) {
+                               return ( /^#[^#]+$/ ).test( hash );
+                       },
+
+                       //check whether a url is referencing the same domain, or an external domain or different protocol
+                       //could be mailto, etc
+                       isExternal: function( url ) {
+                               var u = path.parseUrl( url );
+                               return u.protocol && u.domain !== documentUrl.domain ? true : false;
+                       },
+
+                       hasProtocol: function( url ) {
+                               return ( /^(:?\w+:)/ ).test( url );
+                       },
+
+                       //check if the specified url refers to the first page in the main application document.
+                       isFirstPageUrl: function( url ) {
+                               // We only deal with absolute paths.
+                               var u = path.parseUrl( path.makeUrlAbsolute( url, documentBase ) ),
+
+                                       // Does the url have the same path as the document?
+                                       samePath = u.hrefNoHash === documentUrl.hrefNoHash || ( documentBaseDiffers && u.hrefNoHash === documentBase.hrefNoHash ),
+
+                                       // Get the first page element.
+                                       fp = $.mobile.firstPage,
+
+                                       // Get the id of the first page element if it has one.
+                                       fpId = fp && fp[0] ? fp[0].id : undefined;
+
+                                       // The url refers to the first page if the path matches the document and
+                                       // it either has no hash value, or the hash is exactly equal to the id of the
+                                       // first page element.
+                                       return samePath && ( !u.hash || u.hash === "#" || ( fpId && u.hash.replace( /^#/, "" ) === fpId ) );
+                       },
+
+                       isEmbeddedPage: function( url ) {
+                               var u = path.parseUrl( url );
+
+                               //if the path is absolute, then we need to compare the url against
+                               //both the documentUrl and the documentBase. The main reason for this
+                               //is that links embedded within external documents will refer to the
+                               //application document, whereas links embedded within the application
+                               //document will be resolved against the document base.
+                               if ( u.protocol !== "" ) {
+                                       return ( u.hash && ( u.hrefNoHash === documentUrl.hrefNoHash || ( documentBaseDiffers && u.hrefNoHash === documentBase.hrefNoHash ) ) );
+                               }
+                               return ( /^#/ ).test( u.href );
+                       },
+
+
+                       // Some embedded browsers, like the web view in Phone Gap, allow cross-domain XHR
+                       // requests if the document doing the request was loaded via the file:// protocol.
+                       // This is usually to allow the application to "phone home" and fetch app specific
+                       // data. We normally let the browser handle external/cross-domain urls, but if the
+                       // allowCrossDomainPages option is true, we will allow cross-domain http/https
+                       // requests to go through our page loading logic.
+                       isPermittedCrossDomainRequest: function( docUrl, reqUrl ) {
+                               return $.mobile.allowCrossDomainPages &&
+                                       docUrl.protocol === "file:" &&
+                                       reqUrl.search( /^https?:/ ) !== -1;
+                       }
+               },
+
+               //will be defined when a link is clicked and given an active class
+               $activeClickedLink = null,
+
+               //urlHistory is purely here to make guesses at whether the back or forward button was clicked
+               //and provide an appropriate transition
+               urlHistory = {
+                       // Array of pages that are visited during a single page load.
+                       // Each has a url and optional transition, title, and pageUrl (which represents the file path, in cases where URL is obscured, such as dialogs)
+                       stack: [],
+
+                       //maintain an index number for the active page in the stack
+                       activeIndex: 0,
+
+                       //get active
+                       getActive: function() {
+                               return urlHistory.stack[ urlHistory.activeIndex ];
+                       },
+
+                       getPrev: function() {
+                               return urlHistory.stack[ urlHistory.activeIndex - 1 ];
+                       },
+
+                       getNext: function() {
+                               return urlHistory.stack[ urlHistory.activeIndex + 1 ];
+                       },
+
+                       // addNew is used whenever a new page is added
+                       addNew: function( url, transition, title, pageUrl, role ) {
+                               //if there's forward history, wipe it
+                               if ( urlHistory.getNext() ) {
+                                       urlHistory.clearForward();
+                               }
+
+                               urlHistory.stack.push( {url : url, transition: transition, title: title, pageUrl: pageUrl, role: role } );
+
+                               urlHistory.activeIndex = urlHistory.stack.length - 1;
+                       },
+
+                       //wipe urls ahead of active index
+                       clearForward: function() {
+                               urlHistory.stack = urlHistory.stack.slice( 0, urlHistory.activeIndex + 1 );
+                       },
+
+                       directHashChange: function( opts ) {
+                               var back , forward, newActiveIndex, prev = this.getActive();
+
+                               // check if url is in history and if it's ahead or behind current page
+                               $.each( urlHistory.stack, function( i, historyEntry ) {
+
+                                       //if the url is in the stack, it's a forward or a back
+                                       if ( decodeURIComponent( opts.currentUrl ) === decodeURIComponent( historyEntry.url ) ) {
+                                               //define back and forward by whether url is older or newer than current page
+                                               back = i < urlHistory.activeIndex;
+                                               forward = !back;
+                                               newActiveIndex = i;
+                                       }
+                               });
+
+                               // save new page index, null check to prevent falsey 0 result
+                               this.activeIndex = newActiveIndex !== undefined ? newActiveIndex : this.activeIndex;
+
+                               if ( back ) {
+                                       ( opts.either || opts.isBack )( true );
+                               } else if ( forward ) {
+                                       ( opts.either || opts.isForward )( false );
+                               }
+                       },
+
+                       //disable hashchange event listener internally to ignore one change
+                       //toggled internally when location.hash is updated to match the url of a successful page load
+                       ignoreNextHashChange: false
+               },
+
+               //define first selector to receive focus when a page is shown
+               focusable = "[tabindex],a,button:visible,select:visible,input",
+
+               //queue to hold simultanious page transitions
+               pageTransitionQueue = [],
+
+               //indicates whether or not page is in process of transitioning
+               isPageTransitioning = false,
+
+               //nonsense hash change key for dialogs, so they create a history entry
+               dialogHashKey = "&ui-state=dialog",
+
+               //existing base tag?
+               $base = $head.children( "base" ),
+
+               //tuck away the original document URL minus any fragment.
+               documentUrl = path.parseLocation(),
+
+               //if the document has an embedded base tag, documentBase is set to its
+               //initial value. If a base tag does not exist, then we default to the documentUrl.
+               documentBase = $base.length ? path.parseUrl( path.makeUrlAbsolute( $base.attr( "href" ), documentUrl.href ) ) : documentUrl,
+
+               //cache the comparison once.
+               documentBaseDiffers = ( documentUrl.hrefNoHash !== documentBase.hrefNoHash ),
+
+               getScreenHeight = $.mobile.getScreenHeight;
+
+               //base element management, defined depending on dynamic base tag support
+               var base = $.support.dynamicBaseTag ? {
+
+                       //define base element, for use in routing asset urls that are referenced in Ajax-requested markup
+                       element: ( $base.length ? $base : $( "<base>", { href: documentBase.hrefNoHash } ).prependTo( $head ) ),
+
+                       //set the generated BASE element's href attribute to a new page's base path
+                       set: function( href ) {
+                               base.element.attr( "href", path.makeUrlAbsolute( href, documentBase ) );
+                       },
+
+                       //set the generated BASE element's href attribute to a new page's base path
+                       reset: function() {
+                               base.element.attr( "href", documentBase.hrefNoHash );
+                       }
+
+               } : undefined;
+
+       /* internal utility functions */
+
+       // NOTE Issue #4950 Android phonegap doesn't navigate back properly
+       //      when a full page refresh has taken place. It appears that hashchange
+       //      and replacestate history alterations work fine but we need to support
+       //      both forms of history traversal in our code that uses backward history
+       //      movement
+       $.mobile.back = function() {
+               var nav = window.navigator;
+
+               // if the setting is on and the navigator object is
+               // available use the phonegap navigation capability
+               if( this.phonegapNavigationEnabled &&
+                       nav &&
+                       nav.app &&
+                       nav.app.backHistory ){
+                       nav.app.backHistory();
+               } else {
+                       window.history.back();
+               }
+       };
+
+       //direct focus to the page title, or otherwise first focusable element
+       $.mobile.focusPage = function ( page ) {
+               var autofocus = page.find( "[autofocus]" ),
+                       pageTitle = page.find( ".ui-title:eq(0)" );
+
+               if ( autofocus.length ) {
+                       autofocus.focus();
+                       return;
+               }
+
+               if ( pageTitle.length ) {
+                       pageTitle.focus();
+               } else{
+                       page.focus();
+               }
+       };
+
+       //remove active classes after page transition or error
+       function removeActiveLinkClass( forceRemoval ) {
+               if ( !!$activeClickedLink && ( !$activeClickedLink.closest( "." + $.mobile.activePageClass ).length || forceRemoval ) ) {
+                       $activeClickedLink.removeClass( $.mobile.activeBtnClass );
+               }
+               $activeClickedLink = null;
+       }
+
+       function releasePageTransitionLock() {
+               isPageTransitioning = false;
+               if ( pageTransitionQueue.length > 0 ) {
+                       $.mobile.changePage.apply( null, pageTransitionQueue.pop() );
+               }
+       }
+
+       // Save the last scroll distance per page, before it is hidden
+       var setLastScrollEnabled = true,
+               setLastScroll, delayedSetLastScroll;
+
+       setLastScroll = function() {
+               // this barrier prevents setting the scroll value based on the browser
+               // scrolling the window based on a hashchange
+               if ( !setLastScrollEnabled ) {
+                       return;
+               }
+
+               var active = $.mobile.urlHistory.getActive();
+
+               if ( active ) {
+                       var lastScroll = $window.scrollTop();
+
+                       // Set active page's lastScroll prop.
+                       // If the location we're scrolling to is less than minScrollBack, let it go.
+                       active.lastScroll = lastScroll < $.mobile.minScrollBack ? $.mobile.defaultHomeScroll : lastScroll;
+               }
+       };
+
+       // bind to scrollstop to gather scroll position. The delay allows for the hashchange
+       // event to fire and disable scroll recording in the case where the browser scrolls
+       // to the hash targets location (sometimes the top of the page). once pagechange fires
+       // getLastScroll is again permitted to operate
+       delayedSetLastScroll = function() {
+               setTimeout( setLastScroll, 100 );
+       };
+
+       // disable an scroll setting when a hashchange has been fired, this only works
+       // because the recording of the scroll position is delayed for 100ms after
+       // the browser might have changed the position because of the hashchange
+       $window.bind( $.support.pushState ? "popstate" : "hashchange", function() {
+               setLastScrollEnabled = false;
+       });
+
+       // handle initial hashchange from chrome :(
+       $window.one( $.support.pushState ? "popstate" : "hashchange", function() {
+               setLastScrollEnabled = true;
+       });
+
+       // wait until the mobile page container has been determined to bind to pagechange
+       $window.one( "pagecontainercreate", function() {
+               // once the page has changed, re-enable the scroll recording
+               $.mobile.pageContainer.bind( "pagechange", function() {
+
+                       setLastScrollEnabled = true;
+
+                       // remove any binding that previously existed on the get scroll
+                       // which may or may not be different than the scroll element determined for
+                       // this page previously
+                       $window.unbind( "scrollstop", delayedSetLastScroll );
+
+                       // determine and bind to the current scoll element which may be the window
+                       // or in the case of touch overflow the element with touch overflow
+                       $window.bind( "scrollstop", delayedSetLastScroll );
+               });
+       });
+
+       // bind to scrollstop for the first page as "pagechange" won't be fired in that case
+       $window.bind( "scrollstop", delayedSetLastScroll );
+
+       // No-op implementation of transition degradation
+       $.mobile._maybeDegradeTransition = $.mobile._maybeDegradeTransition || function( transition ) {
+               return transition;
+       };
+
+       //function for transitioning between two existing pages
+       function transitionPages( toPage, fromPage, transition, reverse ) {
+
+               if ( fromPage ) {
+                       //trigger before show/hide events
+                       fromPage.data( "page" )._trigger( "beforehide", null, { nextPage: toPage } );
+               }
+
+               toPage.data( "page" )._trigger( "beforeshow", null, { prevPage: fromPage || $( "" ) } );
+
+               //clear page loader
+               $.mobile.hidePageLoadingMsg();
+
+               transition = $.mobile._maybeDegradeTransition( transition );
+
+               //find the transition handler for the specified transition. If there
+               //isn't one in our transitionHandlers dictionary, use the default one.
+               //call the handler immediately to kick-off the transition.
+               var th = $.mobile.transitionHandlers[ transition || "default" ] || $.mobile.defaultTransitionHandler,
+                       promise = th( transition, reverse, toPage, fromPage );
+
+               promise.done(function() {
+
+                       //trigger show/hide events
+                       if ( fromPage ) {
+                               fromPage.data( "page" )._trigger( "hide", null, { nextPage: toPage } );
+                       }
+
+                       //trigger pageshow, define prevPage as either fromPage or empty jQuery obj
+                       toPage.data( "page" )._trigger( "show", null, { prevPage: fromPage || $( "" ) } );
+
+                       setTimeout( function () {
+                               $.mobile.removeEventBlocker();
+                       }, 0 );
+               });
+
+               return promise;
+       }
+
+       //simply set the active page's minimum height to screen height, depending on orientation
+       function resetActivePageHeight() {
+               var aPage = $( "." + $.mobile.activePageClass ),
+                       aPagePadT = parseFloat( aPage.css( "padding-top" ) ),
+                       aPagePadB = parseFloat( aPage.css( "padding-bottom" ) ),
+                       aPageBorderT = parseFloat( aPage.css( "border-top-width" ) ),
+                       aPageBorderB = parseFloat( aPage.css( "border-bottom-width" ) );
+
+               aPage.css( "min-height", getScreenHeight() - aPagePadT - aPagePadB - aPageBorderT - aPageBorderB );
+       }
+
+       //shared page enhancements
+       function enhancePage( $page, role ) {
+               // If a role was specified, make sure the data-role attribute
+               // on the page element is in sync.
+               if ( role ) {
+                       $page.attr( "data-" + $.mobile.ns + "role", role );
+               }
+
+               //run page plugin
+               $page.page();
+       }
+
+       /* exposed $.mobile methods */
+
+       //animation complete callback
+       $.fn.animationComplete = function( callback ) {
+               if ( $.support.cssTransitions ) {
+                       return $( this ).one( 'webkitAnimationEnd animationend', callback );
+               }
+               else{
+                       // defer execution for consistency between webkit/non webkit
+                       setTimeout( callback, 0 );
+                       return $( this );
+               }
+       };
+
+       //expose path object on $.mobile
+       $.mobile.path = path;
+
+       //expose base object on $.mobile
+       $.mobile.base = base;
+
+       //history stack
+       $.mobile.urlHistory = urlHistory;
+
+       $.mobile.dialogHashKey = dialogHashKey;
+
+
+
+       //enable cross-domain page support
+       $.mobile.allowCrossDomainPages = false;
+
+       //return the original document url
+       $.mobile.getDocumentUrl = function( asParsedObject ) {
+               return asParsedObject ? $.extend( {}, documentUrl ) : documentUrl.href;
+       };
+
+       //return the original document base url
+       $.mobile.getDocumentBase = function( asParsedObject ) {
+               return asParsedObject ? $.extend( {}, documentBase ) : documentBase.href;
+       };
+
+       $.mobile._bindPageRemove = function() {
+               var page = $( this );
+
+               // when dom caching is not enabled or the page is embedded bind to remove the page on hide
+               if ( !page.data( "page" ).options.domCache &&
+                               page.is( ":jqmData(external-page='true')" ) ) {
+
+                       page.bind( 'pagehide.remove', function() {
+                               var $this = $( this ),
+                                       prEvent = new $.Event( "pageremove" );
+
+                               $this.trigger( prEvent );
+
+                               if ( !prEvent.isDefaultPrevented() ) {
+                                       $this.removeWithDependents();
+                               }
+                       });
+               }
+       };
+
+       // Load a page into the DOM.
+       $.mobile.loadPage = function( url, options ) {
+               // This function uses deferred notifications to let callers
+               // know when the page is done loading, or if an error has occurred.
+               var deferred = $.Deferred(),
+
+                       // The default loadPage options with overrides specified by
+                       // the caller.
+                       settings = $.extend( {}, $.mobile.loadPage.defaults, options ),
+
+                       // The DOM element for the page after it has been loaded.
+                       page = null,
+
+                       // If the reloadPage option is true, and the page is already
+                       // in the DOM, dupCachedPage will be set to the page element
+                       // so that it can be removed after the new version of the
+                       // page is loaded off the network.
+                       dupCachedPage = null,
+
+                       // determine the current base url
+                       findBaseWithDefault = function() {
+                               var closestBase = ( $.mobile.activePage && getClosestBaseUrl( $.mobile.activePage ) );
+                               return closestBase || documentBase.hrefNoHash;
+                       },
+
+                       // The absolute version of the URL passed into the function. This
+                       // version of the URL may contain dialog/subpage params in it.
+                       absUrl = path.makeUrlAbsolute( url, findBaseWithDefault() );
+
+
+               // If the caller provided data, and we're using "get" request,
+               // append the data to the URL.
+               if ( settings.data && settings.type === "get" ) {
+                       absUrl = path.addSearchParams( absUrl, settings.data );
+                       settings.data = undefined;
+               }
+
+               // If the caller is using a "post" request, reloadPage must be true
+               if ( settings.data && settings.type === "post" ) {
+                       settings.reloadPage = true;
+               }
+
+               // The absolute version of the URL minus any dialog/subpage params.
+               // In otherwords the real URL of the page to be loaded.
+               var fileUrl = path.getFilePath( absUrl ),
+
+                       // The version of the Url actually stored in the data-url attribute of
+                       // the page. For embedded pages, it is just the id of the page. For pages
+                       // within the same domain as the document base, it is the site relative
+                       // path. For cross-domain pages (Phone Gap only) the entire absolute Url
+                       // used to load the page.
+                       dataUrl = path.convertUrlToDataUrl( absUrl );
+
+               // Make sure we have a pageContainer to work with.
+               settings.pageContainer = settings.pageContainer || $.mobile.pageContainer;
+
+               // Check to see if the page already exists in the DOM.
+               // NOTE do _not_ use the :jqmData psuedo selector because parenthesis
+               //      are a valid url char and it breaks on the first occurence
+               page = settings.pageContainer.children( "[data-" + $.mobile.ns +"url='" + dataUrl + "']" );
+
+               // If we failed to find the page, check to see if the url is a
+               // reference to an embedded page. If so, it may have been dynamically
+               // injected by a developer, in which case it would be lacking a data-url
+               // attribute and in need of enhancement.
+               if ( page.length === 0 && dataUrl && !path.isPath( dataUrl ) ) {
+                       page = settings.pageContainer.children( "#" + dataUrl )
+                               .attr( "data-" + $.mobile.ns + "url", dataUrl )
+                               .jqmData( "url", dataUrl );
+               }
+
+               // If we failed to find a page in the DOM, check the URL to see if it
+               // refers to the first page in the application. If it isn't a reference
+               // to the first page and refers to non-existent embedded page, error out.
+               if ( page.length === 0 ) {
+                       if ( $.mobile.firstPage && path.isFirstPageUrl( fileUrl ) ) {
+                               // Check to make sure our cached-first-page is actually
+                               // in the DOM. Some user deployed apps are pruning the first
+                               // page from the DOM for various reasons, we check for this
+                               // case here because we don't want a first-page with an id
+                               // falling through to the non-existent embedded page error
+                               // case. If the first-page is not in the DOM, then we let
+                               // things fall through to the ajax loading code below so
+                               // that it gets reloaded.
+                               if ( $.mobile.firstPage.parent().length ) {
+                                       page = $( $.mobile.firstPage );
+                               }
+                       } else if ( path.isEmbeddedPage( fileUrl )  ) {
+                               deferred.reject( absUrl, options );
+                               return deferred.promise();
+                       }
+               }
+
+               // If the page we are interested in is already in the DOM,
+               // and the caller did not indicate that we should force a
+               // reload of the file, we are done. Otherwise, track the
+               // existing page as a duplicated.
+               if ( page.length ) {
+                       if ( !settings.reloadPage ) {
+                               enhancePage( page, settings.role );
+                               deferred.resolve( absUrl, options, page );
+                               return deferred.promise();
+                       }
+                       dupCachedPage = page;
+               }
+
+               var mpc = settings.pageContainer,
+                       pblEvent = new $.Event( "pagebeforeload" ),
+                       triggerData = { url: url, absUrl: absUrl, dataUrl: dataUrl, deferred: deferred, options: settings };
+
+               // Let listeners know we're about to load a page.
+               mpc.trigger( pblEvent, triggerData );
+
+               // If the default behavior is prevented, stop here!
+               if ( pblEvent.isDefaultPrevented() ) {
+                       return deferred.promise();
+               }
+
+               if ( settings.showLoadMsg ) {
+
+                       // This configurable timeout allows cached pages a brief delay to load without showing a message
+                       var loadMsgDelay = setTimeout(function() {
+                                       $.mobile.showPageLoadingMsg();
+                               }, settings.loadMsgDelay ),
+
+                               // Shared logic for clearing timeout and removing message.
+                               hideMsg = function() {
+
+                                       // Stop message show timer
+                                       clearTimeout( loadMsgDelay );
+
+                                       // Hide loading message
+                                       $.mobile.hidePageLoadingMsg();
+                               };
+               }
+
+               // Reset base to the default document base.
+               if ( base ) {
+                       base.reset();
+               }
+
+               if ( !( $.mobile.allowCrossDomainPages || path.isSameDomain( documentUrl, absUrl ) ) ) {
+                       deferred.reject( absUrl, options );
+               } else {
+                       // Load the new page.
+                       $.ajax({
+                               url: fileUrl,
+                               type: settings.type,
+                               data: settings.data,
+                               dataType: "html",
+                               success: function( html, textStatus, xhr ) {
+                                       //pre-parse html to check for a data-url,
+                                       //use it as the new fileUrl, base path, etc
+                                       var all = $( "<div></div>" ),
+
+                                               //page title regexp
+                                               newPageTitle = html.match( /<title[^>]*>([^<]*)/ ) && RegExp.$1,
+
+                                               // TODO handle dialogs again
+                                               pageElemRegex = new RegExp( "(<[^>]+\\bdata-" + $.mobile.ns + "role=[\"']?page[\"']?[^>]*>)" ),
+                                               dataUrlRegex = new RegExp( "\\bdata-" + $.mobile.ns + "url=[\"']?([^\"'>]*)[\"']?" );
+
+
+                                       // data-url must be provided for the base tag so resource requests can be directed to the
+                                       // correct url. loading into a temprorary element makes these requests immediately
+                                       if ( pageElemRegex.test( html ) &&
+                                                       RegExp.$1 &&
+                                                       dataUrlRegex.test( RegExp.$1 ) &&
+                                                       RegExp.$1 ) {
+                                               url = fileUrl = path.getFilePath( $( "<div>" + RegExp.$1 + "</div>" ).text() );
+                                       }
+
+                                       if ( base ) {
+                                               base.set( fileUrl );
+                                       }
+
+                                       //workaround to allow scripts to execute when included in page divs
+                                       all.get( 0 ).innerHTML = html;
+                                       page = all.find( ":jqmData(role='page'), :jqmData(role='dialog')" ).first();
+
+                                       //if page elem couldn't be found, create one and insert the body element's contents
+                                       if ( !page.length ) {
+                                               page = $( "<div data-" + $.mobile.ns + "role='page'>" + html.split( /<\/?body[^>]*>/gmi )[1] + "</div>" );
+                                       }
+
+                                       if ( newPageTitle && !page.jqmData( "title" ) ) {
+                                               if ( ~newPageTitle.indexOf( "&" ) ) {
+                                                       newPageTitle = $( "<div>" + newPageTitle + "</div>" ).text();
+                                               }
+                                               page.jqmData( "title", newPageTitle );
+                                       }
+
+                                       //rewrite src and href attrs to use a base url
+                                       if ( !$.support.dynamicBaseTag ) {
+                                               var newPath = path.get( fileUrl );
+                                               page.find( "[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]" ).each(function() {
+                                                       var thisAttr = $( this ).is( '[href]' ) ? 'href' :
+                                                                       $( this ).is( '[src]' ) ? 'src' : 'action',
+                                                               thisUrl = $( this ).attr( thisAttr );
+
+                                                       // XXX_jblas: We need to fix this so that it removes the document
+                                                       //            base URL, and then prepends with the new page URL.
+                                                       //if full path exists and is same, chop it - helps IE out
+                                                       thisUrl = thisUrl.replace( location.protocol + '//' + location.host + location.pathname, '' );
+
+                                                       if ( !/^(\w+:|#|\/)/.test( thisUrl ) ) {
+                                                               $( this ).attr( thisAttr, newPath + thisUrl );
+                                                       }
+                                               });
+                                       }
+
+                                       //append to page and enhance
+                                       // TODO taging a page with external to make sure that embedded pages aren't removed
+                                       //      by the various page handling code is bad. Having page handling code in many
+                                       //      places is bad. Solutions post 1.0
+                                       page
+                                               .attr( "data-" + $.mobile.ns + "url", path.convertUrlToDataUrl( fileUrl ) )
+                                               .attr( "data-" + $.mobile.ns + "external-page", true )
+                                               .appendTo( settings.pageContainer );
+
+                                       // wait for page creation to leverage options defined on widget
+                                       page.one( 'pagecreate', $.mobile._bindPageRemove );
+
+                                       enhancePage( page, settings.role );
+
+                                       // Enhancing the page may result in new dialogs/sub pages being inserted
+                                       // into the DOM. If the original absUrl refers to a sub-page, that is the
+                                       // real page we are interested in.
+                                       if ( absUrl.indexOf( "&" + $.mobile.subPageUrlKey ) > -1 ) {
+                                               page = settings.pageContainer.children( "[data-" + $.mobile.ns +"url='" + dataUrl + "']" );
+                                       }
+
+                                       //bind pageHide to removePage after it's hidden, if the page options specify to do so
+
+                                       // Remove loading message.
+                                       if ( settings.showLoadMsg ) {
+                                               hideMsg();
+                                       }
+
+                                       // Add the page reference and xhr to our triggerData.
+                                       triggerData.xhr = xhr;
+                                       triggerData.textStatus = textStatus;
+                                       triggerData.page = page;
+
+                                       // Let listeners know the page loaded successfully.
+                                       settings.pageContainer.trigger( "pageload", triggerData );
+
+                                       deferred.resolve( absUrl, options, page, dupCachedPage );
+                               },
+                               error: function( xhr, textStatus, errorThrown ) {
+                                       //set base back to current path
+                                       if ( base ) {
+                                               base.set( path.get() );
+                                       }
+
+                                       // Add error info to our triggerData.
+                                       triggerData.xhr = xhr;
+                                       triggerData.textStatus = textStatus;
+                                       triggerData.errorThrown = errorThrown;
+
+                                       var plfEvent = new $.Event( "pageloadfailed" );
+
+                                       // Let listeners know the page load failed.
+                                       settings.pageContainer.trigger( plfEvent, triggerData );
+
+                                       // If the default behavior is prevented, stop here!
+                                       // Note that it is the responsibility of the listener/handler
+                                       // that called preventDefault(), to resolve/reject the
+                                       // deferred object within the triggerData.
+                                       if ( plfEvent.isDefaultPrevented() ) {
+                                               return;
+                                       }
+
+                                       // Remove loading message.
+                                       if ( settings.showLoadMsg ) {
+
+                                               // Remove loading message.
+                                               hideMsg();
+
+                                               // show error message
+                                               $.mobile.showPageLoadingMsg( $.mobile.pageLoadErrorMessageTheme, $.mobile.pageLoadErrorMessage, true );
+
+                                               // hide after delay
+                                               setTimeout( $.mobile.hidePageLoadingMsg, 1500 );
+                                       }
+
+                                       deferred.reject( absUrl, options );
+                               }
+                       });
+               }
+
+               return deferred.promise();
+       };
+
+       $.mobile.loadPage.defaults = {
+               type: "get",
+               data: undefined,
+               reloadPage: false,
+               role: undefined, // By default we rely on the role defined by the @data-role attribute.
+               showLoadMsg: false,
+               pageContainer: undefined,
+               loadMsgDelay: 50 // This delay allows loads that pull from browser cache to occur without showing the loading message.
+       };
+
+       // Show a specific page in the page container.
+       $.mobile.changePage = function( toPage, options ) {
+               // If we are in the midst of a transition, queue the current request.
+               // We'll call changePage() once we're done with the current transition to
+               // service the request.
+               if ( isPageTransitioning ) {
+                       pageTransitionQueue.unshift( arguments );
+                       return;
+               }
+
+               var settings = $.extend( {}, $.mobile.changePage.defaults, options );
+
+               // Make sure we have a pageContainer to work with.
+               settings.pageContainer = settings.pageContainer || $.mobile.pageContainer;
+
+               // Make sure we have a fromPage.
+               settings.fromPage = settings.fromPage || $.mobile.activePage;
+
+               var mpc = settings.pageContainer,
+                       pbcEvent = new $.Event( "pagebeforechange" ),
+                       triggerData = { toPage: toPage, options: settings };
+
+               // Let listeners know we're about to change the current page.
+               mpc.trigger( pbcEvent, triggerData );
+
+               // If the default behavior is prevented, stop here!
+               if ( pbcEvent.isDefaultPrevented() ) {
+                       return;
+               }
+
+               // We allow "pagebeforechange" observers to modify the toPage in the trigger
+               // data to allow for redirects. Make sure our toPage is updated.
+
+               toPage = triggerData.toPage;
+
+               // Set the isPageTransitioning flag to prevent any requests from
+               // entering this method while we are in the midst of loading a page
+               // or transitioning.
+
+               isPageTransitioning = true;
+
+               // If the caller passed us a url, call loadPage()
+               // to make sure it is loaded into the DOM. We'll listen
+               // to the promise object it returns so we know when
+               // it is done loading or if an error ocurred.
+               if ( typeof toPage === "string" ) {
+                       $.mobile.loadPage( toPage, settings )
+                               .done(function( url, options, newPage, dupCachedPage ) {
+                                       isPageTransitioning = false;
+                                       options.duplicateCachedPage = dupCachedPage;
+                                       $.mobile.changePage( newPage, options );
+                               })
+                               .fail(function( url, options ) {
+                                       isPageTransitioning = false;
+
+                                       //clear out the active button state
+                                       removeActiveLinkClass( true );
+
+                                       //release transition lock so navigation is free again
+                                       releasePageTransitionLock();
+                                       settings.pageContainer.trigger( "pagechangefailed", triggerData );
+                               });
+                       return;
+               }
+
+               // If we are going to the first-page of the application, we need to make
+               // sure settings.dataUrl is set to the application document url. This allows
+               // us to avoid generating a document url with an id hash in the case where the
+               // first-page of the document has an id attribute specified.
+               if ( toPage[ 0 ] === $.mobile.firstPage[ 0 ] && !settings.dataUrl ) {
+                       settings.dataUrl = documentUrl.hrefNoHash;
+               }
+
+               // The caller passed us a real page DOM element. Update our
+               // internal state and then trigger a transition to the page.
+               var fromPage = settings.fromPage,
+                       url = ( settings.dataUrl && path.convertUrlToDataUrl( settings.dataUrl ) ) || toPage.jqmData( "url" ),
+                       // The pageUrl var is usually the same as url, except when url is obscured as a dialog url. pageUrl always contains the file path
+                       pageUrl = url,
+                       fileUrl = path.getFilePath( url ),
+                       active = urlHistory.getActive(),
+                       activeIsInitialPage = urlHistory.activeIndex === 0,
+                       historyDir = 0,
+                       pageTitle = document.title,
+                       isDialog = settings.role === "dialog" || toPage.jqmData( "role" ) === "dialog";
+
+               // By default, we prevent changePage requests when the fromPage and toPage
+               // are the same element, but folks that generate content manually/dynamically
+               // and reuse pages want to be able to transition to the same page. To allow
+               // this, they will need to change the default value of allowSamePageTransition
+               // to true, *OR*, pass it in as an option when they manually call changePage().
+               // It should be noted that our default transition animations assume that the
+               // formPage and toPage are different elements, so they may behave unexpectedly.
+               // It is up to the developer that turns on the allowSamePageTransitiona option
+               // to either turn off transition animations, or make sure that an appropriate
+               // animation transition is used.
+               if ( fromPage && fromPage[0] === toPage[0] && !settings.allowSamePageTransition ) {
+                       isPageTransitioning = false;
+                       mpc.trigger( "pagechange", triggerData );
+
+                       // Even if there is no page change to be done, we should keep the urlHistory in sync with the hash changes
+                       if ( settings.fromHashChange ) {
+                               urlHistory.directHashChange({
+                                       currentUrl:     url,
+                                       isBack:         function() {},
+                                       isForward:      function() {}
+                               });
+                       }
+
+                       return;
+               }
+
+               // We need to make sure the page we are given has already been enhanced.
+               enhancePage( toPage, settings.role );
+
+               // If the changePage request was sent from a hashChange event, check to see if the
+               // page is already within the urlHistory stack. If so, we'll assume the user hit
+               // the forward/back button and will try to match the transition accordingly.
+               if ( settings.fromHashChange ) {
+                       urlHistory.directHashChange({
+                               currentUrl:     url,
+                               isBack:         function() { historyDir = -1; },
+                               isForward:      function() { historyDir = 1; }
+                       });
+               }
+
+               // Kill the keyboard.
+               // XXX_jblas: We need to stop crawling the entire document to kill focus. Instead,
+               //            we should be tracking focus with a delegate() handler so we already have
+               //            the element in hand at this point.
+               // Wrap this in a try/catch block since IE9 throw "Unspecified error" if document.activeElement
+               // is undefined when we are in an IFrame.
+               try {
+                       if ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== 'body' ) {
+                               $( document.activeElement ).blur();
+                       } else {
+                               $( "input:focus, textarea:focus, select:focus" ).blur();
+                       }
+               } catch( e ) {}
+
+               // Record whether we are at a place in history where a dialog used to be - if so, do not add a new history entry and do not change the hash either
+               var alreadyThere = false;
+
+               // If we're displaying the page as a dialog, we don't want the url
+               // for the dialog content to be used in the hash. Instead, we want
+               // to append the dialogHashKey to the url of the current page.
+               if ( isDialog && active ) {
+                       // on the initial page load active.url is undefined and in that case should
+                       // be an empty string. Moving the undefined -> empty string back into
+                       // urlHistory.addNew seemed imprudent given undefined better represents
+                       // the url state
+
+                       // If we are at a place in history that once belonged to a dialog, reuse
+                       // this state without adding to urlHistory and without modifying the hash.
+                       // However, if a dialog is already displayed at this point, and we're
+                       // about to display another dialog, then we must add another hash and
+                       // history entry on top so that one may navigate back to the original dialog
+                       if ( active.url.indexOf( dialogHashKey ) > -1 && !$.mobile.activePage.is( ".ui-dialog" ) ) {
+                               settings.changeHash = false;
+                               alreadyThere = true;
+                       }
+
+                       // Normally, we tack on a dialog hash key, but if this is the location of a stale dialog,
+                       // we reuse the URL from the entry
+                       url = ( active.url || "" ) + ( alreadyThere ? "" : dialogHashKey );
+
+                       // tack on another dialogHashKey if this is the same as the initial hash
+                       // this makes sure that a history entry is created for this dialog
+                       if ( urlHistory.activeIndex === 0 && url === urlHistory.initialDst ) {
+                               url += dialogHashKey;
+                       }
+               }
+
+               // Set the location hash.
+               if ( settings.changeHash !== false && url ) {
+                       //disable hash listening temporarily
+                       urlHistory.ignoreNextHashChange = true;
+                       //update hash and history
+                       path.set( url );
+               }
+
+               // if title element wasn't found, try the page div data attr too
+               // If this is a deep-link or a reload ( active === undefined ) then just use pageTitle
+               var newPageTitle = ( !active )? pageTitle : toPage.jqmData( "title" ) || toPage.children( ":jqmData(role='header')" ).find( ".ui-title" ).getEncodedText();
+               if ( !!newPageTitle && pageTitle === document.title ) {
+                       pageTitle = newPageTitle;
+               }
+               if ( !toPage.jqmData( "title" ) ) {
+                       toPage.jqmData( "title", pageTitle );
+               }
+
+               // Make sure we have a transition defined.
+               settings.transition = settings.transition ||
+                       ( ( historyDir && !activeIsInitialPage ) ? active.transition : undefined ) ||
+                       ( isDialog ? $.mobile.defaultDialogTransition : $.mobile.defaultPageTransition );
+
+               //add page to history stack if it's not back or forward
+               if ( !historyDir ) {
+                       // Overwrite the current entry if it's a leftover from a dialog
+                       if ( alreadyThere ) {
+                               urlHistory.activeIndex = Math.max( 0, urlHistory.activeIndex - 1 );
+                       }
+                       urlHistory.addNew( url, settings.transition, pageTitle, pageUrl, settings.role );
+               }
+
+               //set page title
+               document.title = urlHistory.getActive().title;
+
+               //set "toPage" as activePage
+               $.mobile.activePage = toPage;
+
+               // If we're navigating back in the URL history, set reverse accordingly.
+               settings.reverse = settings.reverse || historyDir < 0;
+
+               transitionPages( toPage, fromPage, settings.transition, settings.reverse )
+                       .done(function( name, reverse, $to, $from, alreadyFocused ) {
+                               removeActiveLinkClass();
+
+                               //if there's a duplicateCachedPage, remove it from the DOM now that it's hidden
+                               if ( settings.duplicateCachedPage ) {
+                                       settings.duplicateCachedPage.remove();
+                               }
+
+                               // Send focus to the newly shown page. Moved from promise .done binding in transitionPages
+                               // itself to avoid ie bug that reports offsetWidth as > 0 (core check for visibility)
+                               // despite visibility: hidden addresses issue #2965
+                               // https://github.com/jquery/jquery-mobile/issues/2965
+                               if ( !alreadyFocused ) {
+                                       $.mobile.focusPage( toPage );
+                               }
+
+                               releasePageTransitionLock();
+
+                               // Let listeners know we're all done changing the current page.
+                               mpc.trigger( "pagechange", triggerData );
+                       });
+       };
+
+       $.mobile.changePage.defaults = {
+               transition: undefined,
+               reverse: false,
+               changeHash: true,
+               fromHashChange: false,
+               role: undefined, // By default we rely on the role defined by the @data-role attribute.
+               duplicateCachedPage: undefined,
+               pageContainer: undefined,
+               showLoadMsg: true, //loading message shows by default when pages are being fetched during changePage
+               dataUrl: undefined,
+               fromPage: undefined,
+               allowSamePageTransition: false
+       };
+
+/* Event Bindings - hashchange, submit, and click */
+       function findClosestLink( ele )
+       {
+               while ( ele ) {
+                       // Look for the closest element with a nodeName of "a".
+                       // Note that we are checking if we have a valid nodeName
+                       // before attempting to access it. This is because the
+                       // node we get called with could have originated from within
+                       // an embedded SVG document where some symbol instance elements
+                       // don't have nodeName defined on them, or strings are of type
+                       // SVGAnimatedString.
+                       if ( ( typeof ele.nodeName === "string" ) && ele.nodeName.toLowerCase() === "a" ) {
+                               break;
+                       }
+                       ele = ele.parentNode;
+               }
+               return ele;
+       }
+
+       // The base URL for any given element depends on the page it resides in.
+       function getClosestBaseUrl( ele )
+       {
+               // Find the closest page and extract out its url.
+               var url = $( ele ).closest( ".ui-page" ).jqmData( "url" ),
+                       base = documentBase.hrefNoHash;
+
+               if ( !url || !path.isPath( url ) ) {
+                       url = base;
+               }
+
+               return path.makeUrlAbsolute( url, base);
+       }
+
+       //The following event bindings should be bound after mobileinit has been triggered
+       //the following deferred is resolved in the init file
+       $.mobile.navreadyDeferred = $.Deferred();
+       $.mobile.navreadyDeferred.done(function() {
+               //bind to form submit events, handle with Ajax
+               $( document ).delegate( "form", "submit", function( event ) {
+                       var $this = $( this );
+
+                       if ( !$.mobile.ajaxEnabled ||
+                                       // test that the form is, itself, ajax false
+                                       $this.is( ":jqmData(ajax='false')" ) ||
+                                       // test that $.mobile.ignoreContentEnabled is set and
+                                       // the form or one of it's parents is ajax=false
+                                       !$this.jqmHijackable().length ) {
+                               return;
+                       }
+
+                       var type = $this.attr( "method" ),
+                               target = $this.attr( "target" ),
+                               url = $this.attr( "action" );
+
+                       // If no action is specified, browsers default to using the
+                       // URL of the document containing the form. Since we dynamically
+                       // pull in pages from external documents, the form should submit
+                       // to the URL for the source document of the page containing
+                       // the form.
+                       if ( !url ) {
+                               // Get the @data-url for the page containing the form.
+                               url = getClosestBaseUrl( $this );
+                               if ( url === documentBase.hrefNoHash ) {
+                                       // The url we got back matches the document base,
+                                       // which means the page must be an internal/embedded page,
+                                       // so default to using the actual document url as a browser
+                                       // would.
+                                       url = documentUrl.hrefNoSearch;
+                               }
+                       }
+
+                       url = path.makeUrlAbsolute(  url, getClosestBaseUrl( $this ) );
+
+                       if ( ( path.isExternal( url ) && !path.isPermittedCrossDomainRequest( documentUrl, url ) ) || target ) {
+                               return;
+                       }
+
+                       $.mobile.changePage(
+                               url,
+                               {
+                                       type:           type && type.length && type.toLowerCase() || "get",
+                                       data:           $this.serialize(),
+                                       transition:     $this.jqmData( "transition" ),
+                                       reverse:        $this.jqmData( "direction" ) === "reverse",
+                                       reloadPage:     true
+                               }
+                       );
+                       event.preventDefault();
+               });
+
+               //add active state on vclick
+               $( document ).bind( "vclick", function( event ) {
+                       // if this isn't a left click we don't care. Its important to note
+                       // that when the virtual event is generated it will create the which attr
+                       if ( event.which > 1 || !$.mobile.linkBindingEnabled ) {
+                               return;
+                       }
+
+                       var link = findClosestLink( event.target );
+
+                       // split from the previous return logic to avoid find closest where possible
+                       // TODO teach $.mobile.hijackable to operate on raw dom elements so the link wrapping
+                       // can be avoided
+                       if ( !$( link ).jqmHijackable().length ) {
+                               return;
+                       }
+
+                       if ( link ) {
+                               if ( path.parseUrl( link.getAttribute( "href" ) || "#" ).hash !== "#" ) {
+                                       removeActiveLinkClass( true );
+                                       $activeClickedLink = $( link ).closest( ".ui-btn" ).not( ".ui-disabled" );
+                                       $activeClickedLink.addClass( $.mobile.activeBtnClass );
+                               }
+                       }
+               });
+
+               // click routing - direct to HTTP or Ajax, accordingly
+               $( document ).bind( "click", function( event ) {
+                       if ( !$.mobile.linkBindingEnabled ) {
+                               return;
+                       }
+
+                       var link = findClosestLink( event.target ), $link = $( link ), httpCleanup;
+
+                       // If there is no link associated with the click or its not a left
+                       // click we want to ignore the click
+                       // TODO teach $.mobile.hijackable to operate on raw dom elements so the link wrapping
+                       // can be avoided
+                       if ( !link || event.which > 1 || !$link.jqmHijackable().length ) {
+                               return;
+                       }
+
+                       //remove active link class if external (then it won't be there if you come back)
+                       httpCleanup = function() {
+                               window.setTimeout(function() { removeActiveLinkClass( true ); }, 200 );
+                       };
+
+                       //if there's a data-rel=back attr, go back in history
+                       if ( $link.is( ":jqmData(rel='back')" ) ) {
+                               $.mobile.back();
+                               return false;
+                       }
+
+                       var baseUrl = getClosestBaseUrl( $link ),
+
+                               //get href, if defined, otherwise default to empty hash
+                               href = path.makeUrlAbsolute( $link.attr( "href" ) || "#", baseUrl );
+
+                       //if ajax is disabled, exit early
+                       if ( !$.mobile.ajaxEnabled && !path.isEmbeddedPage( href ) ) {
+                               httpCleanup();
+                               //use default click handling
+                               return;
+                       }
+
+                       // XXX_jblas: Ideally links to application pages should be specified as
+                       //            an url to the application document with a hash that is either
+                       //            the site relative path or id to the page. But some of the
+                       //            internal code that dynamically generates sub-pages for nested
+                       //            lists and select dialogs, just write a hash in the link they
+                       //            create. This means the actual URL path is based on whatever
+                       //            the current value of the base tag is at the time this code
+                       //            is called. For now we are just assuming that any url with a
+                       //            hash in it is an application page reference.
+                       if ( href.search( "#" ) !== -1 ) {
+                               href = href.replace( /[^#]*#/, "" );
+                               if ( !href ) {
+                                       //link was an empty hash meant purely
+                                       //for interaction, so we ignore it.
+                                       event.preventDefault();
+                                       return;
+                               } else if ( path.isPath( href ) ) {
+                                       //we have apath so make it the href we want to load.
+                                       href = path.makeUrlAbsolute( href, baseUrl );
+                               } else {
+                                       //we have a simple id so use the documentUrl as its base.
+                                       href = path.makeUrlAbsolute( "#" + href, documentUrl.hrefNoHash );
+                               }
+                       }
+
+                               // Should we handle this link, or let the browser deal with it?
+                       var useDefaultUrlHandling = $link.is( "[rel='external']" ) || $link.is( ":jqmData(ajax='false')" ) || $link.is( "[target]" ),
+
+                               // Some embedded browsers, like the web view in Phone Gap, allow cross-domain XHR
+                               // requests if the document doing the request was loaded via the file:// protocol.
+                               // This is usually to allow the application to "phone home" and fetch app specific
+                               // data. We normally let the browser handle external/cross-domain urls, but if the
+                               // allowCrossDomainPages option is true, we will allow cross-domain http/https
+                               // requests to go through our page loading logic.
+
+                               //check for protocol or rel and its not an embedded page
+                               //TODO overlap in logic from isExternal, rel=external check should be
+                               //     moved into more comprehensive isExternalLink
+                               isExternal = useDefaultUrlHandling || ( path.isExternal( href ) && !path.isPermittedCrossDomainRequest( documentUrl, href ) );
+
+                       if ( isExternal ) {
+                               httpCleanup();
+                               //use default click handling
+                               return;
+                       }
+
+                       //use ajax
+                       var transition = $link.jqmData( "transition" ),
+                               reverse = $link.jqmData( "direction" ) === "reverse" ||
+                                                       // deprecated - remove by 1.0
+                                                       $link.jqmData( "back" ),
+
+                               //this may need to be more specific as we use data-rel more
+                               role = $link.attr( "data-" + $.mobile.ns + "rel" ) || undefined;
+
+                       $.mobile.changePage( href, { transition: transition, reverse: reverse, role: role, link: $link } );
+                       event.preventDefault();
+               });
+
+               //prefetch pages when anchors with data-prefetch are encountered
+               $( document ).delegate( ".ui-page", "pageshow.prefetch", function() {
+                       var urls = [];
+                       $( this ).find( "a:jqmData(prefetch)" ).each(function() {
+                               var $link = $( this ),
+                                       url = $link.attr( "href" );
+
+                               if ( url && $.inArray( url, urls ) === -1 ) {
+                                       urls.push( url );
+
+                                       $.mobile.loadPage( url, { role: $link.attr( "data-" + $.mobile.ns + "rel" ) } );
+                               }
+                       });
+               });
+
+               $.mobile._handleHashChange = function( hash ) {
+                       //find first page via hash
+                       var to = path.stripHash( hash ),
+                               //transition is false if it's the first page, undefined otherwise (and may be overridden by default)
+                               transition = $.mobile.urlHistory.stack.length === 0 ? "none" : undefined,
+
+                               // "navigate" event fired to allow others to take advantage of the more robust hashchange handling
+                               navEvent = new $.Event( "navigate" ),
+
+                               // default options for the changPage calls made after examining the current state
+                               // of the page and the hash
+                               changePageOptions = {
+                                       transition: transition,
+                                       changeHash: false,
+                                       fromHashChange: true
+                               };
+
+                       if ( 0 === urlHistory.stack.length ) {
+                               urlHistory.initialDst = to;
+                       }
+
+                       // We should probably fire the "navigate" event from those places that make calls to _handleHashChange,
+                       // and have _handleHashChange hook into the "navigate" event instead of triggering it here
+                       $.mobile.pageContainer.trigger( navEvent );
+                       if ( navEvent.isDefaultPrevented() ) {
+                               return;
+                       }
+
+                       //if listening is disabled (either globally or temporarily), or it's a dialog hash
+                       if ( !$.mobile.hashListeningEnabled || urlHistory.ignoreNextHashChange ) {
+                               urlHistory.ignoreNextHashChange = false;
+                               return;
+                       }
+
+                       // special case for dialogs
+                       if ( urlHistory.stack.length > 1 && to.indexOf( dialogHashKey ) > -1 && urlHistory.initialDst !== to ) {
+
+                               // If current active page is not a dialog skip the dialog and continue
+                               // in the same direction
+                               if ( !$.mobile.activePage.is( ".ui-dialog" ) ) {
+                                       //determine if we're heading forward or backward and continue accordingly past
+                                       //the current dialog
+                                       urlHistory.directHashChange({
+                                               currentUrl: to,
+                                               isBack: function() { $.mobile.back(); },
+                                               isForward: function() { window.history.forward(); }
+                                       });
+
+                                       // prevent changePage()
+                                       return;
+                               } else {
+                                       // if the current active page is a dialog and we're navigating
+                                       // to a dialog use the dialog objected saved in the stack
+                                       urlHistory.directHashChange({
+                                               currentUrl: to,
+
+                                               // regardless of the direction of the history change
+                                               // do the following
+                                               either: function( isBack ) {
+                                                       var active = $.mobile.urlHistory.getActive();
+
+                                                       to = active.pageUrl;
+
+                                                       // make sure to set the role, transition and reversal
+                                                       // as most of this is lost by the domCache cleaning
+                                                       $.extend( changePageOptions, {
+                                                               role: active.role,
+                                                               transition: active.transition,
+                                                               reverse: isBack
+                                                       });
+                                               }
+                                       });
+                               }
+                       }
+
+                       //if to is defined, load it
+                       if ( to ) {
+                               // At this point, 'to' can be one of 3 things, a cached page element from
+                               // a history stack entry, an id, or site-relative/absolute URL. If 'to' is
+                               // an id, we need to resolve it against the documentBase, not the location.href,
+                               // since the hashchange could've been the result of a forward/backward navigation
+                               // that crosses from an external page/dialog to an internal page/dialog.
+                               to = ( typeof to === "string" && !path.isPath( to ) ) ? ( path.makeUrlAbsolute( '#' + to, documentBase ) ) : to;
+
+                               // If we're about to go to an initial URL that contains a reference to a non-existent
+                               // internal page, go to the first page instead. We know that the initial hash refers to a
+                               // non-existent page, because the initial hash did not end up in the initial urlHistory entry
+                               if ( to === path.makeUrlAbsolute( '#' + urlHistory.initialDst, documentBase ) &&
+                                       urlHistory.stack.length && urlHistory.stack[0].url !== urlHistory.initialDst.replace( dialogHashKey, "" ) ) {
+                                       to = $.mobile.firstPage;
+                               }
+                               $.mobile.changePage( to, changePageOptions );
+                       }       else {
+                               //there's no hash, go to the first page in the dom
+                               $.mobile.changePage( $.mobile.firstPage, changePageOptions );
+                       }
+               };
+
+               //hashchange event handler
+               $window.bind( "hashchange", function( e, triggered ) {
+                       // Firefox auto-escapes the location.hash as for v13 but
+                       // leaves the href untouched
+                       $.mobile._handleHashChange( path.parseLocation().hash );
+               });
+
+               //set page min-heights to be device specific
+               $( document ).bind( "pageshow", resetActivePageHeight );
+               $( window ).bind( "throttledresize", resetActivePageHeight );
+
+       });//navreadyDeferred done callback
+
+})( jQuery );
+
+(function( $, window ) {
+       // For now, let's Monkeypatch this onto the end of $.mobile._registerInternalEvents
+       // Scope self to pushStateHandler so we can reference it sanely within the
+       // methods handed off as event handlers
+       var     pushStateHandler = {},
+               self = pushStateHandler,
+               $win = $( window ),
+               url = $.mobile.path.parseLocation(),
+               mobileinitDeferred = $.Deferred(),
+               domreadyDeferred = $.Deferred();
+
+       $( document ).ready( $.proxy( domreadyDeferred, "resolve" ) );
+
+       $( document ).one( "mobileinit", $.proxy( mobileinitDeferred, "resolve" ) );
+
+       $.extend( pushStateHandler, {
+               // TODO move to a path helper, this is rather common functionality
+               initialFilePath: (function() {
+                       return url.pathname + url.search;
+               })(),
+
+               hashChangeTimeout: 200,
+
+               hashChangeEnableTimer: undefined,
+
+               initialHref: url.hrefNoHash,
+
+               state: function() {
+                       return {
+                               // firefox auto decodes the url when using location.hash but not href
+                               hash: $.mobile.path.parseLocation().hash || "#" + self.initialFilePath,
+                               title: document.title,
+
+                               // persist across refresh
+                               initialHref: self.initialHref
+                       };
+               },
+
+               resetUIKeys: function( url ) {
+                       var dialog = $.mobile.dialogHashKey,
+                               subkey = "&" + $.mobile.subPageUrlKey,
+                               dialogIndex = url.indexOf( dialog );
+
+                       if ( dialogIndex > -1 ) {
+                               url = url.slice( 0, dialogIndex ) + "#" + url.slice( dialogIndex );
+                       } else if ( url.indexOf( subkey ) > -1 ) {
+                               url = url.split( subkey ).join( "#" + subkey );
+                       }
+
+                       return url;
+               },
+
+               // TODO sort out a single barrier to hashchange functionality
+               nextHashChangePrevented: function( value ) {
+                       $.mobile.urlHistory.ignoreNextHashChange = value;
+                       self.onHashChangeDisabled = value;
+               },
+
+               // on hash change we want to clean up the url
+               // NOTE this takes place *after* the vanilla navigation hash change
+               // handling has taken place and set the state of the DOM
+               onHashChange: function( e ) {
+                       // disable this hash change
+                       if ( self.onHashChangeDisabled ) {
+                               return;
+                       }
+
+                       var href, state,
+                               // firefox auto decodes the url when using location.hash but not href
+                               hash = $.mobile.path.parseLocation().hash,
+                               isPath = $.mobile.path.isPath( hash ),
+                               resolutionUrl = isPath ? $.mobile.path.getLocation() : $.mobile.getDocumentUrl();
+
+                       hash = isPath ? hash.replace( "#", "" ) : hash;
+
+
+                       // propulate the hash when its not available
+                       state = self.state();
+
+                       // make the hash abolute with the current href
+                       href = $.mobile.path.makeUrlAbsolute( hash, resolutionUrl );
+
+                       if ( isPath ) {
+                               href = self.resetUIKeys( href );
+                       }
+
+                       // replace the current url with the new href and store the state
+                       // Note that in some cases we might be replacing an url with the
+                       // same url. We do this anyways because we need to make sure that
+                       // all of our history entries have a state object associated with
+                       // them. This allows us to work around the case where $.mobile.back()
+                       // is called to transition from an external page to an embedded page.
+                       // In that particular case, a hashchange event is *NOT* generated by the browser.
+                       // Ensuring each history entry has a state object means that onPopState()
+                       // will always trigger our hashchange callback even when a hashchange event
+                       // is not fired.
+                       history.replaceState( state, document.title, href );
+               },
+
+               // on popstate (ie back or forward) we need to replace the hash that was there previously
+               // cleaned up by the additional hash handling
+               onPopState: function( e ) {
+                       var poppedState = e.originalEvent.state,
+                               fromHash, toHash, hashChanged;
+
+                       // if there's no state its not a popstate we care about, eg chrome's initial popstate
+                       if ( poppedState ) {
+                               // if we get two pop states in under this.hashChangeTimeout
+                               // make sure to clear any timer set for the previous change
+                               clearTimeout( self.hashChangeEnableTimer );
+
+                               // make sure to enable hash handling for the the _handleHashChange call
+                               self.nextHashChangePrevented( false );
+
+                               // change the page based on the hash in the popped state
+                               $.mobile._handleHashChange( poppedState.hash );
+
+                               // prevent any hashchange in the next self.hashChangeTimeout
+                               self.nextHashChangePrevented( true );
+
+                               // re-enable hash change handling after swallowing a possible hash
+                               // change event that comes on all popstates courtesy of browsers like Android
+                               self.hashChangeEnableTimer = setTimeout( function() {
+                                       self.nextHashChangePrevented( false );
+                               }, self.hashChangeTimeout );
+                       }
+               },
+
+               init: function() {
+                       $win.bind( "hashchange", self.onHashChange );
+
+                       // Handle popstate events the occur through history changes
+                       $win.bind( "popstate", self.onPopState );
+
+                       // if there's no hash, we need to replacestate for returning to home
+                       if ( location.hash === "" ) {
+                               history.replaceState( self.state(), document.title, $.mobile.path.getLocation() );
+                       }
+               }
+       });
+
+       // We need to init when "mobileinit", "domready", and "navready" have all happened
+       $.when( domreadyDeferred, mobileinitDeferred, $.mobile.navreadyDeferred ).done(function() {
+               if ( $.mobile.pushStateEnabled && $.support.pushState ) {
+                       pushStateHandler.init();
+               }
+       });
+})( jQuery, this );
+
+/*
+* fallback transition for flip in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+$.mobile.transitionFallbacks.flip = "fade";
+
+})( jQuery, this );
+/*
+* fallback transition for flow in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+$.mobile.transitionFallbacks.flow = "fade";
+
+})( jQuery, this );
+/*
+* fallback transition for pop in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+$.mobile.transitionFallbacks.pop = "fade";
+
+})( jQuery, this );
+/*
+* fallback transition for slide in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+// Use the simultaneous transitions handler for slide transitions
+$.mobile.transitionHandlers.slide = $.mobile.transitionHandlers.simultaneous;
+
+// Set the slide transitions's fallback to "fade"
+$.mobile.transitionFallbacks.slide = "fade";
+
+})( jQuery, this );
+/*
+* fallback transition for slidedown in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+$.mobile.transitionFallbacks.slidedown = "fade";
+
+})( jQuery, this );
+/*
+* fallback transition for slidefade in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+// Set the slide transitions's fallback to "fade"
+$.mobile.transitionFallbacks.slidefade = "fade";
+
+})( jQuery, this );
+/*
+* fallback transition for slideup in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+$.mobile.transitionFallbacks.slideup = "fade";
+
+})( jQuery, this );
+/*
+* fallback transition for turn in non-3D supporting browsers (which tend to handle complex transitions poorly in general
+*/
+
+(function( $, window, undefined ) {
+
+$.mobile.transitionFallbacks.turn = "fade";
+
+})( jQuery, this );
+
+(function( $, undefined ) {
+
+$.mobile.page.prototype.options.degradeInputs = {
+       color: false,
+       date: false,
+       datetime: false,
+       "datetime-local": false,
+       email: false,
+       month: false,
+       number: false,
+       range: "number",
+       search: "text",
+       tel: false,
+       time: false,
+       url: false,
+       week: false
+};
+
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ) {
+
+       var page = $.mobile.closestPageData( $( e.target ) ), options;
+
+       if ( !page ) {
+               return;
+       }
+
+       options = page.options;
+
+       // degrade inputs to avoid poorly implemented native functionality
+       $( e.target ).find( "input" ).not( page.keepNativeSelector() ).each(function() {
+               var $this = $( this ),
+                       type = this.getAttribute( "type" ),
+                       optType = options.degradeInputs[ type ] || "text";
+
+               if ( options.degradeInputs[ type ] ) {
+                       var html = $( "<div>" ).html( $this.clone() ).html(),
+                               // In IE browsers, the type sometimes doesn't exist in the cloned markup, so we replace the closing tag instead
+                               hasType = html.indexOf( " type=" ) > -1,
+                               findstr = hasType ? /\s+type=["']?\w+['"]?/ : /\/?>/,
+                               repstr = " type=\"" + optType + "\" data-" + $.mobile.ns + "type=\"" + type + "\"" + ( hasType ? "" : ">" );
+
+                       $this.replaceWith( html.replace( findstr, repstr ) );
+               }
+       });
+
+});
+
+})( jQuery );
+
+(function( $, window, undefined ) {
+
+$.widget( "mobile.dialog", $.mobile.widget, {
+       options: {
+               closeBtnText: "Close",
+               overlayTheme: "a",
+               initSelector: ":jqmData(role='dialog')"
+       },
+       _create: function() {
+               var self = this,
+                       $el = this.element,
+                       headerCloseButton = $( "<a href='#' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "iconpos='notext'>"+ this.options.closeBtnText + "</a>" ),
+                       dialogWrap = $( "<div/>", {
+                                       "role" : "dialog",
+                                       "class" : "ui-dialog-contain ui-corner-all ui-overlay-shadow"
+                               });
+
+               $el.addClass( "ui-dialog ui-overlay-" + this.options.overlayTheme );
+
+               // Class the markup for dialog styling
+               // Set aria role
+               $el
+                       .wrapInner( dialogWrap )
+                       .children()
+                               .find( ":jqmData(role='header')" )
+                                       .prepend( headerCloseButton )
+                               .end()
+                               .children( ':first-child')
+                                       .addClass( "ui-corner-top" )
+                               .end()
+                               .children( ":last-child" )
+                                       .addClass( "ui-corner-bottom" );
+
+               // this must be an anonymous function so that select menu dialogs can replace
+               // the close method. This is a change from previously just defining data-rel=back
+               // on the button and letting nav handle it
+               //
+               // Use click rather than vclick in order to prevent the possibility of unintentionally
+               // reopening the dialog if the dialog opening item was directly under the close button.
+               headerCloseButton.bind( "click", function() {
+                       self.close();
+               });
+
+               /* bind events
+                       - clicks and submits should use the closing transition that the dialog opened with
+                               unless a data-transition is specified on the link/form
+                       - if the click was on the close button, or the link has a data-rel="back" it'll go back in history naturally
+               */
+               $el.bind( "vclick submit", function( event ) {
+                       var $target = $( event.target ).closest( event.type === "vclick" ? "a" : "form" ),
+                               active;
+
+                       if ( $target.length && !$target.jqmData( "transition" ) ) {
+
+                               active = $.mobile.urlHistory.getActive() || {};
+
+                               $target.attr( "data-" + $.mobile.ns + "transition", ( active.transition || $.mobile.defaultDialogTransition ) )
+                                       .attr( "data-" + $.mobile.ns + "direction", "reverse" );
+                       }
+               })
+               .bind( "pagehide", function( e, ui ) {
+                       $( this ).find( "." + $.mobile.activeBtnClass ).not( ".ui-slider-bg" ).removeClass( $.mobile.activeBtnClass );
+               })
+               // Override the theme set by the page plugin on pageshow
+               .bind( "pagebeforeshow", function() {
+                       self._isCloseable = true;
+                       if ( self.options.overlayTheme ) {
+                               self.element
+                                       .page( "removeContainerBackground" )
+                                       .page( "setContainerBackground", self.options.overlayTheme );
+                       }
+               });
+       },
+
+       // Close method goes back in history
+       close: function() {
+               var dst;
+
+               if ( this._isCloseable ) {
+                       this._isCloseable = false;
+                       if ( $.mobile.hashListeningEnabled ) {
+                               $.mobile.back();
+                       } else {
+                               dst = $.mobile.urlHistory.getPrev().url;
+                               if ( !$.mobile.path.isPath( dst ) ) {
+                                       dst = $.mobile.path.makeUrlAbsolute( "#" + dst );
+                               }
+
+                               $.mobile.changePage( dst, { changeHash: false, fromHashChange: true } );
+                       }
+               }
+       }
+});
+
+//auto self-init widgets
+$( document ).delegate( $.mobile.dialog.prototype.options.initSelector, "pagecreate", function() {
+       $.mobile.dialog.prototype.enhance( this );
+});
+
+})( jQuery, this );
+
+(function( $, undefined ) {
+
+$.mobile.page.prototype.options.backBtnText  = "Back";
+$.mobile.page.prototype.options.addBackBtn   = false;
+$.mobile.page.prototype.options.backBtnTheme = null;
+$.mobile.page.prototype.options.headerTheme  = "a";
+$.mobile.page.prototype.options.footerTheme  = "a";
+$.mobile.page.prototype.options.contentTheme = null;
+
+// NOTE bind used to force this binding to run before the buttonMarkup binding
+//      which expects .ui-footer top be applied in its gigantic selector
+// TODO remove the buttonMarkup giant selector and move it to the various modules
+//      on which it depends
+$( document ).bind( "pagecreate", function( e ) {
+       var $page = $( e.target ),
+               o = $page.data( "page" ).options,
+               pageRole = $page.jqmData( "role" ),
+               pageTheme = o.theme;
+
+       $( ":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')", $page )
+               .jqmEnhanceable()
+               .each(function() {
+
+               var $this = $( this ),
+                       role = $this.jqmData( "role" ),
+                       theme = $this.jqmData( "theme" ),
+                       contentTheme = theme || o.contentTheme || ( pageRole === "dialog" && pageTheme ),
+                       $headeranchors,
+                       leftbtn,
+                       rightbtn,
+                       $dest = $page.find( ".ui-footer" ),
+                       backBtn;
+
+               $this.addClass( "ui-" + role );
+
+               //apply theming and markup modifications to page,header,content,footer
+               if ( role === "header" || role === "footer" ) {
+
+                       var thisTheme = theme || ( role === "header" ? o.headerTheme : o.footerTheme ) || pageTheme;
+
+                       $this
+                               //add theme class
+                               .addClass( "ui-bar-" + thisTheme )
+                               // Add ARIA role
+                               .attr( "role", role === "header" ? "banner" : "contentinfo" );
+
+                       if ( role === "header") {
+                               // Right,left buttons
+                               $headeranchors  = $this.children( "a, button" );
+                               leftbtn = $headeranchors.hasClass( "ui-btn-left" );
+                               rightbtn = $headeranchors.hasClass( "ui-btn-right" );
+
+                               leftbtn = leftbtn || $headeranchors.eq( 0 ).not( ".ui-btn-right" ).addClass( "ui-btn-left" ).length;
+
+                               rightbtn = rightbtn || $headeranchors.eq( 1 ).addClass( "ui-btn-right" ).length;
+                       }
+
+                       // Auto-add back btn on pages beyond first view
+                       if ( o.addBackBtn &&
+                               ( role === "footer" || role === "header" ) &&
+                               $page.jqmData( "url" ) !== $.mobile.path.stripHash( location.hash ) &&
+                               !leftbtn ) {
+
+                               if ( o.addBackBtn == "header" ) {
+                                       $dest = $page.find( ".ui-header" );
+                               } else {
+                                       $dest = $page.find( ".ui-footer" );
+                               }
+
+                               backBtn = $( "<a href='javascript:void(0);' class='ui-btn-back' data-"+ $.mobile.ns +"rel='back' data-"+ $.mobile.ns +"icon='header-back-btn'></a>" )
+                                       // If theme is provided, override default inheritance
+                                       .attr( "data-"+ $.mobile.ns +"theme", o.backBtnTheme || thisTheme );
+
+                               if ( !$dest.find( ".ui-btn-back" ).length ) {
+                                       backBtn.prependTo( $dest );
+                               }
+                       }
+
+                       // Page title
+                       $this.children( "h1, h2, h3, h4, h5, h6" )
+                               .addClass( "ui-title" )
+                               // Regardless of h element number in src, it becomes h1 for the enhanced page
+                               .attr({
+                                       "role": "heading",
+                                       "aria-level": "1"
+                               });
+
+               } else if ( role === "content" ) {
+                       if ( contentTheme ) {
+                               $this.addClass( "ui-body-" + ( contentTheme ) );
+                       }
+
+                       // Add ARIA role
+                       $this.attr( "role", "main" );
+               }
+       });
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+// filter function removes whitespace between label and form element so we can use inline-block (nodeType 3 = text)
+$.fn.fieldcontain = function( options ) {
+       return this
+               .addClass( "ui-field-contain ui-body ui-br" )
+               .contents().filter( function() {
+                       return ( this.nodeType === 3 && !/\S/.test( this.nodeValue ) );
+               }).remove();
+};
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ) {
+       $( ":jqmData(role='fieldcontain')", e.target ).jqmEnhanceable().fieldcontain();
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.fn.grid = function( options ) {
+       return this.each(function() {
+
+               var $this = $( this ),
+                       o = $.extend({
+                               grid: null
+                       }, options ),
+                       $kids = $this.children(),
+                       gridCols = { solo:1, a:2, b:3, c:4, d:5 },
+                       grid = o.grid,
+                       iterator;
+
+                       if ( !grid ) {
+                               if ( $kids.length <= 5 ) {
+                                       for ( var letter in gridCols ) {
+                                               if ( gridCols[ letter ] === $kids.length ) {
+                                                       grid = letter;
+                                               }
+                                       }
+                               } else {
+                                       grid = "a";
+                                       $this.addClass( "ui-grid-duo" );
+                               }
+                       }
+                       iterator = gridCols[grid];
+
+               $this.addClass( "ui-grid-" + grid );
+
+               $kids.filter( ":nth-child(" + iterator + "n+1)" ).addClass( "ui-block-a" );
+
+               if ( iterator > 1 ) {
+                       $kids.filter( ":nth-child(" + iterator + "n+2)" ).addClass( "ui-block-b" );
+               }
+               if ( iterator > 2 ) {
+                       $kids.filter( ":nth-child(" + iterator + "n+3)" ).addClass( "ui-block-c" );
+               }
+               if ( iterator > 3 ) {
+                       $kids.filter( ":nth-child(" + iterator + "n+4)" ).addClass( "ui-block-d" );
+               }
+               if ( iterator > 4 ) {
+                       $kids.filter( ":nth-child(" + iterator + "n+5)" ).addClass( "ui-block-e" );
+               }
+       });
+};
+})( jQuery );
+
+(function( $, undefined ) {
+
+$( document ).bind( "pagecreate create", function( e ) {
+       $( ":jqmData(role='nojs')", e.target ).addClass( "ui-nojs" );
+       
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.fn.buttonMarkup = function( options ) {
+       var $workingSet = this,
+               mapToDataAttr = function( key, value ) {
+                       e.setAttribute( "data-" + $.mobile.ns + key, value );
+                       el.jqmData( key, value );
+               };
+
+       // Enforce options to be of type string
+       options = ( options && ( $.type( options ) === "object" ) )? options : {};
+       for ( var i = 0; i < $workingSet.length; i++ ) {
+               var el = $workingSet.eq( i ),
+                       e = el[ 0 ],
+                       o = $.extend( {}, $.fn.buttonMarkup.defaults, {
+                               icon:       options.icon       !== undefined ? options.icon       : el.jqmData( "icon" ),
+                               iconpos:    options.iconpos    !== undefined ? options.iconpos    : el.jqmData( "iconpos" ),
+                               theme:      options.theme      !== undefined ? options.theme      : el.jqmData( "theme" ) || $.mobile.getInheritedTheme( el, $.fn.buttonMarkup.defaults["theme"] ),
+                               inline:     options.inline     !== undefined ? options.inline     : el.jqmData( "inline" ),
+                               shadow:     options.shadow     !== undefined ? options.shadow     : el.jqmData( "shadow" ),
+                               corners:    options.corners    !== undefined ? options.corners    : el.jqmData( "corners" ),
+                               iconshadow: options.iconshadow !== undefined ? options.iconshadow : el.jqmData( "iconshadow" ),
+                               mini:       options.mini       !== undefined ? options.mini       : el.jqmData( "mini" )
+                       }, options ),
+
+                       // Classes Defined
+                       innerClass = "ui-btn-inner",
+                       textClass = "ui-btn-text",
+                       buttonClass, iconClass,
+                       // Button inner markup
+                       buttonInner,
+                       buttonText,
+                       buttonIcon,
+                       buttonElements;
+
+               $.each( o, mapToDataAttr );
+
+               if ( el.jqmData( "rel" ) === "popup" && el.attr( "href" ) ) {
+                       e.setAttribute( "aria-haspopup", true );
+                       e.setAttribute( "aria-owns", e.getAttribute( "href" ) );
+               }
+
+               // Check if this element is already enhanced
+               buttonElements = $.data( ( ( e.tagName === "INPUT" || e.tagName === "BUTTON" ) ? e.parentNode : e ), "buttonElements" );
+
+               if ( buttonElements ) {
+                       e = buttonElements.outer;
+                       el = $( e );
+                       buttonInner = buttonElements.inner;
+                       buttonText = buttonElements.text;
+                       // We will recreate this icon below
+                       $( buttonElements.icon ).remove();
+                       buttonElements.icon = null;
+               }
+               else {
+                       buttonInner = document.createElement( o.wrapperEls );
+                       buttonText = document.createElement( o.wrapperEls );
+               }
+               buttonIcon = o.icon ? document.createElement( "span" ) : null;
+
+               if ( attachEvents && !buttonElements ) {
+                       attachEvents();
+               }
+
+               // if not, try to find closest theme container
+               if ( !o.theme ) {
+                       o.theme = $.mobile.getInheritedTheme( el, "c" );
+               }
+
+               buttonClass = "ui-btn ui-btn-up-" + o.theme;
+               buttonClass += o.shadow ? " ui-shadow" : "";
+               buttonClass += o.corners ? " ui-btn-corner-all" : "";
+
+               // To distinguish real buttons
+               if( el.jqmData("role") == "button" || e.tagName == "BUTTON" || e.tagName == "DIV" ){
+                       buttonClass += " ui-btn-box-" + o.theme;
+               }
+
+               /* TIZEN style markup */
+               buttonStyle = el.jqmData("style");
+
+               if ( buttonStyle == "circle" && !($(el).text().length > 0) ) {
+                       /* style : no text, Icon only */
+                       buttonClass += " ui-btn-corner-circle";
+                       buttonClass += " ui-btn-icon_only";
+               } else if ( buttonStyle == "nobg" ) {
+                       /* style : no text, Icon only, no bg */
+                       buttonClass += " ui-btn-icon-nobg";
+                       buttonClass += " ui-btn-icon_only";
+               } else if ( buttonStyle == "edit" ) {
+                       buttonClass += " ui-btn-edit";
+               } else if ( buttonStyle == "round" || ( buttonStyle == "circle" && $(el).text().length > 0 ) ) {
+                       buttonClass += " ui-btn-round";
+               }
+               if ( o.icon ) {
+                       if ( $(el).text().length > 0 ) {
+
+                               switch ( o.iconpos ) {
+                               case "right" :
+                               case "left" :
+                               case "top" :
+                               case "bottom" :
+                                       textClass += " ui-btn-text-padding-" + o.iconpos;
+                                       break;
+                               default:
+                                       textClass += " ui-btn-text-padding-left";
+                                       break;
+                               }
+
+                               innerClass += " ui-btn-hastxt";
+                       } else {
+                               if ( buttonStyle == "circle" ) {
+                                       /* style : no text, Icon only */
+                                       innerClass += " ui-btn-corner-circle";
+                               } else if ( buttonStyle == "nobg" ) {
+                                       /* style : no text, Icon only, no bg */
+                                       innerClass += " ui-btn-icon-nobg";
+                               }
+
+                               buttonClass += " ui-btn-icon_only";
+                               innerClass += " ui-btn-icon-only";
+                       }
+               } else {
+                       if ( $(el).text().length > 0 ) {
+                               innerClass += " ui-btn-hastxt";
+                       } else if ( buttonStyle == "circle" ){
+                               buttonClass += " ui-btn-round";
+                       }
+               }
+               if ( o.mini !== undefined ) {
+                       // Used to control styling in headers/footers, where buttons default to `mini` style.
+                       buttonClass += o.mini === true ? " ui-mini" : " ui-fullsize";
+               }
+
+               if ( o.inline !== undefined ) {
+                       // Used to control styling in headers/footers, where buttons default to `inline` style.
+                       buttonClass += o.inline === true ? " ui-btn-inline" : " ui-btn-block";
+               }
+
+               if ( o.icon ) {
+                       o.icon = "ui-icon-" + o.icon;
+                       o.iconpos = o.iconpos || "left";
+
+                       iconClass = "ui-icon " + o.icon;
+
+                       if ( o.iconshadow ) {
+                               iconClass += " ui-icon-shadow";
+                       }
+               }
+
+               if ( o.iconpos ) {
+                       buttonClass += " ui-btn-icon-" + o.iconpos;
+
+                       if ( o.iconpos === "notext" && !el.attr( "title" ) ) {
+                               el.attr( "title", el.getEncodedText() );
+                       }
+               }
+
+               innerClass += o.corners ? " ui-btn-corner-all" : "";
+
+               if ( o.iconpos && o.iconpos === "notext" && !el.attr( "title" ) ) {
+                       el.attr( "title", el.getEncodedText() );
+               }
+
+               if ( buttonElements ) {
+                       el.removeClass( buttonElements.bcls || "" );
+               }
+               el.removeClass( "ui-link" ).addClass( buttonClass );
+
+               buttonInner.className = innerClass;
+
+               buttonText.className = textClass;
+               if ( !buttonElements ) {
+                       buttonInner.appendChild( buttonText );
+               }
+               if ( buttonIcon ) {
+                       buttonIcon.className = iconClass;
+                       if ( !( buttonElements && buttonElements.icon ) ) {
+                               buttonIcon.innerHTML = "&#160;";
+                               buttonInner.appendChild( buttonIcon );
+                       }
+               }
+
+               while ( e.firstChild && !buttonElements ) {
+                       buttonText.appendChild( e.firstChild );
+               }
+
+               if ( !buttonElements ) {
+                       e.appendChild( buttonInner );
+               }
+
+               // Assign a structure containing the elements of this button to the elements of this button. This
+               // will allow us to recognize this as an already-enhanced button in future calls to buttonMarkup().
+               buttonElements = {
+                       bcls  : buttonClass,
+                       outer : e,
+                       inner : buttonInner,
+                       text  : buttonText,
+                       icon  : buttonIcon
+               };
+
+               $.data( e,           'buttonElements', buttonElements );
+               $.data( buttonInner, 'buttonElements', buttonElements );
+               $.data( buttonText,  'buttonElements', buttonElements );
+               if ( buttonIcon ) {
+                       $.data( buttonIcon, 'buttonElements', buttonElements );
+               }
+       }
+
+       return this;
+};
+
+$.fn.buttonMarkup.defaults = {
+       theme: "c",
+       corners: true,
+       shadow: true,
+       iconshadow: true,
+       wrapperEls: "span"
+};
+
+function closestEnabledButton( element ) {
+    var cname;
+
+    while ( element ) {
+               // Note that we check for typeof className below because the element we
+               // handed could be in an SVG DOM where className on SVG elements is defined to
+               // be of a different type (SVGAnimatedString). We only operate on HTML DOM
+               // elements, so we look for plain "string".
+        cname = ( typeof element.className === 'string' ) && ( element.className + ' ' );
+        if ( cname && cname.indexOf( "ui-btn " ) > -1 && cname.indexOf( "ui-disabled " ) < 0 ) {
+            break;
+        }
+
+        element = element.parentNode;
+    }
+
+    return element;
+}
+
+var attachEvents = function() {
+       var hoverDelay = $.mobile.buttonMarkup.hoverDelay, hov, foc;
+
+       $( document ).bind( {
+               "vmousedown vmousecancel vmouseup vmouseover vmouseout focus blur scrollstart touchend touchcancel": function( event ) {
+                       var theme,
+                               $btn = $( closestEnabledButton( event.target ) ),
+                               isTouchEvent = event.originalEvent && /^touch/.test( event.originalEvent.type ),
+                               evt = event.type;
+
+                       if ( $btn.length ) {
+                               theme = $btn.attr( "data-" + $.mobile.ns + "theme" );
+
+                               if ( evt === "vmousedown" ) {
+                                       if ( isTouchEvent ) {
+                                               // Use a short delay to determine if the user is scrolling before highlighting
+                                               hov = setTimeout( function() {
+                                                       $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-down-" + theme );
+                                               }, hoverDelay );
+                                       } else {
+                                               $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-down-" + theme );
+                                       }
+                               } else if ( evt === "vmousecancel" || evt === "vmouseup" || evt === "touchend" || evt === "touchcancel" ) {
+                                       $btn.removeClass( "ui-btn-down-" + theme ).addClass( "ui-btn-up-" + theme );
+                               } else if ( evt === "vmouseover" || evt === "focus" ) {
+                                       if ( isTouchEvent ) {
+                                               // Use a short delay to determine if the user is scrolling before highlighting
+                                               foc = setTimeout( function() {
+                                                       $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-hover-" + theme );
+                                               }, hoverDelay );
+                                       } else {
+                                               $btn.removeClass( "ui-btn-up-" + theme ).addClass( "ui-btn-hover-" + theme );
+                                       }
+                               } else if ( evt === "vmouseout" || evt === "blur" || evt === "scrollstart" ) {
+                                       $btn.removeClass( "ui-btn-hover-" + theme  + " ui-btn-down-" + theme ).addClass( "ui-btn-up-" + theme );
+                                       if ( hov ) {
+                                               clearTimeout( hov );
+                                       }
+                                       if ( foc ) {
+                                               clearTimeout( foc );
+                                       }
+                               }
+                       }
+               },
+               "focusin focus": function( event ) {
+                       $( closestEnabledButton( event.target ) ).addClass( $.mobile.focusClass );
+               },
+               "focusout blur": function( event ) {
+                       $( closestEnabledButton( event.target ) ).removeClass( $.mobile.focusClass );
+               }
+       });
+
+       attachEvents = null;
+};
+
+//links in bars, or those with  data-role become buttons
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ) {
+
+       $( ":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmData(role='controlgroup') > a", e.target )
+               .jqmEnhanceable()
+               .not( "button, input, .ui-btn, :jqmData(role='none'), :jqmData(role='nojs')" )
+               .buttonMarkup();
+});
+
+})( jQuery );
+
+
+(function( $, undefined ) {
+
+$.widget( "mobile.collapsible", $.mobile.widget, {
+       options: {
+               expandCueText: " click to expand contents",
+               collapseCueText: " click to collapse contents",
+               collapsed: true,
+               heading: "h1,h2,h3,h4,h5,h6,legend",
+               theme: null,
+               contentTheme: null,
+               inset: true,
+               mini: false,
+               initSelector: ":jqmData(role='collapsible')"
+       },
+       _create: function() {
+
+               var $el = this.element,
+                       o = this.options,
+                       collapsible = $el.addClass( "ui-collapsible" ),
+                       collapsibleHeading = $el.children( o.heading ).first(),
+                       collapsedIcon = $el.jqmData( "collapsed-icon" ) || o.collapsedIcon,
+                       expandedIcon = $el.jqmData( "expanded-icon" ) || o.expandedIcon,
+                       collapsibleContent = collapsible.wrapInner( "<div class='ui-collapsible-content'></div>" ).children( ".ui-collapsible-content" ),
+                       collapsibleSet = $el.closest( ":jqmData(role='collapsible-set')" ).addClass( "ui-collapsible-set" );
+
+               // Replace collapsibleHeading if it's a legend
+               if ( collapsibleHeading.is( "legend" ) ) {
+                       collapsibleHeading = $( "<div role='heading'>"+ collapsibleHeading.html() +"</div>" ).insertBefore( collapsibleHeading );
+                       collapsibleHeading.next().remove();
+               }
+
+               // If we are in a collapsible set
+               if ( collapsibleSet.length ) {
+                       // Inherit the theme from collapsible-set
+                       if ( !o.theme ) {
+                               o.theme = collapsibleSet.jqmData( "theme" ) || $.mobile.getInheritedTheme( collapsibleSet, "c" );
+                       }
+                       // Inherit the content-theme from collapsible-set
+                       if ( !o.contentTheme ) {
+                               o.contentTheme = collapsibleSet.jqmData( "content-theme" );
+                       }
+
+                       // Get the preference for collapsed icon in the set
+                       if ( !o.collapsedIcon ) {
+                               o.collapsedIcon = collapsibleSet.jqmData( "collapsed-icon" );
+                       }
+                       // Get the preference for expanded icon in the set
+                       if ( !o.expandedIcon ) {
+                               o.expandedIcon = collapsibleSet.jqmData( "expanded-icon" );
+                       }
+                       // Gets the preference icon position in the set
+                       if ( !o.iconPos ) {
+                               o.iconPos = collapsibleSet.jqmData( "iconpos" );
+                       }
+                       // Inherit the preference for inset from collapsible-set or set the default value to ensure equalty within a set
+                       if ( collapsibleSet.jqmData( "inset" ) !== undefined ) {
+                               o.inset = collapsibleSet.jqmData( "inset" );
+                       } else {
+                               o.inset = true;
+                       }
+                       // Gets the preference for mini in the set
+                       if ( !o.mini ) {
+                               o.mini = collapsibleSet.jqmData( "mini" );
+                       }
+               } else {
+                       // get inherited theme if not a set and no theme has been set
+                       if ( !o.theme ) {
+                               o.theme = $.mobile.getInheritedTheme( $el, "c" );
+                       }
+               }
+               
+               if ( !!o.inset ) {
+                       collapsible.addClass( "ui-collapsible-inset" );
+               }
+               
+               collapsibleContent.addClass( ( o.contentTheme ) ? ( "ui-body-" + o.contentTheme ) : "");
+
+               collapsedIcon = $el.jqmData( "collapsed-icon" ) || o.collapsedIcon || "plus";
+               expandedIcon = $el.jqmData( "expanded-icon" ) || o.expandedIcon || "minus";
+
+               collapsibleHeading
+                       //drop heading in before content
+                       .insertBefore( collapsibleContent )
+                       //modify markup & attributes
+                       .addClass( "ui-collapsible-heading" )
+                       .append( "<span class='ui-collapsible-heading-status'></span>" )
+                       .wrapInner( "<a href='#' class='ui-collapsible-heading-toggle'></a>" )
+                       .find( "a" )
+                               .first()
+                               .buttonMarkup({
+                                       shadow: false,
+                                       corners: false,
+                                       iconpos: $el.jqmData( "iconpos" ) || o.iconPos || "left",
+                                       icon: collapsedIcon,
+                                       mini: o.mini,
+                                       theme: o.theme
+                               });
+
+               if ( !!o.inset ) {                              
+                       collapsibleHeading
+                               .find( "a" ).first().add( ".ui-btn-inner", $el )
+                                       .addClass( "ui-corner-top ui-corner-bottom" );
+               }
+
+               //events
+               collapsible
+                       .bind( "expand collapse", function( event ) {
+                               if ( !event.isDefaultPrevented() ) {
+                                       var $this = $( this ),
+                                               isCollapse = ( event.type === "collapse" ),
+                                               contentTheme = o.contentTheme;
+
+                                       event.preventDefault();
+
+                                       // Custom event callback
+                                       if ( o.customEventHandler ) { o.customEventHandler.call( this, isCollapse ) };
+
+                                       collapsibleHeading
+                                               .toggleClass( "ui-collapsible-heading-collapsed", isCollapse )
+                                               .find( ".ui-collapsible-heading-status" )
+                                                       .text( isCollapse ? o.expandCueText : o.collapseCueText )
+                                               .end()
+                                               .find( ".ui-icon" )
+                                                       .toggleClass( "ui-icon-" + expandedIcon, !isCollapse )
+                                                       // logic or cause same icon for expanded/collapsed state would remove the ui-icon-class
+                                                       .toggleClass( "ui-icon-" + collapsedIcon, ( isCollapse || expandedIcon === collapsedIcon ) )
+                                               .end()
+                                               .find( "a" ).first().removeClass( $.mobile.activeBtnClass );
+
+                                       $this.toggleClass( "ui-collapsible-collapsed", isCollapse );
+                                       collapsibleContent.toggleClass( "ui-collapsible-content-collapsed", isCollapse ).attr( "aria-hidden", isCollapse );
+
+                                       if ( contentTheme && !!o.inset && ( !collapsibleSet.length || collapsible.jqmData( "collapsible-last" ) ) ) {
+                                               collapsibleHeading
+                                                       .find( "a" ).first().add( collapsibleHeading.find( ".ui-btn-inner" ) )
+                                                       .toggleClass( "ui-corner-bottom", isCollapse );
+                                               collapsibleContent.toggleClass( "ui-corner-bottom", !isCollapse );
+                                       }
+                                       collapsibleContent.trigger( "updatelayout" );
+                               }
+                       })
+                       .trigger( o.collapsed ? "collapse" : "expand" );
+
+               collapsibleHeading
+                       .bind( "tap", function( event ) {
+                               collapsibleHeading.find( "a" ).first().addClass( $.mobile.activeBtnClass );
+                       })
+                       .bind( "click", function( event ) {
+
+                               var type = collapsibleHeading.is( ".ui-collapsible-heading-collapsed" ) ? "expand" : "collapse";
+
+                               collapsible.trigger( type );
+
+                               event.preventDefault();
+                               event.stopPropagation();
+                       });
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ) {
+       $.mobile.collapsible.prototype.enhanceWithin( e.target );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.collapsibleset", $.mobile.widget, {
+       options: {
+               initSelector: ":jqmData(role='collapsible-set')"
+       },
+       _create: function() {
+               var $el = this.element.addClass( "ui-collapsible-set" ),
+                       o = this.options;
+
+               // Inherit the theme from collapsible-set
+               if ( !o.theme ) {
+                       o.theme = $.mobile.getInheritedTheme( $el, "c" );
+               }
+               // Inherit the content-theme from collapsible-set
+               if ( !o.contentTheme ) {
+                       o.contentTheme = $el.jqmData( "content-theme" );
+               }
+
+               if ( $el.jqmData( "inset" ) !== undefined ) {
+                       o.inset = $el.jqmData( "inset" );
+               }
+               o.inset = o.inset !== undefined ? o.inset : true;
+
+               // Initialize the collapsible set if it's not already initialized
+               if ( !$el.jqmData( "collapsiblebound" ) ) {
+                       $el
+                               .jqmData( "collapsiblebound", true )
+                               .bind( "expand collapse", function( event ) {
+                                       var isCollapse = ( event.type === "collapse" ),
+                                               collapsible = $( event.target ).closest( ".ui-collapsible" ),
+                                               widget = collapsible.data( "collapsible" );
+                                       if ( collapsible.jqmData( "collapsible-last" ) && !!o.inset ) {
+                                               collapsible.find( ".ui-collapsible-heading" ).first()
+                                                       .find( "a" ).first()
+                                                       .toggleClass( "ui-corner-bottom", isCollapse )
+                                                       .find( ".ui-btn-inner" )
+                                                       .toggleClass( "ui-corner-bottom", isCollapse );
+                                               collapsible.find( ".ui-collapsible-content" ).toggleClass( "ui-corner-bottom", !isCollapse );
+                                       }
+                               })
+                               .bind( "expand", function( event ) {
+                                       var closestCollapsible = $( event.target )
+                                               .closest( ".ui-collapsible" );
+                                       if ( closestCollapsible.parent().is( ":jqmData(role='collapsible-set')" ) ) {
+                                               closestCollapsible
+                                                       .siblings( ".ui-collapsible" )
+                                                       .trigger( "collapse" );
+                                       }
+                               });
+               }
+       },
+
+       _init: function() {
+               var $el = this.element,
+                       collapsiblesInSet = $el.children( ":jqmData(role='collapsible')" ),
+                       expanded = collapsiblesInSet.filter( ":jqmData(collapsed='false')" );
+               this.refresh();
+
+               // Because the corners are handled by the collapsible itself and the default state is collapsed
+               // That was causing https://github.com/jquery/jquery-mobile/issues/4116
+               expanded.trigger( "expand" );
+       },
+
+       refresh: function() {
+               var $el = this.element,
+                       o = this.options,
+                       collapsiblesInSet = $el.children( ":jqmData(role='collapsible')" );
+
+               $.mobile.collapsible.prototype.enhance( collapsiblesInSet.not( ".ui-collapsible" ) );
+
+               // clean up borders
+               if ( !!o.inset ) {
+                       collapsiblesInSet.each(function() {
+                               $( this ).jqmRemoveData( "collapsible-last" )
+                                       .find( ".ui-collapsible-heading" )
+                                       .find( "a" ).first()
+                                       .removeClass( "ui-corner-top ui-corner-bottom" )
+                                       .find( ".ui-btn-inner" )
+                                       .removeClass( "ui-corner-top ui-corner-bottom" );
+                       });
+
+                       collapsiblesInSet.first()
+                               .find( "a" )
+                                       .first()
+                                       .addClass( "ui-corner-top" )
+                                       .find( ".ui-btn-inner" )
+                                               .addClass( "ui-corner-top" );
+       
+                       collapsiblesInSet.last()
+                               .jqmData( "collapsible-last", true )
+                               .find( "a" )
+                                       .first()
+                                       .addClass( "ui-corner-bottom" )
+                                       .find( ".ui-btn-inner" )
+                                               .addClass( "ui-corner-bottom" );
+               }
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ) {
+       $.mobile.collapsibleset.prototype.enhanceWithin( e.target );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.navbar", $.mobile.widget, {
+       options: {
+               iconpos: "top",
+               grid: null,
+               initSelector: ":jqmData(role='navbar')"
+       },
+
+       _create: function() {
+
+               var $navbar = this.element,
+                       $navbtns = $navbar.find( "a" ),
+                       iconpos = $navbtns.filter( ":jqmData(icon)" ).length ?
+                                                                       this.options.iconpos : undefined;
+
+               $navbar.addClass( "ui-navbar ui-mini" )
+                       .attr( "role", "navigation" )
+                       .find( "ul" )
+                       .jqmEnhanceable()
+                       .grid({ grid: this.options.grid });
+
+               $navbtns.buttonMarkup({
+                       corners:        false,
+                       shadow:         false,
+                       inline:     true,
+                       iconpos:        iconpos
+               });
+
+               $navbar.delegate( "a", "vclick", function( event ) {
+                       if ( !$(event.target).hasClass( "ui-disabled" ) ) {
+                               $navbtns.removeClass( $.mobile.activeBtnClass );
+                               $( this ).addClass( $.mobile.activeBtnClass );
+                       }
+               });
+
+               // Buttons in the navbar with ui-state-persist class should regain their active state before page show
+               $navbar.closest( ".ui-page" ).bind( "pagebeforeshow", function() {
+                       $navbtns.filter( ".ui-state-persist" ).addClass( $.mobile.activeBtnClass );
+               });
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ) {
+       $.mobile.navbar.prototype.enhanceWithin( e.target );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+//Keeps track of the number of lists per page UID
+//This allows support for multiple nested list in the same page
+//https://github.com/jquery/jquery-mobile/issues/1617
+var listCountPerPage = {};
+
+$.widget( "mobile.listview", $.mobile.widget, {
+
+       options: {
+               theme: null,
+               countTheme: "c",
+               headerTheme: "b",
+               dividerTheme: "b",
+               splitIcon: "arrow-r",
+               splitTheme: "b",
+               inset: false,
+               initSelector: ":jqmData(role='listview')"
+       },
+
+       _create: function() {
+               var t = this,
+                       listviewClasses = "";
+
+               listviewClasses += t.options.inset ? " ui-listview-inset ui-corner-all ui-shadow " : "";
+
+               // create listview markup
+               t.element.addClass(function( i, orig ) {
+                       return orig + " ui-listview " + listviewClasses;
+               });
+
+               t.refresh( true );
+       },
+
+       _removeCorners: function( li, which ) {
+               var top = "ui-corner-top ui-corner-tr ui-corner-tl",
+                       bot = "ui-corner-bottom ui-corner-br ui-corner-bl";
+
+               li = li.add( li.find( ".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb" ) );
+
+               if ( which === "top" ) {
+                       li.removeClass( top );
+               } else if ( which === "bottom" ) {
+                       li.removeClass( bot );
+               } else {
+                       li.removeClass( top + " " + bot );
+               }
+       },
+
+       _refreshCorners: function( create ) {
+               var $li,
+                       $visibleli,
+                       $topli,
+                       $bottomli;
+
+               $li = this.element.children( "li" );
+               // At create time and when autodividers calls refresh the li are not visible yet so we need to rely on .ui-screen-hidden
+               $visibleli = create || $li.filter( ":visible" ).length === 0 ? $li.not( ".ui-screen-hidden" ) : $li.filter( ":visible" );
+
+               // ui-li-last is used for setting border-bottom on the last li          
+               $li.filter( ".ui-li-last" ).removeClass( "ui-li-last" );
+                                       
+               if ( this.options.inset ) {
+                       this._removeCorners( $li );
+
+                       // Select the first visible li element
+                       $topli = $visibleli.first()
+                               .addClass( "ui-corner-top" );
+
+                       $topli.add( $topli.find( ".ui-btn-inner" )
+                               .not( ".ui-li-link-alt span:first-child" ) )
+                                       .addClass( "ui-corner-top" )
+                               .end()
+                               .find( ".ui-li-link-alt, .ui-li-link-alt span:first-child" )
+                                       .addClass( "ui-corner-tr" )
+                               .end()
+                               .find( ".ui-li-thumb" )
+                                       .not( ".ui-li-icon" )
+                                       .addClass( "ui-corner-tl" );
+
+                       // Select the last visible li element
+                       $bottomli = $visibleli.last()
+                               .addClass( "ui-corner-bottom ui-li-last" );
+
+                       $bottomli.add( $bottomli.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" );
+               } else {
+                       $visibleli.last().addClass( "ui-li-last" );
+               }
+               if ( !create ) {
+                       this.element.trigger( "updatelayout" );
+               }
+       },
+
+       // This is a generic utility method for finding the first
+       // node with a given nodeName. It uses basic DOM traversal
+       // to be fast and is meant to be a substitute for simple
+       // $.fn.closest() and $.fn.children() calls on a single
+       // element. Note that callers must pass both the lowerCase
+       // and upperCase version of the nodeName they are looking for.
+       // The main reason for this is that this function will be
+       // called many times and we want to avoid having to lowercase
+       // the nodeName from the element every time to ensure we have
+       // a match. Note that this function lives here for now, but may
+       // be moved into $.mobile if other components need a similar method.
+       _findFirstElementByTagName: function( ele, nextProp, lcName, ucName ) {
+               var dict = {};
+               dict[ lcName ] = dict[ ucName ] = true;
+               while ( ele ) {
+                       if ( dict[ ele.nodeName ] ) {
+                               return ele;
+                       }
+                       ele = ele[ nextProp ];
+               }
+               return null;
+       },
+       _getChildrenByTagName: function( ele, lcName, ucName ) {
+               var results = [],
+                       dict = {};
+               dict[ lcName ] = dict[ ucName ] = true;
+               ele = ele.firstChild;
+               while ( ele ) {
+                       if ( dict[ ele.nodeName ] ) {
+                               results.push( ele );
+                       }
+                       ele = ele.nextSibling;
+               }
+               return $( results );
+       },
+
+       _addThumbClasses: function( containers ) {
+               var i, img, len = containers.length;
+               for ( i = 0; i < len; i++ ) {
+                       img = $( this._findFirstElementByTagName( containers[ i ].firstChild, "nextSibling", "img", "IMG" ) );
+                       if ( img.length ) {
+                               img.addClass( "ui-li-thumb" );
+                               $( this._findFirstElementByTagName( img[ 0 ].parentNode, "parentNode", "li", "LI" ) ).addClass( img.is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
+                       }
+               }
+       },
+
+       _addCheckboxRadioClasses: function( containers )
+       {
+               var i, inputAttr, len = containers.length;
+               for ( i = 0; i < len; i++ ) {
+                       inputAttr = $( containers[ i ] ).find( "input" );
+                       if ( inputAttr.attr( "type" ) == "checkbox" ) {
+                               $( containers[ i ] ).addClass( "ui-li-has-checkbox" );
+                       } else if ( inputAttr.attr( "type" ) == "radio" ) {
+                               $( containers[ i ] ).addClass( "ui-li-has-radio" );
+                       }
+               }
+       },
+
+       _addRightBtnClasses: function( containers )
+       {
+               var i, btnAttr, len = containers.length;
+               for ( i = 0; i < len; i++ ) {
+                       btnAttr = $( containers[ i ] ).find( ":jqmData(role='button')" ) || ( $( containers[ i ] ).find( "input" ).attr( "type" ) == "button" );
+                       if ( btnAttr.length ) {
+                               if ( btnAttr.jqmData( "style" ) == "circle" )  {
+                                       $( containers[ i ] ).addClass( "ui-li-has-right-circle-btn" );
+                               } else {
+                                       $( containers[ i ] ).addClass( "ui-li-has-right-btn" );
+                               }
+                       }
+               }
+       },
+
+       refresh: function( create ) {
+               this.parentPage = this.element.closest( ".ui-page" );
+               this._createSubPages();
+
+               var o = this.options,
+                       $list = this.element,
+                       self = this,
+                       dividertheme = $list.jqmData( "dividertheme" ) || o.dividerTheme,
+                       listsplittheme = $list.jqmData( "splittheme" ),
+                       listspliticon = $list.jqmData( "spliticon" ),
+                       li = this._getChildrenByTagName( $list[ 0 ], "li", "LI" ),
+                       ol = !!$.nodeName( $list[ 0 ], "ol" ),
+                       jsCount = !$.support.cssPseudoElement,
+                       start = $list.attr( "start" ),
+                       itemClassDict = {},
+                       item, itemClass, itemTheme,
+                       a, last, splittheme, counter, startCount, newStartCount, countParent, icon, imgParents, img, linkIcon;
+
+               if ( ol && jsCount ) {
+                       $list.find( ".ui-li-dec" ).remove();
+               }
+
+               if ( ol ) {     
+                       // Check if a start attribute has been set while taking a value of 0 into account
+                       if ( start || start === 0 ) {
+                               if ( !jsCount ) {
+                                       startCount = parseFloat( start ) - 1;
+                                       $list.css( "counter-reset", "listnumbering " + startCount );
+                               } else {
+                                       counter = parseFloat( start );
+                               }
+                       } else if ( jsCount ) {
+                                       counter = 1;
+                       }       
+               }
+
+               if ( !o.theme ) {
+                       o.theme = $.mobile.getInheritedTheme( this.element, "c" );
+               }
+
+               for ( var pos = 0, numli = li.length; pos < numli; pos++ ) {
+                       item = li.eq( pos );
+                       itemClass = "ui-li";
+
+                       // If we're creating the element, we update it regardless
+                       if ( create || !item.hasClass( "ui-li" ) ) {
+                               itemTheme = item.jqmData( "theme" ) || o.theme;
+                               a = this._getChildrenByTagName( item[ 0 ], "a", "A" );
+                               var isDivider = ( item.jqmData( "role" ) === "list-divider" );
+
+                               if ( a.length && !isDivider ) {
+                                       icon = item.jqmData( "icon" );
+
+                                       /* Remove auto populated right-arrow button. */
+                                       if ( icon === undefined ) {
+                                               icon = false;
+                                       }
+
+                                       item.buttonMarkup({
+                                               wrapperEls: "div",
+                                               shadow: false,
+                                               corners: false,
+                                               iconpos: "right",
+                                               icon: a.length > 1 || icon === false ? false : icon || "arrow-r",
+                                               theme: itemTheme
+                                       });
+
+                                       if ( ( icon !== false ) && ( a.length === 1 ) ) {
+                                               item.addClass( "ui-li-has-arrow" );
+                                       }
+
+                                       a.first().removeClass( "ui-link" ).addClass( "ui-link-inherit" );
+
+                                       if ( a.length > 1 ) {
+                                               itemClass += " ui-li-has-alt";
+
+                                               last = a.last();
+                                               splittheme = listsplittheme || last.jqmData( "theme" ) || o.splitTheme;
+                                               linkIcon = last.jqmData( "icon" );
+
+                                               last.appendTo( item )
+                                                       .attr( "title", last.getEncodedText() )
+                                                       .addClass( "ui-li-link-alt" )
+                                                       .empty()
+                                                       .buttonMarkup({
+                                                               shadow: false,
+                                                               corners: false,
+                                                               theme: itemTheme,
+                                                               icon: false,
+                                                               iconpos: "notext"
+                                                       })
+                                                       .find( ".ui-btn-inner" )
+                                                               .append(
+                                                                       $( document.createElement( "span" ) ).buttonMarkup({
+                                                                               shadow: true,
+                                                                               corners: true,
+                                                                               theme: splittheme,
+                                                                               iconpos: "notext",
+                                                                               // link icon overrides list item icon overrides ul element overrides options
+                                                                               icon: linkIcon || icon || listspliticon || o.splitIcon
+                                                                       })
+                                                               );
+                                       }
+                               } else if ( isDivider ) {
+
+                                       itemClass += " ui-li-divider ui-bar-" + dividertheme;
+                                       item.attr( "role", "heading" );
+
+                                       if ( ol ) {     
+                                               //reset counter when a divider heading is encountered
+                                               if ( start || start === 0 ) {
+                                                       if ( !jsCount ) {
+                                                               newStartCount = parseFloat( start ) - 1;
+                                                               item.css( "counter-reset", "listnumbering " + newStartCount );
+                                                       } else {
+                                                               counter = parseFloat( start );
+                                                       }
+                                               } else if ( jsCount ) {
+                                                               counter = 1;
+                                               }       
+                                       }
+                               
+                               } else {
+                                       itemClass += " ui-li-static ui-btn-up-" + itemTheme;
+                               }
+                       }
+
+                       if ( ol && jsCount && itemClass.indexOf( "ui-li-divider" ) < 0 ) {
+                               countParent = itemClass.indexOf( "ui-li-static" ) > 0 ? item : item.find( ".ui-link-inherit" );
+
+                               countParent.addClass( "ui-li-jsnumbering" )
+                                       .prepend( "<span class='ui-li-dec'>" + ( counter++ ) + ". </span>" );
+                       }
+
+                       // Instead of setting item class directly on the list item and its
+                       // btn-inner at this point in time, push the item into a dictionary
+                       // that tells us what class to set on it so we can do this after this
+                       // processing loop is finished.
+
+                       if ( !itemClassDict[ itemClass ] ) {
+                               itemClassDict[ itemClass ] = [];
+                       }
+
+                       itemClassDict[ itemClass ].push( item[ 0 ] );
+               }
+
+               // Set the appropriate listview item classes on each list item
+               // and their btn-inner elements. The main reason we didn't do this
+               // in the for-loop above is because we can eliminate per-item function overhead
+               // by calling addClass() and children() once or twice afterwards. This
+               // can give us a significant boost on platforms like WP7.5.
+
+               for ( itemClass in itemClassDict ) {
+                       $( itemClassDict[ itemClass ] ).addClass( itemClass ).children( ".ui-btn-inner" ).addClass( itemClass );
+               }
+
+               $list.find( "h1, h2, h3, h4, h5, h6" ).addClass( "ui-li-heading" )
+                       .end()
+
+                       .find( "p, dl" ).addClass( "ui-li-desc" )
+                       .end()
+
+                       .find( ".ui-li-aside" ).each(function() {
+                                       var $this = $( this );
+                                       $this.prependTo( $this.parent() ); //shift aside to front for css float
+                               })
+                       .end()
+
+                       .find( ".ui-li-count" ).each(function() {
+                                       $( this ).closest( "li" ).addClass( "ui-li-has-count" );
+                               }).addClass( "ui-btn-up-" + ( $list.jqmData( "counttheme" ) || this.options.countTheme) + " ui-btn-corner-all" );
+
+               // The idea here is to look at the first image in the list item
+               // itself, and any .ui-link-inherit element it may contain, so we
+               // can place the appropriate classes on the image and list item.
+               // Note that we used to use something like:
+               //
+               //    li.find(">img:eq(0), .ui-link-inherit>img:eq(0)").each( ... );
+               //
+               // But executing a find() like that on Windows Phone 7.5 took a
+               // really long time. Walking things manually with the code below
+               // allows the 400 listview item page to load in about 3 seconds as
+               // opposed to 30 seconds.
+
+               this._addThumbClasses( li );
+               this._addThumbClasses( $list.find( ".ui-link-inherit" ) );
+
+               this._addCheckboxRadioClasses( li );
+               this._addCheckboxRadioClasses( $list.find( ".ui-link-inherit" ) );
+
+               this._addRightBtnClasses( li );
+               this._addRightBtnClasses( $list.find( ".ui-link-inherit" ) );
+
+               this._refreshCorners( create );
+
+    // autodividers binds to this to redraw dividers after the listview refresh
+               this._trigger( "afterrefresh" );
+       },
+
+       //create a string for ID/subpage url creation
+       _idStringEscape: function( str ) {
+               return str.replace(/[^a-zA-Z0-9]/g, '-');
+       },
+
+       _createSubPages: function() {
+               var parentList = this.element,
+                       parentPage = parentList.closest( ".ui-page" ),
+                       parentUrl = parentPage.jqmData( "url" ),
+                       parentId = parentUrl || parentPage[ 0 ][ $.expando ],
+                       parentListId = parentList.attr( "id" ),
+                       o = this.options,
+                       dns = "data-" + $.mobile.ns,
+                       self = this,
+                       persistentFooterID = parentPage.find( ":jqmData(role='footer')" ).jqmData( "id" ),
+                       hasSubPages;
+
+               if ( typeof listCountPerPage[ parentId ] === "undefined" ) {
+                       listCountPerPage[ parentId ] = -1;
+               }
+
+               parentListId = parentListId || ++listCountPerPage[ parentId ];
+
+               $( parentList.find( "li>ul, li>ol" ).toArray().reverse() ).each(function( i ) {
+                       var self = this,
+                               list = $( this ),
+                               listId = list.attr( "id" ) || parentListId + "-" + i,
+                               parent = list.parent(),
+                               nodeElsFull = $( list.prevAll().toArray().reverse() ),
+                               nodeEls = nodeElsFull.length ? nodeElsFull : $( "<span>" + $.trim(parent.contents()[ 0 ].nodeValue) + "</span>" ),
+                               title = nodeEls.first().getEncodedText(),//url limits to first 30 chars of text
+                               id = ( parentUrl || "" ) + "&" + $.mobile.subPageUrlKey + "=" + listId,
+                               theme = list.jqmData( "theme" ) || o.theme,
+                               countTheme = list.jqmData( "counttheme" ) || parentList.jqmData( "counttheme" ) || o.countTheme,
+                               newPage, anchor;
+
+                       //define hasSubPages for use in later removal
+                       hasSubPages = true;
+
+                       newPage = list.detach()
+                                               .wrap( "<div " + dns + "role='page' " + dns + "url='" + id + "' " + dns + "theme='" + theme + "' " + dns + "count-theme='" + countTheme + "'><div " + dns + "role='content'></div></div>" )
+                                               .parent()
+                                                       .before( "<div " + dns + "role='header' " + dns + "theme='" + o.headerTheme + "'><div class='ui-title'>" + title + "</div></div>" )
+                                                       .after( persistentFooterID ? $( "<div " + dns + "role='footer' " + dns + "id='"+ persistentFooterID +"'>" ) : "" )
+                                                       .parent()
+                                                               .appendTo( $.mobile.pageContainer );
+
+                       newPage.page();
+
+                       anchor = parent.find( 'a:first' );
+
+                       if ( !anchor.length ) {
+                               anchor = $( "<a/>" ).html( nodeEls || title ).prependTo( parent.empty() );
+                       }
+
+                       anchor.attr( "href", "#" + id );
+
+               }).listview();
+
+               // on pagehide, remove any nested pages along with the parent page, as long as they aren't active
+               // and aren't embedded
+               if ( hasSubPages &&
+                       parentPage.is( ":jqmData(external-page='true')" ) &&
+                       parentPage.data( "page" ).options.domCache === false ) {
+
+                       var newRemove = function( e, ui ) {
+                               var nextPage = ui.nextPage, npURL,
+                                       prEvent = new $.Event( "pageremove" );
+
+                               if ( ui.nextPage ) {
+                                       npURL = nextPage.jqmData( "url" );
+                                       if ( npURL.indexOf( parentUrl + "&" + $.mobile.subPageUrlKey ) !== 0 ) {
+                                               self.childPages().remove();
+                                               parentPage.trigger( prEvent );
+                                               if ( !prEvent.isDefaultPrevented() ) {
+                                                       parentPage.removeWithDependents();
+                                               }
+                                       }
+                               }
+                       };
+
+                       // unbind the original page remove and replace with our specialized version
+                       parentPage
+                               .unbind( "pagehide.remove" )
+                               .bind( "pagehide.remove", newRemove);
+               }
+       },
+
+       addItem : function( listitem , idx ) {
+               var $item = $(listitem),
+                       $li,
+                       _self = this;
+
+               $li = _self.element.children( 'li' );
+               $item.css( { 'opacity' : 0,
+                                        'display' : 'none' } );
+               if( $li.length == 0
+                       || $li.length <= idx)
+               {
+                       $( _self.element ).append( $item );
+               } else {
+                       $( $li.get( idx ) ).before( $item );
+               }
+               $(_self.element).trigger("create")
+                       .listview( 'refresh' );
+
+               $item.css( 'min-height' , '0px' );
+
+               $item.slideDown( 'fast' , function( ){
+                       $item.addClass("addli");
+                       $item.css( { 'opacity' : 1 } );
+               } );
+       },
+
+       removeItem : function( idx ) {
+               var $item,
+                       $li,
+                       _self = this;
+
+               $li = _self.element.children( 'li' );
+               if( $li.length <= 0 ||
+                       $li.length < idx ) {
+                       return ;
+               }
+               $item = $( $li.get( idx ) );
+               $item.addClass("removeli");
+               $item.slideUp('normal',
+                       function( ) {
+                       $(this).remove();
+               });
+       },
+
+       // TODO sort out a better way to track sub pages of the listview this is brittle
+       childPages: function() {
+               var parentUrl = this.parentPage.jqmData( "url" );
+
+               return $( ":jqmData(url^='"+  parentUrl + "&" + $.mobile.subPageUrlKey + "')" );
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ) {
+       $.mobile.listview.prototype.enhanceWithin( e.target );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.mobile.listview.prototype.options.autodividers = false;
+$.mobile.listview.prototype.options.autodividersSelector = function( elt ) {
+       // look for the text in the given element
+       var text = elt.text() || null;
+
+       if ( !text ) {
+               return null;
+       }
+
+       // create the text for the divider (first uppercased letter)
+       text = text.trim().slice( 0, 1 ).toUpperCase();
+
+       return text;
+};
+
+$( document ).delegate( "ul,ol", "listviewcreate", function() {
+
+       var list = $( this ),
+                       listview = list.data( "listview" );
+
+       if ( !listview || !listview.options.autodividers ) {
+               return;
+       }
+
+       var replaceDividers = function () {
+               list.find( "li:jqmData(role='list-divider')" ).remove();
+
+               var lis = list.find( 'li' ),
+                       lastDividerText = null, li, dividerText;
+
+               for ( var i = 0; i < lis.length ; i++ ) {
+                       li = lis[i];
+                       dividerText = listview.options.autodividersSelector( $( li ) );
+
+                       if ( dividerText && lastDividerText !== dividerText ) {
+                               var divider = document.createElement( 'li' );
+                               divider.appendChild( document.createTextNode( dividerText ) );
+                               divider.setAttribute( 'data-' + $.mobile.ns + 'role', 'list-divider' );
+                               li.parentNode.insertBefore( divider, li );
+                       }
+
+                       lastDividerText = dividerText;
+               }
+       };
+
+       var afterListviewRefresh = function () {
+               list.unbind( 'listviewafterrefresh', afterListviewRefresh );
+               replaceDividers();
+               listview.refresh();
+               list.bind( 'listviewafterrefresh', afterListviewRefresh );
+       };
+
+       afterListviewRefresh();
+});
+
+})( jQuery );
+
+/*
+* "checkboxradio" plugin
+*/
+
+(function( $, undefined ) {
+
+$.widget( "mobile.checkboxradio", $.mobile.widget, {
+       options: {
+               theme: null,
+               initSelector: "input[type='checkbox'],input[type='radio']"
+       },
+       _create: function() {
+               var self = this,
+                       input = this.element,
+                       inheritAttr = function( input, dataAttr ) {
+                               return input.jqmData( dataAttr ) || input.closest( "form, fieldset" ).jqmData( dataAttr );
+                       },
+                       // NOTE: Windows Phone could not find the label through a selector
+                       // filter works though.
+                       parentLabel = $( input ).closest( "label" ),
+                       label = parentLabel.length ? parentLabel : ( input[0].id ? $( input ).closest( "form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')" ).find( "label" ).filter( "[for='" + input[0].id + "']" ) : [ ] ),
+                       inputtype = input[0].type,
+                       mini = inheritAttr( input, "mini" ),
+                       checkedState = inputtype + "-on",
+                       uncheckedState = inputtype + "-off",
+                       icon = input.parents( ":jqmData(type='horizontal')" ).length ? undefined : uncheckedState,
+                       iconpos = inheritAttr( input, "iconpos" ),
+                       activeBtn = icon ? "" : " " + $.mobile.activeBtnClass,
+                       checkedClass = "ui-" + checkedState + activeBtn,
+                       uncheckedClass = "ui-" + uncheckedState,
+                       checkedicon = "ui-icon-" + checkedState,
+                       uncheckedicon = "ui-icon-" + uncheckedState;
+
+               if ( inputtype !== "checkbox" && inputtype !== "radio" ) {
+                       return;
+               }
+
+               // Support fake label
+               if ( label.length == 0 ) {
+                       label = $( "<label for='" + input[ 0 ].id  +
+                               "'></label>" );
+               }
+
+               // Expose for other methods
+               $.extend( this, {
+                       label: label,
+                       inputtype: inputtype,
+                       checkedClass: checkedClass,
+                       uncheckedClass: uncheckedClass,
+                       checkedicon: checkedicon,
+                       uncheckedicon: uncheckedicon
+               });
+
+               // If there's no selected theme check the data attr
+               if ( !this.options.theme ) {
+                       this.options.theme = $.mobile.getInheritedTheme( this.element, "c" );
+               }
+
+               label.buttonMarkup({
+                       theme: this.options.theme,
+                       icon: icon,
+                       shadow: false,
+                       mini: mini,
+                       iconpos: iconpos
+               });
+
+               // Wrap the input + label in a div
+               var wrapper = document.createElement('div');
+               wrapper.className = 'ui-' + inputtype;
+
+               if ( input.hasClass( "favorite" ) ) {
+                       wrapper.className += ' favorite';
+               }
+
+               input.add( label ).wrapAll( wrapper );
+
+               label.bind({
+                       vmouseover: function( event ) {
+                               if ( $( this ).parent().is( ".ui-disabled" ) ) {
+                                       event.stopPropagation();
+                               }
+                       },
+
+                       vclick: function( event ) {
+                               if ( input.is( ":disabled" ) ) {
+                                       event.preventDefault();
+                                       return;
+                               }
+
+                               self._cacheVals();
+
+                               input.prop( "checked", inputtype === "radio" && true || !input.prop( "checked" ) );
+
+                               // trigger click handler's bound directly to the input as a substitute for
+                               // how label clicks behave normally in the browsers
+                               // TODO: it would be nice to let the browser's handle the clicks and pass them
+                               //       through to the associate input. we can swallow that click at the parent
+                               //       wrapper element level
+                               input.triggerHandler( 'click' );
+
+                               // Input set for common radio buttons will contain all the radio
+                               // buttons, but will not for checkboxes. clearing the checked status
+                               // of other radios ensures the active button state is applied properly
+                               self._getInputSet().not( input ).prop( "checked", false );
+
+                               self._updateAll();
+                               return false;
+                       }
+               });
+
+               input
+                       .bind({
+                               vmousedown: function() {
+                                       self._cacheVals();
+                               },
+
+                               vclick: function() {
+                                       var $this = $( this );
+
+                                       // Adds checked attribute to checked input when keyboard is used
+                                       if ( $this.is( ":checked" ) ) {
+
+                                               $this.prop( "checked", true);
+                                               self._getInputSet().not( $this ).prop( "checked", false );
+                                       } else {
+
+                                               $this.prop( "checked", false );
+                                       }
+
+                                       self._updateAll();
+                               },
+
+                               focus: function() {
+                                       label.addClass( $.mobile.focusClass );
+                               },
+
+                               blur: function() {
+                                       label.removeClass( $.mobile.focusClass );
+                               }
+                       });
+
+               this.refresh();
+       },
+
+       _cacheVals: function() {
+               this._getInputSet().each(function() {
+                       $( this ).jqmData( "cacheVal", this.checked );
+               });
+       },
+
+       //returns either a set of radios with the same name attribute, or a single checkbox
+       _getInputSet: function() {
+               if ( this.inputtype === "checkbox" ) {
+                       return this.element;
+               }
+
+               return this.element.closest( "form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')" )
+                       .find( "input[name='" + this.element[0].name + "'][type='" + this.inputtype + "']" );
+       },
+
+       _updateAll: function() {
+               var self = this;
+
+               this._getInputSet().each(function() {
+                       var $this = $( this );
+
+                       if ( this.checked || self.inputtype === "checkbox" ) {
+                               $this.trigger( "change" );
+                       }
+                       $this.focus();
+               })
+               .checkboxradio( "refresh" );
+       },
+
+       refresh: function() {
+               var input = this.element[0],
+                       label = this.label,
+                       icon = label.find( ".ui-icon" );
+
+               if ( input.checked ) {
+                       label.addClass( this.checkedClass ).removeClass( this.uncheckedClass );
+                       icon.addClass( this.checkedicon ).removeClass( this.uncheckedicon );
+               } else {
+                       label.removeClass( this.checkedClass ).addClass( this.uncheckedClass );
+                       icon.removeClass( this.checkedicon ).addClass( this.uncheckedicon );
+               }
+
+               if ( input.disabled ) {
+                       this.disable();
+               } else {
+                       this.enable();
+               }
+       },
+
+       disable: function() {
+               this.element.prop( "disabled", true ).parent().addClass( "ui-disabled" );
+       },
+
+       enable: function() {
+               this.element.prop( "disabled", false ).parent().removeClass( "ui-disabled" );
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ) {
+       $.mobile.checkboxradio.prototype.enhanceWithin( e.target, true );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.button", $.mobile.widget, {
+       options: {
+               theme: null,
+               icon: null,
+               iconpos: null,
+               corners: true,
+               shadow: true,
+               iconshadow: true,
+               initSelector: "button, [type='button'], [type='submit'], [type='reset']"
+       },
+       _create: function() {
+               var $el = this.element,
+                       $button,
+                       o = this.options,
+                       type,
+                       name,
+                       inline = o.inline || $el.jqmData( "inline" ),
+                       mini = o.mini || $el.jqmData( "mini" ),
+                       classes = "",
+                       $buttonPlaceholder;
+
+               // if this is a link, check if it's been enhanced and, if not, use the right function
+               if ( $el[ 0 ].tagName === "A" ) {
+                       if ( !$el.hasClass( "ui-btn" ) ) {
+                               $el.buttonMarkup();
+                       }
+
+                       return;
+               }
+
+               // get the inherited theme
+               // TODO centralize for all widgets
+               if ( !this.options.theme ) {
+                       this.options.theme = $.mobile.getInheritedTheme( this.element, "c" );
+               }
+
+               // TODO: Post 1.1--once we have time to test thoroughly--any classes manually applied to the original element should be carried over to the enhanced element, with an `-enhanced` suffix. See https://github.com/jquery/jquery-mobile/issues/3577
+               /* if ( $el[0].className.length ) {
+                       classes = $el[0].className;
+               } */
+               if ( !!~$el[0].className.indexOf( "ui-btn-left" ) ) {
+                       classes = "ui-btn-left";
+               }
+
+               if (  !!~$el[0].className.indexOf( "ui-btn-right" ) ) {
+                       classes = "ui-btn-right";
+               }
+
+               if (  $el.attr( "type" ) === "submit" || $el.attr( "type" ) === "reset" ) {
+                       classes ? classes += " ui-submit" :  classes = "ui-submit";
+               }
+               $( "label[for='" + $el.attr( "id" ) + "']" ).addClass( "ui-submit" );
+
+               // Add ARIA role
+               this.button = $( "<div></div>" )
+                       [ $el.html() ? "html" : "text" ]( $el.html() || $el.val() )
+                       .insertBefore( $el )
+                       .buttonMarkup({
+                               theme: o.theme,
+                               icon: o.icon,
+                               iconpos: o.iconpos,
+                               inline: inline,
+                               corners: o.corners,
+                               shadow: o.shadow,
+                               iconshadow: o.iconshadow,
+                               mini: mini
+                       })
+                       .addClass( classes )
+                       .append( $el.addClass( "ui-btn-hidden" ) );
+
+        $button = this.button;
+               type = $el.attr( "type" );
+               name = $el.attr( "name" );
+
+               // Add hidden input during submit if input type="submit" has a name.
+               if ( type !== "button" && type !== "reset" && name ) {
+                               $el.bind( "vclick", function() {
+                                       // Add hidden input if it doesn't already exist.
+                                       if ( $buttonPlaceholder === undefined ) {
+                                               $buttonPlaceholder = $( "<input>", {
+                                                       type: "hidden",
+                                                       name: $el.attr( "name" ),
+                                                       value: $el.attr( "value" )
+                                               }).insertBefore( $el );
+
+                                               // Bind to doc to remove after submit handling
+                                               $( document ).one( "submit", function() {
+                                                       $buttonPlaceholder.remove();
+
+                                                       // reset the local var so that the hidden input
+                                                       // will be re-added on subsequent clicks
+                                                       $buttonPlaceholder = undefined;
+                                               });
+                                       }
+                               });
+               }
+
+               $el.bind({
+                       focus: function() {
+                               $button.addClass( $.mobile.focusClass );
+                       },
+
+                       blur: function() {
+                               $button.removeClass( $.mobile.focusClass );
+                       }
+               });
+
+               this.refresh();
+       },
+
+       enable: function() {
+               this.element.attr( "disabled", false );
+               this.button.removeClass( "ui-disabled" ).attr( "aria-disabled", false );
+               return this._setOption( "disabled", false );
+       },
+
+       disable: function() {
+               this.element.attr( "disabled", true );
+               this.button.addClass( "ui-disabled" ).attr( "aria-disabled", true );
+               return this._setOption( "disabled", true );
+       },
+
+       refresh: function() {
+               var $el = this.element;
+
+               if ( $el.prop("disabled") ) {
+                       this.disable();
+               } else {
+                       this.enable();
+               }
+
+               // Grab the button's text element from its implementation-independent data item
+               $( this.button.data( 'buttonElements' ).text )[ $el.html() ? "html" : "text" ]( $el.html() || $el.val() );
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ) {
+       $.mobile.button.prototype.enhanceWithin( e.target, true );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.fn.controlgroup = function( options ) {
+       function flipClasses( els, flCorners  ) {
+               els.removeClass( "ui-btn-corner-all ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-controlgroup-last ui-shadow" )
+                       .eq( 0 ).addClass( flCorners[ 0 ] )
+                       .end()
+                       .last().addClass( flCorners[ 1 ] ).addClass( "ui-controlgroup-last" );
+       }
+
+       return this.each(function() {
+               var $el = $( this ),
+                       o = $.extend({
+                                               direction: $el.jqmData( "type" ) || "vertical",
+                                               shadow: false,
+                                               excludeInvisible: true,
+                                               mini: $el.jqmData( "mini" )
+                                       }, options ),
+                       grouplegend = $el.children( "legend" ),
+                       groupheading = $el.children( ".ui-controlgroup-label" ),
+                       groupcontrols = $el.children( ".ui-controlgroup-controls" ),
+                       flCorners = o.direction === "horizontal" ? [ "ui-corner-left", "ui-corner-right" ] : [ "ui-corner-top", "ui-corner-bottom" ],
+                       type = $el.find( "input" ).first().attr( "type" );
+
+               // First unwrap the controls if the controlgroup was already enhanced
+               if ( groupcontrols.length ) {
+                       groupcontrols.contents().unwrap();
+               }
+               $el.wrapInner( "<div class='ui-controlgroup-controls'></div>" );
+
+               if ( grouplegend.length ) {
+                       // Replace legend with more stylable replacement div
+                       $( "<div role='heading' class='ui-controlgroup-label'>" + grouplegend.html() + "</div>" ).insertBefore( $el.children( 0 ) );
+                       grouplegend.remove();
+               } else if ( groupheading.length ) {
+                       // Just move the heading if the controlgroup was already enhanced
+                       $el.prepend( groupheading );
+               }
+
+               $el.addClass( "ui-corner-all ui-controlgroup ui-controlgroup-" + o.direction );
+
+               flipClasses( $el.find( ".ui-btn" + ( o.excludeInvisible ? ":visible" : "" ) ).not( '.ui-slider-handle' ), flCorners );
+               flipClasses( $el.find( ".ui-btn-inner" ), flCorners );
+
+               if ( o.shadow ) {
+                       $el.addClass( "ui-shadow" );
+               }
+
+               if ( o.mini ) {
+                       $el.addClass( "ui-mini" );
+               }
+
+       });
+};
+
+// The pagecreate handler for controlgroup is in jquery.mobile.init because of the soft-dependency on the wrapped widgets
+
+})(jQuery);
+
+(function( $, undefined ) {
+
+$( document ).bind( "pagecreate create", function( e ) {
+
+       //links within content areas, tests included with page
+       $( e.target )
+               .find( "a" )
+               .jqmEnhanceable()
+               .not( ".ui-btn, .ui-link-inherit, :jqmData(role='none'), :jqmData(role='nojs')" )
+               .addClass( "ui-link" );
+
+});
+
+})( jQuery );
+
+
+(function( $, undefined ) {
+
+       function fitSegmentInsideSegment( winSize, segSize, offset, desired ) {
+               var ret = desired;
+
+               if ( winSize < segSize ) {
+                       // Center segment if it's bigger than the window
+                       ret = offset + ( winSize - segSize ) / 2;
+               } else {
+                       // Otherwise center it at the desired coordinate while keeping it completely inside the window
+                       ret = Math.min( Math.max( offset, desired - segSize / 2 ), offset + winSize - segSize );
+               }
+
+               return ret;
+       }
+
+       function windowCoords() {
+               var $win = $( window );
+
+               return {
+                       x: $win.scrollLeft(),
+                       y: $win.scrollTop(),
+                       cx: ( window.innerWidth || $win.width() ),
+                       cy: ( window.innerHeight || $win.height() )
+               };
+       }
+
+       $.widget( "mobile.popup", $.mobile.widget, {
+               options: {
+                       theme: null,
+                       overlayTheme: null,
+                       shadow: true,
+                       corners: true,
+                       transition: "pop",
+                       positionTo: "origin",
+                       tolerance: null,
+                       initSelector: ":jqmData(role='popup')",
+                       closeLinkSelector: "a:jqmData(rel='back')",
+                       closeLinkEvents: "click.popup",
+                       navigateEvents: "navigate.popup",
+                       closeEvents: "navigate.popup pagebeforechange.popup",
+
+                       // NOTE Windows Phone 7 has a scroll position caching issue that
+                       //      requires us to disable popup history management by default
+                       //      https://github.com/jquery/jquery-mobile/issues/4784
+                       //
+                       // NOTE this option is modified in _create!
+                       history: false
+               },
+
+               _eatEventAndClose: function( e ) {
+                       e.preventDefault();
+                       e.stopImmediatePropagation();
+                       this.close();
+                       return false;
+               },
+
+               // Make sure the screen size is increased beyond the page height if the popup's causes the document to increase in height
+               _resizeScreen: function() {
+                       var popupHeight = this._ui.container.outerHeight( true );
+
+                       this._ui.screen.removeAttr( "style" );
+                       if ( popupHeight > this._ui.screen.height() ) {
+                               this._ui.screen.height( popupHeight );
+                       }
+               },
+
+               _handleWindowKeyUp: function( e ) {
+                       if ( this._isOpen && e.keyCode === $.mobile.keyCode.ESCAPE ) {
+                               return this._eatEventAndClose( e );
+                       }
+               },
+
+               _maybeRefreshTimeout: function() {
+                       var winCoords = windowCoords();
+
+                       if ( this._resizeData ) {
+                               if ( winCoords.x === this._resizeData.winCoords.x &&
+                                       winCoords.y === this._resizeData.winCoords.y &&
+                                       winCoords.cx === this._resizeData.winCoords.cx &&
+                                       winCoords.cy === this._resizeData.winCoords.cy ) {
+                                       // timeout not refreshed
+                                       return false;
+                               } else {
+                                       // clear existing timeout - it will be refreshed below
+                                       clearTimeout( this._resizeData.timeoutId );
+                               }
+                       }
+
+                       this._resizeData = {
+                               timeoutId: setTimeout( $.proxy( this, "_resizeTimeout" ), 200 ),
+                               winCoords: winCoords
+                       };
+
+                       return true;
+               },
+
+               _resizeTimeout: function() {
+                       if ( !this._maybeRefreshTimeout() && this.positionTo === "window" ) {
+                               // effectively rapid-open the popup while leaving the screen intact
+                               this._trigger( "beforeposition" );
+                               this._ui.container
+                                       .removeClass( "ui-selectmenu-hidden" )
+                                       .offset( this._placementCoords( this._desiredCoords( undefined, undefined, "window" ) ) );
+
+                               this._resizeScreen();
+                               this._resizeData = null;
+                               this._orientationchangeInProgress = false;
+                       }
+               },
+
+               _handleWindowResize: function( e ) {
+                       if ( this._isOpen ) {
+                               this._maybeRefreshTimeout();
+                       }
+               },
+
+               _handleWindowOrientationchange: function( e ) {
+
+                       if ( !this._orientationchangeInProgress ) {
+                               // effectively rapid-close the popup while leaving the screen intact
+                               this._ui.container
+                                       .addClass( "ui-selectmenu-hidden" )
+                                       .removeAttr( "style" );
+
+                               this._orientationchangeInProgress = true;
+                       }
+               },
+
+               _create: function() {
+                       var ui = {
+                                       screen: $( "<div class='ui-screen-hidden ui-popup-screen'></div>" ),
+                                       placeholder: $( "<div style='display: none;'><!-- placeholder --></div>" ),
+                                       container: $( "<div class='ui-popup-container ui-selectmenu-hidden'></div>" ),
+                                       arrow : $("<div class='ui-arrow'></div>")
+                               },
+                               thisPage = this.element.closest( ".ui-page" ),
+                               myId = this.element.attr( "id" ),
+                               self = this;
+
+                       // We need to adjust the history option to be false if there's no AJAX nav.
+                       // We can't do it in the option declarations because those are run before
+                       // it is determined whether there shall be AJAX nav.
+                       this.options.history = this.options.history && $.mobile.ajaxEnabled && $.mobile.hashListeningEnabled;
+
+                       if ( thisPage.length === 0 ) {
+                               thisPage = $( "body" );
+                       }
+
+                       // define the container for navigation event bindings
+                       // TODO this would be nice at the the mobile widget level
+                       this.options.container = this.options.container || $.mobile.pageContainer;
+
+                       // Apply the proto
+                       thisPage.append( ui.screen );
+                       ui.container.insertAfter( ui.screen );
+                       // Leave a placeholder where the element used to be
+                       ui.placeholder.insertAfter( this.element );
+                       if ( myId ) {
+                               ui.screen.attr( "id", myId + "-screen" );
+                               ui.container.attr( "id", myId + "-popup" );
+                               ui.placeholder.html( "<!-- placeholder for " + myId + " -->" );
+                       }
+                       ui.container.append( this.element );
+                       ui.container.append( ui.arrow );
+                       // Add class to popup element
+                       this.element.addClass( "ui-popup" );
+
+                       // Define instance variables
+                       $.extend( this, {
+                               _page: thisPage,
+                               _ui: ui,
+                               _fallbackTransition: "",
+                               _currentTransition: false,
+                               _prereqs: null,
+                               _isOpen: false,
+                               _tolerance: null,
+                               _resizeData: null,
+                               _orientationchangeInProgress: false,
+                               _globalHandlers: [
+                                       {
+                                               src: $( window ),
+                                               handler: {
+                                                       orientationchange: $.proxy( this, "_handleWindowOrientationchange" ),
+                                                       resize: $.proxy( this, "_handleWindowResize" ),
+                                                       keyup: $.proxy( this, "_handleWindowKeyUp" )
+                                               }
+                                       }
+                               ]
+                       });
+
+                       $.each( this.options, function( key, value ) {
+                               // Cause initial options to be applied by their handler by temporarily setting the option to undefined
+                               // - the handler then sets it to the initial value
+                               self.options[ key ] = undefined;
+                               self._setOption( key, value, true );
+                       });
+
+                       ui.screen.bind( "vclick", $.proxy( this, "_eatEventAndClose" ) );
+
+                       $.each( this._globalHandlers, function( idx, value ) {
+                               value.src.bind( value.handler );
+                       });
+               },
+
+               _applyTheme: function( dst, theme, prefix ) {
+                       var classes = ( dst.attr( "class" ) || "").split( " " ),
+                               alreadyAdded = true,
+                               currentTheme = null,
+                               matches,
+                               themeStr = String( theme );
+
+                       while ( classes.length > 0 ) {
+                               currentTheme = classes.pop();
+                               matches = ( new RegExp( "^ui-" + prefix + "-([a-z])$" ) ).exec( currentTheme );
+                               if ( matches && matches.length > 1 ) {
+                                       currentTheme = matches[ 1 ];
+                                       break;
+                               } else {
+                                       currentTheme = null;
+                               }
+                       }
+
+                       if ( theme !== currentTheme ) {
+                               dst.removeClass( "ui-" + prefix + "-" + currentTheme );
+                               if ( ! ( theme === null || theme === "none" ) ) {
+                                       dst.addClass( "ui-" + prefix + "-" + themeStr );
+                               }
+                       }
+               },
+
+               _setTheme: function( value ) {
+                       this._applyTheme( this.element, value, "body" );
+               },
+
+               _setOverlayTheme: function( value ) {
+                       this._applyTheme( this._ui.screen, value, "overlay" );
+
+                       if ( this._isOpen ) {
+                               this._ui.screen.addClass( "in" );
+                       }
+               },
+
+               _setShadow: function( value ) {
+                       this.element.toggleClass( "ui-overlay-shadow", value );
+               },
+
+               _setCorners: function( value ) {
+                       this.element.toggleClass( "ui-corner-all", value );
+               },
+
+               _applyTransition: function( value ) {
+                       this._ui.container.removeClass( this._fallbackTransition );
+                       if ( value && value !== "none" ) {
+                               this._fallbackTransition = $.mobile._maybeDegradeTransition( value );
+                               this._ui.container.addClass( this._fallbackTransition );
+                       }
+               },
+
+               _setTransition: function( value ) {
+                       if ( !this._currentTransition ) {
+                               this._applyTransition( value );
+                       }
+               },
+
+               _setTolerance: function( value ) {
+                       var tol = { t: 5, r: 5, b: 5, l: 5 };
+
+                       if ( value ) {
+                               var ar = String( value ).split( "," );
+
+                               $.each( ar, function( idx, val ) { ar[ idx ] = parseInt( val, 10 ); } );
+
+                               switch( ar.length ) {
+                                       // All values are to be the same
+                                       case 1:
+                                               if ( !isNaN( ar[ 0 ] ) ) {
+                                                       tol.t = tol.r = tol.b = tol.l = ar[ 0 ];
+                                               }
+                                               break;
+
+                                       // The first value denotes top/bottom tolerance, and the second value denotes left/right tolerance
+                                       case 2:
+                                               if ( !isNaN( ar[ 0 ] ) ) {
+                                                       tol.t = tol.b = ar[ 0 ];
+                                               }
+                                               if ( !isNaN( ar[ 1 ] ) ) {
+                                                       tol.l = tol.r = ar[ 1 ];
+                                               }
+                                               break;
+
+                                       // The array contains values in the order top, right, bottom, left
+                                       case 4:
+                                               if ( !isNaN( ar[ 0 ] ) ) {
+                                                       tol.t = ar[ 0 ];
+                                               }
+                                               if ( !isNaN( ar[ 1 ] ) ) {
+                                                       tol.r = ar[ 1 ];
+                                               }
+                                               if ( !isNaN( ar[ 2 ] ) ) {
+                                                       tol.b = ar[ 2 ];
+                                               }
+                                               if ( !isNaN( ar[ 3 ] ) ) {
+                                                       tol.l = ar[ 3 ];
+                                               }
+                                               break;
+
+                                       default:
+                                               break;
+                               }
+                       }
+
+                       this._tolerance = tol;
+               },
+
+               _setOption: function( key, value ) {
+                       var exclusions, setter = "_set" + key.charAt( 0 ).toUpperCase() + key.slice( 1 );
+
+                       if ( this[ setter ] !== undefined ) {
+                               this[ setter ]( value );
+                       }
+
+                       // TODO REMOVE FOR 1.2.1 by moving them out to a default options object
+                       exclusions = [
+                               "initSelector",
+                               "closeLinkSelector",
+                               "closeLinkEvents",
+                               "navigateEvents",
+                               "closeEvents",
+                               "history",
+                               "container"
+                       ];
+
+                       $.mobile.widget.prototype._setOption.apply( this, arguments );
+                       if ( $.inArray( key, exclusions ) === -1 ) {
+                               // Record the option change in the options and in the DOM data-* attributes
+                               this.element.attr( "data-" + ( $.mobile.ns || "" ) + ( key.replace( /([A-Z])/, "-$1" ).toLowerCase() ), value );
+                       }
+               },
+
+               // Try and center the overlay over the given coordinates
+               _placementCoords: function( desired ) {
+                       // rectangle within which the popup must fit
+                       var
+                               winCoords = windowCoords(),
+                               rc = {
+                                       x: this._tolerance.l,
+                                       y: winCoords.y + this._tolerance.t,
+                                       cx: winCoords.cx - this._tolerance.l - this._tolerance.r,
+                                       cy: winCoords.cy - this._tolerance.t - this._tolerance.b
+                               },
+                               menuSize, ret,
+                               linkOffset = $(this.link).offset(),
+                               positionOffsets = [],
+                               correctionValue = [0,0],
+                               arrayIdx;
+
+                       // Clamp the width of the menu before grabbing its size
+                       this._ui.container.css( "max-width", rc.cx );
+                       menuSize = {
+                               cx: this._ui.container.outerWidth( true ),
+                               cy: this._ui.container.outerHeight( true )
+                       };
+
+                       // Center the menu over the desired coordinates, while not going outside
+                       // the window tolerances. This will center wrt. the window if the popup is too large.
+                       ret = {
+                               x: fitSegmentInsideSegment( rc.cx, menuSize.cx, rc.x, desired.x ),
+                               y: fitSegmentInsideSegment( rc.cy, menuSize.cy, rc.y, desired.y )
+                       };
+
+                       // Make sure the top of the menu is visible
+                       ret.y = Math.max( 0, ret.y );
+
+                       // If the height of the menu is smaller than the height of the document
+                       // align the bottom with the bottom of the document
+
+                       // fix for $( document ).height() bug in core 1.7.2.
+                       var docEl = document.documentElement, docBody = document.body,
+                               docHeight = Math.max( docEl.clientHeight, docBody.scrollHeight, docBody.offsetHeight, docEl.scrollHeight, docEl.offsetHeight );
+
+                       ret.y -= Math.min( ret.y, Math.max( 0, ret.y + menuSize.cy - docHeight ) );
+
+                       if ( this.positionTo !== "origin" )
+                       {
+                               return { left: ret.x, top: ret.y , arrowleft: 0 , arrowtop: 0};
+                       }
+
+                       positionOffsets = [ linkOffset.left,
+                                                               linkOffset.top,
+                                                               docEl.clientHeight - ( linkOffset.top + $(this.link).height() ),
+                                                               docEl.clientWidth - ( linkOffset.left + $(this.link).width() )];
+                       arrayIdx = positionOffsets.indexOf(Math.max.apply(window,positionOffsets));
+
+                       switch( arrayIdx )
+                       {
+                               case 0:
+                                       correctionValue = [ -$(this.link).width() , 0];
+                                       arrow.attr( "class", "" )
+                                                                       .addClass( "ui-arrow right" );
+                                       break;
+                               case 1:
+                                       correctionValue = [ 0 , -(ret.y + menuSize.cy - linkOffset.top)];
+                                       arrowtop = menuSize.cy - 1;
+                                       arrowleft = (linkOffset.left - ret.x + correctionValue[0]) + ( $(this.link).width() / 2 ) - parseInt( $(this._ui.arrow).css("border-width") ) / 2;
+                                       $(this._ui.arrow).attr( "class", "" )
+                                                                       .addClass( "ui-arrow bottom" );
+                                       break;
+                               case 2:
+                                       correctionValue = [ 0 , ( linkOffset.top + $(this.link).height() - ret.y ) ];
+                                       arrowtop = - parseInt( $(this._ui.arrow).css("border-width") ) * 2 + 1;
+                                       arrowleft = (linkOffset.left - ret.x + correctionValue[0]) + ( $(this.link).width() / 2 ) - parseInt( $(this._ui.arrow).css("border-width") ) / 2;
+                                       $(this._ui.arrow).attr( "class", "" )
+                                                                       .addClass("ui-arrow top");
+                                       break;
+                               case 3:
+                                       correctionValue = [ ( menuSize.cx < $(this.link).width() ) ? ( $(this.link).width() / 2 ) + ( menuSize.cx / 2) : $(this.link).width() , 0];
+                                       arrowtop = ( linkOffset.top - ret.y  ) + ( $(this.link).height() / 2 ) - parseInt( $(this._ui.arrow).css("border-width") ) ;
+                                       arrowleft = - parseInt( $(this._ui.arrow).css("border-width") ) * 2;
+                                       $(this._ui.arrow).attr( "class", "" )
+                                                                       .addClass("ui-arrow right");
+                                       break;
+                       }
+
+                       return { left: ret.x + correctionValue[0], top: ret.y + correctionValue[1] , arrowleft: arrowleft , arrowtop: arrowtop };
+               },
+
+               _createPrereqs: function( screenPrereq, containerPrereq, whenDone ) {
+                       var self = this, prereqs;
+
+                       // It is important to maintain both the local variable prereqs and self._prereqs. The local variable remains in
+                       // the closure of the functions which call the callbacks passed in. The comparison between the local variable and
+                       // self._prereqs is necessary, because once a function has been passed to .animationComplete() it will be called
+                       // next time an animation completes, even if that's not the animation whose end the function was supposed to catch
+                       // (for example, if an abort happens during the opening animation, the .animationComplete handler is not called for
+                       // that animation anymore, but the handler remains attached, so it is called the next time the popup is opened
+                       // - making it stale. Comparing the local variable prereqs to the widget-level variable self._prereqs ensures that
+                       // callbacks triggered by a stale .animationComplete will be ignored.
+
+                       prereqs = {
+                               screen: $.Deferred(),
+                               container: $.Deferred()
+                       };
+
+                       prereqs.screen.then( function() {
+                               if ( prereqs === self._prereqs ) {
+                                       screenPrereq();
+                               }
+                       });
+
+                       prereqs.container.then( function() {
+                               if ( prereqs === self._prereqs ) {
+                                       containerPrereq();
+                               }
+                       });
+
+                       $.when( prereqs.screen, prereqs.container ).done( function() {
+                               if ( prereqs === self._prereqs ) {
+                                       self._prereqs = null;
+                                       whenDone();
+                               }
+                       });
+
+                       self._prereqs = prereqs;
+               },
+
+               _animate: function( args ) {
+                       // NOTE before removing the default animation of the screen
+                       //      this had an animate callback that would relove the deferred
+                       //      now the deferred is resolved immediately
+                       // TODO remove the dependency on the screen deferred
+                       this._ui.screen
+                               .removeClass( args.classToRemove )
+                               .addClass( args.screenClassToAdd );
+
+                       args.prereqs.screen.resolve();
+
+                       if ( args.transition && args.transition !== "none" ) {
+                               if ( args.applyTransition ) {
+                                       this._applyTransition( args.transition );
+                               }
+                               this._ui.container
+                                       .animationComplete( $.proxy( args.prereqs.container, "resolve" ) )
+                                       .addClass( args.containerClassToAdd )
+                                       .removeClass( args.classToRemove );
+                       } else {
+                               args.prereqs.container.resolve();
+                       }
+               },
+
+               // The desired coordinates passed in will be returned untouched if no reference element can be identified via
+               // desiredPosition.positionTo. Nevertheless, this function ensures that its return value always contains valid
+               // x and y coordinates by specifying the center middle of the window if the coordinates are absent.
+               _desiredCoords: function( x, y, positionTo ) {
+                       var dst = null, offset, winCoords = windowCoords();
+
+                       // Establish which element will serve as the reference
+                       if ( positionTo && positionTo !== "origin" ) {
+                               if ( positionTo === "window" ) {
+                                       x = winCoords.cx / 2 + winCoords.x;
+                                       y = winCoords.cy / 2 + winCoords.y;
+                               } else {
+                                       try {
+                                               dst = $( positionTo );
+                                       } catch( e ) {
+                                               dst = null;
+                                       }
+                                       if ( dst ) {
+                                               dst.filter( ":visible" );
+                                               if ( dst.length === 0 ) {
+                                                       dst = null;
+                                               }
+                                       }
+                               }
+                       }
+
+                       // If an element was found, center over it
+                       if ( dst ) {
+                               offset = dst.offset();
+                               x = offset.left + dst.outerWidth() / 2;
+                               y = offset.top + dst.outerHeight() / 2;
+                       }
+
+                       // Make sure x and y are valid numbers - center over the window
+                       if ( $.type( x ) !== "number" || isNaN( x ) ) {
+                               x = winCoords.cx / 2 + winCoords.x;
+                       }
+                       if ( $.type( y ) !== "number" || isNaN( y ) ) {
+                               y = winCoords.cy / 2 + winCoords.y;
+                       }
+
+                       return { x: x, y: y };
+               },
+
+               _openPrereqsComplete: function() {
+                       var self = this;
+
+                       self._ui.container.addClass( "ui-popup-active" );
+                       self._isOpen = true;
+                       self._resizeScreen();
+
+                       // Android appears to trigger the animation complete before the popup
+                       // is visible. Allowing the stack to unwind before applying focus prevents
+                       // the "blue flash" of element focus in android 4.0
+                       setTimeout(function(){
+                               self._ui.container.attr( "tabindex", "0" ).focus();
+                               self._trigger( "afteropen" );
+                       });
+               },
+
+               _open: function( options ) {
+                       var coords, transition,
+                               androidBlacklist = ( function() {
+                                       var w = window,
+                                               ua = navigator.userAgent,
+                                               // Rendering engine is Webkit, and capture major version
+                                               wkmatch = ua.match( /AppleWebKit\/([0-9\.]+)/ ),
+                                               wkversion = !!wkmatch && wkmatch[ 1 ],
+                                               androidmatch = ua.match( /Android (\d+(?:\.\d+))/ ),
+                                               andversion = !!androidmatch && androidmatch[ 1 ],
+                                               chromematch = ua.indexOf( "Chrome" ) > -1;
+
+                                       // Platform is Android, WebKit version is greater than 534.13 ( Android 3.2.1 ) and not Chrome.
+                                       if( androidmatch !== null && andversion === "4.0" && wkversion && wkversion > 534.13 && !chromematch ) {
+                                               return true;
+                                       }
+                                       return false;
+                               }());
+
+                       // Make sure options is defined
+                       options = ( options || {} );
+
+                       // Copy out the transition, because we may be overwriting it later and we don't want to pass that change back to the caller
+                       transition = options.transition || this.options.transition;
+
+                       // Give applications a chance to modify the contents of the container before it appears
+                       this._trigger( "beforeposition" );
+
+                       coords = this._placementCoords( this._desiredCoords( options.x, options.y, options.positionTo || this.options.positionTo || "origin" ) );
+
+                       // Count down to triggering "popupafteropen" - we have two prerequisites:
+                       // 1. The popup window animation completes (container())
+                       // 2. The screen opacity animation completes (screen())
+                       this._createPrereqs(
+                               $.noop,
+                               $.noop,
+                               $.proxy( this, "_openPrereqsComplete" ) );
+
+                       if ( transition ) {
+                               this._currentTransition = transition;
+                               this._applyTransition( transition );
+                       } else {
+                               transition = this.options.transition;
+                       }
+
+                       if ( !this.options.theme ) {
+                               this._setTheme( this._page.jqmData( "theme" ) || $.mobile.getInheritedTheme( this._page, "c" ) );
+                       }
+
+                       this._ui.screen.removeClass( "ui-screen-hidden" );
+
+                       this._ui.container
+                               .removeClass( "ui-selectmenu-hidden" )
+                               .offset( coords );
+                       this._ui.arrow.css( { top : coords.arrowtop, left : coords.arrowleft } );
+                       if ( this.options.overlayTheme && androidBlacklist ) {
+                               /* TODO:
+                               The native browser on Android 4.0.X ("Ice Cream Sandwich") suffers from an issue where the popup overlay appears to be z-indexed
+                               above the popup itself when certain other styles exist on the same page -- namely, any element set to `position: fixed` and certain
+                               types of input. These issues are reminiscent of previously uncovered bugs in older versions of Android's native browser:
+                               https://github.com/scottjehl/Device-Bugs/issues/3
+
+                               This fix closes the following bugs ( I use "closes" with reluctance, and stress that this issue should be revisited as soon as possible ):
+
+                               https://github.com/jquery/jquery-mobile/issues/4816
+                               https://github.com/jquery/jquery-mobile/issues/4844
+                               https://github.com/jquery/jquery-mobile/issues/4874
+                               */
+
+                               // TODO sort out why this._page isn't working
+                               this.element.closest( ".ui-page" ).addClass( "ui-popup-open" );
+                       }
+                       this._animate({
+                               additionalCondition: true,
+                               transition: transition,
+                               classToRemove: "",
+                               screenClassToAdd: "in",
+                               containerClassToAdd: "in",
+                               applyTransition: false,
+                               prereqs: this._prereqs
+                       });
+               },
+
+               _closePrereqScreen: function() {
+                       this._ui.screen
+                               .removeClass( "out" )
+                               .addClass( "ui-screen-hidden" );
+               },
+
+               _closePrereqContainer: function() {
+                       this._ui.container
+                               .removeClass( "reverse out" )
+                               .addClass( "ui-selectmenu-hidden" )
+                               .removeAttr( "style" );
+               },
+
+               _closePrereqsDone: function() {
+                       var self = this, opts = self.options;
+
+                       self._ui.container.removeAttr( "tabindex" );
+
+                       // remove nav bindings if they are still present
+                       opts.container.unbind( opts.closeEvents );
+
+                       // unbind click handlers added when history is disabled
+                       self.element.undelegate( opts.closeLinkSelector, opts.closeLinkEvents );
+
+                       // remove the global mutex for popups
+                       $.mobile.popup.active = undefined;
+
+                       // alert users that the popup is closed
+                       self._trigger( "afterclose" );
+               },
+
+               _close: function() {
+                       this._ui.container.removeClass( "ui-popup-active" );
+                       this._page.removeClass( "ui-popup-open" );
+
+                       this._isOpen = false;
+
+                       // IME hide when popup is closed
+                       this.element.find("input").blur();
+
+                       // Count down to triggering "popupafterclose" - we have two prerequisites:
+                       // 1. The popup window reverse animation completes (container())
+                       // 2. The screen opacity animation completes (screen())
+                       this._createPrereqs(
+                               $.proxy( this, "_closePrereqScreen" ),
+                               $.proxy( this, "_closePrereqContainer" ),
+                               $.proxy( this, "_closePrereqsDone" ) );
+
+                       this._animate( {
+                               additionalCondition: this._ui.screen.hasClass( "in" ),
+                               transition: ( this._currentTransition || this.options.transition ),
+                               classToRemove: "in",
+                               screenClassToAdd: "out",
+                               containerClassToAdd: "reverse out",
+                               applyTransition: true,
+                               prereqs: this._prereqs
+                       });
+               },
+
+               _destroy: function() {
+                       var self = this;
+
+                       // hide and remove bindings
+                       self._close();
+
+                       // Put the element back to where the placeholder was and remove the "ui-popup" class
+                       self._setTheme( "none" );
+                       self.element
+                               .insertAfter( self._ui.placeholder )
+                               .removeClass( "ui-popup ui-overlay-shadow ui-corner-all" );
+                       self._ui.screen.remove();
+                       self._ui.container.remove();
+                       self._ui.placeholder.remove();
+
+                       // Unbind handlers that were bound to elements outside self.element (the window, in self case)
+                       $.each( self._globalHandlers, function( idx, oneSrc ) {
+                               $.each( oneSrc.handler, function( eventType, handler ) {
+                                       oneSrc.src.unbind( eventType, handler );
+                               });
+                       });
+               },
+
+               // any navigation event after a popup is opened should close the popup
+               // NOTE the pagebeforechange is bound to catch navigation events that don't
+               //      alter the url (eg, dialogs from popups)
+               _bindContainerClose: function() {
+                       var self = this;
+
+                       self.options.container
+                               .one( self.options.closeEvents, $.proxy( self._close, self ));
+               },
+
+               // TODO no clear deliniation of what should be here and
+               // what should be in _open. Seems to be "visual" vs "history" for now
+               open: function( options ) {
+                       var self = this, opts = this.options, url, hashkey, activePage, currentIsDialog, hasHash, urlHistory;
+                       // self.link = ( $(event.target).attr('data-role') === 'button') ? event.target : $(event.target).closest('[data-role="button"]')[0];
+                       // make sure open is idempotent
+                       if( $.mobile.popup.active ) {
+                               return;
+                       }
+                       // set the global popup mutex
+                       $.mobile.popup.active = this;
+                       if( !options ) {
+                               options = [];
+                       }
+                       if ( !options.link ) {
+                               self.link = $(event.target).closest('a')[0];
+                       } else {
+                               self.link = options.link;
+                       }
+                       self.positionTo = ( options != null && options.positionTo != null ) ? options.positionTo : "origin";
+                       if ( $(self.link).jqmData("position-to") !== "window"
+                                       && self.positionTo !== "window" ) {
+
+                               $(self.element).addClass("ui-ctxpopup");
+                               $(self._ui.container).removeClass("ui-popup-container")
+                                       .addClass("ui-ctxpopup-container");
+
+                               if( self.positionTo !== "origin" ) {
+                                       $(self._ui.arrow).hide();
+                               } else {
+                                       $(self._ui.arrow).show();
+                               }
+                       } else {
+                               $(self._ui.arrow).hide();
+                       }
+                       if( !options.x
+                               && self.positionTo === "origin" ) {
+                               options.x = $(self.link).offset().left + $(self.link).outerWidth() / 2;
+                       }
+                       if( !options.y
+                               && self.positionTo === "origin" ) {
+                               options.y = $(self.link).offset().top + $(self.link).outerHeight() / 2;
+                       }
+                       // if history alteration is disabled close on navigate events
+                       // and leave the url as is
+                       if( !( opts.history ) ) {
+                               self._open( options );
+                               self._bindContainerClose();
+
+                               // When histoy is disabled we have to grab the data-rel
+                               // back link clicks so we can close the popup instead of
+                               // relying on history to do it for us
+                               self.element
+                                       .delegate( opts.closeLinkSelector, opts.closeLinkEvents, function( e ) {
+                                               self._close();
+
+                                               // NOTE prevent the browser and navigation handlers from
+                                               // working with the link's rel=back. This may cause
+                                               // issues for developers expecting the event to bubble
+                                               return false;
+                                       });
+
+                               return;
+                       }
+
+                       // cache some values for min/readability
+                       hashkey = $.mobile.dialogHashKey;
+                       activePage = $.mobile.activePage;
+                       currentIsDialog = activePage.is( ".ui-dialog" );
+                       url = $.mobile.urlHistory.getActive().url;
+                       hasHash = ( url.indexOf( hashkey ) > -1 ) && !currentIsDialog;
+                       urlHistory = $.mobile.urlHistory;
+
+                       if ( hasHash ) {
+                               self._open( options );
+                               self._bindContainerClose();
+                               return;
+                       }
+
+                       // if the current url has no dialog hash key proceed as normal
+                       // otherwise, if the page is a dialog simply tack on the hash key
+                       if ( url.indexOf( hashkey ) === -1 && !currentIsDialog ){
+                               url = url + hashkey;
+                       } else {
+                               url = $.mobile.path.parseLocation().hash + hashkey;
+                       }
+
+                       // Tack on an extra hashkey if this is the first page and we've just reconstructed the initial hash
+                       if ( urlHistory.activeIndex === 0 && url === urlHistory.initialDst ) {
+                               url += hashkey;
+                       }
+
+                       // swallow the the initial navigation event, and bind for the next
+                       opts.container.one( opts.navigateEvents, function( e ) {
+                               e.preventDefault();
+                               self._open( options );
+                               self._bindContainerClose();
+                       });
+
+                       urlHistory.ignoreNextHashChange = currentIsDialog;
+
+                       // Gotta love methods with 1mm args :(
+                       urlHistory.addNew( url, undefined, undefined, undefined, "dialog" );
+
+                       // set the new url with (or without) the new dialog hash key
+                       $.mobile.path.set( url );
+               },
+
+               close: function() {
+                       // make sure close is idempotent
+                       if( !$.mobile.popup.active ){
+                               return;
+                       }
+
+                       if( this.options.history ) {
+                               $.mobile.back();
+                       } else {
+                               this._close();
+                       }
+               }
+       });
+
+
+       // TODO this can be moved inside the widget
+       $.mobile.popup.handleLink = function( $link ) {
+               var closestPage = $link.closest( ":jqmData(role='page')" ),
+                       scope = ( ( closestPage.length === 0 ) ? $( "body" ) : closestPage ),
+                       // NOTE make sure to get only the hash, ie7 (wp7) return the absolute href
+                       //      in this case ruining the element selection
+                       popup = $( $.mobile.path.parseUrl($link.attr( "href" )).hash, scope[0] ),
+                       offset;
+
+               if ( popup.data( "popup" ) ) {
+                       offset = $link.offset();
+                       popup.popup( "open", {
+                               x: offset.left + $link.outerWidth() / 2,
+                               y: offset.top + $link.outerHeight() / 2,
+                               transition: $link.jqmData( "transition" ),
+                               positionTo: $link.jqmData( "position-to" ),
+                               link: $link
+                       });
+               }
+
+               //remove after delay
+               setTimeout( function() {
+                       $link.removeClass( $.mobile.activeBtnClass );
+               }, 300 );
+       };
+
+       // TODO move inside _create
+       $( document ).bind( "pagebeforechange", function( e, data ) {
+               if ( data.options.role === "popup" ) {
+                       $.mobile.popup.handleLink( data.options.link );
+                       e.preventDefault();
+               }
+       });
+
+       $( document ).bind( "pagecreate create", function( e )  {
+               $.mobile.popup.prototype.enhanceWithin( e.target, true );
+       });
+
+})( jQuery );
+
+(function( $ ) {
+       var     meta = $( "meta[name=viewport]" ),
+               initialContent = meta.attr( "content" ),
+               disabledZoom = initialContent + ",maximum-scale=1, user-scalable=no",
+               enabledZoom = initialContent + ",maximum-scale=10, user-scalable=yes",
+               disabledInitially = /(user-scalable[\s]*=[\s]*no)|(maximum-scale[\s]*=[\s]*1)[$,\s]/.test( initialContent );
+
+       $.mobile.zoom = $.extend( {}, {
+               enabled: !disabledInitially,
+               locked: false,
+               disable: function( lock ) {
+                       if ( !disabledInitially && !$.mobile.zoom.locked ) {
+                               meta.attr( "content", disabledZoom );
+                               $.mobile.zoom.enabled = false;
+                               $.mobile.zoom.locked = lock || false;
+                       }
+               },
+               enable: function( unlock ) {
+                       if ( !disabledInitially && ( !$.mobile.zoom.locked || unlock === true ) ) {
+                               meta.attr( "content", enabledZoom );
+                               $.mobile.zoom.enabled = true;
+                               $.mobile.zoom.locked = false;
+                       }
+               },
+               restore: function() {
+                       if ( !disabledInitially ) {
+                               meta.attr( "content", initialContent );
+                               $.mobile.zoom.enabled = true;
+                       }
+               }
+       });
+
+}( jQuery ));
+
+(function( $, undefined ) {
+
+$.widget( "mobile.textinput", $.mobile.widget, {
+       options: {
+               theme: null,
+               // This option defaults to true on iOS devices.
+               preventFocusZoom: /iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1,
+               initSelector: "input[type='text'], input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type])",
+               disabled: false
+       },
+
+       _create: function() {
+
+               var self = this,
+                       input = this.element,
+                       o = this.options,
+                       theme = o.theme || $.mobile.getInheritedTheme( this.element, "c" ),
+                       themeclass  = " ui-body-" + theme,
+                       mini = input.jqmData( "mini" ) === true,
+                       miniclass = mini ? " ui-mini" : "",
+                       focusedEl, clearbtn;
+
+               function toggleClear() {
+                       setTimeout( function() {
+                               clearbtn.toggleClass( "ui-input-clear-hidden", !input.val() );
+                       }, 0 );
+               }
+
+               $( "label[for='" + input.attr( "id" ) + "']" ).addClass( "ui-input-text" );
+
+               focusedEl = input.addClass("ui-input-text ui-body-"+ theme );
+
+               // XXX: Temporary workaround for issue 785 (Apple bug 8910589).
+               //      Turn off autocorrect and autocomplete on non-iOS 5 devices
+               //      since the popup they use can't be dismissed by the user. Note
+               //      that we test for the presence of the feature by looking for
+               //      the autocorrect property on the input element. We currently
+               //      have no test for iOS 5 or newer so we're temporarily using
+               //      the touchOverflow support flag for jQM 1.0. Yes, I feel dirty. - jblas
+               if ( typeof input[0].autocorrect !== "undefined" && !$.support.touchOverflow ) {
+                       // Set the attribute instead of the property just in case there
+                       // is code that attempts to make modifications via HTML.
+                       input[0].setAttribute( "autocorrect", "off" );
+                       input[0].setAttribute( "autocomplete", "off" );
+               }
+
+               input.focus(function() {
+                               focusedEl.addClass( $.mobile.focusClass );
+                       })
+                       .blur(function() {
+                               focusedEl.removeClass( $.mobile.focusClass );
+                       })
+                       // In many situations, iOS will zoom into the select upon tap, this prevents that from happening
+                       .bind( "focus", function() {
+                               if ( o.preventFocusZoom ) {
+                                       $.mobile.zoom.disable( true );
+                               }
+                       })
+                       .bind( "blur", function() {
+                               if ( o.preventFocusZoom ) {
+                                       $.mobile.zoom.enable( true );
+                               }
+                       });
+
+               // Autogrow
+               if ( input.is( "textarea" ) ) {
+                       var extraLineHeight = 15,
+                               keyupTimeoutBuffer = 100,
+                               keyupTimeout;
+
+                       this._keyup = function() {
+                               var scrollHeight = input[ 0 ].scrollHeight,
+                                       clientHeight = input[ 0 ].clientHeight;
+
+                               if ( clientHeight < scrollHeight && window.innerHeight / 2 > scrollHeight ) {
+                                       input.height(scrollHeight + extraLineHeight);
+                               }
+                       };
+
+                       input.keyup(function() {
+                               clearTimeout( keyupTimeout );
+                               keyupTimeout = setTimeout( self._keyup, keyupTimeoutBuffer );
+                       });
+
+                       // binding to pagechange here ensures that for pages loaded via
+                       // ajax the height is recalculated without user input
+                       this._on( $(document), {"pagechange": "_keyup" });
+
+                       // Issue 509: the browser is not providing scrollHeight properly until the styles load
+                       if ( $.trim( input.val() ) ) {
+                               // bind to the window load to make sure the height is calculated based on BOTH
+                               // the DOM and CSS
+                               this._on( $(window), {"load": "_keyup"});
+                       }
+               }
+               if ( input.attr( "disabled" ) ) {
+                       this.disable();
+               }
+       },
+
+       disable: function() {
+               var $el;
+               if ( this.element.attr( "disabled", true ) ) {
+                       $el = this.element;
+               } else {
+                       return;
+               }
+               $el.addClass( "ui-disabled" );
+               return this._setOption( "disabled", true );
+       },
+
+       enable: function() {
+               var $el;
+
+               // TODO using more than one line of code is acceptable ;)
+               if ( this.element.attr( "disabled", false ) ) {
+                       $el = this.element;
+               } else {
+                       return;
+               }
+               $el.removeClass( "ui-disabled" );
+               return this._setOption( "disabled", false );
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ) {
+       $.mobile.textinput.prototype.enhanceWithin( e.target, true );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.mobile.listview.prototype.options.filter = false;
+$.mobile.listview.prototype.options.filterPlaceholder = "";
+$.mobile.listview.prototype.options.filterTheme = "c";
+// TODO rename callback/deprecate and default to the item itself as the first argument
+var defaultFilterCallback = function( text, searchValue, item ) {
+               return text.toString().toLowerCase().indexOf( searchValue ) === -1;
+       };
+
+$.mobile.listview.prototype.options.filterCallback = defaultFilterCallback;
+
+$( document ).delegate( ":jqmData(role='listview')", "listviewcreate", function() {
+
+       var list = $( this ),
+               listview = list.data( "listview" );
+
+       if ( !listview.options.filter ) {
+               return;
+       }
+
+       var wrapper = $( "<form>", {
+                       "class": "ui-listview-filter ui-bar-" + listview.options.filterTheme,
+                       "role": "search"
+               }),
+               search = $( "<input>", {
+                       placeholder: listview.options.filterPlaceholder
+               })
+               .attr( "data-" + $.mobile.ns + "type", "search" )
+               .jqmData( "lastval", "" )
+               .bind( "keyup change", function() {
+
+                       var $this = $( this ),
+                               val = this.value.toLowerCase(),
+                               listItems = null,
+                               lastval = $this.jqmData( "lastval" ) + "",
+                               childItems = false,
+                               itemtext = "",
+                               item,
+                               // Check if a custom filter callback applies
+                               isCustomFilterCallback = listview.options.filterCallback !== defaultFilterCallback;
+
+                       listview._trigger( "beforefilter", "beforefilter", { input: this } );
+
+                       // Change val as lastval for next execution
+                       $this.jqmData( "lastval" , val );
+                       if ( isCustomFilterCallback || val.length < lastval.length || val.indexOf( lastval ) !== 0 ) {
+
+                               // Custom filter callback applies or removed chars or pasted something totally different, check all items
+                               listItems = list.children();
+                       } else {
+
+                               // Only chars added, not removed, only use visible subset
+                               listItems = list.children( ":not(.ui-screen-hidden)" );
+                       }
+
+                       if ( val ) {
+
+                               // This handles hiding regular rows without the text we search for
+                               // and any list dividers without regular rows shown under it
+
+                               for ( var i = listItems.length - 1; i >= 0; i-- ) {
+                                       item = $( listItems[ i ] );
+                                       itemtext = item.jqmData( "filtertext" ) || item.text();
+
+                                       if ( item.is( "li:jqmData(role=list-divider)" ) ) {
+
+                                               item.toggleClass( "ui-filter-hidequeue" , !childItems );
+
+                                               // New bucket!
+                                               childItems = false;
+
+                                       } else if ( listview.options.filterCallback( itemtext, val, item ) ) {
+
+                                               //mark to be hidden
+                                               item.toggleClass( "ui-filter-hidequeue" , true );
+                                       } else {
+
+                                               // There's a shown item in the bucket
+                                               childItems = true;
+                                       }
+                               }
+
+                               // Show items, not marked to be hidden
+                               listItems
+                                       .filter( ":not(.ui-filter-hidequeue)" )
+                                       .toggleClass( "ui-screen-hidden", false );
+
+                               // Hide items, marked to be hidden
+                               listItems
+                                       .filter( ".ui-filter-hidequeue" )
+                                       .toggleClass( "ui-screen-hidden", true )
+                                       .toggleClass( "ui-filter-hidequeue", false );
+
+                       } else {
+
+                               //filtervalue is empty => show all
+                               listItems.toggleClass( "ui-screen-hidden", false );
+                       }
+                       listview._refreshCorners();
+               })
+               .appendTo( wrapper )
+               .textinput();
+
+       if ( listview.options.inset ) {
+               wrapper.addClass( "ui-listview-filter-inset" );
+       }
+
+       wrapper.bind( "submit", function() {
+               return false;
+       })
+       .insertBefore( list );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.slider", $.mobile.widget, {
+       widgetEventPrefix: "slide",
+
+       options: {
+               theme: null,
+               trackTheme: null,
+               disabled: false,
+               initSelector: "input[type='range'], :jqmData(type='range'), :jqmData(role='slider')",
+               mini: false
+       },
+
+       _create: function() {
+
+               // TODO: Each of these should have comments explain what they're for
+               var self = this,
+
+                       control = this.element,
+
+                       parentTheme = $.mobile.getInheritedTheme( control, "c" ),
+
+                       theme = this.options.theme || parentTheme,
+
+                       trackTheme = this.options.trackTheme || parentTheme,
+
+                       cType = control[ 0 ].nodeName.toLowerCase(),
+
+                       selectClass = ( cType === "select" ) ? "ui-slider-switch" : "",
+
+                       controlID = control.attr( "id" ),
+
+                       $label = $( "[for='" + controlID + "']" ),
+
+                       labelID = $label.attr( "id" ) || controlID + "-label",
+
+                       label = $label.attr( "id", labelID ),
+
+                       val = function() {
+                               return  cType === "input"  ? parseFloat( control.val() ) : control[0].selectedIndex;
+                       },
+
+                       min =  cType === "input" ? parseFloat( control.attr( "min" ) ) : 0,
+
+                       max =  cType === "input" ? parseFloat( control.attr( "max" ) ) : control.find( "option" ).length-1,
+
+                       step = window.parseFloat( control.attr( "step" ) || 1 ),
+
+                       inlineClass = ( this.options.inline || control.jqmData( "inline" ) === true ) ? " ui-slider-inline" : "",
+
+                       miniClass = ( this.options.mini || control.jqmData( "mini" ) ) ? " ui-slider-mini" : "",
+
+
+                       domHandle = document.createElement( 'a' ),
+                       handle = $( domHandle ),
+                       domSlider = document.createElement( 'div' ),
+                       slider = $( domSlider ),
+
+                       valuebg = control.jqmData( "highlight" ) !== false && cType !== "select" ? (function() {
+                               var bg = document.createElement('div');
+                               bg.className = 'ui-slider-bg ' + $.mobile.activeBtnClass + ' ui-btn-corner-all';
+                               return $( bg ).prependTo( slider );
+                       })() : false,
+
+                       options;
+
+               this._type = cType;
+
+               domHandle.setAttribute( 'href', "#" );
+               domSlider.setAttribute('role','application');
+               domSlider.className = ['ui-slider ',selectClass," ui-btn-down-",trackTheme,' ui-btn-corner-all', inlineClass, miniClass].join( "" );
+               domHandle.className = 'ui-slider-handle';
+               domSlider.appendChild( domHandle );
+
+               if ( $( control ).find( "option" ).length && $( control ).find( "option" ).text() === "" ) {
+                       $( domSlider ).addClass( "ui-toggle-switch" );
+               }
+
+               handle.buttonMarkup({ corners: true, theme: theme, shadow: true })
+                               .attr({
+                                       "role": "slider",
+                                       "aria-valuemin": min,
+                                       "aria-valuemax": max,
+                                       "aria-valuenow": val(),
+                                       "aria-valuetext": val(),
+                                       "title": val(),
+                                       "aria-labelledby": labelID
+                               });
+
+               $.extend( this, {
+                       slider: slider,
+                       handle: handle,
+                       valuebg: valuebg,
+                       dragging: false,
+                       beforeStart: null,
+                       userModified: false,
+                       mouseMoved: false
+               });
+
+               if ( cType === "select" ) {
+                       var wrapper = document.createElement('div');
+                       wrapper.className = 'ui-slider-inneroffset';
+
+                       for ( var j = 0,length = domSlider.childNodes.length;j < length;j++ ) {
+                               wrapper.appendChild( domSlider.childNodes[j] );
+                       }
+
+                       domSlider.appendChild( wrapper );
+
+                       // slider.wrapInner( "<div class='ui-slider-inneroffset'></div>" );
+
+                       // make the handle move with a smooth transition
+                       handle.addClass( "ui-slider-handle-snapping" );
+
+                       options = control.find( "option" );
+
+                       for ( var i = 0, optionsCount = options.length; i < optionsCount; i++ ) {
+                               var side = !i ? "b" : "a",
+                                       sliderTheme = !i ? " ui-btn-down-" + trackTheme : ( " " + $.mobile.activeBtnClass ),
+                                       sliderLabel = document.createElement( 'div' ),
+                                       sliderImg = document.createElement( 'span' );
+
+                               sliderImg.className = ['ui-slider-label ui-slider-label-',side,sliderTheme," ui-btn-corner-all"].join( "" );
+                               sliderImg.setAttribute('role','img');
+                               sliderImg.appendChild( document.createTextNode( options[i].innerHTML ) );
+                               $( sliderImg ).html() ? $( sliderImg ).html( $( sliderImg ).text() ) : $( sliderImg ).html();
+                               $(sliderImg).prependTo( slider );
+                       }
+
+                       self._labels = $( ".ui-slider-label", slider );
+
+               }
+
+               label.addClass( "ui-slider" );
+
+               // monitor the input for updated values
+               control.addClass( cType === "input" ? "ui-slider-input" : "ui-slider-switch" )
+                       .change(function() {
+                               // if the user dragged the handle, the "change" event was triggered from inside refresh(); don't call refresh() again
+                               if ( !self.mouseMoved ) {
+                                       self.refresh( val(), true );
+                               }
+                       })
+                       .keyup(function() { // necessary?
+                               self.refresh( val(), true, true );
+                       })
+                       .blur(function() {
+                               self.refresh( val(), true );
+                       });
+
+               this._preventDocumentDrag = function( event ) {
+                       // NOTE: we don't do this in refresh because we still want to
+                       //       support programmatic alteration of disabled inputs
+                       if ( self.dragging && !self.options.disabled ) {
+
+                               // self.mouseMoved must be updated before refresh() because it will be used in the control "change" event
+                               self.mouseMoved = true;
+
+                               if ( cType === "select" ) {
+                                       // make the handle move in sync with the mouse
+                                       handle.removeClass( "ui-slider-handle-snapping" );
+                               }
+
+                               self.refresh( event );
+
+                               // only after refresh() you can calculate self.userModified
+                               self.userModified = self.beforeStart !== control[0].selectedIndex;
+                               return false;
+                       }
+               }
+
+               this._on( $( document ), { "vmousemove": this._preventDocumentDrag });
+
+               // it appears the clicking the up and down buttons in chrome on
+               // range/number inputs doesn't trigger a change until the field is
+               // blurred. Here we check thif the value has changed and refresh
+               control.bind( "vmouseup", $.proxy( self._checkedRefresh, self));
+
+               slider.bind( "vmousedown", function( event ) {
+                       // NOTE: we don't do this in refresh because we still want to
+                       //       support programmatic alteration of disabled inputs
+                       if ( self.options.disabled ) {
+                               return false;
+                       }
+
+                       self.dragging = true;
+                       self.userModified = false;
+                       self.mouseMoved = false;
+
+                       if ( cType === "select" ) {
+                               self.beforeStart = control[0].selectedIndex;
+                       }
+
+                       self.refresh( event );
+                       self._trigger( "start" );
+                       return false;
+               })
+               .bind( "vclick", false );
+
+               this._sliderMouseUp = function() {
+                       if ( self.dragging ) {
+                               self.dragging = false;
+
+                               if ( cType === "select") {
+                                       // make the handle move with a smooth transition
+                                       handle.addClass( "ui-slider-handle-snapping" );
+
+                                       if ( self.mouseMoved ) {
+                                               // this is a drag, change the value only if user dragged enough
+                                               if ( self.userModified ) {
+                                                   self.refresh( self.beforeStart === 0 ? 1 : 0 );
+                                               }
+                                               else {
+                                                   self.refresh( self.beforeStart );
+                                               }
+                                       }
+                                       else {
+                                               // this is just a click, change the value
+                                               self.refresh( self.beforeStart === 0 ? 1 : 0 );
+                                       }
+                               }
+
+                               self.mouseMoved = false;
+                               self._trigger( "stop" );
+                               return false;
+                       }
+               };
+
+               this._on( slider.add( document ), { "vmouseup": this._sliderMouseUp });
+               slider.insertAfter( control );
+
+               // Only add focus class to toggle switch, sliders get it automatically from ui-btn
+               if ( cType === 'select' ) {
+                       this.handle.bind({
+                               focus: function() {
+                                       slider.addClass( $.mobile.focusClass );
+                               },
+
+                               blur: function() {
+                                       slider.removeClass( $.mobile.focusClass );
+                               }
+                       });
+               }
+
+               this.handle.bind({
+                       // NOTE force focus on handle
+                       vmousedown: function() {
+                               $( this ).focus();
+                       },
+
+                       vclick: false,
+
+                       keydown: function( event ) {
+                               var index = val();
+
+                               if ( self.options.disabled ) {
+                                       return;
+                               }
+
+                               // In all cases prevent the default and mark the handle as active
+                               switch ( event.keyCode ) {
+                                       case $.mobile.keyCode.HOME:
+                                       case $.mobile.keyCode.END:
+                                       case $.mobile.keyCode.PAGE_UP:
+                                       case $.mobile.keyCode.PAGE_DOWN:
+                                       case $.mobile.keyCode.UP:
+                                       case $.mobile.keyCode.RIGHT:
+                                       case $.mobile.keyCode.DOWN:
+                                       case $.mobile.keyCode.LEFT:
+                                               event.preventDefault();
+
+                                               if ( !self._keySliding ) {
+                                                       self._keySliding = true;
+                                                       $( this ).addClass( "ui-state-active" );
+                                               }
+                                               break;
+                               }
+
+                               // move the slider according to the keypress
+                               switch ( event.keyCode ) {
+                                       case $.mobile.keyCode.HOME:
+                                               self.refresh( min );
+                                               break;
+                                       case $.mobile.keyCode.END:
+                                               self.refresh( max );
+                                               break;
+                                       case $.mobile.keyCode.PAGE_UP:
+                                       case $.mobile.keyCode.UP:
+                                       case $.mobile.keyCode.RIGHT:
+                                               self.refresh( index + step );
+                                               break;
+                                       case $.mobile.keyCode.PAGE_DOWN:
+                                       case $.mobile.keyCode.DOWN:
+                                       case $.mobile.keyCode.LEFT:
+                                               self.refresh( index - step );
+                                               break;
+                               }
+                       }, // remove active mark
+
+                       keyup: function( event ) {
+                               if ( self._keySliding ) {
+                                       self._keySliding = false;
+                                       $( this ).removeClass( "ui-state-active" );
+                               }
+                       }
+                       });
+
+               this.refresh( undefined, undefined, true );
+       },
+
+       _checkedRefresh: function() {
+               if( this.value != this._value() ){
+                       this.refresh( this._value() );
+               }
+       },
+
+       _value: function() {
+               return  this._type === "input" ?
+                       parseFloat( this.element.val() ) : this.element[0].selectedIndex;
+       },
+
+       refresh: function( val, isfromControl, preventInputUpdate ) {
+               var imgToggle = false,
+                       appHandle;
+
+               if ( $( this.handle ).parents().is( ".ui-toggle-switch" ) ) {
+                       imgToggle = true;
+               }
+               // NOTE: we don't return here because we want to support programmatic
+               //       alteration of the input value, which should still update the slider
+               if ( this.options.disabled || this.element.attr('disabled')) {
+                       this.disable();
+               }
+
+               // set the stored value for comparison later
+               this.value = this._value();
+
+               var control = this.element, percent,
+                       cType = control[0].nodeName.toLowerCase(),
+                       min = cType === "input" ? parseFloat( control.attr( "min" ) ) : 0,
+                       max = cType === "input" ? parseFloat( control.attr( "max" ) ) : control.find( "option" ).length - 1,
+                       step = ( cType === "input" && parseFloat( control.attr( "step" ) ) > 0 ) ? parseFloat( control.attr( "step" ) ) : 1;
+
+               if ( typeof val === "object" ) {
+                       var data = val,
+                               // a slight tolerance helped get to the ends of the slider
+                               tol = 8;
+                       if ( !this.dragging ||
+                                       data.pageX < this.slider.offset().left - tol ||
+                                       data.pageX > this.slider.offset().left + this.slider.width() + tol ) {
+                               return;
+                       }
+                       percent = Math.round( ( ( data.pageX - this.slider.offset().left ) / this.slider.width() ) * 100 );
+               } else {
+                       if ( val == null ) {
+                               val = cType === "input" ? parseFloat( control.val() || 0 ) : control[0].selectedIndex;
+                       }
+                       percent = ( parseFloat( val ) - min ) / ( max - min ) * 100;
+               }
+
+               if ( isNaN( percent ) ) {
+                       return;
+               }
+
+               if ( percent < 0 ) {
+                       percent = 0;
+               }
+
+               if ( percent > 100 ) {
+                       percent = 100;
+               }
+
+               var newval = ( percent / 100 ) * ( max - min ) + min;
+
+               //from jQuery UI slider, the following source will round to the nearest step
+               var valModStep = ( newval - min ) % step;
+               var alignValue = newval - valModStep;
+
+               if ( Math.abs( valModStep ) * 2 >= step ) {
+                       alignValue += ( valModStep > 0 ) ? step : ( -step );
+               }
+               // Since JavaScript has problems with large floats, round
+               // the final value to 5 digits after the decimal point (see jQueryUI: #4124)
+               newval = parseFloat( alignValue.toFixed(5) );
+
+               if ( newval < min ) {
+                       newval = min;
+               }
+
+               if ( newval > max ) {
+                       newval = max;
+               }
+
+               this.handle.css( "left", percent + "%" );
+               this.handle.attr( {
+                               "aria-valuenow": cType === "input" ? newval : control.find( "option" ).eq( newval ).attr( "value" ),
+                               "aria-valuetext": cType === "input" ? newval : control.find( "option" ).eq( newval ).getEncodedText(),
+                               title: cType === "input" ? newval : control.find( "option" ).eq( newval ).getEncodedText()
+                       });
+
+               if ( !imgToggle ) {
+                       if ( this.valuebg ) {
+                               this.valuebg.css( "width", percent + "%" );
+                       }
+               }
+
+               // drag the label widths
+               if ( imgToggle ) {
+                       appHandle = $( this.handle ).parents( ".ui-slider" );
+                       if ( $( this.handle ).attr("aria-valuenow") === "on" ) {
+                               appHandle.children( "span.ui-slider-label-a" ).show();
+                               appHandle.children( "span.ui-slider-label-b" ).hide();
+                       } else {
+                               appHandle.children( "span.ui-slider-label-b" ).show();
+                               appHandle.children( "span.ui-slider-label-a" ).hide();
+                       }
+               } else {
+                       if ( this._labels ) {
+                               var handlePercent = this.handle.width() / this.slider.width() * 100,
+                                       aPercent = percent && handlePercent + ( 100 - handlePercent ) * percent / 100,
+                                       bPercent = percent === 100 ? 0 : Math.min( handlePercent + 100 - aPercent, 100 );
+
+                               this._labels.each(function() {
+                                       var ab = $( this ).is( ".ui-slider-label-a" );
+                                       $( this ).width( ( ab ? aPercent : bPercent  ) + "%" );
+                               });
+                       }
+               }
+
+               if ( !preventInputUpdate ) {
+                       var valueChanged = false;
+
+                       // update control"s value
+                       if ( cType === "input" ) {
+                               valueChanged = control.val() !== newval;
+                               control.val( newval );
+                       } else {
+                               valueChanged = control[ 0 ].selectedIndex !== newval;
+                               control[ 0 ].selectedIndex = newval;
+                       }
+                       if ( !isfromControl && valueChanged ) {
+                               control.trigger( "change" );
+                       }
+               }
+       },
+
+       enable: function() {
+               this.element.attr( "disabled", false );
+               this.slider.removeClass( "ui-disabled" ).attr( "aria-disabled", false );
+               return this._setOption( "disabled", false );
+       },
+
+       disable: function() {
+               this.element.attr( "disabled", true );
+               this.slider.addClass( "ui-disabled" ).attr( "aria-disabled", true );
+               return this._setOption( "disabled", true );
+       }
+
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ) {
+       $.mobile.slider.prototype.enhanceWithin( e.target, true );
+});
+
+})( jQuery );
+
+(function( $, undefined ) {
+
+$.widget( "mobile.selectmenu", $.mobile.widget, {
+       options: {
+               theme: null,
+               disabled: false,
+               icon: "arrow-d",
+               iconpos: "right",
+               inline: false,
+               corners: true,
+               shadow: true,
+               iconshadow: true,
+               overlayTheme: "a",
+               hidePlaceholderMenuItems: true,
+               closeText: "Close",
+               nativeMenu: true,
+               // This option defaults to true on iOS devices.
+               preventFocusZoom: /iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1,
+               initSelector: "select:not( :jqmData(role='slider') )",
+               mini: false
+       },
+
+       _button: function() {
+               return $( "<div/>" );
+       },
+
+       _setDisabled: function( value ) {
+               this.element.attr( "disabled", value );
+               this.button.attr( "aria-disabled", value );
+               return this._setOption( "disabled", value );
+       },
+
+       _focusButton : function() {
+               var self = this;
+
+               setTimeout( function() {
+                       self.button.focus();
+               }, 40);
+       },
+
+       _selectOptions: function() {
+               return this.select.find( "option" );
+       },
+
+       // setup items that are generally necessary for select menu extension
+       _preExtension: function() {
+               var classes = "";
+               // TODO: Post 1.1--once we have time to test thoroughly--any classes manually applied to the original element should be carried over to the enhanced element, with an `-enhanced` suffix. See https://github.com/jquery/jquery-mobile/issues/3577
+               /* if ( $el[0].className.length ) {
+                       classes = $el[0].className;
+               } */
+               if ( !!~this.element[0].className.indexOf( "ui-btn-left" ) ) {
+                       classes =  " ui-btn-left";
+               }
+
+               if (  !!~this.element[0].className.indexOf( "ui-btn-right" ) ) {
+                       classes = " ui-btn-right";
+               }
+
+               this.select = this.element.wrap( "<div class='ui-select" + classes + "'>" );
+               this.selectID  = this.select.attr( "id" );
+               this.label = $( "label[for='"+ this.selectID +"']" ).addClass( "ui-select" );
+               this.isMultiple = this.select[ 0 ].multiple;
+               if ( !this.options.theme ) {
+                       this.options.theme = $.mobile.getInheritedTheme( this.select, "c" );
+               }
+       },
+
+       _create: function() {
+               this._preExtension();
+
+               // Allows for extension of the native select for custom selects and other plugins
+               // see select.custom for example extension
+               // TODO explore plugin registration
+               this._trigger( "beforeCreate" );
+
+               this.button = this._button();
+
+               var self = this,
+
+                       options = this.options,
+
+                       inline = options.inline || this.select.jqmData( "inline" ),
+                       mini = options.mini || this.select.jqmData( "mini" ),
+                       iconpos = options.icon ? ( options.iconpos || this.select.jqmData( "iconpos" ) ) : false,
+
+                       // IE throws an exception at options.item() function when
+                       // there is no selected item
+                       // select first in this case
+                       selectedIndex = this.select[ 0 ].selectedIndex === -1 ? 0 : this.select[ 0 ].selectedIndex,
+
+                       // TODO values buttonId and menuId are undefined here
+                       button = this.button
+                               .insertBefore( this.select )
+                               .buttonMarkup( {
+                                       theme: options.theme,
+                                       icon: options.icon,
+                                       iconpos: iconpos,
+                                       inline: inline,
+                                       corners: options.corners,
+                                       shadow: options.shadow,
+                                       iconshadow: options.iconshadow,
+                                       mini: mini
+                               });
+
+               this.setButtonText();
+
+               // Opera does not properly support opacity on select elements
+               // In Mini, it hides the element, but not its text
+               // On the desktop,it seems to do the opposite
+               // for these reasons, using the nativeMenu option results in a full native select in Opera
+               if ( options.nativeMenu && window.opera && window.opera.version ) {
+                       button.addClass( "ui-select-nativeonly" );
+               }
+
+               // Add counter for multi selects
+               if ( this.isMultiple ) {
+                       this.buttonCount = $( "<span>" )
+                               .addClass( "ui-li-count ui-btn-up-c ui-btn-corner-all" )
+                               .hide()
+                               .appendTo( button.addClass('ui-li-has-count') );
+               }
+
+               // Disable if specified
+               if ( options.disabled || this.element.attr('disabled')) {
+                       this.disable();
+               }
+
+               // Events on native select
+               this.select.change(function() {
+                       self.refresh();
+               });
+
+               this.build();
+       },
+
+       build: function() {
+               var self = this;
+
+               this.select
+                       .appendTo( self.button )
+                       .bind( "vmousedown", function() {
+                               // Add active class to button
+                               self.button.addClass( $.mobile.activeBtnClass );
+                       })
+                       .bind( "focus", function() {
+                               self.button.addClass( $.mobile.focusClass );
+                       })
+                       .bind( "blur", function() {
+                               self.button.removeClass( $.mobile.focusClass );
+                       })
+                       .bind( "focus vmouseover", function() {
+                               self.button.trigger( "vmouseover" );
+                       })
+                       .bind( "vmousemove", function() {
+                               // Remove active class on scroll/touchmove
+                               self.button.removeClass( $.mobile.activeBtnClass );
+                       })
+                       .bind( "change blur vmouseout", function() {
+                               self.button.trigger( "vmouseout" )
+                                       .removeClass( $.mobile.activeBtnClass );
+                       })
+                       .bind( "change blur", function() {
+                               self.button.removeClass( "ui-btn-down-" + self.options.theme );
+                       });
+
+               // In many situations, iOS will zoom into the select upon tap, this prevents that from happening
+               self.button.bind( "vmousedown", function() {
+                       if ( self.options.preventFocusZoom ) {
+                               $.mobile.zoom.disable( true );
+                       }
+               }).bind( "mouseup", function() {
+                       if ( self.options.preventFocusZoom ) {
+                               setTimeout(function() {
+                                       $.mobile.zoom.enable( true );
+                               }, 0);
+                       }
+               });
+       },
+
+       selected: function() {
+               return this._selectOptions().filter( ":selected" );
+       },
+
+       selectedIndices: function() {
+               var self = this;
+
+               return this.selected().map(function() {
+                       return self._selectOptions().index( this );
+               }).get();
+       },
+
+       setButtonText: function() {
+               var self = this,
+                       selected = this.selected(),
+                       text = this.placeholder,
+                       span = $( document.createElement( "span" ) );
+
+               this.button.find( ".ui-btn-text" ).html(function() {
+                       if ( selected.length ) {
+                               text = selected.map(function() {
+                                       return $( this ).text();
+                               }).get().join( ", " );
+                       } else {
+                               text = self.placeholder;
+                       }
+
+                       // TODO possibly aggregate multiple select option classes
+                       return span.text( text )
+                               .addClass( self.select.attr( "class" ) )
+                               .addClass( selected.attr( "class" ) );
+               });
+       },
+
+       setButtonCount: function() {
+               var selected = this.selected();
+
+               // multiple count inside button
+               if ( this.isMultiple ) {
+                       this.buttonCount[ selected.length > 1 ? "show" : "hide" ]().text( selected.length );
+               }
+       },
+
+       refresh: function() {
+               this.setButtonText();
+               this.setButtonCount();
+       },
+
+       // open and close preserved in native selects
+       // to simplify users code when looping over selects
+       open: $.noop,
+       close: $.noop,
+
+       disable: function() {
+               this._setDisabled( true );
+               this.button.addClass( "ui-disabled" );
+       },
+
+       enable: function() {
+               this._setDisabled( false );
+               this.button.removeClass( "ui-disabled" );
+       }
+});
+
+//auto self-init widgets
+$( document ).bind( "pagecreate create", function( e ) {
+       $.mobile.selectmenu.prototype.enhanceWithin( e.target, true );
+});
+})( jQuery );
+
+/*
+* custom "selectmenu" plugin
+*/
+
+(function( $, undefined ) {
+       var extendSelect = function( widget ) {
+
+               var select = widget.select,
+                       selectID  = widget.selectID,
+                       label = widget.label,
+                       thisPage = widget.select.closest( ".ui-page" ),
+                       selectOptions = widget._selectOptions(),
+                       isMultiple = widget.isMultiple = widget.select[ 0 ].multiple,
+                       buttonId = selectID + "-button",
+                       menuId = selectID + "-menu",
+                       menuPage = $( "<div data-" + $.mobile.ns + "role='dialog' data-" +$.mobile.ns + "theme='"+ widget.options.theme +"' data-" +$.mobile.ns + "overlay-theme='"+ widget.options.overlayTheme +"'>" +
+                               "<div data-" + $.mobile.ns + "role='header'>" +
+                               "<div class='ui-title'>" + label.getEncodedText() + "</div>"+
+                               "</div>"+
+                               "<div data-" + $.mobile.ns + "role='content'></div>"+
+                               "</div>" ),
+
+                       listbox =  $( "<div>", { "class": "ui-selectmenu" } ).insertAfter( widget.select ).popup( { theme: "a" } ),
+
+                       list = $( "<ul>", {
+                               "class": "ui-selectmenu-list",
+                               "id": menuId,
+                               "role": "listbox",
+                               "aria-labelledby": buttonId
+                       }).attr( "data-" + $.mobile.ns + "theme", widget.options.theme ).appendTo( listbox ),
+
+                       header = $( "<div>", {
+                               "class": "ui-header ui-bar-" + widget.options.theme
+                       }).prependTo( listbox ),
+
+                       headerTitle = $( "<h1>", {
+                               "class": "ui-title"
+                       }).appendTo( header ),
+
+                       menuPageContent,
+                       menuPageClose,
+                       headerClose;
+
+               if ( widget.isMultiple ) {
+                       headerClose = $( "<a>", {
+                               "text": widget.options.closeText,
+                               "href": "#",
+                               "class": "ui-btn-left"
+                       }).attr( "data-" + $.mobile.ns + "iconpos", "notext" ).attr( "data-" + $.mobile.ns + "icon", "delete" ).appendTo( header ).buttonMarkup();
+               }
+
+               $.extend( widget, {
+                       select: widget.select,
+                       selectID: selectID,
+                       buttonId: buttonId,
+                       menuId: menuId,
+                       thisPage: thisPage,
+                       menuPage: menuPage,
+                       label: label,
+                       selectOptions: selectOptions,
+                       isMultiple: isMultiple,
+                       theme: widget.options.theme,
+                       listbox: listbox,
+                       list: list,
+                       header: header,
+                       headerTitle: headerTitle,
+                       headerClose: headerClose,
+                       menuPageContent: menuPageContent,
+                       menuPageClose: menuPageClose,
+                       placeholder: "",
+
+                       build: function() {
+                               var self = this;
+
+                               // Create list from select, update state
+                               self.refresh();
+
+                               self.select.attr( "tabindex", "-1" ).focus(function() {
+                                       $( this ).blur();
+                                       self.button.focus();
+                               });
+
+                               // Button events
+                               self.button.bind( "vclick keydown" , function( event ) {
+                                       if (event.type === "vclick" ||
+                                                       event.keyCode && (event.keyCode === $.mobile.keyCode.ENTER ||
+                                                                                                                               event.keyCode === $.mobile.keyCode.SPACE)) {
+
+                                               self.open();
+                                               event.preventDefault();
+                                       }
+                               });
+
+                               // Events for list items
+                               self.list.attr( "role", "listbox" )
+                                       .bind( "focusin", function( e ) {
+                                               $( e.target )
+                                                       .attr( "tabindex", "0" )
+                                                       .trigger( "vmouseover" );
+
+                                       })
+                                       .bind( "focusout", function( e ) {
+                                               $( e.target )
+                                                       .attr( "tabindex", "-1" )
+                                                       .trigger( "vmouseout" );
+                                       })
+                                       .delegate( "li:not(.ui-disabled, .ui-li-divider)", "click", function( event ) {
+
+                                               // index of option tag to be selected
+                                               var oldIndex = self.select[ 0 ].selectedIndex,
+                                                       newIndex = self.list.find( "li:not(.ui-li-divider)" ).index( this ),
+                                                       option = self._selectOptions().eq( newIndex )[ 0 ];
+
+                                               // toggle selected status on the tag for multi selects
+                                               option.selected = self.isMultiple ? !option.selected : true;
+
+                                               // toggle checkbox class for multiple selects
+                                               if ( self.isMultiple ) {
+                                                       $( this ).find( ".ui-icon" )
+                                                               .toggleClass( "ui-icon-checkbox-on", option.selected )
+                                                               .toggleClass( "ui-icon-checkbox-off", !option.selected );
+                                               }
+
+                                               // trigger change if value changed
+                                               if ( self.isMultiple || oldIndex !== newIndex ) {
+                                                       self.select.trigger( "change" );
+                                               }
+
+                                               // hide custom select for single selects only - otherwise focus clicked item
+                                               // We need to grab the clicked item the hard way, because the list may have been rebuilt
+                                               if ( self.isMultiple ) {
+                                                       self.list.find( "li:not(.ui-li-divider)" ).eq( newIndex )
+                                                               .addClass( "ui-btn-down-" + widget.options.theme ).find( "a" ).first().focus();
+                                               }
+                                               else {
+                                                       self.close();
+                                               }
+
+                                               event.preventDefault();
+                                       })
+                                       .keydown(function( event ) {  //keyboard events for menu items
+                                               var target = $( event.target ),
+                                                       li = target.closest( "li" ),
+                                                       prev, next;
+
+                                               // switch logic based on which key was pressed
+                                               switch ( event.keyCode ) {
+                                                       // up or left arrow keys
+                                               case 38:
+                                                       prev = li.prev().not( ".ui-selectmenu-placeholder" );
+
+                                                       if ( prev.is( ".ui-li-divider" ) ) {
+                                                               prev = prev.prev();
+                                                       }
+
+                                                       // if there's a previous option, focus it
+                                                       if ( prev.length ) {
+                                                               target
+                                                                       .blur()
+                                                                       .attr( "tabindex", "-1" );
+
+                                                               prev.addClass( "ui-btn-down-" + widget.options.theme ).find( "a" ).first().focus();
+                                                       }
+
+                                                       return false;
+                                                       // down or right arrow keys
+                                               case 40:
+                                                       next = li.next();
+
+                                                       if ( next.is( ".ui-li-divider" ) ) {
+                                                               next = next.next();
+                                                       }
+
+                                                       // if there's a next option, focus it
+                                                       if ( next.length ) {
+                                                               target
+                                                                       .blur()
+                                                                       .attr( "tabindex", "-1" );
+
+                                                               next.addClass( "ui-btn-down-" + widget.options.theme ).find( "a" ).first().focus();
+                                                       }
+
+                                                       return false;
+                                                       // If enter or space is pressed, trigger click
+                                               case 13:
+                                               case 32:
+                                                       target.trigger( "click" );
+
+                                                       return false;
+                                               }
+                                       });
+
+                               // button refocus ensures proper height calculation
+                               // by removing the inline style and ensuring page inclusion
+                               self.menuPage.bind( "pagehide", function() {
+                                       self.list.appendTo( self.listbox );
+                                       self._focusButton();
+
+                                       // TODO centralize page removal binding / handling in the page plugin.
+                                       // Suggestion from @jblas to do refcounting
+                                       //
+                                       // TODO extremely confusing dependency on the open method where the pagehide.remove
+                                       // bindings are stripped to prevent the parent page from disappearing. The way
+                                       // we're keeping pages in the DOM right now sucks
+                                       //
+                                       // rebind the page remove that was unbound in the open function
+                                       // to allow for the parent page removal from actions other than the use
+                                       // of a dialog sized custom select
+                                       //
+                                       // doing this here provides for the back button on the custom select dialog
+                                       $.mobile._bindPageRemove.call( self.thisPage );
+                               });
+
+                               // Events on the popup
+                               self.listbox.bind( "popupafterclose", function( event ) {
+                                       self.close();
+                               });
+
+                               // Close button on small overlays
+                               if ( self.isMultiple ) {
+                                       self.headerClose.click(function() {
+                                               if ( self.menuType === "overlay" ) {
+                                                       self.close();
+                                                       return false;
+                                               }
+                                       });
+                               }
+
+                               // track this dependency so that when the parent page
+                               // is removed on pagehide it will also remove the menupage
+                               self.thisPage.addDependents( this.menuPage );
+                       },
+
+                       _isRebuildRequired: function() {
+                               var list = this.list.find( "li" ),
+                                       options = this._selectOptions();
+
+                               // TODO exceedingly naive method to determine difference
+                               // ignores value changes etc in favor of a forcedRebuild
+                               // from the user in the refresh method
+                               return options.text() !== list.text();
+                       },
+
+                       selected: function() {
+                               return this._selectOptions().filter( ":selected:not( :jqmData(placeholder='true') )" );
+                       },
+
+                       refresh: function( forceRebuild , foo ) {
+                               var self = this,
+                               select = this.element,
+                               isMultiple = this.isMultiple,
+                               indicies;
+
+                               if (  forceRebuild || this._isRebuildRequired() ) {
+                                       self._buildList();
+                               }
+
+                               indicies = this.selectedIndices();
+
+                               self.setButtonText();
+                               self.setButtonCount();
+
+                               self.list.find( "li:not(.ui-li-divider)" )
+                                       .removeClass( $.mobile.activeBtnClass )
+                                       .attr( "aria-selected", false )
+                                       .each(function( i ) {
+
+                                               if ( $.inArray( i, indicies ) > -1 ) {
+                                                       var item = $( this );
+
+                                                       // Aria selected attr
+                                                       item.attr( "aria-selected", true );
+
+                                                       // Multiple selects: add the "on" checkbox state to the icon
+                                                       if ( self.isMultiple ) {
+                                                               item.find( ".ui-icon" ).removeClass( "ui-icon-checkbox-off" ).addClass( "ui-icon-checkbox-on" );
+                                                       } else {
+                                                               if ( item.is( ".ui-selectmenu-placeholder" ) ) {
+                                                                       item.next().addClass( $.mobile.activeBtnClass );
+                                                               } else {
+                                                                       item.addClass( $.mobile.activeBtnClass );
+                                                               }
+                                                       }
+                                               }
+                                       });
+                       },
+
+                       close: function() {
+                               if ( this.options.disabled || !this.isOpen ) {
+                                       return;
+                               }
+
+                               var self = this;
+
+                               if ( self.menuType === "page" ) {
+                                       // doesn't solve the possible issue with calling change page
+                                       // where the objects don't define data urls which prevents dialog key
+                                       // stripping - changePage has incoming refactor
+                                       $.mobile.back();
+                               } else {
+                                       self.listbox.popup( "close" );
+                                       self.list.appendTo( self.listbox );
+                                       self._focusButton();
+                               }
+
+                               // allow the dialog to be closed again
+                               self.isOpen = false;
+                       },
+
+                       open: function() {
+                               if ( this.options.disabled ) {
+                                       return;
+                               }
+
+                               var self = this,
+                                       $window = $( window ),
+                                       selfListParent = self.list.parent(),
+                                       menuHeight = selfListParent.outerHeight(),
+                                       menuWidth = selfListParent.outerWidth(),
+                                       activePage = $( "." + $.mobile.activePageClass ),
+                                       scrollTop = $window.scrollTop(),
+                                       btnOffset = self.button.offset().top,
+                                       screenHeight = $window.height(),
+                                       screenWidth = $window.width();
+
+                               //add active class to button
+                               self.button.addClass( $.mobile.activeBtnClass );
+
+                               //remove after delay
+                               setTimeout( function() {
+                                       self.button.removeClass( $.mobile.activeBtnClass );
+                               }, 300);
+
+                               function focusMenuItem() {
+                                       var selector = self.list.find( "." + $.mobile.activeBtnClass + " a" );
+                                       if ( selector.length === 0 ) {
+                                               selector = self.list.find( "li.ui-btn:not( :jqmData(placeholder='true') ) a" );
+                                       }
+                                       selector.first().focus().closest( "li" ).addClass( "ui-btn-down-" + widget.options.theme );
+                               }
+
+                               if ( menuHeight > screenHeight - 80 || !$.support.scrollTop ) {
+
+                                       self.menuPage.appendTo( $.mobile.pageContainer ).page();
+                                       self.menuPageContent = menuPage.find( ".ui-content" );
+                                       self.menuPageClose = menuPage.find( ".ui-header a" );
+
+                                       // prevent the parent page from being removed from the DOM,
+                                       // otherwise the results of selecting a list item in the dialog
+                                       // fall into a black hole
+                                       self.thisPage.unbind( "pagehide.remove" );
+
+                                       //for WebOS/Opera Mini (set lastscroll using button offset)
+                                       if ( scrollTop === 0 && btnOffset > screenHeight ) {
+                                               self.thisPage.one( "pagehide", function() {
+                                                       $( this ).jqmData( "lastScroll", btnOffset );
+                                               });
+                                       }
+
+                                       self.menuPage.one( "pageshow", function() {
+                                               focusMenuItem();
+                                               self.isOpen = true;
+                                       });
+
+                                       self.menuType = "page";
+                                       self.menuPageContent.append( self.list );
+                                       self.menuPage.find("div .ui-title").text(self.label.text());
+                                       $.mobile.changePage( self.menuPage, {
+                                               transition: $.mobile.defaultDialogTransition
+                                       });
+                               } else {
+                                       self.menuType = "overlay";
+
+                                       self.listbox
+                                               .one( "popupafteropen", focusMenuItem )
+                                               .popup( "open", {
+                                                       x: self.button.offset().left + self.button.outerWidth() / 2,
+                                                       y: self.button.offset().top + self.button.outerHeight() / 2
+                                               });
+
+                                       // duplicate with value set in page show for dialog sized selects
+                                       self.isOpen = true;
+                               }
+                       },
+
+                       _buildList: function() {
+                               var self = this,
+                                       o = this.options,
+                                       placeholder = this.placeholder,
+                                       needPlaceholder = true,
+                                       optgroups = [],
+                                       lis = [],
+                                       dataIcon = self.isMultiple ? "checkbox-off" : "false";
+
+                               self.list.empty().filter( ".ui-listview" ).listview( "destroy" );
+
+                               var $options = self.select.find( "option" ),
+                                       numOptions = $options.length,
+                                       select = this.select[ 0 ],
+                                       dataPrefix = 'data-' + $.mobile.ns,
+                                       dataIndexAttr = dataPrefix + 'option-index',
+                                       dataIconAttr = dataPrefix + 'icon',
+                                       dataRoleAttr = dataPrefix + 'role',
+                                       dataPlaceholderAttr = dataPrefix + 'placeholder',
+                                       fragment = document.createDocumentFragment(),
+                                       isPlaceholderItem = false,
+                                       optGroup;
+
+                               for (var i = 0; i < numOptions;i++, isPlaceholderItem = false) {
+                                       var option = $options[i],
+                                               $option = $( option ),
+                                               parent = option.parentNode,
+                                               text = $option.text(),
+                                               anchor  = document.createElement( 'a' ),
+                                               classes = [];
+
+                                       anchor.setAttribute( 'href', '#' );
+                                       anchor.appendChild( document.createTextNode( text ) );
+
+                                       // Are we inside an optgroup?
+                                       if ( parent !== select && parent.nodeName.toLowerCase() === "optgroup" ) {
+                                               var optLabel = parent.getAttribute( 'label' );
+                                               if ( optLabel !== optGroup ) {
+                                                       var divider = document.createElement( 'li' );
+                                                       divider.setAttribute( dataRoleAttr, 'list-divider' );
+                                                       divider.setAttribute( 'role', 'option' );
+                                                       divider.setAttribute( 'tabindex', '-1' );
+                                                       divider.appendChild( document.createTextNode( optLabel ) );
+                                                       fragment.appendChild( divider );
+                                                       optGroup = optLabel;
+                                               }
+                                       }
+
+                                       if ( needPlaceholder && ( !option.getAttribute( "value" ) || text.length === 0 || $option.jqmData( "placeholder" ) ) ) {
+                                               needPlaceholder = false;
+                                               isPlaceholderItem = true;
+
+                                               // If we have identified a placeholder, mark it retroactively in the select as well
+                                               option.setAttribute( dataPlaceholderAttr, true );
+                                               if ( o.hidePlaceholderMenuItems ) {
+                                                       classes.push( "ui-selectmenu-placeholder" );
+                                               }
+                                               if (!placeholder) {
+                                                       placeholder = self.placeholder = text;
+                                               }
+                                       }
+
+                                       var item = document.createElement('li');
+                                       if ( option.disabled ) {
+                                               classes.push( "ui-disabled" );
+                                               item.setAttribute('aria-disabled',true);
+                                       }
+                                       item.setAttribute( dataIndexAttr,i );
+                                       item.setAttribute( dataIconAttr, dataIcon );
+                                       if ( isPlaceholderItem ) {
+                                               item.setAttribute( dataPlaceholderAttr, true );
+                                       }
+                                       item.className = classes.join( " " );
+                                       item.setAttribute( 'role', 'option' );
+                                       anchor.setAttribute( 'tabindex', '-1' );
+                                       item.appendChild( anchor );
+                                       fragment.appendChild( item );
+                               }
+
+                               self.list[0].appendChild( fragment );
+
+                               // Hide header if it's not a multiselect and there's no placeholder
+                               if ( !this.isMultiple && !placeholder.length ) {
+                                       this.header.hide();
+                               } else {
+                                       this.headerTitle.text( this.placeholder );
+                               }
+
+                               // Now populated, create listview
+                               self.list.listview();
+                       },
+
+                       _button: function() {
+                               return $( "<a>", {
+                                       "href": "#",
+                                       "role": "button",
+                                       // TODO value is undefined at creation
+                                       "id": this.buttonId,
+                                       "aria-haspopup": "true",
+
+                                       // TODO value is undefined at creation
+                                       "aria-owns": this.menuId
+                               });
+                       }
+               });
+       };
+
+       // issue #3894 - core doesn't trigger events on disabled delegates
+       $( document ).bind( "selectmenubeforecreate", function( event ) {
+               var selectmenuWidget = $( event.target ).data( "selectmenu" );
+
+               if ( !selectmenuWidget.options.nativeMenu &&
+                               selectmenuWidget.element.parents( ":jqmData(role='popup')" ).length === 0 ) {
+                       extendSelect( selectmenuWidget );
+               }
+       });
+})( jQuery );
+
+(function( $, undefined ) {
+
+
+       $.widget( "mobile.fixedtoolbar", $.mobile.widget, {
+               options: {
+                       visibleOnPageShow: true,
+                       disablePageZoom: true,
+                       transition: "slide", //can be none, fade, slide (slide maps to slideup or slidedown)
+                       fullscreen: false,
+                       tapToggle: true,
+                       tapToggleBlacklist: "a, button, input, select, textarea, .ui-header-fixed, .ui-footer-fixed, .ui-popup",
+                       hideDuringFocus: "input, textarea, select",
+                       updatePagePadding: true,
+                       trackPersistentToolbars: true,
+
+                       // Browser detection! Weeee, here we go...
+                       // Unfortunately, position:fixed is costly, not to mention probably impossible, to feature-detect accurately.
+                       // Some tests exist, but they currently return false results in critical devices and browsers, which could lead to a broken experience.
+                       // Testing fixed positioning is also pretty obtrusive to page load, requiring injected elements and scrolling the window
+                       // The following function serves to rule out some popular browsers with known fixed-positioning issues
+                       // This is a plugin option like any other, so feel free to improve or overwrite it
+                       supportBlacklist: function() {
+                               var w = window,
+                                       ua = navigator.userAgent,
+                                       platform = navigator.platform,
+                                       // Rendering engine is Webkit, and capture major version
+                                       wkmatch = ua.match( /AppleWebKit\/([0-9]+)/ ),
+                                       wkversion = !!wkmatch && wkmatch[ 1 ],
+                                       ffmatch = ua.match( /Fennec\/([0-9]+)/ ),
+                                       ffversion = !!ffmatch && ffmatch[ 1 ],
+                                       operammobilematch = ua.match( /Opera Mobi\/([0-9]+)/ ),
+                                       omversion = !!operammobilematch && operammobilematch[ 1 ];
+
+                               if(
+                                       // iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5)
+                                       ( ( platform.indexOf( "iPhone" ) > -1 || platform.indexOf( "iPad" ) > -1  || platform.indexOf( "iPod" ) > -1 ) && wkversion && wkversion < 534 ) ||
+                                       // Opera Mini
+                                       ( w.operamini && ({}).toString.call( w.operamini ) === "[object OperaMini]" ) ||
+                                       ( operammobilematch && omversion < 7458 )       ||
+                                       //Android lte 2.1: Platform is Android and Webkit version is less than 533 (Android 2.2)
+                                       ( ua.indexOf( "Android" ) > -1 && wkversion && wkversion < 533 ) ||
+                                       // Firefox Mobile before 6.0 -
+                                       ( ffversion && ffversion < 6 ) ||
+                                       // WebOS less than 3
+                                       ( "palmGetResource" in window && wkversion && wkversion < 534 ) ||
+                                       // MeeGo
+                                       ( ua.indexOf( "MeeGo" ) > -1 && ua.indexOf( "NokiaBrowser/8.5.0" ) > -1 ) ) {
+                                       return true;
+                               }
+
+                               return false;
+                       },
+                       initSelector: ":jqmData(position='dummy')"
+               },
+
+               _create: function() {
+
+                       var self = this,
+                               o = self.options,
+                               $el = self.element,
+                               tbtype = $el.is( ":jqmData(role='header')" ) ? "header" : "footer",
+                               $page = $el.closest( ".ui-page" );
+
+                       // Feature detecting support for
+                       if ( o.supportBlacklist() ) {
+                               self.destroy();
+                               return;
+                       }
+
+                       $el.addClass( "ui-"+ tbtype +"-fixed" );
+
+                       // "fullscreen" overlay positioning
+                       if ( o.fullscreen ) {
+                               $el.addClass( "ui-"+ tbtype +"-fullscreen" );
+                               $page.addClass( "ui-page-" + tbtype + "-fullscreen" );
+                       }
+                       // If not fullscreen, add class to page to set top or bottom padding
+                       else{
+                               $page.addClass( "ui-page-" + tbtype + "-fixed" );
+                       }
+
+                       self._addTransitionClass();
+                       self._bindPageEvents();
+                       self._bindToggleHandlers();
+               },
+
+               _addTransitionClass: function() {
+                       var tclass = this.options.transition;
+
+                       if ( tclass && tclass !== "none" ) {
+                               // use appropriate slide for header or footer
+                               if ( tclass === "slide" ) {
+                                       tclass = this.element.is( ".ui-header" ) ? "slidedown" : "slideup";
+                               }
+
+                               this.element.addClass( tclass );
+                       }
+               },
+
+               _bindPageEvents: function() {
+                       var self = this,
+                               o = self.options,
+                               $el = self.element;
+
+                       //page event bindings
+                       // Fixed toolbars require page zoom to be disabled, otherwise usability issues crop up
+                       // This method is meant to disable zoom while a fixed-positioned toolbar page is visible
+                       $el.closest( ".ui-page" )
+                               .bind( "pagebeforeshow", function() {
+                                       if ( o.disablePageZoom ) {
+                                               $.mobile.zoom.disable( true );
+                                       }
+                                       if ( !o.visibleOnPageShow ) {
+                                               self.hide( true );
+                                       }
+                               } )
+                               .bind( "webkitAnimationStart animationstart updatelayout", function() {
+                                       var thisPage = this;
+                                       if ( o.updatePagePadding ) {
+                                               self.updatePagePadding( thisPage );
+                                       }
+                               })
+                               .bind( "pageshow", function() {
+                                       var thisPage = this;
+                                       self.updatePagePadding( thisPage );
+                                       if ( o.updatePagePadding ) {
+                                               $( window ).bind( "throttledresize." + self.widgetName, function() {
+                                                       self.updatePagePadding( thisPage );
+                                               });
+                                       }
+                               })
+                               .bind( "pagebeforehide", function( e, ui ) {
+                                       if ( o.disablePageZoom ) {
+                                               $.mobile.zoom.enable( true );
+                                       }
+                                       if ( o.updatePagePadding ) {
+                                               $( window ).unbind( "throttledresize." + self.widgetName );
+                                       }
+
+                                       if ( o.trackPersistentToolbars ) {
+                                               var thisFooter = $( ".ui-footer-fixed:jqmData(id)", this ),
+                                                       thisHeader = $( ".ui-header-fixed:jqmData(id)", this ),
+                                                       nextFooter = thisFooter.length && ui.nextPage && $( ".ui-footer-fixed:jqmData(id='" + thisFooter.jqmData( "id" ) + "')", ui.nextPage ) || $(),
+                                                       nextHeader = thisHeader.length && ui.nextPage && $( ".ui-header-fixed:jqmData(id='" + thisHeader.jqmData( "id" ) + "')", ui.nextPage ) || $();
+
+                                                       if ( nextFooter.length || nextHeader.length ) {
+
+                                                               nextFooter.add( nextHeader ).appendTo( $.mobile.pageContainer );
+
+                                                               ui.nextPage.one( "pageshow", function() {
+                                                                       nextFooter.add( nextHeader ).appendTo( this );
+                                                               });
+                                                       }
+                                       }
+                               });
+               },
+
+               _visible: true,
+
+               // This will set the content element's top or bottom padding equal to the toolbar's height
+               updatePagePadding: function( tbPage ) {
+                       var $el = this.element,
+                               header = $el.is( ".ui-header" );
+
+                       // This behavior only applies to "fixed", not "fullscreen"
+                       if ( this.options.fullscreen ) { return; }
+
+                       tbPage = tbPage || $el.closest( ".ui-page" );
+                       $( tbPage ).css( "padding-" + ( header ? "top" : "bottom" ), $el.outerHeight() );
+               },
+
+               _useTransition: function( notransition ) {
+                       var $win = $( window ),
+                               $el = this.element,
+                               scroll = $win.scrollTop(),
+                               elHeight = $el.height(),
+                               pHeight = $el.closest( ".ui-page" ).height(),
+                               viewportHeight = $.mobile.getScreenHeight(),
+                               tbtype = $el.is( ":jqmData(role='header')" ) ? "header" : "footer";
+
+                       return !notransition &&
+                               ( this.options.transition && this.options.transition !== "none" &&
+                               (
+                                       ( tbtype === "header" && !this.options.fullscreen && scroll > elHeight ) ||
+                                       ( tbtype === "footer" && !this.options.fullscreen && scroll + viewportHeight < pHeight - elHeight )
+                               ) || this.options.fullscreen
+                               );
+               },
+
+               show: function( notransition ) {
+                       var hideClass = "ui-fixed-hidden",
+                               $el = this.element;
+
+                       if ( this._useTransition( notransition ) ) {
+                               $el
+                                       .removeClass( "out " + hideClass )
+                                       .addClass( "in" );
+                       }
+                       else {
+                               $el.removeClass( hideClass );
+                       }
+                       this._visible = true;
+               },
+
+               hide: function( notransition ) {
+                       var hideClass = "ui-fixed-hidden",
+                               $el = this.element,
+                               // if it's a slide transition, our new transitions need the reverse class as well to slide outward
+                               outclass = "out" + ( this.options.transition === "slide" ? " reverse" : "" );
+
+                       if( this._useTransition( notransition ) ) {
+                               $el
+                                       .addClass( outclass )
+                                       .removeClass( "in" )
+                                       .animationComplete(function() {
+                                               $el.addClass( hideClass ).removeClass( outclass );
+                                       });
+                       }
+                       else {
+                               $el.addClass( hideClass ).removeClass( outclass );
+                       }
+                       this._visible = false;
+               },
+
+               toggle: function() {
+                       this[ this._visible ? "hide" : "show" ]();
+               },
+
+               _bindToggleHandlers: function() {
+                       var self = this,
+                               o = self.options,
+                               $el = self.element;
+
+                       // tap toggle
+                       $el.closest( ".ui-page" )
+                               .bind( "vclick", function( e ) {
+                                       if ( o.tapToggle && !$( e.target ).closest( o.tapToggleBlacklist ).length ) {
+                                               self.toggle();
+                                       }
+                               })
+                               .bind( "focusin focusout", function( e ) {
+                                       if ( screen.width < 500 && $( e.target ).is( o.hideDuringFocus ) && !$( e.target ).closest( ".ui-header-fixed, .ui-footer-fixed" ).length ) {
+                                               self[ ( e.type === "focusin" && self._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" );
+               }
+
+       });
+
+       //auto self-init widgets
+       $( document )
+               .bind( "pagecreate create", function( e ) {
+
+                       // DEPRECATED in 1.1: support for data-fullscreen=true|false on the page element.
+                       // This line ensures it still works, but we recommend moving the attribute to the toolbars themselves.
+                       if ( $( e.target ).jqmData( "fullscreen" ) ) {
+                               $( $.mobile.fixedtoolbar.prototype.options.initSelector, e.target ).not( ":jqmData(fullscreen)" ).jqmData( "fullscreen", true );
+                       }
+
+                       $.mobile.fixedtoolbar.prototype.enhanceWithin( e.target );
+               });
+
+})( jQuery );
+
+(function( $, window ) {
+
+       // This fix addresses an iOS bug, so return early if the UA claims it's something else.
+       if ( !(/iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1 ) ) {
+               return;
+       }
+
+  var zoom = $.mobile.zoom,
+               evt, x, y, z, aig;
+
+  function checkTilt( e ) {
+               evt = e.originalEvent;
+               aig = evt.accelerationIncludingGravity;
+
+               x = Math.abs( aig.x );
+               y = Math.abs( aig.y );
+               z = Math.abs( aig.z );
+
+               // If portrait orientation and in one of the danger zones
+    if ( !window.orientation && ( x > 7 || ( ( z > 6 && y < 8 || z < 8 && y > 6 ) && x > 5 ) ) ) {
+                       if ( zoom.enabled ) {
+                               zoom.disable();
+                       }
+    }  else if ( !zoom.enabled ) {
+                       zoom.enable();
+    }
+  }
+
+  $( window )
+               .bind( "orientationchange.iosorientationfix", zoom.enable )
+               .bind( "devicemotion.iosorientationfix", checkTilt );
+
+}( jQuery, this ));
+
+(function( $, window, undefined ) {
+       var     $html = $( "html" ),
+                       $head = $( "head" ),
+                       $window = $( window );
+
+       //remove initial build class (only present on first pageshow)
+       function hideRenderingClass() {
+               $html.removeClass( "ui-mobile-rendering" );
+       }
+
+       // trigger mobileinit event - useful hook for configuring $.mobile settings before they're used
+       $( window.document ).trigger( "mobileinit" );
+
+       // support conditions
+       // if device support condition(s) aren't met, leave things as they are -> a basic, usable experience,
+       // otherwise, proceed with the enhancements
+       if ( !$.mobile.gradeA() ) {
+               return;
+       }
+
+       // override ajaxEnabled on platforms that have known conflicts with hash history updates
+       // or generally work better browsing in regular http for full page refreshes (BB5, Opera Mini)
+       if ( $.mobile.ajaxBlacklist ) {
+               $.mobile.ajaxEnabled = false;
+       }
+
+       // Add mobile, initial load "rendering" classes to docEl
+       $html.addClass( "ui-mobile ui-mobile-rendering" );
+
+       // This is a fallback. If anything goes wrong (JS errors, etc), or events don't fire,
+       // this ensures the rendering class is removed after 5 seconds, so content is visible and accessible
+       setTimeout( hideRenderingClass, 5000 );
+
+       $.extend( $.mobile, {
+               addEventBlocker: function () {
+                       $html.addClass( "ui-blocker" );
+                       $html.bind( "touchstart touchend vclick mousedown mouseup click", function () {
+                               return false;
+                       } );
+               },
+
+               removeEventBlocker: function () {
+                       $html.removeClass( "ui-blocker" );
+                       $html.unbind( "touchstart touchend vclick mousedown mouseup click" );
+               },
+
+               // find and enhance the pages in the dom and transition to the first page.
+               initializePage: function() {
+                       // find present pages
+                       var $pages = $( ":jqmData(role='page'), :jqmData(role='dialog')" ),
+                               hash = $.mobile.path.parseLocation().hash.replace("#", ""),
+                               hashPage = document.getElementById( hash );
+
+                       // if no pages are found, create one with body's inner html
+                       if ( !$pages.length ) {
+                               $pages = $( "body" ).wrapInner( "<div data-" + $.mobile.ns + "role='page'></div>" ).children( 0 );
+                       }
+
+                       // add dialogs, set data-url attrs
+                       $pages.each(function() {
+                               var $this = $( this );
+
+                               // unless the data url is already set set it to the pathname
+                               if ( !$this.jqmData( "url" ) ) {
+                                       $this.attr( "data-" + $.mobile.ns + "url", $this.attr( "id" ) || location.pathname + location.search );
+                               }
+                       });
+
+                       // define first page in dom case one backs out to the directory root (not always the first page visited, but defined as fallback)
+                       $.mobile.firstPage = $pages.first();
+
+                       // define page container
+                       $.mobile.pageContainer = $pages.first().parent().addClass( "ui-mobile-viewport" );
+
+                       // alert listeners that the pagecontainer has been determined for binding
+                       // to events triggered on it
+                       $window.trigger( "pagecontainercreate" );
+
+                       // cue page loading message
+                       $.mobile.showPageLoadingMsg();
+                       $.mobile.addEventBlocker();
+
+                       //remove initial build class (only present on first pageshow)
+                       hideRenderingClass();
+
+                       // if hashchange listening is disabled, there's no hash deeplink,
+                       // the hash is not valid (contains more than one # or does not start with #)
+                       // or there is no page with that hash, change to the first page in the DOM
+                       // Remember, however, that the hash can also be a path!
+                       if ( ! ( $.mobile.hashListeningEnabled &&
+                               $.mobile.path.isHashValid( location.hash ) &&
+                               ( $( hashPage ).is( ':jqmData(role="page")' ) ||
+                                       $.mobile.path.isPath( hash ) ||
+                                       hash === $.mobile.dialogHashKey ) ) ) {
+
+                               // Store the initial destination
+                               if ( $.mobile.path.isHashValid( location.hash ) ) {
+                                       $.mobile.urlHistory.initialDst = hash.replace( "#", "" );
+                               }
+                               $.mobile.changePage( $.mobile.firstPage, { transition: "none", reverse: true, changeHash: false, fromHashChange: true } );
+                       }
+                       // otherwise, trigger a hashchange to load a deeplink
+                       else {
+                               $window.trigger( "hashchange", [ true ] );
+                       }
+               }
+       });
+
+       // initialize events now, after mobileinit has occurred
+       $.mobile.navreadyDeferred.resolve();
+
+       // check which scrollTop value should be used by scrolling to 1 immediately at domready
+       // then check what the scroll top is. Android will report 0... others 1
+       // note that this initial scroll won't hide the address bar. It's just for the check.
+       $(function() {
+               window.scrollTo( 0, 1 );
+
+               // if defaultHomeScroll hasn't been set yet, see if scrollTop is 1
+               // it should be 1 in most browsers, but android treats 1 as 0 (for hiding addr bar)
+               // so if it's 1, use 0 from now on
+               $.mobile.defaultHomeScroll = ( !$.support.scrollTop || $( window ).scrollTop() === 1 ) ? 0 : 1;
+
+
+               // TODO: Implement a proper registration mechanism with dependency handling in order to not have exceptions like the one below
+               //auto self-init widgets for those widgets that have a soft dependency on others
+               if ( $.fn.controlgroup ) {
+                       $( document ).bind( "pagecreate create", function( e ) {
+                               $( ":jqmData(role='controlgroup')", e.target )
+                                       .jqmEnhanceable()
+                                       .controlgroup({ excludeInvisible: false });
+                       });
+               }
+
+               //dom-ready inits
+               if ( $.mobile.autoInitializePage ) {
+                       $.mobile.initializePage();
+               }
+
+               // window load event
+               // hide iOS browser chrome on load
+               $window.load( $.mobile.silentScroll );
+
+               if ( !$.support.cssPointerEvents ) {
+                       // IE and Opera don't support CSS pointer-events: none that we use to disable link-based buttons
+                       // by adding the 'ui-disabled' class to them. Using a JavaScript workaround for those browser.
+                       // https://github.com/jquery/jquery-mobile/issues/3558
+
+                       $( document ).delegate( ".ui-disabled", "vclick",
+                               function( e ) {
+                                       e.preventDefault();
+                                       e.stopImmediatePropagation();
+                               }
+                       );
+               }
+       });
+}( jQuery, this ));
+
+}));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.min.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.min.js
new file mode 100644 (file)
index 0000000..267f38a
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
+ *
+ * Uses the built in easing capabilities added In jQuery 1.1
+ * to offer multiple easing options
+ *
+ * TERMS OF USE - jQuery Easing
+ * 
+ * Open source under the BSD License. 
+ * 
+ * Copyright © 2008 George McGinley Smith
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without modification, 
+ * are permitted provided that the following conditions are met:
+ * 
+ * Redistributions of source code must retain the above copyright notice, this list of 
+ * conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list 
+ * of conditions and the following disclaimer in the documentation and/or other materials 
+ * provided with the distribution.
+ * 
+ * Neither the name of the author nor the names of contributors may be used to endorse 
+ * or promote products derived from this software without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
+ * OF THE POSSIBILITY OF SUCH DAMAGE. 
+ *
+*/// t: current time, b: begInnIng value, c: change In value, d: duration
+jQuery.easing.jswing=jQuery.easing.swing,jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(a,b,c,d,e){return jQuery.easing[jQuery.easing.def](a,b,c,d,e)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b+c:-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b+c:d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b+c:-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){return(b/=e/2)<1?d/2*b*b*b*b*b+c:d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){return b==0?c:b==e?c+d:(b/=e/2)<1?d/2*Math.pow(2,10*(b-1))+c:d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){return(b/=e/2)<1?-d/2*(Math.sqrt(1-b*b)-1)+c:d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e/2)==2)return c+d;g||(g=e*.3*1.5);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return b<1?-0.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c:h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)*.5+d+c},easeInBack:function(a,b,c,d,e,f){return f==undefined&&(f=1.70158),d*(b/=e)*b*((f+1)*b-f)+c},easeOutBack:function(a,b,c,d,e,f){return f==undefined&&(f=1.70158),d*((b=b/e-1)*b*((f+1)*b+f)+1)+c},easeInOutBack:function(a,b,c,d,e,f){return f==undefined&&(f=1.70158),(b/=e/2)<1?d/2*b*b*(((f*=1.525)+1)*b-f)+c:d/2*((b-=2)*b*(((f*=1.525)+1)*b+f)+2)+c},easeInBounce:function(a,b,c,d,e){return d-jQuery.easing.easeOutBounce(a,e-b,0,d,e)+c},easeOutBounce:function(a,b,c,d,e){return(b/=e)<1/2.75?d*7.5625*b*b+c:b<2/2.75?d*(7.5625*(b-=1.5/2.75)*b+.75)+c:b<2.5/2.75?d*(7.5625*(b-=2.25/2.75)*b+.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+.984375)+c},easeInOutBounce:function(a,b,c,d,e){return b<e/2?jQuery.easing.easeInBounce(a,b*2,0,d,e)*.5+c:jQuery.easing.easeOutBounce(a,b*2-e,0,d,e)*.5+d*.5+c}});
+/*!
+ * jQuery Templates Plugin 1.0.0pre
+ * http://github.com/jquery/jquery-tmpl
+ * Requires jQuery 1.4.2
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */(function(a,b){function m(b,c,d,e){var h={data:e||e===0||e===!1?e:c?c.data:{},_wrap:c?c._wrap:null,tmpl:null,parent:c||null,nodes:[],calls:u,nest:v,wrap:w,html:x,update:y};return b&&a.extend(h,b,{nodes:[],parent:c}),d&&(h.tmpl=d,h._ctnt=h._ctnt||h.tmpl(a,h),h.key=++j,(l.length?g:f)[j]=h),h}function n(b,c,e){var f,g=e?a.map(e,function(a){return typeof a=="string"?b.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+b.key+'" $2'):a:n(a,b,a._ctnt)}):b;return c?g:(g=g.join(""),g.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(b,c,d,e){f=a(d).get(),t(f),c&&(f=o(c).concat(f)),e&&(f=f.concat(o(e)))}),f?f:o(g))}function o(b){var c=document.createElement("div");return c.innerHTML=b,a.makeArray(c.childNodes)}function p(b){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(b,c,d,e,f,g,h){var i=a.tmpl.tag[d],j,k,l;if(!i)throw"Unknown template tag: "+d;return j=i._default||[],g&&!/\w$/.test(f)&&(f+=g,g=""),f?(f=r(f),h=h?","+r(h)+")":g?")":"",k=g?f.indexOf(".")>-1?f+r(g):"("+f+").call($item"+h:f,l=g?k:"(typeof("+f+")==='function'?("+f+").call($item):("+f+"))"):l=k=j.$1||"null",e=r(e),"');"+i[c?"close":"open"].split("$notnull_1").join(f?"typeof("+f+")!=='undefined' && ("+f+")!=null":"true").split("$1a").join(l).split("$1").join(k).split("$2").join(e||j.$2||"")+"__.push('"})+"');}return __;")}function q(b,c){b._wrap=n(b,!0,a.isArray(c)?c:[e.test(c)?c:a(c).html()]).join("")}function r(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function s(a){var b=document.createElement("div");return b.appendChild(a.cloneNode(!0)),b.innerHTML}function t(b){function p(b){function p(a){a+=c,n=i[a]=i[a]||m(n,f[n.parent.key+c]||n.parent)}var e,h=b,l,n,o;if(o=b.getAttribute(d)){while(h.parentNode&&(h=h.parentNode).nodeType===1&&!(e=h.getAttribute(d)));e!==o&&(h=h.parentNode?h.nodeType===11?0:h.getAttribute(d)||0:0,(n=f[o])||(n=g[o],n=m(n,f[h]||g[h]),n.key=++j,f[j]=n),k&&p(o)),b.removeAttribute(d)}else k&&(n=a.data(b,"tmplItem"))&&(p(n.key),f[n.key]=n,h=a.data(b.parentNode,"tmplItem"),h=h?h.key:0);if(n){l=n;while(l&&l.key!=h)l.nodes.push(b),l=l.parent;delete n._ctnt,delete n._wrap,a.data(b,"tmplItem",n)}}var c="_"+k,e,h,i={},l,n,o;for(l=0,n=b.length;l<n;l++){if((e=b[l]).nodeType!==1)continue;h=e.getElementsByTagName("*");for(o=h.length-1;o>=0;o--)p(h[o]);p(e)}}function u(a,b,c,d){if(!a)return l.pop();l.push({_:a,tmpl:b,item:this,data:c,options:d})}function v(b,c,d){return a.tmpl(a.template(b),c,d,this)}function w(b,c){var d=b.options||{};return d.wrapped=c,a.tmpl(a.template(b.tmpl),b.data,d,b.item)}function x(b,c){var d=this._wrap;return a.map(a(a.isArray(d)?d.join(""):d).filter(b||"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||s(a)})}function y(){var b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]),a(b).remove()}var c=a.fn.domManip,d="_tmplitem",e=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,f={},g={},h,i={key:0,data:{}},j=0,k=0,l=[];a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(b,c){a.fn[b]=function(d){var e=[],g=a(d),i,j,l,m,n=this.length===1&&this[0].parentNode;h=f||{};if(n&&n.nodeType===11&&n.childNodes.length===1&&g.length===1)g[c](this[0]),e=this;else{for(j=0,l=g.length;j<l;j++)k=j,i=(j>0?this.clone(!0):this).get(),a(g[j])[c](i),e=e.concat(i);k=0,e=this.pushStack(e,b,g.selector)}return m=h,h=null,a.tmpl.complete(m),e}}),a.fn.extend({tmpl:function(b,c,d){return a.tmpl(this[0],b,c,d)},tmplItem:function(){return a.tmplItem(this[0])},template:function(b){return a.template(b,this[0])},domManip:function(b,d,e,g){if(b[0]&&a.isArray(b[0])){var i=a.makeArray(arguments),j=b[0],l=j.length,m=0,n;while(m<l&&!(n=a.data(j[m++],"tmplItem")));n&&k&&(i[2]=function(b){a.tmpl.afterManip(this,b,e)}),c.apply(this,i)}else c.apply(this,arguments);return k=0,h||a.tmpl.complete(f),this}}),a.extend({tmpl:function(b,c,d,e){var h,j=!e;if(j)e=i,b=a.template[b]||a.template(null,b),g={};else if(!b)return b=e.tmpl,f[e.key]=e,e.nodes=[],e.wrapped&&q(e,e.wrapped),a(n(e,null,e.tmpl(a,e)));return b?(typeof c=="function"&&(c=c.call(e||{})),d&&d.wrapped&&q(d,d.wrapped),h=a.isArray(c)?a.map(c,function(a){return a?m(d,e,b,a):null}):[m(d,e,b,c)],j?a(n(e,null,h)):h):[]},tmplItem:function(b){var c;b instanceof a&&(b=b[0]);while(b&&b.nodeType===1&&!(c=a.data(b,"tmplItem"))&&(b=b.parentNode));return c||i},template:function(b,c){return c?(typeof c=="string"?c=p(c):c instanceof a&&(c=c[0]||{}),c.nodeType&&(c=a.data(c,"tmpl")||a.data(c,"tmpl",p(c.innerHTML))),typeof b=="string"?a.template[b]=c:c):b?typeof b!="string"?a.template(null,b):a.template[b]||a.template(null,e.test(b)?b:a(b)):null},encode:function(a){return(""+a).split("<").join("&lt;").split(">").join("&gt;").split('"').join("&#34;").split("'").join("&#39;")}}),a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(a){f={}},afterManip:function(c,d,e){var f=d.nodeType===11?a.makeArray(d.childNodes):d.nodeType===1?[d]:[];e.call(c,d),t(f),k++}})})(jQuery);
+/*
+* jQuery Mobile Framework Git Build: SHA1: 8f3c14b8b7b116570e29760a99cbdb8ca27a0307 <> Date: Mon Jan 28 22:00:34 2013 +0900
+* http://jquerymobile.com
+*
+* Copyright 2012 jQuery Foundation and other contributors
+* Released under the MIT license.
+* http://jquery.org/license
+*
+*/(function(a,b,c){typeof define=="function"&&define.amd?define(["jquery"],function(d){return c(d,a,b),d.mobile}):c(a.jQuery,a,b)})(this,document,function(a,b,c,d){(function(a,b,d){var e={};a.mobile=a.extend({},{version:"1.2.0",ns:"",subPageUrlKey:"ui-page",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",focusClass:"ui-focus",ajaxEnabled:!0,hashListeningEnabled:!0,linkBindingEnabled:!0,defaultPageTransition:"fade",maxTransitionWidth:!1,minScrollBack:250,touchOverflowEnabled:!1,defaultDialogTransition:"pop",pageLoadErrorMessage:"Error Loading Page",pageLoadErrorMessageTheme:"e",phonegapNavigationEnabled:!1,autoInitializePage:!0,pushStateEnabled:!0,ignoreContentEnabled:!1,orientationChangeEnabled:!0,buttonMarkup:{hoverDelay:200},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},silentScroll:function(d){a.type(d)!=="number"&&(d=a.mobile.defaultHomeScroll),a.event.special.scrollstart.enabled=!1,setTimeout(function(){b.scrollTo(0,d),a(c).trigger("silentscroll",{x:0,y:d})},20),setTimeout(function(){a.event.special.scrollstart.enabled=!0},150)},nsNormalizeDict:e,nsNormalize:function(b){if(!b)return;return e[b]||(e[b]=a.camelCase(a.mobile.ns+b))},getInheritedTheme:function(a,b){var c=a[0],d="",e=/ui-(bar|body|overlay)-([a-z])\b/,f,g;while(c){f=c.className||"";if(f&&(g=e.exec(f))&&(d=g[2]))break;c=c.parentNode}return d||b||"a"},closestPageData:function(a){return a.closest(':jqmData(role="page"), :jqmData(role="dialog")').data("page")},enhanceable:function(a){return this.haveParents(a,"enhance")},hijackable:function(a){return this.haveParents(a,"ajax")},haveParents:function(b,c){if(!a.mobile.ignoreContentEnabled)return b;var d=b.length,e=a(),f,g,h;for(var i=0;i<d;i++){g=b.eq(i),h=!1,f=b[i];while(f){var j=f.getAttribute?f.getAttribute("data-"+a.mobile.ns+c):"";if(j==="false"){h=!0;break}f=f.parentNode}h||(e=e.add(g))}return e},getScreenHeight:function(){return b.innerHeight||a(b).height()}},a.mobile),a.fn.jqmData=function(b,c){var e;return typeof b!="undefined"&&(b&&(b=a.mobile.nsNormalize(b)),arguments.length<2||c===d?e=this.data(b):e=this.data(b,c)),e},a.jqmData=function(b,c,d){var e;return typeof c!="undefined"&&(e=a.data(b,c?a.mobile.nsNormalize(c):c,d)),e},a.fn.jqmRemoveData=function(b){return this.removeData(a.mobile.nsNormalize(b))},a.jqmRemoveData=function(b,c){return a.removeData(b,a.mobile.nsNormalize(c))},a.fn.removeWithDependents=function(){a.removeWithDependents(this)},a.removeWithDependents=function(b){var c=a(b);(c.jqmData("dependents")||a()).remove(),c.remove()},a.fn.addDependents=function(b){a.addDependents(a(this),b)},a.addDependents=function(b,c){var d=a(b).jqmData("dependents")||a();a(b).jqmData("dependents",a.merge(d,c))},a.fn.getEncodedText=function(){return a("<div/>").text(a(this).text()).html()},a.fn.jqmEnhanceable=function(){return a.mobile.enhanceable(this)},a.fn.jqmHijackable=function(){return a.mobile.hijackable(this)};var f=a.find,g=/:jqmData\(([^)]*)\)/g;a.find=function(b,c,d,e){return b=b.replace(g,"[data-"+(a.mobile.ns||"")+"$1]"),f.call(this,b,c,d,e)},a.extend(a.find,f),a.find.matches=function(b,c){return a.find(b,null,null,c)},a.find.matchesSelector=function(b,c){return a.find(c,null,null,[b]).length>0}})(a,this),function(a,b){var c=0,d=Array.prototype.slice,e=a.cleanData;a.cleanData=function(b){for(var c=0,d;(d=b[c])!=null;c++)try{a(d).triggerHandler("remove")}catch(f){}e(b)},a.widget=function(b,c,d){var e,f,g,h,i=b.split(".")[0];b=b.split(".")[1],e=i+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][e]=function(b){return!!a.data(b,e)},a[i]=a[i]||{},f=a[i][b],g=a[i][b]=function(a,b){if(!this._createWidget)return new g(a,b);arguments.length&&this._createWidget(a,b)},a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]}),h=new c,h.options=a.widget.extend({},h.options),a.each(d,function(b,e){a.isFunction(e)&&(d[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},d=function(a){return c.prototype[b].apply(this,a)};return function(){var b=this._super,c=this._superApply,f;return this._super=a,this._superApply=d,f=e.apply(this,arguments),this._super=b,this._superApply=c,f}}())}),g.prototype=a.widget.extend(h,{widgetEventPrefix:b},d,{constructor:g,namespace:i,widgetName:b,widgetBaseClass:e,widgetFullName:e}),f?(a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)}),delete f._childConstructors):c._childConstructors.push(g),a.widget.bridge(b,g)},a.widget.extend=function(c){var e=d.call(arguments,1),f=0,g=e.length,h,i;for(;f<g;f++)for(h in e[f])i=e[f][h],e[f].hasOwnProperty(h)&&i!==b&&(c[h]=a.isPlainObject(i)?a.widget.extend({},c[h],i):i);return c},a.widget.bridge=function(c,e){var f=e.prototype.widgetFullName;a.fn[c]=function(g){var h=typeof g=="string",i=d.call(arguments,1),j=this;return g=!h&&i.length?a.widget.extend.apply(null,[g].concat(i)):g,h?this.each(function(){var d,e=a.data(this,f);if(!e)return a.error("cannot call methods on "+c+" prior to initialization; "+"attempted to call method '"+g+"'");if(!a.isFunction(e[g])||g.charAt(0)==="_")return a.error("no such method '"+g+"' for "+c+" widget instance");d=e[g].apply(e,i);if(d!==e&&d!==b)return j=d&&d.jquery?j.pushStack(d.get()):d,!1}):this.each(function(){var b=a.data(this,f);b?b.option(g||{})._init():new e(g,this)}),j}},a.Widget=function(a,b){},a.Widget._childConstructors=[],a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(b,d){d=a(d||this.defaultElement||this)[0],this.element=a(d),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=a.widget.extend({},this.options,this._getCreateOptions(),b),this.bindings=a(),this.hoverable=a(),this.focusable=a(),d!==this&&(a.data(d,this.widgetName,this),a.data(d,this.widgetFullName,this),this._on({remove:"destroy"}),this.document=a(d.style?d.ownerDocument:d.document||d),this.window=a(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(c,d){var e=c,f,g,h;if(arguments.length===0)return a.widget.extend({},this.options);if(typeof c=="string"){e={},f=c.split("."),c=f.shift();if(f.length){g=e[c]=a.widget.extend({},this.options[c]);for(h=0;h<f.length-1;h++)g[f[h]]=g[f[h]]||{},g=g[f[h]];c=f.pop();if(d===b)return g[c]===b?null:g[c];g[c]=d}else{if(d===b)return this.options[c]===b?null:this.options[c];e[c]=d}}return this._setOptions(e),this},_setOptions:function(a){var b;for(b in a)this._setOption(b,a[b]);return this},_setOption:function(a,b){return this.options[a]=b,a==="disabled"&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!b).attr("aria-disabled",b),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(b,c){c?(b=a(b),this.bindings=this.bindings.add(b)):(c=b,b=this.element);var d=this;a.each(c,function(c,e){function f(){if(d.options.disabled===!0||a(this).hasClass("ui-state-disabled"))return;return(typeof e=="string"?d[e]:e).apply(d,arguments)}typeof e!="string"&&(f.guid=e.guid=e.guid||f.guid||a.guid++);var g=c.match(/^(\w+)\s*(.*)$/),h=g[1]+d.eventNamespace,i=g[2];i?d.widget().delegate(i,h,f):b.bind(h,f)})},_off:function(a,b){b=(b||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,a.unbind(b).undelegate(b)},_delay:function(a,b){function c(){return(typeof a=="string"?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b),this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b),this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase(),c.target=this.element[0],f=c.originalEvent;if(f)for(e in f)e in c||(c[e]=f[e]);return this.element.trigger(c,d),!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===!1||c.isDefaultPrevented())}},a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){typeof e=="string"&&(e={effect:e});var g,h=e?e===!0||typeof e=="number"?c:e.effect||c:b;e=e||{},typeof e=="number"&&(e={duration:e}),g=!a.isEmptyObject(e),e.complete=f,e.delay&&d.delay(e.delay),g&&a.effects&&(a.effects.effect[h]||a.uiBackCompat!==!1&&a.effects[h])?d[b](e):h!==b&&d[h]?d[h](e.duration,e.easing,f):d.queue(function(c){a(this)[b](),f&&f.call(d[0]),c()})}}),a.uiBackCompat!==!1&&(a.Widget.prototype._getCreateOptions=function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]})}(a),function(a,b){a.widget("mobile.widget",{_createWidget:function(){a.Widget.prototype._createWidget.apply(this,arguments),this._trigger("init")},_getCreateOptions:function(){var c=this.element,d={};return a.each(this.options,function(a){var e=c.jqmData(a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()}));e!==b&&(d[a]=e)}),d},enhanceWithin:function(b,c){this.enhance(a(this.options.initSelector,a(b)),c)},enhance:function(b,c){var d,e,f=a(b),g=this;f=a.mobile.enhanceable(f),c&&f.length&&(d=a.mobile.closestPageData(f),e=d&&d.keepNativeSelector()||"",f=f.not(e)),f[this.widgetName]()},raise:function(a){throw"Widget ["+this.widgetName+"]: "+a}})}(a),function(a,b){a.extend(a.mobile,{loadingMessageTextVisible:d,loadingMessageTheme:d,loadingMessage:d,showPageLoadingMsg:function(b,c,d){a.mobile.loading("show",b,c,d)},hidePageLoadingMsg:function(){a.mobile.loading("hide")},loading:function(){this.loaderWidget.loader.apply(this.loaderWidget,arguments)}});var c="ui-loader",e=a("html"),f=a(b);a.widget("mobile.loader",{options:{theme:"a",textVisible:!1,html:"",text:"loading"},defaultHtml:"<div class='"+c+"'>"+"<span class='ui-icon ui-icon-loading'></span>"+"<h1></h1>"+"</div>",fakeFixLoader:function(){var b=a("."+a.mobile.activeBtnClass).first();this.element.css({top:a.support.scrollTop&&f.scrollTop()+f.height()/2||b.length&&b.offset().top||100})},checkLoaderPosition:function(){var b=this.element.offset(),c=f.scrollTop(),d=a.mobile.getScreenHeight();if(b.top<c||b.top-c>d)this.element.addClass("ui-loader-fakefix"),this.fakeFixLoader(),f.unbind("scroll",this.checkLoaderPosition).bind("scroll",this.fakeFixLoader)},resetHtml:function(){this.element.html(a(this.defaultHtml).html())},show:function(b,g,h){var i,j,k,l;this.resetHtml(),a.type(b)==="object"?(l=a.extend({},this.options,b),b=l.theme||a.mobile.loadingMessageTheme):(l=this.options,b=b||a.mobile.loadingMessageTheme||l.theme),j=g||a.mobile.loadingMessage||l.text,e.addClass("ui-loading");if(a.mobile.loadingMessage!==!1||l.html)a.mobile.loadingMessageTextVisible!==d?i=a.mobile.loadingMessageTextVisible:i=l.textVisible,this.element.attr("class",c+" ui-corner-all ui-body-"+b+" ui-loader-"+(i||g||b.text?"verbose":"default")+(l.textonly||h?" ui-loader-textonly":"")),l.html?this.element.html(l.html):this.element.find("h1").text(j),this.element.appendTo(a.mobile.pageContainer),this.checkLoaderPosition(),f.bind("scroll",a.proxy(this.checkLoaderPosition,this))},hide:function(){e.removeClass("ui-loading"),a.mobile.loadingMessage&&this.element.removeClass("ui-loader-fakefix"),a(b).unbind("scroll",a.proxy(this.fakeFixLoader,this)),a(b).unbind("scroll",a.proxy(this.checkLoaderPosition,this))}}),f.bind("pagecontainercreate",function(){a.mobile.loaderWidget=a.mobile.loaderWidget||a(a.mobile.loader.prototype.defaultHtml).loader()})}(a,this),function(a,b,c,d){function x(a){while(a&&typeof a.originalEvent!="undefined")a=a.originalEvent;return a}function y(b,c){var e=b.type,f,g,i,k,l,m,n,o,p;b=a.Event(b),b.type=c,f=b.originalEvent,g=a.event.props,e.search(/^(mouse|click)/)>-1&&(g=j);if(f)for(n=g.length,k;n;)k=g[--n],b[k]=f[k];e.search(/mouse(down|up)|click/)>-1&&!b.which&&(b.which=1);if(e.search(/^touch/)!==-1){i=x(f),e=i.touches,l=i.changedTouches,m=e&&e.length?e[0]:l&&l.length?l[0]:d;if(m)for(o=0,p=h.length;o<p;o++)k=h[o],b[k]=m[k]}return b}function z(b){var c={},d,f;while(b){d=a.data(b,e);for(f in d)d[f]&&(c[f]=c.hasVirtualBinding=!0);b=b.parentNode}return c}function A(b,c){var d;while(b){d=a.data(b,e);if(d&&(!c||d[c]))return b;b=b.parentNode}return null}function B(){r=!1}function C(){r=!0}function D(){v=0,p.length=0,q=!1,C()}function E(){B()}function F(){G(),l=setTimeout(function(){l=0,D()},a.vmouse.resetTimerDuration)}function G(){l&&(clearTimeout(l),l=0)}function H(b,c,d){var e;if(d&&d[b]||!d&&A(c.target,b))e=y(c,b),a(c.target).trigger(e);return e}function I(b){var c=a.data(b.target,f);if(a.support.touch===!0&&c===d)return;if(!q&&(!v||v!==c)){var e=H("v"+b.type,b);e&&(e.isDefaultPrevented()&&b.preventDefault(),e.isPropagationStopped()&&b.stopPropagation(),e.isImmediatePropagationStopped()&&b.stopImmediatePropagation())}}function J(b){var c=x(b).touches,d,e;if(c&&c.length===1){d=b.target,e=z(d);if(e.hasVirtualBinding){v=u++,a.data(d,f,v),G(),E(),o=!1;var g=x(b).touches[0];m=g.pageX,n=g.pageY,H("vmouseover",b,e),H("vmousedown",b,e)}}}function K(a){if(r)return;o||H("vmousecancel",a,z(a.target)),o=!0,F()}function L(b){if(r)return;var c=x(b).touches[0],d=o,e=a.vmouse.moveDistanceThreshold,f=z(b.target);o=o||Math.abs(c.pageX-m)>e||Math.abs(c.pageY-n)>e,o&&!d&&H("vmousecancel",b,f),H("vmousemove",b,f),F()}function M(a){if(r)return;C();var b=z(a.target),c;H("vmouseup",a,b);if(!o){var d=H("vclick",a,b);d&&d.isDefaultPrevented()&&(c=x(a).changedTouches[0],p.push({touchID:v,target:a.target,x:c.clientX,y:c.clientY}),q=!0)}H("vmouseout",a,b),o=!1,F()}function N(b){var c=a.data(b,e),d;if(c)for(d in c)if(c[d])return!0;return!1}function O(){}function P(b){var c=b.substr(1);return{setup:function(d,f){N(this)||a.data(this,e,{});var g=a.data(this,e);g[b]=!0,k[b]=(k[b]||0)+1,k[b]===1&&t.bind(c,I),a(this).bind(c,O),s&&(k.touchstart=(k.touchstart||0)+1,k.touchstart===1&&t.bind("touchstart",J).bind("touchend",M).bind("touchmove",L).bind("scroll",K))},teardown:function(d,f){--k[b],k[b]||t.unbind(c,I),s&&(--k.touchstart,k.touchstart||t.unbind("touchstart",J).unbind("touchmove",L).unbind("touchend",M).unbind("scroll",K));var g=a(this),h=a.data(this,e);h&&(h[b]=!1),g.unbind(c,O),N(this)||g.removeData(e)}}}var e="virtualMouseBindings",f="virtualTouchID",g="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),h="clientX clientY pageX pageY screenX screenY".split(" "),i=a.event.mouseHooks?a.event.mouseHooks.props:[],j=a.event.props.concat(i),k={},l=0,m=0,n=0,o=!1,p=[],q=!1,r=!1,s="addEventListener"in c,t=a(c),u=1,v=0,w;a.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,resetTimerDuration:1500};for(var Q=0;Q<g.length;Q++)a.event.special[g[Q]]=P(g[Q]);s&&c.addEventListener("click",function(b){var c=p.length,d=b.target,e,g,h,i,j,k;if(c){e=b.clientX,g=b.clientY,w=a.vmouse.clickDistanceThreshold,h=d;while(h){for(i=0;i<c;i++){j=p[i],k=0;if(h===d&&d===j.target&&Math.abs(j.x-e)<w&&Math.abs(j.y-g)<w||a.data(h,f)===j.touchID){b.preventDefault(),b.stopPropagation();return}}h=h.parentNode}}},!0)}(a,b,c),function(a,b){var d={touch:"ontouchend"in c};a.mobile=a.mobile||{},a.mobile.support=a.mobile.support||{},a.extend(a.support,d),a.extend(a.mobile.support,d)}(a),function(a,b,d){function j(b,c,e){var f=e.type;e.type=c,e.liveFired=d,a.event.handle.call(b,e),e.type=f}a.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(b,c){a.fn[c]=function(a){return a?this.bind(c,a):this.trigger(c)},a.attrFn&&(a.attrFn[c]=!0)});var e=a.mobile.support.touch,f="touchmove scroll",g=e?"touchstart":"mousedown",h=e?"touchend":"mouseup",i=e?"touchmove":"mousemove";a.event.special.scrollstart={enabled:!0,setup:function(){function g(a,c){d=c,j(b,d?"scrollstart":"scrollstop",a)}var b=this,c=a(b),d,e;c.bind(f,function(b){if(!a.event.special.scrollstart.enabled)return;d||g(b,!0),clearTimeout(e),e=setTimeout(function(){g(b,!1)},50)})}},a.event.special.tap={tapholdThreshold:750,setup:function(){var b=this,d=a(b);d.bind("vmousedown",function(e){function i(){clearTimeout(h)}function k(){i(),d.unbind("vclick",l).unbind("vmouseup",i),a(c).unbind("vmousecancel",k)}function l(a){k(),f===a.target&&j(b,"tap",a)}if(e.which&&e.which!==1)return!1;var f=e.target,g=e.originalEvent,h;d.bind("vmouseup",i).bind("vclick",l),a(c).bind("vmousecancel",k),h=setTimeout(function(){j(b,"taphold",a.Event("taphold",{target:f}))},a.event.special.tap.tapholdThreshold)})}},a.event.special.swipe={scrollSupressionThreshold:30,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var b=this,c=a(b);c.bind(g,function(b){function j(b){if(!f)return;var c=b.originalEvent.touches?b.originalEvent.touches[0]:b;g={time:(new Date).getTime(),coords:[c.pageX,c.pageY]},Math.abs(f.coords[0]-g.coords[0])>a.event.special.swipe.scrollSupressionThreshold&&b.preventDefault()}var e=b.originalEvent.touches?b.originalEvent.touches[0]:b,f={time:(new Date).getTime(),coords:[e.pageX,e.pageY],origin:a(b.target)},g;c.bind(i,j).one(h,function(b){c.unbind(i,j),f&&g&&g.time-f.time<a.event.special.swipe.durationThreshold&&Math.abs(f.coords[0]-g.coords[0])>a.event.special.swipe.horizontalDistanceThreshold&&Math.abs(f.coords[1]-g.coords[1])<a.event.special.swipe.verticalDistanceThreshold&&f.origin.trigger("swipe").trigger(f.coords[0]>g.coords[0]?"swipeleft":"swiperight"),f=g=d})})}},a.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(b,c){a.event.special[b]={setup:function(){a(this).bind(c,a.noop)}}})}(a,this),function(a,c){a.extend(a.support,{orientation:"orientation"in b&&"onorientationchange"in b})}(a),function(a){a.event.special.throttledresize={setup:function(){a(this).bind("resize",c)},teardown:function(){a(this).unbind("resize",c)}};var b=250,c=function(){f=(new Date).getTime(),g=f-d,g>=b?(d=f,a(this).trigger("throttledresize")):(e&&clearTimeout(e),e=setTimeout(c,b-g))},d=0,e,f,g}(a),function(a,b){function o(){var a=g();a!==h&&(h=a,d.trigger(e))}var d=a(b),e="orientationchange",f,g,h,i,j,k={0:!0,180:!0};if(a.support.orientation){var l=b.innerWidth||a(b).width(),m=b.innerHeight||a(b).height(),n=50;i=l>m&&l-m>n,j=k[b.orientation];if(i&&j||!i&&!j)k={"-90":!0,90:!0}}a.event.special.orientationchange=a.extend({},a.event.special.orientationchange,{setup:function(){if(a.support.orientation&&!a.event.special.orientationchange.disabled)return!1;h=g(),d.bind("throttledresize",o)},teardown:function(){if(a.support.orientation&&!a.event.special.orientationchange.disabled)return!1;d.unbind("throttledresize",o)},add:function(a){var b=a.handler;a.handler=function(a){return a.orientation=g(),b.apply(this,arguments)}}}),a.event.special.orientationchange.orientation=g=function(){var d=!0,e=c.documentElement;return a.support.orientation?d=k[b.orientation]:d=e&&e.clientWidth/e.clientHeight<1.1,d?"portrait":"landscape"},a.fn[e]=function(a){return a?this.bind(e,a):this.trigger(e)},a.attrFn&&(a.attrFn[e]=!0)}(a,this),function(a,d){var e=a(b),f=a("html");a.mobile.media=function(){var b={},d=a("<div id='jquery-mediatest'></div>"),e=a("<body>").append(d);return function(a){if(!(a in b)){var g=c.createElement("style"),h="@media "+a+" { #jquery-mediatest { position:absolute; } }";g.type="text/css",g.styleSheet?g.styleSheet.cssText=h:g.appendChild(c.createTextNode(h)),f.prepend(e).prepend(g),b[a]=d.css("position")==="absolute",e.add(g).remove()}return b[a]}}()}(a),function(a,d){function e(a){var b=a.charAt(0).toUpperCase()+a.substr(1),c=(a+" "+h.join(b+" ")+b).split(" ");for(var e in c)if(g[c[e]]!==d)return!0}function m(a,b,d){var e=c.createElement("div"),f=function(a){return a.charAt(0).toUpperCase()+a.substr(1)},g=function(a){return"-"+a.charAt(0).toLowerCase()+a.substr(1)+"-"},i=function(c){var d=g(c)+a+": "+b+";",h=f(c),i=h+f(a);e.setAttribute("style",d),!e.style[i]||(k=!0)},j=d?[d]:h,k;for(var l=0;l<j.length;l++)i(j[l]);return!!k}function n(){var b="transform-3d";return m("perspective","10px","moz")||a.mobile.media("(-"+h.join("-"+b+"),(-")+"-"+b+"),("+b+")")}function o(){var b=location.protocol+"//"+location.host+location.pathname+"ui-dir/",c=a("head base"),d=null,e="",g,h;return c.length?e=c.attr("href"):c=d=a("<base>",{href:b}).appendTo("head"),g=a("<a href='testurl' />").prependTo(f),h=g[0].href,c[0].href=e||location.pathname,d&&d.remove(),h.indexOf(b)===0}function p(){var a=c.createElement("x"),d=c.documentElement,e=b.getComputedStyle,f;return"pointerEvents"in a.style?(a.style.pointerEvents="auto",a.style.pointerEvents="x",d.appendChild(a),f=e&&e(a,"").pointerEvents==="auto",d.removeChild(a),!!f):!1}function q(){var a=c.createElement("div");return typeof a.getBoundingClientRect!="undefined"}var f=a("<body>").prependTo("html"),g=f[0].style,h=["Webkit","Moz","O"],i="palmGetResource"in b,j=b.opera,k=b.operamini&&{}.toString.call(b.operamini)==="[object OperaMini]",l=b.blackberry&&!e("-webkit-transform");a.extend(a.mobile,{browser:{}}),a.mobile.browser.ie=function(){var a=3,b=c.createElement("div"),d=b.all||[];do b.innerHTML="<!--[if gt IE "+ ++a+"]><br><![endif]-->";while(d[0]);return a>4?a:!a}(),a.extend(a.support,{cssTransitions:"WebKitTransitionEvent"in b||m("transition","height 100ms linear")&&!j,pushState:"pushState"in history&&"replaceState"in history,mediaquery:a.mobile.media("only all"),cssPseudoElement:!!e("content"),touchOverflow:!!e("overflowScrolling"),cssTransform3d:n(),boxShadow:!!e("boxShadow")&&!l,scrollTop:("pageXOffset"in b||"scrollTop"in c.documentElement||"scrollTop"in f[0])&&!i&&!k,dynamicBaseTag:o(),cssPointerEvents:p(),boundingRect:q()}),f.remove();var r=function(){var a=b.navigator.userAgent;return a.indexOf("Nokia")>-1&&(a.indexOf("Symbian/3")>-1||a.indexOf("Series60/5")>-1)&&a.indexOf("AppleWebKit")>-1&&a.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)}();a.mobile.gradeA=function(){return(a.support.mediaquery||a.mobile.browser.ie&&a.mobile.browser.ie>=7)&&(a.support.boundingRect||a.fn.jquery.match(/1\.[0-7+]\.[0-9+]?/)!==null)},a.mobile.ajaxBlacklist=b.blackberry&&!b.WebKitPoint||k||r,r&&a(function(){a("head link[rel='stylesheet']").attr("rel","alternate stylesheet").attr("rel","stylesheet")}),a.support.boxShadow||a("html").addClass("ui-mobile-nosupport-boxshadow")}(a),function(a,b){a.widget("mobile.page",a.mobile.widget,{options:{theme:"c",domCache:!1,keepNativeDefault:":jqmData(role='none'), :jqmData(role='nojs')"},_create:function(){var a=this;if(a._trigger("beforecreate")===!1)return!1;a.element.attr("tabindex","0").addClass("ui-page ui-body-"+a.options.theme).bind("pagebeforehide",function(){a.removeContainerBackground()}).bind("pagebeforeshow",function(){a.setContainerBackground()})},refresh:function(){a(this.element).children(".ui-content").trigger("updatelayout",["external"])},setToolbar:function(){a(this.element).trigger("pagebeforeshow")},removeContainerBackground:function(){a.mobile.pageContainer.removeClass("ui-overlay-"+a.mobile.getInheritedTheme(this.element.parent()))},setContainerBackground:function(b){this.options.theme&&a.mobile.pageContainer.addClass("ui-overlay-"+(b||this.options.theme))},addBackBtn:function(b){var c=a(".ui-page-active .ui-footer");b=="header"&&(c=a(".ui-page-active .ui-header")),backBtn=a("<a href='#' class='ui-btn-back' data-"+a.mobile.ns+"rel='back'></a>").buttonMarkup({icon:"header-back-btn",theme:"s"}),c.find(".ui-btn-back").length||backBtn.prependTo(c)},keepNativeSelector:function(){var b=this.options,c=b.keepNative&&a.trim(b.keepNative);return c&&b.keepNative!==b.keepNativeDefault?[b.keepNative,b.keepNativeDefault].join(", "):b.keepNativeDefault}})}(a),function(a,b,d){function k(a){return a=a||location.href,"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var e="hashchange",f=c,g,h=a.event.special,i=f.documentMode,j="on"+e in b&&(i===d||i>7);a.fn[e]=function(a){return a?this.bind(e,a):this.trigger(e)},a.fn[e].delay=50,h[e]=a.extend(h[e],{setup:function(){if(j)return!1;a(g.start)},teardown:function(){if(j)return!1;a(g.stop)}}),g=function(){function n(){var c=k(),d=m(h);c!==h?(l(h=c,d),a(b).trigger(e)):d!==h&&(location.href=location.href.replace(/#.*/,"")+d),g=setTimeout(n,a.fn[e].delay)}var c={},g,h=k(),i=function(a){return a},l=i,m=i;return c.start=function(){g||n()},c.stop=function(){g&&clearTimeout(g),g=d},a.browser.msie&&!j&&function(){var b,d;c.start=function(){b||(d=a.fn[e].src,d=d&&d+k(),b=a('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){d||l(k()),n()}).attr("src",d||"javascript:0").insertAfter("body")[0].contentWindow,f.onpropertychange=function(){try{event.propertyName==="title"&&(b.document.title=f.title)}catch(a){}})},c.stop=i,m=function(){return k(b.location.href)},l=function(c,d){var g=b.document,h=a.fn[e].domain;c!==d&&(g.title=f.title,g.open(),h&&g.write('<script>document.domain="'+h+'"</script>'),g.close(),b.location.hash=c)}}(),c}()}(a,this),function(a,b,c){var d=function(d){return d===c&&(d=!0),function(c,e,f,g){var h=new a.Deferred,i=e?" reverse":"",j=a.mobile.urlHistory.getActive(),k=j.lastScroll||a.mobile.defaultHomeScroll,l=a.mobile.getScreenHeight(),m=a.mobile.maxTransitionWidth!==!1&&a(b).width()>a.mobile.maxTransitionWidth,n=!a.support.cssTransitions||m||!c||c==="none"||Math.max(a(b).scrollTop(),k)>a.mobile.getMaxScrollForTransition(),o=" ui-page-pre-in",p=function(){a.mobile.pageContainer.toggleClass("ui-mobile-viewport-transitioning viewport-"+c)},q=function(){var c=a(b).scrollTop();if(c===k||a.mobile.defaultHomeScroll===k&&c==0)return;a.event.special.scrollstart.enabled=!1,b.scrollTo(0,k),setTimeout(function(){a.event.special.scrollstart.enabled=!0},150)},r=function(){g.removeClass(a.mobile.activePageClass+" out in reverse "+c).height("")},s=function(){d?g.animationComplete(t):t(),g.height(l+a(b).scrollTop()).addClass(c+" out"+i)},t=function(){g&&d&&r(),u()},u=function(){f.css("z-index",-10),f.addClass(a.mobile.activePageClass+o),a.mobile.focusPage(f),f.height(l+k),q(),f.css("z-index",""),n||f.animationComplete(v),f.removeClass(o).addClass(c+" in"+i),n&&setTimeout(v,0)},v=function(){d||g&&r(),f.removeClass("out in reverse "+c).height(""),p(),a(b).scrollTop()!==k&&q(),h.resolve(c,e,f,g,!0)};return p(),g&&!n?s():t(),h.promise()}},e=d(),f=d(!1),g=function(){return a.mobile.getScreenHeight()*3};a.mobile.defaultTransitionHandler=e,a.mobile.transitionHandlers={"default":a.mobile.defaultTransitionHandler,sequential:e,simultaneous:f},a.mobile.transitionFallbacks={},a.mobile._maybeDegradeTransition=function(b){return b&&!a.support.cssTransform3d&&a.mobile.transitionFallbacks[b]&&(b=a.mobile.transitionFallbacks[b]),b},a.mobile.getMaxScrollForTransition=a.mobile.getMaxScrollForTransition||g}(a,this),function(a,d){function u(b){!!i&&(!i.closest("."+a.mobile.activePageClass).length||b)&&i.removeClass(a.mobile.activeBtnClass),i=null}function v(){m=!1,l.length>0&&a.mobile.changePage.apply(null,l.pop())}function z(b,c,d,e){c&&c.data("page")._trigger("beforehide",null,{nextPage:b}),b.data("page")._trigger("beforeshow",null,{prevPage:c||a("")}),a.mobile.hidePageLoadingMsg(),d=a.mobile._maybeDegradeTransition(d);var f=a.mobile.transitionHandlers[d||"default"]||a.mobile.defaultTransitionHandler,g=f(d,e,b,c);return g.done(function(){c&&c.data("page")._trigger("hide",null,{nextPage:b}),b.data("page")._trigger("show",null,{prevPage:c||a("")}),setTimeout(function(){a.mobile.removeEventBlocker()},0)}),g}function A(){var b=a("."+a.mobile.activePageClass),c=parseFloat(b.css("padding-top")),d=parseFloat(b.css("padding-bottom")),e=parseFloat(b.css("border-top-width")),f=parseFloat(b.css("border-bottom-width"));b.css("min-height",s()-c-d-e-f)}function B(b,c){c&&b.attr("data-"+a.mobile.ns+"role",c),b.page()}function C(a){while(a){if(typeof a.nodeName=="string"&&a.nodeName.toLowerCase()==="a")break;a=a.parentNode}return a}function D(b){var c=a(b).closest(".ui-page").jqmData("url"),d=q.hrefNoHash;if(!c||!h.isPath(c))c=d;return h.makeUrlAbsolute(c,d)}var e=a(b),f=a("html"),g=a("head"),h={urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,getLocation:function(a){var b=a?this.parseUrl(a):location,c=this.parseUrl(a||location.href).hash;return c=c==="#"?"":c,b.protocol+"//"+b.host+b.pathname+b.search+c},parseLocation:function(){return this.parseUrl(this.getLocation())},parseUrl:function(b){if(a.type(b)==="object")return b;var c=h.urlParseRE.exec(b||"")||[];return{href:c[0]||"",hrefNoHash:c[1]||"",hrefNoSearch:c[2]||"",domain:c[3]||"",protocol:c[4]||"",doubleSlash:c[5]||"",authority:c[6]||"",username:c[8]||"",password:c[9]||"",host:c[10]||"",hostname:c[11]||"",port:c[12]||"",pathname:c[13]||"",directory:c[14]||"",filename:c[15]||"",search:c[16]||"",hash:c[17]||""}},makePathAbsolute:function(a,b){if(a&&a.charAt(0)==="/")return a;a=a||"",b=b?b.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"";var c=b?b.split("/"):[],d=a.split("/");for(var e=0;e<d.length;e++){var f=d[e];switch(f){case".":break;case"..":c.length&&c.pop();break;default:c.push(f)}}return"/"+c.join("/")},isSameDomain:function(a,b){return h.parseUrl(a).domain===h.parseUrl(b).domain},isRelativeUrl:function(a){return h.parseUrl(a).protocol===""},isAbsoluteUrl:function(a){return h.parseUrl(a).protocol!==""},makeUrlAbsolute:function(a,b){if(!h.isRelativeUrl(a))return a;b===d&&(b=q);var c=h.parseUrl(a),e=h.parseUrl(b),f=c.protocol||e.protocol,g=c.protocol?c.doubleSlash:c.doubleSlash||e.doubleSlash,i=c.authority||e.authority,j=c.pathname!=="",k=h.makePathAbsolute(c.pathname||e.filename,e.pathname),l=c.search||!j&&e.search||"",m=c.hash;return f+g+i+k+l+m},addSearchParams:function(b,c){var d=h.parseUrl(b),e=typeof c=="object"?a.param(c):c,f=d.search||"?";return d.hrefNoSearch+f+(f.charAt(f.length-1)!=="?"?"&":"")+e+(d.hash||"")},convertUrlToDataUrl:function(a){var c=h.parseUrl(a);return h.isEmbeddedPage(c)?c.hash.split(n)[0].replace(/^#/,""):h.isSameDomain(c,q)?c.hrefNoHash.replace(q.domain,"").split(n)[0]:b.decodeURIComponent(a)},get:function(a){return a===d&&(a=h.parseLocation().hash),h.stripHash(a).replace(/[^\/]*\.[^\/*]+$/,"")},getFilePath:function(b){var c="&"+a.mobile.subPageUrlKey;return b&&b.split(c)[0].split(n)[0]},set:function(a){location.hash=a},isPath:function(a){return/\//.test(a)},clean:function(a){return a.replace(q.domain,"")},stripHash:function(a){return a.replace(/^#/,"")},cleanHash:function(a){return h.stripHash(a.replace(/\?.*$/,"").replace(n,""))},isHashValid:function(a){return/^#[^#]+$/.test(a)},isExternal:function(a){var b=h.parseUrl(a);return b.protocol&&b.domain!==p.domain?!0:!1},hasProtocol:function(a){return/^(:?\w+:)/.test(a)},isFirstPageUrl:function(b){var c=h.parseUrl(h.makeUrlAbsolute(b,q)),e=c.hrefNoHash===p.hrefNoHash||r&&c.hrefNoHash===q.hrefNoHash,f=a.mobile.firstPage,g=f&&f[0]?f[0].id:d;return e&&(!c.hash||c.hash==="#"||g&&c.hash.replace(/^#/,"")===g)},isEmbeddedPage:function(a){var b=h.parseUrl(a);return b.protocol!==""?b.hash&&(b.hrefNoHash===p.hrefNoHash||r&&b.hrefNoHash===q.hrefNoHash):/^#/.test(b.href)},isPermittedCrossDomainRequest:function(b,c){return a.mobile.allowCrossDomainPages&&b.protocol==="file:"&&c.search(/^https?:/)!==-1}},i=null,j={stack:[],activeIndex:0,getActive:function(){return j.stack[j.activeIndex]},getPrev:function(){return j.stack[j.activeIndex-1]},getNext:function(
+){return j.stack[j.activeIndex+1]},addNew:function(a,b,c,d,e){j.getNext()&&j.clearForward(),j.stack.push({url:a,transition:b,title:c,pageUrl:d,role:e}),j.activeIndex=j.stack.length-1},clearForward:function(){j.stack=j.stack.slice(0,j.activeIndex+1)},directHashChange:function(b){var c,e,f,g=this.getActive();a.each(j.stack,function(a,d){decodeURIComponent(b.currentUrl)===decodeURIComponent(d.url)&&(c=a<j.activeIndex,e=!c,f=a)}),this.activeIndex=f!==d?f:this.activeIndex,c?(b.either||b.isBack)(!0):e&&(b.either||b.isForward)(!1)},ignoreNextHashChange:!1},k="[tabindex],a,button:visible,select:visible,input",l=[],m=!1,n="&ui-state=dialog",o=g.children("base"),p=h.parseLocation(),q=o.length?h.parseUrl(h.makeUrlAbsolute(o.attr("href"),p.href)):p,r=p.hrefNoHash!==q.hrefNoHash,s=a.mobile.getScreenHeight,t=a.support.dynamicBaseTag?{element:o.length?o:a("<base>",{href:q.hrefNoHash}).prependTo(g),set:function(a){t.element.attr("href",h.makeUrlAbsolute(a,q))},reset:function(){t.element.attr("href",q.hrefNoHash)}}:d;a.mobile.back=function(){var a=b.navigator;this.phonegapNavigationEnabled&&a&&a.app&&a.app.backHistory?a.app.backHistory():b.history.back()},a.mobile.focusPage=function(a){var b=a.find("[autofocus]"),c=a.find(".ui-title:eq(0)");if(b.length){b.focus();return}c.length?c.focus():a.focus()};var w=!0,x,y;x=function(){if(!w)return;var b=a.mobile.urlHistory.getActive();if(b){var c=e.scrollTop();b.lastScroll=c<a.mobile.minScrollBack?a.mobile.defaultHomeScroll:c}},y=function(){setTimeout(x,100)},e.bind(a.support.pushState?"popstate":"hashchange",function(){w=!1}),e.one(a.support.pushState?"popstate":"hashchange",function(){w=!0}),e.one("pagecontainercreate",function(){a.mobile.pageContainer.bind("pagechange",function(){w=!0,e.unbind("scrollstop",y),e.bind("scrollstop",y)})}),e.bind("scrollstop",y),a.mobile._maybeDegradeTransition=a.mobile._maybeDegradeTransition||function(a){return a},a.fn.animationComplete=function(b){return a.support.cssTransitions?a(this).one("webkitAnimationEnd animationend",b):(setTimeout(b,0),a(this))},a.mobile.path=h,a.mobile.base=t,a.mobile.urlHistory=j,a.mobile.dialogHashKey=n,a.mobile.allowCrossDomainPages=!1,a.mobile.getDocumentUrl=function(b){return b?a.extend({},p):p.href},a.mobile.getDocumentBase=function(b){return b?a.extend({},q):q.href},a.mobile._bindPageRemove=function(){var b=a(this);!b.data("page").options.domCache&&b.is(":jqmData(external-page='true')")&&b.bind("pagehide.remove",function(){var b=a(this),c=new a.Event("pageremove");b.trigger(c),c.isDefaultPrevented()||b.removeWithDependents()})},a.mobile.loadPage=function(b,c){var e=a.Deferred(),f=a.extend({},a.mobile.loadPage.defaults,c),g=null,i=null,j=function(){var b=a.mobile.activePage&&D(a.mobile.activePage);return b||q.hrefNoHash},k=h.makeUrlAbsolute(b,j());f.data&&f.type==="get"&&(k=h.addSearchParams(k,f.data),f.data=d),f.data&&f.type==="post"&&(f.reloadPage=!0);var l=h.getFilePath(k),m=h.convertUrlToDataUrl(k);f.pageContainer=f.pageContainer||a.mobile.pageContainer,g=f.pageContainer.children("[data-"+a.mobile.ns+"url='"+m+"']"),g.length===0&&m&&!h.isPath(m)&&(g=f.pageContainer.children("#"+m).attr("data-"+a.mobile.ns+"url",m).jqmData("url",m));if(g.length===0)if(a.mobile.firstPage&&h.isFirstPageUrl(l))a.mobile.firstPage.parent().length&&(g=a(a.mobile.firstPage));else if(h.isEmbeddedPage(l))return e.reject(k,c),e.promise();if(g.length){if(!f.reloadPage)return B(g,f.role),e.resolve(k,c,g),e.promise();i=g}var n=f.pageContainer,o=new a.Event("pagebeforeload"),r={url:b,absUrl:k,dataUrl:m,deferred:e,options:f};n.trigger(o,r);if(o.isDefaultPrevented())return e.promise();if(f.showLoadMsg)var s=setTimeout(function(){a.mobile.showPageLoadingMsg()},f.loadMsgDelay),u=function(){clearTimeout(s),a.mobile.hidePageLoadingMsg()};return t&&t.reset(),!a.mobile.allowCrossDomainPages&&!h.isSameDomain(p,k)?e.reject(k,c):a.ajax({url:l,type:f.type,data:f.data,dataType:"html",success:function(d,j,n){var o=a("<div></div>"),p=d.match(/<title[^>]*>([^<]*)/)&&RegExp.$1,q=new RegExp("(<[^>]+\\bdata-"+a.mobile.ns+"role=[\"']?page[\"']?[^>]*>)"),s=new RegExp("\\bdata-"+a.mobile.ns+"url=[\"']?([^\"'>]*)[\"']?");q.test(d)&&RegExp.$1&&s.test(RegExp.$1)&&RegExp.$1&&(b=l=h.getFilePath(a("<div>"+RegExp.$1+"</div>").text())),t&&t.set(l),o.get(0).innerHTML=d,g=o.find(":jqmData(role='page'), :jqmData(role='dialog')").first(),g.length||(g=a("<div data-"+a.mobile.ns+"role='page'>"+d.split(/<\/?body[^>]*>/gmi)[1]+"</div>")),p&&!g.jqmData("title")&&(~p.indexOf("&")&&(p=a("<div>"+p+"</div>").text()),g.jqmData("title",p));if(!a.support.dynamicBaseTag){var v=h.get(l);g.find("[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]").each(function(){var b=a(this).is("[href]")?"href":a(this).is("[src]")?"src":"action",c=a(this).attr(b);c=c.replace(location.protocol+"//"+location.host+location.pathname,""),/^(\w+:|#|\/)/.test(c)||a(this).attr(b,v+c)})}g.attr("data-"+a.mobile.ns+"url",h.convertUrlToDataUrl(l)).attr("data-"+a.mobile.ns+"external-page",!0).appendTo(f.pageContainer),g.one("pagecreate",a.mobile._bindPageRemove),B(g,f.role),k.indexOf("&"+a.mobile.subPageUrlKey)>-1&&(g=f.pageContainer.children("[data-"+a.mobile.ns+"url='"+m+"']")),f.showLoadMsg&&u(),r.xhr=n,r.textStatus=j,r.page=g,f.pageContainer.trigger("pageload",r),e.resolve(k,c,g,i)},error:function(b,d,g){t&&t.set(h.get()),r.xhr=b,r.textStatus=d,r.errorThrown=g;var i=new a.Event("pageloadfailed");f.pageContainer.trigger(i,r);if(i.isDefaultPrevented())return;f.showLoadMsg&&(u(),a.mobile.showPageLoadingMsg(a.mobile.pageLoadErrorMessageTheme,a.mobile.pageLoadErrorMessage,!0),setTimeout(a.mobile.hidePageLoadingMsg,1500)),e.reject(k,c)}}),e.promise()},a.mobile.loadPage.defaults={type:"get",data:d,reloadPage:!1,role:d,showLoadMsg:!1,pageContainer:d,loadMsgDelay:50},a.mobile.changePage=function(b,e){if(m){l.unshift(arguments);return}var f=a.extend({},a.mobile.changePage.defaults,e);f.pageContainer=f.pageContainer||a.mobile.pageContainer,f.fromPage=f.fromPage||a.mobile.activePage;var g=f.pageContainer,i=new a.Event("pagebeforechange"),k={toPage:b,options:f};g.trigger(i,k);if(i.isDefaultPrevented())return;b=k.toPage,m=!0;if(typeof b=="string"){a.mobile.loadPage(b,f).done(function(b,c,d,e){m=!1,c.duplicateCachedPage=e,a.mobile.changePage(d,c)}).fail(function(a,b){m=!1,u(!0),v(),f.pageContainer.trigger("pagechangefailed",k)});return}b[0]===a.mobile.firstPage[0]&&!f.dataUrl&&(f.dataUrl=p.hrefNoHash);var o=f.fromPage,q=f.dataUrl&&h.convertUrlToDataUrl(f.dataUrl)||b.jqmData("url"),r=q,s=h.getFilePath(q),t=j.getActive(),w=j.activeIndex===0,x=0,y=c.title,A=f.role==="dialog"||b.jqmData("role")==="dialog";if(o&&o[0]===b[0]&&!f.allowSamePageTransition){m=!1,g.trigger("pagechange",k),f.fromHashChange&&j.directHashChange({currentUrl:q,isBack:function(){},isForward:function(){}});return}B(b,f.role),f.fromHashChange&&j.directHashChange({currentUrl:q,isBack:function(){x=-1},isForward:function(){x=1}});try{c.activeElement&&c.activeElement.nodeName.toLowerCase()!=="body"?a(c.activeElement).blur():a("input:focus, textarea:focus, select:focus").blur()}catch(C){}var D=!1;A&&t&&(t.url.indexOf(n)>-1&&!a.mobile.activePage.is(".ui-dialog")&&(f.changeHash=!1,D=!0),q=(t.url||"")+(D?"":n),j.activeIndex===0&&q===j.initialDst&&(q+=n)),f.changeHash!==!1&&q&&(j.ignoreNextHashChange=!0,h.set(q));var E=t?b.jqmData("title")||b.children(":jqmData(role='header')").find(".ui-title").getEncodedText():y;!!E&&y===c.title&&(y=E),b.jqmData("title")||b.jqmData("title",y),f.transition=f.transition||(x&&!w?t.transition:d)||(A?a.mobile.defaultDialogTransition:a.mobile.defaultPageTransition),x||(D&&(j.activeIndex=Math.max(0,j.activeIndex-1)),j.addNew(q,f.transition,y,r,f.role)),c.title=j.getActive().title,a.mobile.activePage=b,f.reverse=f.reverse||x<0,z(b,o,f.transition,f.reverse).done(function(c,d,e,h,i){u(),f.duplicateCachedPage&&f.duplicateCachedPage.remove(),i||a.mobile.focusPage(b),v(),g.trigger("pagechange",k)})},a.mobile.changePage.defaults={transition:d,reverse:!1,changeHash:!0,fromHashChange:!1,role:d,duplicateCachedPage:d,pageContainer:d,showLoadMsg:!0,dataUrl:d,fromPage:d,allowSamePageTransition:!1},a.mobile.navreadyDeferred=a.Deferred(),a.mobile.navreadyDeferred.done(function(){a(c).delegate("form","submit",function(b){var c=a(this);if(!a.mobile.ajaxEnabled||c.is(":jqmData(ajax='false')")||!c.jqmHijackable().length)return;var d=c.attr("method"),e=c.attr("target"),f=c.attr("action");f||(f=D(c),f===q.hrefNoHash&&(f=p.hrefNoSearch)),f=h.makeUrlAbsolute(f,D(c));if(h.isExternal(f)&&!h.isPermittedCrossDomainRequest(p,f)||e)return;a.mobile.changePage(f,{type:d&&d.length&&d.toLowerCase()||"get",data:c.serialize(),transition:c.jqmData("transition"),reverse:c.jqmData("direction")==="reverse",reloadPage:!0}),b.preventDefault()}),a(c).bind("vclick",function(b){if(b.which>1||!a.mobile.linkBindingEnabled)return;var c=C(b.target);if(!a(c).jqmHijackable().length)return;c&&h.parseUrl(c.getAttribute("href")||"#").hash!=="#"&&(u(!0),i=a(c).closest(".ui-btn").not(".ui-disabled"),i.addClass(a.mobile.activeBtnClass))}),a(c).bind("click",function(c){if(!a.mobile.linkBindingEnabled)return;var e=C(c.target),f=a(e),g;if(!e||c.which>1||!f.jqmHijackable().length)return;g=function(){b.setTimeout(function(){u(!0)},200)};if(f.is(":jqmData(rel='back')"))return a.mobile.back(),!1;var i=D(f),j=h.makeUrlAbsolute(f.attr("href")||"#",i);if(!a.mobile.ajaxEnabled&&!h.isEmbeddedPage(j)){g();return}if(j.search("#")!==-1){j=j.replace(/[^#]*#/,"");if(!j){c.preventDefault();return}h.isPath(j)?j=h.makeUrlAbsolute(j,i):j=h.makeUrlAbsolute("#"+j,p.hrefNoHash)}var k=f.is("[rel='external']")||f.is(":jqmData(ajax='false')")||f.is("[target]"),l=k||h.isExternal(j)&&!h.isPermittedCrossDomainRequest(p,j);if(l){g();return}var m=f.jqmData("transition"),n=f.jqmData("direction")==="reverse"||f.jqmData("back"),o=f.attr("data-"+a.mobile.ns+"rel")||d;a.mobile.changePage(j,{transition:m,reverse:n,role:o,link:f}),c.preventDefault()}),a(c).delegate(".ui-page","pageshow.prefetch",function(){var b=[];a(this).find("a:jqmData(prefetch)").each(function(){var c=a(this),d=c.attr("href");d&&a.inArray(d,b)===-1&&(b.push(d),a.mobile.loadPage(d,{role:c.attr("data-"+a.mobile.ns+"rel")}))})}),a.mobile._handleHashChange=function(c){var e=h.stripHash(c),f=a.mobile.urlHistory.stack.length===0?"none":d,g=new a.Event("navigate"),i={transition:f,changeHash:!1,fromHashChange:!0};0===j.stack.length&&(j.initialDst=e),a.mobile.pageContainer.trigger(g);if(g.isDefaultPrevented())return;if(!a.mobile.hashListeningEnabled||j.ignoreNextHashChange){j.ignoreNextHashChange=!1;return}if(j.stack.length>1&&e.indexOf(n)>-1&&j.initialDst!==e){if(!a.mobile.activePage.is(".ui-dialog")){j.directHashChange({currentUrl:e,isBack:function(){a.mobile.back()},isForward:function(){b.history.forward()}});return}j.directHashChange({currentUrl:e,either:function(b){var c=a.mobile.urlHistory.getActive();e=c.pageUrl,a.extend(i,{role:c.role,transition:c.transition,reverse:b})}})}e?(e=typeof e=="string"&&!h.isPath(e)?h.makeUrlAbsolute("#"+e,q):e,e===h.makeUrlAbsolute("#"+j.initialDst,q)&&j.stack.length&&j.stack[0].url!==j.initialDst.replace(n,"")&&(e=a.mobile.firstPage),a.mobile.changePage(e,i)):a.mobile.changePage(a.mobile.firstPage,i)},e.bind("hashchange",function(b,c){a.mobile._handleHashChange(h.parseLocation().hash)}),a(c).bind("pageshow",A),a(b).bind("throttledresize",A)})}(a),function(a,b){var e={},f=e,g=a(b),h=a.mobile.path.parseLocation(),i=a.Deferred(),j=a.Deferred();a(c).ready(a.proxy(j,"resolve")),a(c).one("mobileinit",a.proxy(i,"resolve")),a.extend(e,{initialFilePath:function(){return h.pathname+h.search}(),hashChangeTimeout:200,hashChangeEnableTimer:d,initialHref:h.hrefNoHash,state:function(){return{hash:a.mobile.path.parseLocation().hash||"#"+f.initialFilePath,title:c.title,initialHref:f.initialHref}},resetUIKeys:function(b){var c=a.mobile.dialogHashKey,d="&"+a.mobile.subPageUrlKey,e=b.indexOf(c);return e>-1?b=b.slice(0,e)+"#"+b.slice(e):b.indexOf(d)>-1&&(b=b.split(d).join("#"+d)),b},nextHashChangePrevented:function(b){a.mobile.urlHistory.ignoreNextHashChange=b,f.onHashChangeDisabled=b},onHashChange:function(b){if(f.onHashChangeDisabled)return;var d,e,g=a.mobile.path.parseLocation().hash,h=a.mobile.path.isPath(g),i=h?a.mobile.path.getLocation():a.mobile.getDocumentUrl();g=h?g.replace("#",""):g,e=f.state(),d=a.mobile.path.makeUrlAbsolute(g,i),h&&(d=f.resetUIKeys(d)),history.replaceState(e,c.title,d)},onPopState:function(b){var c=b.originalEvent.state,d,e,g;c&&(clearTimeout(f.hashChangeEnableTimer),f.nextHashChangePrevented(!1),a.mobile._handleHashChange(c.hash),f.nextHashChangePrevented(!0),f.hashChangeEnableTimer=setTimeout(function(){f.nextHashChangePrevented(!1)},f.hashChangeTimeout))},init:function(){g.bind("hashchange",f.onHashChange),g.bind("popstate",f.onPopState),location.hash===""&&history.replaceState(f.state(),c.title,a.mobile.path.getLocation())}}),a.when(j,i,a.mobile.navreadyDeferred).done(function(){a.mobile.pushStateEnabled&&a.support.pushState&&e.init()})}(a,this),function(a,b,c){a.mobile.transitionFallbacks.flip="fade"}(a,this),function(a,b,c){a.mobile.transitionFallbacks.flow="fade"}(a,this),function(a,b,c){a.mobile.transitionFallbacks.pop="fade"}(a,this),function(a,b,c){a.mobile.transitionHandlers.slide=a.mobile.transitionHandlers.simultaneous,a.mobile.transitionFallbacks.slide="fade"}(a,this),function(a,b,c){a.mobile.transitionFallbacks.slidedown="fade"}(a,this),function(a,b,c){a.mobile.transitionFallbacks.slidefade="fade"}(a,this),function(a,b,c){a.mobile.transitionFallbacks.slideup="fade"}(a,this),function(a,b,c){a.mobile.transitionFallbacks.turn="fade"}(a,this),function(a,b){a.mobile.page.prototype.options.degradeInputs={color:!1,date:!1,datetime:!1,"datetime-local":!1,email:!1,month:!1,number:!1,range:"number",search:"text",tel:!1,time:!1,url:!1,week:!1},a(c).bind("pagecreate create",function(b){var c=a.mobile.closestPageData(a(b.target)),d;if(!c)return;d=c.options,a(b.target).find("input").not(c.keepNativeSelector()).each(function(){var b=a(this),c=this.getAttribute("type"),e=d.degradeInputs[c]||"text";if(d.degradeInputs[c]){var f=a("<div>").html(b.clone()).html(),g=f.indexOf(" type=")>-1,h=g?/\s+type=["']?\w+['"]?/:/\/?>/,i=' type="'+e+'" data-'+a.mobile.ns+'type="'+c+'"'+(g?"":">");b.replaceWith(f.replace(h,i))}})})}(a),function(a,b,d){a.widget("mobile.dialog",a.mobile.widget,{options:{closeBtnText:"Close",overlayTheme:"a",initSelector:":jqmData(role='dialog')"},_create:function(){var b=this,c=this.element,d=a("<a href='#' data-"+a.mobile.ns+"icon='delete' data-"+a.mobile.ns+"iconpos='notext'>"+this.options.closeBtnText+"</a>"),e=a("<div/>",{role:"dialog","class":"ui-dialog-contain ui-corner-all ui-overlay-shadow"});c.addClass("ui-dialog ui-overlay-"+this.options.overlayTheme),c.wrapInner(e).children().find(":jqmData(role='header')").prepend(d).end().children(":first-child").addClass("ui-corner-top").end().children(":last-child").addClass("ui-corner-bottom"),d.bind("click",function(){b.close()}),c.bind("vclick submit",function(b){var c=a(b.target).closest(b.type==="vclick"?"a":"form"),d;c.length&&!c.jqmData("transition")&&(d=a.mobile.urlHistory.getActive()||{},c.attr("data-"+a.mobile.ns+"transition",d.transition||a.mobile.defaultDialogTransition).attr("data-"+a.mobile.ns+"direction","reverse"))}).bind("pagehide",function(b,c){a(this).find("."+a.mobile.activeBtnClass).not(".ui-slider-bg").removeClass(a.mobile.activeBtnClass)}).bind("pagebeforeshow",function(){b._isCloseable=!0,b.options.overlayTheme&&b.element.page("removeContainerBackground").page("setContainerBackground",b.options.overlayTheme)})},close:function(){var b;this._isCloseable&&(this._isCloseable=!1,a.mobile.hashListeningEnabled?a.mobile.back():(b=a.mobile.urlHistory.getPrev().url,a.mobile.path.isPath(b)||(b=a.mobile.path.makeUrlAbsolute("#"+b)),a.mobile.changePage(b,{changeHash:!1,fromHashChange:!0})))}}),a(c).delegate(a.mobile.dialog.prototype.options.initSelector,"pagecreate",function(){a.mobile.dialog.prototype.enhance(this)})}(a,this),function(a,b){a.mobile.page.prototype.options.backBtnText="Back",a.mobile.page.prototype.options.addBackBtn=!1,a.mobile.page.prototype.options.backBtnTheme=null,a.mobile.page.prototype.options.headerTheme="a",a.mobile.page.prototype.options.footerTheme="a",a.mobile.page.prototype.options.contentTheme=null,a(c).bind("pagecreate",function(b){var c=a(b.target),d=c.data("page").options,e=c.jqmData("role"),f=d.theme;a(":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')",c).jqmEnhanceable().each(function(){var b=a(this),g=b.jqmData("role"),h=b.jqmData("theme"),i=h||d.contentTheme||e==="dialog"&&f,j,k,l,m=c.find(".ui-footer"),n;b.addClass("ui-"+g);if(g==="header"||g==="footer"){var p=h||(g==="header"?d.headerTheme:d.footerTheme)||f;b.addClass("ui-bar-"+p).attr("role",g==="header"?"banner":"contentinfo"),g==="header"&&(j=b.children("a, button"),k=j.hasClass("ui-btn-left"),l=j.hasClass("ui-btn-right"),k=k||j.eq(0).not(".ui-btn-right").addClass("ui-btn-left").length,l=l||j.eq(1).addClass("ui-btn-right").length),d.addBackBtn&&(g==="footer"||g==="header")&&c.jqmData("url")!==a.mobile.path.stripHash(location.hash)&&!k&&(d.addBackBtn=="header"?m=c.find(".ui-header"):m=c.find(".ui-footer"),n=a("<a href='javascript:void(0);' class='ui-btn-back' data-"+a.mobile.ns+"rel='back' data-"+a.mobile.ns+"icon='header-back-btn'></a>").attr("data-"+a.mobile.ns+"theme",d.backBtnTheme||p),m.find(".ui-btn-back").length||n.prependTo(m)),b.children("h1, h2, h3, h4, h5, h6").addClass("ui-title").attr({role:"heading","aria-level":"1"})}else g==="content"&&(i&&b.addClass("ui-body-"+i),b.attr("role","main"))})})}(a),function(a,b){a.fn.fieldcontain=function(a){return this.addClass("ui-field-contain ui-body ui-br").contents().filter(function(){return this.nodeType===3&&!/\S/.test(this.nodeValue)}).remove()},a(c).bind("pagecreate create",function(b){a(":jqmData(role='fieldcontain')",b.target).jqmEnhanceable().fieldcontain()})}(a),function(a,b){a.fn.grid=function(b){return this.each(function(){var c=a(this),d=a.extend({grid:null},b),e=c.children(),f={solo:1,a:2,b:3,c:4,d:5},g=d.grid,h;if(!g)if(e.length<=5)for(var i in f)f[i]===e.length&&(g=i);else g="a",c.addClass("ui-grid-duo");h=f[g],c.addClass("ui-grid-"+g),e.filter(":nth-child("+h+"n+1)").addClass("ui-block-a"),h>1&&e.filter(":nth-child("+h+"n+2)").addClass("ui-block-b"),h>2&&e.filter(":nth-child("+h+"n+3)").addClass("ui-block-c"),h>3&&e.filter(":nth-child("+h+"n+4)").addClass("ui-block-d"),h>4&&e.filter(":nth-child("+h+"n+5)").addClass("ui-block-e")})}}(a),function(a,b){a(c).bind("pagecreate create",function(b){a(":jqmData(role='nojs')",b.target).addClass("ui-nojs")})}(a),function(a,b){function d(a){var b;while(a){b=typeof a.className=="string"&&a.className+" ";if(b&&b.indexOf("ui-btn ")>-1&&b.indexOf("ui-disabled ")<0)break;a=a.parentNode}return a}a.fn.buttonMarkup=function(d){var f=this,g=function(b,c){j.setAttribute("data-"+a.mobile.ns+b,c),i.jqmData(b,c)};d=d&&a.type(d)==="object"?d:{};for(var h=0;h<f.length;h++){var i=f.eq(h),j=i[0],k=a.extend({},a.fn.buttonMarkup.defaults,{icon:d.icon!==b?d.icon:i.jqmData("icon"),iconpos:d.iconpos!==b?d.iconpos:i.jqmData("iconpos"),theme:d.theme!==b?d.theme:i.jqmData("theme")||a.mobile.getInheritedTheme(i,a.fn.buttonMarkup.defaults.theme),inline:d.inline!==b?d.inline:i.jqmData("inline"),shadow:d.shadow!==b?d.shadow:i.jqmData("shadow"),corners:d.corners!==b?d.corners:i.jqmData("corners"),iconshadow:d.iconshadow!==b?d.iconshadow:i.jqmData("iconshadow"),mini:d.mini!==b?d.mini:i.jqmData("mini")},d),l="ui-btn-inner",m="ui-btn-text",n,o,p,q,r,s;a.each(k,g),i.jqmData("rel")==="popup"&&i.attr("href")&&(j.setAttribute("aria-haspopup",!0),j.setAttribute("aria-owns",j.getAttribute("href"))),s=a.data(j.tagName==="INPUT"||j.tagName==="BUTTON"?j.parentNode:j,"buttonElements"),s?(j=s.outer,i=a(j),p=s.inner,q=s.text,a(s.icon).remove(),s.icon=null):(p=c.createElement(k.wrapperEls),q=c.createElement(k.wrapperEls)),r=k.icon?c.createElement("span"):null,e&&!s&&e(),k.theme||(k.theme=a.mobile.getInheritedTheme(i,"c")),n="ui-btn ui-btn-up-"+k.theme,n+=k.shadow?" ui-shadow":"",n+=k.corners?" ui-btn-corner-all":"";if(i.jqmData("role")=="button"||j.tagName=="BUTTON"||j.tagName=="DIV")n+=" ui-btn-box-"+k.theme;buttonStyle=i.jqmData("style");if(buttonStyle!="circle"||a(i).text().length>0){if(buttonStyle=="nobg")n+=" ui-btn-icon-nobg",n+=" ui-btn-icon_only";else if(buttonStyle=="edit")n+=" ui-btn-edit";else if(buttonStyle=="round"||buttonStyle=="circle"&&a(i).text().length>0)n+=" ui-btn-round"}else n+=" ui-btn-corner-circle",n+=" ui-btn-icon_only";if(k.icon)if(a(i).text().length>0){switch(k.iconpos){case"right":case"left":case"top":case"bottom":m+=" ui-btn-text-padding-"+k.iconpos;break;default:m+=" ui-btn-text-padding-left"}l+=" ui-btn-hastxt"}else buttonStyle=="circle"?l+=" ui-btn-corner-circle":buttonStyle=="nobg"&&(l+=" ui-btn-icon-nobg"),n+=" ui-btn-icon_only",l+=" ui-btn-icon-only";else a(i).text().length>0?l+=" ui-btn-hastxt":buttonStyle=="circle"&&(n+=" ui-btn-round");k.mini!==b&&(n+=k.mini===!0?" ui-mini":" ui-fullsize"),k.inline!==b&&(n+=k.inline===!0?" ui-btn-inline":" ui-btn-block"),k.icon&&(k.icon="ui-icon-"+k.icon,k.iconpos=k.iconpos||"left",o="ui-icon "+k.icon,k.iconshadow&&(o+=" ui-icon-shadow")),k.iconpos&&(n+=" ui-btn-icon-"+k.iconpos,k.iconpos==="notext"&&!i.attr("title")&&i.attr("title",i.getEncodedText())),l+=k.corners?" ui-btn-corner-all":"",k.iconpos&&k.iconpos==="notext"&&!i.attr("title")&&i.attr("title",i.getEncodedText()),s&&i.removeClass(s.bcls||""),i.removeClass("ui-link").addClass(n),p.className=l,q.className=m,s||p.appendChild(q);if(r){r.className=o;if(!s||!s.icon)r.innerHTML="&#160;",p.appendChild(r)}while(j.firstChild&&!s)q.appendChild(j.firstChild);s||j.appendChild(p),s={bcls:n,outer:j,inner:p,text:q,icon:r},a.data(j,"buttonElements",s),a.data(p,"buttonElements",s),a.data(q,"buttonElements",s),r&&a.data(r,"buttonElements",s)}return this},a.fn.buttonMarkup.defaults={theme:"c",corners:!0,shadow:!0,iconshadow:!0,wrapperEls:"span"};var e=function(){var b=a.mobile.buttonMarkup.hoverDelay,f,g;a(c).bind({"vmousedown vmousecancel vmouseup vmouseover vmouseout focus blur scrollstart touchend touchcancel":function(c){var e,h=a(d(c.target)),i=c.originalEvent&&/^touch/.test(c.originalEvent.type),j=c.type;if(h.length){e=h.attr("data-"+a.mobile.ns+"theme");if(j==="vmousedown")i?f=setTimeout(function(){h.removeClass("ui-btn-up-"+e).addClass("ui-btn-down-"+e)},b):h.removeClass("ui-btn-up-"+e).addClass("ui-btn-down-"+e);else if(j==="vmousecancel"||j==="vmouseup"||j==="touchend"||j==="touchcancel")h.removeClass("ui-btn-down-"+e).addClass("ui-btn-up-"+e);else if(j==="vmouseover"||j==="focus")i?g=setTimeout(function(){h.removeClass("ui-btn-up-"+e).addClass("ui-btn-hover-"+e)},b):h.removeClass("ui-btn-up-"+e).addClass("ui-btn-hover-"+e);else if(j==="vmouseout"||j==="blur"||j==="scrollstart")h.removeClass("ui-btn-hover-"+e+" ui-btn-down-"+e).addClass("ui-btn-up-"+e),f&&clearTimeout(f),g&&clearTimeout(g)}},"focusin focus":function(b){a(d(b.target)).addClass(a.mobile.focusClass)},"focusout blur":function(b){a(d(b.target)).removeClass(a.mobile.focusClass)}}),e=null};a(c).bind("pagecreate create",function(b){a(":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmData(role='controlgroup') > a",b.target).jqmEnhanceable().not("button, input, .ui-btn, :jqmData(role='none'), :jqmData(role='nojs')").buttonMarkup()})}(a),function(a,b){a.widget("mobile.collapsible",a.mobile.widget,{options:{expandCueText:" click to expand contents",collapseCueText:" click to collapse contents",collapsed:!0,heading:"h1,h2,h3,h4,h5,h6,legend",theme:null,contentTheme:null,inset:!0,mini:!1,initSelector:":jqmData(role='collapsible')"},_create:function(){var c=this.element,d=this.options,e=c.addClass("ui-collapsible"),f=c.children(d.heading).first(),g=c.jqmData("collapsed-icon")||d.collapsedIcon,h=c.jqmData("expanded-icon")||d.expandedIcon,i=e.wrapInner("<div class='ui-collapsible-content'></div>").children(".ui-collapsible-content"),j=c.closest(":jqmData(role='collapsible-set')").addClass("ui-collapsible-set");f.is("legend")&&(f=a("<div role='heading'>"+f.html()+"</div>").insertBefore(f),f.next().remove()),j.length?(d.theme||(d.theme=j.jqmData("theme")||a.mobile.getInheritedTheme(j,"c")),d.contentTheme||(d.contentTheme=j.jqmData("content-theme")),d.collapsedIcon||(d.collapsedIcon=j.jqmData("collapsed-icon")),d.expandedIcon||(d.expandedIcon=j.jqmData("expanded-icon")),d.iconPos||(d.iconPos=j.jqmData("iconpos")),j.jqmData("inset")!==b?d.inset=j.jqmData("inset"):d.inset=!0,d.mini||(d.mini=j.jqmData("mini"))):d.theme||(d.theme=a.mobile.getInheritedTheme(c,"c")),!d.inset||e.addClass("ui-collapsible-inset"),i.addClass(d.contentTheme?"ui-body-"+d.contentTheme:""),g=c.jqmData("collapsed-icon")||d.collapsedIcon||"plus",h=c.jqmData("expanded-icon")||d.expandedIcon||"minus",f.insertBefore(i).addClass("ui-collapsible-heading").append("<span class='ui-collapsible-heading-status'></span>").wrapInner("<a href='#' class='ui-collapsible-heading-toggle'></a>").find("a").first().buttonMarkup({shadow:!1,corners:!1,iconpos:c.jqmData("iconpos")||d.iconPos||"left",icon:g,mini:d.mini,theme:d.theme}),!d.inset||f.find("a").first().add(".ui-btn-inner",c).addClass("ui-corner-top ui-corner-bottom"),e.bind("expand collapse",function(b){if(!b.isDefaultPrevented()){var c=a(this),k=b.type==="collapse",l=d.contentTheme;b.preventDefault(),d.customEventHandler&&d.customEventHandler.call(this,k),f.toggleClass("ui-collapsible-heading-collapsed",k).find(".ui-collapsible-heading-status").text(k?d.expandCueText:d.collapseCueText).end().find(".ui-icon").toggleClass("ui-icon-"+h,!k).toggleClass("ui-icon-"+g,k||h===g).end().find("a").first().removeClass(a.mobile.activeBtnClass),c.toggleClass("ui-collapsible-collapsed",k),i.toggleClass("ui-collapsible-content-collapsed",k).attr("aria-hidden",k),l&&!!d.inset&&(!j.length||e.jqmData("collapsible-last"))&&(f.find("a").first().add(f.find(".ui-btn-inner")).toggleClass("ui-corner-bottom",k),i.toggleClass("ui-corner-bottom",!k)),i.trigger("updatelayout")}}).trigger(d.collapsed?"collapse":"expand"),f.bind("tap",function(b){f.find("a").first().addClass(a.mobile.activeBtnClass)}).bind("click",function(a){var b=f.is(".ui-collapsible-heading-collapsed")?"expand":"collapse";e.trigger(b),a.preventDefault(),a.stopPropagation()})}}),a(c).bind("pagecreate create",function(b){a.mobile.collapsible.prototype.enhanceWithin(b.target)})}(a),function(a,b){a.widget("mobile.collapsibleset",a.mobile.widget,{options:{initSelector:":jqmData(role='collapsible-set')"},_create:function(){var c=this.element.addClass("ui-collapsible-set"),d=this.options;d.theme||(d.theme=a.mobile.getInheritedTheme(c,"c")),d.contentTheme||(d.contentTheme=c.jqmData("content-theme")),c.jqmData("inset")!==b&&(d.inset=c.jqmData("inset")),d.inset=d.inset!==b?d.inset:!0,c.jqmData("collapsiblebound")||c.jqmData("collapsiblebound",!0).bind("expand collapse",function(b){var c=b.type==="collapse",e=a(b.target).closest(".ui-collapsible"),f=e.data("collapsible");e.jqmData("collapsible-last")&&!!d.inset&&(e.find(".ui-collapsible-heading").first().find("a").first().toggleClass("ui-corner-bottom",c).find(".ui-btn-inner").toggleClass("ui-corner-bottom",c),e.find(".ui-collapsible-content").toggleClass("ui-corner-bottom",!c))}).bind("expand",function(b){var c=a(b.target).closest(".ui-collapsible");c.parent().is(":jqmData(role='collapsible-set')")&&c.siblings(".ui-collapsible").trigger("collapse")})},_init:function(){var a=this.element,b=a.children(":jqmData(role='collapsible')"),c=b.filter(":jqmData(collapsed='false')");this.refresh(),c.trigger("expand")},refresh:function(){var b=this.element,c=this.options,d=b.children(":jqmData(role='collapsible')");a.mobile.collapsible.prototype.enhance(d.not(".ui-collapsible")),!c.inset||(d.each(function(){a(this).jqmRemoveData("collapsible-last").find(".ui-collapsible-heading").find("a").first().removeClass("ui-corner-top ui-corner-bottom").find(".ui-btn-inner").removeClass("ui-corner-top ui-corner-bottom")}),d.first().find("a").first().addClass("ui-corner-top").find(".ui-btn-inner").addClass("ui-corner-top"),d.last().jqmData("collapsible-last",!0).find("a").first().addClass("ui-corner-bottom").find(".ui-btn-inner").addClass("ui-corner-bottom"))}}),a(c).bind("pagecreate create",function(b){a.mobile.collapsibleset.prototype.enhanceWithin(b.target)})}(a),function(a,b){a.widget("mobile.navbar",a.mobile.widget,{options:{iconpos:"top",grid:null,initSelector:":jqmData(role='navbar')"},_create:function(){var c=this.element,d=c.find("a"),e=d.filter(":jqmData(icon)").length?this.options.iconpos:b;c.addClass("ui-navbar ui-mini").attr("role","navigation").find("ul").jqmEnhanceable().grid({grid:this.options.grid}),d.buttonMarkup({corners:!1,shadow:!1,inline:!0,iconpos:e}),c.delegate("a","vclick",function(b){a(b.target).hasClass("ui-disabled")||(d.removeClass(a.mobile.activeBtnClass),a(this).addClass(a.mobile.activeBtnClass))}),c.closest(".ui-page").bind("pagebeforeshow",function(){d.filter(".ui-state-persist").addClass(a.mobile.activeBtnClass)})}}),a(c).bind("pagecreate create",function(b){a.mobile.navbar.prototype.enhanceWithin(b.target)})}(a),function(a,b){var d={};a.widget("mobile.listview",a.mobile.widget,{options:{theme:null,countTheme:"c",headerTheme:"b",dividerTheme:"b",splitIcon:"arrow-r",splitTheme:"b",inset:!1,initSelector:":jqmData(role='listview')"},_create:function(){var a=this,b="";b+=a.options.inset?" ui-listview-inset ui-corner-all ui-shadow ":"",a.element.addClass(function(a,c){return c+" ui-listview "+b}),a.refresh(!0)},_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;b=this.element.children("li"),c=a||b.filter(":visible").length===0?b.not(".ui-screen-hidden"):b.filter(":visible"),b.filter(".ui-li-last").removeClass("ui-li-last"),this.options.inset?(this._removeCorners(b),d=c.first().addClass("ui-corner-top"),d.add(d.find(".ui-btn-inner").not(".ui-li-link-alt span:first-child")).addClass("ui-corner-top").end().find(".ui-li-link-alt, .ui-li-link-alt span:first-child").addClass("ui-corner-tr").end().find(".ui-li-thumb").not(".ui-li-icon").addClass("ui-corner-tl"),e=c.last().addClass("ui-corner-bottom ui-li-last"),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")):c.last().addClass("ui-li-last"),a||this.element.trigger("updatelayout")},_findFirstElementByTagName:function(a,b,c,d){var e={};e[c]=e[d]=!0;while(a){if(e[a.nodeName])return a;a=a[b]}return null},_getChildrenByTagName:function(b,c,d){var e=[],f={};f[c]=f[d]=!0,b=b.firstChild;while(b)f[b.nodeName]&&e.push(b),b=b.nextSibling;return a(e)},_addThumbClasses:function(b){var c,d,e=b.length;for(c=0;c<e;c++)d=a(this._findFirstElementByTagName(b[c].firstChild,"nextSibling","img","IMG")),d.length&&(d.addClass("ui-li-thumb"),a(this._findFirstElementByTagName(d[0].parentNode,"parentNode","li","LI")).addClass(d.is(".ui-li-icon")?"ui-li-has-icon":"ui-li-has-thumb"))},_addCheckboxRadioClasses:function(b){var c,d,e=b.length;for(c=0;c<e;c++)d=a(b[c]).find("input"),d.attr("type")=="checkbox"?a(b[c]).addClass("ui-li-has-checkbox"):d.attr("type")=="radio"&&a(b[c]).addClass("ui-li-has-radio")},_addRightBtnClasses:function(b){var c,d,e=b.length;for(c=0;c<e;c++)d=a(b[c]).find(":jqmData(role='button')")||a(b[c]).find("input").attr("type")=="button",d.length&&(d.jqmData("style")=="circle"?a(b[c]).addClass("ui-li-has-right-circle-btn"):a(b[c]).addClass("ui-li-has-right-btn"))},refresh:function(d){this.parentPage=this.element.closest(".ui-page"),this._createSubPages();var e=this.options,f=this.element,g=this,h=f.jqmData("dividertheme")||e.dividerTheme,i=f.jqmData("splittheme"),j=f.jqmData("spliticon"),k=this._getChildrenByTagName(f[0],"li","LI"),l=!!a.nodeName(f[0],"ol"),m=!a.support.cssPseudoElement,n=f.attr("start"),o={},p,q,r,s,t,u,v,w,x,y,z,A,B,C;l&&m&&f.find(".ui-li-dec").remove(),l&&(n||n===0?m?v=parseFloat(n):(w=parseFloat(n)-1,f.css("counter-reset","listnumbering "+w)):m&&(v=1)),e.theme||(e.theme=a.mobile.getInheritedTheme(this.element,"c"));for(var D=0,E=k.length;D<E;D++){p=k.eq(D),q="ui-li";if(d||!p.hasClass("ui-li")){r=p.jqmData("theme")||e.theme,s=this._getChildrenByTagName(p[0],"a","A");var F=p.jqmData("role")==="list-divider";s.length&&!F?(z=p.jqmData("icon"),z===b&&(z=!1),p.buttonMarkup({wrapperEls:"div",shadow:!1,corners:!1,iconpos:"right",icon:s.length>1||z===!1?!1:z||"arrow-r",theme:r}),z!==!1&&s.length===1&&
+p.addClass("ui-li-has-arrow"),s.first().removeClass("ui-link").addClass("ui-link-inherit"),s.length>1&&(q+=" ui-li-has-alt",t=s.last(),u=i||t.jqmData("theme")||e.splitTheme,C=t.jqmData("icon"),t.appendTo(p).attr("title",t.getEncodedText()).addClass("ui-li-link-alt").empty().buttonMarkup({shadow:!1,corners:!1,theme:r,icon:!1,iconpos:"notext"}).find(".ui-btn-inner").append(a(c.createElement("span")).buttonMarkup({shadow:!0,corners:!0,theme:u,iconpos:"notext",icon:C||z||j||e.splitIcon})))):F?(q+=" ui-li-divider ui-bar-"+h,p.attr("role","heading"),l&&(n||n===0?m?v=parseFloat(n):(x=parseFloat(n)-1,p.css("counter-reset","listnumbering "+x)):m&&(v=1))):q+=" ui-li-static ui-btn-up-"+r}l&&m&&q.indexOf("ui-li-divider")<0&&(y=q.indexOf("ui-li-static")>0?p:p.find(".ui-link-inherit"),y.addClass("ui-li-jsnumbering").prepend("<span class='ui-li-dec'>"+v++ +". </span>")),o[q]||(o[q]=[]),o[q].push(p[0])}for(q in o)a(o[q]).addClass(q).children(".ui-btn-inner").addClass(q);f.find("h1, h2, h3, h4, h5, h6").addClass("ui-li-heading").end().find("p, dl").addClass("ui-li-desc").end().find(".ui-li-aside").each(function(){var b=a(this);b.prependTo(b.parent())}).end().find(".ui-li-count").each(function(){a(this).closest("li").addClass("ui-li-has-count")}).addClass("ui-btn-up-"+(f.jqmData("counttheme")||this.options.countTheme)+" ui-btn-corner-all"),this._addThumbClasses(k),this._addThumbClasses(f.find(".ui-link-inherit")),this._addCheckboxRadioClasses(k),this._addCheckboxRadioClasses(f.find(".ui-link-inherit")),this._addRightBtnClasses(k),this._addRightBtnClasses(f.find(".ui-link-inherit")),this._refreshCorners(d),this._trigger("afterrefresh")},_idStringEscape:function(a){return a.replace(/[^a-zA-Z0-9]/g,"-")},_createSubPages:function(){var b=this.element,c=b.closest(".ui-page"),e=c.jqmData("url"),f=e||c[0][a.expando],g=b.attr("id"),h=this.options,i="data-"+a.mobile.ns,j=this,k=c.find(":jqmData(role='footer')").jqmData("id"),l;typeof d[f]=="undefined"&&(d[f]=-1),g=g||++d[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=a(f.prevAll().toArray().reverse()),p=n.length?n:a("<span>"+a.trim(m.contents()[0].nodeValue)+"</span>"),q=p.first().getEncodedText(),r=(e||"")+"&"+a.mobile.subPageUrlKey+"="+j,s=f.jqmData("theme")||h.theme,t=f.jqmData("counttheme")||b.jqmData("counttheme")||h.countTheme,u,v;l=!0,u=f.detach().wrap("<div "+i+"role='page' "+i+"url='"+r+"' "+i+"theme='"+s+"' "+i+"count-theme='"+t+"'><div "+i+"role='content'></div></div>").parent().before("<div "+i+"role='header' "+i+"theme='"+h.headerTheme+"'><div class='ui-title'>"+q+"</div></div>").after(k?a("<div "+i+"role='footer' "+i+"id='"+k+"'>"):"").parent().appendTo(a.mobile.pageContainer),u.page(),v=m.find("a:first"),v.length||(v=a("<a/>").html(p||q).prependTo(m.empty())),v.attr("href","#"+r)}).listview();if(l&&c.is(":jqmData(external-page='true')")&&c.data("page").options.domCache===!1){var m=function(b,d){var f=d.nextPage,g,h=new a.Event("pageremove");d.nextPage&&(g=f.jqmData("url"),g.indexOf(e+"&"+a.mobile.subPageUrlKey)!==0&&(j.childPages().remove(),c.trigger(h),h.isDefaultPrevented()||c.removeWithDependents()))};c.unbind("pagehide.remove").bind("pagehide.remove",m)}},addItem:function(b,c){var d=a(b),e,f=this;e=f.element.children("li"),d.css({opacity:0,display:"none"}),e.length==0||e.length<=c?a(f.element).append(d):a(e.get(c)).before(d),a(f.element).trigger("create").listview("refresh"),d.css("min-height","0px"),d.slideDown("fast",function(){d.addClass("addli"),d.css({opacity:1})})},removeItem:function(b){var c,d,e=this;d=e.element.children("li");if(d.length<=0||d.length<b)return;c=a(d.get(b)),c.addClass("removeli"),c.slideUp("normal",function(){a(this).remove()})},childPages:function(){var b=this.parentPage.jqmData("url");return a(":jqmData(url^='"+b+"&"+a.mobile.subPageUrlKey+"')")}}),a(c).bind("pagecreate create",function(b){a.mobile.listview.prototype.enhanceWithin(b.target)})}(a),function(a,b){a.mobile.listview.prototype.options.autodividers=!1,a.mobile.listview.prototype.options.autodividersSelector=function(a){var b=a.text()||null;return b?(b=b.trim().slice(0,1).toUpperCase(),b):null},a(c).delegate("ul,ol","listviewcreate",function(){var b=a(this),d=b.data("listview");if(!d||!d.options.autodividers)return;var e=function(){b.find("li:jqmData(role='list-divider')").remove();var e=b.find("li"),f=null,g,h;for(var i=0;i<e.length;i++){g=e[i],h=d.options.autodividersSelector(a(g));if(h&&f!==h){var j=c.createElement("li");j.appendChild(c.createTextNode(h)),j.setAttribute("data-"+a.mobile.ns+"role","list-divider"),g.parentNode.insertBefore(j,g)}f=h}},f=function(){b.unbind("listviewafterrefresh",f),e(),d.refresh(),b.bind("listviewafterrefresh",f)};f()})}(a),function(a,b){a.widget("mobile.checkboxradio",a.mobile.widget,{options:{theme:null,initSelector:"input[type='checkbox'],input[type='radio']"},_create:function(){var d=this,e=this.element,f=function(a,b){return a.jqmData(b)||a.closest("form, fieldset").jqmData(b)},g=a(e).closest("label"),h=g.length?g:e[0].id?a(e).closest("form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')").find("label").filter("[for='"+e[0].id+"']"):[],i=e[0].type,j=f(e,"mini"),k=i+"-on",l=i+"-off",m=e.parents(":jqmData(type='horizontal')").length?b:l,n=f(e,"iconpos"),o=m?"":" "+a.mobile.activeBtnClass,p="ui-"+k+o,q="ui-"+l,r="ui-icon-"+k,s="ui-icon-"+l;if(i!=="checkbox"&&i!=="radio")return;h.length==0&&(h=a("<label for='"+e[0].id+"'></label>")),a.extend(this,{label:h,inputtype:i,checkedClass:p,uncheckedClass:q,checkedicon:r,uncheckedicon:s}),this.options.theme||(this.options.theme=a.mobile.getInheritedTheme(this.element,"c")),h.buttonMarkup({theme:this.options.theme,icon:m,shadow:!1,mini:j,iconpos:n});var t=c.createElement("div");t.className="ui-"+i,e.hasClass("favorite")&&(t.className+=" favorite"),e.add(h).wrapAll(t),h.bind({vmouseover:function(b){a(this).parent().is(".ui-disabled")&&b.stopPropagation()},vclick:function(a){if(e.is(":disabled")){a.preventDefault();return}return d._cacheVals(),e.prop("checked",i==="radio"&&!0||!e.prop("checked")),e.triggerHandler("click"),d._getInputSet().not(e).prop("checked",!1),d._updateAll(),!1}}),e.bind({vmousedown:function(){d._cacheVals()},vclick:function(){var b=a(this);b.is(":checked")?(b.prop("checked",!0),d._getInputSet().not(b).prop("checked",!1)):b.prop("checked",!1),d._updateAll()},focus:function(){h.addClass(a.mobile.focusClass)},blur:function(){h.removeClass(a.mobile.focusClass)}}),this.refresh()},_cacheVals:function(){this._getInputSet().each(function(){a(this).jqmData("cacheVal",this.checked)})},_getInputSet:function(){return this.inputtype==="checkbox"?this.element:this.element.closest("form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')").find("input[name='"+this.element[0].name+"'][type='"+this.inputtype+"']")},_updateAll:function(){var b=this;this._getInputSet().each(function(){var c=a(this);(this.checked||b.inputtype==="checkbox")&&c.trigger("change"),c.focus()}).checkboxradio("refresh")},refresh:function(){var a=this.element[0],b=this.label,c=b.find(".ui-icon");a.checked?(b.addClass(this.checkedClass).removeClass(this.uncheckedClass),c.addClass(this.checkedicon).removeClass(this.uncheckedicon)):(b.removeClass(this.checkedClass).addClass(this.uncheckedClass),c.removeClass(this.checkedicon).addClass(this.uncheckedicon)),a.disabled?this.disable():this.enable()},disable:function(){this.element.prop("disabled",!0).parent().addClass("ui-disabled")},enable:function(){this.element.prop("disabled",!1).parent().removeClass("ui-disabled")}}),a(c).bind("pagecreate create",function(b){a.mobile.checkboxradio.prototype.enhanceWithin(b.target,!0)})}(a),function(a,b){a.widget("mobile.button",a.mobile.widget,{options:{theme:null,icon:null,iconpos:null,corners:!0,shadow:!0,iconshadow:!0,initSelector:"button, [type='button'], [type='submit'], [type='reset']"},_create:function(){var d=this.element,e,f=this.options,g,h,i=f.inline||d.jqmData("inline"),j=f.mini||d.jqmData("mini"),k="",l;if(d[0].tagName==="A"){d.hasClass("ui-btn")||d.buttonMarkup();return}this.options.theme||(this.options.theme=a.mobile.getInheritedTheme(this.element,"c")),!~d[0].className.indexOf("ui-btn-left")||(k="ui-btn-left"),!~d[0].className.indexOf("ui-btn-right")||(k="ui-btn-right");if(d.attr("type")==="submit"||d.attr("type")==="reset")k?k+=" ui-submit":k="ui-submit";a("label[for='"+d.attr("id")+"']").addClass("ui-submit"),this.button=a("<div></div>")[d.html()?"html":"text"](d.html()||d.val()).insertBefore(d).buttonMarkup({theme:f.theme,icon:f.icon,iconpos:f.iconpos,inline:i,corners:f.corners,shadow:f.shadow,iconshadow:f.iconshadow,mini:j}).addClass(k).append(d.addClass("ui-btn-hidden")),e=this.button,g=d.attr("type"),h=d.attr("name"),g!=="button"&&g!=="reset"&&h&&d.bind("vclick",function(){l===b&&(l=a("<input>",{type:"hidden",name:d.attr("name"),value:d.attr("value")}).insertBefore(d),a(c).one("submit",function(){l.remove(),l=b}))}),d.bind({focus:function(){e.addClass(a.mobile.focusClass)},blur:function(){e.removeClass(a.mobile.focusClass)}}),this.refresh()},enable:function(){return this.element.attr("disabled",!1),this.button.removeClass("ui-disabled").attr("aria-disabled",!1),this._setOption("disabled",!1)},disable:function(){return this.element.attr("disabled",!0),this.button.addClass("ui-disabled").attr("aria-disabled",!0),this._setOption("disabled",!0)},refresh:function(){var b=this.element;b.prop("disabled")?this.disable():this.enable(),a(this.button.data("buttonElements").text)[b.html()?"html":"text"](b.html()||b.val())}}),a(c).bind("pagecreate create",function(b){a.mobile.button.prototype.enhanceWithin(b.target,!0)})}(a),function(a,b){a.fn.controlgroup=function(b){function c(a,b){a.removeClass("ui-btn-corner-all ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-controlgroup-last ui-shadow").eq(0).addClass(b[0]).end().last().addClass(b[1]).addClass("ui-controlgroup-last")}return this.each(function(){var d=a(this),e=a.extend({direction:d.jqmData("type")||"vertical",shadow:!1,excludeInvisible:!0,mini:d.jqmData("mini")},b),f=d.children("legend"),g=d.children(".ui-controlgroup-label"),h=d.children(".ui-controlgroup-controls"),i=e.direction==="horizontal"?["ui-corner-left","ui-corner-right"]:["ui-corner-top","ui-corner-bottom"],j=d.find("input").first().attr("type");h.length&&h.contents().unwrap(),d.wrapInner("<div class='ui-controlgroup-controls'></div>"),f.length?(a("<div role='heading' class='ui-controlgroup-label'>"+f.html()+"</div>").insertBefore(d.children(0)),f.remove()):g.length&&d.prepend(g),d.addClass("ui-corner-all ui-controlgroup ui-controlgroup-"+e.direction),c(d.find(".ui-btn"+(e.excludeInvisible?":visible":"")).not(".ui-slider-handle"),i),c(d.find(".ui-btn-inner"),i),e.shadow&&d.addClass("ui-shadow"),e.mini&&d.addClass("ui-mini")})}}(a),function(a,b){a(c).bind("pagecreate create",function(b){a(b.target).find("a").jqmEnhanceable().not(".ui-btn, .ui-link-inherit, :jqmData(role='none'), :jqmData(role='nojs')").addClass("ui-link")})}(a),function(a,d){function e(a,b,c,d){var e=d;return a<b?e=c+(a-b)/2:e=Math.min(Math.max(c,d-b/2),c+a-b),e}function f(){var c=a(b);return{x:c.scrollLeft(),y:c.scrollTop(),cx:b.innerWidth||c.width(),cy:b.innerHeight||c.height()}}a.widget("mobile.popup",a.mobile.widget,{options:{theme:null,overlayTheme:null,shadow:!0,corners:!0,transition:"pop",positionTo:"origin",tolerance:null,initSelector:":jqmData(role='popup')",closeLinkSelector:"a:jqmData(rel='back')",closeLinkEvents:"click.popup",navigateEvents:"navigate.popup",closeEvents:"navigate.popup pagebeforechange.popup",history:!1},_eatEventAndClose:function(a){return a.preventDefault(),a.stopImmediatePropagation(),this.close(),!1},_resizeScreen:function(){var a=this._ui.container.outerHeight(!0);this._ui.screen.removeAttr("style"),a>this._ui.screen.height()&&this._ui.screen.height(a)},_handleWindowKeyUp:function(b){if(this._isOpen&&b.keyCode===a.mobile.keyCode.ESCAPE)return this._eatEventAndClose(b)},_maybeRefreshTimeout:function(){var b=f();if(this._resizeData){if(b.x===this._resizeData.winCoords.x&&b.y===this._resizeData.winCoords.y&&b.cx===this._resizeData.winCoords.cx&&b.cy===this._resizeData.winCoords.cy)return!1;clearTimeout(this._resizeData.timeoutId)}return this._resizeData={timeoutId:setTimeout(a.proxy(this,"_resizeTimeout"),200),winCoords:b},!0},_resizeTimeout:function(){!this._maybeRefreshTimeout()&&this.positionTo==="window"&&(this._trigger("beforeposition"),this._ui.container.removeClass("ui-selectmenu-hidden").offset(this._placementCoords(this._desiredCoords(d,d,"window"))),this._resizeScreen(),this._resizeData=null,this._orientationchangeInProgress=!1)},_handleWindowResize:function(a){this._isOpen&&this._maybeRefreshTimeout()},_handleWindowOrientationchange:function(a){this._orientationchangeInProgress||(this._ui.container.addClass("ui-selectmenu-hidden").removeAttr("style"),this._orientationchangeInProgress=!0)},_create:function(){var c={screen:a("<div class='ui-screen-hidden ui-popup-screen'></div>"),placeholder:a("<div style='display: none;'><!-- placeholder --></div>"),container:a("<div class='ui-popup-container ui-selectmenu-hidden'></div>"),arrow:a("<div class='ui-arrow'></div>")},e=this.element.closest(".ui-page"),f=this.element.attr("id"),g=this;this.options.history=this.options.history&&a.mobile.ajaxEnabled&&a.mobile.hashListeningEnabled,e.length===0&&(e=a("body")),this.options.container=this.options.container||a.mobile.pageContainer,e.append(c.screen),c.container.insertAfter(c.screen),c.placeholder.insertAfter(this.element),f&&(c.screen.attr("id",f+"-screen"),c.container.attr("id",f+"-popup"),c.placeholder.html("<!-- placeholder for "+f+" -->")),c.container.append(this.element),c.container.append(c.arrow),this.element.addClass("ui-popup"),a.extend(this,{_page:e,_ui:c,_fallbackTransition:"",_currentTransition:!1,_prereqs:null,_isOpen:!1,_tolerance:null,_resizeData:null,_orientationchangeInProgress:!1,_globalHandlers:[{src:a(b),handler:{orientationchange:a.proxy(this,"_handleWindowOrientationchange"),resize:a.proxy(this,"_handleWindowResize"),keyup:a.proxy(this,"_handleWindowKeyUp")}}]}),a.each(this.options,function(a,b){g.options[a]=d,g._setOption(a,b,!0)}),c.screen.bind("vclick",a.proxy(this,"_eatEventAndClose")),a.each(this._globalHandlers,function(a,b){b.src.bind(b.handler)})},_applyTheme:function(a,b,c){var d=(a.attr("class")||"").split(" "),e=!0,f=null,g,h=String(b);while(d.length>0){f=d.pop(),g=(new RegExp("^ui-"+c+"-([a-z])$")).exec(f);if(g&&g.length>1){f=g[1];break}f=null}b!==f&&(a.removeClass("ui-"+c+"-"+f),b!==null&&b!=="none"&&a.addClass("ui-"+c+"-"+h))},_setTheme:function(a){this._applyTheme(this.element,a,"body")},_setOverlayTheme:function(a){this._applyTheme(this._ui.screen,a,"overlay"),this._isOpen&&this._ui.screen.addClass("in")},_setShadow:function(a){this.element.toggleClass("ui-overlay-shadow",a)},_setCorners:function(a){this.element.toggleClass("ui-corner-all",a)},_applyTransition:function(b){this._ui.container.removeClass(this._fallbackTransition),b&&b!=="none"&&(this._fallbackTransition=a.mobile._maybeDegradeTransition(b),this._ui.container.addClass(this._fallbackTransition))},_setTransition:function(a){this._currentTransition||this._applyTransition(a)},_setTolerance:function(b){var c={t:5,r:5,b:5,l:5};if(b){var d=String(b).split(",");a.each(d,function(a,b){d[a]=parseInt(b,10)});switch(d.length){case 1:isNaN(d[0])||(c.t=c.r=c.b=c.l=d[0]);break;case 2:isNaN(d[0])||(c.t=c.b=d[0]),isNaN(d[1])||(c.l=c.r=d[1]);break;case 4:isNaN(d[0])||(c.t=d[0]),isNaN(d[1])||(c.r=d[1]),isNaN(d[2])||(c.b=d[2]),isNaN(d[3])||(c.l=d[3]);break;default:}}this._tolerance=c},_setOption:function(b,c){var e,f="_set"+b.charAt(0).toUpperCase()+b.slice(1);this[f]!==d&&this[f](c),e=["initSelector","closeLinkSelector","closeLinkEvents","navigateEvents","closeEvents","history","container"],a.mobile.widget.prototype._setOption.apply(this,arguments),a.inArray(b,e)===-1&&this.element.attr("data-"+(a.mobile.ns||"")+b.replace(/([A-Z])/,"-$1").toLowerCase(),c)},_placementCoords:function(d){var g=f(),h={x:this._tolerance.l,y:g.y+this._tolerance.t,cx:g.cx-this._tolerance.l-this._tolerance.r,cy:g.cy-this._tolerance.t-this._tolerance.b},i,j,k=a(this.link).offset(),l=[],m=[0,0],n;this._ui.container.css("max-width",h.cx),i={cx:this._ui.container.outerWidth(!0),cy:this._ui.container.outerHeight(!0)},j={x:e(h.cx,i.cx,h.x,d.x),y:e(h.cy,i.cy,h.y,d.y)},j.y=Math.max(0,j.y);var o=c.documentElement,p=c.body,q=Math.max(o.clientHeight,p.scrollHeight,p.offsetHeight,o.scrollHeight,o.offsetHeight);j.y-=Math.min(j.y,Math.max(0,j.y+i.cy-q));if(this.positionTo!=="origin")return{left:j.x,top:j.y,arrowleft:0,arrowtop:0};l=[k.left,k.top,o.clientHeight-(k.top+a(this.link).height()),o.clientWidth-(k.left+a(this.link).width())],n=l.indexOf(Math.max.apply(b,l));switch(n){case 0:m=[-a(this.link).width(),0],arrow.attr("class","").addClass("ui-arrow right");break;case 1:m=[0,-(j.y+i.cy-k.top)],arrowtop=i.cy-1,arrowleft=k.left-j.x+m[0]+a(this.link).width()/2-parseInt(a(this._ui.arrow).css("border-width"))/2,a(this._ui.arrow).attr("class","").addClass("ui-arrow bottom");break;case 2:m=[0,k.top+a(this.link).height()-j.y],arrowtop=-parseInt(a(this._ui.arrow).css("border-width"))*2+1,arrowleft=k.left-j.x+m[0]+a(this.link).width()/2-parseInt(a(this._ui.arrow).css("border-width"))/2,a(this._ui.arrow).attr("class","").addClass("ui-arrow top");break;case 3:m=[i.cx<a(this.link).width()?a(this.link).width()/2+i.cx/2:a(this.link).width(),0],arrowtop=k.top-j.y+a(this.link).height()/2-parseInt(a(this._ui.arrow).css("border-width")),arrowleft=-parseInt(a(this._ui.arrow).css("border-width"))*2,a(this._ui.arrow).attr("class","").addClass("ui-arrow right")}return{left:j.x+m[0],top:j.y+m[1],arrowleft:arrowleft,arrowtop:arrowtop}},_createPrereqs:function(b,c,d){var e=this,f;f={screen:a.Deferred(),container:a.Deferred()},f.screen.then(function(){f===e._prereqs&&b()}),f.container.then(function(){f===e._prereqs&&c()}),a.when(f.screen,f.container).done(function(){f===e._prereqs&&(e._prereqs=null,d())}),e._prereqs=f},_animate:function(b){this._ui.screen.removeClass(b.classToRemove).addClass(b.screenClassToAdd),b.prereqs.screen.resolve(),b.transition&&b.transition!=="none"?(b.applyTransition&&this._applyTransition(b.transition),this._ui.container.animationComplete(a.proxy(b.prereqs.container,"resolve")).addClass(b.containerClassToAdd).removeClass(b.classToRemove)):b.prereqs.container.resolve()},_desiredCoords:function(b,c,d){var e=null,g,h=f();if(d&&d!=="origin")if(d==="window")b=h.cx/2+h.x,c=h.cy/2+h.y;else{try{e=a(d)}catch(i){e=null}e&&(e.filter(":visible"),e.length===0&&(e=null))}e&&(g=e.offset(),b=g.left+e.outerWidth()/2,c=g.top+e.outerHeight()/2);if(a.type(b)!=="number"||isNaN(b))b=h.cx/2+h.x;if(a.type(c)!=="number"||isNaN(c))c=h.cy/2+h.y;return{x:b,y:c}},_openPrereqsComplete:function(){var a=this;a._ui.container.addClass("ui-popup-active"),a._isOpen=!0,a._resizeScreen(),setTimeout(function(){a._ui.container.attr("tabindex","0").focus(),a._trigger("afteropen")})},_open:function(c){var d,e,f=function(){var a=b,c=navigator.userAgent,d=c.match(/AppleWebKit\/([0-9\.]+)/),e=!!d&&d[1],f=c.match(/Android (\d+(?:\.\d+))/),g=!!f&&f[1],h=c.indexOf("Chrome")>-1;return f!==null&&g==="4.0"&&e&&e>534.13&&!h?!0:!1}();c=c||{},e=c.transition||this.options.transition,this._trigger("beforeposition"),d=this._placementCoords(this._desiredCoords(c.x,c.y,c.positionTo||this.options.positionTo||"origin")),this._createPrereqs(a.noop,a.noop,a.proxy(this,"_openPrereqsComplete")),e?(this._currentTransition=e,this._applyTransition(e)):e=this.options.transition,this.options.theme||this._setTheme(this._page.jqmData("theme")||a.mobile.getInheritedTheme(this._page,"c")),this._ui.screen.removeClass("ui-screen-hidden"),this._ui.container.removeClass("ui-selectmenu-hidden").offset(d),this._ui.arrow.css({top:d.arrowtop,left:d.arrowleft}),this.options.overlayTheme&&f&&this.element.closest(".ui-page").addClass("ui-popup-open"),this._animate({additionalCondition:!0,transition:e,classToRemove:"",screenClassToAdd:"in",containerClassToAdd:"in",applyTransition:!1,prereqs:this._prereqs})},_closePrereqScreen:function(){this._ui.screen.removeClass("out").addClass("ui-screen-hidden")},_closePrereqContainer:function(){this._ui.container.removeClass("reverse out").addClass("ui-selectmenu-hidden").removeAttr("style")},_closePrereqsDone:function(){var b=this,c=b.options;b._ui.container.removeAttr("tabindex"),c.container.unbind(c.closeEvents),b.element.undelegate(c.closeLinkSelector,c.closeLinkEvents),a.mobile.popup.active=d,b._trigger("afterclose")},_close:function(){this._ui.container.removeClass("ui-popup-active"),this._page.removeClass("ui-popup-open"),this._isOpen=!1,this.element.find("input").blur(),this._createPrereqs(a.proxy(this,"_closePrereqScreen"),a.proxy(this,"_closePrereqContainer"),a.proxy(this,"_closePrereqsDone")),this._animate({additionalCondition:this._ui.screen.hasClass("in"),transition:this._currentTransition||this.options.transition,classToRemove:"in",screenClassToAdd:"out",containerClassToAdd:"reverse out",applyTransition:!0,prereqs:this._prereqs})},_destroy:function(){var b=this;b._close(),b._setTheme("none"),b.element.insertAfter(b._ui.placeholder).removeClass("ui-popup ui-overlay-shadow ui-corner-all"),b._ui.screen.remove(),b._ui.container.remove(),b._ui.placeholder.remove(),a.each(b._globalHandlers,function(b,c){a.each(c.handler,function(a,b){c.src.unbind(a,b)})})},_bindContainerClose:function(){var b=this;b.options.container.one(b.options.closeEvents,a.proxy(b._close,b))},open:function(b){var c=this,e=this.options,f,g,h,i,j,k;if(a.mobile.popup.active)return;a.mobile.popup.active=this,b||(b=[]),b.link?c.link=b.link:c.link=a(event.target).closest("a")[0],c.positionTo=b!=null&&b.positionTo!=null?b.positionTo:"origin",a(c.link).jqmData("position-to")!=="window"&&c.positionTo!=="window"?(a(c.element).addClass("ui-ctxpopup"),a(c._ui.container).removeClass("ui-popup-container").addClass("ui-ctxpopup-container"),c.positionTo!=="origin"?a(c._ui.arrow).hide():a(c._ui.arrow).show()):a(c._ui.arrow).hide(),!b.x&&c.positionTo==="origin"&&(b.x=a(c.link).offset().left+a(c.link).outerWidth()/2),!b.y&&c.positionTo==="origin"&&(b.y=a(c.link).offset().top+a(c.link).outerHeight()/2);if(!e.history){c._open(b),c._bindContainerClose(),c.element.delegate(e.closeLinkSelector,e.closeLinkEvents,function(a){return c._close(),!1});return}g=a.mobile.dialogHashKey,h=a.mobile.activePage,i=h.is(".ui-dialog"),f=a.mobile.urlHistory.getActive().url,j=f.indexOf(g)>-1&&!i,k=a.mobile.urlHistory;if(j){c._open(b),c._bindContainerClose();return}f.indexOf(g)===-1&&!i?f+=g:f=a.mobile.path.parseLocation().hash+g,k.activeIndex===0&&f===k.initialDst&&(f+=g),e.container.one(e.navigateEvents,function(a){a.preventDefault(),c._open(b),c._bindContainerClose()}),k.ignoreNextHashChange=i,k.addNew(f,d,d,d,"dialog"),a.mobile.path.set(f)},close:function(){if(!a.mobile.popup.active)return;this.options.history?a.mobile.back():this._close()}}),a.mobile.popup.handleLink=function(b){var c=b.closest(":jqmData(role='page')"),d=c.length===0?a("body"):c,e=a(a.mobile.path.parseUrl(b.attr("href")).hash,d[0]),f;e.data("popup")&&(f=b.offset(),e.popup("open",{x:f.left+b.outerWidth()/2,y:f.top+b.outerHeight()/2,transition:b.jqmData("transition"),positionTo:b.jqmData("position-to"),link:b})),setTimeout(function(){b.removeClass(a.mobile.activeBtnClass)},300)},a(c).bind("pagebeforechange",function(b,c){c.options.role==="popup"&&(a.mobile.popup.handleLink(c.options.link),b.preventDefault())}),a(c).bind("pagecreate create",function(b){a.mobile.popup.prototype.enhanceWithin(b.target,!0)})}(a),function(a){var b=a("meta[name=viewport]"),c=b.attr("content"),d=c+",maximum-scale=1, user-scalable=no",e=c+",maximum-scale=10, user-scalable=yes",f=/(user-scalable[\s]*=[\s]*no)|(maximum-scale[\s]*=[\s]*1)[$,\s]/.test(c);a.mobile.zoom=a.extend({},{enabled:!f,locked:!1,disable:function(c){!f&&!a.mobile.zoom.locked&&(b.attr("content",d),a.mobile.zoom.enabled=!1,a.mobile.zoom.locked=c||!1)},enable:function(c){!f&&(!a.mobile.zoom.locked||c===!0)&&(b.attr("content",e),a.mobile.zoom.enabled=!0,a.mobile.zoom.locked=!1)},restore:function(){f||(b.attr("content",c),a.mobile.zoom.enabled=!0)}})}(a),function(a,d){a.widget("mobile.textinput",a.mobile.widget,{options:{theme:null,preventFocusZoom:/iPhone|iPad|iPod/.test(navigator.platform)&&navigator.userAgent.indexOf("AppleWebKit")>-1,initSelector:"input[type='text'], input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type])",disabled:!1},_create:function(){function m(){setTimeout(function(){l.toggleClass("ui-input-clear-hidden",!e.val())},0)}var d=this,e=this.element,f=this.options,g=f.theme||a.mobile.getInheritedTheme(this.element,"c"),h=" ui-body-"+g,i=e.jqmData("mini")===!0,j=i?" ui-mini":"",k,l;a("label[for='"+e.attr("id")+"']").addClass("ui-input-text"),k=e.addClass("ui-input-text ui-body-"+g),typeof e[0].autocorrect!="undefined"&&!a.support.touchOverflow&&(e[0].setAttribute("autocorrect","off"),e[0].setAttribute("autocomplete","off")),e.focus(function(){k.addClass(a.mobile.focusClass)}).blur(function(){k.removeClass(a.mobile.focusClass)}).bind("focus",function(){f.preventFocusZoom&&a.mobile.zoom.disable(!0)}).bind("blur",function(){f.preventFocusZoom&&a.mobile.zoom.enable(!0)});if(e.is("textarea")){var n=15,o=100,p;this._keyup=function(){var a=e[0].scrollHeight,c=e[0].clientHeight;c<a&&b.innerHeight/2>a&&e.height(a+n)},e.keyup(function(){clearTimeout(p),p=setTimeout(d._keyup,o)}),this._on(a(c),{pagechange:"_keyup"}),a.trim(e.val())&&this._on(a(b),{load:"_keyup"})}e.attr("disabled")&&this.disable()},disable:function(){var a;if(!this.element.attr("disabled",!0))return;return a=this.element,a.addClass("ui-disabled"),this._setOption("disabled",!0)},enable:function(){var a;if(!this.element.attr("disabled",!1))return;return a=this.element,a.removeClass("ui-disabled"),this._setOption("disabled",!1)}}),a(c).bind("pagecreate create",function(b){a.mobile.textinput.prototype.enhanceWithin(b.target,!0)})}(a),function(a,b){a.mobile.listview.prototype.options.filter=!1,a.mobile.listview.prototype.options.filterPlaceholder="",a.mobile.listview.prototype.options.filterTheme="c";var d=function(a,b,c){return a.toString().toLowerCase().indexOf(b)===-1};a.mobile.listview.prototype.options.filterCallback=d,a(c).delegate(":jqmData(role='listview')","listviewcreate",function(){var b=a(this),c=b.data("listview");if(!c.options.filter)return;var e=a("<form>",{"class":"ui-listview-filter ui-bar-"+c.options.filterTheme,role:"search"}),f=a("<input>",{placeholder:c.options.filterPlaceholder}).attr("data-"+a.mobile.ns+"type","search").jqmData("lastval","").bind("keyup change",function(){var e=a(this),f=this.value.toLowerCase(),g=null,h=e.jqmData("lastval")+"",i=!1,j="",k,l=c.options.filterCallback!==d;c._trigger("beforefilter","beforefilter",{input:this}),e.jqmData("lastval",f),l||f.length<h.length||f.indexOf(h)!==0?g=b.children():g=b.children(":not(.ui-screen-hidden)");if(f){for(var m=g.length-1;m>=0;m--)k=a(g[m]),j=k.jqmData("filtertext")||k.text(),k.is("li:jqmData(role=list-divider)")?(k.toggleClass("ui-filter-hidequeue",!i),i=!1):c.options.filterCallback(j,f,k)?k.toggleClass("ui-filter-hidequeue",!0):i=!0;g.filter(":not(.ui-filter-hidequeue)").toggleClass("ui-screen-hidden",!1),g.filter(".ui-filter-hidequeue").toggleClass("ui-screen-hidden",!0).toggleClass("ui-filter-hidequeue",!1)}else g.toggleClass("ui-screen-hidden",!1);c._refreshCorners()}).appendTo(e).textinput();c.options.inset&&e.addClass("ui-listview-filter-inset"),e.bind("submit",function(){return!1}).insertBefore(b)})}(a),function(a,d){a.widget("mobile.slider",a.mobile.widget,{widgetEventPrefix:"slide",options:{theme:null,trackTheme:null,disabled:!1,initSelector:"input[type='range'], :jqmData(type='range'), :jqmData(role='slider')",mini:!1},_create:function(){var e=this,f=this.element,g=a.mobile.getInheritedTheme(f,"c"),h=this.options.theme||g,i=this.options.trackTheme||g,j=f[0].nodeName.toLowerCase(),k=j==="select"?"ui-slider-switch":"",l=f.attr("id"),m=a("[for='"+l+"']"),n=m.attr("id")||l+"-label",o=m.attr("id",n),p=function(){return j==="input"?parseFloat(f.val()):f[0].selectedIndex},q=j==="input"?parseFloat(f.attr("min")):0,r=j==="input"?parseFloat(f.attr("max")):f.find("option").length-1,s=b.parseFloat(f.attr("step")||1),t=this.options.inline||f.jqmData("inline")===!0?" ui-slider-inline":"",u=this.options.mini||f.jqmData("mini")?" ui-slider-mini":"",v=c.createElement("a"),w=a(v),x=c.createElement("div"),y=a(x),z=f.jqmData("highlight")!==!1&&j!=="select"?function(){var b=c.createElement("div");return b.className="ui-slider-bg "+a.mobile.activeBtnClass+" ui-btn-corner-all",a(b).prependTo(y)}():!1,A;this._type=j,v.setAttribute("href","#"),x.setAttribute("role","application"),x.className=["ui-slider ",k," ui-btn-down-",i," ui-btn-corner-all",t,u].join(""),v.className="ui-slider-handle",x.appendChild(v),a(f).find("option").length&&a(f).find("option").text()===""&&a(x).addClass("ui-toggle-switch"),w.buttonMarkup({corners:!0,theme:h,shadow:!0}).attr({role:"slider","aria-valuemin":q,"aria-valuemax":r,"aria-valuenow":p(),"aria-valuetext":p(),title:p(),"aria-labelledby":n}),a.extend(this,{slider:y,handle:w,valuebg:z,dragging:!1,beforeStart:null,userModified:!1,mouseMoved:!1});if(j==="select"){var B=c.createElement("div");B.className="ui-slider-inneroffset";for(var C=0,D=x.childNodes.length;C<D;C++)B.appendChild(x.childNodes[C]);x.appendChild(B),w.addClass("ui-slider-handle-snapping"),A=f.find("option");for(var E=0,F=A.length;E<F;E++){var G=E?"a":"b",H=E?" "+a.mobile.activeBtnClass:" ui-btn-down-"+i,I=c.createElement("div"),J=c.createElement("span");J.className=["ui-slider-label ui-slider-label-",G,H," ui-btn-corner-all"].join(""),J.setAttribute("role","img"),J.appendChild(c.createTextNode(A[E].innerHTML)),a(J).html()?a(J).html(a(J).text()):a(J).html(),a(J).prependTo(y)}e._labels=a(".ui-slider-label",y)}o.addClass("ui-slider"),f.addClass(j==="input"?"ui-slider-input":"ui-slider-switch").change(function(){e.mouseMoved||e.refresh(p(),!0)}).keyup(function(){e.refresh(p(),!0,!0)}).blur(function(){e.refresh(p(),!0)}),this._preventDocumentDrag=function(a){if(e.dragging&&!e.options.disabled)return e.mouseMoved=!0,j==="select"&&w.removeClass("ui-slider-handle-snapping"),e.refresh(a),e.userModified=e.beforeStart!==f[0].selectedIndex,!1},this._on(a(c),{vmousemove:this._preventDocumentDrag}),f.bind("vmouseup",a.proxy(e._checkedRefresh,e)),y.bind("vmousedown",function(a){return e.options.disabled?!1:(e.dragging=!0,e.userModified=!1,e.mouseMoved=!1,j==="select"&&(e.beforeStart=f[0].selectedIndex),e.refresh(a),e._trigger("start"),!1)}).bind("vclick",!1),this._sliderMouseUp=function(){if(e.dragging)return e.dragging=!1,j==="select"&&(w.addClass("ui-slider-handle-snapping"),e.mouseMoved?e.userModified?e.refresh(e.beforeStart===0?1:0):e.refresh(e.beforeStart):e.refresh(e.beforeStart===0?1:0)),e.mouseMoved=!1,e._trigger("stop"),!1},this._on(y.add(c),{vmouseup:this._sliderMouseUp}),y.insertAfter(f),j==="select"&&this.handle.bind({focus:function(){y.addClass(a.mobile.focusClass)},blur:function(){y.removeClass(a.mobile.focusClass)}}),this.handle.bind({vmousedown:function(){a(this).focus()},vclick:!1,keydown:function(b){var c=p();if(e.options.disabled)return;switch(b.keyCode){case a.mobile.keyCode.HOME:case a.mobile.keyCode.END:case a.mobile.keyCode.PAGE_UP:case a.mobile.keyCode.PAGE_DOWN:case a.mobile.keyCode.UP:case a.mobile.keyCode.RIGHT:case a.mobile.keyCode.DOWN:case a.mobile.keyCode.LEFT:b.preventDefault(),e._keySliding||(e._keySliding=!0,a(this).addClass("ui-state-active"))}switch(b.keyCode){case a.mobile.keyCode.HOME:e.refresh(q);break;case a.mobile.keyCode.END:e.refresh(r);break;case a.mobile.keyCode.PAGE_UP:case a.mobile.keyCode.UP:case a.mobile.keyCode.RIGHT:e.refresh(c+s);break;case a.mobile.keyCode.PAGE_DOWN:case a.mobile.keyCode.DOWN:case a.mobile.keyCode.LEFT:e.refresh(c-s)}},keyup:function(b){e._keySliding&&(e._keySliding=!1,a(this).removeClass("ui-state-active"))}}),this.refresh(d,d,!0)},_checkedRefresh:function(){this.value!=this._value()&&this.refresh(this._value())},_value:function(){return this._type==="input"?parseFloat(this.element.val()):this.element[0].selectedIndex},refresh:function(b,c,d){var e=!1,f;a(this.handle).parents().is(".ui-toggle-switch")&&(e=!0),(this.options.disabled||this.element.attr("disabled"))&&this.disable(),this.value=this._value();var g=this.element,h,i=g[0].nodeName.toLowerCase(),j=i==="input"?
+parseFloat(g.attr("min")):0,k=i==="input"?parseFloat(g.attr("max")):g.find("option").length-1,l=i==="input"&&parseFloat(g.attr("step"))>0?parseFloat(g.attr("step")):1;if(typeof b=="object"){var m=b,n=8;if(!this.dragging||m.pageX<this.slider.offset().left-n||m.pageX>this.slider.offset().left+this.slider.width()+n)return;h=Math.round((m.pageX-this.slider.offset().left)/this.slider.width()*100)}else b==null&&(b=i==="input"?parseFloat(g.val()||0):g[0].selectedIndex),h=(parseFloat(b)-j)/(k-j)*100;if(isNaN(h))return;h<0&&(h=0),h>100&&(h=100);var o=h/100*(k-j)+j,p=(o-j)%l,q=o-p;Math.abs(p)*2>=l&&(q+=p>0?l:-l),o=parseFloat(q.toFixed(5)),o<j&&(o=j),o>k&&(o=k),this.handle.css("left",h+"%"),this.handle.attr({"aria-valuenow":i==="input"?o:g.find("option").eq(o).attr("value"),"aria-valuetext":i==="input"?o:g.find("option").eq(o).getEncodedText(),title:i==="input"?o:g.find("option").eq(o).getEncodedText()}),e||this.valuebg&&this.valuebg.css("width",h+"%");if(e)f=a(this.handle).parents(".ui-slider"),a(this.handle).attr("aria-valuenow")==="on"?(f.children("span.ui-slider-label-a").show(),f.children("span.ui-slider-label-b").hide()):(f.children("span.ui-slider-label-b").show(),f.children("span.ui-slider-label-a").hide());else if(this._labels){var r=this.handle.width()/this.slider.width()*100,s=h&&r+(100-r)*h/100,t=h===100?0:Math.min(r+100-s,100);this._labels.each(function(){var b=a(this).is(".ui-slider-label-a");a(this).width((b?s:t)+"%")})}if(!d){var u=!1;i==="input"?(u=g.val()!==o,g.val(o)):(u=g[0].selectedIndex!==o,g[0].selectedIndex=o),!c&&u&&g.trigger("change")}},enable:function(){return this.element.attr("disabled",!1),this.slider.removeClass("ui-disabled").attr("aria-disabled",!1),this._setOption("disabled",!1)},disable:function(){return this.element.attr("disabled",!0),this.slider.addClass("ui-disabled").attr("aria-disabled",!0),this._setOption("disabled",!0)}}),a(c).bind("pagecreate create",function(b){a.mobile.slider.prototype.enhanceWithin(b.target,!0)})}(a),function(a,d){a.widget("mobile.selectmenu",a.mobile.widget,{options:{theme:null,disabled:!1,icon:"arrow-d",iconpos:"right",inline:!1,corners:!0,shadow:!0,iconshadow:!0,overlayTheme:"a",hidePlaceholderMenuItems:!0,closeText:"Close",nativeMenu:!0,preventFocusZoom:/iPhone|iPad|iPod/.test(navigator.platform)&&navigator.userAgent.indexOf("AppleWebKit")>-1,initSelector:"select:not( :jqmData(role='slider') )",mini:!1},_button:function(){return a("<div/>")},_setDisabled:function(a){return this.element.attr("disabled",a),this.button.attr("aria-disabled",a),this._setOption("disabled",a)},_focusButton:function(){var a=this;setTimeout(function(){a.button.focus()},40)},_selectOptions:function(){return this.select.find("option")},_preExtension:function(){var b="";!~this.element[0].className.indexOf("ui-btn-left")||(b=" ui-btn-left"),!~this.element[0].className.indexOf("ui-btn-right")||(b=" ui-btn-right"),this.select=this.element.wrap("<div class='ui-select"+b+"'>"),this.selectID=this.select.attr("id"),this.label=a("label[for='"+this.selectID+"']").addClass("ui-select"),this.isMultiple=this.select[0].multiple,this.options.theme||(this.options.theme=a.mobile.getInheritedTheme(this.select,"c"))},_create:function(){this._preExtension(),this._trigger("beforeCreate"),this.button=this._button();var c=this,d=this.options,e=d.inline||this.select.jqmData("inline"),f=d.mini||this.select.jqmData("mini"),g=d.icon?d.iconpos||this.select.jqmData("iconpos"):!1,h=this.select[0].selectedIndex===-1?0:this.select[0].selectedIndex,i=this.button.insertBefore(this.select).buttonMarkup({theme:d.theme,icon:d.icon,iconpos:g,inline:e,corners:d.corners,shadow:d.shadow,iconshadow:d.iconshadow,mini:f});this.setButtonText(),d.nativeMenu&&b.opera&&b.opera.version&&i.addClass("ui-select-nativeonly"),this.isMultiple&&(this.buttonCount=a("<span>").addClass("ui-li-count ui-btn-up-c ui-btn-corner-all").hide().appendTo(i.addClass("ui-li-has-count"))),(d.disabled||this.element.attr("disabled"))&&this.disable(),this.select.change(function(){c.refresh()}),this.build()},build:function(){var b=this;this.select.appendTo(b.button).bind("vmousedown",function(){b.button.addClass(a.mobile.activeBtnClass)}).bind("focus",function(){b.button.addClass(a.mobile.focusClass)}).bind("blur",function(){b.button.removeClass(a.mobile.focusClass)}).bind("focus vmouseover",function(){b.button.trigger("vmouseover")}).bind("vmousemove",function(){b.button.removeClass(a.mobile.activeBtnClass)}).bind("change blur vmouseout",function(){b.button.trigger("vmouseout").removeClass(a.mobile.activeBtnClass)}).bind("change blur",function(){b.button.removeClass("ui-btn-down-"+b.options.theme)}),b.button.bind("vmousedown",function(){b.options.preventFocusZoom&&a.mobile.zoom.disable(!0)}).bind("mouseup",function(){b.options.preventFocusZoom&&setTimeout(function(){a.mobile.zoom.enable(!0)},0)})},selected:function(){return this._selectOptions().filter(":selected")},selectedIndices:function(){var a=this;return this.selected().map(function(){return a._selectOptions().index(this)}).get()},setButtonText:function(){var b=this,d=this.selected(),e=this.placeholder,f=a(c.createElement("span"));this.button.find(".ui-btn-text").html(function(){return d.length?e=d.map(function(){return a(this).text()}).get().join(", "):e=b.placeholder,f.text(e).addClass(b.select.attr("class")).addClass(d.attr("class"))})},setButtonCount:function(){var a=this.selected();this.isMultiple&&this.buttonCount[a.length>1?"show":"hide"]().text(a.length)},refresh:function(){this.setButtonText(),this.setButtonCount()},open:a.noop,close:a.noop,disable:function(){this._setDisabled(!0),this.button.addClass("ui-disabled")},enable:function(){this._setDisabled(!1),this.button.removeClass("ui-disabled")}}),a(c).bind("pagecreate create",function(b){a.mobile.selectmenu.prototype.enhanceWithin(b.target,!0)})}(a),function(a,d){var e=function(d){var e=d.select,f=d.selectID,g=d.label,h=d.select.closest(".ui-page"),i=d._selectOptions(),j=d.isMultiple=d.select[0].multiple,k=f+"-button",l=f+"-menu",m=a("<div data-"+a.mobile.ns+"role='dialog' data-"+a.mobile.ns+"theme='"+d.options.theme+"' data-"+a.mobile.ns+"overlay-theme='"+d.options.overlayTheme+"'>"+"<div data-"+a.mobile.ns+"role='header'>"+"<div class='ui-title'>"+g.getEncodedText()+"</div>"+"</div>"+"<div data-"+a.mobile.ns+"role='content'></div>"+"</div>"),n=a("<div>",{"class":"ui-selectmenu"}).insertAfter(d.select).popup({theme:"a"}),o=a("<ul>",{"class":"ui-selectmenu-list",id:l,role:"listbox","aria-labelledby":k}).attr("data-"+a.mobile.ns+"theme",d.options.theme).appendTo(n),p=a("<div>",{"class":"ui-header ui-bar-"+d.options.theme}).prependTo(n),q=a("<h1>",{"class":"ui-title"}).appendTo(p),r,s,t;d.isMultiple&&(t=a("<a>",{text:d.options.closeText,href:"#","class":"ui-btn-left"}).attr("data-"+a.mobile.ns+"iconpos","notext").attr("data-"+a.mobile.ns+"icon","delete").appendTo(p).buttonMarkup()),a.extend(d,{select:d.select,selectID:f,buttonId:k,menuId:l,thisPage:h,menuPage:m,label:g,selectOptions:i,isMultiple:j,theme:d.options.theme,listbox:n,list:o,header:p,headerTitle:q,headerClose:t,menuPageContent:r,menuPageClose:s,placeholder:"",build:function(){var b=this;b.refresh(),b.select.attr("tabindex","-1").focus(function(){a(this).blur(),b.button.focus()}),b.button.bind("vclick keydown",function(c){if(c.type==="vclick"||c.keyCode&&(c.keyCode===a.mobile.keyCode.ENTER||c.keyCode===a.mobile.keyCode.SPACE))b.open(),c.preventDefault()}),b.list.attr("role","listbox").bind("focusin",function(b){a(b.target).attr("tabindex","0").trigger("vmouseover")}).bind("focusout",function(b){a(b.target).attr("tabindex","-1").trigger("vmouseout")}).delegate("li:not(.ui-disabled, .ui-li-divider)","click",function(c){var e=b.select[0].selectedIndex,f=b.list.find("li:not(.ui-li-divider)").index(this),g=b._selectOptions().eq(f)[0];g.selected=b.isMultiple?!g.selected:!0,b.isMultiple&&a(this).find(".ui-icon").toggleClass("ui-icon-checkbox-on",g.selected).toggleClass("ui-icon-checkbox-off",!g.selected),(b.isMultiple||e!==f)&&b.select.trigger("change"),b.isMultiple?b.list.find("li:not(.ui-li-divider)").eq(f).addClass("ui-btn-down-"+d.options.theme).find("a").first().focus():b.close(),c.preventDefault()}).keydown(function(b){var c=a(b.target),e=c.closest("li"),f,g;switch(b.keyCode){case 38:return f=e.prev().not(".ui-selectmenu-placeholder"),f.is(".ui-li-divider")&&(f=f.prev()),f.length&&(c.blur().attr("tabindex","-1"),f.addClass("ui-btn-down-"+d.options.theme).find("a").first().focus()),!1;case 40:return g=e.next(),g.is(".ui-li-divider")&&(g=g.next()),g.length&&(c.blur().attr("tabindex","-1"),g.addClass("ui-btn-down-"+d.options.theme).find("a").first().focus()),!1;case 13:case 32:return c.trigger("click"),!1}}),b.menuPage.bind("pagehide",function(){b.list.appendTo(b.listbox),b._focusButton(),a.mobile._bindPageRemove.call(b.thisPage)}),b.listbox.bind("popupafterclose",function(a){b.close()}),b.isMultiple&&b.headerClose.click(function(){if(b.menuType==="overlay")return b.close(),!1}),b.thisPage.addDependents(this.menuPage)},_isRebuildRequired:function(){var a=this.list.find("li"),b=this._selectOptions();return b.text()!==a.text()},selected:function(){return this._selectOptions().filter(":selected:not( :jqmData(placeholder='true') )")},refresh:function(b,c){var d=this,e=this.element,f=this.isMultiple,g;(b||this._isRebuildRequired())&&d._buildList(),g=this.selectedIndices(),d.setButtonText(),d.setButtonCount(),d.list.find("li:not(.ui-li-divider)").removeClass(a.mobile.activeBtnClass).attr("aria-selected",!1).each(function(b){if(a.inArray(b,g)>-1){var c=a(this);c.attr("aria-selected",!0),d.isMultiple?c.find(".ui-icon").removeClass("ui-icon-checkbox-off").addClass("ui-icon-checkbox-on"):c.is(".ui-selectmenu-placeholder")?c.next().addClass(a.mobile.activeBtnClass):c.addClass(a.mobile.activeBtnClass)}})},close:function(){if(this.options.disabled||!this.isOpen)return;var b=this;b.menuType==="page"?a.mobile.back():(b.listbox.popup("close"),b.list.appendTo(b.listbox),b._focusButton()),b.isOpen=!1},open:function(){function o(){var b=c.list.find("."+a.mobile.activeBtnClass+" a");b.length===0&&(b=c.list.find("li.ui-btn:not( :jqmData(placeholder='true') ) a")),b.first().focus().closest("li").addClass("ui-btn-down-"+d.options.theme)}if(this.options.disabled)return;var c=this,e=a(b),f=c.list.parent(),g=f.outerHeight(),h=f.outerWidth(),i=a("."+a.mobile.activePageClass),j=e.scrollTop(),k=c.button.offset().top,l=e.height(),n=e.width();c.button.addClass(a.mobile.activeBtnClass),setTimeout(function(){c.button.removeClass(a.mobile.activeBtnClass)},300),g>l-80||!a.support.scrollTop?(c.menuPage.appendTo(a.mobile.pageContainer).page(),c.menuPageContent=m.find(".ui-content"),c.menuPageClose=m.find(".ui-header a"),c.thisPage.unbind("pagehide.remove"),j===0&&k>l&&c.thisPage.one("pagehide",function(){a(this).jqmData("lastScroll",k)}),c.menuPage.one("pageshow",function(){o(),c.isOpen=!0}),c.menuType="page",c.menuPageContent.append(c.list),c.menuPage.find("div .ui-title").text(c.label.text()),a.mobile.changePage(c.menuPage,{transition:a.mobile.defaultDialogTransition})):(c.menuType="overlay",c.listbox.one("popupafteropen",o).popup("open",{x:c.button.offset().left+c.button.outerWidth()/2,y:c.button.offset().top+c.button.outerHeight()/2}),c.isOpen=!0)},_buildList:function(){var b=this,d=this.options,e=this.placeholder,f=!0,g=[],h=[],i=b.isMultiple?"checkbox-off":"false";b.list.empty().filter(".ui-listview").listview("destroy");var j=b.select.find("option"),k=j.length,l=this.select[0],m="data-"+a.mobile.ns,n=m+"option-index",o=m+"icon",p=m+"role",q=m+"placeholder",r=c.createDocumentFragment(),s=!1,t;for(var u=0;u<k;u++,s=!1){var v=j[u],w=a(v),x=v.parentNode,y=w.text(),z=c.createElement("a"),A=[];z.setAttribute("href","#"),z.appendChild(c.createTextNode(y));if(x!==l&&x.nodeName.toLowerCase()==="optgroup"){var B=x.getAttribute("label");if(B!==t){var C=c.createElement("li");C.setAttribute(p,"list-divider"),C.setAttribute("role","option"),C.setAttribute("tabindex","-1"),C.appendChild(c.createTextNode(B)),r.appendChild(C),t=B}}f&&(!v.getAttribute("value")||y.length===0||w.jqmData("placeholder"))&&(f=!1,s=!0,v.setAttribute(q,!0),d.hidePlaceholderMenuItems&&A.push("ui-selectmenu-placeholder"),e||(e=b.placeholder=y));var D=c.createElement("li");v.disabled&&(A.push("ui-disabled"),D.setAttribute("aria-disabled",!0)),D.setAttribute(n,u),D.setAttribute(o,i),s&&D.setAttribute(q,!0),D.className=A.join(" "),D.setAttribute("role","option"),z.setAttribute("tabindex","-1"),D.appendChild(z),r.appendChild(D)}b.list[0].appendChild(r),!this.isMultiple&&!e.length?this.header.hide():this.headerTitle.text(this.placeholder),b.list.listview()},_button:function(){return a("<a>",{href:"#",role:"button",id:this.buttonId,"aria-haspopup":"true","aria-owns":this.menuId})}})};a(c).bind("selectmenubeforecreate",function(b){var c=a(b.target).data("selectmenu");!c.options.nativeMenu&&c.element.parents(":jqmData(role='popup')").length===0&&e(c)})}(a),function(a,d){a.widget("mobile.fixedtoolbar",a.mobile.widget,{options:{visibleOnPageShow:!0,disablePageZoom:!0,transition:"slide",fullscreen:!1,tapToggle:!0,tapToggleBlacklist:"a, button, input, select, textarea, .ui-header-fixed, .ui-footer-fixed, .ui-popup",hideDuringFocus:"input, textarea, select",updatePagePadding:!0,trackPersistentToolbars:!0,supportBlacklist:function(){var a=b,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||"palmGetResource"in b&&f&&f<534||c.indexOf("MeeGo")>-1&&c.indexOf("NokiaBrowser/8.5.0")>-1?!0:!1},initSelector:":jqmData(position='dummy')"},_create:function(){var a=this,b=a.options,c=a.element,d=c.is(":jqmData(role='header')")?"header":"footer",e=c.closest(".ui-page");if(b.supportBlacklist()){a.destroy();return}c.addClass("ui-"+d+"-fixed"),b.fullscreen?(c.addClass("ui-"+d+"-fullscreen"),e.addClass("ui-page-"+d+"-fullscreen")):e.addClass("ui-page-"+d+"-fixed"),a._addTransitionClass(),a._bindPageEvents(),a._bindToggleHandlers()},_addTransitionClass:function(){var a=this.options.transition;a&&a!=="none"&&(a==="slide"&&(a=this.element.is(".ui-header")?"slidedown":"slideup"),this.element.addClass(a))},_bindPageEvents:function(){var c=this,d=c.options,e=c.element;e.closest(".ui-page").bind("pagebeforeshow",function(){d.disablePageZoom&&a.mobile.zoom.disable(!0),d.visibleOnPageShow||c.hide(!0)}).bind("webkitAnimationStart animationstart updatelayout",function(){var a=this;d.updatePagePadding&&c.updatePagePadding(a)}).bind("pageshow",function(){var e=this;c.updatePagePadding(e),d.updatePagePadding&&a(b).bind("throttledresize."+c.widgetName,function(){c.updatePagePadding(e)})}).bind("pagebeforehide",function(e,f){d.disablePageZoom&&a.mobile.zoom.enable(!0),d.updatePagePadding&&a(b).unbind("throttledresize."+c.widgetName);if(d.trackPersistentToolbars){var g=a(".ui-footer-fixed:jqmData(id)",this),h=a(".ui-header-fixed:jqmData(id)",this),i=g.length&&f.nextPage&&a(".ui-footer-fixed:jqmData(id='"+g.jqmData("id")+"')",f.nextPage)||a(),j=h.length&&f.nextPage&&a(".ui-header-fixed:jqmData(id='"+h.jqmData("id")+"')",f.nextPage)||a();if(i.length||j.length)i.add(j).appendTo(a.mobile.pageContainer),f.nextPage.one("pageshow",function(){i.add(j).appendTo(this)})}})},_visible:!0,updatePagePadding:function(b){var c=this.element,d=c.is(".ui-header");if(this.options.fullscreen)return;b=b||c.closest(".ui-page"),a(b).css("padding-"+(d?"top":"bottom"),c.outerHeight())},_useTransition:function(c){var d=a(b),e=this.element,f=d.scrollTop(),g=e.height(),h=e.closest(".ui-page").height(),i=a.mobile.getScreenHeight(),j=e.is(":jqmData(role='header')")?"header":"footer";return!c&&(this.options.transition&&this.options.transition!=="none"&&(j==="header"&&!this.options.fullscreen&&f>g||j==="footer"&&!this.options.fullscreen&&f+i<h-g)||this.options.fullscreen)},show:function(a){var b="ui-fixed-hidden",c=this.element;this._useTransition(a)?c.removeClass("out "+b).addClass("in"):c.removeClass(b),this._visible=!0},hide:function(a){var b="ui-fixed-hidden",c=this.element,d="out"+(this.options.transition==="slide"?" reverse":"");this._useTransition(a)?c.addClass(d).removeClass("in").animationComplete(function(){c.addClass(b).removeClass(d)}):c.addClass(b).removeClass(d),this._visible=!1},toggle:function(){this[this._visible?"hide":"show"]()},_bindToggleHandlers:function(){var b=this,c=b.options,d=b.element;d.closest(".ui-page").bind("vclick",function(d){c.tapToggle&&!a(d.target).closest(c.tapToggleBlacklist).length&&b.toggle()}).bind("focusin focusout",function(d){screen.width<500&&a(d.target).is(c.hideDuringFocus)&&!a(d.target).closest(".ui-header-fixed, .ui-footer-fixed").length&&b[d.type==="focusin"&&b._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")}}),a(c).bind("pagecreate create",function(b){a(b.target).jqmData("fullscreen")&&a(a.mobile.fixedtoolbar.prototype.options.initSelector,b.target).not(":jqmData(fullscreen)").jqmData("fullscreen",!0),a.mobile.fixedtoolbar.prototype.enhanceWithin(b.target)})}(a),function(a,b){function i(a){d=a.originalEvent,h=d.accelerationIncludingGravity,e=Math.abs(h.x),f=Math.abs(h.y),g=Math.abs(h.z),!b.orientation&&(e>7||(g>6&&f<8||g<8&&f>6)&&e>5)?c.enabled&&c.disable():c.enabled||c.enable()}if(!(/iPhone|iPad|iPod/.test(navigator.platform)&&navigator.userAgent.indexOf("AppleWebKit")>-1))return;var c=a.mobile.zoom,d,e,f,g,h;a(b).bind("orientationchange.iosorientationfix",c.enable).bind("devicemotion.iosorientationfix",i)}(a,this),function(a,b,d){function h(){e.removeClass("ui-mobile-rendering")}var e=a("html"),f=a("head"),g=a(b);a(b.document).trigger("mobileinit");if(!a.mobile.gradeA())return;a.mobile.ajaxBlacklist&&(a.mobile.ajaxEnabled=!1),e.addClass("ui-mobile ui-mobile-rendering"),setTimeout(h,5e3),a.extend(a.mobile,{addEventBlocker:function(){e.addClass("ui-blocker"),e.bind("touchstart touchend vclick mousedown mouseup click",function(){return!1})},removeEventBlocker:function(){e.removeClass("ui-blocker"),e.unbind("touchstart touchend vclick mousedown mouseup click")},initializePage:function(){var b=a(":jqmData(role='page'), :jqmData(role='dialog')"),d=a.mobile.path.parseLocation().hash.replace("#",""),e=c.getElementById(d);b.length||(b=a("body").wrapInner("<div data-"+a.mobile.ns+"role='page'></div>").children(0)),b.each(function(){var b=a(this);b.jqmData("url")||b.attr("data-"+a.mobile.ns+"url",b.attr("id")||location.pathname+location.search)}),a.mobile.firstPage=b.first(),a.mobile.pageContainer=b.first().parent().addClass("ui-mobile-viewport"),g.trigger("pagecontainercreate"),a.mobile.showPageLoadingMsg(),a.mobile.addEventBlocker(),h(),!a.mobile.hashListeningEnabled||!a.mobile.path.isHashValid(location.hash)||!a(e).is(':jqmData(role="page")')&&!a.mobile.path.isPath(d)&&d!==a.mobile.dialogHashKey?(a.mobile.path.isHashValid(location.hash)&&(a.mobile.urlHistory.initialDst=d.replace("#","")),a.mobile.changePage(a.mobile.firstPage,{transition:"none",reverse:!0,changeHash:!1,fromHashChange:!0})):g.trigger("hashchange",[!0])}}),a.mobile.navreadyDeferred.resolve(),a(function(){b.scrollTo(0,1),a.mobile.defaultHomeScroll=!a.support.scrollTop||a(b).scrollTop()===1?0:1,a.fn.controlgroup&&a(c).bind("pagecreate create",function(b){a(":jqmData(role='controlgroup')",b.target).jqmEnhanceable().controlgroup({excludeInvisible:!1})}),a.mobile.autoInitializePage&&a.mobile.initializePage(),g.load(a.mobile.silentScroll),a.support.cssPointerEvents||a(c).delegate(".ui-disabled","vclick",function(a){a.preventDefault(),a.stopImmediatePropagation()})})}(a,this)});
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js
new file mode 100644 (file)
index 0000000..7132605
--- /dev/null
@@ -0,0 +1,15288 @@
+/*
+ *
+ * This software is licensed under the MIT licence (as defined by the OSI at
+ * http://www.opensource.org/licenses/mit-license.php)
+ * 
+ * ***************************************************************************
+ * Copyright (C) 2011 by Intel Corporation Ltd.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software" ),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ */
+
+// Base class for widgets that need the following features:
+//
+// I. HTML prototype loading
+//
+// This class provides HTML prototype loading for widgets. That is, the widget implementation specifies its HTML portions
+// in one continuous HTML snippet, and it optionally provides an object containing selectors into the various parts of the
+// HTML snippet. This widget loads the HTML snippet into a jQuery object, and optionally assigns jQuery objects to each of
+// the selectors in the optionally provided object.
+//
+// To use this functionality you can either derive from this class, or you can call its prototype's gtype method.
+//
+// 1. Widgets deriving from this class should define _htmlProto as part of their prototype declaration. _htmlProto looks like
+// this:
+//
+// _htmlProto: {
+//     source: string|jQuery object (optional) default: string - The name of the widget
+//     ui: {
+//         uiElement1: "#ui-element-1-selector",
+//         uiElement2: "#ui-element-2-selector",
+//         ...
+//         subElement: {
+//             subElement1: "#sub-element-1-selector",
+//             subElement2: "#sub-element-2-selector",
+//             ...
+//         }
+//         ...
+//     }
+// }
+//
+// If neither 'source' nor 'ui' are defined, you must still include an empty _htmlProto key (_htmlProto: {}) to indicate
+// that you wish to make use of this feature. This will cause a prototype HTML file named after your widget to be loaded.
+// The loaded prototype will be placed into your widget's prototype's _protoHtml.source key.
+//
+// If 'source' is defined as a string, it is the name of the widget (including namespace). This is the default. If your
+// widget's HTML prototype is loaded via AJAX and the name of the AJAX file is different from the name of your widget
+// (that is, it is not "<widgetName>.prototype.html", then you should explicitly define 'source' as:
+//
+// If you wish to load HTML prototypes via AJAX, modify the getProtoPath() function defined below to reflect the directory
+// structure holding your widget HTML prototypes.
+//
+// source: "alternateWidgetName"
+//
+// If AJAX loading fails, source is set to a jQuery object containing a div with an error message. You can check whether
+// loading failed via the jQuery object's jqmData( "tizen.widgetex.ajax.fail" ) data item. If false, then the jQuery object
+// is the actual prototype loaded via AJAX or present inline. Otherwise, the jQuery object is the error message div.
+//
+// If 'source' is defined as a jQuery object, it is considered already loaded.
+//
+// if 'ui' is defined inside _htmlProto, It is assumed to be an object such that every one of its keys is either a string,
+// or another object with the same properties as itself.
+//
+// When a widget is instantiated, the HTML prototype is loaded if not already present in the prototype. If 'ui' is present
+// inside _htmlProto, the prototype is cloned. Then, a new structure is created based on 'ui' with each selector replaced
+// by a jQuery object containing the results of performing .find() on the prototype's clone with the filter set to the
+// value of the string. In the special case where the selector starts with a '#', the ID is removed from the element after
+// it is assigned into the structure being created. This structure is then made accessible from the widget instance via
+// the '_ui' key (i.e., this._ui).
+//
+// 2. Use the loadPrototype method when your widget does not derive from $.tizen.widgetex:
+// Add _htmlProto to your widget's prototype as described above. Then, in your widget's _create() method, call
+// loadPrototype in the following manner:
+//
+// $.tizen.widgetex.loadPrototype.call(this, "namespace.widgetName" );
+//
+// Thereafter, you may use the HTML prototype from your widget's prototype or, if you have specified a 'ui' key in your
+// _htmlProto key, you may use this._ui from your widget instance.
+//
+// II. realize method
+//
+// When a widget is created, some of its properties cannot be set immediately, because they depend on the widths/heights
+// of its constituent elements. They can only be calculated when the page containing the widget is made visible via the
+// "pageshow" event, because widths/heights always evaluate to 0 when retrieved from a widget that is not visible. When
+// you inherit from widgetex, you can add a "_realize" function to your prototype. This function will be called once right
+// after _create() if the element that anchors your widget is on a visible page. Otherwise, it will be called when the
+// page to which the widget belongs emits the "pageshow" event.
+//
+// NB: If your widget is inside a container which is itself not visible, such as an expandable or a collapsible, your
+// widget will remain hidden even though "pageshow" is fired and therefore _realize is called. In this case, widths and
+// heights will be unreliable even during _realize.
+//
+// III. systematic option handling
+//
+// If a widget has lots of options, the _setOption function can become a long switch for setting each recognized option.
+// It is also tempting to allow options to determine the way a widget is created, by basing decisions on various options
+// during _create(). Often, the actions based on option values in _create() are the same as those in _setOption. To avoid
+// such code duplication, this class calls _setOption once for each option after _create() has completed.
+//
+// Furthermore, to avoid writing long switches in a widget's _setOption method, this class implements _setOption in such
+// a way that, for any given option (e.g. "myOption" ), _setOption looks for a method _setMyOption in the widget's
+// implementation, and if found, calls the method with the value of the option.
+//
+// If your widget does not inherit from widgetex, you can still use widgetex' systematic option handling:
+// 1. define the _setOption method for your widget as follows:
+//      _setOption: $.tizen.widgetex.prototype._setOption
+// 2. Call this._setOptions(this.options) from your widget's _create() function.
+// 3. As with widgetex-derived widgets, implement a corresponding _setMyOptionName function for each option myOptionName
+// you wish to handle.
+//
+// IV. systematic value handling for input elements
+//
+// If your widget happens to be constructed from an <input> element, you have to handle the "value" attribute specially,
+// and you have to emit the "change" signal whenever it changes, in addition to your widget's normal signals and option
+// changes. With widgetex, you can assign one of your widget's "data-*" properties to be synchronized to the "value"
+// property whenever your widget is constructed onto an <input> element. To do this, define, in your prototype:
+//
+// _value: {
+//      attr: "data-my-attribute",
+//      signal: "signal-to-emit"
+// }
+//
+// Then, call this._setValue(newValue) whenever you wish to set the value for your widget. This will set the data-*
+// attribute, emit the custom signal (if set) with the new value as its parameter, and, if the widget is based on an
+// <input> element, it will also set the "value" attribute and emit the "change" signal.
+//
+// "attr" is required if you choose to define "_value", and identifies the data-attribute to set in addition to "value",
+// if your widget's element is an input.
+// "signal" is optional, and will be emitted when setting the data-attribute via this._setValue(newValue).
+//
+// If your widget does not derive from widgetex, you can still define "_value" as described above and call
+// $.tizen.widgetex.setValue(widget, newValue).
+//
+// V. Systematic enabled/disabled handling for input elements
+//
+// widgetex implements _setDisabled which will disable the input associated with this widget, if any. Thus, if you derive
+// from widgetex and you plan on implementing the disabled state, you should chain up to
+// $.tizen.widgetex.prototype._setDisabled(value), rather than $.Widget.prototype._setOption( "disabled", value).
+
+(function ($, undefined) {
+
+// Framework-specific HTML prototype path for AJAX loads
+       function getProtoPath() {
+               var theScriptTag = $( "script[data-framework-version][data-framework-root][data-framework-theme]" );
+
+               return (theScriptTag.attr( "data-framework-root" ) + "/" +
+                               theScriptTag.attr( "data-framework-version" ) + "/themes/" +
+                               theScriptTag.attr( "data-framework-theme" ) + "/proto-html" );
+       }
+
+       $.widget( "tizen.widgetex", $.mobile.widget, {
+               _createWidget: function () {
+                       $.tizen.widgetex.loadPrototype.call( this, this.namespace + "." + this.widgetName );
+                       $.mobile.widget.prototype._createWidget.apply( this, arguments );
+               },
+
+               _init: function () {
+                       // TODO THIS IS TEMPORARY PATCH TO AVOID CTXPOPUP PAGE CRASH
+                       if ( this.element === undefined ) {
+                               return;
+                       }
+
+                       var page = this.element.closest( ".ui-page" ),
+                               self = this,
+                               myOptions = {};
+
+                       if ( page.is( ":visible" ) ) {
+                               this._realize();
+                       } else {
+                               page.bind( "pageshow", function () { self._realize(); } );
+                       }
+
+                       $.extend( myOptions, this.options );
+
+                       this.options = {};
+
+                       this._setOptions( myOptions );
+               },
+
+               _getCreateOptions: function () {
+                       // if we're dealing with an <input> element, value takes precedence over corresponding data-* attribute, if a
+                       // mapping has been established via this._value. So, assign the value to the data-* attribute, so that it may
+                       // then be assigned to this.options in the superclass' _getCreateOptions
+
+                       if (this.element.is( "input" ) && this._value !== undefined) {
+                               var theValue =
+                                       ( ( this.element.attr( "type" ) === "checkbox" || this.element.attr( "type" ) === "radio" )
+                                                       ? this.element.is( ":checked" )
+                                                                       : this.element.is( "[value]" )
+                                                                       ? this.element.attr( "value" )
+                                                                                       : undefined);
+
+                               if ( theValue != undefined ) {
+                                       this.element.attr( this._value.attr, theValue );
+                               }
+                       }
+
+                       return $.mobile.widget.prototype._getCreateOptions.apply( this, arguments );
+               },
+
+               _setOption: function ( key, value ) {
+                       var setter = "_set" + key.replace(/^[a-z]/, function (c) { return c.toUpperCase(); } );
+
+                       if ( this[setter] !== undefined ) {
+                               this[setter]( value );
+                       } else {
+                               $.mobile.widget.prototype._setOption.apply( this, arguments );
+                       }
+               },
+
+               _setDisabled: function ( value ) {
+                       $.Widget.prototype._setOption.call( this, "disabled", value );
+                       if ( this.element.is( "input" ) ) {
+                               this.element.attr( "disabled", value );
+                       }
+               },
+
+               _setValue: function ( newValue ) {
+                       $.tizen.widgetex.setValue( this, newValue );
+               },
+
+               _realize: function () {}
+       } );
+
+       $.tizen.widgetex.setValue = function ( widget, newValue ) {
+               if ( widget._value !== undefined ) {
+                       var valueString = ( widget._value.makeString ? widget._value.makeString(newValue) : newValue ),
+                               inputType;
+
+                       widget.element.attr( widget._value.attr, valueString );
+                       if ( widget._value.signal !== undefined ) {
+                               widget.element.triggerHandler( widget._value.signal, newValue );
+                       }
+
+                       if ( widget.element.is( "input" ) ) {
+                               inputType = widget.element.attr( "type" );
+
+                               // Special handling for checkboxes and radio buttons, where the presence of the "checked" attribute is really
+                               // the value
+                               if ( inputType === "checkbox" || inputType === "radio" ) {
+                                       if ( newValue ) {
+                                               widget.element.attr( "checked", true );
+                                       } else {
+                                               widget.element.removeAttr( "checked" );
+                                       }
+                               } else {
+                                       widget.element.attr( "value", valueString );
+                               }
+
+                               widget.element.trigger( "change" );
+                       }
+               }
+       };
+
+       $.tizen.widgetex.assignElements = function (proto, obj) {
+               var ret = {},
+                       key;
+
+               for ( key in obj ) {
+                       if ( ( typeof obj[key] ) === "string" ) {
+                               ret[key] = proto.find( obj[key] );
+                               if ( obj[key].match(/^#/) ) {
+                                       ret[key].removeAttr( "id" );
+                               }
+                       } else {
+                               if ( (typeof obj[key]) === "object" ) {
+                                       ret[key] = $.tizen.widgetex.assignElements( proto, obj[key] );
+                               }
+                       }
+               }
+
+               return ret;
+       };
+
+       $.tizen.widgetex.loadPrototype = function ( widget, ui ) {
+               var ar = widget.split( "." ),
+                       namespace,
+                       widgetName,
+                       source,
+                       noSource = false,
+                       htmlProto,
+                       protoPath;
+
+               if ( ar.length == 2 ) {
+                       namespace = ar[0];
+                       widgetName = ar[1];
+
+                       // If htmlProto is defined
+                       if ( $[namespace][widgetName].prototype._htmlProto !== undefined ) {
+                               // If no source is defined, use the widget name
+                               source = $[namespace][widgetName].prototype._htmlProto.source;
+                               if ( source === undefined ) {
+                                       source = widgetName;
+                                       noSource = true;
+                               }
+
+                               // Load the HTML prototype via AJAX if not defined inline
+                               if ( typeof source === "string" ) {
+                                       if ( noSource ) {       // use external htmlproto file
+                                               // Establish the path for the proto file
+                                               widget = source;
+                                               protoPath = getProtoPath();
+
+                                               // Make the AJAX call
+                                               $.ajax( {
+                                                       url: protoPath + "/" + widget + ".prototype.html",
+                                                       async: false,
+                                                       dataType: "html"
+                                               }).success( function (data, textStatus, jqXHR ) {
+                                                       source = $( "<div></div>" ).html(data).jqmData( "tizen.widgetex.ajax.fail", false );
+                                               } );
+
+                                               // Assign the HTML proto to the widget prototype
+                                               source  = $( "<div></div>" )
+                                                       .text( "Failed to load proto for widget " + namespace + "." + widgetName + "!" )
+                                                       .css( {background: "red", color: "blue", border: "1px solid black"} )
+                                                       .jqmData( "tizen.widgetex.ajax.fail", true );
+
+                                       } else {
+                                               // inline definition (string)
+                                               source = $( source ).jqmData( "tizen.widgetex.ajax.fail", false );
+                                       }
+
+                               } else {
+                                       // inline definition (object)
+                                       // AJAX loading has trivially succeeded, since there was no AJAX loading at all
+                                       source.jqmData( "tizen.widgetex.ajax.fail", false );
+                               }
+                               htmlProto = source;
+                               $[namespace][widgetName].prototype._htmlProto.source = source;
+
+                               // If there's a "ui" portion in the HTML proto, copy it over to this instance, and
+                               // replace the selectors with the selected elements from a copy of the HTML prototype
+                               if ( $[namespace][widgetName].prototype._htmlProto.ui !== undefined ) {
+                                       // Assign the relevant parts of the proto
+                                       $.extend( this, {
+                                               _ui: $.tizen.widgetex.assignElements( htmlProto.clone(), $[namespace][widgetName].prototype._htmlProto.ui )
+                                       });
+                               }
+                       }
+               }
+       };
+
+}( jQuery ) );
+/**
+       @class Button
+       The button widget shows a control on the screen that you can use to generate an action event when it is pressed and released. This widget is coded with standard HTML anchor and input elements and then enhanced by jQueryMobile to make it more attractive and usable on a mobile device. Buttons can be used in Tizen as described in the jQueryMobile documentation for buttons.
+
+       To add a button widget to the application, use the following code
+
+               <div data-role="button" data-inline="true">Text Button Test</div>
+               <div data-role="button" data-inline="true" data-icon="plus" data-style="circle"></div>
+               <div data-role="button" data-inline="true" data-icon="plus" data-style="nobg"></div>
+
+       The button can define callbacks for events as described in the jQueryMobile documentation for button events.<br/>
+       You can use methods with the button as described in the jQueryMobile documentation for button methods.
+*/
+
+/**
+       @property {String} data-style
+       Defines the button style. <br/> The default value is box. If the value is set to circle, a circle-shaped button is created. If the value is set to nobg, a button is created without a background.
+
+*/
+/**
+       @property {String} data-icon
+       Defines an icon for a button. Tizen supports 12 icon styles: reveal, closed, opened, info, rename, call, warning, plus, minus, cancel, send, and favorite.
+
+*/
+/**\r
+       @class Checkbox\r
+       The check box widget shows a list of options on the screen where one or more can be selected. Check boxes can be used in Tizen as described in the jQueryMobile documentation for check boxes.<br/> To add a check box widget to the application, use the following code:\r
+\r
+               <input type="checkbox" name="mycheck" id="check-test" class="favorite" />\r
+               <label for="check-test">Favorite</label>\r
+               <input type="checkbox" name="check-favorite" id="check-test2" checked="checked" disabled="disabled" class="favorite" />\r
+               <label for="check-test2">Favorite Checked, Disabled</label>\r
+\r
+       The check box can define callbacks for events as described in the jQueryMobile documentation for check box events.\r
+       You can use methods with the check box as described in the jQueryMobile documentation for check box methods.\r
+\r
+*/\r
+/**\r
+       @property {String} class\r
+       Defines the check box style. <br/> The default value is check. If the value is set to favorite, a star-shaped check box is created.\r
+*/
+/* ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software" ),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ */
+
+// most of following codes are derived from jquery.mobile.scrollview.js
+(function ( $, window, document, undefined ) {
+
+       function circularNum( num, total ) {
+               var n = num % total;
+               if ( n < 0 ) {
+                       n = total + n;
+               }
+               return n;
+       }
+
+       function setElementTransform( $ele, x, y ) {
+               var v = "translate3d( " + x + "," + y + ", 0px)";
+               $ele.css({
+                       "-ms-transform": v,
+                       "-o-transform": v,
+                       "-moz-transform": v,
+                       "-webkit-transform": v,
+                       "transform": v
+               } );
+       }
+
+       function MomentumTracker( options ) {
+               this.options = $.extend( {}, options );
+               this.easing = "easeOutQuad";
+               this.reset();
+       }
+
+       var tstates = {
+               scrolling : 0,
+               done : 1
+       };
+
+       function getCurrentTime() {
+               return Date.now();
+       }
+
+       $.extend( MomentumTracker.prototype, {
+               start: function ( pos, speed, duration ) {
+                       this.state = ( speed != 0 ) ? tstates.scrolling : tstates.done;
+                       this.pos = pos;
+                       this.speed = speed;
+                       this.duration = duration;
+
+                       this.fromPos = 0;
+                       this.toPos = 0;
+
+                       this.startTime = getCurrentTime();
+               },
+
+               reset: function () {
+                       this.state = tstates.done;
+                       this.pos = 0;
+                       this.speed = 0;
+                       this.duration = 0;
+               },
+
+               update: function () {
+                       var state = this.state,
+                               duration,
+                               elapsed,
+                               dx,
+                               x;
+
+                       if ( state == tstates.done ) {
+                               return this.pos;
+                       }
+
+                       duration = this.duration;
+                       elapsed = getCurrentTime() - this.startTime;
+                       elapsed = elapsed > duration ? duration : elapsed;
+
+                       dx = this.speed * ( 1 - $.easing[this.easing](elapsed / duration, elapsed, 0, 1, duration ) );
+
+                       x = this.pos + dx;
+                       this.pos = x;
+
+                       if ( elapsed >= duration ) {
+                               this.state = tstates.done;
+                       }
+
+                       return this.pos;
+               },
+
+               done: function () {
+                       return this.state == tstates.done;
+               },
+
+               getPosition: function () {
+                       return this.pos;
+               }
+       } );
+
+       jQuery.widget( "mobile.circularview", jQuery.mobile.widget, {
+               options: {
+                       fps:                            60,
+
+                       scrollDuration:         2000,
+
+                       moveThreshold:          10,
+                       moveIntervalThreshold:  150,
+
+                       startEventName:         "scrollstart",
+                       updateEventName:        "scrollupdate",
+                       stopEventName:          "scrollstop",
+
+                       eventType:                      $.support.touch ? "touch" : "mouse",
+
+                       delayedClickSelector: "a, .ui-btn",
+                       delayedClickEnabled: false
+               },
+
+               _makePositioned: function ( $ele ) {
+                       if ( $ele.css( 'position' ) == 'static' ) {
+                               $ele.css( 'position', 'relative' );
+                       }
+               },
+
+               _create: function () {
+                       var self = this;
+
+                       this._items = $( this.element ).jqmData('list');
+                       this._$clip = $( this.element ).addClass( "ui-scrollview-clip" );
+                       this._$clip.wrapInner( '<div class="ui-scrollview-view"></div>' );
+                       this._$view = $('.ui-scrollview-view', this._$clip );
+                       this._$list = $( 'ul', this._$clip );
+
+                       this._$clip.css( "overflow", "hidden" );
+                       this._makePositioned( this._$clip );
+
+                       this._$view.css( "overflow", "hidden" );
+                       this._tracker = new MomentumTracker( this.options );
+
+                       this._timerInterval = 1000 / this.options.fps;
+                       this._timerID = 0;
+
+                       this._timerCB = function () { self._handleMomentumScroll(); };
+
+                       this.refresh();
+
+                       this._addBehaviors();
+               },
+
+               reflow: function () {
+                       var xy = this.getScrollPosition();
+                       this.refresh();
+                       this.scrollTo( xy.x, xy.y );
+               },
+
+               refresh: function () {
+                       var itemsPerView;
+
+                       this._$clip.width( $(window).width() );
+                       this._clipWidth = this._$clip.width();
+                       this._$list.empty();
+                       this._$list.append(this._items[0]);
+                       this._itemWidth = $(this._items[0]).outerWidth();
+                       $(this._items[0]).detach();
+
+                       itemsPerView = this._clipWidth / this._itemWidth;
+                       itemsPerView = Math.ceil( itemsPerView * 10 ) / 10;
+                       this._itemsPerView = parseInt( itemsPerView, 10 );
+                       while ( this._itemsPerView + 1 > this._items.length ) {
+                               $.merge( this._items, $(this._items).clone() );
+                       }
+                       this._rx = -this._itemWidth;
+                       this._sx = -this._itemWidth;
+                       this._setItems();
+               },
+
+               _startMScroll: function ( speedX, speedY ) {
+                       this._stopMScroll();
+
+                       var keepGoing = false,
+                               duration = this.options.scrollDuration,
+                               t = this._tracker,
+                               c = this._clipWidth,
+                               v = this._viewWidth;
+
+                       this._$clip.trigger( this.options.startEventName);
+
+                       t.start( this._rx, speedX, duration, (v > c ) ? -(v - c) : 0, 0 );
+                       keepGoing = !t.done();
+
+                       if ( keepGoing ) {
+                               this._timerID = setTimeout( this._timerCB, this._timerInterval );
+                       } else {
+                               this._stopMScroll();
+                       }
+                       //console.log( "startmscroll" + this._rx + "," + this._sx );
+               },
+
+               _stopMScroll: function () {
+                       if ( this._timerID ) {
+                               this._$clip.trigger( this.options.stopEventName );
+                               clearTimeout( this._timerID );
+                       }
+
+                       this._timerID = 0;
+
+                       if ( this._tracker ) {
+                               this._tracker.reset();
+                       }
+                       //console.log( "stopmscroll" + this._rx + "," + this._sx );
+               },
+
+               _handleMomentumScroll: function () {
+                       var keepGoing = false,
+                               v = this._$view,
+                               x = 0,
+                               y = 0,
+                               t = this._tracker;
+
+                       if ( t ) {
+                               t.update();
+                               x = t.getPosition();
+
+                               keepGoing = !t.done();
+
+                       }
+
+                       this._setScrollPosition( x, y );
+                       this._rx = x;
+
+                       this._$clip.trigger( this.options.updateEventName, [ { x: x, y: y } ] );
+
+                       if ( keepGoing ) {
+                               this._timerID = setTimeout( this._timerCB, this._timerInterval );
+                       } else {
+                               this._stopMScroll();
+                       }
+               },
+
+               _setItems: function () {
+                       var i,
+                               $item;
+
+                       for ( i = -1; i < this._itemsPerView + 1; i++ ) {
+                               $item = this._items[ circularNum( i, this._items.length ) ];
+                               this._$list.append( $item );
+                       }
+                       setElementTransform( this._$view, this._sx + "px", 0 );
+                       this._$view.width( this._itemWidth * ( this._itemsPerView + 2 ) );
+                       this._viewWidth = this._$view.width();
+               },
+
+               _setScrollPosition: function ( x, y ) {
+                       var sx = this._sx,
+                               dx = x - sx,
+                               di = parseInt( dx / this._itemWidth, 10 ),
+                               i,
+                               idx,
+                               $item;
+
+                       if ( di > 0 ) {
+                               for ( i = 0; i < di; i++ ) {
+                                       this._$list.children().last().detach();
+                                       idx = -parseInt( ( sx / this._itemWidth ) + i + 3, 10 );
+                                       $item = this._items[ circularNum( idx, this._items.length ) ];
+                                       this._$list.prepend( $item );
+                                       //console.log( "di > 0 : " + idx );
+                               }
+                       } else if ( di < 0 ) {
+                               for ( i = 0; i > di; i-- ) {
+                                       this._$list.children().first().detach();
+                                       idx = this._itemsPerView - parseInt( ( sx / this._itemWidth ) + i, 10 );
+                                       $item = this._items[ circularNum( idx, this._items.length ) ];
+                                       this._$list.append( $item );
+                                       //console.log( "di < 0 : " + idx );
+                               }
+                       }
+
+                       this._sx += di * this._itemWidth;
+
+                       setElementTransform( this._$view, ( x - this._sx - this._itemWidth ) + "px", 0 );
+
+                       //console.log( "rx " + this._rx + "sx " + this._sx );
+               },
+
+               _enableTracking: function () {
+                       $(document).bind( this._dragMoveEvt, this._dragMoveCB );
+                       $(document).bind( this._dragStopEvt, this._dragStopCB );
+               },
+
+               _disableTracking: function () {
+                       $(document).unbind( this._dragMoveEvt, this._dragMoveCB );
+                       $(document).unbind( this._dragStopEvt, this._dragStopCB );
+               },
+
+               _getScrollHierarchy: function () {
+                       var svh = [],
+                               d;
+                       this._$clip.parents( '.ui-scrollview-clip' ).each( function () {
+                               d = $( this ).jqmData( 'circulaview' );
+                               if ( d ) {
+                                       svh.unshift( d );
+                               }
+                       } );
+                       return svh;
+               },
+
+               centerTo: function ( selector, duration ) {
+                       var i,
+                               newX;
+
+                       for ( i = 0; i < this._items.length; i++ ) {
+                               if ( $( this._items[i]).is( selector ) ) {
+                                       newX = -( i * this._itemWidth - this._clipWidth / 2 + this._itemWidth * 1.5 );
+                                       this.scrollTo( newX + this._itemWidth, 0 );
+                                       this.scrollTo( newX, 0, duration );
+                                       return;
+                               }
+                       }
+               },
+
+               scrollTo: function ( x, y, duration ) {
+                       this._stopMScroll();
+                       if ( !duration ) {
+                               this._setScrollPosition( x, y );
+                               this._rx = x;
+                               return;
+                       }
+
+                       var self = this,
+                               start = getCurrentTime(),
+                               efunc = $.easing.easeOutQuad,
+                               sx = this._rx,
+                               sy = 0,
+                               dx = x - sx,
+                               dy = 0,
+                               tfunc,
+                               elapsed,
+                               ec;
+
+                       this._rx = x;
+
+                       tfunc = function () {
+                               elapsed = getCurrentTime() - start;
+                               if ( elapsed >= duration ) {
+                                       self._timerID = 0;
+                                       self._setScrollPosition( x, y );
+                                       self._$clip.trigger("scrollend");
+                               } else {
+                                       ec = efunc( elapsed / duration, elapsed, 0, 1, duration );
+                                       self._setScrollPosition( sx + ( dx * ec ), sy + ( dy * ec ) );
+                                       self._timerID = setTimeout( tfunc, self._timerInterval );
+                               }
+                       };
+
+                       this._timerID = setTimeout( tfunc, this._timerInterval );
+               },
+
+               getScrollPosition: function () {
+                       return { x: -this._rx, y: 0 };
+               },
+
+               _handleDragStart: function ( e, ex, ey ) {
+                       $.each( this._getScrollHierarchy(), function ( i, sv ) {
+                               sv._stopMScroll();
+                       } );
+
+                       this._stopMScroll();
+
+                       if ( this.options.delayedClickEnabled ) {
+                               this._$clickEle = $( e.target ).closest( this.options.delayedClickSelector );
+                       }
+                       this._lastX = ex;
+                       this._lastY = ey;
+                       this._speedX = 0;
+                       this._speedY = 0;
+                       this._didDrag = false;
+
+                       this._lastMove = 0;
+                       this._enableTracking();
+
+                       this._ox = ex;
+                       this._nx = this._rx;
+
+                       if ( this.options.eventType == "mouse" || this.options.delayedClickEnabled ) {
+                               e.preventDefault();
+                       }
+                       //console.log( "scrollstart" + this._rx + "," + this._sx );
+                       e.stopPropagation();
+               },
+
+               _handleDragMove: function ( e, ex, ey ) {
+                       this._lastMove = getCurrentTime();
+
+                       var dx = ex - this._lastX,
+                               dy = ey - this._lastY;
+
+                       this._speedX = dx;
+                       this._speedY = 0;
+
+                       this._didDrag = true;
+
+                       this._lastX = ex;
+                       this._lastY = ey;
+
+                       this._mx = ex - this._ox;
+
+                       this._setScrollPosition( this._nx + this._mx, 0 );
+
+                       //console.log( "scrollmove" + this._rx + "," + this._sx );
+                       return false;
+               },
+
+               _handleDragStop: function ( e ) {
+                       var l = this._lastMove,
+                               t = getCurrentTime(),
+                               doScroll = l && ( t - l ) <= this.options.moveIntervalThreshold,
+                               sx = ( this._tracker && this._speedX && doScroll ) ? this._speedX : 0,
+                               sy = 0;
+
+                       this._rx = this._mx ? this._nx + this._mx : this._rx;
+
+                       if ( sx ) {
+                               this._startMScroll( sx, sy );
+                       }
+
+                       //console.log( "scrollstop" + this._rx + "," + this._sx );
+
+                       this._disableTracking();
+
+                       if ( !this._didDrag && this.options.delayedClickEnabled && this._$clickEle.length ) {
+                               this._$clickEle
+                                       .trigger( "mousedown" )
+                                       .trigger( "mouseup" )
+                                       .trigger( "click" );
+                       }
+
+                       if ( this._didDrag ) {
+                               e.preventDefault();
+                               e.stopPropagation();
+                       }
+
+                       return this._didDrag ? false : undefined;
+               },
+
+               _addBehaviors: function () {
+                       var self = this;
+
+                       if ( this.options.eventType === "mouse" ) {
+                               this._dragStartEvt = "mousedown";
+                               this._dragStartCB = function ( e ) {
+                                       return self._handleDragStart( e, e.clientX, e.clientY );
+                               };
+
+                               this._dragMoveEvt = "mousemove";
+                               this._dragMoveCB = function ( e ) {
+                                       return self._handleDragMove( e, e.clientX, e.clientY );
+                               };
+
+                               this._dragStopEvt = "mouseup";
+                               this._dragStopCB = function ( e ) {
+                                       return self._handleDragStop( e );
+                               };
+
+                               this._$view.bind( "vclick", function (e) {
+                                       return !self._didDrag;
+                               } );
+
+                       } else { //touch
+                               this._dragStartEvt = "touchstart";
+                               this._dragStartCB = function ( e ) {
+                                       var t = e.originalEvent.targetTouches[0];
+                                       return self._handleDragStart(e, t.pageX, t.pageY );
+                               };
+
+                               this._dragMoveEvt = "touchmove";
+                               this._dragMoveCB = function ( e ) {
+                                       var t = e.originalEvent.targetTouches[0];
+                                       return self._handleDragMove(e, t.pageX, t.pageY );
+                               };
+
+                               this._dragStopEvt = "touchend";
+                               this._dragStopCB = function ( e ) {
+                                       return self._handleDragStop( e );
+                               };
+                       }
+                       this._$view.bind( this._dragStartEvt, this._dragStartCB );
+               }
+       } );
+
+       $( document ).bind( "pagecreate create", function ( e ) {
+               $( $.mobile.circularview.prototype.options.initSelector, e.target ).circularview();
+       } );
+
+}( jQuery, window, document ) ); // End Component
+/*
+ *
+ * This software is licensed under the MIT licence (as defined by the OSI at
+ * http://www.opensource.org/licenses/mit-license.php)
+ * 
+ * ***************************************************************************
+ * Copyright (C) 2011 by Intel Corporation Ltd.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ */
+
+// Ensure that the given namespace is defined. If not, define it to be an empty object.
+// This is kinda like the mkdir -p command.
+
+function ensureNS(ns) {
+    var nsAr = ns.split("."),
+    nsSoFar = "";
+
+    for (var Nix in nsAr) {
+        nsSoFar = nsSoFar + (Nix > 0 ? "." : "") + nsAr[Nix];
+        eval (nsSoFar + " = " + nsSoFar + " || {};");
+    }
+}
+/*
+ *
+ * This software is licensed under the MIT licence (as defined by the OSI at
+ * http://www.opensource.org/licenses/mit-license.php)
+ * 
+ * ***************************************************************************
+ * Copyright (C) 2011 by Intel Corporation Ltd.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ */
+
+// Add markup for labels
+
+(function($, undefined) {
+
+$(document).bind("pagecreate create", function(e) {
+    $(":jqmData(role='label')", e.target).not(":jqmData(role='none'), :jqmData(role='nojs')").each(function() {
+        $(this).addClass("jquery-mobile-ui-label")
+               .html($("<span>", {"class": "jquery-mobile-ui-label-text"}).text($(this).text()));
+    });
+});
+
+})(jQuery);
+ensureNS("jQuery.mobile.tizen.clrlib");
+
+jQuery.extend( jQuery.mobile.tizen.clrlib, 
+{
+    nearestInt: function(val) { 
+        var theFloor = Math.floor(val);
+
+        return (((val - theFloor) > 0.5) ? (theFloor + 1) : theFloor);
+    },
+
+    /*
+     * Converts html color string to rgb array.
+     *
+     * Input: string clr_str, where
+     * clr_str is of the form "#aabbcc"
+     *
+     * Returns: [ r, g, b ], where
+     * r is in [0, 1]
+     * g is in [0, 1]
+     * b is in [0, 1]
+     */
+    HTMLToRGB: function(clr_str) {
+        clr_str = (('#' == clr_str.charAt(0)) ? clr_str.substring(1) : clr_str);
+
+        return ([
+            clr_str.substring(0, 2),
+            clr_str.substring(2, 4),
+            clr_str.substring(4, 6)
+            ].map(function(val) {
+                return parseInt(val, 16) / 255.0;
+            }));
+    },
+
+    /*
+     * Converts rgb array to html color string.
+     *
+     * Input: [ r, g, b ], where
+     * r is in [0, 1]
+     * g is in [0, 1]
+     * b is in [0, 1]
+     *
+     * Returns: string of the form "#aabbcc"
+     */
+    RGBToHTML: function(rgb) {
+        return ("#" + 
+            rgb.map(function(val) {
+                      var ret = val * 255,
+                          theFloor = Math.floor(ret);
+
+                      ret = ((ret - theFloor > 0.5) ? (theFloor + 1) : theFloor);
+                      ret = (((ret < 16) ? "0" : "") + (ret & 0xff).toString(16));
+                      return ret;
+                  })
+               .join(""));
+    },
+
+    /*
+     * Converts hsl to rgb.
+     *
+     * From http://130.113.54.154/~monger/hsl-rgb.html
+     *
+     * Input: [ h, s, l ], where
+     * h is in [0, 360]
+     * s is in [0,   1]
+     * l is in [0,   1]
+     *
+     * Returns: [ r, g, b ], where
+     * r is in [0, 1]
+     * g is in [0, 1]
+     * b is in [0, 1]
+     */
+    HSLToRGB: function(hsl) {
+        var h = hsl[0] / 360.0, s = hsl[1], l = hsl[2];
+
+        if (0 === s)
+            return [ l, l, l ];
+
+        var temp2 = ((l < 0.5)
+                ? l * (1.0 + s)
+                : l + s - l * s),
+            temp1 = 2.0 * l - temp2,
+            temp3 = {
+                r: h + 1.0 / 3.0,
+                g: h,
+                b: h - 1.0 / 3.0
+            };
+
+        temp3.r = ((temp3.r < 0) ? (temp3.r + 1.0) : ((temp3.r > 1) ? (temp3.r - 1.0) : temp3.r));
+        temp3.g = ((temp3.g < 0) ? (temp3.g + 1.0) : ((temp3.g > 1) ? (temp3.g - 1.0) : temp3.g));
+        temp3.b = ((temp3.b < 0) ? (temp3.b + 1.0) : ((temp3.b > 1) ? (temp3.b - 1.0) : temp3.b));
+
+        ret = [
+            (((6.0 * temp3.r) < 1) ? (temp1 + (temp2 - temp1) * 6.0 * temp3.r) :
+            (((2.0 * temp3.r) < 1) ? temp2 :
+            (((3.0 * temp3.r) < 2) ? (temp1 + (temp2 - temp1) * ((2.0 / 3.0) - temp3.r) * 6.0) :
+             temp1))),
+            (((6.0 * temp3.g) < 1) ? (temp1 + (temp2 - temp1) * 6.0 * temp3.g) :
+            (((2.0 * temp3.g) < 1) ? temp2 :
+            (((3.0 * temp3.g) < 2) ? (temp1 + (temp2 - temp1) * ((2.0 / 3.0) - temp3.g) * 6.0) :
+             temp1))),
+            (((6.0 * temp3.b) < 1) ? (temp1 + (temp2 - temp1) * 6.0 * temp3.b) :
+            (((2.0 * temp3.b) < 1) ? temp2 :
+            (((3.0 * temp3.b) < 2) ? (temp1 + (temp2 - temp1) * ((2.0 / 3.0) - temp3.b) * 6.0) :
+             temp1)))]; 
+
+        return ret;
+    },
+
+    /*
+     * Converts hsv to rgb.
+     *
+     * Input: [ h, s, v ], where
+     * h is in [0, 360]
+     * s is in [0,   1]
+     * v is in [0,   1]
+     *
+     * Returns: [ r, g, b ], where
+     * r is in [0, 1]
+     * g is in [0, 1]
+     * b is in [0, 1]
+     */
+    HSVToRGB: function(hsv) {
+        return $.mobile.tizen.clrlib.HSLToRGB($.mobile.tizen.clrlib.HSVToHSL(hsv));
+    },
+
+    /*
+     * Converts rgb to hsv.
+     *
+     * from http://coecsl.ece.illinois.edu/ge423/spring05/group8/FinalProject/HSV_writeup.pdf
+     *
+     * Input: [ r, g, b ], where
+     * r is in [0,   1]
+     * g is in [0,   1]
+     * b is in [0,   1]
+     *
+     * Returns: [ h, s, v ], where
+     * h is in [0, 360]
+     * s is in [0,   1]
+     * v is in [0,   1]
+     */
+    RGBToHSV: function(rgb) {
+        var min, max, delta, h, s, v, r = rgb[0], g = rgb[1], b = rgb[2];
+
+        min = Math.min(r, Math.min(g, b));
+        max = Math.max(r, Math.max(g, b));
+        delta = max - min;
+
+        h = 0;
+        s = 0;
+        v = max;
+
+        if (delta > 0.00001) {
+            s = delta / max;
+
+            if (r === max)
+                h = (g - b) / delta ;
+            else
+            if (g === max)
+                h = 2 + (b - r) / delta ;
+            else
+                h = 4 + (r - g) / delta ;
+
+            h *= 60 ;
+
+            if (h < 0)
+                h += 360 ;
+        }
+
+        return [h, s, v];
+    },
+
+    /*
+     * Converts hsv to hsl.
+     *
+     * Input: [ h, s, v ], where
+     * h is in [0, 360]
+     * s is in [0,   1]
+     * v is in [0,   1]
+     *
+     * Returns: [ h, s, l ], where
+     * h is in [0, 360]
+     * s is in [0,   1]
+     * l is in [0,   1]
+     */
+    HSVToHSL: function(hsv) {
+        var max = hsv[2],
+            delta = hsv[1] * max,
+            min = max - delta,
+            sum = max + min,
+            half_sum = sum / 2,
+            s_divisor = ((half_sum < 0.5) ? sum : (2 - max - min));
+
+        return [ hsv[0], ((0 == s_divisor) ? 0 : (delta / s_divisor)), half_sum ];
+    },
+
+    /*
+     * Converts rgb to hsl
+     *
+     * Input: [ r, g, b ], where
+     * r is in [0,   1]
+     * g is in [0,   1]
+     * b is in [0,   1]
+     *
+     * Returns: [ h, s, l ], where
+     * h is in [0, 360]
+     * s is in [0,   1]
+     * l is in [0,   1]
+     */
+    RGBToHSL: function(rgb) {
+        return $.mobile.tizen.clrlib.HSVToHSL($.mobile.tizen.clrlib.RGBToHSV(rgb));
+    }
+});
+/*
+ * set TIZEN specific configures
+ */
+
+( function( $, window, undefined ) {
+
+       /* set default transition */
+       $.mobile.defaultPageTransition = "none";
+
+       /* depth transition */
+       $.mobile.transitionHandlers.depth = $.mobile.transitionHandlers.simultaneous;
+       $.mobile.transitionFallbacks.depth = "fade";
+
+       /* Button data-corners default value */
+       $.fn.buttonMarkup.defaults.corners = false;
+
+       /* button hover delay */
+       $.mobile.buttonMarkup.hoverDelay = 0;
+
+})( jQuery, this );
+/*
+ * jQuery Mobile Widget @VERSION
+ *
+ * TODO: remove unnecessary codes....
+ *
+ * This software is licensed under the MIT licence (as defined by the OSI at
+ * http://www.opensource.org/licenses/mit-license.php)
+ * 
+ * ***************************************************************************
+ * Copyright (C) 2011 by Intel Corporation Ltd.
+ * 
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ * Authors: Kalyan Kondapally <kalyan.kondapally@intel.com>
+ */
+
+ensureNS("jQuery.mobile.tizen");
+
+(function () {
+jQuery.extend(jQuery.mobile.tizen, {
+    disableSelection: function (element) {
+       var self = this;
+       $(element).find('*').each( function() {
+               if( ( $(this).get(0).tagName !== 'INPUT' &&
+                       $(this).attr("type") !== 'text' ) &&
+                       $(this).get(0).tagName !== 'TEXTAREA' ) {
+                       self.enableSelection( this, 'none' );
+               }
+       } );
+       return true;
+    },
+
+    enableSelection: function (element, value) {
+        return $(element).each( function () {
+               switch( value ) {
+                       case 'text' :
+                       case 'auto' :
+                       case 'none' :
+                               val = value;
+                       break;
+
+                       default :
+                               val = 'auto';
+                       break;
+               }
+            $(this).css( {
+                       'user-select': val,
+                       '-moz-user-select': val,
+                       '-webkit-user-select': val,
+                       '-o-user-select': val,
+                       '-ms-transform': val
+                       } );
+        } );
+    },
+
+    disableContextMenu: function(element) {
+       var self = this;
+       $(element).find('*').each( function() {
+               if( ( $(this).get(0).tagName !== 'INPUT' &&
+                       $(this).attr("type") !== 'text' ) &&
+                       $(this).get(0).tagName !== 'TEXTAREA' ) {
+                       self._disableContextMenu( this );
+               }
+       } );
+    },
+
+    _disableContextMenu: function(element) {
+
+       $(element).each( function() {
+               $(this).bind("contextmenu", function( event ) {
+                       return false;
+               } );
+       } );
+    },
+
+    enableContextMenu: function(element) {
+       $(element).each( function() {
+               $(this).unbind( "contextmenu" );
+       } );
+    },
+
+    // Get document-relative mouse coordinates from a given event
+    // From: http://www.quirksmode.org/js/events_properties.html#position
+    documentRelativeCoordsFromEvent: function(ev) {
+        var e = ev ? ev : window.event,
+            client = { x: e.clientX, y: e.clientY },
+            page   = { x: e.pageX,   y: e.pageY   },
+            posx = 0,
+            posy = 0;
+
+        // Grab useful coordinates from touch events
+        if (e.type.match(/^touch/)) {
+            page = {
+                x: e.originalEvent.targetTouches[0].pageX,
+                y: e.originalEvent.targetTouches[0].pageY
+            };
+            client = {
+                x: e.originalEvent.targetTouches[0].clientX,
+                y: e.originalEvent.targetTouches[0].clientY
+            };
+        }
+
+        if (page.x || page.y) {
+            posx = page.x;
+            posy = page.y;
+        }
+        else
+        if (client.x || client.y) {
+            posx = client.x + document.body.scrollLeft + document.documentElement.scrollLeft;
+            posy = client.y + document.body.scrollTop  + document.documentElement.scrollTop;
+        }
+
+        return { x: posx, y: posy };
+    },
+
+       // TODO : offsetX, offsetY. touch events don't have offsetX and offsetY. support for touch devices.
+    // check algorithm...
+    targetRelativeCoordsFromEvent: function(e) {
+        var coords = { x: e.offsetX, y: e.offsetY };
+
+        if (coords.x === undefined || isNaN(coords.x) ||
+            coords.y === undefined || isNaN(coords.y)) {
+            var offset = $(e.target).offset();
+            //coords = documentRelativeCoordsFromEvent(e);     // Old code. Must be checked again.
+            coords = $.mobile.tizen.documentRelativeCoordsFromEvent(e);
+            coords.x -= offset.left;
+            coords.y -= offset.top;
+        }
+
+        return coords;
+    }
+});
+
+})();
+(function($, undefined) {
+
+ensureNS("jQuery.mobile.tizen");
+
+jQuery.extend( jQuery.mobile.tizen,
+{
+    _widgetPrototypes: {},
+
+    /*
+     * load the prototype for a widget.
+     *
+     * If @widget is a string, the function looks for @widget.prototype.html in the proto-html/ subdirectory of the
+     * framework's current theme and loads the file via AJAX into a string. Note that the file will only be loaded via
+     * AJAX once. If two widget instances based on the same @widget value are to be constructed, the second will be
+     * constructed from the cached copy of the prototype of the first instance.
+     *
+     * If @widget is not a string, it is assumed to be a hash containing at least one key, "proto", the value of which is
+     * the string to be used for the widget prototype. if another key named "key" is also provided, it will serve as the
+     * key under which to cache the prototype, so it need not be rendered again in the future.
+     *
+     * Given the string for the widget prototype, the following patterns occurring in the string are replaced:
+     *
+     *   "${FRAMEWORK_ROOT}" - replaced with the path to the root of the framework
+     *
+     * The function then creates a jQuery $("<div>") object containing the prototype from the string.
+     *
+     * If @ui is not provided, the jQuery object containing the prototype is returned.
+     *
+     * If @ui is provided, it is assumed to be a (possibly multi-level) hash containing CSS selectors. For every level of
+     * the hash and for each string-valued key at that level, the CSS selector specified as the value is sought in the
+     * prototype jQuery object and, if found, the value of the key is replaced with the jQuery object resulting from the
+     * search. Additionally, if the CSS selector is of the form "#widgetid", the "id" attribute will be removed from the
+     * elements contained within the resulting jQuery object. The resulting hash is returned.
+     *
+     * Examples:
+     *
+     * 1.
+     * $.mobile.tizen.loadPrototype("mywidget") => Returns a <div> containing the structure from the file
+     * mywidget.prototype.html located in the current theme folder of the current framework.
+     *
+     * 2. $.mobile.tizen.loadPrototype("mywidget", ui):
+     * where ui is a hash that looks like this:
+     * ui = {
+     *   element1: "<css selector 1>",
+     *   element2: "<css selector 2>",
+     *   group1: {
+     *     group1element1: "<css selector 3>",
+     *     group1element1: "<css selector 4>"
+     *   }
+     *  ...
+     * }
+     *
+     * In this case, after loading the prototype as in Example 1, loadPrototype will traverse @ui and replace the CSS
+     * selector strings with the result of the search for the selector string upon the prototype. If any of the CSS
+     * selectors are of the form "#elementid" then the "id" attribute will be stripped from the elements selected. This
+     * means that they will no longer be accessible via the selector used initially. @ui is then returned thus modified.
+     */
+
+    loadPrototype: function(widget, ui) {
+        var ret = undefined,
+            theScriptTag = $("script[data-framework-version][data-framework-root][data-framework-theme]"),
+            frameworkRootPath = theScriptTag.attr("data-framework-root")    + "/" +
+                                theScriptTag.attr("data-framework-version") + "/";
+
+        function replaceVariables(s) {
+            return s.replace(/\$\{FRAMEWORK_ROOT\}/g, frameworkRootPath);
+        }
+
+        function fillObj(obj, uiProto) {
+            var selector;
+
+            for (var key in obj) {
+                if (typeof obj[key] === "string") {
+                    selector = obj[key];
+                    obj[key] = uiProto.find(obj[key]);
+                    if (selector.substring(0, 1) === "#")
+                        obj[key].removeAttr("id");
+                }
+                else
+                if (typeof obj[key] === "object")
+                    obj[key] = fillObj(obj[key], uiProto);
+            }
+            return obj;
+        }
+
+        /* If @widget is a string ... */
+        if (typeof widget === "string") {
+            /* ... try to use it as a key into the cached prototype hash ... */
+            ret = $.mobile.tizen._widgetPrototypes[widget];
+            if (ret === undefined) {
+                /* ... and if the proto was not found, try to load its definition ... */
+                var protoPath = frameworkRootPath + "proto-html" + "/" +
+                                theScriptTag.attr("data-framework-theme");
+                $.ajax({
+                    url: protoPath + "/" + widget + ".prototype.html",
+                    async: false,
+                    dataType: "html"
+                })
+                 .success(function(data, textStatus, jqXHR) {
+                    /* ... and if loading succeeds, cache it and use a copy of it ... */
+                    $.mobile.tizen._widgetPrototypes[widget] = $("<div>").html(replaceVariables(data));
+                    ret = $.mobile.tizen._widgetPrototypes[widget].clone();
+                });
+            }
+        }
+        /* Otherwise ... */
+        else {
+            /* ... if a key was provided ... */
+            if (widget.key !== undefined)
+                /* ... try to use it as a key into the cached prototype hash ... */
+                ret = $.mobile.tizen._widgetPrototypes[widget.key];
+
+            /* ... and if the proto was not found in the cache ... */
+            if (ret === undefined) {
+                /* ... and a proto definition string was provided ... */
+                if (widget.proto !== undefined) {
+                    /* ... create a new proto from the definition ... */
+                    ret = $("<div>").html(replaceVariables(widget.proto));
+                    /* ... and if a key was provided ... */
+                    if (widget.key !== undefined)
+                        /* ... cache a copy of the proto under that key */
+                        $.mobile.tizen._widgetPrototypes[widget.key] = ret.clone();
+                }
+            }
+            else
+                /* otherwise, if the proto /was/ found in the cache, return a copy of it */
+                ret = ret.clone();
+        }
+
+        /* If the prototype was found/created successfully ... */
+        if (ret != undefined)
+            /* ... and @ui was provided */
+            if (ui != undefined)
+                /* ... return @ui, but replace the CSS selectors it contains with the elements they select */
+                ret = fillObj(ui, ret);
+
+        return ret;
+    }
+});
+})(jQuery);
+/*
+* jQuery Mobile Framework : scrollview plugin
+* Copyright (c) 2010 Adobe Systems Incorporated - Kin Blas (jblas@adobe.com)
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* Note: Code is in draft form and is subject to change
+* Modified by Koeun Choi <koeun.choi@samsung.com>
+* Modified by Minkyu Kang <mk7.kang@samsung.com>
+*/
+
+(function ( $, window, document, undefined ) {
+
+       function resizePageContentHeight( page ) {
+               var $page = $( page ),
+                       $content = $page.children(".ui-content"),
+                       hh = $page.children(".ui-header").outerHeight() || 0,
+                       fh = $page.children(".ui-footer").outerHeight() || 0,
+                       pt = parseFloat( $content.css("padding-top") ),
+                       pb = parseFloat( $content.css("padding-bottom") ),
+                       wh = $( window ).height();
+
+               $content.height( wh - (hh + fh) - (pt + pb) );
+       }
+
+       function MomentumTracker( options ) {
+               this.options = $.extend( {}, options );
+               this.easing = "easeOutQuad";
+               this.reset();
+       }
+
+       var tstates = {
+               scrolling: 0,
+               overshot:  1,
+               snapback:  2,
+               done:      3
+       };
+
+       function getCurrentTime() {
+               return Date.now();
+       }
+
+       jQuery.widget( "tizen.scrollview", jQuery.mobile.widget, {
+               options: {
+                       direction:         null,  // "x", "y", or null for both.
+
+                       timerInterval:     10,
+                       scrollDuration:    1000,  // Duration of the scrolling animation in msecs.
+                       overshootDuration: 250,   // Duration of the overshoot animation in msecs.
+                       snapbackDuration:  500,   // Duration of the snapback animation in msecs.
+
+                       moveThreshold:     30,   // User must move this many pixels in any direction to trigger a scroll.
+                       moveIntervalThreshold:     150,   // Time between mousemoves must not exceed this threshold.
+
+                       scrollMethod:      "translate",  // "translate", "position"
+                       startEventName:    "scrollstart",
+                       updateEventName:   "scrollupdate",
+                       stopEventName:     "scrollstop",
+
+                       eventType:         $.support.touch ? "touch" : "mouse",
+
+                       showScrollBars:    true,
+                       overshootEnable:   false,
+                       outerScrollEnable: true,
+                       overflowEnable:    true,
+                       scrollJump:        false,
+               },
+
+               _getViewHeight: function () {
+                       return this._$view.height();
+               },
+
+               _makePositioned: function ( $ele ) {
+                       if ( $ele.css("position") === "static" ) {
+                               $ele.css( "position", "relative" );
+                       }
+               },
+
+               _create: function () {
+                       var direction,
+                               self = this;
+
+                       this._$clip = $( this.element ).addClass("ui-scrollview-clip");
+
+                       if ( this._$clip.children(".ui-scrollview-view").length ) {
+                               this._$view = this._$clip.children(".ui-scrollview-view");
+                       } else {
+                               this._$view = this._$clip.wrapInner("<div></div>").children()
+                                                       .addClass("ui-scrollview-view");
+                       }
+
+                       if ( this.options.scrollMethod === "translate" ) {
+                               if ( this._$view.css("transform") === undefined ) {
+                                       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;
+
+                       direction = this.options.direction;
+
+                       this._hTracker = ( direction !== "y" ) ?
+                                       new MomentumTracker( this.options ) : null;
+                       this._vTracker = ( direction !== "x" ) ?
+                                       new MomentumTracker( this.options ) : null;
+
+                       this._timerInterval = this.options.timerInterval;
+                       this._timerID = 0;
+
+                       this._timerCB = function () {
+                               self._handleMomentumScroll();
+                       };
+
+                       this._add_event();
+                       this._add_scrollbar();
+                       this._add_scroll_jump();
+                       this._add_overflow_indicator();
+               },
+
+               _startMScroll: function ( speedX, speedY ) {
+                       var keepGoing = false,
+                               duration = this.options.scrollDuration,
+                               ht = this._hTracker,
+                               vt = this._vTracker,
+                               c,
+                               v;
+
+                       this._$clip.trigger( this.options.startEventName );
+
+                       if ( ht ) {
+                               c = this._$clip.width();
+                               v = this._$view.width();
+
+                               if ( (( this._sx === 0 && speedX > 0 ) ||
+                                       ( this._sx === -(v - c) && speedX < 0 )) &&
+                                               v > c ) {
+                                       return;
+                               }
+
+                               ht.start( this._sx, speedX,
+                                       duration, (v > c) ? -(v - c) : 0, 0 );
+                               keepGoing = !ht.done();
+                       }
+
+                       if ( vt ) {
+                               c = this._$clip.height();
+                               v = this._getViewHeight();
+
+                               if ( (( this._sy === 0 && speedY > 0 ) ||
+                                       ( this._sy === -(v - c) && speedY < 0 )) &&
+                                               v > c ) {
+                                       return;
+                               }
+
+                               vt.start( this._sy, speedY,
+                                       duration, (v > c) ? -(v - c) : 0, 0 );
+                               keepGoing = keepGoing || !vt.done();
+                       }
+
+                       if ( keepGoing ) {
+                               this._timerID = setTimeout( this._timerCB, this._timerInterval );
+                       } else {
+                               this._stopMScroll();
+                       }
+               },
+
+               _stopMScroll: function () {
+                       if ( this._timerID ) {
+                               this._$clip.trigger( this.options.stopEventName );
+                               clearTimeout( this._timerID );
+                       }
+                       this._timerID = 0;
+
+                       if ( this._vTracker ) {
+                               this._vTracker.reset();
+                       }
+
+                       if ( this._hTracker ) {
+                               this._hTracker.reset();
+                       }
+
+                       this._hideScrollBars();
+                       this._hideOverflowIndicator();
+               },
+
+               _handleMomentumScroll: function () {
+                       var keepGoing = false,
+                               x = 0,
+                               y = 0,
+                               scroll_height = 0,
+                               self = this,
+                               end_effect = function ( dir ) {
+                                       setTimeout( function () {
+                                               self._effect_dir = dir;
+                                               self._setEndEffect( "in" );
+                                       }, 100 );
+
+                                       setTimeout( function () {
+                                               self._setEndEffect( "out" );
+                                       }, 350 );
+                               },
+                               vt = this._vTracker,
+                               ht = this._hTracker;
+
+                       if ( this._outerScrolling ) {
+                               return;
+                       }
+
+                       if ( vt ) {
+                               vt.update( this.options.overshootEnable );
+                               y = vt.getPosition();
+                               keepGoing = !vt.done();
+
+                               if ( vt.getRemained() > this.options.overshootDuration ) {
+                                       scroll_height = this._getViewHeight() - this._$clip.height();
+
+                                       if ( !vt.isAvail() ) {
+                                               if ( this._speedY > 0 ) {
+                                                       this._outerScroll( vt.getRemained() / 3, scroll_height );
+                                               } else {
+                                                       this._outerScroll( y - vt.getRemained() / 3, scroll_height );
+                                               }
+                                       } else if ( vt.isMin() ) {
+                                               this._outerScroll( y - vt.getRemained() / 3, scroll_height );
+
+                                               if ( scroll_height > 0 ) {
+                                                       end_effect( 1 );
+                                               }
+                                       } else if ( vt.isMax() ) {
+                                               this._outerScroll( vt.getRemained() / 3, scroll_height );
+
+                                               if ( scroll_height > 0 ) {
+                                                       end_effect( 0 );
+                                               }
+                                       }
+                               }
+                       }
+
+                       if ( ht ) {
+                               ht.update( this.options.overshootEnable );
+                               x = ht.getPosition();
+                               keepGoing = keepGoing || !ht.done();
+                       }
+
+                       this._setScrollPosition( x, y );
+                       this._$clip.trigger( this.options.updateEventName,
+                                       [ { x: x, y: y } ] );
+
+                       if ( keepGoing ) {
+                               this._timerID = setTimeout( this._timerCB, this._timerInterval );
+                       } else {
+                               this._stopMScroll();
+                       }
+               },
+
+               _setElementTransform: function ( $ele, x, y, duration ) {
+                       var translate,
+                               transition;
+
+                       if ( !duration || duration === undefined ) {
+                               transition = "none";
+                       } else {
+                               transition =  "-webkit-transform " + duration / 1000 + "s ease-out";
+                       }
+
+                       if ( $.support.cssTransform3d ) {
+                               translate = "translate3d(" + x + "," + y + ", 0px)";
+                       } else {
+                               translate = "translate(" + x + "," + y + ")";
+                       }
+
+                       $ele.css({
+                               "-moz-transform": translate,
+                               "-webkit-transform": translate,
+                               "-ms-transform": translate,
+                               "-o-transform": translate,
+                               "transform": translate,
+                               "-webkit-transition": transition
+                       });
+               },
+
+               _setEndEffect: function ( dir ) {
+                       var scroll_height = this._getViewHeight() - this._$clip.height();
+
+                       if ( this._softkeyboard ) {
+                               if ( this._effect_dir ) {
+                                       this._outerScroll( -scroll_height - this._softkeyboardHeight,
+                                                       scroll_height );
+                               } else {
+                                       this._outerScroll( this._softkeyboardHeight, scroll_height );
+                               }
+                               return;
+                       }
+
+                       if ( dir === "in" ) {
+                               if ( this._endEffect ) {
+                                       return;
+                               }
+
+                               this._endEffect = true;
+                               this._setOverflowIndicator( this._effect_dir );
+                               this._showOverflowIndicator();
+                       } else if ( dir === "out" ) {
+                               if ( !this._endEffect ) {
+                                       return;
+                               }
+
+                               this._endEffect = false;
+                       } else {
+                               this._endEffect = false;
+                               this._setOverflowIndicator();
+                               this._showOverflowIndicator();
+                       }
+               },
+
+               _setCalibration: function ( x, y ) {
+                       if ( this.options.overshootEnable ) {
+                               this._sx = x;
+                               this._sy = y;
+                               return;
+                       }
+
+                       var $v = this._$view,
+                               $c = this._$clip,
+                               dirLock = this._directionLock,
+                               scroll_height = 0,
+                               scroll_width = 0;
+
+                       if ( dirLock !== "y" && this._hTracker ) {
+                               scroll_width = $v.width() - $c.width();
+
+                               if ( x >= 0 ) {
+                                       this._sx = 0;
+                               } else if ( x < -scroll_width ) {
+                                       this._sx = -scroll_width;
+                               } else {
+                                       this._sx = x;
+                               }
+
+                               if ( scroll_width < 0 ) {
+                                       this._sx = 0;
+                               }
+                       }
+
+                       if ( dirLock !== "x" && this._vTracker ) {
+                               scroll_height = this._getViewHeight() - $c.height();
+
+                               if ( y > 0 ) {
+                                       this._sy = 0;
+
+                                       if ( this._didDrag && scroll_height > 0 ) {
+                                               this._effect_dir = 0;
+                                               this._setEndEffect( "in" );
+                                       }
+                               } else if ( y < -scroll_height ) {
+                                       this._sy = -scroll_height;
+
+                                       if ( this._didDrag && scroll_height > 0 ) {
+                                               this._effect_dir = 1;
+                                               this._setEndEffect( "in" );
+                                       }
+                               } else {
+                                       if ( this._endEffect && this._sy !== y ) {
+                                               this._setEndEffect();
+                                       }
+
+                                       this._sy = y;
+                               }
+
+                               if ( scroll_height < 0 ) {
+                                       this._sy = 0;
+                               }
+                       }
+               },
+
+               _setScrollPosition: function ( x, y, duration ) {
+                       var $v = this._$view,
+                               sm = this.options.scrollMethod,
+                               $vsb = this._$vScrollBar,
+                               $hsb = this._$hScrollBar,
+                               $sbt;
+
+                       this._setCalibration( x, y );
+
+                       x = this._sx;
+                       y = this._sy;
+
+                       if ( sm === "translate" ) {
+                               this._setElementTransform( $v, x + "px", y + "px", duration );
+                       } else {
+                               $v.css( {left: x + "px", top: y + "px"} );
+                       }
+
+                       if ( $vsb ) {
+                               $sbt = $vsb.find(".ui-scrollbar-thumb");
+
+                               if ( sm === "translate" ) {
+                                       this._setElementTransform( $sbt, "0px",
+                                               -y / this._getViewHeight() * $sbt.parent().height() + "px",
+                                               duration );
+                               } else {
+                                       $sbt.css( "top", -y / this._getViewHeight() * 100 + "%" );
+                               }
+                       }
+
+                       if ( $hsb ) {
+                               $sbt = $hsb.find(".ui-scrollbar-thumb");
+
+                               if ( sm === "translate" ) {
+                                       this._setElementTransform( $sbt,
+                                               -x / $v.width() * $sbt.parent().width() + "px", "0px",
+                                               duration);
+                               } else {
+                                       $sbt.css("left", -x / $v.width() * 100 + "%");
+                               }
+                       }
+               },
+
+               _outerScroll: function ( y, scroll_height ) {
+                       var self = this,
+                               top = $( window ).scrollTop() - window.screenTop,
+                               sy = 0,
+                               duration = this.options.snapbackDuration,
+                               start = getCurrentTime(),
+                               tfunc;
+
+                       if ( !this.options.outerScrollEnable ) {
+                               return;
+                       }
+
+                       if ( this._$clip.jqmData("scroll") !== "y" ) {
+                               return;
+                       }
+
+                       if ( this._outerScrolling ) {
+                               return;
+                       }
+
+                       if ( y > 0 ) {
+                               sy = ( window.screenTop ? window.screenTop : -y );
+                       } else if ( y < -scroll_height ) {
+                               sy = -y - scroll_height;
+                       } else {
+                               return;
+                       }
+
+                       tfunc = function () {
+                               var elapsed = getCurrentTime() - start;
+
+                               if ( elapsed >= duration ) {
+                                       window.scrollTo( 0, top + sy );
+                                       self._outerScrolling = undefined;
+
+                                       self._stopMScroll();
+                               } else {
+                                       ec = $.easing.easeOutQuad( elapsed / duration,
+                                                       elapsed, 0, 1, duration );
+
+                                       window.scrollTo( 0, top + ( sy * ec ) );
+                                       self._outerScrolling = setTimeout( tfunc, self._timerInterval );
+                               }
+                       };
+                       this._outerScrolling = setTimeout( tfunc, self._timerInterval );
+               },
+
+               _scrollTo: function ( x, y, duration ) {
+                       var self = this,
+                               start = getCurrentTime(),
+                               efunc = $.easing.easeOutQuad,
+                               sx = this._sx,
+                               sy = this._sy,
+                               dx = x - sx,
+                               dy = y - sy,
+                               tfunc;
+
+                       x = -x;
+                       y = -y;
+
+                       tfunc = function () {
+                               var elapsed = getCurrentTime() - start,
+                                   ec;
+
+                               if ( elapsed >= duration ) {
+                                       self._timerID = 0;
+                                       self._setScrollPosition( x, y );
+                               } else {
+                                       ec = efunc( elapsed / duration, elapsed, 0, 1, duration );
+
+                                       self._setScrollPosition( sx + ( dx * ec ), sy + ( dy * ec ) );
+                                       self._timerID = setTimeout( tfunc, self._timerInterval );
+                               }
+                       };
+
+                       this._timerID = setTimeout( tfunc, this._timerInterval );
+               },
+
+               scrollTo: function ( x, y, duration ) {
+                       this._stopMScroll();
+
+                       if ( !duration || this.options.scrollMethod === "translate" ) {
+                               this._setScrollPosition( x, y, duration );
+                       } else {
+                               this._scrollTo( x, y, duration );
+                       }
+               },
+
+               getScrollPosition: function () {
+                       return { x: -this._sx, y: -this._sy };
+               },
+
+               _getScrollHierarchy: function () {
+                       var svh = [],
+                               d;
+
+                       this._$clip.parents( ".ui-scrollview-clip").each( function () {
+                               d = $( this ).jqmData("scrollview");
+                               if ( d ) {
+                                       svh.unshift( d );
+                               }
+                       } );
+                       return svh;
+               },
+
+               _getAncestorByDirection: function ( dir ) {
+                       var svh = this._getScrollHierarchy(),
+                               n = svh.length,
+                               sv,
+                               svdir;
+
+                       while ( 0 < n-- ) {
+                               sv = svh[n];
+                               svdir = sv.options.direction;
+
+                               if (!svdir || svdir === dir) {
+                                       return sv;
+                               }
+                       }
+                       return null;
+               },
+
+               _handleDragStart: function ( e, ex, ey ) {
+                       this._stopMScroll();
+
+                       this._didDrag = false;
+                       this._skip_dragging = false;
+
+                       var target = $( e.target ),
+                               self = this,
+                               $c = this._$clip,
+                               svdir = this.options.direction;
+
+                       /* should prevent the default behavior when click the button */
+                       this._is_button = target.is( '.ui-btn' ) ||
+                                       target.is( '.ui-btn-text' ) ||
+                                       target.is( '.ui-btn-inner' ) ||
+                                       target.is( '.ui-btn-inner .ui-icon' );
+
+                       /* should prevent the default behavior when click the slider */
+                       if ( target.parents('.ui-slider').length || target.is('.ui-slider') ) {
+                               this._skip_dragging = true;
+                               return;
+                       }
+
+                       /*
+                        * We need to prevent the default behavior to
+                        * suppress accidental selection of text, etc.
+                        */
+                       this._is_inputbox = target.is(':input') ||
+                                       target.parents(':input').length > 0;
+
+                       if ( this._is_inputbox ) {
+                               target.one( "resize.scrollview", function () {
+                                       if ( ey > $c.height() ) {
+                                               self.scrollTo( -ex, self._sy - ey + $c.height(),
+                                                       self.options.snapbackDuration );
+                                       }
+                               });
+                       }
+
+                       if ( this.options.eventType === "mouse" && !this._is_inputbox && !this._is_button ) {
+                               e.preventDefault();
+                       }
+
+                       this._lastX = ex;
+                       this._lastY = ey;
+                       this._startY = ey;
+                       this._doSnapBackX = false;
+                       this._doSnapBackY = false;
+                       this._speedX = 0;
+                       this._speedY = 0;
+                       this._directionLock = "";
+
+                       this._lastMove = 0;
+                       this._enableTracking();
+
+                       this._set_scrollbar_size();
+               },
+
+               _propagateDragMove: function ( sv, e, ex, ey, dir ) {
+                       this._hideScrollBars();
+                       this._hideOverflowIndicator();
+                       this._disableTracking();
+                       sv._handleDragStart( e, ex, ey );
+                       sv._directionLock = dir;
+                       sv._didDrag = this._didDrag;
+               },
+
+               _handleDragMove: function ( e, ex, ey ) {
+                       if ( this._skip_dragging ) {
+                               return;
+                       }
+
+                       if ( !this._dragging ) {
+                               return;
+                       }
+
+                       if ( !this._is_inputbox && !this._is_button ) {
+                               e.preventDefault();
+                       }
+
+                       var mt = this.options.moveThreshold,
+                               dx = ex - this._lastX,
+                               dy = ey - this._lastY,
+                               svdir = this.options.direction,
+                               dir = null,
+                               x,
+                               y,
+                               sv,
+                               scope,
+                               newX,
+                               newY,
+                               dirLock;
+
+                       this._lastMove = getCurrentTime();
+
+                       if ( !this._directionLock ) {
+                               x = Math.abs( dx );
+                               y = Math.abs( dy );
+
+                               if ( x < mt && y < mt ) {
+                                       return false;
+                               }
+
+                               if ( x < y && (x / y) < 0.5 ) {
+                                       dir = "y";
+                               } else if ( x > y && (y / x) < 0.5 ) {
+                                       dir = "x";
+                               }
+
+                               if ( svdir && dir && svdir !== dir ) {
+                                       /*
+                                        * This scrollview can't handle the direction the user
+                                        * is attempting to scroll. Find an ancestor scrollview
+                                        * that can handle the request.
+                                        */
+
+                                       sv = this._getAncestorByDirection( dir );
+                                       if ( sv ) {
+                                               this._propagateDragMove( sv, e, ex, ey, dir );
+                                               return false;
+                                       }
+                               }
+
+                               this._directionLock = svdir || (dir || "none");
+                       }
+
+                       newX = this._sx;
+                       newY = this._sy;
+                       dirLock = this._directionLock;
+
+                       if ( dirLock !== "y" && this._hTracker ) {
+                               x = this._sx;
+                               this._speedX = dx;
+                               newX = x + dx;
+
+                               this._doSnapBackX = false;
+
+                               scope = ( newX > 0 || newX < this._maxX );
+
+                               if ( scope && dirLock === "x" ) {
+                                       sv = this._getAncestorByDirection("x");
+                                       if ( sv ) {
+                                               this._setScrollPosition( newX > 0 ?
+                                                               0 : this._maxX, newY );
+                                               this._propagateDragMove( sv, e, ex, ey, dir );
+                                               return false;
+                                       }
+
+                                       newX = x + ( dx / 2 );
+                                       this._doSnapBackX = true;
+                               }
+                       }
+
+                       if ( dirLock !== "x" && this._vTracker ) {
+                               if ( Math.abs( this._startY - ey ) < mt && dirLock !== "xy" ) {
+                                       return;
+                               }
+
+                               y = this._sy;
+                               this._speedY = dy;
+                               newY = y + dy;
+
+                               this._doSnapBackY = false;
+
+                               scope = ( newY > 0 || newY < this._maxY );
+
+                               if ( scope && dirLock === "y" ) {
+                                       sv = this._getAncestorByDirection("y");
+                                       if ( sv ) {
+                                               this._setScrollPosition( newX,
+                                                               newY > 0 ? 0 : this._maxY );
+                                               this._propagateDragMove( sv, e, ex, ey, dir );
+                                               return false;
+                                       }
+
+                                       newY = y + ( dy / 2 );
+                                       this._doSnapBackY = true;
+                               }
+                       }
+
+                       if ( this.options.overshootEnable === false ) {
+                               this._doSnapBackX = false;
+                               this._doSnapBackY = false;
+                       }
+
+                       this._lastX = ex;
+                       this._lastY = ey;
+
+                       this._setScrollPosition( newX, newY );
+
+                       if ( this._didDrag === false ) {
+                               this._didDrag = true;
+                               this._showScrollBars();
+                               this._showOverflowIndicator();
+                       }
+               },
+
+               _handleDragStop: function ( e ) {
+                       var self = this;
+
+                       if ( this._skip_dragging ) {
+                               return;
+                       }
+
+                       var l = this._lastMove,
+                               t = getCurrentTime(),
+                               doScroll = (l && (t - l) <= this.options.moveIntervalThreshold),
+                               sx = ( this._hTracker && this._speedX && doScroll ) ?
+                                               this._speedX : ( this._doSnapBackX ? 1 : 0 ),
+                               sy = ( this._vTracker && this._speedY && doScroll ) ?
+                                               this._speedY : ( this._doSnapBackY ? 1 : 0 ),
+                               svdir = this.options.direction,
+                               x,
+                               y;
+
+                       if ( sx || sy ) {
+                               if ( !this._setGestureScroll( sx, sy ) ) {
+                                       this._startMScroll( sx, sy );
+                               }
+                       } else {
+                               this._hideScrollBars();
+                               this._hideOverflowIndicator();
+                       }
+
+                       this._disableTracking();
+
+                       if ( this._endEffect ) {
+                               setTimeout( function () {
+                                       self._setEndEffect( "out" );
+                                       self._hideScrollBars();
+                                       self._hideOverflowIndicator();
+                               }, 300 );
+                       }
+
+                       return !this._didDrag;
+               },
+
+               _setGestureScroll: function ( sx, sy ) {
+                       var self = this,
+                               reset = function () {
+                                       clearTimeout( self._gesture_timer );
+                                       self._gesture_dir = 0;
+                                       self._gesture_count = 0;
+                                       self._gesture_timer = undefined;
+                               };
+
+                       if ( !sy ) {
+                               return false;
+                       }
+
+                       dir = sy > 0 ? 1 : -1;
+
+                       if ( !this._gesture_timer ) {
+                               this._gesture_count = 1;
+                               this._gesture_dir = dir;
+
+                               this._gesture_timer = setTimeout( function () {
+                                       reset();
+                               }, 1000 );
+
+                               return false;
+                       }
+
+                       if ( this._gesture_dir !== dir ) {
+                               reset();
+                               return false;
+                       }
+
+                       this._gesture_count++;
+
+                       if ( this._gesture_count === 3 ) {
+                               if ( dir > 0 ) {
+                                       this.scrollTo( 0, 0, this.options.overshootDuration );
+                               } else {
+                                       this.scrollTo( 0, -( this._getViewHeight() - this._$clip.height() ),
+                                                       this.options.overshootDuration );
+                               }
+                               reset();
+
+                               return true;
+                       }
+
+                       return false;
+               },
+
+               _enableTracking: function () {
+                       this._dragging = true;
+               },
+
+               _disableTracking: function () {
+                       this._dragging = false;
+               },
+
+               _showScrollBars: function ( interval ) {
+                       var vclass = "ui-scrollbar-visible",
+                               self = this;
+
+                       if ( !this.options.showScrollBars ) {
+                               return;
+                       }
+                       if ( this._scrollbar_showed ) {
+                               return;
+                       }
+
+                       if ( this._$vScrollBar ) {
+                               this._$vScrollBar.addClass( vclass );
+                       }
+                       if ( this._$hScrollBar ) {
+                               this._$hScrollBar.addClass( vclass );
+                       }
+
+                       this._scrollbar_showed = true;
+
+                       if ( interval ) {
+                               setTimeout( function () {
+                                       self._hideScrollBars();
+                               }, interval );
+                       }
+               },
+
+               _hideScrollBars: function () {
+                       var vclass = "ui-scrollbar-visible";
+
+                       if ( !this.options.showScrollBars ) {
+                               return;
+                       }
+                       if ( !this._scrollbar_showed ) {
+                               return;
+                       }
+
+                       if ( this._$vScrollBar ) {
+                               this._$vScrollBar.removeClass( vclass );
+                       }
+                       if ( this._$hScrollBar ) {
+                               this._$hScrollBar.removeClass( vclass );
+                       }
+
+                       this._scrollbar_showed = false;
+               },
+
+               _setOverflowIndicator: function ( dir ) {
+                       if ( dir === 1 ) {
+                               this._opacity_top = "0";
+                               this._opacity_bottom = "0.8";
+                       } else if ( dir === 0 ) {
+                               this._opacity_top = "0.8";
+                               this._opacity_bottom = "0";
+                       } else {
+                               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 = true;
+               },
+
+               _hideOverflowIndicator: function () {
+                       if ( !this.options.overflowEnable || !this._overflowAvail || this._softkeyboard ) {
+                               return;
+                       }
+
+                       if ( this._overflow_showed === false ) {
+                               return;
+                       }
+
+                       this._overflow_top.animate( { opacity: 0 }, 300 );
+                       this._overflow_bottom.animate( { opacity: 0 }, 300 );
+
+                       this._overflow_showed = false;
+                       this._setOverflowIndicator();
+               },
+
+               _add_event: function () {
+                       var self = this,
+                               $c = this._$clip,
+                               $v = this._$view;
+
+                       if ( this.options.eventType === "mouse" ) {
+                               this._dragEvt = "mousedown mousemove mouseup click mousewheel";
+
+                               this._dragCB = function ( e ) {
+                                       switch ( e.type ) {
+                                       case "mousedown":
+                                               return self._handleDragStart( e,
+                                                               e.clientX, e.clientY );
+
+                                       case "mousemove":
+                                               return self._handleDragMove( e,
+                                                               e.clientX, e.clientY );
+
+                                       case "mouseup":
+                                               return self._handleDragStop( e );
+
+                                       case "click":
+                                               return !self._didDrag;
+
+                                       case "mousewheel":
+                                               var old = self.getScrollPosition();
+                                               self.scrollTo( -old.x,
+                                                       -(old.y - e.originalEvent.wheelDelta) );
+                                               break;
+                                       }
+                               };
+                       } else {
+                               this._dragEvt = "touchstart touchmove touchend click";
+
+                               this._dragCB = function ( e ) {
+                                       var touches = e.originalEvent.touches;
+
+                                       switch ( e.type ) {
+                                       case "touchstart":
+                                               if ( touches.length != 1) {
+                                                       return;
+                                               }
+
+                                               return self._handleDragStart( e,
+                                                               touches[0].pageX, touches[0].pageY );
+
+                                       case "touchmove":
+                                               if ( touches.length != 1) {
+                                                       return;
+                                               }
+
+                                               return self._handleDragMove( e,
+                                                               touches[0].pageX, touches[0].pageY );
+
+                                       case "touchend":
+                                               if ( touches.length != 0) {
+                                                       return;
+                                               }
+
+                                               return self._handleDragStop( e );
+
+                                       case "click":
+                                               return !self._didDrag;
+                                       }
+                               };
+                       }
+
+                       $v.bind( this._dragEvt, this._dragCB );
+
+                       $v.bind( "keydown", function ( e ) {
+                               var elem,
+                                       elem_top,
+                                       screen_h;
+
+                               if ( e.keyCode == 9 ) {
+                                       return false;
+                               }
+
+                               elem = $c.find(".ui-focus");
+
+                               if ( elem === undefined ) {
+                                       return;
+                               }
+
+                               elem_top = elem.offset().top;
+                               screen_h = $c.offset().top + $c.height() - elem.height();
+
+                               if ( self._softkeyboard ) {
+                                       screen_h -= self._softkeyboardHeight;
+                               }
+
+                               if ( ( elem_top < 0 ) || ( elem_top > screen_h ) ) {
+                                       self.scrollTo( 0, self._sy - elem_top +
+                                               elem.height() + $c.offset().top, 0);
+                               }
+
+                               return;
+                       });
+
+                       $v.bind( "keyup", function ( e ) {
+                               var input,
+                                       elem,
+                                       elem_top,
+                                       screen_h;
+
+                               if ( e.keyCode != 9 ) {
+                                       return;
+                               }
+
+                               /* Tab Key */
+
+                               input = $( this ).find(":input");
+
+                               for ( i = 0; i < input.length; i++ ) {
+                                       if ( !$( input[i] ).hasClass("ui-focus") ) {
+                                               continue;
+                                       }
+
+                                       if ( i + 1 == input.length ) {
+                                               elem = $( input[0] );
+                                       } else {
+                                               elem = $( input[i + 1] );
+                                       }
+
+                                       elem_top = elem.offset().top;
+                                       screen_h = $c.offset().top + $c.height() - elem.height();
+
+                                       if ( self._softkeyboard ) {
+                                               screen_h -= self._softkeyboardHeight;
+                                       }
+
+                                       if ( ( elem_top < 0 ) || ( elem_top > screen_h ) ) {
+                                               self.scrollTo( 0, self._sy - elem_top +
+                                                       elem.height() + $c.offset().top, 0);
+                                       }
+
+                                       elem.focus();
+
+                                       break;
+                               }
+
+                               return false;
+                       });
+
+                       $c.bind( "updatelayout", function ( e ) {
+                               var sy,
+                                       vh,
+                                       view_h = self._getViewHeight();
+
+                               if ( !$c.height() || !view_h ) {
+                                       self.scrollTo( 0, 0, 0 );
+                                       return;
+                               }
+
+                               sy = $c.height() - view_h;
+                               vh = view_h - self._view_height;
+
+                               self._view_height = view_h;
+
+                               if ( vh == 0 || vh > $c.height() / 2 ) {
+                                       return;
+                               }
+
+                               if ( sy > 0 ) {
+                                       self.scrollTo( 0, 0, 0 );
+                               } else if ( self._sy - sy <= -vh ) {
+                                       self.scrollTo( 0, self._sy,
+                                               self.options.snapbackDuration );
+                               } else if ( self._sy - sy <= vh + self.options.moveThreshold ) {
+                                       self.scrollTo( 0, sy,
+                                               self.options.snapbackDuration );
+                               }
+                       });
+
+                       $( window ).bind( "resize", function ( e ) {
+                               var focused,
+                                       view_h = self._getViewHeight();
+
+                               if ( $(".ui-page-active").get(0) !== $c.closest(".ui-page").get(0) ) {
+                                       return;
+                               }
+
+                               if ( !$c.height() || !view_h ) {
+                                       return;
+                               }
+
+                               focused = $c.find(".ui-focus");
+
+                               if ( focused ) {
+                                       focused.trigger("resize.scrollview");
+                               }
+
+                               /* calibration - after triggered throttledresize */
+                               setTimeout( function () {
+                                       if ( self._sy < $c.height() - self._getViewHeight() ) {
+                                               self.scrollTo( 0, $c.height() - self._getViewHeight(),
+                                                       self.options.overshootDuration );
+                                       }
+                               }, 260 );
+
+                               self._view_height = view_h;
+                       });
+
+                       $( window ).bind( "vmouseout", function ( e ) {
+                               var drag_stop = false;
+
+                               if ( $(".ui-page-active").get(0) !== $c.closest(".ui-page").get(0) ) {
+                                       return;
+                               }
+
+                               if ( !self._dragging ) {
+                                       return;
+                               }
+
+                               if ( e.pageX < 0 || e.pageX > $( window ).width() ) {
+                                       drag_stop = true;
+                               }
+
+                               if ( e.pageY < 0 || e.pageY > $( window ).height() ) {
+                                       drag_stop = true;
+                               }
+
+                               if ( drag_stop ) {
+                                       self._hideScrollBars();
+                                       self._hideOverflowIndicator();
+                                       self._disableTracking();
+                               }
+                       });
+
+                       this._softkeyboard = false;
+                       this._softkeyboardHeight = 0;
+
+                       window.addEventListener( "softkeyboardchange", function ( e ) {
+                               if ( $(".ui-page-active").get(0) !== $c.closest(".ui-page").get(0) ) {
+                                       return;
+                               }
+
+                               self._softkeyboard = ( e.state === "on" ? true : false );
+                               self._softkeyboardHeight = e.height;
+                       });
+
+                       $c.closest(".ui-page")
+                               .bind( "pageshow", function ( e ) {
+                                       /* should be called after pagelayout */
+                                       setTimeout( function () {
+                                               self._view_height = self._getViewHeight();
+                                               self._set_scrollbar_size();
+                                               self._setScrollPosition( self._sx, self._sy );
+                                               self._showScrollBars( 2000 );
+                                       }, 0 );
+                               });
+               },
+
+               _add_scrollbar: function () {
+                       var $c = this._$clip,
+                               prefix = "<div class=\"ui-scrollbar ui-scrollbar-",
+                               suffix = "\"><div class=\"ui-scrollbar-track\"><div class=\"ui-scrollbar-thumb\"></div></div></div>";
+
+                       if ( !this.options.showScrollBars ) {
+                               return;
+                       }
+
+                       if ( this._vTracker ) {
+                               $c.append( prefix + "y" + suffix );
+                               this._$vScrollBar = $c.children(".ui-scrollbar-y");
+                       }
+                       if ( this._hTracker ) {
+                               $c.append( prefix + "x" + suffix );
+                               this._$hScrollBar = $c.children(".ui-scrollbar-x");
+                       }
+
+                       this._scrollbar_showed = false;
+               },
+
+               _add_scroll_jump: function () {
+                       var $c = this._$clip,
+                               self = this,
+                               top_btn,
+                               left_btn;
+
+                       if ( !this.options.scrollJump ) {
+                               return;
+                       }
+
+                       if ( this._vTracker ) {
+                               top_btn = $( '<div class="ui-scroll-jump-top-bg">' +
+                                               '<div data-role="button" data-inline="true" data-icon="scrolltop" data-style="box"></div></div>' );
+                               $c.append( top_btn ).trigger("create");
+
+                               top_btn.bind( "vclick", function () {
+                                       self.scrollTo( 0, 0, self.options.overshootDuration );
+                               } );
+                       }
+
+                       if ( this._hTracker ) {
+                               left_btn = $( '<div class="ui-scroll-jump-left-bg">' +
+                                               '<div data-role="button" data-inline="true" data-icon="scrollleft" data-style="box"></div></div>' );
+                               $c.append( left_btn ).trigger("create");
+
+                               left_btn.bind( "vclick", function () {
+                                       self.scrollTo( 0, 0, self.options.overshootDuration );
+                               } );
+                       }
+               },
+
+               _add_overflow_indicator: function () {
+                       if ( !this.options.overflowEnable ) {
+                               return;
+                       }
+
+                       this._overflow_top = $( '<div class="ui-overflow-indicator-top"></div>' );
+                       this._overflow_bottom = $( '<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 = false;
+               },
+
+               _set_scrollbar_size: function () {
+                       var $c = this._$clip,
+                               $v = this._$view,
+                               cw = 0,
+                               vw = 0,
+                               ch = 0,
+                               vh = 0,
+                               thumb;
+
+                       if ( !this.options.showScrollBars ) {
+                               return;
+                       }
+
+                       if ( this._hTracker ) {
+                               cw = $c.width();
+                               vw = $v.width();
+                               this._maxX = cw - vw;
+
+                               if ( this._maxX > 0 ) {
+                                       this._maxX = 0;
+                               }
+                               if ( this._$hScrollBar && vw ) {
+                                       thumb = this._$hScrollBar.find(".ui-scrollbar-thumb");
+                                       thumb.css( "width", (cw >= vw ? "0" :
+                                                       (Math.floor(cw / vw * 100) || 1) + "%") );
+                               }
+                       }
+
+                       if ( this._vTracker ) {
+                               ch = $c.height();
+                               vh = this._getViewHeight();
+                               this._maxY = ch - vh;
+
+                               if ( this._maxY > 0 ) {
+                                       this._maxY = 0;
+                               }
+                               if ( this._$vScrollBar && vh ) {
+                                       thumb = this._$vScrollBar.find(".ui-scrollbar-thumb");
+                                       thumb.css( "height", (ch >= vh ? "0" :
+                                                       (Math.floor(ch / vh * 100) || 1) + "%") );
+
+                                       this._overflowAvail = !!thumb.height();
+                               }
+                       }
+               }
+       });
+
+       $.extend( MomentumTracker.prototype, {
+               start: function ( pos, speed, duration, minPos, maxPos ) {
+                       var tstate = ( pos < minPos || pos > maxPos ) ?
+                                       tstates.snapback : tstates.scrolling,
+                               pos_temp;
+
+                       this.state = ( speed !== 0 ) ? tstate : tstates.done;
+                       this.pos = pos;
+                       this.speed = speed;
+                       this.duration = ( this.state === tstates.snapback ) ?
+                                       this.options.snapbackDuration : duration;
+                       this.minPos = minPos;
+                       this.maxPos = maxPos;
+
+                       this.fromPos = ( this.state === tstates.snapback ) ? this.pos : 0;
+                       pos_temp = ( this.pos < this.minPos ) ? this.minPos : this.maxPos;
+                       this.toPos = ( this.state === tstates.snapback ) ? pos_temp : 0;
+
+                       this.startTime = getCurrentTime();
+               },
+
+               reset: function () {
+                       this.state = tstates.done;
+                       this.pos = 0;
+                       this.speed = 0;
+                       this.minPos = 0;
+                       this.maxPos = 0;
+                       this.duration = 0;
+                       this.remained = 0;
+               },
+
+               update: function ( overshootEnable ) {
+                       var state = this.state,
+                               cur_time = getCurrentTime(),
+                               duration = this.duration,
+                               elapsed =  cur_time - this.startTime,
+                               dx,
+                               x,
+                               didOverShoot;
+
+                       if ( state === tstates.done ) {
+                               return this.pos;
+                       }
+
+                       elapsed = elapsed > duration ? duration : elapsed;
+
+                       this.remained = duration - elapsed;
+
+                       if ( state === tstates.scrolling || state === tstates.overshot ) {
+                               dx = this.speed *
+                                       ( 1 - $.easing[this.easing]( elapsed / duration,
+                                                               elapsed, 0, 1, duration ) );
+
+                               x = this.pos + dx;
+
+                               didOverShoot = ( state === tstates.scrolling ) &&
+                                       ( x < this.minPos || x > this.maxPos );
+
+                               if ( didOverShoot ) {
+                                       x = ( x < this.minPos ) ? this.minPos : this.maxPos;
+                               }
+
+                               this.pos = x;
+
+                               if ( state === tstates.overshot ) {
+                                       if ( !overshootEnable ) {
+                                               this.state = tstates.done;
+                                       }
+                                       if ( elapsed >= duration ) {
+                                               this.state = tstates.snapback;
+                                               this.fromPos = this.pos;
+                                               this.toPos = ( x < this.minPos ) ?
+                                                               this.minPos : this.maxPos;
+                                               this.duration = this.options.snapbackDuration;
+                                               this.startTime = cur_time;
+                                               elapsed = 0;
+                                       }
+                               } else if ( state === tstates.scrolling ) {
+                                       if ( didOverShoot && overshootEnable ) {
+                                               this.state = tstates.overshot;
+                                               this.speed = dx / 2;
+                                               this.duration = this.options.overshootDuration;
+                                               this.startTime = cur_time;
+                                       } else if ( elapsed >= duration ) {
+                                               this.state = tstates.done;
+                                       }
+                               }
+                       } else if ( state === tstates.snapback ) {
+                               if ( elapsed >= duration ) {
+                                       this.pos = this.toPos;
+                                       this.state = tstates.done;
+                               } else {
+                                       this.pos = this.fromPos + (( this.toPos - this.fromPos ) *
+                                               $.easing[this.easing]( elapsed / duration,
+                                                       elapsed, 0, 1, duration ));
+                               }
+                       }
+
+                       return this.pos;
+               },
+
+               done: function () {
+                       return this.state === tstates.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;
+               }
+       });
+
+       $( document ).bind( 'pagecreate create', function ( e ) {
+               var $page = $( e.target ),
+                       content_scroll = $page.find(".ui-content").jqmData("scroll");
+
+               /* content scroll */
+               if ( $.support.scrollview === undefined ) {
+                       $.support.scrollview = true;
+               }
+
+               if ( $.support.scrollview === true && content_scroll === undefined ) {
+                       content_scroll = "y";
+               }
+
+               if ( content_scroll !== "y" ) {
+                       content_scroll = "none";
+               }
+
+               $page.find(".ui-content").attr( "data-scroll", content_scroll );
+
+               $page.find(":jqmData(scroll)").not(".ui-scrollview-clip").each( function () {
+                       if ( $( this ).hasClass("ui-scrolllistview") ) {
+                               $( this ).scrolllistview();
+                       } else {
+                               var st = $( this ).jqmData("scroll"),
+                                       dir = st && ( st.search(/^[xy]/) !== -1 ) ? st : null,
+                                       content = $(this).hasClass("ui-content"),
+                                       opts;
+
+                               if ( st === "none" ) {
+                                       return;
+                               }
+
+                               opts = {
+                                       direction: dir || undefined,
+                                       overflowEnable: content,
+                                       scrollMethod: $( this ).jqmData("scroll-method") || undefined,
+                                       scrollJump: $( this ).jqmData("scroll-jump") || undefined
+                               };
+
+                               $( this ).scrollview( opts );
+                       }
+               });
+       });
+
+       $( document ).bind( 'pageshow', function ( e ) {
+               var $page = $( e.target ),
+                       scroll = $page.find(".ui-content").jqmData("scroll");
+
+               if ( scroll === "y" ) {
+                       resizePageContentHeight( e.target );
+               }
+       });
+
+}( jQuery, window, document ) );
+/*global Globalize:false, range:false, regexp:false*/
+/*
+ * jQuery Mobile Widget @VERSION
+ *
+ * This software is licensed under the MIT licence (as defined by the OSI at
+ * http://www.opensource.org/licenses/mit-license.php)
+ *
+ * ***************************************************************************
+ * Copyright (C) 2011 by Intel Corporation Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ * Authors: Salvatore Iovene <salvatore.iovene@intel.com>
+ *                     Daehyon Jung <darrenh.jung@samsung.com>
+ */
+
+/**
+ * datetimepicker is a widget that lets the user select a date and/or a 
+ * time. If you'd prefer use as auto-initialization of form elements, 
+ * use input elements with type=date/time/datetime within form tag
+ * as same as other form elements.
+ * 
+ * HTML Attributes:
+ * 
+ *     data-role: 'datetimepicker'
+ *     data-format: date format string. e.g) "MMM dd yyyy, HH:mm"
+ *     type: 'date', 'datetime', 'time'
+ *     value: pre-set value. only accepts ISO date string. e.g) "2012-05-04", "2012-05-04T01:02:03+09:00" 
+ *     data-date: any date/time string "new Date()" accepts.
+ *
+ * Options:
+ *     type: 'date', 'datetime', 'time'
+ *     format: see data-format in HTML Attributes.
+ *     value: see value in HTML Attributes.
+ *     date: preset value as JavaScript Date Object representation.
+ *
+ * APIs:
+ *     value( datestring )
+ *             : Set date/time to 'datestring'.
+ *     value()
+ *             : Get current selected date/time as W3C DTF style string.
+ *     getValue() - replaced with 'value()'
+ *             : same as value()
+ *     setValue( datestring ) - replaced with 'value(datestring)'
+ *             : same as value( datestring )
+ *     changeTypeFormat( type, format ) - deprecated
+ *             : Change Type and Format options. use datetimepicker( "option", "format" ) instead
+ *
+ * Events:
+ *     date-changed: Raised when date/time was changed.
+ *
+ * Examples:
+ *     <ul data-role="listview">
+ *             <li class="ui-li-3-2-2">
+ *                     <span class="ui-li-text-main">
+ *                             <input type="datetime" name="demo-date" id="demo-date" 
+ *                                     data-format="MMM dd yyyy hh:mm tt"/>
+ *                     </span>
+ *                     <span class="ui-li-text-sub">
+ *                             Date/Time Picker - <span id="selected-date1"><em>(select a date first)</em></span>
+ *                     </span>
+ *             </li>
+ *             <li class="ui-li-3-2-2">
+ *                     <span class="ui-li-text-main">
+ *                             <input type="date" name="demo-date2" id="demo-date2"/>
+ *                     </span>
+ *                     <span class="ui-li-text-sub">
+ *                             Date Picker  - <span id="selected-date2"><em>(select a date first)</em></span>
+ *                     </span>
+ *             </li>
+ *             <li class="ui-li-3-2-2">
+ *                     <span class="ui-li-text-main">
+ *                             <input type="time" name="demo-date3" id="demo-date3"/>
+ *                     </span>
+ *                     <span class="ui-li-text-sub">
+ *                             Time Picker - <span id="selected-date3"><em>(select a date first)</em></span>
+ *                     </span>
+ *             </li>
+ *     </ul>
+ * How to get a return value:
+ * ==========================
+ * Bind to the 'date-changed' event, e.g.:
+ *    $("#myDatetimepicker").bind("date-changed", function(e, date) {
+ *        alert("New date: " + date.toString());
+ *    });
+ */
+
+/**
+       @class DateTimePicker
+       The picker widgets show a control that you can use to enter date and time values. <br/> To add a date time picker widget to the application, use the following code:
+
+                       <li class="ui-li-dialogue ui-datetime">
+                               <div class="ui-datetime-text-main">
+                                       <input type="datetime" data-format="MMM dd yyyy hh:mm:ss" name="demo-date" id="demo-date" />
+                               </div>
+                               <div class="ui-li-text-sub">Date/Time Picker
+                                       <span id="selected-date1"><em>(select a date first)</em></span>
+                               </div>
+                       </li>
+*/
+
+
+( function ( $, window, undefined ) {
+       $.widget( "tizen.datetimepicker", $.tizen.widgetex, {
+
+               options: {
+                       type: null, // date, time, datetime applicable
+                       format: null,
+                       date: null,
+                       initSelector: "input[type='date'], input[type='datetime'], input[type='time'], :jqmData(role='datetimepicker')"
+               },
+
+               _calendar: function () {
+                       return window.Globalize.culture().calendars.standard;
+               },
+
+               _value: {
+                       attr: "data-" + ( $.mobile.ns || "" ) + "date",
+                       signal: "date-changed"
+               },
+
+               _daysInMonth: [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ],
+
+               _isLeapYear: function ( year ) {
+                       return year % 4 ? 0 : ( year % 100 ? 1 : ( year % 400 ? 0 : 1 ) );
+               },
+
+               _makeTwoDigits: function ( val ) {
+                       var ret = val.toString(10);
+                       if ( val < 10 ) {
+                               ret = "0" + ret;
+                       }
+                       return ret;
+               },
+
+               _setType: function ( type ) {
+                       //datetime, date, time
+                       switch (type) {
+                       case 'datetime':
+                       case 'date':
+                       case 'time':
+                               this.options.type = type;
+                               break;
+                       default:
+                               this.options.type = 'datetime';
+                               break;
+                       }
+
+                       this.element.attr( "data-" + ( $.mobile.ns ? $.mobile.ns + "-" : "" ) + "type", this.options.type );
+                       return this.options.type;
+               },
+
+               _setFormat: function ( format ) {
+                       if ( this.options.format != format ) {
+                               this.options.format = format;
+                       } else {
+                               return;
+                       }
+
+                       this.ui.children().remove();
+
+                       var token = this._parsePattern( format ),
+                               div = document.createElement('div'),
+                               pat,
+                               tpl,
+                               period,
+                               btn,
+                               obj = this;
+
+                       while ( token.length > 0 ) {
+                               pat = token.shift();
+                               tpl = '<span class="ui-datefield-%1" data-pat="' + pat + '">%2</span>';
+                               switch ( pat ) {
+                               case 'H': //0 1 2 3 ... 21 22 23
+                               case 'HH': //00 01 02 ... 21 22 23
+                               case 'h': //0 1 2 3 ... 11 12
+                               case 'hh': //00 01 02 ... 11 12
+                                       $(div).append( tpl.replace('%1', 'hour') );
+                                       break;
+                               case 'mm': //00 01 ... 59
+                               case 'm': //0 1 2 ... 59
+                                       if ( this.options.type == 'date' ) {
+                                               $(div).append( tpl.replace('%1', 'month') );
+                                       } else {
+                                               $(div).append( tpl.replace('%1', 'min') );
+                                       }
+                                       break;
+                               case 'ss':
+                               case 's':
+                                       $(div).append( tpl.replace('%1', 'sec') );
+                                       break;
+                               case 'd': // day of month 5
+                               case 'dd': // day of month(leading zero) 05
+                                       $(div).append( tpl.replace('%1', 'day') );
+                                       break;
+                               case 'M': // Month of year 9
+                               case 'MM': // Month of year(leading zero) 09
+                               case 'MMM':
+                               case 'MMMM':
+                                       $(div).append( tpl.replace('%1', 'month') );
+                                       break;
+                               case 'yy':      // year two digit
+                               case 'yyyy': // year four digit
+                                       $(div).append( tpl.replace('%1', 'year') );
+                                       break;
+                               case 't': //AM / PM indicator(first letter) A, P
+                                       // add button
+                               case 'tt': //AM / PM indicator AM/PM
+                                       // add button
+                                       btn = '<a href="#" class="ui-datefield-period"' +
+                                               ' data-role="button" data-inline="true">period</a>';
+                                       $(div).append( btn );
+                                       break;
+                               case 'g':
+                               case 'gg':
+                                       $(div).append( tpl.replace('%1', 'era').replace('%2', this._calendar().eras.name) );
+                                       break;
+                               case '\t':
+                                       $(div).append( tpl.replace('%1', 'tab').replace('%2', pat) );
+                                       break;
+                               default : // string or any non-clickable object
+                                       $(div).append( tpl.replace('%1', 'seperator').replace('%2', pat) );
+                                       break;
+                               }
+                       }
+
+                       this.ui.append( div );
+                       if ( this.options.date ) {
+                               this._setDate( this.options.date );
+                       }
+
+                       this.ui.find('.ui-datefield-period').buttonMarkup().bind( 'vclick', function ( e ) {
+                               obj._switchAmPm( obj );
+                       });
+
+                       this.element.attr( "data-" + ( $.mobile.ns ? $.mobile.ns + "-" : "" ) + "format", this.options.format );
+                       return this.options.format;
+               },
+
+               _setDate: function ( newdate ) {
+                       if ( typeof ( newdate ) == "string" ) {
+                               newdate = new Date( newdate );
+                       }
+
+                       var fields = $('span,a', this.ui),
+                               type,
+                               fn,
+                               $field,
+                               btn,
+                               i;
+
+                       function getMonth() {
+                               return newdate.getMonth() + 1;
+                       }
+
+                       for ( i = 0; i < fields.length; i++ ) {
+                               $field = $(fields[i]);
+                               type = $field.attr("class").match(/ui-datefield-([\w]*)/);
+                               if ( !type ) {
+                                       type = "";
+                               }
+                               switch ( type[1] ) {
+                               case 'hour':
+                                       fn = newdate.getHours;
+                                       break;
+                               case 'min':
+                                       fn = newdate.getMinutes;
+                                       break;
+                               case 'sec':
+                                       fn = newdate.getSeconds;
+                                       break;
+                               case 'year':
+                                       fn = newdate.getFullYear;
+                                       break;
+                               case 'month':
+                                       fn = getMonth;
+                                       break;
+                               case 'day':
+                                       fn = newdate.getDate;
+                                       break;
+                               case 'period':
+                                       fn = newdate.getHours() < 12 ? this._calendar().AM[0] : this._calendar().PM[0];
+                                       btn = $field.find( '.ui-btn-text' );
+                                       if ( btn.length == 0 ) {
+                                               $field.text(fn);
+                                       } else if ( btn.text() != fn ) {
+                                               btn.text( fn );
+                                       }
+                                       fn = null;
+                                       break;
+                               default:
+                                       fn = null;
+                                       break;
+                               }
+                               if ( fn ) {
+                                       this._updateField( $field, fn.call( newdate ) );
+                               }
+                       }
+
+                       this.options.date = newdate;
+
+                       this._setValue( newdate );
+
+                       this.element.attr( "data-" + ( $.mobile.ns ? $.mobile.ns + "-" : "" ) + "date", this.options.date );
+                       return this.options.date;
+               },
+
+               destroy: function () {
+                       if ( this.ui ) {
+                               this.ui.remove();
+                       }
+
+                       if ( this.element ) {
+                               this.element.show();
+                       }
+               },
+
+               value: function ( val ) {
+                       function timeStr( t, obj ) {
+                               return obj._makeTwoDigits( t.getHours() ) + ':' +
+                                       obj._makeTwoDigits( t.getMinutes() ) + ':' +
+                                       obj._makeTwoDigits( t.getSeconds() );
+                       }
+
+                       function dateStr( d, obj ) {
+                               return ( ( d.getFullYear() % 10000 ) + 10000 ).toString().substr(1) + '-' +
+                                       obj._makeTwoDigits( d.getMonth() + 1 ) + '-' +
+                                       obj._makeTwoDigits( d.getDate() );
+                       }
+
+                       var rvalue = null;
+                       if ( val ) {
+                               rvalue = this._setDate( val );
+                       } else {
+                               switch ( this.options.type ) {
+                               case 'time':
+                                       rvalue = timeStr( this.options.date, this );
+                                       break;
+                               case 'date':
+                                       rvalue = dateStr( this.options.date, this );
+                                       break;
+                               default:
+                                       rvalue = dateStr( this.options.date, this ) + 'T' + timeStr( this.options.date, this );
+                                       break;
+                               }
+                       }
+                       return rvalue;
+               },
+
+               setValue: function ( newdate ) {
+                       console.warn( "setValue was deprecated. use datetimepicker('option', 'date', value) instead." );
+                       return this.value( newdate );
+               },
+
+               /**
+                * return W3C DTF string
+                */
+               getValue: function () {
+                       console.warn("getValue() was deprecated. use datetimepicker('value') instead.");
+                       return this.value();
+               },
+
+               _updateField: function ( target, value ) {
+                       if ( !target || target.length == 0 ) {
+                               return;
+                       }
+
+                       if ( value == 0 ) {
+                               value = "0";
+                       }
+
+                       var pat = target.jqmData( 'pat' ),
+                               hour,
+                               text,
+                               self = this;
+
+                       switch ( pat ) {
+                       case 'H':
+                       case 'HH':
+                       case 'h':
+                       case 'hh':
+                               hour = value;
+                               if ( pat.charAt(0) == 'h' ) {
+                                       if ( hour > 12 ) {
+                                               hour -= 12;
+                                       } else if ( hour == 0 ) {
+                                               hour = 12;
+                                       }
+                               }
+                               hour = this._makeTwoDigits( hour );
+                               text = hour;
+                               break;
+                       case 'm':
+                       case 'M':
+                       case 'd':
+                       case 's':
+                               text = value;
+                               break;
+                       case 'mm':
+                       case 'dd':
+                       case 'MM':
+                       case 'ss':
+                               text = this._makeTwoDigits( value );
+                               break;
+                       case 'MMM':
+                               text = this._calendar().months.namesAbbr[ value - 1];
+                               break;
+                       case 'MMMM':
+                               text = this._calendar().months.names[ value - 1 ];
+                               break;
+                       case 'yy':
+                               text = this._makeTwoDigits( value % 100 );
+                               break;
+                       case 'yyyy':
+                               if ( value < 10 ) {
+                                       value = '000' + value;
+                               } else if ( value < 100 ) {
+                                       value = '00' + value;
+                               } else if ( value < 1000 ) {
+                                       value = '0' + value;
+                               }
+                               text = value;
+                               break;
+                       }
+
+                       // to avoid reflow where its value isn't out-dated
+                       if ( target.text() != text ) {
+                               if ( target.hasClass("ui-datefield-selected") ) {
+                                       target.addClass("out");
+                                       this._new_value = text;
+
+                                       target.animationComplete( function () {
+                                               target.text( self._new_value);
+                                               target.addClass("in")
+                                                       .removeClass("out");
+
+                                               target.animationComplete( function () {
+                                                       target.removeClass("in").
+                                                               removeClass("ui-datefield-selected");
+                                               });
+                                       });
+                               } else {
+                                       target.text( text );
+                               }
+                       }
+               },
+
+               _switchAmPm: function ( obj ) {
+                       if ( this._calendar().AM != null ) {
+                               var date = new Date( this.options.date ),
+                                       text,
+                                       change = 1000 * 60 * 60 * 12;
+                               if ( date.getHours() > 11 ) {
+                                       change = -change;
+                               }
+                               date.setTime( date.getTime() + change );
+                               this._setDate( date );
+                       }
+               },
+
+               _parsePattern: function ( pattern ) {
+                       var regex = /\/|\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,
+                               matches,
+                               i;
+
+                       matches = pattern.match( regex );
+
+                       for ( i = 0; i < matches.length; i++ ) {
+                               if ( matches[i].charAt(0) == "'" ) {
+                                       matches[i] = matches[i].substr( 1, matches[i].length - 2 );
+                               }
+                       }
+
+                       return matches;
+               },
+
+               changeTypeFormat: function ( type, format ) {
+                       console.warn('changeTypeFormat() was deprecated. use datetimepicker("option", "type"|"format", value) instead');
+                       if ( type ) {
+                               this._setType( type );
+                       }
+
+                       if ( format ) {
+                               this._setFormat( format );
+                       }
+               },
+
+               _create: function () {
+                       var obj = this;
+
+                       if ( this.element.is( "input" ) ) {
+                               ( function ( obj ) {
+                                       var type, value, format;
+
+                                       type = obj.element.get(0).getAttribute( "type" );
+                                       obj.options.type = type;
+
+                                       value = obj.element.get(0).getAttribute( "value" );
+                                       if ( value ) {
+                                               obj.options.date = new Date( value );
+                                       }
+                               }( 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;
+                                       break;
+                               }
+                       }
+
+                       if ( !this.options.date ) {
+                               this.options.date = new Date();
+                       }
+
+                       this.element.hide();
+                       this.ui = $('<div class="ui-datefield"></div>');
+                       $(this.element).after( this.ui );
+
+                       this._popup_open = false;
+                       this.ui.bind('vclick', function ( e ) {
+                               obj._showDataSelector( obj, this, e.target );
+                       });
+               },
+
+               _populateDataSelector: function ( field, pat ) {
+                       var values,
+                               numItems,
+                               current,
+                               data,
+                               range = window.range,
+                               local,
+                               yearlb,
+                               yearhb,
+                               day;
+
+                       switch ( field ) {
+                       case 'hour':
+                               if ( pat == 'H' || pat == 'HH' ) {
+                                       // twentyfour
+                                       values = range( 0, 23 );
+                                       data = range( 0, 23 );
+                                       current = this.options.date.getHours();
+                               } else {
+                                       values = range( 1, 12 );
+                                       current = this.options.date.getHours() - 1;//11
+                                       if ( current >= 11 ) {
+                                               current = current - 12;
+                                               data = range( 13, 23 );
+                                               data.push( 12 ); // consider 12:00 am as 00:00
+                                       } else {
+                                               data = range( 1, 11 );
+                                               data.push( 0 );
+                                       }
+                                       if ( current < 0 ) {
+                                               current = 11; // 12:00 or 00:00
+                                       }
+                               }
+                               if ( pat.length == 2 ) {
+                                       // two digit
+                                       values = values.map( this._makeTwoDigits );
+                               }
+                               numItems = values.length;
+                               break;
+                       case 'min':
+                       case 'sec':
+                               values = range( 0, 59 );
+                               if ( pat.length == 2 ) {
+                                       values = values.map( this._makeTwoDigits );
+                               }
+                               data = range( 0, 59 );
+                               current = ( field == 'min' ? this.options.date.getMinutes() : this.options.date.getSeconds() );
+                               numItems = values.length;
+                               break;
+                       case 'year':
+                               yearlb = 1900;
+                               yearhb = 2100;
+                               data = range( yearlb, yearhb );
+                               current = this.options.date.getFullYear() - yearlb;
+                               values = range( yearlb, yearhb );
+                               numItems = values.length;
+                               break;
+                       case 'month':
+                               switch ( pat.length ) {
+                               case 1:
+                                       values = range( 1, 12 );
+                                       break;
+                               case 2:
+                                       values = range( 1, 12 ).map( this._makeTwoDigits );
+                                       break;
+                               case 3:
+                                       values = this._calendar().months.namesAbbr.slice();
+                                       break;
+                               case 4:
+                                       values = this._calendar().months.names.slice();
+                                       break;
+                               }
+                               if ( values.length == 13 ) { // @TODO Lunar calendar support
+                                       if ( values[12] == "" ) { // to remove lunar calendar reserved space
+                                               values.pop();
+                                       }
+                               }
+                               data = range( 1, values.length );
+                               current = this.options.date.getMonth();
+                               numItems = values.length;
+                               break;
+                       case 'day':
+                               day = this._daysInMonth[ this.options.date.getMonth() ];
+                               if ( day == 28 ) {
+                                       day += this._isLeapYear( this.options.date.getFullYear() );
+                               }
+                               values = range( 1, day );
+                               if ( pat.length == 2 ) {
+                                       values = values.map( this._makeTwoDigits );
+                               }
+                               data = range( 1, day );
+                               current = this.options.date.getDate() - 1;
+                               numItems = day;
+                               break;
+                       }
+
+                       return {
+                               values: values,
+                               data: data,
+                               numItems: numItems,
+                               current: current
+                       };
+
+               },
+
+               _showDataSelector: function ( obj, ui, target ) {
+                       target = $(target);
+
+                       var attr = target.attr("class"),
+                               field = attr ? attr.match(/ui-datefield-([\w]*)/) : undefined,
+                               pat,
+                               data,
+                               values,
+                               numItems,
+                               current,
+                               valuesData,
+                               html,
+                               datans,
+                               $ul,
+                               $div,
+                               $ctx,
+                               $li,
+                               i,
+                               newLeft = 10,
+                               self = this;
+
+                       if ( !attr ) {
+                               return;
+                       }
+                       if ( !field ) {
+                               return;
+                       }
+                       if ( this._popup_open ) {
+                               return;
+                       }
+
+                       target.not('.ui-datefield-seperator').addClass('ui-datefield-selected');
+
+                       pat = target.jqmData('pat');
+                       data = obj._populateDataSelector.call( obj, field[1], pat );
+
+                       values = data.values;
+                       numItems = data.numItems;
+                       current = data.current;
+                       valuesData = data.data;
+
+                       if ( values ) {
+                               datans = "data-" + ($.mobile.ns ? ($.mobile.ns + '-') : "") + 'val="';
+                               for ( i = 0; i < values.length; i++ ) {
+                                       html += '<li><a class="ui-link" ' + datans + valuesData[i] + '">' + values[i] + '</a></li>';
+                               }
+
+                               $ul = $("<ul></ul>");
+                               $div = $('<div class="ui-datetimepicker-selector" data-transition="fade" data-fade="false"></div>');
+                               $div.append( $ul ).appendTo( ui );
+                               $ctx = $div.ctxpopup();
+                               $ctx.parents('.ui-popupwindow').addClass('ui-datetimepicker');
+                               $li = $(html);
+                               $( $li[current] ).addClass("current");
+                               $div.jqmData( "list", $li );
+                               $div.circularview();
+                               // cause ctxpopup forced to subtract 10
+                               if ( $( window ).width() / 2 < target.offset().left ) {
+                                       newLeft = -10;
+                               }
+                               $ctx.popupwindow( 'open',
+                                               target.offset().left + ( target.width() / 2 ) + newLeft - window.pageXOffset ,
+                                               target.offset().top + target.height() - window.pageYOffset );
+
+                               this._popup_open = true;
+
+                               $div.bind('popupafterclose', function ( e ) {
+                                       if ( obj._reflow ) {
+                                               $(window).unbind("resize", obj._reflow);
+                                               obj._reflow = null;
+                                       }
+
+                                       if ( !( target.hasClass("in") || target.hasClass("out") ) ) {
+                                               target.removeClass("ui-datefield-selected");
+                                       }
+
+                                       $div.unbind( 'popupafterclose' );
+                                       $ul.unbind( 'vclick' );
+                                       $(obj).unbind( 'update' );
+                                       $ctx.popupwindow( 'destroy' );
+                                       $div.remove();
+
+                                       self._popup_open = false;
+                               });
+
+                               $(obj).bind( 'update', function ( e, val ) {
+                                       var date = new Date( this.options.date ),
+                                               month,
+                                               date_calibration = function () {
+                                                       date.setDate( 1 );
+                                                       date.setDate( date.getDate() - 1 );
+                                               };
+
+                                       switch ( field[1] ) {
+                                       case 'min':
+                                               date.setMinutes( val );
+                                               break;
+                                       case 'hour':
+                                               date.setHours( val );
+                                               break;
+                                       case 'sec':
+                                               date.setSeconds( val );
+                                               break;
+                                       case 'year':
+                                               month = date.getMonth();
+                                               date.setFullYear( val );
+
+                                               if ( date.getMonth() != month ) {
+                                                       date_calibration();
+                                               }
+                                               break;
+                                       case 'month':
+                                               date.setMonth( val - 1 );
+
+                                               if ( date.getMonth() == val ) {
+                                                       date_calibration();
+                                               }
+                                               break;
+                                       case 'day':
+                                               date.setDate( val );
+                                               break;
+                                       }
+
+                                       obj._setDate( date );
+
+                                       $ctx.popupwindow( 'close' );
+                               });
+
+                               $ul.bind( 'click', function ( e ) {
+                                       if ( $(e.target).is('a') ) {
+                                               $ul.find(".current").removeClass("current");
+                                               $(e.target).parent().addClass('current');
+                                               var val = $(e.target).jqmData("val");
+                                               $(obj).trigger( 'update', val ); // close popup, unselect field
+                                       }
+                               });
+
+                               $div.circularview( 'centerTo', '.current', 500 );
+                               $div.bind( 'scrollend' , function ( e ) {
+                                       if ( !obj._reflow ) {
+                                               obj._reflow = function () {
+                                                       $div.circularview("reflow");
+                                               };
+                                               $(window).bind("resize", obj._reflow);
+                                       }
+                               });
+                       }
+                       return ui;
+               }
+
+       });
+
+       $(document).bind("pagecreate create", function ( e ) {
+               $($.tizen.datetimepicker.prototype.options.initSelector, e.target)
+                       .not(":jqmData(role='none'), :jqmData(role='nojs')")
+                       .datetimepicker();
+       });
+
+} ( jQuery, this ) );
+/*
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL licenses
+ * http://phpjs.org/functions/range
+ * original by: Waldo Malqui Silva
+ * version: 1107.2516
+ */
+function range( low, high, step ) {
+    // Create an array containing the range of integers or characters
+    // from low to high (inclusive)  
+    // 
+    // version: 1107.2516
+    // discuss at: http://phpjs.org/functions/range
+    // +   original by: Waldo Malqui Silva
+    // *     example 1: range ( 0, 12 );
+    // *     returns 1: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
+    // *     example 2: range( 0, 100, 10 );
+    // *     returns 2: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
+    // *     example 3: range( 'a', 'i' );
+    // *     returns 3: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
+    // *     example 4: range( 'c', 'a' );
+    // *     returns 4: ['c', 'b', 'a']
+       var matrix = [],
+               inival,
+               endval,
+               plus,
+               walker = step || 1,
+               chars = false;
+
+    if (!isNaN(low) && !isNaN(high)) {
+        inival = low;
+        endval = high;
+    } else if (isNaN(low) && isNaN(high)) {
+        chars = true;
+        inival = low.charCodeAt(0);
+        endval = high.charCodeAt(0);
+    } else {
+        inival = (isNaN(low) ? 0 : low);
+        endval = (isNaN(high) ? 0 : high);
+    }
+
+    plus = ((inival > endval) ? false : true);
+    if (plus) {
+        while (inival <= endval) {
+            matrix.push(((chars) ? String.fromCharCode(inival) : inival));
+            inival += walker;
+        }
+    } else {
+        while (inival >= endval) {
+            matrix.push(((chars) ? String.fromCharCode(inival) : inival));
+            inival -= walker;
+        }
+    }
+
+    return matrix;
+}
+
+/****************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ *     Author: Wongi Lee <wongi11.lee@samsung.com>
+*/
+
+/**
+ *     Extendable List Widget for unlimited data.
+ *     To support more then 1,000 items, special list widget developed.
+ *     Fast initialize and append some element into the DOM tree repeatedly.
+ *     DB connection and works like DB cursor.
+ *
+ * HTML Attributes:
+ *
+ *             data-role:      extendablelist
+ *             data-template : jQuery.template ID that populate into extendable list. A button : a <DIV> element with "data-role : button" should be included on data-template.
+ *             data-dbtable : DB Table name. It used as window[DB NAME]. Loaded data should be converted as window object.
+ *             data-extenditems : Number of elements to extend at once.
+ *             
+ *             ID : <UL> element that has "data-role=extendablelist" must have ID attribute.
+ *             Class : <UL> element that has "data-role=extendablelist" should have "vlLoadSuccess" class to guaranty DB loading is completed.
+ *             tmp_load_more : Template ID for "load more" message and button.
+ *
+ *
+ *APIs:
+ *             create ( {
+ *                             itemData: function ( idx ) { return json_obj; },
+ *                             numItemData: number or function () { return number; },
+ *                             cacheItemData: function ( minIdx, maxIdx ) {}
+ *                             } )
+ *                     : Create a extendable list widget. At this moment, _create method is called.
+ *                     args : A collection of options
+ *                             itemData: A function that returns JSON object for given index. Mandatory.
+ *                             numItemData: Total number of itemData. Mandatory.
+ *                             cacheItemData: Extendable list will ask itemData between minIdx and maxIdx.
+ *                                 Developers can implement this function for preparing data.
+ *                                 Optional.
+ *
+ *Examples:
+ *
+ *             <script id="tmp-3-1-1" type="text/x-jquery-tmpl">
+ *                     <li class="ui-li-3-1-1"><span class="ui-li-text-main">${NAME}</span></li>
+ *             </script>
+ *
+ *             <script id="tmp_load_more" type="text/x-jquery-tmpl"> 
+ *                     <li class="ui-li-3-1-1" style="text-align:center; margin:0 auto">
+ *                             <div data-role="button">Load ${NUM_MORE_ITEMS} more items</div>
+ *                     </li>
+ *             </script>
+ *     
+ *             <ul id = "extendable_list_main" data-role="extendablelist" data-extenditems="50" data-template="tmp-3-1-1">
+ *             </ul>
+ *
+ */
+
+/**
+       @class Extendablelist
+       In the Web environment, it is challenging to display a large amount of data in a list, such as displaying a contact list of over 1000 list items. It takes time to display the entire list in HTML and the DOM manipulation is complex.
+       The extendable list widget is used to display a list of unlimited data elements on the screen for better performance. The list is extended if you click the button at the bottom of the list to load more data elements. Extendable lists are based on the jQuery.template plugin as described in the jQuery documentation for jQuery.template plugin.<br/>
+       To add a extendable list widget to the application, use the following code:
+
+                       <script id="tmp-3-1-1" type="text/x-jquery-tmpl">
+                               <li class="ui-li-3-1-1"><span class="ui-li-text-main">${NAME}</span></li>
+                       </script>
+                       <script id="tmp_load_more" type="text/x-jquery-tmpl">
+                               <li class="ui-li-3-1-1" style="text-align:center; margin:0 auto">
+                               <div data-role="button">Load ${NUM_MORE_ITEMS} more items</div>
+                               </li>
+                       </script>
+                       <ul id="extendable_list_main" data-role="extendablelist" data-extenditems="50" data-template="tmp-3-1-1">
+                       </ul>
+*/
+/**
+       @property {String} data-role
+       Creates the extendable list view. The value must be set to extendablelist. Only the &lt;ul&gt; element, which a id attribute defined, supports this option. Also, the elLoadSuccess class attribute must be defined in the &lt;ul&gt; element to ensure that loading data from the database is complete.
+*/
+/**
+       @property {String} data-template
+       Specifies the jQuery.template element ID. The jQuery.template must be defined. The template style can use rem units to support scalability. For using the button at the bottom of the list to load more data elements, there must be list view template with the button. The attribute ID must be tmp_load_more.
+*/
+/**
+       @property {Integer} data-extenditems
+       Defines the number of data elements to be extended at a time.
+*/
+( function ( $, undefined ) {
+
+       //Keeps track of the number of lists per page UID
+       //This allows support for multiple nested list in the same page
+       //https://github.com/jquery/jquery-mobile/issues/1617
+       var listCountPerPage = {};
+
+       $.widget( "tizen.extendablelist", $.mobile.widget, {
+               options: {
+                       theme: "s",
+                       countTheme: "c",
+                       headerTheme: "b",
+                       dividerTheme: "b",
+                       splitIcon: "arrow-r",
+                       splitTheme: "b",
+                       inset: false,
+                       id:     "",                                             /* Extendable list UL elemet's ID */
+                       extenditems: 50,                        /* Number of append items */
+                       childSelector: " li",           /* To support swipe list */
+                       dbtable: "",
+                       template : "",                          /* Template for each list item */
+                       loadmore : "tmp_load_more",     /* Template for "Load more" message */
+                       scrollview: false,
+                       initSelector: ":jqmData(role='extendablelist')"
+               },
+
+               _stylerMouseUp: function () {
+                       $( this ).addClass( "ui-btn-up-s" );
+                       $( this ).removeClass( "ui-btn-down-s" );
+               },
+
+               _stylerMouseDown: function () {
+                       $( this ).addClass( "ui-btn-down-s" );
+                       $( this ).removeClass( "ui-btn-up-s" );
+               },
+
+               _stylerMouseOver: function () {
+                       $( this ).toggleClass( "ui-btn-hover-s" );
+               },
+
+               _stylerMouseOut: function () {
+                       $( this ).toggleClass( "ui-btn-hover-s" );
+                       $( this ).addClass( "ui-btn-up-s" );
+                       $( this ).removeClass( "ui-btn-down-s" );
+               },
+
+               _pushData: function ( template ) {
+                       var o = this.options,
+                               t = this,
+                               i = 0,
+                               myTemplate = $( "#" + template ),
+                               loadMoreItems = ( o.extenditems > t._numItemData - t._lastIndex ? t._numItemData - t.lastIndex : o.extenditems ),
+                               htmlData;
+
+                       for (i = 0; i < loadMoreItems; i++ ) {
+                               htmlData = myTemplate.tmpl( t._itemData( i ) );
+                               $( o.id ).append( $( htmlData ).attr( 'id', 'li_' + i ) );
+
+                               /* Add style */
+                               $( o.id + ">" + o.childSelector )
+                                       .addClass( "ui-btn-up-s" )
+                                       .bind( "mouseup", t._stylerMouseUp )
+                                       .bind( "mousedown", t._stylerMouseDown )
+                                       .bind( "mouseover", t._stylerMouseOver )
+                                       .bind( "mouseout", t._stylerMouseOut );
+
+                               t._lastIndex += 1;
+                       }
+
+                       /* After push data, re-style extendable list widget */
+                       $( o.id ).trigger( "create" );
+               },
+
+               _loadmore: function ( event ) {
+                       var t = event.data,     // <li> element
+                               o = t.options,
+                               i = 0,
+                               myTemplate = $( "#" + o.template ),
+                               loadMoreItems = ( o.extenditems > t._numItemData - t._lastIndex ? t._numItemData - t._lastIndex : o.extenditems ),
+                               htmlData,
+                               more_items_to_load,
+                               num_next_load_items;
+
+                       /* Remove load more message */
+                       $( "#load_more_message" ).remove();
+
+                       /* Append More Items */
+                       for ( i = 0; i < loadMoreItems; i++ ) {
+                               htmlData = myTemplate.tmpl( t._itemData( t._lastIndex ) );
+                               $( o.id ).append( $( htmlData ).attr( 'id', 'li_' + t._lastIndex ) );
+                               t._lastIndex += 1;
+                       }
+
+                       /* Append "Load more" message on the last of list */
+                       if ( t._numItemData > t._lastIndex ) {
+                               myTemplate = $( "#" + o.loadmore );
+                               more_items_to_load = t._numItemData - t._lastIndex;
+                               num_next_load_items = ( o.extenditems <= more_items_to_load ) ? o.extenditems : more_items_to_load;
+                               htmlData = myTemplate.tmpl( { NUM_MORE_ITEMS : num_next_load_items } );
+
+                               $( o.id ).append( $( htmlData ).attr( 'id', "load_more_message" ) );
+                       }
+
+                       $( o.id ).trigger( "create" );
+                       $( o.id ).extendablelist( "refresh" );
+               },
+
+               recreate: function ( newArray ) {
+                       this._create( {
+                               itemData: function ( idx ) { return newArray[ idx ]; },
+                               numItemData: newArray.length
+                       } );
+               },
+
+               _initList: function (args ) {
+                       var t = this,
+                               o = this.options,
+                               myTemplate,
+                               more_items_to_load,
+                               num_next_load_items,
+                               htmlData;
+
+                       /* Make Gen list by template */
+                       if ( t._lastIndex <= 0 ) {
+                               t._pushData( o.template );
+
+                               /* Append "Load more" message on the last of list */
+                               if ( t._numItemData > t._lastIndex ) {
+                                       myTemplate = $( "#" + o.loadmore );
+                                       more_items_to_load = t._numItemData - t._lastIndex;
+                                       num_next_load_items = ( o.extenditems <= more_items_to_load) ? o.extenditems : more_items_to_load;
+                                       htmlData = myTemplate.tmpl( { NUM_MORE_ITEMS : num_next_load_items } );
+
+                                       $( o.id ).append( $( htmlData ).attr( 'id', "load_more_message" ) );
+
+                                       $( "#load_more_message" ).live( "click", t, t._loadmore );
+                               } else {
+                                       /* No more items to load */
+                                       $( "#load_more_message" ).die();
+                                       $( "#load_more_message" ).remove();
+                               }
+                       }
+
+                       if ( o.childSelector == " ul" ) {
+                               $( o.id + " ul" ).swipelist();
+                       }
+
+                       $( o.id ).trigger( "create" );
+
+                       t.refresh( true );
+               },
+
+               create: function () {
+                       var o = this.options;
+
+                       /* external API for AJAX callback */
+                       this._create.apply( this, arguments );
+               },
+
+               _create: function ( args ) {
+                       var t = this,
+                               o = this.options,
+                               $el = this.element,
+                               dbtable_name;
+
+
+                       t.destroy();
+
+                       $.extend(this, {
+                               _itemData: function ( idx ) { return null; },
+                               _numItemData: 0,
+                               _cacheItemData: function ( minIdx, maxIdx ) { },
+                               _lastIndex: 0
+                       });
+
+
+                       // create listview markup
+                       t.element.addClass( function ( i, orig ) {
+                               return orig + " ui-listview ui-extendable-list-container" + ( t.options.inset ? " ui-listview-inset ui-corner-all ui-shadow " : "" );
+                       });
+
+                       o.id = "#" + $el.attr( "id" );
+
+                       if ( $el.data( "extenditems" ) ) {
+                               o.extenditems = parseInt( $el.data( "extenditems" ), 10 );
+                       }
+
+                       $( o.id ).bind( "pagehide", function (e) {
+                               $( o.id ).empty();
+                       });
+
+                       /* Scroll view */
+                       if ( $( ".ui-scrollview-clip" ).size() > 0) {
+                               o.scrollview = true;
+                       } else {
+                               o.scrollview = false;
+                       }
+
+                       if ( args ) {
+                               if ( !t._loadData( args ) ) {
+                                       return;
+                               }
+                       } else {
+                               // Legacy support: dbtable
+                               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 ( $( o.id ).hasClass( "elLoadSuccess" ) ) {
+                                       dbtable_name = $el.jqmData('dbtable');
+                                       o.dbtable = window[ dbtable_name ];
+                                       if ( !(o.dbtable) ) {
+                                               o.dbtable = { };
+                                       }
+                                       t._itemData = function ( idx ) {
+                                               return o.dbtable[ idx ];
+                                       };
+                                       t._numItemData = o.dbtable.length;
+
+                               } else {
+                                       console.warn("No elLoadSuccess class");
+                                       return;
+                               }
+                       }
+
+                       if ( $el.data( "template" ) ) {
+                               o.template = $el.data( "template" );
+
+                               /* to support swipe list, <li> or <ul> can be main node of extendable list. */
+                               if ( $el.data( "swipelist" ) == true ) {
+                                       o.childSelector = " ul";
+                               } else {
+                                       o.shildSelector = " li";
+                               }
+                       }
+                       t._initList( args );
+               },
+
+               _loadData : function ( args ) {
+                       var self = this;
+
+                       if ( args.itemData && typeof args.itemData == 'function'  ) {
+                               self._itemData = args.itemData;
+                       } else {
+                               return false;
+                       }
+                       if ( args.numItemData ) {
+                               if ( typeof args.numItemData == 'function' ) {
+                                       self._numItemData = args.numItemData( );
+                               } else if ( typeof args.numItemData == 'number' ) {
+                                       self._numItemData = args.numItemData;
+                               } else {
+                                       return false;
+                               }
+                       } else {
+                               return false;
+                       }
+                       return true;
+               },
+
+
+               destroy : function () {
+                       var o = this.options,
+                               eOTAL_ITEMS = 0,
+                               last_index = 0;
+
+                       $( o.id ).empty();
+
+                       $( "#load_more_message" ).die();
+               },
+
+               _itemApply: function ( $list, item ) {
+                       var $countli = item.find( ".ui-li-count" );
+
+                       if ( $countli.length ) {
+                               item.addClass( "ui-li-has-count" );
+                       }
+
+                       $countli.addClass( "ui-btn-up-" + ( $list.jqmData( "counttheme" ) || this.options.countTheme ) + " ui-btn-corner-all" );
+
+                       // TODO class has to be defined in markup
+                       item.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 () {
+                                       item.addClass( $( this ).is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
+                               }).end()
+                               .find( ".ui-li-aside" ).each(function () {
+                                       var $this = $( this );
+                                       $this.prependTo( $this.parent() ); //shift aside to front for css float
+                               });
+               },
+
+               _removeCorners: function ( li, which ) {
+                       var top = "ui-corner-top ui-corner-tr ui-corner-tl",
+                               bot = "ui-corner-bottom ui-corner-br ui-corner-bl";
+
+                       li = li.add( li.find( ".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb" ) );
+
+                       if ( which === "top" ) {
+                               li.removeClass( top );
+                       } else if ( which === "bottom" ) {
+                               li.removeClass( bot );
+                       } else {
+                               li.removeClass( top + " " + bot );
+                       }
+               },
+
+               _refreshCorners: function ( create ) {
+                       var $li,
+                               $visibleli,
+                               $topli,
+                               $bottomli;
+
+                       if ( this.options.inset ) {
+                               $li = this.element.children( "li" );
+                               // at create time the li are not visible yet so we need to rely on .ui-screen-hidden
+                               $visibleli = create ? $li.not( ".ui-screen-hidden" ) : $li.filter( ":visible" );
+
+                               this._removeCorners( $li );
+
+                               // Select the first visible li element
+                               $topli = $visibleli.first()
+                                       .addClass( "ui-corner-top" );
+
+                               $topli.add( $topli.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" );
+
+                               // Select the last visible li element
+                               $bottomli = $visibleli.last()
+                                       .addClass( "ui-corner-bottom" );
+
+                               $bottomli.add( $bottomli.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 ( create ) {
+                       this.parentPage = this.element.closest( ".ui-page" );
+                       this._createSubPages();
+
+                       var o = this.options,
+                               $list = this.element,
+                               self = this,
+                               dividertheme = $list.jqmData( "dividertheme" ) || o.dividerTheme,
+                               listsplittheme = $list.jqmData( "splittheme" ),
+                               listspliticon = $list.jqmData( "spliticon" ),
+                               li = $list.children( "li" ),
+                               counter = $.support.cssPseudoElement || !$.nodeName( $list[ 0 ], "ol" ) ? 0 : 1,
+                               item,
+                               itemClass,
+                               itemTheme,
+                               a,
+                               last,
+                               splittheme,
+                               countParent,
+                               icon,
+                               pos,
+                               numli;
+
+                       if ( counter ) {
+                               $list.find( ".ui-li-dec" ).remove();
+                       }
+
+                       for ( pos = 0, numli = li.length; pos < numli; pos++ ) {
+                               item = li.eq( pos );
+                               itemClass = "ui-li";
+
+                               // If we're creating the element, we update it regardless
+                               if ( create || !item.hasClass( "ui-li" ) ) {
+                                       itemTheme = item.jqmData( "theme" ) || o.theme;
+                                       a = item.children( "a" );
+
+                                       if ( a.length ) {
+                                               icon = item.jqmData( "icon" );
+
+                                               item.buttonMarkup({
+                                                       wrapperEls: "div",
+                                                       shadow: false,
+                                                       corners: false,
+                                                       iconpos: "right",
+                                                       /* icon: a.length > 1 || icon === false ? false : icon || "arrow-r",*/
+                                                       icon: false,    /* Remove unnecessary arrow icon */
+                                                       theme: itemTheme
+                                               });
+
+                                               if ( ( icon != false ) && ( a.length == 1 ) ) {
+                                                       item.addClass( "ui-li-has-arrow" );
+                                               }
+
+                                               a.first().addClass( "ui-link-inherit" );
+
+                                               if ( a.length > 1 ) {
+                                                       itemClass += " ui-li-has-alt";
+
+                                                       last = a.last();
+                                                       splittheme = listsplittheme || last.jqmData( "theme" ) || o.splitTheme;
+
+                                                       last.appendTo(item)
+                                                               .attr( "title", last.getEncodedText() )
+                                                               .addClass( "ui-li-link-alt" )
+                                                               .empty()
+                                                               .buttonMarkup({
+                                                                       shadow: false,
+                                                                       corners: false,
+                                                                       theme: itemTheme,
+                                                                       icon: false,
+                                                                       iconpos: false
+                                                               })
+                                                               .find( ".ui-btn-inner" )
+                                                               .append(
+                                                                       $( "<span />" ).buttonMarkup( {
+                                                                               shadow : true,
+                                                                               corners : true,
+                                                                               theme : splittheme,
+                                                                               iconpos : "notext",
+                                                                               icon : listspliticon || last.jqmData( "icon" ) || o.splitIcon
+                                                                       })
+                                                               );
+                                               }
+                                       } else if ( item.jqmData( "role" ) === "list-divider" ) {
+
+                                               itemClass += " ui-li-divider ui-btn ui-bar-" + dividertheme;
+                                               item.attr( "role", "heading" );
+
+                                               //reset counter when a divider heading is encountered
+                                               if ( counter ) {
+                                                       counter = 1;
+                                               }
+
+                                       } else {
+                                               itemClass += " ui-li-static ui-body-" + itemTheme;
+                                       }
+                               }
+
+                               if ( counter && itemClass.indexOf( "ui-li-divider" ) < 0 ) {
+                                       countParent = item.is( ".ui-li-static:first" ) ? item : item.find( ".ui-link-inherit" );
+
+                                       countParent.addClass( "ui-li-jsnumbering" )
+                                               .prepend( "<span class='ui-li-dec'>" + (counter++) + ". </span>" );
+                               }
+
+                               item.add( item.children( ".ui-btn-inner" ) ).addClass( itemClass );
+
+                               self._itemApply( $list, item );
+                       }
+
+                       this._refreshCorners( create );
+               },
+
+               //create a string for ID/subpage url creation
+               _idStringEscape: function ( str ) {
+                       return str.replace(/\W/g , "-");
+
+               },
+
+               _createSubPages: function () {
+                       var parentList = this.element,
+                               parentPage = parentList.closest( ".ui-page" ),
+                               parentUrl = parentPage.jqmData( "url" ),
+                               parentId = parentUrl || parentPage[ 0 ][ $.expando ],
+                               parentListId = parentList.attr( "id" ),
+                               o = this.options,
+                               dns = "data-" + $.mobile.ns,
+                               self = this,
+                               persistentFooterID = parentPage.find( ":jqmData(role='footer')" ).jqmData( "id" ),
+                               hasSubPages,
+                               newRemove;
+
+                       if ( typeof listCountPerPage[ parentId ] === "undefined" ) {
+                               listCountPerPage[ parentId ] = -1;
+                       }
+
+                       parentListId = parentListId || ++listCountPerPage[ parentId ];
+
+                       $( parentList.find( "li>ul, li>ol" ).toArray().reverse() ).each(function ( i ) {
+                               var self = this,
+                                       list = $( this ),
+                                       listId = list.attr( "id" ) || parentListId + "-" + i,
+                                       parent = list.parent(),
+                                       nodeEls,
+                                       title = nodeEls.first().getEncodedText(),//url limits to first 30 chars of text
+                                       id = ( parentUrl || "" ) + "&" + $.mobile.subPageUrlKey + "=" + listId,
+                                       theme = list.jqmData( "theme" ) || o.theme,
+                                       countTheme = list.jqmData( "counttheme" ) || parentList.jqmData( "counttheme" ) || o.countTheme,
+                                       newPage,
+                                       anchor;
+
+                               nodeEls = $( list.prevAll().toArray().reverse() );
+                               nodeEls = nodeEls.length ? nodeEls : $( "<span>" + $.trim(parent.contents()[ 0 ].nodeValue) + "</span>" );
+
+                               //define hasSubPages for use in later removal
+                               hasSubPages = true;
+
+                               newPage = list.detach()
+                                                       .wrap( "<div " + dns + "role='page' " + dns + "url='" + id + "' " + dns + "theme='" + theme + "' " + dns + "count-theme='" + countTheme + "'><div " + dns + "role='content'></div></div>" )
+                                                       .parent()
+                                                               .before( "<div " + dns + "role='header' " + dns + "theme='" + o.headerTheme + "'><div class='ui-title'>" + title + "</div></div>" )
+                                                               .after( persistentFooterID ? $( "<div " + dns + "role='footer' " + dns + "id='" + persistentFooterID + "'>" ) : "" )
+                                                               .parent()
+                                                                       .appendTo( $.mobile.pageContainer );
+
+                               newPage.page();
+
+                               anchor = parent.find('a:first');
+
+                               if ( !anchor.length ) {
+                                       anchor = $( "<a/>" ).html( nodeEls || title ).prependTo( parent.empty() );
+                               }
+
+                               anchor.attr( "href", "#" + id );
+
+                       }).extendablelist();
+
+                       // on pagehide, remove any nested pages along with the parent page, as long as they aren't active
+                       // and aren't embedded
+                       if ( hasSubPages &&
+                                       parentPage.is( ":jqmData(external-page='true')" ) &&
+                                       parentPage.data( "page" ).options.domCache === false ) {
+
+                               newRemove = function ( e, ui ) {
+                                       var nextPage = ui.nextPage, npURL;
+
+                                       if ( ui.nextPage ) {
+                                               npURL = nextPage.jqmData( "url" );
+                                               if ( npURL.indexOf( parentUrl + "&" + $.mobile.subPageUrlKey ) !== 0 ) {
+                                                       self.childPages().remove();
+                                                       parentPage.remove();
+                                               }
+                                       }
+                               };
+
+                               // unbind the original page remove and replace with our specialized version
+                               parentPage
+                                       .unbind( "pagehide.remove" )
+                                       .bind( "pagehide.remove", newRemove);
+                       }
+               },
+
+               // TODO sort out a better way to track sub pages of the extendable listview this is brittle
+               childPages: function () {
+                       var parentUrl = this.parentPage.jqmData( "url" );
+
+                       return $( ":jqmData(url^='" +  parentUrl + "&" + $.mobile.subPageUrlKey + "')" );
+               }
+       });
+
+       //auto self-init widgets
+       $( document ).bind( "pagecreate create", function ( e ) {
+               $( $.tizen.extendablelist.prototype.options.initSelector, e.target ).extendablelist();
+       });
+
+}( jQuery ));
+/*
+ * jQuery Mobile Widget @VERSION
+ *
+ * This software is licensed under the MIT licence (as defined by the OSI at
+ * http://www.opensource.org/licenses/mit-license.php)
+ *
+ * ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2011 by Intel Corporation Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ * Authors: Elliot Smith <elliot.smith@intel.com>
+ */
+
+// fastscroll is a scrollview controller, which binds
+// a scrollview to a a list of short cuts; the shortcuts are built
+// from the text on dividers in the list. Clicking on a shortcut
+// instantaneously jumps the scrollview to the selected list divider;
+// mouse movements on the shortcut column move the scrollview to the
+// list divider matching the text currently under the touch; a popup
+// with the text currently under the touch is also displayed.
+//
+// To apply, add the attribute data-fastscroll="true" to a listview
+// (a <ul> or <ol> element inside a page). Alternatively, call
+// fastscroll() on an element.
+//
+// The closest element with class ui-scrollview-clip is used as the
+// scrollview to be controlled.
+//
+// If a listview has no dividers or a single divider, the widget won't
+// display.
+
+/**
+       @class fastscroll
+       The shortcut scroll widget shows a shortcut list that is bound to its parent scroll bar and respective list view. This widget is displayed as a text pop-up representing shortcuts to different list dividers in the list view. If you select a shortcut text from the shortcut scroll, the parent list view is moved to the location representing the selected shortcut.
+
+       To add a shortcut scroll widget to the application, use the following code:
+
+               <div class="content" data-role="content" data-scroll="y">
+                       <ul id="contacts" data-role="listview" data-fastscroll="true">
+                               <li>Anton</li>
+                       </ul>
+               </div>
+
+       For the shortcut scroll widget to be visible, the parent list view must have multiple list dividers.
+*/
+
+/**
+       @property {Boolean}  data-fastscroll
+       When set to true, creates a shortcut scroll using the HTML unordered list (&lt;ul&gt;) element.
+*/
+/**
+       @method fastscroll
+       The shortcut scroll is created for the closest list view with the ui-scrollview-clip class.
+*/
+(function ( $, undefined ) {
+
+       $.widget( "tizen.fastscroll", $.mobile.widget, {
+               options: {
+                       initSelector: ":jqmData(fastscroll)"
+               },
+
+               _create: function () {
+                       var $el = this.element,
+                               self = this,
+                               $popup,
+                               page = $el.closest( ':jqmData(role="page")' ),
+                               jumpToDivider;
+
+                       this.scrollview = $el.closest( '.ui-scrollview-clip' );
+                       this.shortcutsContainer = $( '<div class="ui-fastscroll"/>' );
+                       this.shortcutsList = $( '<ul></ul>' );
+
+                       // popup for the hovering character
+                       this.scrollview.append($( '<div class="ui-fastscroll-popup"></div>' ) );
+                       $popup = this.scrollview.find( '.ui-fastscroll-popup' );
+
+                       this.shortcutsContainer.append( this.shortcutsList );
+                       this.scrollview.append( this.shortcutsContainer );
+
+                       // find the bottom of the last item in the listview
+                       this.lastListItem = $el.children().last();
+
+                       // remove scrollbars from scrollview
+                       this.scrollview.find( '.ui-scrollbar' ).hide();
+
+                       jumpToDivider = function ( divider ) {
+                               // get the vertical position of the divider (so we can scroll to it)
+                               var dividerY = $( divider ).position().top,
+                                       // find the bottom of the last list item
+                                       bottomOffset = self.lastListItem.outerHeight( true ) + self.lastListItem.position().top,
+                                       scrollviewHeight = self.scrollview.height(),
+
+                               // check that after the candidate scroll, the bottom of the
+                               // last item will still be at the bottom of the scroll view
+                               // and not some way up the page
+                                       maxScroll = bottomOffset - scrollviewHeight,
+                                       dstOffset;
+
+                               dividerY = ( dividerY > maxScroll ? maxScroll : dividerY );
+
+                               // don't apply a negative scroll, as this means the
+                               // divider should already be visible
+                               dividerY = Math.max( dividerY, 0 );
+
+                               // apply the scroll
+                               self.scrollview.scrollview( 'scrollTo', 0, -dividerY );
+
+                               dstOffset = self.scrollview.offset();
+                               $popup
+                                       .text( $( divider ).text() )
+                                       .css( { marginLeft: -($popup.width() / 2),
+                                                       marginTop: -($popup.height() / 2) } )
+                                       .show();
+                       };
+
+                       this.shortcutsList
+                       // bind mouse over so it moves the scroller to the divider
+                               .bind( 'touchstart mousedown vmousedown touchmove vmousemove vmouseover ', function ( e ) {
+                                       // Get coords relative to the element
+                                       var coords = $.mobile.tizen.targetRelativeCoordsFromEvent( e ),
+                                               shortcutsListOffset = self.shortcutsList.offset();
+
+                                       // If the element is a list item, get coordinates relative to the shortcuts list
+                                       if ( e.target.tagName.toLowerCase() === "li" ) {
+                                               coords.x += $( e.target ).offset().left - shortcutsListOffset.left;
+                                               coords.y += $( e.target ).offset().top  - shortcutsListOffset.top;
+                                       }
+
+                                       self.shortcutsList.find( 'li' ).each( function () {
+                                               var listItem = $( this );
+                                               $( listItem )
+                                                       .removeClass( "ui-fastscroll-hover" )
+                                                       .removeClass( "ui-fastscroll-hover-up" )
+                                                       .removeClass( "ui-fastscroll-hover-down" );
+                                       });
+                                       // Hit test each list item
+                                       self.shortcutsList.find( 'li' ).each( function () {
+                                               var listItem = $( this ),
+                                                       l = listItem.offset().left - shortcutsListOffset.left,
+                                                       t = listItem.offset().top  - shortcutsListOffset.top,
+                                                       r = l + Math.abs(listItem.outerWidth( true ) ),
+                                                       b = t + Math.abs(listItem.outerHeight( true ) );
+
+                                               if ( coords.x >= l && coords.x <= r && coords.y >= t && coords.y <= b ) {
+                                                       jumpToDivider( $( listItem.data( 'divider' ) ) );
+                                                       $( listItem ).addClass( "ui-fastscroll-hover" );
+                                                       if ( listItem.index() > 0 ) {
+                                                               $( listItem ).siblings().eq( listItem.index() - 1 ).addClass( "ui-fastscroll-hover-up" );
+                                                       }
+                                                       $( listItem ).siblings().eq( listItem.index() ).addClass( "ui-fastscroll-hover-down" );
+                                                       return false;
+                                               }
+                                               return true;
+                                       } );
+
+
+
+                                       e.preventDefault();
+                                       e.stopPropagation();
+                               } )
+                               // bind mouseout of the fastscroll container to remove popup
+                               .bind( 'touchend mouseup vmouseup vmouseout', function () {
+                                       $popup.hide();
+                               } );
+
+                       if ( page && !( page.is( ':visible' ) ) ) {
+                               page.bind( 'pageshow', function () { self.refresh(); } );
+                       } else {
+                               this.refresh();
+                       }
+
+                       // refresh the list when dividers are filtered out
+                       $el.bind( 'updatelayout', function () {
+                               self.refresh();
+                       } );
+               },
+
+               refresh: function () {
+                       var self = this,
+                               shortcutsTop,
+                               minClipHeight,
+                               dividers,
+                               listItems;
+
+                       this.shortcutsList.find( 'li' ).remove();
+
+                       // get all the dividers from the list and turn them into shortcuts
+                       dividers = this.element.find( '.ui-li-divider' );
+
+                       // get all the list items
+                       listItems = this.element.find('li').not('.ui-li-divider');
+
+                       // only use visible dividers
+                       dividers = dividers.filter( ':visible' );
+                       listItems = listItems.filter( ':visible' );
+
+                       if ( dividers.length < 2 ) {
+                               this.shortcutsList.hide();
+                               return;
+                       }
+
+                       this.shortcutsList.show();
+
+                       this.lastListItem = listItems.last();
+
+                       dividers.each( function ( index, divider ) {
+                               self.shortcutsList
+                                       .append( $( '<li>' + $( divider ).text() + '</li>' )
+                                               .data( 'divider', divider ) );
+                       } );
+
+                       // position the shortcut flush with the top of the first list divider
+                       shortcutsTop = dividers.first().position().top;
+                       this.shortcutsContainer.css( 'top', shortcutsTop );
+
+                       // make the scrollview clip tall enough to show the whole of the shortcutslist
+                       minClipHeight = shortcutsTop + this.shortcutsContainer.outerHeight() + 'px';
+                       this.scrollview.css( 'min-height', minClipHeight );
+               }
+       } );
+
+       $( document ).bind( "pagecreate create", function ( e ) {
+               $( $.tizen.fastscroll.prototype.options.initSelector, e.target )
+                       .not( ":jqmData(role='none'), :jqmData(role='nojs')" )
+                       .fastscroll();
+       } );
+
+} ( jQuery ) );
+/* ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ *     Author: Minkyu Kang <mk7.kang@samsung.com>
+ */
+
+/*
+ * Gallery widget
+ *
+ * HTML Attributes
+ *
+ *  data-role: set to 'gallery'
+ *  data-index: start index
+ *  data-vertical-align: set to top or middle or bottom.
+ *
+ * APIs
+ *
+ *  add(file): add the image (parameter: url of iamge)
+ *  remove(index): remove the image (parameter: index of image)
+ *  refresh(index): refresh the widget, should be called after add or remove. (parameter: start index)
+ *  empty: remove all of images from the gallery
+ *  length: get length of images
+ *  value(index): get or set current index of gallery (parameter: index of image)
+ *
+ * Events
+ *
+ *  N/A
+ *
+ * Example
+ *
+ * <div data-role="gallery" id="gallery" data-index="3" data-vertical-align="middle">
+ *     <img src="01.jpg">
+ *     <img src="02.jpg">
+ *     <img src="03.jpg">
+ *     <img src="04.jpg">
+ *     <img src="05.jpg">
+ * </div>
+ *
+ *
+ * $('#gallery-add').bind('vmouseup', function ( e ) {
+ *     $('#gallery').gallery('add', '9.jpg');
+ *     $('#gallery').gallery('add', '10.jpg');
+ *     $('#gallery').gallery('refresh');
+ * });
+ *
+ * $('#gallery-del').bind('vmouseup', function ( e ) {
+ *     $('#gallery').gallery('remove');
+ * });
+ *
+ */
+
+ /**
+       @class Gallery
+       The gallery widget shows images in a gallery on the screen. <br/><br/> To add an gallery widget to the application, use the following code:
+
+               <div data-role="gallery" id="gallery" data-vertical-align="middle" data-index="3">
+                       <img src="01.jpg">
+                       <img src="02.jpg">
+                       <img src="03.jpg">
+                       <img src="04.jpg">
+                       <img src="05.jpg">
+               </div>
+*/
+/**
+       @property {Integer} data-index
+       Defines the index number of the first image in the gallery.
+       <br/>The default value is 0.
+*/
+/**
+       @property {String} data-vertical-align
+       Defines the image alignment. The alignment options are top, middle, and bottom.
+       <br/>The default value is top.
+*/
+/**
+       @method add
+       The add method is used to add an image to the gallery. The image_file attribute defines the image file URL.
+
+               <div id="gallery" data-role="gallery" data-vertical-align="middle"></div>
+               $("#gallery").gallery('add', [image_file]);
+*/
+/**
+       @method remove
+       The remove method is used to delete an image from the gallery. The image_index attribute defines the index of the image to be deleted. If not set removes current image.
+
+               <div id="gallery" data-role="gallery" data-vertical-align="middle"></div>
+               $("#gallery").gallery('remove', [image_index]);
+*/
+/**
+       @method refresh
+       The refresh method is used to refresh the gallery. This method must be called after adding images to the gallery.
+
+               <div id="gallery" data-role="gallery" data-vertical-align="middle"></div>
+               $("#gallery").gallery('refresh');
+*/
+/**
+       @method empty
+       The empty method is used to remove all of images from the gallery.
+
+               <div id="gallery" data-role="gallery" data-vertical-align="middle"></div>
+               $("#gallery").gallery('empty');
+*/
+/**
+       @method length
+       The length method is used to get length of images.
+
+               <div id="gallery" data-role="gallery" data-vertical-align="middle"></div>
+               length = $("#gallery").gallery('length');
+*/
+/**
+       @method value
+       The value method is used to get or set current index of gallery. The image_index attribute defines the index of the image to be set. If not get current index.
+
+               <div id="gallery" data-role="gallery" data-vertical-align="middle"></div>
+               value = $("#gallery").gallery('value');
+               $("#gallery").gallery('value', [image_index]);
+*/
+(function ( $, window, undefined ) {
+       $.widget( "tizen.gallery", $.mobile.widget, {
+               options: {
+                       flicking: false,
+                       duration: 500
+               },
+
+               dragging: false,
+               moving: false,
+               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,
+
+               _resize: function ( index ) {
+                       var img = this.images[index],
+                               width = this.images[index].width(),
+                               height = this.images[index].height(),
+                               margin = 0,
+                               ratio,
+                               img_max_width = this.max_width - margin,
+                               img_max_height = this.max_height - margin;
+
+                       ratio = height / width;
+
+                       if ( width > img_max_width ) {
+                               img.width( img_max_width );
+                               img.height( img_max_width * ratio );
+                       }
+
+                       height = img.height();
+
+                       if ( height > img_max_height ) {
+                               img.height( img_max_height );
+                               img.width( img_max_height / ratio );
+                       }
+               },
+
+               _align: function ( index, obj ) {
+                       var img = this.images[index],
+                               img_top = 0;
+
+                       if ( !obj ) {
+                               return;
+                       }
+                       if ( !obj.length ) {
+                               return;
+                       }
+
+                       if ( this.align_type == "middle" ) {
+                               img_top = ( this.max_height - img.height() ) / 2;
+                       } else if ( this.align_type == "bottom" ) {
+                               img_top = this.max_height - img.height();
+                       } else {
+                               img_top = 0;
+                       }
+
+                       obj.css( 'top', img_top + 'px' );
+               },
+
+               _attach: function ( index, obj ) {
+                       var self = this,
+                               processing = function () {
+                                       self._resize( index );
+                                       self._align( index, obj );
+                               },
+                               loading = function () {
+                                       if ( self.images[index] === undefined ) {
+                                               return;
+                                       }
+
+                                       if ( !self.images[index].height() ) {
+                                               setTimeout( loading, 10 );
+                                               return;
+                                       }
+
+                                       processing();
+                               };
+
+                       if ( !obj ) {
+                               return;
+                       }
+                       if ( !obj.length ) {
+                               return;
+                       }
+                       if ( index < 0 ) {
+                               return;
+                       }
+                       if ( !this.images.length ) {
+                               return;
+                       }
+                       if ( index >= this.images.length ) {
+                               return;
+                       }
+
+                       obj.css( "display", "block" );
+                       obj.append( this.images[index] );
+
+                       loading();
+               },
+
+               _detach: function ( index, obj ) {
+                       if ( !obj ) {
+                               return;
+                       }
+                       if ( !obj.length ) {
+                               return;
+                       }
+                       if ( index < 0 ) {
+                               return;
+                       }
+                       if ( index >= this.images.length ) {
+                               return;
+                       }
+
+                       obj.css( "display", "none" );
+                       this.images[index].removeAttr("style");
+                       this.images[index].detach();
+               },
+
+               _detach_all: function () {
+                       var i;
+
+                       for ( i = 0; i < this.images.length; i++ ) {
+                               this.images[i].detach();
+                       }
+               },
+
+               _drag: function ( _x ) {
+                       var delta,
+                               coord_x;
+
+                       if ( !this.dragging ) {
+                               return;
+                       }
+
+                       if ( this.options.flicking === false ) {
+                               delta = this.org_x - _x;
+
+                               // first image
+                               if ( delta < 0 && !this.prev_img.length ) {
+                                       return;
+                               }
+                               // last image
+                               if ( delta > 0 && !this.next_img.length ) {
+                                       return;
+                               }
+                       }
+
+                       coord_x = _x - this.org_x;
+
+                       this.cur_img.css( 'left', coord_x + 'px' );
+                       if ( this.next_img.length ) {
+                               this.next_img.css( 'left', coord_x + this.window_width + 'px' );
+                       }
+                       if ( this.prev_img.length ) {
+                               this.prev_img.css( 'left', coord_x - this.window_width + 'px' );
+                       }
+               },
+
+               _move: function ( _x ) {
+                       var delta = this.org_x - _x,
+                               flip = 0,
+                               drag_time,
+                               sec,
+                               self;
+
+                       if ( delta == 0 ) {
+                               return;
+                       }
+
+                       if ( delta > 0 ) {
+                               flip = delta < ( this.max_width * 0.45 ) ? 0 : 1;
+                       } else {
+                               flip = -delta < ( this.max_width * 0.45 ) ? 0 : 1;
+                       }
+
+                       if ( !flip ) {
+                               drag_time = Date.now() - this.org_time;
+
+                               if ( Math.abs( delta ) / drag_time > 1 ) {
+                                       flip = 1;
+                               }
+                       }
+
+                       if ( flip ) {
+                               if ( delta > 0 && this.next_img.length ) {
+                                       /* next */
+                                       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++;
+
+                                       if ( this.next_img.length ) {
+                                               this.next_img.css( 'left', this.window_width + 'px' );
+                                               this._attach( this.index + 1, this.next_img );
+                                       }
+
+                                       this.direction = 1;
+
+                               } else if ( delta < 0 && this.prev_img.length ) {
+                                       /* prev */
+                                       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--;
+
+                                       if ( this.prev_img.length ) {
+                                               this.prev_img.css( 'left', -this.window_width + 'px' );
+                                               this._attach( this.index - 1, this.prev_img );
+                                       }
+
+                                       this.direction = -1;
+                               }
+                       }
+
+                       sec = this.options.duration;
+                       self = this;
+
+                       this.moving = true;
+
+                       setTimeout( function () {
+                               self.moving = false;
+                       }, sec - 50 );
+
+                       this.cur_img.animate( { left: 0 }, sec );
+                       if ( this.next_img.length ) {
+                               this.next_img.animate( { left: this.window_width }, sec );
+                       }
+                       if ( this.prev_img.length ) {
+                               this.prev_img.animate( { left: -this.window_width }, sec );
+                       }
+               },
+
+               _add_event: function () {
+                       var self = this,
+                               date;
+
+                       this.container.bind( 'vmousemove', function ( e ) {
+                               e.preventDefault();
+
+                               if ( self.moving ) {
+                                       return;
+                               }
+                               if ( !self.dragging ) {
+                                       return;
+                               }
+
+                               self._drag( e.pageX );
+                       } );
+
+                       this.container.bind( 'vmousedown', function ( e ) {
+                               e.preventDefault();
+
+                               if ( self.moving ) {
+                                       return;
+                               }
+
+                               self.dragging = true;
+
+                               self.org_x = e.pageX;
+
+                               self.org_time = Date.now();
+                       } );
+
+                       this.container.bind( 'vmouseup', function ( e ) {
+                               if ( self.moving ) {
+                                       return;
+                               }
+
+                               self.dragging = false;
+
+                               self._move( e.pageX );
+                       } );
+
+                       this.container.bind( 'vmouseout', function ( e ) {
+                               if ( self.moving ) {
+                                       return;
+                               }
+                               if ( !self.dragging ) {
+                                       return;
+                               }
+
+                               if ( ( e.pageX < 20 ) ||
+                                               ( e.pageX > ( self.max_width - 20 ) ) ) {
+                                       self._move( e.pageX );
+                                       self.dragging = false;
+                               }
+                       } );
+               },
+
+               _del_event: function () {
+                       this.container.unbind( 'vmousemove' );
+                       this.container.unbind( 'vmousedown' );
+                       this.container.unbind( 'vmouseup' );
+                       this.container.unbind( 'vmouseout' );
+               },
+
+               _show: function () {
+                       /* resizing */
+                       this.window_width = $( window ).width();
+                       this.max_width = this._get_width();
+                       this.max_height = this._get_height();
+                       this.container.css( 'height', this.max_height );
+
+                       this.cur_img = $( '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 );
+
+                       if ( this.prev_img.length ) {
+                               this.prev_img.css( 'left', -this.window_width + 'px' );
+                       }
+
+                       this.cur_img.css( 'left', '0px' );
+
+                       if ( this.next_img.length ) {
+                               this.next_img.css( 'left', 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 $( this.element ).width();
+               },
+
+               _get_height: function () {
+                       var $page = $( this.element ).parentsUntil( 'ui-page' ),
+                               $content = $page.children( '.ui-content' ),
+                               header_h = $page.children( '.ui-header' ).outerHeight() || 0,
+                               footer_h = $page.children( '.ui-footer' ).outerHeight() || 0,
+                               padding = parseFloat( $content.css( 'padding-top' ) )
+                                       + parseFloat( $content.css( 'padding-bottom' ) ),
+                               content_h = $( window ).height() - header_h - footer_h - padding;
+
+                       return content_h;
+               },
+
+               _create: function () {
+                       var temp_img,
+                               self = this,
+                               index,
+                               i = 0;
+
+                       $( this.element ).wrapInner( '<div class="ui-gallery"></div>' );
+                       $( this.element ).find( 'img' ).wrap( '<div class="ui-gallery-bg"></div>' );
+
+                       this.container = $( this.element ).find('.ui-gallery');
+
+                       temp_img = $( 'div' ).find( '.ui-gallery-bg:first' );
+
+                       while ( temp_img.length ) {
+                               this.images[i] = temp_img.find( 'img' );
+                               temp_img = temp_img.next();
+                               i++;
+                       }
+
+                       this._detach_all();
+
+                       index = parseInt( $( this.element ).jqmData( 'index' ), 10 );
+                       if ( !index ) {
+                               index = 0;
+                       }
+                       if ( index < 0 ) {
+                               index = 0;
+                       }
+                       if ( index >= this.images.length ) {
+                               index = this.images.length - 1;
+                       }
+
+                       this.index = index;
+
+                       this.align_type = $( this.element ).jqmData( 'vertical-align' );
+
+                       $( window ).bind( 'resize', function () {
+                               self.refresh();
+                       });
+               },
+
+               _update: function () {
+                       var image_file,
+                               bg_html,
+                               temp_img;
+
+                       while ( this.images_hold.length ) {
+                               image_file = this.images_hold.shift();
+
+                               bg_html = $( '<div class="ui-gallery-bg"></div>' );
+                               temp_img = $( '<img src="' + image_file + '"></div>' );
+
+                               bg_html.append( temp_img );
+                               this.container.append( bg_html );
+                               this.images.push( temp_img );
+                       }
+
+                       this._detach_all();
+               },
+
+               refresh: function ( start_index ) {
+                       this._update();
+
+                       this._hide();
+
+                       if ( start_index === undefined ) {
+                               start_index = this.index;
+                       }
+                       if ( start_index < 0 ) {
+                               start_index = 0;
+                       }
+                       if ( start_index >= this.images.length ) {
+                               start_index = this.images.length - 1;
+                       }
+
+                       this.index = start_index;
+
+                       this._show();
+
+                       return this.index;
+               },
+
+               add: function ( file ) {
+                       this.images_hold.push( file );
+               },
+
+               remove: function ( index ) {
+                       var temp_img;
+
+                       if ( index === undefined ) {
+                               index = this.index;
+                       }
+
+                       if ( index < 0 || index >= this.images.length ) {
+                               return;
+                       }
+
+                       if ( index == this.index ) {
+                               temp_img = this.cur_img;
+
+                               if ( this.index == 0 ) {
+                                       this.direction = 1;
+                               } else if ( this.index == this.images.length - 1 ) {
+                                       this.direction = -1;
+                               }
+
+                               if ( this.direction < 0 ) {
+                                       this.cur_img = this.prev_img;
+                                       this.prev_img = this.prev_img.prev();
+                                       if ( this.prev_img.length ) {
+                                               this.prev_img.css( 'left', -this.window_width );
+                                               this._attach( index - 2, this.prev_img );
+                                       }
+                                       this.index--;
+                               } else {
+                                       this.cur_img = this.next_img;
+                                       this.next_img = this.next_img.next();
+                                       if ( this.next_img.length ) {
+                                               this.next_img.css( 'left', this.window_width );
+                                               this._attach( index + 2, this.next_img );
+                                       }
+                               }
+
+                               this.cur_img.animate( { left: 0 }, this.options.duration );
+
+                       } else if ( index == this.index - 1 ) {
+                               temp_img = this.prev_img;
+                               this.prev_img = this.prev_img.prev();
+                               if ( this.prev_img.length ) {
+                                       this.prev_img.css( 'left', -this.window_width );
+                                       this._attach( index - 1, this.prev_img );
+                               }
+                               this.index--;
+
+                       } else if ( index == this.index + 1 ) {
+                               temp_img = this.next_img;
+                               this.next_img = this.next_img.next();
+                               if ( this.next_img.length ) {
+                                       this.next_img.css( 'left', this.window_width );
+                                       this._attach( index + 1, this.next_img );
+                               }
+
+                       } else {
+                               temp_img = $( 'div' ).find( '.ui-gallery-bg:eq(' + index + ')' );
+                       }
+
+                       this.images.splice( index, 1 );
+                       temp_img.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 ( index ) {
+                       if ( index === undefined ) {
+                               return this.index;
+                       }
+
+                       this.refresh( index );
+               }
+       }); /* End of widget */
+
+       // auto self-init widgets
+       $( document ).bind( "pagecreate create", function ( e ) {
+               $( e.target ).find( ":jqmData(role='gallery')" ).gallery();
+       });
+
+       $( document ).bind( "pageshow", function ( e ) {
+               $( e.target ).find( ":jqmData(role='gallery')" ).gallery( 'show' );
+       });
+
+       $( document ).bind( "pagebeforehide", function ( e ) {
+               $( e.target ).find( ":jqmData(role='gallery')" ).gallery( 'hide' );
+       } );
+
+}( jQuery, this ) );
+/* ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ * Authors: Wonseop Kim ( wonseop.kim@samsung.com )
+*/
+
+/**
+ * "Handler" is a widget helping a user to scroll a window or panel.
+ * It is different from the scrollview feature in that the handler has a fixed size
+ * and disappears when a scroll size is smaller than a parent window's size.
+ * If the handler widget is activated, a scroll bar on the screen will be deactivated.
+ * The handler widget supports scrolling up and down and indicates the position of the scrolled window.
+ *
+ * HTML Attributes:
+ *
+ *             data-handler : This attribute is indicating that whether enable.
+ *                                             If you want to use, you will set 'true'.
+ *             data-handler-theme : Set the widget theme ( optional )
+ *
+ * APIs:
+ *
+ *             enableHandler ( boolean )
+ *                     : Get or set the use of handler widget.
+ *                     If the value is "true", it will be run handler widget.
+ *                     If the value is "false", it will be not run handler widget.
+ *                     If no value is specified, will act as a getter.
+ *
+ * Events:
+ *
+ * Examples:
+ *
+ *             <div data-role="content" data-scroll="y" data-handler="true">
+ *                     <ul data-role="listview">
+ *                             <li data-role="list-divider">A</li>
+ *                             <li><a href="#">Adam Kinkaid</a></li>
+ *                                     ...
+ *                     </ul>
+ *             </div>
+ */
+
+/**
+       @class handler
+       The handler widget enables the user to vertically scroll through a page or panel using a fixed-size handle. The widget indicates the position of the scrolled window, and only appears on the screen if the parent page or panel's scroll size is larger than the screen size. <br/> To add a handler widget to the application, use the following code:
+
+               <div data-role="content" data-scroll="y" data-handler="true">
+                       <ul data-role="listview">
+                               <li data-role="list-divider">A</li>
+                               <li><a href="#">Adam Kinkaid</a></li>
+                                       ...
+                       </ul>
+               </div>
+       
+       You can use the enableHandler method with the handler widget to get (if no value is defined) or set the handler usage status. If the [enable] value is true, the handler is enabled; otherwise the handler is not used.
+
+               $("#.selector").scrollview("enableHandler", [enable]);
+*/
+/**
+       @property {Boolean} data-handler
+       Enables the handler widget. The value must be set to true.
+*/
+/**
+       @property {String} data-handler-theme
+       Sets the handler widget theme.
+*/
+( function ( $, document, undefined ) {
+       // The options of handler in scrollview
+       $.tizen.scrollview.prototype.options.handler = false;
+       $.tizen.scrollview.prototype.options.handlerTheme = "s";
+
+       var originSetOption = $.tizen.scrollview.prototype._setOption,
+               createHandler = function ( target ) {
+                       var $view = target,
+                               prefix = "<div class=\"ui-handler ui-handler-direction-",
+                               suffix = "\"><div class=\"ui-handler-track\"><div class=\"ui-handler-thumb\"></div></div></div>",
+                               scrollview = $view.data( "scrollview" ),
+                               options = scrollview.options,
+                               direction = options.direction,
+                               parentTheme = $.mobile.getInheritedTheme( scrollview, "s" ),
+                               theme = options.theme || parentTheme,
+                               isHorizontal = ( scrollview.options.direction === "x" ),
+                               _$view = scrollview._$view,
+                               _$clip = scrollview._$clip,
+                               scrollbar = $view.find( ".ui-scrollbar" ),
+                               handler = null,
+                               handlerThumb = null,
+                               viewLength = 0,
+                               clipLength = 0,
+                               handlerHeight = 0,
+                               handlerMargin = 0,
+                               trackLength = 0,
+                               moveTimer,
+                               isTouchable = $.support.touch,
+                               dragStartEvt = ( isTouchable ? "touchstart" : "mousedown" ) + ".handler",
+                               dragMoveEvt = ( isTouchable ? "touchmove" : "mousemove" ) + ".handler",
+                               dragStopEvt = ( isTouchable ? "touchend" : "mouseup" ) + ".handler",
+                               dragLeaveEvt = ( isTouchable ? " touchleave" : " mouseleave" ) + ".handler",
+                               calculateLength = function () {
+                                       clipLength = ( isHorizontal ? _$clip.width() : _$clip.height() );
+                                       viewLength = ( isHorizontal ? _$view.width() : _$view.height() ) - clipLength;
+                                       trackLength = clipLength - handlerHeight - handlerMargin * 2;
+                               },
+                               setHanderPostion = function ( scrollPos ) {
+                                       var handlerPos = Math.round( ( isHorizontal ? scrollPos.x : scrollPos.y ) / viewLength * trackLength );
+                                       handlerThumb[0].style[ ( isHorizontal ? "left" : "top" ) ] = handlerPos + "px";
+                               },
+                               stopHandlerScroll = function () {
+                                       $( document ).unbind( ".handler" );
+                                       $view.moveData = null;
+                                       _$view.trigger( "scrollstop" );
+                               };
+
+                       if ( $view.find( ".ui-handler-thumb" ).length !== 0 || typeof direction !== "string" ) {
+                               return;
+                       }
+
+                       handler = $( [ prefix, direction, suffix ].join( "" ) ).appendTo( $view.addClass( " ui-handler-" + theme ) );
+                       handlerThumb = $view.find( ".ui-handler-thumb" ).hide();
+                       handlerHeight = ( isHorizontal ? handlerThumb.width() : handlerThumb.height() );
+                       handlerMargin = ( isHorizontal ? parseInt( handler.css( "right" ), 10 ) : parseInt( handler.css( "bottom" ), 10 ) );
+
+                       $.extend( $view, {
+                               moveData : null
+                       });
+
+                       // handler drag
+                       handlerThumb.bind( dragStartEvt, {
+                               e : handlerThumb[0]
+                       }, function ( event ) {
+                               scrollview._stopMScroll();
+
+                               var target = event.data.e,
+                                       t = ( isTouchable ? event.originalEvent.targetTouches[0] : event );
+
+                               target.style.opacity = 1.0;
+
+                               $view.moveData = {
+                                       target : target,
+                                       X : parseInt( target.style.left, 10 ) || 0,
+                                       Y : parseInt( target.style.top, 10 ) || 0,
+                                       pX : t.pageX,
+                                       pY : t.pageY
+                               };
+                               calculateLength();
+
+                               _$view.trigger( "scrollstart" );
+
+                               if ( !isTouchable ) {
+                                       event.preventDefault();
+                               }
+
+                               $( document ).bind( dragMoveEvt, function ( event ) {
+                                       var moveData = $view.moveData,
+                                               target = moveData.target,
+                                               handlePos = 0,
+                                               scrollPos = 0,
+                                               t = ( isTouchable ? event.originalEvent.targetTouches[0] : event );
+
+                                       handlePos = ( isHorizontal ? moveData.X + t.pageX - moveData.pX : moveData.Y + t.pageY - moveData.pY );
+
+                                       if ( handlePos < 0 ) {
+                                               handlePos = 0;
+                                       }
+
+                                       if ( handlePos > trackLength ) {
+                                               handlePos = trackLength;
+                                       }
+                                       scrollPos = - Math.round( handlePos / trackLength * viewLength );
+
+                                       if ( isHorizontal ) {
+                                               scrollview._setScrollPosition( scrollPos, 0 );
+                                               target.style.left = handlePos + "px";
+                                       } else {
+                                               scrollview._setScrollPosition( 0, scrollPos );
+                                               target.style.top = handlePos + "px";
+                                       }
+
+                                       event.preventDefault();
+                               }).bind( dragStopEvt + dragLeaveEvt, function ( event ) {
+                                       stopHandlerScroll();
+                               });
+                       });
+
+                       _$view.bind( dragStopEvt, function ( event ) {
+                               stopHandlerScroll();
+                       });
+
+                       $view.bind( "scrollstart", function ( event ) {
+                               if ( !scrollview.enableHandler() ) {
+                                       return;
+                               }
+
+                               calculateLength();
+
+                               if ( viewLength < 0 || clipLength < handlerHeight ) {
+                                       if ( scrollbar.is( ":hidden" ) ) {
+                                               scrollbar.show();
+                                       }
+                                       return;
+                               }
+
+                               if ( scrollbar.is( ":visible" ) ) {
+                                       scrollbar.hide();
+                               }
+
+                               if ( moveTimer ) {
+                                       clearInterval( moveTimer );
+                                       moveTimer = undefined;
+                               }
+
+                               handler.addClass( "ui-handler-visible" );
+                               handlerThumb.stop( true, true )
+                                                       .fadeIn();
+                       }).bind( "scrollupdate", function ( event, data ) {
+                               if ( !scrollview.enableHandler() || viewLength < 0 || clipLength < handlerHeight ) {
+                                       return;
+                               }
+
+                               setHanderPostion( scrollview.getScrollPosition() );
+                       }).bind( "scrollstop", function ( event ) {
+                               if ( !scrollview.enableHandler() || viewLength < 0 || clipLength < handlerHeight ) {
+                                       return;
+                               }
+
+                               moveTimer = setInterval( function () {
+                                       setHanderPostion( scrollview.getScrollPosition() );
+                                       if ( !scrollview._gesture_timer ) {
+                                               clearInterval( moveTimer );
+                                               moveTimer = undefined;
+                                       }
+                               }, 10 );
+
+                               if ( scrollview._handlerTimer ) {
+                                       clearTimeout( scrollview._handlerTimer );
+                                       scrollview._handlerTimer = 0;
+                               }
+                               scrollview._handlerTimer = setTimeout( function () {
+                                       if ( scrollview._timerID === 0 && $view.moveData === null ) {
+                                               handlerThumb.stop( true, true )
+                                                                       .css( "opacity", 1.0 )
+                                                                       .fadeOut( function () {
+                                                                               handler.removeClass( "ui-handler-visible" );
+                                                                       });
+                                               scrollview._handlerTimer = 0;
+                                       }
+                               }, 1000 );
+                       }).bind( "mousewheel", function ( event ) {
+                               handler.removeClass( "ui-handler-visible" );
+                               setHanderPostion( scrollview.getScrollPosition() );
+                       });
+               };
+
+       $.extend( $.tizen.scrollview.prototype, {
+               enableHandler: function ( enabled ) {
+                       if ( typeof enabled === 'undefined' ) {
+                               return this.options.handler;
+                       }
+
+                       this.options.handler = !!enabled;
+
+                       var $view = this.element;
+                       if ( this.options.handler ) {
+                               if ( $view.find( ".ui-handler" ).length === 0 ) {
+                                       createHandler( $view );
+                               }
+
+                               $view.find( ".ui-scrollbar" ).hide();
+                               $view.find( ".ui-handler" ).show();
+                       } else {
+                               $view.find( ".ui-handler" ).removeClass( "ui-handler-visible" ).hide();
+                               $view.find( ".ui-scrollbar" ).show();
+                       }
+               },
+
+               _setHandlerTheme: function ( handlerTheme ) {
+                       if ( !handlerTheme ) {
+                               return;
+                       }
+
+                       var oldClass = "ui-handler-" + this.options.handlerTheme,
+                               newClass = "ui-handler-" + handlerTheme;
+
+                       this.element.removeClass( oldClass ).addClass( newClass );
+                       this.options.handlerTheme = handlerTheme;
+               },
+
+               _setOption: function ( key, value ) {
+                       switch ( key ) {
+                       case "handler":
+                               this.enableHandler( value );
+                               break;
+                       case "handlerTheme":
+                               this._setHandlerTheme( value );
+                               break;
+                       default:
+                               originSetOption.call( this, key, value );
+                       }
+               },
+
+               _handlerTimer : 0
+       });
+
+       $( document ).delegate( ":jqmData(scroll)", "scrollviewcreate", function () {
+               var widget = $( this );
+               if ( widget.attr( "data-" + $.mobile.ns + "scroll" ) === "none"
+                               || widget.attr( "data-" + $.mobile.ns + "handler" ) !== "true" ) {
+                       return;
+               }
+               widget.scrollview( "enableHandler", "true" );
+       });
+} ( jQuery, document ) );
+/* ***************************************************************************
+* style : normal, check
+* option :
+*    - folded : decide to show divider press effect or not
+*    - line : decide to draw divider line or not
+*/
+/**
+       @class ListDivider
+       The list divider widget is used as a list separator for grouping lists. List dividers can be used in Tizen as described in the jQueryMobile documentation for list dividers.<br/>
+       To add a list divider widget to the application, use the following code:
+
+               <li data-role="list-divider" data-style="check">
+               <form><input type="checkbox" name="c2line-check1" /></form></li>
+
+       The list divider can define callbacks for events as described in the jQueryMobile documentation for list events. <br/> You can use methods with the list divider as described in the jQueryMobile documentation for list methods.
+
+       @since tizen2.0 
+*/
+/**
+       @property {String} data-style
+       Sets the style of the list divider. The style options are dialogue, check, expandable, and checkexpandable.
+*/
+
+(function ( $, undefined ) {
+       $.widget( "tizen.listdivider", $.mobile.widget, {
+               options: {
+                       initSelector: ":jqmData(role='list-divider')",
+                       folded : false,
+                       listDividerLine : true,
+               },
+
+               _create: function () {
+
+                       var $listdivider = this.element,
+                               openStatus = true,
+                               expandSrc,
+                               listDividerLine = true,
+                               style = $listdivider.attr( "data-style" );
+
+                       if ( $listdivider.data("line") === false ) {
+                               this.options.listDividerLine = false;
+                       }
+
+                       if ( $listdivider.data("folded") === true ) {
+                               this.options.folded = true;
+                       }
+
+                       if ( style == undefined || style === "normal" || style === "check" ) {
+                               if ( this.options.folded ) {
+                                       $listdivider.buttonMarkup();
+                               } else {
+                                       $listdivider.wrapInner("<span class='ui-btn-text'></span>");
+                               }
+
+                               if ( this.options.listDividerLine ) {
+                                       expandSrc = "<span class='ui-divider-normal-line'></span>";
+                                       if ( this.options.folded ) {
+                                               $( expandSrc ).appendTo( $listdivider.children( ".ui-btn-inner" ) );
+                                       } else {
+                                               $( expandSrc ).appendTo( $listdivider);
+                                       }
+                               }
+                       }
+
+                       $listdivider.bind( "vclick", function ( event, ui ) {
+                       /* need to implement expand/collapse divider */
+                       });
+               },
+       });
+
+       //auto self-init widgets
+       $( document ).bind( "pagecreate create", function ( e ) {
+               $( $.tizen.listdivider.prototype.options.initSelector, e.target ).listdivider();
+       });
+}( jQuery ) );
+/* ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ * Authors: Yonghwi Park <yonghwi0324.park@samsung.com>
+ *              Wonseop Kim <wonseop.kim@samsung.com>
+*/
+
+/**
+ *
+ * MultiMediaView is a widget that lets the user view and handle multimedia contents.
+ * Video and audio elements are coded as standard HTML elements and enhanced by the 
+ * MultiMediaview to make them attractive and usable on a mobile device.
+ *
+ * HTML Attributes:
+ *                     data-theme : Set a theme of widget.
+ *                             If this value is not defined, widget will use parent`s theme. (optional)
+ *                     data-controls : If this value is 'true', widget will use belonging controller.
+ *                             If this value is 'false', widget will use browser`s controller.
+ *                             Default value is 'true'.
+ *                     data-full-screen : Set a status that full-screen when inital start.
+ *                             Default value is 'false'.
+ *
+ * APIs:
+ *                     width( [number] )
+ *                                     : Get or set the width of widget.
+ *                                     The first argument is the width of widget.
+ *                                     If no first argument is specified, will act as a getter.
+ *                     height( [number] )
+ *                                     : Get or set the height of widget.
+ *                                     The first argument is the height of widget.
+ *                                     If no first argument is specified, will act as a getter.
+ *                     fullScreen( [boolean] )
+ *                                     : Get or Set the status of full-screen.
+ *                                     If no first argument is specified, will act as a getter.
+ *
+ * Events:
+ *
+ *                     create :  triggered when a multimediaview is created.
+ *
+ * Examples:
+ *
+ *                     VIDEO :
+ *                             <video data-controls="true" style="width:100%;">
+ *                                     <source src="media/oceans-clip.mp4" type="video/mp4" />
+ *                                     Your browser does not support the video tag.
+ *                             </video>
+ *
+ *                     AUDIO :
+ *                             <audio data-controls="true" style="width:100%;">
+ *                                     <source src="media/Over the horizon.mp3" type="audio/mp3" />
+ *                                     Your browser does not support the audio tag.
+ *                             </audio>
+ *
+ */
+/**
+       @class MutimediaView
+       The multimedia view widget shows a player control that you can use to view and handle multimedia content. This widget uses the standard HTML video and audio elements, which have been enhanced for use on a mobile device.
+
+       To add a multimedia view widget to the application, use the following code:
+       
+               // Video player control
+               <video data-controls="true" style="width:100%;">
+               <source src="<VIDEO_FILE_URL>" type="video/mp4" /> Your browser does not support the video tag. </video>
+               // Audio player control
+               <audio data-controls="true" style="width:100%;"> <source src="<AUDIO_FILE_URL>" type="audio/mp3" /> Your browser does not support the audio tag.
+               </audio>
+
+       The multimedia view can define a callback for the create event, which is fired when the widget is created.
+               $('.selector').multimediaview({
+                       create:function(event, u){...}
+               });
+               $(".selector").bind("create", function(event, ui)
+               {
+                       // Respond to the multimedia view widget creation
+               });
+*/
+/**
+       @property {Boolean} data-control
+       Sets the controls for the widget.
+       The default value is true. If the value is set to true, the widget uses its own player controls. If the value is set to false, the widget uses the browser's player controls.
+*/
+/**
+       @property {Boolean} data-full-screen
+       Defines whether the widget opens in the fullscreen view mode.
+       The default value is false.
+*/
+/**
+       @property {String} data-theme
+       Sets the widget theme.
+       If the value is not set, the parent control's theme is used
+*/
+/**
+       @method width
+       The width method is used to get (if no value is defined) or set the multimedia view widget width:
+               <video>
+                        <source src="test.mp4" type="video/mp4" />
+               </video>
+               $(".selector").multimediaview("width", [value]);
+*/
+/**
+       @method height
+       The height method is used to get (if no value is defined) or set the multimedia view widget height:
+               <video>
+                       <source src="test.mp4" type="video/mp4" />
+               </video>
+               $(".selector").multimediaview("height", [value]);
+*/
+/**
+       @method fullScreen
+       The fullScreen method is used to get (if no value is defined) or set the full-screen mode of the multimedia view widget. If the value is true, the full-screen mode is used; otherwise the multimedia view widget runs in the normal mode.
+
+               <video>
+                       <source src="test.mp4" type="video/mp4" />
+               </video>
+               $(".selector").multimediaview("fullScreen", [value]);
+*/
+( function ( $, document, window, undefined ) {
+       $.widget( "tizen.multimediaview", $.mobile.widget, {
+               options: {
+                       theme: null,
+                       controls: true,
+                       fullScreen: false,
+                       initSelector: "video, audio"
+               },
+
+               _create: function () {
+                       var self = this,
+                               view = self.element,
+                               viewElement = view[0],
+                               option = self.options,
+                               parentTheme = $.mobile.getInheritedTheme( view, "s" ),
+                               theme = option.theme || parentTheme,
+                               role = "multimediaview",
+                               control = null;
+
+                       $.extend( this, {
+                               role: null,
+                               isControlHide: false,
+                               controlTimer: null,
+                               isVolumeHide: true,
+                               isVertical: true,
+                               backupView: null
+                       });
+
+                       self.role = role;
+                       view.addClass( "ui-multimediaview" );
+                       control = self._createControl();
+                       control.find( ".ui-button" ).each( function ( index ) {
+                               $( this ).buttonMarkup( { corners: true, theme: theme, shadow: true } );
+                       });
+
+                       if ( view[0].nodeName === "VIDEO" ) {
+                               control.addClass( "ui-" + role + "-video" );
+                       }
+
+                       control.hide();
+                       view.wrap( [ "<div class='ui-", role, "-wrap ui-", role , "-", theme, "'>" ].join( "" ) ).after( control );
+                       if ( option.controls && view.attr( "controls" ) ) {
+                               view.removeAttr( "controls" );
+                       }
+
+                       self._addEvent();
+               },
+
+               _resize: function () {
+                       var view = this.element,
+                               parent = view.parent(),
+                               control = parent.find( ".ui-multimediaview-control" ),
+                               viewWidth = 0,
+                               viewHeight = 0,
+                               viewOffset = null;
+
+                       this._resizeFullscreen( this.options.fullScreen );
+                       viewWidth = ( ( view[0].nodeName === "VIDEO" ) ? view.width() : parent.width() );
+                       viewHeight = ( ( view[0].nodeName === "VIDEO" ) ? view.height() : control.height() );
+                       viewOffset = view.offset();
+
+                       this._resizeControl( viewOffset, viewWidth, viewHeight );
+
+                       this._updateSeekBar();
+                       this._updateVolumeState();
+               },
+
+               _resizeControl: function ( offset, width, height ) {
+                       var self = this,
+                               view = self.element,
+                               viewElement = view[0],
+                               control = view.parent().find( ".ui-multimediaview-control" ),
+                               buttons = control.find( ".ui-button" ),
+                               playpauseButton = control.find( ".ui-playpausebutton" ),
+                               seekBar = control.find( ".ui-seekbar" ),
+                               durationLabel = control.find( ".ui-durationlabel" ),
+                               timestampLabel = control.find( ".ui-timestamplabel" ),
+                               volumeControl = control.find( ".ui-volumecontrol" ),
+                               volumeBar = volumeControl.find( ".ui-volumebar" ),
+                               controlWidth = width,
+                               controlHeight = control.outerHeight( true ),
+                               availableWidth = 0,
+                               controlOffset = null;
+
+                       if ( control ) {
+                               if ( view[0].nodeName === "VIDEO" ) {
+                                       controlOffset = control.offset();
+                                       controlOffset.left = offset.left;
+                                       controlOffset.top = offset.top + height - controlHeight;
+                                       control.offset( controlOffset );
+                               }
+
+                               control.width( controlWidth );
+                       }
+
+                       if ( seekBar ) {
+                               availableWidth = control.width() - ( buttons.outerWidth( true ) * buttons.length );
+                               availableWidth -= ( parseInt( buttons.eq( 0 ).css( "margin-left" ), 10 ) + parseInt( buttons.eq( 0 ).css( "margin-right" ), 10 ) ) * buttons.length;
+                               if ( !self.isVolumeHide ) {
+                                       availableWidth -= volumeControl.outerWidth( true );
+                               }
+                               seekBar.width( availableWidth );
+                       }
+
+                       if ( durationLabel && !isNaN( viewElement.duration ) ) {
+                               durationLabel.find( "p" ).text( self._convertTimeFormat( viewElement.duration ) );
+                       }
+
+                       if ( viewElement.autoplay && viewElement.paused === false ) {
+                               playpauseButton.removeClass( "ui-play-icon" ).addClass( "ui-pause-icon" );
+                       }
+
+                       if ( seekBar.width() < ( volumeBar.width() + timestampLabel.width() + durationLabel.width() ) ) {
+                               durationLabel.hide();
+                       } else {
+                               durationLabel.show();
+                       }
+               },
+
+               _resizeFullscreen: function ( isFullscreen ) {
+                       var self = this,
+                               view = self.element,
+                               parent = view.parent(),
+                               control = view.parent().find( ".ui-multimediaview-control" ),
+                               playpauseButton = control.find( ".ui-playpausebutton" ),
+                               timestampLabel = control.find( ".ui-timestamplabel" ),
+                               seekBar = control.find( ".ui-seekbar" ),
+                               durationBar = seekBar.find( ".ui-duration" ),
+                               currenttimeBar = seekBar.find( ".ui-currenttime" ),
+                               docWidth = 0,
+                               docHeight = 0;
+
+                       if ( isFullscreen ) {
+                               if ( !self.backupView ) {
+                                       self.backupView = {
+                                               width: view[0].style.getPropertyValue( "width" ) || "",
+                                               height: view[0].style.getPropertyValue( "height" ) || "",
+                                               position: view.css( "position" ),
+                                               zindex: view.css( "z-index" )
+                                       };
+                               }
+                               docWidth = $( "body" )[0].clientWidth;
+                               docHeight = $( "body" )[0].clientHeight;
+
+                               view.width( docWidth ).height( docHeight - 1 );
+                               view.closest(".ui-multimediaview-wrap").height( docHeight - 1 );
+                               view.addClass( "ui-" + self.role + "-fullscreen" );
+                               view.offset( {
+                                       top: 0,
+                                       left: 0
+                               });
+                       } else {
+                               if ( !self.backupView ) {
+                                       return;
+                               }
+
+                               view.removeClass( "ui-" + self.role + "-fullscreen" );
+                               view.css( {
+                                       "width": self.backupView.width,
+                                       "height": self.backupView.height,
+                                       "position": self.backupView.position,
+                                       "z-index": self.backupView.zindex
+                               });
+                               view.closest(".ui-multimediaview-wrap").css( "height", "" );
+                               self.backupView = null;
+                       }
+                       parent.show();
+               },
+
+               _addEvent: function () {
+                       var self = this,
+                               view = self.element,
+                               option = self.options,
+                               viewElement = view[0],
+                               control = view.parent().find( ".ui-multimediaview-control" ),
+                               playpauseButton = control.find( ".ui-playpausebutton" ),
+                               timestampLabel = control.find( ".ui-timestamplabel" ),
+                               durationLabel = control.find( ".ui-durationlabel" ),
+                               volumeButton = control.find( ".ui-volumebutton" ),
+                               volumeControl = control.find( ".ui-volumecontrol" ),
+                               volumeBar = volumeControl.find( ".ui-volumebar" ),
+                               volumeGuide = volumeControl.find( ".ui-guide" ),
+                               volumeHandle = volumeControl.find( ".ui-handler" ),
+                               fullscreenButton = control.find( ".ui-fullscreenbutton" ),
+                               seekBar = control.find( ".ui-seekbar" ),
+                               durationBar = seekBar.find( ".ui-duration" ),
+                               currenttimeBar = seekBar.find( ".ui-currenttime" );
+
+                       $( document ).unbind( ".multimediaview" ).bind( "pagechange.multimediaview", function ( e ) {
+                               var $page = $( e.target );
+                               if ( $page.find( view ).length > 0 && viewElement.autoplay ) {
+                                       viewElement.play();
+                               }
+
+                               if ( option.controls ) {
+                                       control.show();
+                                       self._resize();
+                               }
+                       }).bind( "pagebeforechange.multimediaview", function ( e ) {
+                               if ( viewElement.played.length !== 0 ) {
+                                       viewElement.pause();
+                                       control.hide();
+                               }
+                       });
+
+                       $( window ).unbind( ".multimediaview" ).bind( "resize.multimediaview orientationchange.multimediaview", function ( e ) {
+                               if ( !option.controls ) {
+                                       return;
+                               }
+                               var $page = $( e.target ),
+                                       $scrollview = view.parents( ".ui-scrollview-clip" );
+
+                               $scrollview.each( function ( i ) {
+                                       if ( $.data( this, "scrollview" ) ) {
+                                               $( this ).scrollview( "scrollTo", 0, 0 );
+                                       }
+                               });
+
+                               // for maintaining page layout
+                               if ( !option.fullScreen ) {
+                                       $( ".ui-footer:visible" ).show();
+                               } else {
+                                       $( ".ui-footer" ).hide();
+                                       self._fitContentArea( $page );
+                               }
+
+                               self._resize();
+                       });
+
+                       view.bind( "loadedmetadata.multimediaview", function ( e ) {
+                               if ( !isNaN( viewElement.duration ) ) {
+                                       durationLabel.find( "p" ).text( self._convertTimeFormat( viewElement.duration ) );
+                               }
+                               self._resize();
+                       }).bind( "timeupdate.multimediaview", function ( e ) {
+                               self._updateSeekBar();
+                       }).bind( "play.multimediaview", function ( e ) {
+                               playpauseButton.removeClass( "ui-play-icon" ).addClass( "ui-pause-icon" );
+                       }).bind( "pause.multimediaview", function ( e ) {
+                               playpauseButton.removeClass( "ui-pause-icon" ).addClass( "ui-play-icon" );
+                       }).bind( "ended.multimediaview", function ( e ) {
+                               if ( typeof viewElement.loop == "undefined" || viewElement.loop === "" ) {
+                                       self.stop();
+                               }
+                       }).bind( "volumechange.multimediaview", function ( e ) {
+                               if ( viewElement.volume < 0.1 ) {
+                                       viewElement.muted = true;
+                                       volumeButton.removeClass( "ui-volume-icon" ).addClass( "ui-mute-icon" );
+                               } else {
+                                       viewElement.muted = false;
+                                       volumeButton.removeClass( "ui-mute-icon" ).addClass( "ui-volume-icon" );
+                               }
+
+                               if ( !self.isVolumeHide ) {
+                                       self._updateVolumeState();
+                               }
+                       }).bind( "durationchange.multimediaview", function ( e ) {
+                               if ( !isNaN( viewElement.duration ) ) {
+                                       durationLabel.find( "p" ).text( self._convertTimeFormat( viewElement.duration ) );
+                               }
+                               self._resize();
+                       }).bind( "error.multimediaview", function ( e ) {
+                               switch ( e.target.error.code ) {
+                               case e.target.error.MEDIA_ERR_ABORTED:
+                                       window.alert( 'You aborted the video playback.' );
+                                       break;
+                               case e.target.error.MEDIA_ERR_NETWORK:
+                                       window.alert( 'A network error caused the video download to fail part-way.' );
+                                       break;
+                               case e.target.error.MEDIA_ERR_DECODE:
+                                       window.alert( 'The video playback was aborted due to a corruption problem or because the video used features your browser did not support.' );
+                                       break;
+                               case e.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:
+                                       window.alert( 'The video could not be loaded, either because the server or network failed or because the format is not supported.' );
+                                       break;
+                               default:
+                                       window.alert( 'An unknown error occurred.' );
+                                       break;
+                               }
+                       }).bind( "vclick.multimediaview", function ( e ) {
+                               if ( !self.options.controls ) {
+                                       return;
+                               }
+
+                               control.fadeToggle( "fast", function () {
+                                       var offset = control.offset();
+                                       self.isControlHide = !self.isControlHide;
+                                       if ( self.options.mediatype == "video" ) {
+                                               self._startTimer();
+                                       }
+                               });
+                               self._resize();
+                       });
+
+                       playpauseButton.bind( "vclick.multimediaview", function () {
+                               self._endTimer();
+
+                               if ( viewElement.paused ) {
+                                       viewElement.play();
+                               } else {
+                                       viewElement.pause();
+                               }
+
+                               if ( self.options.mediatype == "video" ) {
+                                       self._startTimer();
+                               }
+                       });
+
+                       fullscreenButton.bind( "vclick.multimediaview", function ( e ) {
+                               self.fullScreen( !self.options.fullScreen );
+                               control.fadeIn( "fast" );
+                               self._endTimer();
+                               e.preventDefault();
+                               e.stopPropagation();
+                       });
+
+                       seekBar.bind( "vmousedown.multimediaview", function ( e ) {
+                               var x = e.clientX,
+                                       duration = viewElement.duration,
+                                       durationOffset = durationBar.offset(),
+                                       durationWidth = durationBar.width(),
+                                       timerate = ( x - durationOffset.left ) / durationWidth,
+                                       time = duration * timerate;
+
+                               if ( !viewElement.played.length ) {
+                                       return;
+                               }
+
+                               viewElement.currentTime = time;
+
+                               self._endTimer();
+
+                               e.preventDefault();
+                               e.stopPropagation();
+
+                               $( document ).bind( "vmousemove.multimediaview", function ( e ) {
+                                       var x = e.clientX,
+                                               timerate = ( x - durationOffset.left ) / durationWidth;
+
+                                       viewElement.currentTime = duration * timerate;
+
+                                       e.preventDefault();
+                                       e.stopPropagation();
+                               }).bind( "vmouseup.multimediaview", function () {
+                                       $( document ).unbind( "vmousemove.multimediaview vmouseup.multimediaview" );
+                                       if ( viewElement.paused ) {
+                                               viewElement.pause();
+                                       } else {
+                                               viewElement.play();
+                                       }
+                               });
+                       });
+
+                       volumeButton.bind( "vclick.multimediaview", function () {
+                               if ( self.isVolumeHide ) {
+                                       var view = self.element,
+                                               volume = viewElement.volume;
+
+                                       self.isVolumeHide = false;
+                                       self._resize();
+                                       volumeControl.fadeIn( "fast" );
+                                       self._updateVolumeState();
+                                       self._updateSeekBar();
+                               } else {
+                                       self.isVolumeHide = true;
+                                       volumeControl.fadeOut( "fast", function () {
+                                               self._resize();
+                                       });
+                                       self._updateSeekBar();
+                               }
+                       });
+
+                       volumeBar.bind( "vmousedown.multimediaview", function ( e ) {
+                               var baseX = e.clientX,
+                                       volumeGuideLeft = volumeGuide.offset().left,
+                                       volumeGuideWidth = volumeGuide.width(),
+                                       volumeBase = volumeGuideLeft + volumeGuideWidth,
+                                       handlerOffset = volumeHandle.offset(),
+                                       volumerate = ( baseX - volumeGuideLeft ) / volumeGuideWidth,
+                                       currentVolume = ( baseX - volumeGuideLeft ) / volumeGuideWidth;
+
+                               self._endTimer();
+                               self._setVolume( currentVolume.toFixed( 2 ) );
+
+                               e.preventDefault();
+                               e.stopPropagation();
+
+                               $( document ).bind( "vmousemove.multimediaview", function ( e ) {
+                                       var currentX = e.clientX,
+                                               currentVolume = ( currentX - volumeGuideLeft ) / volumeGuideWidth;
+
+                                       self._setVolume( currentVolume.toFixed( 2 ) );
+
+                                       e.preventDefault();
+                                       e.stopPropagation();
+                               }).bind( "vmouseup.multimediaview", function () {
+                                       $( document ).unbind( "vmousemove.multimediaview vmouseup.multimediaview" );
+
+                                       if ( self.options.mediatype == "video" ) {
+                                               self._startTimer();
+                                       }
+                               });
+                       });
+               },
+
+               _removeEvent: function () {
+                       var self = this,
+                               view = self.element,
+                               control = view.parent().find( ".ui-multimediaview-control" ),
+                               playpauseButton = control.find( ".ui-playpausebutton" ),
+                               fullscreenButton = control.find( ".ui-fullscreenbutton" ),
+                               seekBar = control.find( ".ui-seekbar" ),
+                               volumeControl = control.find( ".ui-volumecontrol" ),
+                               volumeBar = volumeControl.find( ".ui-volumebar" ),
+                               volumeHandle = volumeControl.find( ".ui-handler" );
+
+                       view.unbind( ".multimediaview" );
+                       playpauseButton.unbind( ".multimediaview" );
+                       fullscreenButton.unbind( ".multimediaview" );
+                       seekBar.unbind( ".multimediaview" );
+                       volumeBar.unbind( ".multimediaview" );
+                       volumeHandle.unbind( ".multimediaview" );
+               },
+
+               _createControl: function () {
+                       var self = this,
+                               view = self.element,
+                               control = $( "<span></span>" ).addClass( "ui-" + self.role + "-control" ),
+                               playpauseButton = $( "<span></span>" ).addClass( "ui-playpausebutton ui-button" ),
+                               seekBar = $( "<span></span>" ).addClass( "ui-seekbar" ),
+                               timestampLabel = $( "<span><p>00:00:00</p></span>" ).addClass( "ui-timestamplabel" ),
+                               durationLabel = $( "<span><p>00:00:00</p></span>" ).addClass( "ui-durationlabel" ),
+                               volumeButton = $( "<span></span>" ).addClass( "ui-volumebutton ui-button" ),
+                               volumeControl = $( "<span></span>" ).addClass( "ui-volumecontrol" ),
+                               volumeBar = $( "<div></div>" ).addClass( "ui-volumebar" ),
+                               volumeGuide = $( "<span></span>" ).addClass( "ui-guide" ),
+                               volumeValue = $( "<span></span>" ).addClass( "ui-value" ),
+                               volumeHandle = $( "<span></span>" ).addClass( "ui-handler" ),
+                               fullscreenButton = $( "<span></span>" ).addClass( "ui-fullscreenbutton ui-button" ),
+                               durationBar = $( "<span></span>" ).addClass( "ui-duration" ),
+                               currenttimeBar = $( "<span></span>" ).addClass( "ui-currenttime" );
+
+                       seekBar.append( durationBar ).append( currenttimeBar ).append( durationLabel ).append( timestampLabel );
+
+                       playpauseButton.addClass( "ui-play-icon" );
+                       volumeButton.addClass( view[0].muted ? "ui-mute-icon" : "ui-volume-icon" );
+                       volumeBar.append( volumeGuide ).append( volumeValue ).append( volumeHandle );
+                       volumeControl.append( volumeBar );
+
+                       control.append( playpauseButton ).append( seekBar ).append( volumeControl ).append( volumeButton );
+
+                       if ( self.element[0].nodeName === "VIDEO" ) {
+                               $( fullscreenButton ).addClass( "ui-fullscreen-on" );
+                               control.append( fullscreenButton );
+                       }
+                       volumeControl.hide();
+
+                       return control;
+               },
+
+               _startTimer: function ( duration ) {
+                       this._endTimer();
+
+                       if ( !duration ) {
+                               duration = 3000;
+                       }
+
+                       var self = this,
+                               view = self.element,
+                               control = view.parent().find( ".ui-multimediaview-control" ),
+                               volumeControl = control.find( ".ui-volumecontrol" );
+
+                       self.controlTimer = setTimeout( function () {
+                               self.isVolumeHide = true;
+                               self.isControlHide = true;
+                               self.controlTimer = null;
+                               volumeControl.hide();
+                               control.fadeOut( "fast" );
+                       }, duration );
+               },
+
+               _endTimer: function () {
+                       if ( this.controlTimer ) {
+                               clearTimeout( this.controlTimer );
+                               this.controlTimer = null;
+                       }
+               },
+
+               _convertTimeFormat: function ( systime ) {
+                       var ss = parseInt( systime % 60, 10 ).toString(),
+                               mm = parseInt( ( systime / 60 ) % 60, 10 ).toString(),
+                               hh = parseInt( systime / 3600, 10 ).toString(),
+                               time =  ( ( hh.length < 2  ) ? "0" + hh : hh ) + ":" +
+                                               ( ( mm.length < 2  ) ? "0" + mm : mm ) + ":" +
+                                               ( ( ss.length < 2  ) ? "0" + ss : ss );
+
+                       return time;
+               },
+
+               _updateSeekBar: function ( currenttime ) {
+                       var self = this,
+                               view = self.element,
+                               duration = view[0].duration,
+                               control = view.parent().find( ".ui-multimediaview-control" ),
+                               seekBar = control.find(  ".ui-seekbar"  ),
+                               durationBar = seekBar.find( ".ui-duration" ),
+                               currenttimeBar = seekBar.find( ".ui-currenttime" ),
+                               timestampLabel = control.find( ".ui-timestamplabel" ),
+                               durationOffset = durationBar.offset(),
+                               durationWidth = durationBar.width(),
+                               durationHeight = durationBar.height(),
+                               timebarWidth = 0;
+
+                       if ( typeof currenttime == "undefined" ) {
+                               currenttime = view[0].currentTime;
+                       }
+                       timebarWidth = parseInt( currenttime / duration * durationWidth, 10 );
+                       durationBar.offset( durationOffset );
+                       currenttimeBar.offset( durationOffset ).width( timebarWidth );
+                       timestampLabel.find( "p" ).text( self._convertTimeFormat( currenttime ) );
+               },
+
+               _updateVolumeState: function () {
+                       var self = this,
+                               view = self.element,
+                               control = view.parent().find( ".ui-multimediaview-control" ),
+                               volumeControl = control.find( ".ui-volumecontrol" ),
+                               volumeButton = control.find( ".ui-volumebutton" ),
+                               volumeBar = volumeControl.find( ".ui-volumebar" ),
+                               volumeGuide = volumeControl.find( ".ui-guide" ),
+                               volumeValue = volumeControl.find( ".ui-value" ),
+                               volumeHandle = volumeControl.find( ".ui-handler" ),
+                               handlerWidth = volumeHandle.width(),
+                               handlerHeight = volumeHandle.height(),
+                               volumeGuideHeight = volumeGuide.height(),
+                               volumeGuideWidth = volumeGuide.width(),
+                               volumeGuideTop = 0,
+                               volumeGuideLeft = 0,
+                               volumeBase = 0,
+                               handlerOffset = null,
+                               volume = view[0].volume;
+
+                       volumeGuideTop = parseInt( volumeGuide.offset().top, 10 );
+                       volumeGuideLeft = parseInt( volumeGuide.offset().left, 10 );
+                       volumeBase = volumeGuideLeft;
+                       handlerOffset = volumeHandle.offset();
+                       handlerOffset.top = volumeGuideTop - parseInt( ( handlerHeight - volumeGuideHeight ) / 2, 10 );
+                       handlerOffset.left = volumeBase + parseInt( volumeGuideWidth * volume, 10 ) - parseInt( handlerWidth / 2, 10 );
+                       volumeHandle.offset( handlerOffset );
+                       volumeValue.width( parseInt( volumeGuideWidth * ( volume ), 10 ) );
+               },
+
+               _setVolume: function ( value ) {
+                       var viewElement = this.element[0];
+
+                       if ( value < 0.0 || value > 1.0 ) {
+                               return;
+                       }
+
+                       viewElement.volume = value;
+               },
+
+               _fitContentArea: function ( page, parent ) {
+                       if ( typeof parent == "undefined" ) {
+                               parent = window;
+                       }
+
+                       var $page = $( page ),
+                               $content = $( ".ui-content:visible:first" ),
+                               hh = $( ".ui-header:visible" ).outerHeight() || 0,
+                               fh = $( ".ui-footer:visible" ).outerHeight() || 0,
+                               pt = parseFloat( $content.css( "padding-top" ) ),
+                               pb = parseFloat( $content.css( "padding-bottom" ) ),
+                               wh = ( ( parent === window ) ? window.innerHeight : $( parent ).height() ),
+                               height = wh - ( hh + fh ) - ( pt + pb );
+
+                       $content.offset( {
+                               top: ( hh + pt )
+                       }).height( height );
+               },
+
+               width: function ( value ) {
+                       var self = this,
+                               args = arguments,
+                               view = self.element;
+
+                       if ( args.length === 0 ) {
+                               return view.width();
+                       }
+                       if ( args.length === 1 ) {
+                               view.width( value );
+                               self._resize();
+                       }
+               },
+
+               height: function ( value ) {
+                       var self = this,
+                               view = self.element,
+                               args = arguments;
+
+                       if ( args.length === 0 ) {
+                               return view.height();
+                       }
+                       if ( args.length === 1 ) {
+                               view.height( value );
+                               self._resize();
+                       }
+               },
+
+               fullScreen: function ( value ) {
+                       var self = this,
+                               view = self.element,
+                               control = view.parent().find( ".ui-multimediaview-control" ),
+                               fullscreenButton = control.find( ".ui-fullscreenbutton" ),
+                               args = arguments,
+                               option = self.options,
+                               currentPage = $( ".ui-page-active" );
+
+                       if ( args.length === 0 ) {
+                               return option.fullScreen;
+                       }
+                       if ( args.length === 1 ) {
+                               view.parents( ".ui-content" ).scrollview( "scrollTo", 0, 0 );
+
+                               this.options.fullScreen = value;
+                               if ( value ) {
+                                       currentPage.children( ".ui-header" ).hide();
+                                       currentPage.children( ".ui-footer" ).hide();
+                                       currentPage.addClass( "ui-fullscreen-page" );
+                                       this._fitContentArea( currentPage );
+                                       fullscreenButton.removeClass( "ui-fullscreen-on" ).addClass( "ui-fullscreen-off" );
+                               } else {
+                                       currentPage.children( ".ui-header" ).show();
+                                       currentPage.children( ".ui-footer" ).show();
+                                       currentPage.removeClass( "ui-fullscreen-page" );
+                                       this._fitContentArea( currentPage );
+                                       fullscreenButton.removeClass( "ui-fullscreen-off" ).addClass( "ui-fullscreen-on" );
+                               }
+                               self._resize();
+                       }
+               },
+
+               refresh: function () {
+                       this._resize();
+               }
+       });
+
+       $( document ).bind( "pagecreate create", function ( e ) {
+               $.tizen.multimediaview.prototype.enhanceWithin( e.target );
+       });
+} ( jQuery, document, window ) );
+/* ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ *     Author: Minkyu Kang <mk7.kang@samsung.com>
+ */
+
+/*
+ * Notification widget
+ *
+ * HTML Attributes
+ *
+ *  data-role: set to 'notification'.
+ *  data-type: 'ticker' or 'popup'.
+ *  data-interval: time to showing. If don't set, will show infinitely.
+ *
+ * APIs
+ *
+ *  open(): open the notification.
+ *  close(): close the notification.
+ *  text(text0, text1): set texts or get texts
+ *  icon(src): set the icon (tickernoti only)
+ *
+ * Events
+ *
+ *  N/A
+ *
+ * Examples
+ *
+ * // tickernoti
+ * <div data-role="notification" id="notification" data-type="ticker" data-interval="3000">
+ *     <img src="icon01.png">
+ *     <p>Hello World</p>
+ *     <p>Denis</p>
+ * </div>
+ *
+ * // smallpopup
+ * <div data-role="notification" id="notification" data-type="popup" data-interval="3000">
+ *     <p>Hello World</p>
+ * </div>
+ *
+ */
+
+/**
+       @class Notification
+       The notification widget shows a pop-up window on the screen to provide notifications.
+       To add a notification widget to the application, use the following code:
+
+               <div data-role="page">
+                       <div data-role="notification" data-type="smallpopup">
+                               <p>text1</p>
+                       </div>
+                       <div data-role="header"></div>
+                       <div data-role="content"></div>
+                       <div data-role="footer"></div>
+               </div>
+*/
+/**
+       @property {String} data-type
+       Defines the notification type. The type options are tickernoti and smallpopup. <br/>The default value is smallpopup.
+
+*/
+/**
+       @property {Integer} data-interval
+       Defines the time to showing a notification widget. <br/>The default is infinitely.
+
+*/
+/**
+       @method open
+       The open method is used to open the notification widget:
+
+               <div data-role="notification" data-type="smallpopup" data-interval="3000"></div>
+               $('#notification').notification('open');
+*/
+/**
+       @method close
+       The close method is used to close the notification widget:
+
+               <div data-role="notification" data-type="smallpopup" data-interval="3000"></div>
+               $('#notification').notification('close');
+*/
+/**
+       @method text
+       The text method is used to set or get the notification text:
+
+               <div data-role="notification" data-type="smallpopup" data-interval="3000"></div>
+               // Set notification text
+               $('#notification').notification('text', 'setThisText');
+               // Get notification text
+               texts = $('#notification').notification('text');
+       @since Tizen2.0
+*/
+/**
+       @method icon
+       The setIcon method is used to set the ticker notification icon. The icon can be set only if the notification type is set to tickernoti.
+
+               <div data-role="notification" data-type="ticker" data-interval="3000"></div>
+               $('#notification').notification('icon', './test.png');
+*/
+(function ( $, window ) {
+       $.widget( "tizen.notification", $.mobile.widget, {
+               btn: null,
+               text_bg: [],
+               icon_img: [],
+               interval: null,
+               seconds: null,
+               running: false,
+
+               _get_text: function () {
+                       var text = new Array( 2 );
+
+                       if ( this.type === 'ticker' ) {
+                               text[0] = $( this.text_bg[0] ).text();
+                               text[1] = $( this.text_bg[1] ).text();
+                       } else {
+                               text[0] = $( this.text_bg[0] ).text();
+                       }
+
+                       return text;
+               },
+
+               _set_text: function ( text0, text1 ) {
+                       var _set = function ( elem, text ) {
+                               if ( !text ) {
+                                       return;
+                               }
+                               elem.text( text );
+                       };
+
+                       if ( this.type === 'ticker' ) {
+                               _set( $( this.text_bg[0] ), text0 );
+                               _set( $( this.text_bg[1] ), text1 );
+                       } else {
+                               _set( $( this.text_bg[0] ), text0 );
+                       }
+               },
+
+               text: function ( text0, text1 ) {
+                       if ( text0 === undefined && text1 === undefined ) {
+                               return this._get_text();
+                       }
+
+                       this._set_text( text0, text1 );
+               },
+
+               icon: function ( src ) {
+                       if ( src === undefined ) {
+                               return;
+                       }
+
+                       this.icon_img.detach();
+                       this.icon_img = $( "<img src='" + src + "' class='ui-ticker-icon'>" );
+                       $( this.element ).find(".ui-ticker").append( this.icon_img );
+               },
+
+               _refresh: function () {
+                       var container = this._get_container();
+
+                       $( container ).addClass("fix")
+                                       .removeClass("show")
+                                       .removeClass("hide");
+
+                       this._set_interval();
+               },
+
+               open: function () {
+                       var container = this._get_container();
+
+                       if ( this.running ) {
+                               this._refresh();
+                               return;
+                       }
+
+                       $( container ).addClass("show")
+                                       .removeClass("hide")
+                                       .removeClass("fix");
+
+                       this.running = true;
+
+                       if ( this.type === 'popup' ) {
+                               this._set_position();
+                       }
+
+                       this._set_interval();
+               },
+
+               close: function () {
+                       var container = this._get_container();
+
+                       if ( !this.running ) {
+                               return;
+                       }
+
+                       $( container ).addClass("hide")
+                                       .removeClass("show")
+                                       .removeClass("fix");
+
+                       this.running = false;
+                       clearInterval( this.interval );
+               },
+
+               destroy: function () {
+                       var container = this._get_container();
+
+                       $( container ).removeClass("show")
+                                       .removeClass("hide")
+                                       .removeClass("fix");
+
+                       this._del_event();
+
+                       this.running = false;
+               },
+
+               _get_container: function () {
+                       if ( this.type === 'ticker' ) {
+                               return $( this.element ).find(".ui-ticker");
+                       }
+
+                       return $( this.element ).find(".ui-smallpopup");
+               },
+
+               _set_interval: function () {
+                       var self = this;
+
+                       clearInterval( this.interval );
+
+                       if ( this.seconds !== undefined && this.second !== 0 ) {
+                               this.interval = setInterval( function () {
+                                       self.close();
+                               }, this.seconds );
+                       }
+               },
+
+               _add_event: function () {
+                       var self = this,
+                               container = this._get_container();
+
+                       if ( this.type === 'ticker' ) {
+                               container.find(".ui-ticker-btn").append( this.btn ).trigger("create");
+
+                               this.btn.bind( "vmouseup", function () {
+                                       self.close();
+                               });
+                       }
+
+                       container.bind( 'vmouseup', function () {
+                               self.close();
+                       });
+               },
+
+               _del_event: function () {
+                       var container = this._get_container();
+
+                       if ( this.type === 'ticker' ) {
+                               this.btn.unbind("vmouseup");
+                       }
+                       container.unbind('vmouseup');
+                       clearInterval( this.interval );
+               },
+
+               _set_position: function () {
+                       var container = this._get_container(),
+                               $footer = $('.ui-page-active').children('.ui-footer'),
+                               footer_h = $footer.outerHeight() || 0;
+
+                       container.css( 'bottom', footer_h);
+               },
+
+               _create: function () {
+                       var self = this,
+                               elem = $( this.element ),
+                               i;
+
+                       this.btn = $('<div data-role="button" data-inline="true">Close</div>');
+
+                       this.seconds = elem.jqmData('interval');
+                       this.type = elem.jqmData('type') || 'popup';
+
+                       if ( this.type === 'ticker' ) {
+                               elem.wrapInner("<div class='ui-ticker'></div>");
+                               elem.find(".ui-ticker").append("<div class='ui-ticker-body'></div>" +
+                                                       "<div class='ui-ticker-btn'></div>");
+                               this.text_bg = elem.find("p");
+
+                               if ( this.text_bg.length < 2 ) {
+                                       elem.find(".ui-ticker").append("<p></p><p></p>");
+                                       this.text_bg = elem.find("p");
+                               } else if ( this.text_bg.length > 2 ) {
+                                       for ( i = 2; i < this.text_bg.length; i++ ) {
+                                               $( this.text_bg[i] ).css( "display", "none" );
+                                       }
+                               }
+
+                               $( this.text_bg[0] ).addClass("ui-ticker-text1-bg");
+                               $( this.text_bg[1] ).addClass("ui-ticker-text2-bg");
+
+                               this.icon_img = elem.find("img");
+
+                               if ( this.icon_img.length ) {
+                                       $( this.icon_img ).addClass("ui-ticker-icon");
+
+                                       for ( i = 1; i < this.icon_img.length; i++ ) {
+                                               $( this.icon_img[i] ).css( "display", "none" );
+                                       }
+                               }
+                       } else {
+                               elem.wrapInner("<div class='ui-smallpopup'></div>");
+                               this.text_bg = elem.find("p").addClass("ui-smallpopup-text-bg");
+
+                               if ( this.text_bg.length < 1 ) {
+                                       elem.find(".ui-smallpopup")
+                                               .append("<p class='ui-smallpopup-text-bg'></p>");
+                                       this.text_bg = elem.find("p");
+                               } else if ( this.text_bg.length > 1 ) {
+                                       for ( i = 1; i < this.text_bg.length; i++ ) {
+                                               $( this.text_bg[i] ).css( "display", "none" );
+                                       }
+                               }
+
+                               this._set_position();
+                       }
+
+                       this._add_event();
+
+                       $( window ).bind( "resize", function () {
+                               if ( !self.running ) {
+                                       return;
+                               }
+
+                               self._refresh();
+
+                               if ( self.type === 'popup' ) {
+                                       self._set_position();
+                               }
+                       });
+               }
+       }); // End of widget
+
+       // auto self-init widgets
+       $( document ).bind( "pagecreate create", function ( e ) {
+               $( e.target ).find(":jqmData(role='notification')").notification();
+       });
+
+       $( document ).bind( "pagebeforehide", function ( e ) {
+               $( e.target ).find(":jqmData(role='notification')").notification('destroy');
+       });
+}( jQuery, this ));
+/* ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ *     Author: Jinhyuk Jun <jinhyuk.jun@samsung.com>
+ */
+
+(function ( $, undefined ) {
+
+       $.widget( "mobile.pagelayout", $.mobile.widget, {
+               options: {
+                       visibleOnPageShow: true,
+                       disablePageZoom: true,
+                       transition: "slide", //can be none, fade, slide (slide maps to slideup or slidedown)
+                       fullscreen: false,
+                       tapToggle: true,
+                       tapToggleBlacklist: "a, input, select, textarea, .ui-header-fixed, .ui-footer-fixed",
+                       hideDuringFocus: "input, textarea, select",
+                       updatePagePadding: true,
+                       trackPersistentToolbars: true,
+                       // Browser detection! Weeee, here we go...
+                       // Unfortunately, position:fixed is costly, not to mention probably impossible, to feature-detect accurately.
+                       // Some tests exist, but they currently return false results in critical devices and browsers, which could lead to a broken experience.
+                       // Testing fixed positioning is also pretty obtrusive to page load, requiring injected elements and scrolling the window
+                       // The following function serves to rule out some popular browsers with known fixed-positioning issues
+                       // This is a plugin option like any other, so feel free to improve or overwrite it
+                       supportBlacklist: function () {
+                               var w = window,
+                                       ua = navigator.userAgent,
+                                       platform = navigator.platform,
+                                       // Rendering engine is Webkit, and capture major version
+                                       wkmatch = ua.match( /AppleWebKit\/([0-9]+)/ ),
+                                       wkversion = !!wkmatch && wkmatch[ 1 ],
+                                       ffmatch = ua.match( /Fennec\/([0-9]+)/ ),
+                                       ffversion = !!ffmatch && ffmatch[ 1 ],
+                                       operammobilematch = ua.match( /Opera Mobi\/([0-9]+)/ ),
+                                       omversion = !!operammobilematch && operammobilematch[ 1 ];
+
+                               if (
+                                       // iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5)
+                                       ( ( platform.indexOf( "iPhone" ) > -1 || platform.indexOf( "iPad" ) > -1  || platform.indexOf( "iPod" ) > -1 ) && wkversion && wkversion < 534 ) ||
+                                               // Opera Mini
+                                               ( w.operamini && ({}).toString.call( w.operamini ) === "[object OperaMini]" ) ||
+                                               ( operammobilematch && omversion < 7458 ) ||
+                                               //Android lte 2.1: Platform is Android and Webkit version is less than 533 (Android 2.2)
+                                               ( ua.indexOf( "Android" ) > -1 && wkversion && wkversion < 533 ) ||
+                                               // Firefox Mobile before 6.0 -
+                                               ( ffversion && ffversion < 6 ) ||
+                                               // WebOS less than 3
+                                               ( window.palmGetResource !== undefined && wkversion && wkversion < 534 ) ||
+                                               // MeeGo
+                                               ( ua.indexOf( "MeeGo" ) > -1 && ua.indexOf( "NokiaBrowser/8.5.0" ) > -1 )
+                               ) {
+                                       return true;
+                               }
+
+                               return false;
+                       },
+                       initSelector: ":jqmData(role='content')"
+               },
+
+               _create: function () {
+
+                       var self = this,
+                               o = self.options,
+                               $el = self.element;
+
+                       // Feature detecting support for
+                       if ( o.supportBlacklist() ) {
+                               self.destroy();
+                               return;
+                       }
+
+                       self._addFixedClass();
+                       self._addTransitionClass();
+                       self._bindPageEvents();
+
+                       // only content
+                       self._bindContentControlEvents();
+               },
+
+               /* add minimum fixed css style to bar(header/footer) and content
+               *  it need to update when core source modified(jquery.mobile.page.section.js)
+               *  modified from core source cuz initSelector different */
+               _addFixedClass: function () {
+                       var self = this,
+                               o = self.options,
+                               $el = self.element,
+                               $elHeader = $el.siblings( ":jqmData(role='header')" ),
+                               $elFooter = $el.siblings( ":jqmData(role='footer')" ),
+                               $elPage = $el.closest(".ui-page");
+
+                       $elHeader.addClass( "ui-header-fixed" );
+                       $elFooter.addClass( "ui-footer-fixed" );
+
+                       // "fullscreen" overlay positioning
+                       if ( o.fullscreen ) {
+                               $elHeader.addClass( "ui-header-fullscreen" );
+                               $elFooter.addClass( "ui-footer-fullscreen" );
+                               $elPage
+                                       .addClass( "ui-page-header-fullscreen" )
+                                       .addClass( "ui-page-footer-fullscreen" );
+                       } else {
+                       // If not fullscreen, add class to page to set top or bottom padding
+                               $elPage.addClass( "ui-page-header-fixed" )
+                                       .addClass( "ui-page-footer-fixed" );
+                       }
+               },
+
+               /* original core source(jquery.mobile.fixedToolbar.js)
+               * never changed */
+               _addTransitionClass: function () {
+                       var tclass = this.options.transition;
+
+                       if ( tclass && tclass !== "none" ) {
+                               // use appropriate slide for header or footer
+                               if ( tclass === "slide" ) {
+                                       tclass = this.element.is( ".ui-header" ) ? "slidedown" : "slideup";
+                               }
+
+                               this.element.addClass( tclass );
+                       }
+               },
+
+
+               /* Set default page positon
+               * 1. add title style to header
+               * 2. Set default header/footer position */
+               setHeaderFooter: function ( thisPage ) {
+                       var $elPage = $( thisPage ),
+                               $elHeader = $elPage.find( ":jqmData(role='header')" ).length ? $elPage.find( ":jqmData(role='header')") : $elPage.siblings( ":jqmData(role='header')"),
+                               $elContent = $elPage.find( ".ui-content" ),
+                               $elFooter = $elPage.find( ":jqmData(role='footer')" ),
+                               $elFooterGroup = $elFooter.find( ":jqmData(role='fieldcontain')" );
+
+                       // divide content mode scrollview and non-scrollview
+                       if ( !$elPage.is( ".ui-dialog" ) ) {
+                               if ( $elHeader.jqmData("position") == "fixed" || ( $.support.scrollview && $.tizen.frameworkData.theme.match(/tizen/) ) ) {
+                                       $elHeader
+                                               .css( "position", "fixed" )
+                                               .css( "top", "0px" );
+                               } else if ( !$.support.scrollview && $elHeader.jqmData("position") != "fixed" ) {
+                                       $elHeader.css( "position", "relative" );
+                               }
+                       }
+
+                       /* set Title style */
+                       if ( $elHeader.find("span.ui-title-text-sub").length ) {
+                               $elHeader.addClass( "ui-title-multiline");
+                       }
+
+                       if ( $elFooterGroup.find( "div" ).is( ".ui-controlgroup-label" ) ) {
+                               $elFooterGroup.find( "div.ui-controlgroup-label" ).remove();
+                       }
+               },
+
+               _bindPageEvents: function () {
+                       var self = this,
+                               o = self.options,
+                               $el = self.element,
+                               $elCurrentFooter;
+
+                       //page event bindings
+                       // Fixed toolbars require page zoom to be disabled, otherwise usability issues crop up
+                       // This method is meant to disable zoom while a fixed-positioned toolbar page is visible
+                       $el.closest( ".ui-page" )
+                               .bind( "pagebeforeshow", function ( event ) {
+                                       var thisPage = this;
+                                       if ( o.disablePageZoom ) {
+                                               $.mobile.zoom.disable( true );
+                                       }
+                                       if ( !o.visibleOnPageShow ) {
+                                               self.hide( true );
+                                       }
+                                       self.setHeaderFooter( thisPage );
+                                       self._setContentMinHeight( thisPage );
+                               } )
+                               .bind( "webkitAnimationStart animationstart updatelayout", function ( e, data ) {
+                                       var thisPage = this;
+                                       if ( o.updatePagePadding ) {
+                                               self.updatePagePadding(thisPage);
+                                               self.updatePageLayout( false, thisPage);
+                                       }
+                               })
+
+                               .bind( "pageshow", function ( event ) {
+                                       var thisPage = this;
+                                       self._setContentMinHeight( thisPage );
+                                       self.updatePagePadding( thisPage );
+                                       self._updateHeaderArea( thisPage );
+                                       if ( o.updatePagePadding ) {
+                                               $( window ).bind( "throttledresize." + self.widgetName, function () {
+                                                       self.updatePagePadding(thisPage);
+
+                                                       self.updatePageLayout( false, thisPage);
+                                                       self._updateHeaderArea( thisPage );
+                                                       self._setContentMinHeight( thisPage );
+                                               });
+                                       }
+                               })
+
+                               .bind( "pagebeforehide", function ( e, ui ) {
+                                       if ( o.disablePageZoom ) {
+                                               $.mobile.zoom.enable( true );
+                                       }
+                                       if ( o.updatePagePadding ) {
+                                               $( window ).unbind( "throttledresize." + self.widgetName );
+                                       }
+
+                                       if ( o.trackPersistentToolbars ) {
+                                               var thisFooter = $( ".ui-footer-fixed:jqmData(id)", this ),
+                                                       thisHeader = $( ".ui-header-fixed:jqmData(id)", this ),
+                                                       nextFooter = thisFooter.length && ui.nextPage && $( ".ui-footer-fixed:jqmData(id='" + thisFooter.jqmData( "id" ) + "')", ui.nextPage ),
+                                                       nextHeader = thisHeader.length && ui.nextPage && $( ".ui-header-fixed:jqmData(id='" + thisHeader.jqmData( "id" ) + "')", ui.nextPage );
+
+                                               nextFooter = nextFooter || $();
+
+                                               if ( nextFooter.length || nextHeader.length ) {
+
+                                                       nextFooter.add( nextHeader ).appendTo( $.mobile.pageContainer );
+
+                                                       ui.nextPage.one( "pageshow", function () {
+                                                               nextFooter.add( nextHeader ).appendTo( this );
+                                                       });
+                                               }
+                                       }
+                               });
+
+                       window.addEventListener( "softkeyboardchange", function ( e ) {
+                               var thisPage = this;
+
+                               if ( e.state == "on" ) {
+                                       $elCurrentFooter = $( ".ui-page-active .ui-footer" );
+                                       $elCurrentFooter.hide();
+                               } else if (e.state == "off") {
+                                       $elCurrentFooter.show();
+                               }
+                               self.updatePagePadding( thisPage );
+                               self.updatePageLayout( true, thisPage );
+                       });
+               },
+
+               _bindContentControlEvents: function () {
+                       var self = this,
+                               o = self.options,
+                               $el = self.element;
+
+                       $el.closest( ".ui-page" )
+                               .bind( "pagebeforeshow", function ( event ) {
+
+                               });
+               },
+
+               _setContentMinHeight : function ( thisPage ) {
+                       var $elPage = $( thisPage ),
+                               $elHeader = $elPage.find( ":jqmData(role='header')" ),
+                               $elFooter = $elPage.find( ":jqmData(role='footer')" ),
+                               $elContent = $elPage.find( ":jqmData(role='content')" ),
+                               resultMinHeight;
+
+                       resultMinHeight = window.innerHeight - $elHeader.height() - $elFooter.height();
+
+                       $elContent.css( "min-height", resultMinHeight - parseFloat( $elContent.css("padding-top") ) - parseFloat( $elContent.css("padding-bottom") ) + "px" );
+               },
+
+               _updateHeaderArea : function ( thisPage ) {
+                       var $elPage = $( thisPage ),
+                               $elHeader = $elPage.find( ":jqmData(role='header')" ).length ? $elPage.find( ":jqmData(role='header')") : $elPage.siblings( ":jqmData(role='header')"),
+                               headerBtnNum = $elHeader.children("a").length,
+                               headerSrcNum = $elHeader.children("img").length;
+
+                       if ( !$elPage.is( ".ui-dialog" ) ) {
+                               $elHeader.find( "h1" ).css( "width", window.innerWidth - $elHeader.children( "a" ).width() * headerBtnNum - $elHeader.children( "a" ).width() / 4 - $elHeader.children( "img" ).width() * headerSrcNum * 4 );
+                       }
+                       /* add half width for default space between text and button, and img tag area is too narrow, so multiply three for img width*/
+               },
+
+               _visible: true,
+
+               // This will set the content element's top or bottom padding equal to the toolbar's height
+               updatePagePadding: function ( tbPage ) {
+                       var $el = this.element,
+                               header = $el.siblings( ".ui-header" ).length,
+                               footer = $el.siblings( ".ui-footer" ).length;
+
+                       // This behavior only applies to "fixed", not "fullscreen"
+                       if ( this.options.fullscreen ) {
+                               return;
+                       }
+
+                       tbPage = tbPage || $el.closest( ".ui-page" );
+
+                       if ( $el.siblings( ".ui-header" ).jqmData("position") == "fixed" || $.support.scrollview ) {
+                               $( tbPage ).css( "padding-top", ( header ? $el.siblings( ".ui-header" ).outerHeight() : 0 ) );
+                       }
+                       $( tbPage ).css( "padding-bottom", ( footer ? $el.siblings( ".ui-footer" ).outerHeight() : 0 ) );
+               },
+
+               /* 1. Calculate and update content height   */
+               updatePageLayout: function ( receiveType, thisPage ) {
+                       var $elFooter,
+                               $elPage = $( thisPage ),
+                               $elHeader = $elPage.find( ":jqmData(role='header')" ),
+                               $elContent = $elPage.find( ":jqmData(role='content')" ),
+                               resultContentHeight = 0,
+                               resultFooterHeight = 0,
+                               resultHeaderHeight = 0;
+
+                       if ( $elPage.length ) {
+                               $elFooter = $elPage.find( ":jqmData(role='footer')" );
+                       } else {
+                               $elFooter = $( document ).find( ":jqmData(role='footer')" ).eq( 0 );
+                       }
+
+                       // calculate footer height
+                       resultFooterHeight = ( $elFooter.css( "display" ) == "none" ) ? 0 : $elFooter.height();
+                       resultHeaderHeight = ( $elHeader.css( "display" ) == "none" ) ? 0 : $elHeader.height();
+
+                       if (resultFooterHeight != 0 ) {
+                               $elFooter.css( "bottom", 0 );
+                       }
+
+                       resultContentHeight = window.innerHeight - resultFooterHeight - resultHeaderHeight;
+
+                       if ( $.support.scrollview ) {
+                               $elContent.height( resultContentHeight -
+                                               parseFloat( $elContent.css("padding-top") ) -
+                                               parseFloat( $elContent.css("padding-bottom") ) );
+                       }
+
+                       // External call page( "refresh") - in case title changed
+                       if ( receiveType ) {
+                               $elPage
+                                       .css( "min-height", resultContentHeight )
+                                       .css( "padding-top", resultHeaderHeight )
+                                       .css( "padding-bottom", resultFooterHeight );
+                       }
+               },
+
+               show: function ( notransition ) {
+                       /* blank function: deprecated */
+               },
+
+               hide: function ( notransition ) {
+                       /* blank function: deprecated */
+               },
+
+               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" );
+               }
+       });
+
+       //auto self-init widgets
+       $( document )
+               .bind( "pagecreate create", function ( e ) {
+                       // DEPRECATED in 1.1: support for data-fullscreen=true|false on the page element.
+                       // This line ensures it still works, but we recommend moving the attribute to the toolbars themselves.
+                       if ( $( e.target ).jqmData( "fullscreen" ) ) {
+                               $( $.mobile.pagelayout.prototype.options.initSelector, e.target ).not( ":jqmData(fullscreen)" ).jqmData( "fullscreen", true );
+                       }
+                       $.mobile.pagelayout.prototype.enhanceWithin( e.target );
+               });
+
+}( jQuery ));
+/*
+ * jQuery Mobile Widget @VERSION
+ *
+ * This software is licensed under the MIT licence (as defined by the OSI at
+ * http://www.opensource.org/licenses/mit-license.php)
+ *
+ * ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2011 by Intel Corporation Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ * Authors: Gabriel Schulhof <gabriel.schulhof@intel.com>,
+ *          Elliot Smith <elliot.smith@intel.com>
+ *                     Hyunjung Kim <hjnim.kim@samsung.com>
+ */
+
+/*
+ * % Popupwindow widget do not use anymore(will be deprecated, internal use only)
+ *
+ *
+ * Shows other elements inside a popup window.
+ *
+ * To apply, add the attribute data-role="popupwindow" to a <div> element inside
+ * a page. Alternatively, call popupwindow()
+ * on an element, eg :
+ *
+ *     $("#mypopupwindowContent").popupwindow();
+ * where the html might be :
+ *     <div id="mypopupwindowContent"></div>
+ *
+ * To trigger the popupwindow to appear, it is necessary to make a call to its
+ * 'open()' method. This is typically done by binding a function to an event
+ * emitted by an input element, such as a the clicked event emitted by a button
+ * element. The open() method takes two arguments, specifying the x and y
+ * screen coordinates of the center of the popup window.
+
+ * You can associate a button with a popup window like this:
+ *      <div id="mypopupContent" style="display: table;" data-role="popupwindow">
+ *          <table>
+ *              <tr> <td>Eenie</td>   <td>Meenie</td>  <td>Mynie</td>   <td>Mo</td>  </tr>
+ *              <tr> <td>Catch-a</td> <td>Tiger</td>   <td>By-the</td>  <td>Toe</td> </tr>
+ *              <tr> <td>If-he</td>   <td>Hollers</td> <td>Let-him</td> <td>Go</td>  </tr>
+ *              <tr> <td>Eenie</td>   <td>Meenie</td>  <td>Mynie</td>   <td>Mo</td>  </tr>
+ *          </table>
+ *      </div>
+ * <a href="#myPopupContent" data-rel="popupwindow" data-role="button">Show popup</a>
+ *
+ * Options:
+ *
+ *     theme: String; the theme for the popupwindow contents
+ *                   Default: null
+ *
+ *     overlayTheme: String; the theme for the popupwindow
+ *                   Default: null
+ *
+ *     shadow: Boolean; display a shadow around the popupwindow
+ *             Default: true
+ *
+ *     corners: Boolean; display a shadow around the popupwindow
+ *             Default: true
+ *
+ *     fade: Boolean; fades the opening and closing of the popupwindow
+ *
+ *     transition: String; the transition to use when opening or closing
+ *                 a popupwindow
+ *                 Default: $.mobile.defaultDialogTransition
+ *
+ * Events:
+ *     popupbeforeposition: triggered after a popup has completed preparations for opening, but has not yet opened
+ *     popupafteropen: triggered after a popup has completely opened
+ *     popupafterclose triggered when a popup has completely closed
+*/
+
+/**
+       class Popupwindow
+       The pop-up widget shows a list of items in a pop-up window in the middle of the screen. It automatically optimizes the pop-up window size within the screen.
+       To add a pop-up widget to the application, use the following code:
+
+               // Basic pop-up
+               <div id="center_info" data-role="popup" data-style="center_info">
+                       <div data-role="text">
+                               <p>
+                               Pop-up dialog box, a child window that blocks user interaction in the parent window
+                               </p>
+                       </div>
+               </div>
+               // Pop-up with a title and button
+               <div id="center_title_1btn" data-role="popup" data-style="center_title_1btn">
+                       <p data-role="title">
+                               Pop-up title
+                       </p>
+                       <p data-role="text">
+                               Pop-up dialog box
+                       </p>
+               <div data-role="button-bg">
+                       <input type="button" value="Text Button" />
+               </div>
+               </div>
+
+       The pop-up can define callbacks for events as described in the jQueryMobile documentation for pop-up events. <br/>You can use methods with the pop-up as described in the jQueryMobile documentation for pop-up methods.
+
+       @deprecated 2.0 verisons
+*/
+
+/**
+       @property {String} data-style
+       Defines the pop-up window style.
+       The following styles are available:
+
+       center_info: basic pop-up message
+       center_title: pop-up message with a title
+       center_basic_1btn: pop-up message with 1 button
+       center_basic_2btn: pop-up message with 2 horizontal buttons
+       center_title_1btn: pop-up message with a title and 1 button
+       center_title_2btn: pop-up message with a title and 2 horizontal buttons
+       center_title_3btn: pop-up message with a title and 3 horizontal buttons
+       center_button_vertical: pop-up message with vertical buttons
+       center_checkbox: pop-up message with a check box
+       center_liststyle_1btn>: pop-up message with a list and 1 button
+       center_liststyle_2btn: pop-up message with a list and 2 horizontal buttons
+       center_liststyle_3btn: pop-up message with a list and 3 horizontal buttons
+*/
+
+(function ( $, undefined ) {
+       $.widget( "tizen.popupwindow", $.tizen.widgetex, {
+               options: {
+                       theme: null,
+                       overlayTheme: "s",
+                       style: "custom",
+                       disabled: false,
+                       shadow: true,
+                       corners: true,
+                       fade: false,
+                       opacity: 0.7,
+                       widthRatio: 0.8612,
+                       transition: $.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 popup = this.element,
+                               style = popup.attr( 'data-style' );
+
+                       if ( style ) {
+                               this.options.style = style;
+                       }
+
+                       popup.addClass( this.options.style );
+                       popup.find( ":jqmData(role='title')" )
+                                       .wrapAll( "<div class='popup-title'></div>" );
+                       popup.find( ":jqmData(role='text')" )
+                                       .wrapAll( "<div class='popup-text'></div>" );
+                       popup.find( ":jqmData(role='button-bg')" )
+                                       .wrapAll( "<div class='popup-button-bg'></div>" );
+                       popup.find( ":jqmData(role='check-bg')" )
+                                       .wrapAll( "<div class='popup-check-bg'></div>" );
+                       popup.find( ":jqmData(role='scroller-bg')" )
+                                       .addClass( "popup-scroller-bg" );
+                       popup.find( ":jqmData(role='text-bottom-bg')" )
+                                       .wrapAll( "<div class='popup-text-bottom-bg'></div>" );
+                       popup.find( ":jqmData(role='text-left')" )
+                                       .wrapAll( "<div class='popup-text-left'></div>" );
+                       popup.find( ":jqmData(role='text-right')" )
+                                       .wrapAll( "<div class='popup-text-right'></div>" );
+                       popup.find( ":jqmData(role='progress-bg')" )
+                                       .wrapAll( "<div class='popup-progress-bg'></div>" );
+               },
+
+               _create: function () {
+                       console.warn("popupwindow() was deprecated. use popup() instead.");
+                       var thisPage = this.element.closest(":jqmData(role='page')"),
+                               self = this;
+
+                       if ( thisPage.length === 0 ) {
+                               thisPage = $("body");
+                       }
+
+                       this._ui.placeholder =
+                                       $( "<div><!-- placeholder for " + this.element.attr("id") + " --></div>" )
+                                       .css("display", "none")
+                                       .insertBefore( this.element );
+
+                       thisPage.append( this._ui.screen );
+                       this._ui.container.insertAfter( this._ui.screen );
+                       this._ui.container.append( this.element );
+
+                       this._setStyle();
+
+                       this._isOpen = false;
+
+                       this._ui.screen.bind( "vclick", function ( e ) {
+                               self.close();
+                               return false;
+                       } );
+
+                       this.element.bind( "vclick", function ( e ) {
+                               if ( $( e.target ).is("ui-btn-ctxpopup-close") ) {
+                                       self.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");
+                       $.Widget.prototype.destroy.call( this );
+               },
+
+               _placementCoords: function ( x, y, cw, ch ) {
+                       var screenHeight = $( window ).height(),
+                               screenWidth = $( window ).width(),
+                               halfheight = ch / 2,
+                               maxwidth = parseFloat( this._ui.container.css( "max-width" ) ),
+                               roomtop = y,
+                               roombot = screenHeight - y,
+                               newtop,
+                               newleft;
+
+                       if ( roomtop > ch / 2 && roombot > ch / 2 ) {
+                               newtop = y - halfheight;
+                       } else {
+                               newtop = roomtop > roombot ? screenHeight - ch - 30 : 30;
+                       }
+
+                       if ( cw < maxwidth ) {
+                               newleft = ( screenWidth - cw ) / 2;
+                       } else {
+                               newleft = x - cw / 2;
+
+                               if ( newleft < 10 ) {
+                                       newleft = 10;
+                               } else if ( ( newleft + cw ) > screenWidth ) {
+                                       newleft = screenWidth - cw - 10;
+                               }
+                       }
+
+                       return { x : newleft, y : newtop };
+               },
+
+               _setPosition: function ( x_where, y_where ) {
+                       var x = ( undefined === x_where ? $( window ).width()  / 2 : x_where ),
+                               y = ( undefined === y_where ? $( window ).height() / 2 : y_where ),
+                               coords,
+                               ctxpopup = this.element.data("ctxpopup"),
+                               popupWidth,
+                               menuHeight,
+                               menuWidth,
+                               screenHeight,
+                               screenWidth,
+                               roomtop,
+                               roombot,
+                               halfheight,
+                               maxwidth,
+                               newtop,
+                               newleft;
+
+                       if ( !ctxpopup ) {
+                               popupWidth = $( window ).width() * this.options.widthRatio;
+                               this._ui.container.css( "width", popupWidth );
+
+                               if ( this._ui.container.outerWidth() > $( window ).width() ) {
+                                       this._ui.container.css( {"max-width" : $( window ).width() - 30} );
+                               }
+                       }
+
+                       coords = this._placementCoords( x, y,
+                                       this._ui.container.outerWidth(),
+                                       this._ui.container.outerHeight() );
+
+                       menuHeight = this._ui.container.innerHeight();
+                       menuWidth = this._ui.container.innerWidth();
+                       screenHeight = $( window ).height();
+                       screenWidth = $( window ).width();
+                       roomtop = y;
+                       roombot = screenHeight - y;
+                       halfheight = menuHeight / 2;
+                       maxwidth = parseFloat( this._ui.container.css( "max-width" ) );
+                       newtop = ( screenHeight - menuHeight ) / 2;
+
+                       if ( !maxwidth || menuWidth < maxwidth ) {
+                               newleft = ( screenWidth - menuWidth ) / 2;
+                       } else {
+                               newleft = x - menuWidth / 2;
+
+                               if ( newleft < 30 ) {
+                                       newleft = 30;
+                               } else if ( ( newleft + menuWidth ) > screenWidth ) {
+                                       newleft = screenWidth - menuWidth - 30;
+                               }
+                       }
+
+                       if ( ctxpopup ) {
+                               newtop = coords.y;
+                               newleft = coords.x;
+                       }
+
+                       this._ui.container.css({
+                               top: newtop,
+                               left: newleft
+                       });
+
+                       this._ui.screen.css( "height", screenHeight );
+               },
+               open: function ( x_where, y_where, backgroundclose ) {
+                       var self = this,
+                               zIndexMax = 0;
+
+                       if ( this._isOpen || this.options.disabled ) {
+                               return;
+                       }
+
+                       $( document ).find("*").each( function () {
+                               var el = $( this ),
+                                       zIndex = parseInt( el.css("z-index"), 10 );
+
+                               if ( !( el.is( self._ui.container ) ||
+                                               el.is( self._ui.screen ) ||
+                                               isNaN( zIndex ))) {
+                                       zIndexMax = Math.max( zIndexMax, zIndex );
+                               }
+                       } );
+
+                       this._ui.screen.css( "height", $( window ).height() );
+
+                       if ( backgroundclose ) {
+                               this._ui.screen.css( "opacity", 0 )
+                                               .removeClass("ui-screen-hidden");
+                       } else {
+                               this._ui.removeClass("ui-screen-hidden");
+
+                               if ( this.options.fade ) {
+                                       this._ui.screen.animate( {opacity: this.options.opacity}, "fast" );
+                               } else {
+                                       this._ui.screen.css( {opacity: this.options.opacity} );
+                               }
+                       }
+
+                       this._setPosition( x_where, y_where );
+
+                       this.element.trigger("popupbeforeposition");
+
+                       this._ui.container
+                               .removeClass("ui-selectmenu-hidden")
+                               .addClass("in")
+                               .animationComplete( function () {
+                                       self.element.trigger("popupafteropen");
+                               } );
+
+                       this._isOpen = true;
+
+                       if ( !this._reflow ) {
+                               this._reflow = function () {
+                                       if ( !self._isOpen ) {
+                                               return;
+                                       }
+
+                                       self._setPosition( x_where, y_where );
+                               };
+
+                               $( window ).bind( "resize", this._reflow );
+                       }
+               },
+
+               close: function () {
+                       if ( !this._isOpen ) {
+                               return;
+                       }
+
+                       if ( this._reflow ) {
+                               $( window ).unbind( "resize", this._reflow );
+                               this._reflow = null;
+                       }
+
+                       var self = this,
+                               hideScreen = function () {
+                                       self._ui.screen.addClass("ui-screen-hidden");
+                                       self._isOpen = false;
+                               };
+
+                       this._ui.container.removeClass("in").addClass("reverse out");
+
+                       if ( this.options.transition === "none" ) {
+                               this._ui.container
+                                       .addClass("ui-selectmenu-hidden")
+                                       .removeAttr("style");
+                               this.element.trigger("popupafterclose");
+                       } else {
+                               this._ui.container.animationComplete( function () {
+                                       self._ui.container
+                                               .removeClass("reverse out")
+                                               .addClass("ui-selectmenu-hidden")
+                                               .removeAttr("style");
+                                       self.element.trigger("popupafterclose");
+                               } );
+                       }
+
+                       if ( this.options.fade ) {
+                               this._ui.screen.animate( {opacity: 0}, "fast", hideScreen );
+                       } else {
+                               hideScreen();
+                       }
+               },
+
+               _realSetTheme: function ( dst, theme ) {
+                       var classes = ( dst.attr("class") || "" ).split(" "),
+                               alreadyAdded = true,
+                               currentTheme = null,
+                               matches;
+
+                       while ( classes.length > 0 ) {
+                               currentTheme = classes.pop();
+                               matches = currentTheme.match(/^ui-body-([a-z])$/);
+
+                               if ( matches && matches.length > 1 ) {
+                                       currentTheme = matches[1];
+                                       break;
+                               } else {
+                                       currentTheme = null;
+                               }
+                       }
+
+                       dst.removeClass( "ui-body-" + currentTheme );
+                       if ( ( theme || "" ).match(/[a-z]/) ) {
+                               dst.addClass( "ui-body-" + theme );
+                       }
+               },
+
+               _setTheme: function ( value ) {
+                       this._realSetTheme( this.element, value );
+                       this.options.theme = value;
+                       this.element.attr( "data-" + ( $.mobile.ns || "" ) + "theme", value );
+               },
+
+               _setOverlayTheme: function ( value ) {
+                       this._realSetTheme( this._ui.container, value );
+                       this.options.overlayTheme = value;
+                       this.element.attr( "data-" + ( $.mobile.ns || "" ) + "overlay-theme", value );
+               },
+
+               _setShadow: function ( value ) {
+                       this.options.shadow = value;
+                       this.element.attr( "data-" + ( $.mobile.ns || "" ) + "shadow", value );
+                       this._ui.container[value ? "addClass" : "removeClass"]("ui-overlay-shadow");
+               },
+
+               _setCorners: function ( value ) {
+                       this.options.corners = value;
+                       this.element.attr( "data-" + ( $.mobile.ns || "" ) + "corners", value );
+                       this._ui.container[value ? "addClass" : "removeClass"]("ui-corner-all");
+               },
+
+               _setFade: function ( value ) {
+                       this.options.fade = value;
+                       this.element.attr( "data-" + ( $.mobile.ns || "" ) + "fade", value );
+               },
+
+               _setTransition: function ( value ) {
+                       this._ui.container
+                               .removeClass( this.options.transition || "" )
+                               .addClass( value );
+                       this.options.transition = value;
+                       this.element.attr( "data-" + ( $.mobile.ns || "" ) + "transition", value );
+               },
+
+               _setDisabled: function ( value ) {
+                       $.Widget.prototype._setOption.call( this, "disabled", value );
+                       if ( value ) {
+                               this.close();
+                       }
+               }
+       });
+
+       $.tizen.popupwindow.bindPopupToButton = function ( btn, popup ) {
+               if ( btn.length === 0 || popup.length === 0 ) {
+                       return;
+               }
+
+               var btnVClickHandler = function ( e ) {
+                       if ( !popup.jqmData("overlay-theme-set") ) {
+                               popup.popupwindow( "option", "overlayTheme", btn.jqmData("theme") );
+                       }
+
+                       popup.popupwindow( "open",
+                               btn.offset().left + btn.outerWidth()  / 2,
+                               btn.offset().top  + btn.outerHeight() / 2 );
+
+                       return false;
+               };
+
+               if ( ( popup.popupwindow("option", "overlayTheme") || "" ).match(/[a-z]/) ) {
+                       popup.jqmData( "overlay-theme-set", true );
+               }
+
+               btn
+                       .attr({
+                               "aria-haspopup": true,
+                               "aria-owns": btn.attr("href")
+                       })
+                       .removeAttr("href")
+                       .bind( "vclick", btnVClickHandler );
+
+               popup.bind( "destroyed", function () {
+                       btn.unbind( "vclick", btnVClickHandler );
+               } );
+       };
+
+       $( document ).bind( "pagecreate create", function ( e ) {
+               $( $.tizen.popupwindow.prototype.options.initSelector, e.target )
+                       .not(":jqmData(role='none'), :jqmData(role='nojs')")
+                       .popupwindow();
+
+               $( "a[href^='#']:jqmData(rel='popupwindow')", e.target ).each( function () {
+                       $.tizen.popupwindow.bindPopupToButton( $( this ), $( $( this ).attr("href") ) );
+               });
+       });
+}( jQuery ));
+/*
+ * jQuery Mobile Widget @VERSION
+ *
+ * This software is licensed under the MIT licence (as defined by the OSI at
+ * http://www.opensource.org/licenses/mit-license.php)
+ *
+ * ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2011 by Intel Corporation Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ * Authors: Gabriel Schulhof <gabriel.schulhof@intel.com>
+ *                     Hyunjung Kim <hjnim.kim@samsung.com>
+ */
+
+/*
+ * % ContextPopup widget do not use anymore(will be deprecated, internal use only)
+ */
+// This widget is implemented in an extremely ugly way. It should derive from $.tizen.popupwindow, but it doesn't
+// because there's a bug in jquery.ui.widget.js which was fixed in jquery-ui commit
+// b9153258b0f0edbff49496ed16d2aa93bec07d95. Once a version of jquery-ui containing that commit is released
+// (probably >= 1.9m5), and jQuery Mobile picks up the widget from there, this widget needs to be rewritten properly.
+// The problem is that, when a widget inherits from a superclass and declares an object in its prototype identical in key
+// to one in the superclass, upon calling $.widget the object is overwritten in both the prototype of the superclass and
+// the prototype of the subclass. The prototype of the superclass should remain unchanged.
+
+/**
+       class ContextPopup
+               The context pop-up widget shows a list of options and automatically optimizes its size within the screen. This widget is intended for a small list of options for a larger list, use the List widget. <br/>The context pop-up widget requires a target button, which must be clicked to open the context pop-up. In the default application theme, an arrow pointer is displayed at the top-left corner of the context pop-up widget when it is opened.<br/><br/> To add a context pop-up widget to the application, use the following code:
+
+                       // Target button
+                       <a href="#pop_3_icons" id="btn_3_icons" data-role="button" data-inline="true" data-rel="popupwindow">3 Icons</a>
+                       // Context pop-up
+                               <div class="horizontal" id="pop_3_icons" data-role="popupwindow" data-show-arrow="true">
+                               <ul>
+                                       <li class="icon">
+                                               <a href="#" data-role="button" data-icon="call"></a>
+                                       </li>
+                                       <li class="icon">
+                                               <a href="#" data-role="button" data-icon="favorite"></a>
+                                       </li>
+                                       <li class="text">
+                                               <a href="#">Function</a>
+                                       </li>
+                               </ul>
+                       </div>
+       The context pop-up can define callbacks for events as described in the [jQueryMobile documentation for pop-up events.][1]
+       You can use methods with the context pop-up as described in the [jQueryMobile documentation for pop-up methods.][2]
+       [1]: http://jquerymobile.com/demos/1.2.0-alpha.1/docs/pages/popup/events.html
+       [2]: http://jquerymobile.com/demos/1.2.0-alpha.1/docs/pages/popup/methods.html
+
+       @deprecated 2.0 verisons
+*/
+
+(function ( $, undefined ) {
+       $.widget( "tizen.ctxpopup", $.tizen.widgetex, {
+               options: $.extend( {}, $.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", // the key has to have the name "container"
+                               arrow           : {
+                                       all             : ":jqmData(role='triangle')",
+                                       l               : "#left",
+                                       t               : "#top",
+                                       r               : "#right",
+                                       b               : "#bottom"
+                               }
+                       }
+               },
+
+               _create: function () {
+                       console.warn("ctxpopup() was deprecated. use popup() instead.");
+                       if ( !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" ); // Creates the triangle widgets
+                       this._ui.container
+                               .addClass( "ui-popupwindow-padding" )
+                               .append( this.element );
+               },
+
+               _setOption: function ( key, value ) {
+                       $.tizen.popupwindow.prototype._setOption.apply( this.element.data( "popupwindow" ), arguments );
+                       this.options[key] = value;
+               }
+       } );
+
+       var origOpen = $.tizen.popupwindow.prototype.open,
+               orig_setOption = $.tizen.popupwindow.prototype._setOption,
+               orig_placementCoords = $.tizen.popupwindow.prototype._placementCoords;
+
+       $.tizen.popupwindow.prototype._setOption = function ( key, value ) {
+               var ctxpopup = this.element.data( "ctxpopup" ),
+                       needsApplying = true,
+                       origContainer;
+               if ( ctxpopup ) {
+                       if ( "shadow" === key || "overlayTheme" === key || "corners" === key ) {
+                               origContainer = this._ui.container;
+
+                               this._ui.container = ctxpopup._ui.container;
+                               orig_setOption.apply( this, arguments );
+                               this._ui.container = origContainer;
+                               needsApplying = false;
+                       }
+                       ctxpopup.options[key] = value;
+               }
+
+               if ( needsApplying ) {
+                       orig_setOption.apply(this, arguments);
+               }
+       };
+
+       $.tizen.popupwindow.prototype._placementCoords = function ( x, y, cx, cy ) {
+               var ctxpopup = this.element.data( "ctxpopup" ),
+                       self = this,
+                       coords = {},
+                       minDiff,
+                       minDiffIdx;
+
+               function getCoords( arrow, x_factor, y_factor ) {
+                       // Unhide the arrow we want to test to take it into account
+                       ctxpopup._ui.arrow.all.hide();
+                       ctxpopup._ui.arrow[arrow].show();
+
+                       var isHorizontal = ( "b" === arrow || "t" === arrow ),
+                       // Names of keys used in calculations depend on whether things are horizontal or not
+                               coord = ( isHorizontal
+                                               ? { point: "x", size: "cx", beg: "left", outerSize: "outerWidth",  niceSize: "width", triangleSize : "height" }
+                                               : { point: "y", size: "cy", beg: "top",  outerSize: "outerHeight", niceSize: "height", triangleSize : "width" } ),
+                               size = {
+                                       cx : self._ui.container.width(),
+                                       cy : self._ui.container.height()
+                               },
+                               halfSize = {
+                                       cx : size.cx / 2,
+                                       cy : size.cy / 2
+                               },
+                               desired = {
+                                       "x" : x + halfSize.cx * x_factor,
+                                       "y" : y + halfSize.cy * y_factor
+                               },
+                               orig = orig_placementCoords.call( self, desired.x, desired.y, size.cx, size.cy ),
+
+                       // The triangleOffset must be clamped to the range described below:
+                       //
+                       //                          +-------...
+                       //                          |   /\
+                       //                          |  /  \
+                       //                   ----+--+-,-----...
+                       //lowerDiff       -->____|  |/ <-- possible rounded corner
+                       //triangle size   -->    | /|
+                       //                   ____|/ |
+                       //                    ^  |\ | <-- lowest possible offset for triangle
+                       // actual range of    |  | \| 
+                       // arrow offset       |  |  | 
+                       // values due to      |  .  . Payload table cell looks like
+                       // possible rounded   |  .  . a popup window, and it may have
+                       // corners and arrow  |  .  . arbitrary things like borders,
+                       // triangle size -    |  |  | shadows, and rounded corners.
+                       // our clamp range    |  | /|
+                       //                   _v__|/ |
+                       //triangle size   -->    |\ | <-- highest possible offset for triangle
+                       //                   ____| \|
+                       //upperDiff       -->    |  |\ <-- possible rounded corner
+                       //                   ----+--+-'-----...
+                       //                          |  \  /
+                       //                          |   \/
+                       //                          +-------...
+                       //
+                       // We calculate lowerDiff and upperDiff by considering the offset and width of the payload (this.element)
+                       // versus the offset and width of the element enclosing the triangle, because the payload is inside
+                       // whatever decorations (such as borders, shadow, rounded corners) and thus can give a reliable indication
+                       // of the thickness of the combined decorations
+
+                               arrowBeg = ctxpopup._ui.arrow[arrow].offset()[coord.beg],
+                               arrowSize = ctxpopup._ui.arrow[arrow][coord.outerSize]( true ),
+                               payloadBeg = self.element.offset()[coord.beg],
+                               payloadSize = self.element[coord.outerSize]( true ),
+                               triangleSize = ctxpopup._ui.arrow[arrow][coord.triangleSize](),
+                               triangleOffset =
+                                       Math.max(
+                                               triangleSize // triangle size
+                                                       + Math.max( 0, payloadBeg - arrowBeg ), // lowerDiff
+                                               Math.min(
+                                                               arrowSize // bottom
+                                                                       - triangleSize // triangle size
+                                                                       - Math.max( 0, arrowBeg + arrowSize - ( payloadBeg + payloadSize ) ), // upperDiff
+                                                               arrowSize / 2 // arrow unrestricted offset
+                                                                       + desired[coord.point]
+                                                                       - orig[coord.point]
+                                                                       - halfSize[coord.size]
+                                                       )
+                                       ),
+                                       // Triangle points here
+                               final = {
+                                       "x": orig.x + ( isHorizontal ? triangleOffset : 0) + ("r" === arrow ? size.cx : 0),
+                                       "y": orig.y + (!isHorizontal ? triangleOffset : 0) + ("b" === arrow ? size.cy : 0)
+                               },
+                               ret = {
+                                       actual                  : orig,
+                                       triangleOffset  : triangleOffset,
+                                       absDiff                 : Math.abs( x - final.x ) + Math.abs( y - final.y )
+                               };
+
+                       // Hide it back
+                       ctxpopup._ui.arrow[arrow].hide();
+
+                       return ret;
+               }
+
+               if ( ctxpopup ) {
+                       // Returns:
+                       // {
+                       //    absDiff: int
+                       //    triangleOffset: int
+                       //    actual: { x: int, y: int }
+                       // }
+
+                       coords = {
+                               l : getCoords( "l", 1, 0 ),
+                               r : getCoords( "r", -1, 0 ),
+                               t : getCoords( "t", 0, 1 ),
+                               b : getCoords( "b", 0, -1 )
+                       };
+
+                       $.each( coords, function ( key, value ) {
+                               if ( minDiff === undefined || value.absDiff < minDiff ) {
+                                       minDiff = value.absDiff;
+                                       minDiffIdx = key;
+                               }
+                       } );
+
+                       // Side-effect: show the appropriate arrow and move it to the right offset
+                       ctxpopup._ui.arrow[minDiffIdx]
+                               .show()
+                               .triangle( "option", "offset", coords[minDiffIdx].triangleOffset );
+                       return coords[minDiffIdx].actual;
+               }
+
+               return orig_placementCoords.call( this, x, y, cx, cy );
+       };
+
+       $.tizen.popupwindow.prototype.open = function ( x, y ) {
+               var ctxpopup = this.element.data( "ctxpopup" );
+
+               if ( ctxpopup ) {
+                       this._setFade( false );
+                       this._setShadow( false );
+                       this._setCorners( false );
+                       this._setOverlayTheme( null );
+                       this._setOption( "overlayTheme", ctxpopup.options.overlayTheme );
+                       ctxpopup._ui.arrow.all.triangle( "option", "color", ctxpopup._ui.container.css( "background-color" ) );
+
+                       // temporary
+                       $( '.ui-popupwindow' ).css( 'background', 'none' );
+               }
+
+               origOpen.call( this, x, y, true );
+       };
+
+       //auto self-init widgets
+       $( document ).bind( "pagecreate create", function ( e ) {
+               var ctxpopups = $( $.tizen.ctxpopup.prototype.options.initSelector, e.target );
+               $.tizen.ctxpopup.prototype.enhanceWithin( e.target );
+       } );
+}( jQuery ) );
+/* ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software" ),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ *     Author: Minkyu Kang <mk7.kang@samsung.com>
+ *     Author: Koeun Choi <koeun.choi@samsung.com>
+ */
+
+/*
+ * Progress widget
+ *
+ * HTML Attributes
+ *
+ *  data-role: set to 'progress'.
+ *  data-style: 'circle' or 'pending'.
+ *
+ * APIs
+ *
+ *  show(): show the progress.
+ *  hide(): hide the progress.
+ *  running(boolean): start or stop the running.
+ *
+ * Events
+ *
+ *  N/A
+ *
+ * Examples
+ *
+ * <li data-role="list-divider">Progress Pending</li>
+ * <li>
+ *     <div data-role="progress" data-style="pending" id="pending"></div>
+ * </li>
+ * <li data-role="list-divider">Progress ~ing</li>
+ * <li>
+ *     <div data-role="progress" data-style="circle" id="progress"></div>Loading..
+ * </li>
+ *
+ * $("#pending").progress( "running", true );
+ * $("#progress").progress( "running", true );
+ *
+ */
+
+/**
+       @class Progress
+       The progress widget shows that an operation is in progress. <br/>To add a progress widget to the application, use the following code:
+
+               <div data-role="progress" data-style="circle"></div>
+*/
+/**
+       @property {String} data-style
+       Sets the style of the progress widget. The style options are pending (pending progress style) and circle (circular progress status style).
+*/
+/**
+       @method running
+       The running method is used to set the current running state of the pending or circular progress widget:
+
+               <div id="foo" data-role="progress" data-style="pending"></div>
+               $("#foo").progress("running", true);
+*/
+/**
+       @method show
+       The show method is used to show the pending or circular progress widget:
+
+               <div id="foo" data-role="progress" data-style="pending"></div>
+               $("#foo").progress("show");
+*/
+/**
+       @method hide
+       The show method is used to hide the pending or circular progress widget:
+
+               <div id="foo" data-role="progress" data-style="pending"></div>
+               $("#foo").progress("hide");
+*/
+
+(function ( $, window, undefined ) {
+       $.widget( "tizen.progress", $.mobile.widget, {
+               options: {
+                       style: "circle",
+                       running: false
+               },
+
+               show: function () {
+                       $( this.element ).show();
+               },
+
+               hide: function () {
+                       $( this.element ).hide();
+               },
+
+               _start: function () {
+                       if ( !this.init ) {
+                               $( this.element ).append( this.html );
+                               this.init = true;
+                       }
+
+                       this.show();
+
+                       $( this.element )
+                               .find( ".ui-progress-" + this.options.style )
+                               .addClass( this.runningClass );
+               },
+
+               _stop: function () {
+                       $( this.element )
+                               .find( ".ui-progress-" + this.options.style )
+                               .removeClass( this.runningClass );
+               },
+
+               running: function ( running ) {
+                       if ( running === undefined ) {
+                               return this.options.running;
+                       }
+
+                       this._setOption( "running", running );
+               },
+
+               _setOption: function ( key, value ) {
+                       if ( key === "running" ) {
+                               if ( typeof value !== "boolean" ) {
+                                       window.alert( "running value MUST be boolean type!" );
+                                       return;
+                               }
+
+                               this.options.running = value;
+                               this._refresh();
+                       }
+               },
+
+               _refresh: function () {
+                       if ( this.options.running ) {
+                               this._start();
+                       } else {
+                               this._stop();
+                       }
+               },
+
+               _create: function () {
+                       var self = this,
+                               element = this.element,
+                               style = element.jqmData( "style" ),
+                               _html,
+                               runningClass;
+
+                       if ( style ) {
+                               this.options.style = style;
+                       } else {
+                               style = this.options.style;
+                       }
+
+                       if ( style == "circle" ) {
+                               $( this.element ).addClass("ui-progress-container-circle");
+
+                               _html = '<div class="ui-progress-circle"></div>';
+                       } else if ( style === "pending" ) {
+                               $( this.element ).addClass("ui-progressbar");
+
+                               _html = '<div class="ui-progressbar-bg">' +
+                                               '<div class="ui-progress-pending"></div>' +
+                                       '</div>';
+                       }
+
+                       this.html = $( _html );
+
+                       runningClass = "ui-progress-" + style + "-running";
+
+                       $.extend( this, {
+                               init: false,
+                               runningClass: runningClass
+                       } );
+                       this._refresh();
+               }
+       } ); /* End of widget */
+
+       $( document ).bind( "pagecreate create", function ( e ) {
+               $( e.target ).find( ":jqmData(role='progress')" ).progress();
+       } );
+}( jQuery, this ));
+/*
+ * jQuery UI Progressbar @VERSION
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar
+ *
+ * Depends:
+ *   jquery.ui.core.js
+ *   jquery.ui.widget.js
+ * Original file:
+ *   jquery.ui.progressbar.js
+ */
+/* This is from jquery ui plugin - progressbar 11/16/2011 */
+
+
+/**
+       @class ProgressBar
+       The progress bar widget shows a control that indicates the progress percentage of an on-going operation. This widget can be scaled to fit inside a parent container.
+
+       To add a progress bar widget to the application, use the following code:
+
+               <div id="foo" data-role="progressbar"</div>
+*/
+/**
+       @event change
+       The progress bar can define a callback for the change event, which is fired when the progress value is changed:
+               <div id="foo" data-role="progressbar"></div>
+               $("#foo").bind("change", function (ev, val) {
+                       Console.log("Value is changed to " + val);
+               });
+*/
+/**
+       @method value
+       You can use the value method with the pickers to set or get the current default progress bar value:
+
+               <div id="foo" data-role="progressbar"></div>
+               var oldVal = $("#foo").progressbar("value");
+               $("#foo").progressbar("value", 50);
+*/
+
+(function ( $, window, undefined ) {
+
+       $.widget( "tizen.progressbar", $.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 = $( "<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 ( newValue ) {
+                       if ( newValue === undefined ) {
+                               return this._value();
+                       }
+
+                       this._setOption( "value", newValue );
+                       return this;
+               },
+
+               _setOption: function ( key, value ) {
+                       if ( key === "value" ) {
+                               this.options.value = value;
+                               this._refreshValue();
+                               if ( this._value() === this.options.max ) {
+                                       this.element.trigger( "complete" );
+                               }
+                       }
+                       // jquery.ui.widget.js MUST be updated to new version!
+                       //this._super( "_setOption", key, value );
+               },
+
+               _value: function () {
+                       var val = this.options.value;
+                       // normalize invalid value
+                       if ( typeof val !== "number" ) {
+                               val = 0;
+                       }
+                       return Math.min( this.options.max, Math.max( this.min, val ) );
+               },
+
+               _percentage: function () {
+                       return 100 * this._value() / this.options.max;
+               },
+
+               _refreshValue: function () {
+                       var value = this.value(),
+                               percentage = this._percentage();
+
+                       if ( this.oldValue !== value ) {
+                               this.oldValue = value;
+                               this.element.trigger( "change" );
+                       }
+
+                       this.valueDiv
+                               .toggle( value > this.min )
+                               .width( percentage.toFixed(0) + "%" );
+                       this.element.attr( "aria-valuenow", value );
+               }
+       } );
+
+       // auto self-init widgets
+       $( document ).bind( "pagecreate", function ( e ) {
+               $( e.target ).find( ":jqmData(role='progressbar')" ).progressbar();
+       } );
+
+}( jQuery, this ) );
+/* ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ */
+/*
+* jQuery Mobile Framework : "textinput" plugin for text inputs, textareas
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT or GPL Version 2 licenses.
+* http://jquery.org/license
+* Authors: Jinhyuk Jun <jinhyuk.jun@samsung.com>
+*          Wongi Lee <wongi11.lee@samsung.com>
+*/
+
+/**
+ * Searchbar can be created using <input> element with type=search
+ * <input type="search" name="search" id="search1" value=""  />
+ *
+ * Searchbar can be inserted 3 cases
+ * content : seachbar behave same as content element
+ * header : searchbar placed below title(header), It doesn't move when scrolling page
+ * inside optionheader : Searchbar placed inside optionheader, searchbar can be seen only expand optionheader
+ *
+ * Examples:
+ *
+ *     HTML markup for creating Searchbar
+ *             <input type="search"/>
+ *
+ *     How to make searchbar in content
+ *             <input type="search" name="" id="" value=""  />
+ *
+ *     How to make cancel button in searchbar
+ *             <div data-role="header" data-position ="fixed" >
+ *                     <h1>Searchbar</h1>
+ *                     <input type="search" data-cancel-btn=true name="" id="" value=""  />
+ *             </div>
+ *
+ *     How to make icon in front of searchbar
+ *             <div data-role="header" data-position ="fixed" >
+ *                     <h1>Searchbar</h1>
+ *                     <input type="search" data-icon="call" name="" id="" value=""  />
+ *             </div>
+*/
+
+/**
+       @class SearchBar
+       The search bar widget is used to search for page content. This widget can be placed in the header, option header, or page content.
+
+       To add a search bar widget to the application, use the following code:
+
+               <label for="search-basic">Search Input:</label>
+               <input type="search" name="search" id="searc-basic" value="" data-mini="true" />
+
+       Tizen supports many search bar options as described in the jQueryMobile documentation for search bar options.
+       The search bar can define callbacks for events as described in the jQueryMobile documentation for search bar events.
+       You can use methods with the search bar as described in the jQueryMobile documentation for search bar methods.
+*/
+
+(function ( $, undefined ) {
+
+       $.widget( "tizen.searchbar", $.mobile.widget, {
+               options: {
+                       theme: null,
+                       initSelector: "input[type='search'],:jqmData(type='search'), input[type='tizen-search'],:jqmData(type='tizen-search')"
+               },
+
+               _create: function () {
+                       var input = this.element,
+                               o = this.options,
+                               theme = o.theme || $.mobile.getInheritedTheme( this.element, "c" ),
+                               themeclass  = " ui-body-" + theme,
+                               focusedEl,
+                               clearbtn,
+                               cancelbtn,
+                               defaultText,
+                               defaultTextClass,
+                               trimedText,
+                               newClassName,
+                               newStyle,
+                               newDiv,
+                               searchimage,
+                               inputedText,
+                               useCancelBtn = false,
+                               frontIcon = false;
+
+                       $( "label[for='" + input.attr( "id" ) + "']" ).addClass( "ui-input-text" );
+
+                       if ( typeof input[0].autocorrect !== "undefined" && !$.support.touchOverflow ) {
+                               // Set the attribute instead of the property just in case there
+                               // is code that attempts to make modifications via HTML.
+                               input[0].setAttribute( "autocorrect", "off" );
+                               input[0].setAttribute( "autocomplete", "off" );
+                       }
+
+                       focusedEl = input.wrap( "<div class='ui-input-search ui-shadow-inset ui-corner-all ui-btn-shadow" + themeclass + "'></div>" ).parent();
+
+                       if ( $( this.element ).data( "cancel-btn" ) === true ) {
+                               useCancelBtn = true;
+                               focusedEl.addClass( "ui-input-search-default" );
+                       }
+                       if ( $( this.element ).data( "icon" ) != undefined ) {
+                               frontIcon = true;
+                               focusedEl.addClass( "ui-search-bar-icon" );
+                       }
+
+                       clearbtn = $( "<a href='#' class='ui-input-clear' title='clear text'>clear text</a>" )
+                               .bind('click', function ( event ) {
+                                       if ( input.attr( "disabled" ) == "disabled" ) {
+                                               return false;
+                                       }
+                                       input
+                                               .val( "" )
+                                               .focus()
+                                               .trigger( "change" );
+                                       clearbtn.addClass( "ui-input-clear-hidden" );
+                                       event.preventDefault();
+                               })
+                               .appendTo( focusedEl )
+                               .buttonMarkup({
+                                       icon: "deleteSearch",
+                                       iconpos: "notext",
+                                       corners: true,
+                                       shadow: true
+                               });
+
+                       function toggleClear() {
+                               setTimeout(function () {
+                                       clearbtn.toggleClass( "ui-input-clear-hidden", !input.val() );
+                               }, 0);
+                       }
+
+                       function showCancel() {
+                               focusedEl
+                                       .addClass( "ui-input-search-default" )
+                                       .removeClass( "ui-input-search-wide" );
+                               cancelbtn
+                                       .addClass( "ui-btn-cancel-show" )
+                                       .removeClass( "ui-btn-cancel-hide" );
+                       }
+
+                       function hideCancel() {
+                               focusedEl
+                                       .addClass( "ui-input-search-wide" )
+                                       .removeClass( "ui-input-search-default" );
+                               cancelbtn
+                                       .addClass( "ui-btn-cancel-hide" )
+                                       .removeClass( "ui-btn-cancel-show" );
+                               toggleClear();
+                       }
+
+                       function makeFrontIcon() {
+                               var IconStyle = $( input ).jqmData( "icon" ),
+                                       frontIcon = $( "<div data-role='button' data-style='circle'></div>" );
+
+                               frontIcon
+                                       .appendTo( focusedEl.parent() )
+                                       .buttonMarkup( {
+                                               icon: IconStyle,
+                                               corners: true,
+                                               shadow: true
+                                       } );
+                               frontIcon.addClass( "ui-btn-search-front-icon" );
+                       }
+
+                       toggleClear();
+
+                       input.bind( 'paste cut keyup focus change blur', toggleClear );
+
+                       //SLP --start search bar with cancel button
+                       focusedEl.wrapAll( "<div class='input-search-bar'></div>" );
+                       searchimage = $("<div class='ui-image-search'></div>").appendTo( focusedEl );
+
+                       if ( frontIcon ) {
+                               makeFrontIcon();
+                       }
+
+                       if ( useCancelBtn ) {
+                               cancelbtn = $( "<div data-role='button' class='ui-input-cancel' title='clear text'>Cancel</div>" )
+                                       .bind('click', function ( event ) {
+                                               if ( input.attr( "disabled" ) == "disabled" ) {
+                                                       return false;
+                                               }
+                                               event.preventDefault();
+                                               event.stopPropagation();
+
+                                               input
+                                                       .val( "" )
+                                                       .blur()
+                                                       .trigger( "change" );
+
+                                               if ( useCancelBtn ) {
+                                                       hideCancel();
+                                               }
+                                       } )
+                                       .appendTo( focusedEl.parent() )
+                                       .buttonMarkup( {
+                                               iconpos: "cancel",
+                                               corners: true,
+                                               shadow: true
+                                       } );
+                       }
+
+                       // Input Focused
+                       input
+                               .focus( function () {
+                                       if ( input.attr( "disabled" ) == "disabled" ) {
+                                               return false;
+                                       }
+                                       if ( useCancelBtn ) {
+                                               showCancel();
+                                       }
+                                       focusedEl.addClass( $.mobile.focusClass );
+                               })
+                               .blur(function () {
+                                       focusedEl.removeClass( $.mobile.focusClass );
+                               });
+
+                       // Default Text
+                       defaultText = input.jqmData( "default-text" );
+
+                       if ( ( defaultText != undefined ) && ( defaultText.length > 0 ) ) {
+                               defaultTextClass = "ui-input-default-text";
+                               trimedText = defaultText.replace(/\s/g, "");
+
+                               /* Make new class for default text string */
+                               newClassName = defaultTextClass + "-" + trimedText;
+                               newStyle = $( "<style>" + '.' + newClassName + ":after" + "{content:" + "'" + defaultText + "'" + "}" + "</style>" );
+                               $( 'html > head' ).append( newStyle );
+
+                               /* Make new empty <DIV> for default text */
+                               newDiv = $( "<div></div>" );
+
+                               /* Add class and append new div */
+                               newDiv.addClass( defaultTextClass );
+                               newDiv.addClass( newClassName );
+                               newDiv.tap( function ( event ) {
+                                       input.blur();
+                                       input.focus();
+                               } );
+
+                               input.parent().append( newDiv );
+
+                               /* When focus, default text will be hide. */
+                               input
+                                       .focus( function () {
+                                               input.parent().find( "div.ui-input-default-text" ).addClass( "ui-input-default-hidden" );
+                                       } )
+                                       .blur( function () {
+                                               var inputedText = input.val();
+                                               if ( inputedText.length > 0 ) {
+                                                       input.parent().find( "div.ui-input-default-text" ).addClass( "ui-input-default-hidden" );
+                                               } else {
+                                                       input.parent().find( "div.ui-input-default-text" ).removeClass( "ui-input-default-hidden" );
+                                               }
+                                       } );
+                       }
+
+                       if ( !input.attr("placeholder") ) {
+                               input.attr( "placeholder", "Search" );
+                       }
+               },
+
+               disable: function () {
+                       this.element.attr( "disabled", true );
+                       this.element.parent().addClass( "ui-disabled" );
+                       $( this.element ).blur();
+                       this.element.parent().parent().find(".ui-input-cancel").addClass( "ui-disabled" );
+               },
+
+               enable: function () {
+                       this.element.attr( "disabled", false );
+                       this.element.parent().removeClass( "ui-disabled" );
+                       this.element.parent().parent().find(".ui-input-cancel").removeClass( "ui-disabled" );
+                       $( this.element ).focus();
+               }
+       } );
+
+       //auto self-init widgets
+       $( document ).bind( "pagecreate create", function ( e ) {
+               $.tizen.searchbar.prototype.enhanceWithin( e.target );
+       } );
+
+}( jQuery ) );
+/*
+ * jQuery Mobile Widget @VERSION
+ *
+ * This software is licensed under the MIT licence (as defined by the OSI at
+ * http://www.opensource.org/licenses/mit-license.php)
+ *
+ * ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2011 by Intel Corporation Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ * Authors: Max Waterman <max.waterman@intel.com>
+ * Authors: Minkyu Kang <mk7.kang@samsung.com>
+ */
+
+/**
+ * tizenslider modifies the JQuery Mobile slider and is created in the same way.
+ *
+ * See the JQuery Mobile slider widget for more information :
+ *     http://jquerymobile.com/demos/1.0a4.1/docs/forms/forms-slider.html
+ *
+ * The JQuery Mobile slider option:
+ *     theme: specify the theme using the 'data-theme' attribute
+ *
+ * Options:
+ *     theme: string; the theme to use if none is specified using the 'data-theme' attribute
+ *            default: 'c'
+ *     popup: boolean; controls whether the popup is displayed or not
+ *                   specify if the popup is enabled using the 'data-popup' attribute
+ *                   set from javascript using .tizenslider('option','popup',newValue)
+ *
+ * Events:
+ *     changed: triggers when the value is changed (rather than when the handle is moved)
+ *
+ * Examples:
+ *
+ *     <a href="#" id="popupEnabler" data-role="button" data-inline="true">Enable popup</a>
+ *     <a href="#" id="popupDisabler" data-role="button" data-inline="true">Disable popup</a>
+ *     <div data-role="fieldcontain">
+ *         <input id="mySlider" data-theme='a' data-popup='false' type="range" name="slider" value="7" min="0" max="9" />
+ *     </div>
+ *     <div data-role="fieldcontain">
+ *         <input id="mySlider2" type="range" name="slider" value="77" min="0" max="777" />
+ *     </div>
+ *
+ *     // disable popup from javascript
+ *     $('#mySlider').tizenslider('option','popup',false);
+ *
+ *     // from buttons
+ *     $('#popupEnabler').bind('vclick', function() {
+ *         $('#mySlider').tizenslider('option','popup',true);
+ *     });
+ *     $('#popupDisabler').bind('vclick', function() {
+ *         $('#mySlider').tizenslider('option','popup',false);
+ *     });
+ */
+
+/**
+       @class Slider
+       The slider widget shows a control on the screen that you can use to change values by dragging a handle on a horizontal scale. Sliders can be used in Tizen as described in the jQueryMobile documentation for sliders.
+
+       To add a slider widget to the application, use the following code:
+
+               <input data-popup='false' type="range" name="slider" value="5" min="0" max="10" data-icon="text" data-text-left="Min" data-text-right="Max" />
+
+       The slider can define callbacks for events as described in the jQueryMobile documentation for slider events.
+       You can use methods with the slider as described in the jQueryMobile documentation for slider methods.
+*/
+/**
+       @property {String} data-icon
+       Defines the icon style for the slider ends. The icon options are bright, volume, and text.
+       The default value is text.
+*/
+/**
+       @property {Boolean} data-popup
+       Enables or disables a pop-up showing the current value while the handle is dragged.
+       The default value is true.
+*/
+/**
+       @property {String} data-text-left
+       Defines the text displayed on the left side of the slider.
+       The data-icon option must be set to text.
+*/
+/**
+       @property {String} data-text-right
+       Defines the text displayed on the right side of the slider.
+       The data-icon option must be set to text.
+*/
+
+(function ($, window, undefined) {
+       $.widget("tizen.tizenslider", $.mobile.widget, {
+               options: {
+                       popup: true
+               },
+
+               popup: null,
+               handle: null,
+               handleText: null,
+
+               _create: function () {
+                       this.currentValue = null;
+                       this.popupVisible = false;
+
+                       var self = this,
+                               inputElement = $( this.element ),
+                               slider,
+                               handle_press,
+                               popupEnabledAttr,
+                               icon,
+                               text_right,
+                               text_left,
+                               text_length,
+                               elem_left,
+                               elem_right,
+                               margin_left,
+                               margin_right;
+
+                       // apply jqm slider
+                       inputElement.slider();
+
+                       // hide the slider input element proper
+                       inputElement.hide();
+
+                       self.popup = $('<div class="ui-slider-popup"></div>');
+
+                       // set the popup according to the html attribute
+                       popupEnabledAttr = inputElement.jqmData('popup');
+                       if ( popupEnabledAttr !== undefined ) {
+                               self.options.popup = ( popupEnabledAttr == true );
+                       }
+
+                       // get the actual slider added by jqm
+                       slider = inputElement.next('.ui-slider');
+
+                       icon = inputElement.attr('data-icon');
+
+                       // wrap the background
+                       slider.wrap('<div class="ui-slider-container"></div>');
+
+                       // get the handle
+                       self.handle = slider.find('.ui-slider-handle');
+
+                       // remove the rounded corners from the slider and its children
+                       slider.removeClass('ui-btn-corner-all');
+                       slider.find('*').removeClass('ui-btn-corner-all');
+
+                       // add icon
+                       switch ( icon ) {
+                       case 'bright':
+                       case 'volume':
+                               elem_left = $('<div class="ui-slider-left-' + icon + '"></div>');
+                               elem_right = $('<div class="ui-slider-right-' + icon + '"></div>');
+
+                               slider.before( elem_left );
+                               slider.after( elem_right );
+
+                               margin_left = elem_left.width() + 16;
+                               margin_right = elem_right.width() + 16;
+                               break;
+
+                       case 'text':
+                               text_left = ( inputElement.attr('data-text-left') === undefined ) ? '' :
+                                               inputElement.attr('data-text-left').substring( 0, 3 );
+                               text_right = ( inputElement.attr('data-text-right') === undefined ) ? '' :
+                                               inputElement.attr('data-text-right').substring( 0, 3 );
+
+                               text_length = Math.max( text_left.length, text_right.length ) + 1;
+
+                               margin_left = text_length + "rem";
+                               margin_right = text_length + "rem";
+
+                               elem_left = $('<div class="ui-slider-left-text" style="left:' +
+                                       -( text_length ) + 'rem; width:' + text_length + 'rem;">' +
+                                       '<span style="position:relative;top:0.4em;">' +
+                                       text_left +
+                                       '</span></div>');
+                               elem_right = $('<div class="ui-slider-right-text" style="right:' +
+                                       -( text_length ) + 'rem; width:' + text_length + 'rem;">' +
+                                       '<span style="position:relative;top:0.4em;">' +
+                                       text_right +
+                                       '</span></div>');
+
+                               slider.before( elem_left );
+                               slider.after( elem_right );
+                               break;
+                       }
+
+                       if ( icon ) {
+                               slider.parent('.ui-slider-container').css({
+                                       "margin-left": margin_left,
+                                       "margin-right": margin_right
+                               });
+                       }
+
+                       // handle press
+                       slider.append($('<div class="ui-slider-handle-press"></div>'));
+                       self.handle_press = slider.find('.ui-slider-handle-press');
+                       self.handle_press.css('display', 'none');
+
+                       // add a popup element (hidden initially)
+                       slider.before( self.popup );
+                       self.popup.hide();
+
+                       // get the element where value can be displayed
+                       self.handleText = slider.find('.ui-btn-text');
+
+                       // set initial value
+                       self.updateSlider();
+
+                       // bind to changes in the slider's value to update handle text
+                       this.element.bind('change', function () {
+                               self.updateSlider();
+                       });
+
+                       // bind clicks on the handle to show the popup
+                       self.handle.bind('vmousedown', function () {
+                               self.showPopup();
+                       });
+
+                       // watch events on the document to turn off the slider popup
+                       slider.add( document ).bind('vmouseup', function () {
+                               self.hidePopup();
+                       });
+               },
+
+               _handle_press_show: function () {
+                       this.handle_press.css('display', '');
+               },
+
+               _handle_press_hide: function () {
+                       this.handle_press.css('display', 'none');
+               },
+
+               // position the popup
+               positionPopup: function () {
+                       var dstOffset = this.handle.offset();
+
+                       this.popup.offset({
+                               left: dstOffset.left + ( this.handle.width() - this.popup.width() ) / 2
+                       });
+
+                       this.handle_press.offset({
+                               left: dstOffset.left,
+                               top: dstOffset.top
+                       });
+               },
+
+               // show value on the handle and in popup
+               updateSlider: function () {
+                       var font_size,
+                               font_length,
+                               font_top,
+                               padding_size,
+                               newValue,
+                               get_value_length = function ( v ) {
+                                       var val = Math.abs( v ),
+                                               len;
+
+                                       if ( val > 999 ) {
+                                               len = 4;
+                                       } else if ( val > 99 ) {
+                                               len = 3;
+                                       } else if ( val > 9 ) {
+                                               len = 2;
+                                       } else {
+                                               len = 1;
+                                       }
+
+                                       if ( v < 0 ) {
+                                               len++;
+                                       }
+
+                                       return len;
+                               };
+
+                       // remove the title attribute from the handle (which is
+                       // responsible for the annoying tooltip); NB we have
+                       // to do it here as the jqm slider sets it every time
+                       // the slider's value changes :(
+                       this.handle.removeAttr('title');
+
+                       newValue = this.element.val();
+
+                       font_length = get_value_length( newValue );
+
+                       if ( this.popupVisible ) {
+                               this.positionPopup();
+
+                               switch ( font_length ) {
+                               case 1:
+                               case 2:
+                                       font_size = '1.5rem';
+                                       padding_size = '0.15rem';
+                                       break;
+                               case 3:
+                                       font_size = '1rem';
+                                       padding_size = '0.5rem';
+                                       break;
+                               default:
+                                       font_size = '0.8rem';
+                                       padding_size = '0.5rem';
+                                       break;
+                               }
+
+                               this.popup.css({
+                                       "font-size": font_size,
+                                       "padding-top": padding_size
+                               });
+                       }
+
+                       if ( newValue === this.currentValue ) {
+                               return;
+                       }
+
+                       switch ( font_length ) {
+                       case 1:
+                               font_size = '0.95rem';
+                               font_top = '0';
+                               break;
+                       case 2:
+                               font_size = '0.85rem';
+                               font_top = '-0.01rem';
+                               break;
+                       case 3:
+                               font_size = '0.65rem';
+                               font_top = '-0.05rem';
+                               break;
+                       default:
+                               font_size = '0.45rem';
+                               font_top = '-0.15rem';
+                               break;
+                       }
+
+                       if ( font_size != this.handleText.css('font-size') ) {
+                               this.handleText.css({
+                                       'font-size': font_size,
+                                       'top': font_top
+                               });
+                       }
+
+                       this.currentValue = newValue;
+                       this.handleText.text( newValue );
+                       this.popup.html( newValue );
+
+                       this.element.trigger( 'update', newValue );
+               },
+
+               // show the popup
+               showPopup: function () {
+                       if ( !this.options.popup || this.popupVisible ) {
+                               return;
+                       }
+
+                       this.popup.show();
+                       this.popupVisible = true;
+                       this._handle_press_show();
+               },
+
+               // hide the popup
+               hidePopup: function () {
+                       if ( !this.options.popup || !this.popupVisible ) {
+                               return;
+                       }
+
+                       this.popup.hide();
+                       this.popupVisible = false;
+                       this._handle_press_hide();
+               },
+
+               _setOption: function (key, value) {
+                       var needToChange = ( value !== this.options[key] );
+
+                       if ( !needToChange ) {
+                               return;
+                       }
+
+                       switch ( key ) {
+                       case 'popup':
+                               this.options.popup = value;
+
+                               if ( this.options.popup) {
+                                       this.updateSlider();
+                               } else {
+                                       this.hidePopup();
+                               }
+
+                               break;
+                       }
+               }
+       });
+
+       // stop jqm from initialising sliders
+       $( document ).bind( "pagebeforecreate", function ( e ) {
+               if ( $.data( window, "jqmSliderInitSelector" ) === undefined ) {
+                       $.data( window, "jqmSliderInitSelector",
+                               $.mobile.slider.prototype.options.initSelector );
+                       $.mobile.slider.prototype.options.initSelector = null;
+               }
+       });
+
+       // initialise sliders with our own slider
+       $( document ).bind( "pagecreate create", function ( e ) {
+               var jqmSliderInitSelector = $.data( window, "jqmSliderInitSelector" );
+               $( e.target ).find(jqmSliderInitSelector).not('select').tizenslider();
+               $( e.target ).find(jqmSliderInitSelector).filter('select').slider();
+       });
+
+}( jQuery, this ));
+/*
+ * jQuery Mobile Widget @VERSION
+ *
+ * This software is licensed under the MIT licence (as defined by the OSI at
+ * http://www.opensource.org/licenses/mit-license.php)
+ *
+ * ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2011 by Intel Corporation Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ * Authors: Kalyan Kondapally <kalyan.kondapally@intel.com>,
+ *          Elliot Smith <elliot.smith@intel.com>
+ *          Hyunjung Kim <hjnim.kim@samsung.com>
+ */
+
+// Widget which turns a html element into a "swipe":
+// i.e. each list item has a sliding "cover" which can be swiped
+// to the right (to reveal buttons underneath) or left (to
+// cover the buttons again). Clicking on a button under a swipe
+// also moves the cover back to the left.
+//
+// In this case, the cover is over a grid of buttons;
+// but it is should also be possible to use other types of markup under the
+// list items.
+//
+// WARNING: This doesn't work well inside a scrollview widget, as
+// the touch events currently interfere with each other badly (e.g.
+// a swipe will work but cause a scroll as well).
+//
+// Theme: default is to use the theme on the target element,
+// theme passed in options, parent theme, or 'c' if none of the above.
+// If list items are themed individually, the cover will pick up the
+// theme of the list item which is its parent.
+//
+
+/**
+       @class Swipe
+       The swipe widget shows a view on the screen where the items can be swiped vertically to show a menu.
+       To add a swipe widget to the application, use the following code:
+
+               <ul data-role="listview">
+                       <li data-role="swipe">
+                               <div data-role="swipe-cover">
+                                       <div data-role="button" data-inline="true">OK</div>
+                                       <div data-role="button" data-inline="true">Cancel</div>
+                               </div>
+                               <div data-role="swipe-item-cover">
+                                       <p>This is a swipe item cover.<br>
+                                               This will be swiped out when swipe event comes.</p>
+                               </div>
+                       </li>
+               </ul>
+
+       You can use methods with the swipe as described in the jQueryMobile documentation for view methods.
+*/
+/**
+       @property {String} data-role
+       Creates a swipe using the HTML unordered view (&gt;ul&lt;) element.
+       The default value is swipe.
+
+       Creates a swipe item cover using an HTML $gt;div$lt; element. This cover can be swiped to show the content beneath it.
+       The default value is swipe-item-cover.
+*/
+/**
+       @method open
+       uncover swipe item
+*/
+/**
+       @method close
+       cover swipe item
+*/
+/**
+       @method opened
+       return coveritem status( coverd or uncovred )
+*/
+/**
+       @event animationstart
+       The swipe can define a callback for the animationstart event, which is fired after a item is swipe and the swipe animation is start:
+*/
+/**
+       @event animationend
+       The swipe can define a callback for the animationend event, which is fired after a item is swiped and the swipe animation is complete:
+
+               <ul data-role="listview">
+               <li data-role="swipe">
+                               <div data-role="swipe-cover">
+                                       <div data-role="button" data-inline="true">OK</div>
+                                       <div data-role="button" data-inline="true">Cancel</div>
+                               </div>
+                               <div data-role="swipe-item-cover" id="foo">
+                               <p>This is a swipe item cover.<br>
+                                               This will be swiped out when swipe event comes.</p>
+                               </div>
+                       </li>
+               </ul>
+               $("#foo").bind("animationend", function (ev)
+               {
+                       Console.log("Swipe cover's animation is complete.");
+               });
+*/
+(function ($) {
+
+       $.widget("tizen.swipe", $.mobile.widget, {
+               options: {
+                       theme: null
+               },
+
+               _create: function () {
+                       // use the theme set on the element, set in options,
+                       // the parent theme, or 'c' (in that order of preference)
+                       var theme = this.element.jqmData('theme') ||
+                               this.options.theme ||
+                               this.element.parent().jqmData('theme') ||
+                               's';
+
+                       this.options.theme = theme;
+                       this._isopen = false;
+                       this.refresh();
+               },
+
+               refresh: function () {
+                       this._cleanupDom();
+
+                       var self = this,
+                               defaultCoverTheme,
+                               covers,
+                               coverTheme,
+                               item,
+                               itemHasThemeClass;
+
+                       defaultCoverTheme = 'ui-body-' + this.options.theme;
+
+                       if ( !this.element.parent().hasClass('ui-listview') ) {
+                               this.element.parent().listview();
+                       }
+                       this.element.addClass('ui-swipe');
+
+                       // get the item covers
+                       covers = this.element.find(':jqmData(role="swipe-item-cover")');
+                       item = this.element.find(':jqmData(role="swipe-item")');
+
+                       this._covers = covers;
+                       this._item = item;
+                       item.addClass('ui-swipe-item');
+                       coverTheme = defaultCoverTheme;
+                       itemHasThemeClass = item.parent().attr('class')
+                                       .match(/ui\-body\-[a-z]|ui\-bar\-[a-z]/);
+
+                       covers.each( function () {
+                               var cover = $( this );
+
+                               if ( itemHasThemeClass ) {
+                                       coverTheme = itemHasThemeClass[0];
+                               }
+
+                               cover.addClass('ui-swipe-item-cover');
+                               cover.addClass( coverTheme );
+
+                               if ( cover.has('.ui-swipe-item-cover-inner').length === 0 ) {
+                                       cover.wrapInner( $('<span/>').addClass('ui-swipe-item-cover-inner') );
+                               }
+
+                               if ( !( cover.data('animateRight') && cover.data('animateLeft') ) ) {
+                                       cover.data('animateRight', function () {
+                                               self._animateCover( cover, 110, item );
+                                       });
+
+                                       cover.data('animateLeft', function () {
+                                               self._animateCover( cover, 0, item );
+                                       });
+                               }
+
+                               // bind to synthetic events
+                               item.bind( 'swipeleft', cover.data('animateLeft') );
+                               cover.bind( 'swiperight', cover.data('animateRight') );
+                               item.find( '.ui-btn' ).bind( 'vclick', cover.data('animateLeft') );
+                       } );
+
+               },
+
+               _cleanupDom: function () {
+                       var self = this,
+                               defaultCoverTheme,
+                               cover,
+                               coverTheme = defaultCoverTheme,
+                               item,
+                               itemClass,
+                               itemHasThemeClass,
+                               text,
+                               wrapper;
+
+                       defaultCoverTheme = 'ui-body-' + this.options.theme;
+
+                       this.element.removeClass('ui-swipe');
+
+                       // get the item covers
+                       cover = this.element.find(':jqmData(role="swipe-item-cover")');
+                       item = this.element.find(':jqmData(role="swipe-item")');
+
+                       item.removeClass('ui-swipe-item');
+                       cover.removeClass('ui-swipe-item-cover');
+
+                       itemClass = item.attr('class');
+                       itemHasThemeClass = itemClass &&
+                               itemClass.match(/ui\-body\-[a-z]|ui\-bar\-[a-z]/);
+
+                       if ( itemHasThemeClass ) {
+                               coverTheme = itemHasThemeClass[0];
+                       }
+
+                       cover.removeClass(coverTheme);
+
+                       // remove wrapper HTML
+                       wrapper = cover.find('.ui-swipe-item-cover-inner');
+                       wrapper.children().unwrap();
+                       text = wrapper.text();
+
+                       if ( text ) {
+                               cover.append( text );
+                               wrapper.remove();
+                       }
+
+                       // unbind swipe events
+                       if ( cover.data('animateRight') && cover.data('animateLeft') ) {
+                               cover.unbind( 'swiperight', cover.data('animateRight') );
+                               item.unbind( 'swipeleft', cover.data('animateLeft') );
+
+                               // unbind clicks on buttons inside the item
+                               item.find('.ui-btn').unbind( 'vclick', cover.data('animateLeft') );
+
+                               cover.data( 'animateRight', null );
+                               cover.data( 'animateLeft', null );
+                       }
+               },
+
+               // NB I tried to use CSS animations for this, but the performance
+               // and appearance was terrible on Android 2.2 browser;
+               // so I reverted to jQuery animations
+               //
+               // once the cover animation is done, the cover emits an
+               // animationComplete event
+               _animateCover: function ( cover, leftPercentage, item ) {
+                       var self = this,
+                               animationOptions = {
+                                       easing: 'linear',
+                                       duration: 'normal',
+                                       queue: true,
+                                       complete: function () {
+                                               cover.trigger('animationend');
+                                       }
+                               };
+
+                       $( this.element.parent() )
+                               .find(":jqmData(role='swipe')")
+                               .each(
+                                       function () {
+                                               if ( this !== self.element.get(0) &&
+                                                               $( this ).swipe("opened") ) {
+                                                       $( this ).swipe("close");
+                                               }
+                                       }
+                               );
+
+                       if ( leftPercentage == 110 ) {
+                               this._isopen = true;
+                       } else {
+                               this._isopen = false;
+                       }
+
+                       cover.stop();
+                       cover.clearQueue();
+                       cover.trigger('animationstart');
+                       cover.animate( { left: leftPercentage + '%' }, animationOptions );
+                       if ( leftPercentage == 0 ) {
+                               item.animate({ opacity: 0 }, "slow");
+                       } else {
+                               item.animate({ opacity: 1 }, "slow");
+                       }
+
+               },
+
+               destroy: function () {
+                       this._cleanupDom();
+               },
+
+               open: function () {
+                       var self = this;
+
+                       $( self._covers ).each( function () {
+                               var cover = $( this );
+                               self._animateCover( cover, 110, self._item);
+                       } );
+               },
+
+               opened: function () {
+                       return this._isopen;
+               },
+
+               close: function () {
+                       var self = this;
+
+                       $( self._covers ).each( function () {
+                               var cover = $( this );
+                               self._animateCover( cover, 0, self._item);
+                       } );
+               }
+
+       });
+
+       $( document ).bind("pagecreate", function ( e ) {
+               $( e.target ).find(":jqmData(role='swipe')").swipe();
+       });
+
+}( jQuery ));
+/* ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ * jQuery Mobile Framework : "tabbar" plugin
+ * Copyright (c) jQuery Project
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ * Authors: Jinhyuk Jun <jinhyuk.jun@samsung.com>
+*/
+
+/**
+ *  Tabbar can be created using data-role = "tabbar" inside footer 
+ *  Framework determine which tabbar will display with tabbar attribute
+ *
+ * Examples:
+ *         
+ *     HTML markup for creating tabbar: ( 2 ~ 5 li item available )
+ *     icon can be changed data-icon attribute (customized icon need)
+ *         <div data-role="footer" data-position ="fixed">
+ *              <div data-role="tabbar">
+ *                     <ul>
+ *                            <li><a href="#" class="ui-btn-active">Menu</a></li>
+ *                            <li><a href="#">Save</a></li>
+ *                            <li><a href="#">Share</a></li>
+ *                     </ul>
+ *             </div>
+ *      </div>
+*/
+
+(function ( $, undefined ) {
+
+       $.widget( "tizen.tabbar", $.mobile.widget, {
+               options: {
+                       iconpos: "top",
+                       grid: null,
+                       defaultList : 4,
+                       initSelector: ":jqmData(role='tabbar')"
+               },
+
+               _create: function () {
+
+                       var $tabbar = this.element,
+                               $tabbtns,
+                               textpos,
+                               iconpos,
+                               theme = $.mobile.listview.prototype.options.theme,      /* Get current theme */
+                               ww = window.innerWidth || $( window ).width(),
+                               wh = window.innerHeight || $( window ).height(),
+                               tabbarDividerLeft = "<div class='ui-tabbar-divider ui-tabbar-divider-left'></div>",
+                               tabbarDividerRight = "<div class='ui-tabbar-divider ui-tabbar-divider-right'></div>",
+                               isScrollingStart = false,
+                               isScrollingEnd = false,
+                               isLandscape;
+
+                       isLandscape = ww > wh && ( ww - wh );
+
+                       if ( isLandscape ) {
+                               $tabbar.removeClass( "ui-portrait-tabbar" ).addClass( "ui-landscape-tabbar" );
+                       } else {
+                               $tabbar.removeClass( "ui-landscape-tabbar" ).addClass( "ui-portrait-tabbar" );
+                       }
+
+                       if ( $tabbar.find( "a" ).length ) {
+                               $tabbtns = $tabbar.find( "a" );
+                               iconpos = $tabbtns.filter( ":jqmData(icon)" ).length ? this.options.iconpos : undefined;
+                               textpos = $tabbtns.html().length ? true : false;
+                       }
+
+                       if ( $tabbar.parents( ".ui-header" ).length && $tabbar.parents( ".ui-scrollview-view" ).length ) {
+                               $tabbar.find( "li" ).addClass( "tabbar-scroll-li" );
+                               $tabbar.find( "ul" ).addClass( "tabbar-scroll-ul" );
+
+                               /* add shadow divider */
+                               $( tabbarDividerLeft ).appendTo( $tabbar.parents( ".ui-scrollview-clip" ) );
+                               $( tabbarDividerRight ).appendTo( $tabbar.parents( ".ui-scrollview-clip" ) );
+
+                               $( ".ui-tabbar-divider-left" ).hide();
+                               $( ".ui-tabbar-divider-right" ).hide();
+
+                               /* add width calculation*/
+                               if ( $tabbar.parents( ".ui-scrollview-view" ).data("default-list") ) {
+                                       this.options.defaultList = $tabbar.parents( ".ui-scrollview-view" ).data( "default-list" );
+                               }
+                               $tabbar.find( "li" ).css( "width", window.innerWidth / this.options.defaultList + "px" );
+                       } else {
+                               if ( $tabbar.find( "ul" ).children().length ) {
+                                       $tabbar.addClass( "ui-navbar" )
+                                               .find( "ul" )
+                                               .grid( { grid: this.options.grid } );
+                               }
+                       }
+
+                       if ( $tabbar.parents( ".ui-footer" ).length  ) {
+                               $tabbar.find( "li" ).addClass( "ui-tab-btn-style" );
+                       }
+
+                       /* title tabbar */
+                       if ( $tabbar.siblings( ".ui-title" ).length ) {
+                               $tabbar.parents( ".ui-header" ).addClass( "ui-title-tabbar" );
+                       }
+
+                       if ( !iconpos ) {
+                               $tabbar.addClass( "ui-tabbar-noicons" );
+                       }
+                       if ( !textpos ) {
+                               $tabbar.addClass( "ui-tabbar-notext" );
+                       }
+                       if ( textpos && iconpos ) {
+                               $tabbar.parents( ".ui-header" ).addClass( "ui-title-tabbar-multiline" );
+                       }
+
+                       if ( $tabbar.find( "a" ).length ) {
+                               $tabbtns.buttonMarkup({
+                                       corners:        false,
+                                       shadow:         false,
+                                       iconpos:        iconpos
+                               });
+                       }
+
+                       if ( $tabbar.find( ".ui-state-persist" ).length ) {
+                               $tabbar.addClass( "ui-tabbar-persist" );
+                       }
+
+                       $tabbar.delegate( "a", "vclick", function ( event ) {
+                               $tabbtns.not( ".ui-state-persist" ).removeClass( $.mobile.activeBtnClass );
+                               $( this ).addClass( $.mobile.activeBtnClass );
+                       });
+
+                       $tabbar.addClass( "ui-tabbar");
+
+                       $( document ).bind( "pagebeforeshow", function ( event, ui ) {
+                               var footer_filter = $( event.target ).find( ":jqmData(role='footer')" ),
+                                       tabbar_filter = footer_filter.find( ":jqmData(role='tabbar')" ),
+                                       $elFooterMore = tabbar_filter.siblings( ":jqmData(icon='naviframe-more')" ),
+                                       $elFooterBack = tabbar_filter.siblings( ".ui-btn-back" );
+
+                               footer_filter
+                                       .css( "position", "fixed" )
+                                       .css( "bottom", 0 )
+                                       .css( "height", tabbar_filter.height() );
+                               if ( $elFooterMore.length ) {
+                                       tabbar_filter.addClass( "ui-tabbar-margin-more" );
+                               }
+                               if ( $elFooterBack.length ) {
+                                       tabbar_filter.addClass( "ui-tabbar-margin-back" );
+                               }
+
+                               isScrollingStart = false;
+                       });
+
+                       $( window ).bind( "tabbar.scrollstart", function ( e ) {
+                               if ( $( e.target ).find( ".ui-tabbar" ).length ) {
+                                       isScrollingStart = true;
+                                       isScrollingEnd = false;
+                               }
+                       });
+
+                       $( window ).bind( "tabbar.scrollstop", function ( e ) {
+                               var $tabbarScrollview = $( e.target ),
+                                       $minElement = $tabbar.find( "li" ).eq( 0 ),
+                                       minElementIndexVal = Math.abs( $tabbar.find( "li" ).eq( 0 ).offset().left ),
+                                       minElementIndex = -1;
+
+                               isScrollingEnd = true;
+                               if ( $( e.target ).find( ".ui-tabbar" ).length && isScrollingStart == true ) {
+                                       $tabbar.find( "li" ).each( function ( i ) {
+                                               var offset      = $tabbar.find( "li" ).eq( i ).offset();
+                                               if ( Math.abs( offset.left ) < minElementIndexVal ) {
+                                                       minElementIndexVal = Math.abs( offset.left );
+                                                       minElementIndex = i;
+                                                       $minElement = $tabbar.find( "li" ).eq( i );
+                                               }
+                                       });
+
+                                       if ( $tabbarScrollview.length && isScrollingStart == isScrollingEnd && minElementIndex != -1) {
+                                               isScrollingStart = false;
+                                               $tabbarScrollview.scrollview( "scrollTo", -( window.innerWidth / $( e.target ).find( ".ui-tabbar" ).data( "defaultList" ) * minElementIndex ) , 0, 357);
+                                       }
+                               }
+
+                               $( ".ui-tabbar-divider-left" ).hide();
+                               $( ".ui-tabbar-divider-right" ).hide();
+                       });
+
+                       $tabbar.bind( "touchstart vmousedown", function ( e ) {
+                               var $tabbarScroll = $( e.target ).parents( ".ui-scrollview-view" );
+                               if ( $tabbarScroll.offset() ) {
+                                       if ( $tabbarScroll.offset().left < 0 ) {
+                                               $( ".ui-tabbar-divider-left" ).show();
+                                       } else {
+                                               $( ".ui-tabbar-divider-left" ).hide();
+                                       }
+                                       if ( ( $tabbarScroll.width() - $tabbarScroll.parents( ".ui-scrollview-clip" ).width() ) ==  Math.abs( $tabbarScroll.offset().left ) ) {
+                                               $( ".ui-tabbar-divider-right" ).hide();
+                                       } else {
+                                               $( ".ui-tabbar-divider-right" ).show();
+                                       }
+                               }
+                       });
+
+                       this._bindTabbarEvents();
+               },
+
+               _bindTabbarEvents: function () {
+                       var $tabbar = this.element;
+
+                       $( window ).bind( "orientationchange", function ( e, ui ) {
+                               var ww = window.innerWidth || $( window ).width(),
+                                       wh = window.innerHeight || $( window ).height(),
+                                       isLandscape = ww > wh && ( ww - wh );
+
+                               if ( isLandscape ) {
+                                       $tabbar.removeClass( "ui-portrait-tabbar" ).addClass( "ui-landscape-tabbar" );
+                               } else {
+                                       $tabbar.removeClass( "ui-landscape-tabbar" ).addClass( "ui-portrait-tabbar" );
+                               }
+                       });
+               },
+
+               _setDisabled: function ( value, cnt ) {
+                       this.element.find( "li" ).eq( cnt ).attr( "disabled", value );
+                       this.element.find( "li" ).eq( cnt ).attr( "aria-disabled", value );
+               },
+
+               disable: function ( cnt ) {
+                       this._setDisabled( true, cnt );
+                       this.element.find( "li" ).eq( cnt ).addClass( "ui-disabled" );
+               },
+
+               enable: function ( cnt ) {
+                       this._setDisabled( false, cnt );
+                       this.element.find( "li" ).eq( cnt ).removeClass( "ui-disabled" );
+               }
+       });
+
+       //auto self-init widgets
+       $( document ).bind( "pagecreate create", function ( e ) {
+               $( $.tizen.tabbar.prototype.options.initSelector, e.target ).tabbar();
+       });
+}( jQuery ) );
+/* ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ *     Author: Kangsik Kim <kangsik81.kim@samsung.com>
+ *                             Minkyeong Kim <minkyeong.kim@samsung.com>
+*/
+
+/**
+ *     The TokenTextArea widget changes a text item to a button. It can be comprised of a number of button widgets. 
+ *     When a user types text and the text gets a specific event to change from a text to a button, 
+ *     the input text is changed to a TokenTextArea widget.
+ *     A user can add the TokenTextArea widget to a contact list, email list, or another list.
+ *     The typical use of this widget is composing a number of contacts or phone numbers in a specific area of the screen.
+ *
+ *     HTML Attributes:
+ *
+ *             data-link : Represents the page id.
+ *                             The page contains data for the user, for example, an address book.
+ *                             If the value is null, anchor button doesn't work. (Default : null)
+ *             data-label:     Provide a label for a user-guide. (Default : 'To : ')
+ *             data-description : This attribute is managing message format.
+ *                             This message is displayed when widget status was changed to 'focusout'. (Default : '+ {0}')
+ *
+ *     APIs:
+ *
+ *             inputtext (  [string]  )
+ *                     : If argument is not exist, will get a string from inputbox.
+ *                     If argument is exist, will set a string to inputbox.
+ *             select (  [number]  )
+ *                     : If no argument exists, gets a string of the selected block.
+ *                     If any button isn't selected on a token text area widget, this method returns "null" value.
+ *                     When a user call this method with an argument which is a number type,
+ *                     this method selects the button which is matched with the argument.
+ *             add ( text, [number] )
+ *                     :  If second argument does not exist, will insert to a new button at last position.
+ *                     Insert a new button at indexed position. The position is decided by the second argument.
+ *                     "index of position" means that the position of inserting a new button is decided by the second argument on "add" method.
+ *                     For example, if a user call the method like this "add("Tizen", 2)",
+ *                     new button labed "Tizen" will be inserted on the third position.
+ *             remove ( [number] )
+ *                     : If no argument exists, all buttons are removed.
+ *                     Remove a button at indexed position.
+ *                     The position is decided by the second argument. (index: index of button)
+ *             length ( void )
+ *                     : Get a number of buttons.
+ *             foucsIn ( void )
+ *                     : This method change a status to 'focusin'.
+ *                     This status is able to manage a widget.
+ *             focusOut ( void )
+ *                     : Changes the focus status to 'focus out'.
+ *                     The status is not able to manage a widget.
+ *                     All buttons that contained in the widget are removed and
+ *                     summarized message is displayed.
+ *             destroy ( void )
+ *                     : Remove all of the new DOM elements for the current widget that you created.
+ *
+ *     Events:
+ *
+ *             create : Occur when create TokenTextArea widget.
+ *             select : Occur when a button is selected.
+ *             add : Occur when new button is inserted.
+ *             remove : Occur when a button is removed.
+ *
+ *     Examples:
+ *
+ *             <div data-role="tokentextarea" data-label="To : " data-link:"#addressbook" data-description="+ {0}">
+ *             </div>
+ *
+ */
+
+
+/**
+       @class TokenTextArea
+       The TokenTextArea widget enables the user to enter text and convert it to a button. Each button that is created from entered text as a result of a change event forms a token text area widget. This widget is useful in composing an e-mail or SMS message to a group of addresses, each of which is a clickable item for more actions, such as copying, editing, or removing the address.
+
+       To add a token text area widget to the application, use the following code:
+
+               <div data-role="tokentextarea" data-label="To : " data-link="pageId">
+               </div>
+*/
+
+/**
+       @property {String}  data-label
+       Sets a label as a guide for the user.
+       For example, while composing an e-mail message, the 'To : ' label is a guide for the user to enter e-mail addresses.
+*/
+
+/**
+       @property {String} data-decription
+       Manages the message format.
+       The message is displayed when the widget status changes to focus out
+ */
+/**
+       @property {String} data-link
+       Sets the ID of the page to which the button links.
+*/
+/**
+       @event create
+       The create event is fired when the token text area widget is created:
+
+               <div data-role="tokentextarea">
+               </div>
+               // Option 01
+               $(".selector").tokentextarea
+               ({
+                       create: function(event, ui)
+                       {
+                               // Handle the create event
+                       }
+               });
+               // Option 02
+               $(".selector").bind("create", function(event, ui)
+               {
+                       // Handle the create event
+               });
+**/
+/**
+       @event select
+       The select event is fired when a token text area widget button is selected:
+
+               <div data-role="tokentextarea">
+               </div>
+               // Option 01
+               $(".selector").tokentextarea
+               ({
+                       select: function(event, ui)
+                       {
+                       // Handle the select event
+                       }
+               });
+               // Option 02
+               $(".selector").bind("select", function(event, ui)
+               {
+                       // Handle the select event
+               });     
+*/
+/**
+       @event add
+       The add event is fired when a token text area widget button is created:
+
+               <div data-role="tokentextarea">
+               </div>
+               // Option 01
+               $(".selector").tokentextarea
+               ({
+                       add: function(event, ui)
+                       {
+                               // Handle the add event
+                       }
+               });
+               // Option 02
+               $(".selector").bind("add", function(event, ui)
+               {
+               // Handle the add event
+               });
+*/
+/**
+       @event remove
+       The remove event is fired when a token text area widget button is removed:
+
+               <div data-role="tokentextarea">
+               </div>
+               // Option 01
+               $(".selector").tokentextarea
+               ({
+                       remove: function(event, ui)
+                       {
+                       // Handle the remove event
+                       }
+               });
+               // Option 02
+               $(".selector").bind("remove", function(event, ui)
+               {
+                       // Handle the remove event
+               });
+*/
+/**
+       @method destroy
+       The destroy method is used to remove in the current widget all the new DOM elements that you have created.
+       
+               <div data-role="tokentextarea">
+               </div>
+               $(".selector").tokentextarea("destroy");
+       
+       @since Tizen2.0
+*/
+/**
+       @method inputText
+       The inputText method is used to manage the widget input box text. If no parameter is set, the method gets the input box text. If a parameter is set, the parameter text is set in the input box.
+       
+               <div data-role="tokentextarea">
+               </div>
+               $(".selector").tokentextarea("inputText", [text]);
+*/
+/**
+       @method select
+       The select method is used to select a token text area widget button based on its index value. If no index value is defined, the method returns the string of the selected block. If there are no buttons present in the widget, the method returns null.
+
+               <div data-role="tokentextarea">
+               </div>
+               $(".selector").tokentextarea("select", [index]);
+*/
+/**
+       @method add
+       The add method is used to add a new token text area widget button with the specified label text at the specified index position. If the index parameter is not defined, the widget button is added at the bottom of the list. For example, the $(".selector").tokentextarea("add", "Tizen", 2) method call creates a new widget button labeled 'Tizen' at the third position in the widget.
+
+               <div data-role="tokentextarea">
+               </div>
+               $(".selector").tokentextarea("add", [text], [index]);
+*/
+/**
+       @method remove
+       The remove method is used to remove a token text area widget button at the specified index position. If the parameter is not defined, all the widget buttons are removed.
+
+               <div data-role="tokentextarea">
+               </div>
+               $(".selector").tokentextarea("remove", [index]);
+*/
+/**
+       @method length
+       The length method is used to retrieve the number of buttons in the token text area widget:
+               <div data-role="tokentextarea">
+               </div>
+               $(".selector").tokentextarea("length");
+*/
+/**
+       @method focusIn
+       The focusIn method is used to set the focus status to "focus in". This focus state enables the user to add or remove buttons in the token text area widget.
+
+               <div data-role="tokentextarea">
+               </div>
+               $(".selector").tokentextarea("focusIn");
+*/
+/**
+       @method focusOut
+       The focusOut method is used to set the focus status to "focus out". In this focus state, the user cannot manage the buttons in the widget, all the buttons are removed, and a message is displayed.
+
+               <div data-role="tokentextarea">
+               </div>
+               $(".selector").tokentextarea("focusOut");
+*/
+( function ( $, window, document, undefined ) {
+       $.widget( "tizen.tokentextarea", $.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 self = this,
+                               $view = this.element,
+                               role = $view.jqmData( "role" ),
+                               option = this.options,
+                               className = "ui-tokentextarea-link",
+                               inputbox = $( document.createElement( "input" ) ),
+                               labeltag = $( document.createElement( "label" ) ),
+                               moreBlock = $( document.createElement( "a" ) );
+
+                       $view.hide().empty().addClass( "ui-" + role );
+
+                       // create a label tag.
+                       $( labeltag ).text( option.label ).addClass( "ui-tokentextarea-label" );
+                       $view.append( labeltag );
+
+                       // create a input tag
+                       $( inputbox ).addClass( "ui-tokentextarea-input ui-tokentextarea-input-visible ui-input-text ui-body-s" );
+                       $view.append( inputbox );
+
+                       // create a anchor tag.
+                       if ( option.link === null || $.trim( option.link ).length < 1 || $( option.link ).length === 0 ) {
+                               className += "-dim";
+                       }
+                       $( moreBlock ).attr( "data-role", "button" )
+                               .buttonMarkup( {
+                                       inline: true,
+                                       icon: "plus",
+                                       style: "circle"
+                               })
+                               .attr( "href", $.trim( option.link ) )
+                               .addClass( "ui-tokentextarea-link-base" )
+                               .addClass( className );
+
+                       // append default htmlelements to main widget.
+                       $view.append( moreBlock );
+
+                       // bind a event
+                       this._bindEvents();
+                       self._focusStatus = "init";
+                       // display widget
+                       $view.show();
+                       $view.attr( "tabindex", -1 ).focusin( function ( e ) {
+                               self.focusIn();
+                       });
+
+                       // assign global variables
+                       self._viewWidth = $view.innerWidth();
+                       self._reservedWidth += self._calcBlockWidth( moreBlock );
+                       self._reservedWidth += self._calcBlockWidth( labeltag );
+                       self._fontSize = parseInt( $( moreBlock ).css( "font-size" ), 10 );
+                       self._currentWidth = self._reservedWidth;
+                       self._modifyInputBoxWidth();
+               },
+
+               // bind events
+               _bindEvents : function () {
+                       var self = this,
+                               $view = self.element,
+                               option = self.options,
+                               inputbox = $view.find( ".ui-tokentextarea-input" ),
+                               moreBlock = $view.find( ".ui-tokentextarea-link-base" ),
+                               isSeparator = false;
+
+                       // delegate a event to HTMLDivElement(each block).
+                       $view.delegate( "div", "click", function ( event ) {
+                               if ( $( this ).hasClass( "ui-tokentextarea-sblock" ) ) {
+                                       // If block is selected, it will be removed.
+                                       self._removeTextBlock();
+                               }
+
+                               var lockBlock = $view.find( "div.ui-tokentextarea-sblock" );
+                               if ( typeof lockBlock !== "undefined" ) {
+                                       lockBlock.removeClass( "ui-tokentextarea-sblock" ).addClass( "ui-tokentextarea-block" );
+                               }
+                               $( this ).removeClass( "ui-tokentextarea-block" ).addClass( "ui-tokentextarea-sblock" );
+                               self._trigger( "select" );
+                       });
+
+                       inputbox.bind( "keyup", function ( event ) {
+                               // 8  : backspace
+                               // 13 : Enter
+                               // 186 : semi-colon
+                               // 188 : comma
+                               var keyValue = event.keyCode,
+                                       valueString = $( inputbox ).val(),
+                                       valueStrings = [],
+                                       index;
+
+                               if ( keyValue === 8 ) {
+                                       if ( valueString.length === 0 ) {
+                                               self._validateTargetBlock();
+                                       }
+                               } else if ( keyValue === 13 || keyValue === 186 || keyValue === 188 ) {
+                                       if ( valueString.length !== 0 ) {
+                                               // split content by separators(',', ';')
+                                               valueStrings = valueString.split ( /[,;]/ );
+                                               for ( index = 0; index < valueStrings.length; index++ ) {
+                                                       if ( valueStrings[index].length !== 0 && valueStrings[index].replace( /\s/g, "" ).length !== 0 ) {
+                                                               self._addTextBlock( valueStrings[index] );
+                                                       }
+                                               }
+                                       }
+                                       inputbox.val( "" );
+                                       isSeparator = true;
+                               } else {
+                                       self._unlockTextBlock();
+                               }
+
+                               return !isSeparator;
+                       });
+
+                       moreBlock.click( function () {
+                               if ( $( moreBlock ).hasClass( "ui-tokentextarea-link-dim" ) ) {
+                                       return;
+                               }
+
+                               $( inputbox ).removeClass( "ui-tokentextarea-input-visible" ).addClass( "ui-tokentextarea-input-invisible" );
+
+                               $.mobile.changePage( option.link, {
+                                       transition: "slide",
+                                       reverse: false,
+                                       changeHash: false
+                               });
+                       });
+
+                       $( document ).bind( "pagechange.mbe", function ( event ) {
+                               if ( $view.innerWidth() === 0 ) {
+                                       return ;
+                               }
+                               var inputBox = $view.find( ".ui-tokentextarea-input" );
+                               self._modifyInputBoxWidth();
+                               $( inputbox ).removeClass( "ui-tokentextarea-input-invisible" ).addClass( "ui-tokentextarea-input-visible" );
+                       });
+
+                       $view.bind( "click", function ( event ) {
+                               if ( self._focusStatus === "focusOut" ) {
+                                       self.focusIn();
+                               }
+                       });
+               },
+
+               // create a textbutton and append this button to parent layer.
+               // @param arg1 : string
+               // @param arg2 : index
+               _addTextBlock : function ( messages, blockIndex ) {
+                       if ( arguments.length === 0 ) {
+                               return;
+                       }
+
+                       if ( !messages ) {
+                               return ;
+                       }
+
+                       var self = this,
+                               $view = self.element,
+                               content = messages,
+                               index = blockIndex,
+                               blocks = null,
+                               textBlock = null;
+
+                       if ( self._viewWidth === 0 ) {
+                               self._viewWidth = $view.innerWidth();
+                       }
+
+                       // Create a new text HTMLDivElement.
+                       textBlock = $( document.createElement( 'div' ) );
+
+                       textBlock.text( content ).addClass( "ui-tokentextarea-block" );
+                       textBlock.css( {'visibility': 'hidden'} );
+
+                       blocks = $view.find( "div" );
+                       if ( index !== null && index <= blocks.length ) {
+                               $( blocks[index] ).before( textBlock );
+                       } else {
+                               $view.find( ".ui-tokentextarea-input" ).before( textBlock );
+                       }
+
+                       textBlock = self._ellipsisTextBlock( textBlock );
+                       textBlock.css( {'visibility': 'visible'} );
+
+                       self._currentWidth += self._calcBlockWidth( textBlock );
+                       self._modifyInputBoxWidth();
+                       self._trigger( "add" );
+               },
+
+               _removeTextBlock : function () {
+                       var self = this,
+                               $view = this.element,
+                               lockBlock = $view.find( "div.ui-tokentextarea-sblock" );
+
+                       if ( lockBlock !== null && lockBlock.length > 0 ) {
+                               self._currentWidth -= self._calcBlockWidth( lockBlock );
+                               lockBlock.remove();
+                               self._modifyInputBoxWidth();
+                               this._trigger( "remove" );
+                       } else {
+                               $view.find( "div:last" ).removeClass( "ui-tokentextarea-block" ).addClass( "ui-tokentextarea-sblock" );
+                       }
+               },
+
+               _calcBlockWidth : function ( block ) {
+                       return $( block ).outerWidth( true );
+               },
+
+               _unlockTextBlock : function () {
+                       var $view = this.element,
+                               lockBlock = $view.find( "div.ui-tokentextarea-sblock" );
+                       if ( lockBlock ) {
+                               lockBlock.removeClass( "ui-tokentextarea-sblock" ).addClass( "ui-tokentextarea-block" );
+                       }
+               },
+
+               // call when remove text block by backspace key.
+               _validateTargetBlock : function () {
+                       var self = this,
+                               $view = self.element,
+                               lastBlock = $view.find( "div:last" ),
+                               tmpBlock = null;
+
+                       if ( lastBlock.hasClass( "ui-tokentextarea-sblock" ) ) {
+                               self._removeTextBlock();
+                       } else {
+                               tmpBlock = $view.find( "div.ui-tokentextarea-sblock" );
+                               tmpBlock.removeClass( "ui-tokentextarea-sblock" ).addClass( "ui-tokentextarea-block" );
+                               lastBlock.removeClass( "ui-tokentextarea-block" ).addClass( "ui-tokentextarea-sblock" );
+                       }
+               },
+
+               _ellipsisTextBlock : function ( textBlock ) {
+                       var self = this,
+                               $view = self.element,
+                               maxWidth = self._viewWidth - ( self._labelWidth + self._anchorWidth ) * 2;
+
+                       if ( self._calcBlockWidth( textBlock ) > maxWidth ) {
+                               $( textBlock ).width( maxWidth - self._marginWidth );
+                       }
+
+                       return textBlock;
+               },
+
+               _modifyInputBoxWidth : function () {
+                       var self = this,
+                               $view = self.element,
+                               margin = 0,
+                               labelWidth = 0,
+                               anchorWidth = 0,
+                               inputBoxWidth = 0,
+                               blocks = $view.find( "div" ),
+                               blockWidth = 0,
+                               index = 0,
+                               inputBoxMargin = 10,
+                               inputBox = $view.find( ".ui-tokentextarea-input" );
+
+                       if ( $view.width() === 0 ) {
+                               return;
+                       }
+
+                       if ( self._labelWidth === 0 ) {
+                               self._labelWidth = $view.find( ".ui-tokentextarea-label" ).outerWidth( true );
+                               self._anchorWidth = $view.find( ".ui-tokentextarea-link-base" ).outerWidth( true );
+                               self._marginWidth = parseInt( ( $( inputBox ).css( "margin-left" ) ), 10 );
+                               self._marginWidth += parseInt( ( $( inputBox ).css( "margin-right" ) ), 10 );
+                               self._viewWidth = $view.innerWidth();
+                       }
+
+                       margin = self._marginWidth;
+                       labelWidth = self._labelWidth;
+                       anchorWidth = self._anchorWidth;
+                       inputBoxWidth = self._viewWidth - labelWidth;
+
+                       for ( index = 0; index < blocks.length; index += 1 ) {
+                               blockWidth = self._calcBlockWidth( blocks[index] );
+
+                               if ( blockWidth >= inputBoxWidth + anchorWidth ) {
+                                       if ( blockWidth >= inputBoxWidth ) {
+                                               inputBoxWidth = self._viewWidth - blockWidth;
+                                       } else {
+                                               inputBoxWidth = self._viewWidth;
+                                       }
+                               } else {
+                                       if ( blockWidth >= inputBoxWidth ) {
+                                               inputBoxWidth = self._viewWidth - blockWidth;
+                                       } else {
+                                               inputBoxWidth -= blockWidth;
+                                       }
+                               }
+                       }
+
+                       inputBoxWidth -= margin;
+                       if ( inputBoxWidth < anchorWidth * 2 ) {
+                               inputBoxWidth = self._viewWidth - margin;
+                       }
+                       $( inputBox ).width( inputBoxWidth - anchorWidth - inputBoxMargin );
+               },
+
+               _stringFormat : function ( expression ) {
+                       var pattern = null,
+                               message = expression,
+                               i = 0;
+                       for ( i = 1; i < arguments.length; i += 1 ) {
+                               pattern = "{" + ( i - 1 ) + "}";
+                               message = message.replace( pattern, arguments[i] );
+                       }
+                       return message;
+               },
+
+               _resizeBlocks : function () {
+                       var self = this,
+                               $view = self.element,
+                               blocks = $view.find( "div" ),
+                               index = 0;
+
+                       for ( index = 0 ; index < blocks.length ; index += 1 ) {
+                               $( blocks[index] ).css( "width", "auto" );
+                               blocks[index] = self._ellipsisTextBlock( blocks[index] );
+                       }
+               },
+
+               //---------------------------------------------------- //
+               //                                      Public Method   //
+               //----------------------------------------------------//
+               //
+               // Focus In Event
+               //
+               focusIn : function () {
+                       if ( this._focusStatus === "focusIn" ) {
+                               return;
+                       }
+
+                       var $view = this.element;
+
+                       $view.find( "label" ).show();
+                       $view.find( ".ui-tokentextarea-desclabel" ).remove();
+                       $view.find( "div.ui-tokentextarea-sblock" ).removeClass( "ui-tokentextarea-sblock" ).addClass( "ui-tokentextarea-block" );
+                       $view.find( "div" ).show();
+                       $view.find( ".ui-tokentextarea-input" ).removeClass( "ui-tokentextarea-input-invisible" ).addClass( "ui-tokentextarea-input-visible" );
+                       $view.find( "a" ).show();
+
+                       // change focus state.
+                       this._modifyInputBoxWidth();
+                       this._focusStatus = "focusIn";
+                       $view.removeClass( "ui-tokentextarea-focusout" ).addClass( "ui-tokentextarea-focusin" );
+               },
+
+               focusOut : function () {
+                       if ( this._focusStatus === "focusOut" ) {
+                               return;
+                       }
+
+                       var self = this,
+                               $view = self.element,
+                               tempBlock = null,
+                               statement = "",
+                               index = 0,
+                               lastIndex = 10,
+                               label = $view.find( "label" ),
+                               more = $view.find( "span" ),
+                               blocks = $view.find( "div" ),
+                               currentWidth = $view.outerWidth( true ) - more.outerWidth( true ) - label.outerWidth( true ),
+                               blockWidth = 0;
+
+                       $view.find( ".ui-tokentextarea-input" ).removeClass( "ui-tokentextarea-input-visible" ).addClass( "ui-tokentextarea-input-invisible" );
+                       $view.find( "a" ).hide();
+                       blocks.hide();
+
+                       currentWidth = currentWidth - self._reservedWidth;
+
+                       for ( index = 0; index < blocks.length; index++ ) {
+                               blockWidth = $( blocks[index] ).outerWidth( true );
+                               if ( currentWidth - blockWidth <= 0 ) {
+                                       lastIndex = index - 1;
+                                       break;
+                               }
+
+                               $( blocks[index] ).show();
+                               currentWidth -= blockWidth;
+                       }
+
+                       if ( lastIndex !== blocks.length ) {
+                               statement = self._stringFormat( self.options.description, blocks.length - lastIndex - 1 );
+                               tempBlock = $( document.createElement( 'label' ) );
+                               tempBlock.text( statement );
+                               tempBlock.addClass( "ui-tokentextarea-desclabel" ).addClass( "ui-tokentextarea-desclabel" );
+                               $( blocks[lastIndex] ).after( tempBlock );
+                       }
+
+                       // update focus state
+                       this._focusStatus = "focusOut";
+                       $view.removeClass( "ui-tokentextarea-focusin" ).addClass( "ui-tokentextarea-focusout" );
+               },
+
+               inputText : function ( message ) {
+                       var $view = this.element;
+
+                       if ( arguments.length === 0 ) {
+                               return $view.find( ".ui-tokentextarea-input" ).val();
+                       }
+                       $view.find( ".ui-tokentextarea-input" ).val( message );
+                       return message;
+               },
+
+               select : function ( index ) {
+                       var $view = this.element,
+                               lockBlock = null,
+                               blocks = null;
+
+                       if ( this._focusStatus === "focusOut" ) {
+                               return;
+                       }
+
+                       if ( arguments.length === 0 ) {
+                               // return a selected block.
+                               lockBlock = $view.find( "div.ui-tokentextarea-sblock" );
+                               if ( lockBlock ) {
+                                       return lockBlock.text();
+                               }
+                               return null;
+                       }
+                       // 1. unlock all blocks.
+                       this._unlockTextBlock();
+                       // 2. select pointed block.
+                       blocks = $view.find( "div" );
+                       if ( blocks.length > index ) {
+                               $( blocks[index] ).removeClass( "ui-tokentextarea-block" ).addClass( "ui-tokentextarea-sblock" );
+                               this._trigger( "select" );
+                       }
+                       return null;
+               },
+
+               add : function ( message, position ) {
+                       if ( this._focusStatus === "focusOut" ) {
+                               return;
+                       }
+
+                       this._addTextBlock( message, position );
+               },
+
+               remove : function ( position ) {
+                       var self = this,
+                               $view = this.element,
+                               blocks = $view.find( "div" ),
+                               index = 0;
+                       if ( this._focusStatus === "focusOut" ) {
+                               return;
+                       }
+
+                       if ( arguments.length === 0 ) {
+                               blocks.remove();
+                               this._trigger( "clear" );
+                       } else if ( !isNaN( position ) ) {
+                               // remove selected button
+                               index = ( ( position < blocks.length ) ? position : ( blocks.length - 1 ) );
+                               $( blocks[index] ).remove();
+                               this._trigger( "remove" );
+                       }
+                       self._modifyInputBoxWidth();
+               },
+
+               length : function () {
+                       return this.element.find( "div" ).length;
+               },
+
+               refresh : function () {
+                       var self = this,
+                               $view = this.element;
+
+                       self._viewWidth = $view.innerWidth();
+                       self._resizeBlocks();
+                       self._modifyInputBoxWidth();
+               },
+
+               destroy : function () {
+                       var $view = this.element;
+
+                       $view.find( "label" ).remove();
+                       $view.find( "div" ).undelegate( "click" ).remove();
+                       $view.find( "a" ).remove();
+                       $view.find( ".ui-tokentextarea-input" ).unbind( "keyup" ).remove();
+
+                       this._trigger( "destroy" );
+               }
+       });
+
+       $( document ).bind( "pagecreate create", function () {
+               $( ":jqmData(role='tokentextarea')" ).tokentextarea();
+       });
+
+       $( window ).bind( "resize", function () {
+               $( ":jqmData(role='tokentextarea')" ).tokentextarea( "refresh" );
+       });
+} ( jQuery, window, document ) );
+/*
+ * This software is licensed under the MIT licence (as defined by the OSI at
+ * http://www.opensource.org/licenses/mit-license.php)
+ *
+ * ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2011 by Intel Corporation Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ */
+
+( function ($, undefined) {
+
+       $.widget( "tizen.triangle", $.tizen.widgetex, {
+               options: {
+                       extraClass: "",
+                       offset: null,
+                       color: null,
+                       location: "top",
+                       initSelector: ":jqmData(role='triangle')"
+               },
+
+               _create: function () {
+                       var triangle = $( "<div></div>", {"class" : "ui-triangle"} );
+
+                       $.extend(this, {
+                               _triangle: triangle
+                       });
+
+                       this.element.addClass( "ui-triangle-container" ).append( triangle );
+               },
+
+               _doCSS: function () {
+                       var location = ( this.options.location || "top" ),
+                               offsetCoord = ( ($.inArray(location, ["top", "bottom"]) === -1) ? "top" : "left"),
+                               cssArg = {
+                                       "border-bottom-color" : "top"    === location ? this.options.color : "transparent",
+                                       "border-top-color"    : "bottom" === location ? this.options.color : "transparent",
+                                       "border-left-color"   : "right"  === location ? this.options.color : "transparent",
+                                       "border-right-color"  : "left"   === location ? this.options.color : "transparent"
+                               };
+
+                       cssArg[offsetCoord] = this.options.offset;
+
+                       this._triangle.removeAttr( "style" ).css( cssArg );
+               },
+
+               _setOffset: function ( value ) {
+                       this.options.offset = value;
+                       this.element.attr( "data-" + ($.mobile.ns || "") + "offset", value );
+                       this._doCSS();
+               },
+
+               _setExtraClass: function ( value ) {
+                       this._triangle.addClass( value );
+                       this.options.extraClass = value;
+                       this.element.attr( "data-" + ($.mobile.ns || "") + "extra-class", value );
+               },
+
+               _setColor: function ( value ) {
+                       this.options.color = value;
+                       this.element.attr( "data-" + ($.mobile.ns || "") + "color", value );
+                       this._doCSS();
+               },
+
+               _setLocation: function ( value ) {
+                       this.element
+                               .removeClass( "ui-triangle-container-" + this.options.location )
+                               .addClass( "ui-triangle-container-" + value );
+                       this._triangle
+                               .removeClass( "ui-triangle-" + this.options.location )
+                               .addClass( "ui-triangle-" + value );
+
+                       this.options.location = value;
+                       this.element.attr( "data-" + ($.mobile.ns || "") + "location", value );
+
+                       this._doCSS();
+               }
+       });
+
+       $( document ).bind( "pagecreate create", function ( e ) {
+           $($.tizen.triangle.prototype.options.initSelector, e.target)
+               .not(":jqmData(role='none'), :jqmData(role='nojs')")
+               .triangle();
+       });
+
+}(jQuery) );
+/* ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ *     Author: Kangsik Kim <kangsik81.kim@samsung.com>
+ *                     Youmin Ha <youmin.ha@samsung.com>
+*/
+
+/**
+ * In the web environment, it is challenging to display a large amount of data in a grid.
+ * When an application needs to show, for example, image gallery with over 1,000 images,
+ * the same enormous data must be inserted into a HTML document.
+ * It takes a long time to display the data and manipulating DOM is complex.
+ * The virtual grid widget supports storing unlimited data without performance issues
+ * by reusing a limited number of grid elements.
+ * The virtual grid widget is based on the jQuery.template plug-in 
+ * For more information, see jQuery.template.
+ *
+ * HTML Attributes:
+ *
+ *             data-role:  virtualgrid
+ *             data-template : Has the ID of the jQuery.template element.
+ *                                             jQuery.template for a virtual grid must be defined.
+ *                                             Style for template would use rem unit to support scalability.
+ *             data-direction : This option define the direction of the scroll.
+ *                                             You must choose one of the 'x' and 'y' (Default : y)
+ *             data-rotation : This option defines whether or not the circulation of the data.
+ *                                             If option is 'true' and scroll is reached the last data,
+ *                                             Widget will present the first data on the screen.
+ *                                             If option is ‘false’, Widget will operate like a scrollview.
+ *
+ *             ID : <DIV> element that has "data-role=virtualgrid" must have ID attribute.
+ *
+ * APIs:
+ *
+ *             create ( {
+ *                             itemData: function ( idx ) { return json_obj; },
+ *                             numItemData: number or function () { return number; },
+ *                             cacheItemData: function ( minIdx, maxIdx ) {}
+ *                             } )
+ *                     : Create VirtualGrid widget. At this moment, _create method is called.
+ *                     args : A collection of options
+ *                             itemData: A function that returns JSON object for given index. Mandatory.
+ *                             numItemData: Total number of itemData. Mandatory.
+ *                             cacheItemData: Virtuallist will ask itemData between minIdx and maxIdx.
+ *                             Developers can implement this function for preparing data.
+ *                             Optional.
+ *
+ *             centerTo ( String )
+ *                     : Find a DOM Element with the given class name.
+ *                     This element will be centered on the screen.
+ *                     Serveral elements were found, the first element is displayed.
+ *
+ * Events:
+ *             scrollstart : : This event triggers when a user begin to move the scroll on VirtualGrid.
+ *             scrollupdate : : This event triggers while a user moves the scroll on VirtualGrid.
+ *             scrollstop : This event triggers when a user stop the scroll on VirtualGrid.
+ *             select : This event triggers when a cell is selected.
+ *
+ * Examples:
+ *
+ *                     <script id="tizen-demo-namecard" type="text/x-jquery-tmpl">
+ *                             <div class="ui-demo-namecard">
+ *                                     <div class="ui-demo-namecard-pic">
+ *                                             <img class="ui-demo-namecard-pic-img" src="${TEAM_LOGO}" />
+ *                                     </div>
+ *                                     <div class="ui-demo-namecard-contents">
+ *                                             <span class="name ui-li-text-main">${NAME}</span>
+ *                                             <span class="active ui-li-text-sub">${ACTIVE}</span>
+ *                                             <span class="from ui-li-text-sub">${FROM}</span>
+ *                                     </div>
+ *                             </div>
+ *                     </script>
+ *                     <div id="virtualgrid-demo" data-role="virtualgrid" data-template="tizen-demo-namecard" >
+ *                     </div>
+ *
+ */
+
+// most of following codes are derived from jquery.mobile.scrollview.js
+
+/**
+       @class VirtualGrid
+       In the Web environment, it is challenging to display large amount of data in a list, such as displaying a contact list of over 1000 list items. It takes time to display the entire list in HTML and the DOM manipulation is complex.
+
+       The virtual grid widget is used to display a list of unlimited data elements on the screen for better performance. This widget displays the data in the grid format by reusing the existing grid control space. Virtual grids are based on the jQuery.template plugin as described in the jQuery documentation for jQuery.template plugin.
+
+       To add a virtual grid widget to the application, use the following code:
+
+               <script id="tizen-demo-namecard" type="text/x-jquery-tmpl">
+                       <div class="ui-demo-namecard">
+                               <div class="ui-demo-namecard-pic">
+                                       <img class="ui-demo-namecard-pic-img" src="${TEAM_LOGO}" />
+                               </div>
+                               <div class="ui-demo-namecard-contents">
+                               <span class="name ui-li-text-main">${NAME}</span>
+                               </div>
+                       </div>
+               </script>
+               <div id="virtualgrid-demo" data-role="virtualgrid" data-template="tizen-demo-namecard">
+               </div>
+*/
+/**
+       @property {String} data-template
+       Specifies the jQuery.template element ID.
+       The jQuery.template must be defined. The template style can use rem units to support scalability.
+*/
+/**
+       @property {String} data-direction
+       Defines the scroll direction. The direction options are x (horizontal) and y (vertical).
+       The default value is y.
+*/
+/**
+       @property {Boolean} data-rotation
+       Defines whether the data elements are displayed from the beginning of the list again once the end of file is reached.
+       The default value is false.
+*/
+/**
+       @event scrollstart
+       The scrollstart event is fired when the user starts scrolling through the grid:
+
+               <div data-role="virtualgrid" data-scroll="y" data-template="tizen-demo-namecard"></div>
+               // Option 01
+               $(".selector").virtualgrid
+               ({
+                       scrollstart: function(event, ui)
+                       {
+                       // Handle the scrollstart event
+                       }
+               });
+               // Option 02
+               $(".selector").bind("scrollstart", function(event, ui)
+               {
+               // Handle the scrollstart event
+               });
+*/
+/**
+       @event scrollupdate
+       The scrollupdate event is fired when the user moves the scroll bar in the grid:
+
+               <div data-role="virtualgrid" data-scroll="y" data-template="tizen-demo-namecard"></div>
+               // Option 01
+               $(".selector").virtualgrid
+               ({
+                       scrollupdate: function(event, ui)
+                       {
+                       // Handle the scrollupdate event
+                       }
+               });
+               // Option 02
+               $(".selector").bind("scrollupdate", function(event, ui)
+               {
+               // Handle the scrollupdate event
+               });
+*/
+/**
+       @event scrollstop
+       The scrollstop event is fired when the user stops scrolling:
+
+               <div data-role="virtualgrid" data-scroll="y" data-template="tizen-demo-namecard"></div>
+               // Option 01
+               $(".selector").virtualgrid
+               ({
+                       scrollstop: function(event, ui)
+                       {
+                       // Handle the scrollstop event
+                       }
+               });
+               // Option 02
+               $(".selector").bind("scrollstop", function(event, ui)
+               {
+               // Handle the scrollstop event
+               });
+*/
+/**
+       @event select
+       The select event is fired when a virtual grid cell is selected:
+
+               <div data-role="virtualgrid" data-scroll="y" data-template="tizen-demo-namecard"></div>
+               // Option 01
+               $(".selector").virtualgrid
+               ({
+                       select: function(event, ui)
+                       {
+                       // Handle the select event
+                       }
+               });
+               // Option 02
+               $(".selector").bind("select", function(event, ui)
+               {
+               // Handle the select event
+               });
+*/
+/**
+       @method create
+       @param {function} itemData(index)
+       @param {Number} numItemData
+       @param {function} cacheItemData(minIndex, maxIndex)
+       The create method is used to call the jQuery _create method. In the method parameters:
+
+       function itemData(index) returns the JSON object matched with the given index. The index value is between 0 and numItemData-1.<br/>
+       number numItemData or function numItemData() defines or returns a static number of items.<br/>
+       function cacheItemData(minIndex, maxIndex) prepares the JSON data. This method is called before calling the itemData() method with index values between minIndex and maxIndex.<br/>
+
+               <div data-role="virtualgrid" data-scroll="y" data-template="tizen-demo-namecard"></div>
+                       function itemData(idx)
+                       {
+                               return DATA[idx];
+                       }
+                       function cacheItemData(minIdx, maxIdx)
+                       {
+                       // Prepare JSON data between minIdx and maxIdx
+                       }
+                       var numItemData = DATA.length;
+                       $(".selector").virtualgrid("create",
+                       {
+                               itemData, numItemData, cacheItemData
+                       });
+*/
+/**
+       @method centerTo
+       The centerTo method is used to search for the DOM element with a specified class name. The retrieved element is placed at the center of the virtual grid. If multiple elements are retrieved, the first element from the result list is placed at the center of the virtual grid.
+
+               <div data-role="virtualgrid" data-scroll="y" data-template="tizen-demo-namecard"></div>
+               $(".selector").virtualgrid("centerTo", "selector");
+*/
+/**
+       @method resize
+       The resize method is used to rearrange the DOM elements to fit a new screen size when the screen is resized:
+
+               <div data-role="virtualgrid" data-scroll="y" data-template="tizen-demo-namecard"></div>
+               ".selector").virtualgrid("resize");
+
+       @since Tizen2.0
+*/
+
+( function ($, window, document, undefined) {
+
+       function circularNum (num, total) {
+               var n = num % total;
+               if (n < 0) {
+                       n = total + n;
+               }
+               return n;
+       }
+
+       function MomentumTracker (options) {
+               this.options = $.extend({}, options);
+               this.easing = "easeOutQuad";
+               this.reset();
+       }
+
+       var tstates = {
+               scrolling : 0,
+               done : 1
+       };
+
+       function getCurrentTime () {
+               return Date.now();
+       }
+
+       $.extend (MomentumTracker.prototype, {
+               start : function (pos, speed, duration) {
+                       this.state = (speed !== 0 ) ? tstates.scrolling : tstates.done;
+                       this.pos = pos;
+                       this.speed = speed;
+                       this.duration = duration;
+
+                       this.fromPos = 0;
+                       this.toPos = 0;
+
+                       this.startTime = getCurrentTime();
+               },
+
+               reset : function () {
+                       this.state = tstates.done;
+                       this.pos = 0;
+                       this.speed = 0;
+                       this.duration = 0;
+               },
+
+               update : function () {
+                       var state = this.state, duration, elapsed, dx, x;
+
+                       if (state == tstates.done) {
+                               return this.pos;
+                       }
+                       duration = this.duration;
+                       elapsed = getCurrentTime () - this.startTime;
+                       elapsed = elapsed > duration ? duration : elapsed;
+                       dx = this.speed * (1 - $.easing[this.easing] (elapsed / duration, elapsed, 0, 1, duration) );
+                       x = this.pos + dx;
+                       this.pos = x;
+
+                       if (elapsed >= duration) {
+                               this.state = tstates.done;
+                       }
+                       return this.pos;
+               },
+
+               done : function () {
+                       return this.state == tstates.done;
+               },
+
+               getPosition : function () {
+                       return this.pos;
+               }
+       });
+
+       jQuery.widget ("mobile.virtualgrid", jQuery.mobile.widget, {
+               options : {
+                       // virtualgrid option
+                       template : "",
+                       direction : "y",
+                       rotation : false,
+               },
+
+               create : function () {
+                       this._create.apply( this, arguments );
+               },
+
+               _create : function ( args ) {
+                       $.extend(this, {
+                               // view
+                               _$view : null,
+                               _$clip : null,
+                               _$rows : null,
+                               _tracker : null,
+                               _viewSize : 0,
+                               _clipSize : 0,
+                               _cellSize : undefined,
+                               _currentItemCount : 0,
+                               _itemCount : 1,
+                               _inheritedSize : null,
+
+                               // timer
+                               _timerInterval : 0,
+                               _timerID : 0,
+                               _timerCB : null,
+                               _lastMove : null,
+
+                               // Data
+                               _itemData : function ( idx ) { return null; },
+                               _numItemData : 0,
+                               _cacheItemData : function ( minIdx, maxIdx ) { },
+                               _totalRowCnt : 0,
+                               _template : null,
+                               _maxViewSize : 0,
+                               _modifyViewPos : 0,
+                               _maxSize : 0,
+
+                               // axis - ( true : x , false : y )
+                               _direction : false,
+                               _didDrag : true,
+                               _reservedPos : 0,
+                               _scalableSize : 0,
+                               _eventPos : 0,
+                               _nextPos : 0,
+                               _movePos : 0,
+                               _lastY : 0,
+                               _speedY : 0,
+                               _lastX : 0,
+                               _speedX : 0,
+                               _rowsPerView : 0,
+                               _fragment : null,
+
+                               _filterRatio : 0.9
+                       });
+
+                       var self = this,
+                               $dom = $(self.element),
+                               opts = self.options,
+                               $item = null;
+
+                       // itemData
+                       // If mandatory options are not given, Do nothing.
+                       if ( !args ) {
+                               return ;
+                       }
+
+                       if ( !self._loadData(args) ) {
+                               return;
+                       }
+
+                       // make a fragment.
+                       self._fragment = document.createDocumentFragment();
+
+                       // read defined properties(width and height) from dom element.
+                       self._inheritedSize = self._getinheritedSize(self.element);
+
+                       // set a scroll direction.
+                       self._direction = opts.direction === 'x' ? true : false;
+
+                       // make view layer
+                       self._$clip = $(self.element).addClass("ui-scrollview-clip").addClass("ui-virtualgrid-view");
+                       $item = $(document.createElement("div")).addClass("ui-scrollview-view");
+                       self._clipSize =  self._calculateClipSize();
+                       self._$clip.append($item);
+                       self._$view = $item;
+                       self._$clip.css("overflow", "hidden");
+                       self._$view.css("overflow", "hidden");
+
+                       // inherit from scrollview widget.
+                       self._scrollView = $.tizen.scrollview.prototype;
+                       self._initScrollView();
+
+                       // create tracker.
+                       self._createTracker();
+                       self._makePositioned(self._$clip);
+                       self._timerInterval = 1000 / self.options.fps;
+
+                       self._timerID = 0;
+                       self._timerCB = function () {
+                               self._handleMomentumScroll();
+                       };
+                       $dom.closest(".ui-content").addClass("ui-virtualgrid-content").css("overflow", "hidden");
+
+                       // add event handler.
+                       self._addBehaviors();
+
+                       self._currentItemCount = 0;
+                       self._createScrollBar();
+                       self.refresh();
+               },
+
+               // The argument is checked for compliance with the specified format.
+               // @param args   : Object
+               // @return boolean
+               _loadData : function ( args ) {
+                       var self = this;
+
+                       if ( args.itemData && typeof args.itemData == 'function'  ) {
+                               self._itemData = args.itemData;
+                       } else {
+                               return false;
+                       }
+                       if ( args.numItemData ) {
+                               if ( typeof args.numItemData == 'function' ) {
+                                       self._numItemData = args.numItemData( );
+                               } else if ( typeof args.numItemData == 'number' ) {
+                                       self._numItemData = args.numItemData;
+                               } else {
+                                       return false;
+                               }
+                       } else {
+                               return false;
+                       }
+                       return true;
+               },
+
+               // Make up the first screen.
+               _initLayout: function () {
+                       var self = this,
+                               opts = self.options,
+                               i,
+                               $row;
+
+                       for ( i = -1; i < self._rowsPerView + 1; i += 1 ) {
+                               $row = self._$rows[ circularNum( i, self._$rows.length ) ];
+                               self._$view.append( $row );
+                       }
+                       self._setElementTransform( -self._cellSize );
+
+                       self._replaceRow(self._$view.children().first(), self._totalRowCnt - 1);
+                       if ( opts.rotation && self._rowsPerView >= self._totalRowCnt ) {
+                               self._replaceRow(self._$view.children().last(), 0);
+                       }
+                       self._setViewSize();
+               },
+
+               _setViewSize : function () {
+                       var self = this,
+                               height = 0,
+                               width = 0;
+
+                       if ( self._direction ) {
+                               width = self._cellSize * ( self._rowsPerView + 2 );
+                               width = parseInt(width, 10) + 1;
+                               self._$view.width( width );
+                               self._viewSize = self._$view.width();
+                       } else {
+                               self._$view.height( self._cellSize * ( self._rowsPerView + 2 ) );
+                               self._$clip.height( self._clipSize );
+                               self._viewSize = self._$view.height();
+                       }
+               },
+
+               _getViewHeight : function () {
+                       var self = this;
+                       return self._$view.height();
+               },
+
+               refresh : function () {
+                       var self = this,
+                               opts = self.options,
+                               width = 0,
+                               height = 0;
+
+                       self._template = $( "#" + opts.template );
+                       if ( !self._template ) {
+                               return ;
+                       }
+
+                       width = self._calculateClipWidth();
+                       height = self._calculateClipHeight();
+                       self._$view.width(width).height(height);
+                       self._$clip.width(width).height(height);
+
+                       self._clipSize = self._calculateClipSize();
+                       self._calculateColumnSize();
+                       self._initPageProperty();
+                       self._setScrollBarSize();
+               },
+
+               _initPageProperty : function () {
+                       var self = this,
+                               rowsPerView = 0,
+                               $child,
+                               columnCount = 0,
+                               totalRowCnt = 0,
+                               attributeName = self._direction ? "width" : "height";
+
+                       columnCount = self._calculateColumnCount();
+
+                       totalRowCnt = parseInt(self._numItemData / columnCount , 10 );
+                       self._totalRowCnt = self._numItemData % columnCount === 0 ? totalRowCnt : totalRowCnt + 1;
+                       self._itemCount = columnCount;
+
+                       if ( self._cellSize <= 0) {
+                               return ;
+                       }
+
+                       rowsPerView = self._clipSize / self._cellSize;
+                       rowsPerView = Math.ceil( rowsPerView );
+                       self._rowsPerView = parseInt( rowsPerView, 10);
+
+                       $child = self._makeRows( rowsPerView + 2 );
+                       $(self._$view).append($child.children());
+                       self._$view.children().css(attributeName, self._cellSize + "px");
+                       self._$rows = self._$view.children().detach();
+
+                       self._reservedPos = -self._cellSize;
+                       self._scalableSize = -self._cellSize;
+
+                       self._initLayout();
+
+                       self._blockScroll = self._rowsPerView > self._totalRowCnt;
+                       self._maxSize = ( self._totalRowCnt - self._rowsPerView ) * self._cellSize;
+                       self._maxViewSize = ( self._rowsPerView ) * self._cellSize;
+                       self._modifyViewPos = -self._cellSize;
+                       if ( self._clipSize < self._maxViewSize ) {
+                               self._modifyViewPos = (-self._cellSize) + ( self._clipSize - self._maxViewSize );
+                       }
+               },
+
+               _getinheritedSize : function ( elem ) {
+                       var $target = $(elem),
+                               height,
+                               width,
+                               NODETYPE = { ELEMENT_NODE : 1, TEXT_NODE : 3 },
+                               ret = {
+                                       isDefinedWidth : false,
+                                       isDefinedHeight : false,
+                                       width : 0,
+                                       height : 0
+                               };
+
+                       while ( $target[0].nodeType === NODETYPE.ELEMENT_NODE && (ret.isDefinedWidth === false || ret.isHeightDefined === false )) {
+                               height = $target[0].style.height;
+                               width = $target[0].style.width;
+
+                               if (ret.isDefinedHeight === false && height !== "" ) {
+                                       // Size was defined
+                                       ret.isDefinedHeight = true;
+                                       ret.height = parseInt(height, 10);
+                               }
+
+                               if ( ret.isDefinedWidth === false && width !== "" ) {
+                                       // Size was defined
+                                       ret.isDefinedWidth = true;
+                                       ret.width = parseInt(width, 10);
+                               }
+                               $target = $target.parent();
+                       }
+                       return ret;
+               },
+
+               resize : function ( ) {
+                       var self = this,
+                               ret = null,
+                               rowsPerView = 0,
+                               itemCount = 0,
+                               totalRowCnt = 0,
+                               diffRowCnt = 0,
+                               clipSize = 0,
+                               prevcnt = 0,
+                               clipPosition = 0;
+
+                       itemCount = self._calculateColumnCount();
+                       if ( itemCount != self._itemCount ) {
+                               totalRowCnt = parseInt(self._numItemData / itemCount , 10 );
+                               self._totalRowCnt = self._numItemData % itemCount === 0 ? totalRowCnt : totalRowCnt + 1;
+                               prevcnt = self._itemCount;
+                               self._itemCount = itemCount;
+                               clipPosition = self._getClipPosition();
+                               self._$view.hide();
+
+                               diffRowCnt = self._replaceRows(itemCount, prevcnt, self._totalRowCnt, clipPosition);
+                               self._maxSize = ( self._totalRowCnt - self._rowsPerView ) * self._cellSize;
+                               self._scalableSize += (-diffRowCnt) * self._cellSize;
+                               self._reservedPos  += (-diffRowCnt) * self._cellSize;
+                               self._setScrollBarSize();
+                               self._setScrollBarPosition(diffRowCnt);
+
+                               self._$view.show();
+                       }
+
+                       clipSize = self._calculateClipSize();
+                       if ( clipSize !== self._clipSize ) {
+                               rowsPerView = clipSize / self._cellSize;
+                               rowsPerView = parseInt( Math.ceil( rowsPerView ), 10 );
+
+                               if ( rowsPerView > self._rowsPerView ) {
+                                       // increase row.
+                                       self._increaseRow( rowsPerView - self._rowsPerView );
+                               } else if ( rowsPerView < self._rowsPerView ) {
+                                       // decrease row.
+                                       self._decreaseRow( self._rowsPerView - rowsPerView );
+                               }
+                               self._rowsPerView = rowsPerView;
+                               self._clipSize = clipSize;
+                               self._blockScroll = self._rowsPerView > self._totalRowCnt;
+                               self._maxSize = ( self._totalRowCnt - self._rowsPerView ) * self._cellSize;
+                               self._maxViewSize = ( self._rowsPerView ) * self._cellSize;
+                               if ( self._clipSize < self._maxViewSize ) {
+                                       self._modifyViewPos = (-self._cellSize) + ( self._clipSize - self._maxViewSize );
+                               }
+                               if ( self._direction ) {
+                                       self._$clip.width(self._clipSize);
+                               } else {
+                                       self._$clip.height(self._clipSize);
+                               }
+                               self._setScrollBarSize();
+                               self._setScrollBarPosition(0);
+                               self._setViewSize();
+                       }
+               },
+
+               _initScrollView : function () {
+                       var self = this;
+                       $.extend(self.options, self._scrollView.options);
+                       self.options.moveThreshold = 10;
+                       self.options.showScrollBars = false;
+                       self._getScrollHierarchy = self._scrollView._getScrollHierarchy;
+                       self._makePositioned =  self._scrollView._makePositioned;
+                       self._set_scrollbar_size = self._scrollView._set_scrollbar_size;
+                       self._setStyleTransform = self._scrollView._setElementTransform;
+                       self._hideOverflowIndicator = self._scrollView._hideOverflowIndicator;
+                       self._showOverflowIndicator = self._scrollView._showOverflowIndicator;
+                       self._setGestureScroll = self._scrollView._setGestureScroll;
+               },
+
+               _createTracker : function () {
+                       var self = this;
+
+                       self._tracker = new MomentumTracker(self.options);
+                       if ( self._direction ) {
+                               self._hTracker = self._tracker;
+                               self._$clip.width(self._clipSize);
+                       } else {
+                               self._vTracker = self._tracker;
+                               self._$clip.height(self._clipSize);
+                       }
+               },
+
+               //----------------------------------------------------//
+               //              Scrollbar               //
+               //----------------------------------------------------//
+               _createScrollBar : function () {
+                       var self = this,
+                               prefix = "<div class=\"ui-scrollbar ui-scrollbar-",
+                               suffix = "\"><div class=\"ui-scrollbar-track\"><div class=\"ui-scrollbar-thumb\"></div></div></div>";
+
+                       if ( self.options.rotation ) {
+                               return ;
+                       }
+
+                       if ( self._direction ) {
+                               self._$clip.append( prefix + "x" + suffix );
+                               self._hScrollBar = $(self._$clip.children(".ui-scrollbar-x"));
+                               self._hScrollBar.find(".ui-scrollbar-thumb").addClass("ui-scrollbar-thumb-x");
+                       } else {
+                               self._$clip.append( prefix + "y" + suffix );
+                               self._vScrollBar = $(self._$clip.children(".ui-scrollbar-y"));
+                               self._vScrollBar.find(".ui-scrollbar-thumb").addClass("ui-scrollbar-thumb-y");
+                       }
+               },
+
+               _setScrollBarSize: function () {
+                       var self = this,
+                               scrollBarSize = 0,
+                               currentSize = 0,
+                               $scrollBar,
+                               attrName,
+                               className;
+
+                       if ( self.options.rotation ) {
+                               return ;
+                       }
+
+                       scrollBarSize = parseInt( self._maxViewSize / self._clipSize , 10);
+                       if ( self._direction ) {
+                               $scrollBar = self._hScrollBar.find(".ui-scrollbar-thumb");
+                               attrName = "width";
+                               currentSize = $scrollBar.width();
+                               className = "ui-scrollbar-thumb-x";
+                               self._hScrollBar.css("width", self._clipSize);
+                       } else {
+                               $scrollBar = self._vScrollBar.find(".ui-scrollbar-thumb");
+                               attrName = "height";
+                               className = "ui-scrollbar-thumb-y";
+                               currentSize = $scrollBar.height();
+                               self._vScrollBar.css("height", self._clipSize);
+                       }
+
+                       if ( scrollBarSize > currentSize ) {
+                               $scrollBar.removeClass(className);
+                               $scrollBar.css(attrName, scrollBarSize);
+                       } else {
+                               scrollBarSize = currentSize;
+                       }
+
+                       self._itemScrollSize = parseFloat( ( self._clipSize - scrollBarSize ) / ( self._totalRowCnt - self._rowsPerView ) );
+                       self._itemScrollSize = Math.round(self._itemScrollSize * 100) / 100;
+               },
+
+               _setScrollBarPosition : function ( di, duration ) {
+                       var self = this,
+                               $sbt = null,
+                               x = "0px",
+                               y = "0px";
+
+                       if ( self.options.rotation ) {
+                               return ;
+                       }
+
+                       self._currentItemCount = self._currentItemCount + di;
+                       if ( self._vScrollBar ) {
+                               $sbt = self._vScrollBar .find(".ui-scrollbar-thumb");
+                               y = ( self._currentItemCount * self._itemScrollSize ) + "px";
+                       } else {
+                               $sbt = self._hScrollBar .find(".ui-scrollbar-thumb");
+                               x = ( self._currentItemCount * self._itemScrollSize ) + "px";
+                       }
+                       self._setStyleTransform( $sbt, x, y, duration );
+               },
+
+               _hideScrollBars : function () {
+                       var self = this,
+                               vclass = "ui-scrollbar-visible";
+
+                       if ( self.options.rotation ) {
+                               return ;
+                       }
+
+                       if ( self._vScrollBar ) {
+                               self._vScrollBar.removeClass( vclass );
+                       } else {
+                               self._hScrollBar.removeClass( vclass );
+                       }
+               },
+
+               _showScrollBars : function () {
+                       var self = this,
+                               vclass = "ui-scrollbar-visible";
+
+                       if ( self.options.rotation ) {
+                               return ;
+                       }
+
+                       if ( self._vScrollBar ) {
+                               self._vScrollBar.addClass( vclass );
+                       } else {
+                               self._hScrollBar.addClass( vclass );
+                       }
+               },
+
+               //----------------------------------------------------//
+               //              scroll process          //
+               //----------------------------------------------------//
+               centerTo: function ( selector ) {
+                       var self = this,
+                               i,
+                               newX = 0,
+                               newY = 0;
+
+                       if ( !self.options.rotation ) {
+                               return;
+                       }
+
+                       for ( i = 0; i < self._$rows.length; i++ ) {
+                               if ( $( self._$rows[i]).hasClass( selector ) ) {
+                                       if ( self._direction ) {
+                                               newX = -( i * self._cellSize - self._clipSize / 2 + self._cellSize * 2 );
+                                       } else {
+                                               newY = -( i * self._cellSize - self._clipSize / 2 + self._cellSize * 2 );
+                                       }
+                                       self.scrollTo( newX, newY );
+                                       return;
+                               }
+                       }
+               },
+
+               scrollTo: function ( x, y, duration ) {
+                       var self = this;
+                       if ( self._direction ) {
+                               self._sx = self._reservedPos;
+                               self._reservedPos = x;
+                       } else {
+                               self._sy = self._reservedPos;
+                               self._reservedPos = y;
+                       }
+                       self._scrollView.scrollTo.apply( this, [ x, y, duration ] );
+               },
+
+               getScrollPosition: function () {
+                       if ( this.direction ) {
+                               return { x: -this._ry, y: 0 };
+                       }
+                       return { x: 0, y: -this._ry };
+               },
+
+               _setScrollPosition: function ( x, y ) {
+                       var self = this,
+                               sy = self._scalableSize,
+                               distance = self._direction ? x : y,
+                               dy = distance - sy,
+                               di = parseInt( dy / self._cellSize, 10 ),
+                               i = 0,
+                               idx = 0,
+                               $row = null;
+
+                       if ( self._blockScroll ) {
+                               return ;
+                       }
+
+                       if ( ! self.options.rotation ) {
+                               if ( dy > 0 && distance >= -self._cellSize && self._scalableSize >= -self._cellSize ) {
+                                       // top
+                                       self._stopMScroll();
+                                       self._scalableSize = -self._cellSize;
+                                       self._setElementTransform( -self._cellSize );
+                                       return;
+                               }
+                               if ( (dy < 0 && self._scalableSize <= -(self._maxSize + self._cellSize) )) {
+                                       // bottom
+                                       self._stopMScroll();
+                                       self._scalableSize = -(self._maxSize + self._cellSize);
+                                       self._setElementTransform( self._modifyViewPos );
+                                       return;
+                               }
+                       }
+
+                       if ( di > 0 ) { // scroll up
+                               for ( i = 0; i < di; i++ ) {
+                                       idx = -parseInt( ( sy / self._cellSize ) + i + 3, 10 );
+                                       $row = self._$view.children( ).last( ).detach( );
+                                       self._replaceRow( $row, circularNum( idx, self._totalRowCnt ) );
+                                       self._$view.prepend( $row );
+                                       self._setScrollBarPosition(-1);
+                               }
+                       } else if ( di < 0 ) { // scroll down
+                               for ( i = 0; i > di; i-- ) {
+                                       idx = self._rowsPerView - parseInt( ( sy / self._cellSize ) + i, 10 );
+                                       $row = self._$view.children().first().detach();
+                                       self._replaceRow($row, circularNum( idx, self._totalRowCnt ) );
+                                       self._$view.append( $row );
+                                       self._setScrollBarPosition(1);
+                               }
+                       }
+                       self._scalableSize += di * self._cellSize;
+                       self._setElementTransform( distance - self._scalableSize - self._cellSize );
+               },
+
+               _setElementTransform : function ( value ) {
+                       var self = this,
+                               x = 0,
+                               y = 0;
+
+                       if ( self._direction ) {
+                               x = value + "px";
+                       } else {
+                               y = value + "px";
+                       }
+                       self._setStyleTransform(self._$view, x, y );
+               },
+
+               //----------------------------------------------------//
+               //              Event handler           //
+               //----------------------------------------------------//
+               _handleMomentumScroll: function () {
+                       var self = this,
+                               opts = self.options,
+                               keepGoing = false,
+                               v = this._$view,
+                               x = 0,
+                               y = 0,
+                               t = self._tracker;
+
+                       if ( t ) {
+                               t.update();
+                               if ( self._direction ) {
+                                       x = t.getPosition();
+                               } else {
+                                       y = t.getPosition();
+                               }
+                               keepGoing = !t.done();
+                       }
+
+                       self._setScrollPosition( x, y );
+                       if ( !opts.rotation ) {
+                               keepGoing = !t.done();
+                               self._reservedPos = self._direction ? x : y;
+                               // bottom
+                               self._reservedPos = self._reservedPos <= (-(self._maxSize - self._modifyViewPos)) ? ( - ( self._maxSize + self._cellSize) ) : self._reservedPos;
+                               // top
+                               self._reservedPos = self._reservedPos > -self._cellSize ? -self._cellSize : self._reservedPos;
+                       } else {
+                               self._reservedPos = self._direction ? x : y;
+                       }
+                       self._$clip.trigger( self.options.updateEventName, [ { x: x, y: y } ] );
+
+                       if ( keepGoing ) {
+                               self._timerID = setTimeout( self._timerCB, self._timerInterval );
+                       } else {
+                               self._stopMScroll();
+                       }
+               },
+
+               _startMScroll: function ( speedX, speedY ) {
+                       var self = this;
+                       if ( self._direction  ) {
+                               self._sx = self._reservedPos;
+                       } else {
+                               self._sy = self._reservedPos;
+                       }
+                       self._scrollView._startMScroll.apply(self, [speedX, speedY]);
+               },
+
+               _stopMScroll: function () {
+                       this._scrollView._stopMScroll.apply(this);
+               },
+
+               _enableTracking: function () {
+                       $(document).bind( this._dragMoveEvt, this._dragMoveCB );
+                       $(document).bind( this._dragStopEvt, this._dragStopCB );
+               },
+
+               _disableTracking: function () {
+                       $(document).unbind( this._dragMoveEvt, this._dragMoveCB );
+                       $(document).unbind( this._dragStopEvt, this._dragStopCB );
+               },
+
+               _handleDragStart: function ( e, ex, ey ) {
+                       var self = this;
+                       self._scrollView._handleDragStart.apply( this, [ e, ex, ey ] );
+                       self._eventPos = self._direction ? ex : ey;
+                       self._nextPos = self._reservedPos;
+               },
+
+               _handleDragMove: function ( e, ex, ey ) {
+                       var self = this,
+                               dx = ex - self._lastX,
+                               dy = ey - self._lastY,
+                               x = 0,
+                               y = 0;
+
+                       self._lastMove = getCurrentTime();
+                       self._speedX = dx;
+                       self._speedY = dy;
+
+                       self._didDrag = true;
+
+                       self._lastX = ex;
+                       self._lastY = ey;
+
+                       if ( self._direction ) {
+                               self._movePos = ex - self._eventPos;
+                               x = self._nextPos + self._movePos;
+                       } else {
+                               self._movePos = ey - self._eventPos;
+                               y = self._nextPos + self._movePos;
+                       }
+                       self._showScrollBars();
+                       self._setScrollPosition( x, y );
+                       return false;
+               },
+
+               _handleDragStop: function ( e ) {
+                       var self = this;
+
+                       self._reservedPos = self._movePos ? self._nextPos + self._movePos : self._reservedPos;
+                       self._scrollView._handleDragStop.apply( this, [ e ] );
+                       return self._didDrag ? false : undefined;
+               },
+
+               _addBehaviors: function () {
+                       var self = this;
+
+                       // scroll event handler.
+                       if ( self.options.eventType === "mouse" ) {
+                               self._dragStartEvt = "mousedown";
+                               self._dragStartCB = function ( e ) {
+                                       return self._handleDragStart( e, e.clientX, e.clientY );
+                               };
+
+                               self._dragMoveEvt = "mousemove";
+                               self._dragMoveCB = function ( e ) {
+                                       return self._handleDragMove( e, e.clientX, e.clientY );
+                               };
+
+                               self._dragStopEvt = "mouseup";
+                               self._dragStopCB = function ( e ) {
+                                       return self._handleDragStop( e, e.clientX, e.clientY );
+                               };
+
+                               self._$view.bind( "vclick", function (e) {
+                                       return !self._didDrag;
+                               } );
+                       } else { //touch
+                               self._dragStartEvt = "touchstart";
+                               self._dragStartCB = function ( e ) {
+                                       var t = e.originalEvent.targetTouches[0];
+                                       return self._handleDragStart(e, t.pageX, t.pageY );
+                               };
+
+                               self._dragMoveEvt = "touchmove";
+                               self._dragMoveCB = function ( e ) {
+                                       var t = e.originalEvent.targetTouches[0];
+                                       return self._handleDragMove(e, t.pageX, t.pageY );
+                               };
+
+                               self._dragStopEvt = "touchend";
+                               self._dragStopCB = function ( e ) {
+                                       return self._handleDragStop( e );
+                               };
+                       }
+                       self._$view.bind( self._dragStartEvt, self._dragStartCB );
+
+                       // other events.
+                       self._$view.delegate(".virtualgrid-item", "click", function (event) {
+                               var $selectedItem = $(this);
+                               $selectedItem.trigger("select", this);
+                       });
+
+                       $( window ).bind("resize", function ( e ) {
+                               var height = 0,
+                                       $virtualgrid = $(".ui-virtualgrid-view");
+                               if ( $virtualgrid.length !== 0 ) {
+                                       if ( self._direction ) {
+                                               height = self._calculateClipHeight();
+                                               self._$view.height(height);
+                                               self._$clip.height(height);
+                                       } else {
+                                               height = self._calculateClipWidth();
+                                               self._$view.width(height);
+                                               self._$clip.width(height);
+                                       }
+                                       self.resize( );
+                               }
+                       });
+
+                       $(document).one("pageshow", function (event) {
+                               var $page = $(self.element).parents(".ui-page"),
+                                       $header = $page.find( ":jqmData(role='header')" ),
+                                       $footer = $page.find( ":jqmData(role='footer')" ),
+                                       $content = $page.find( ":jqmData(role='content')" ),
+                                       footerHeight = $footer ? $footer.height() : 0,
+                                       headerHeight = $header ? $header.height() : 0;
+
+                               if ( $page && $content ) {
+                                       $content.height(window.innerHeight - headerHeight - footerHeight).css("overflow", "hidden");
+                                       $content.addClass("ui-virtualgrid-content");
+                               }
+                       });
+               },
+
+               //----------------------------------------------------//
+               //              Calculate size about dom element.               //
+               //----------------------------------------------------//
+               _calculateClipSize : function () {
+                       var self = this,
+                               clipSize = 0;
+
+                       if ( self._direction ) {
+                               clipSize = self._calculateClipWidth();
+                       } else {
+                               clipSize = self._calculateClipHeight();
+                       }
+                       return clipSize;
+               },
+
+               _calculateClipWidth : function () {
+                       var self = this,
+                               view = $(self.element),
+                               $parent = $(self.element).parent(),
+                               paddingValue = 0,
+                               clipSize = $(window).width();
+
+                       if ( self._inheritedSize.isDefinedWidth ) {
+                               return self._inheritedSize.width;
+                       }
+
+                       if ( $parent.hasClass("ui-content") ) {
+                               paddingValue = parseInt($parent.css("padding-left"), 10);
+                               clipSize = clipSize - ( paddingValue || 0 );
+                               paddingValue = parseInt($parent.css("padding-right"), 10);
+                               clipSize = clipSize - ( paddingValue || 0);
+                       } else {
+                               clipSize = view.width();
+                       }
+                       return clipSize;
+               },
+
+               _calculateClipHeight : function () {
+                       var self = this,
+                               view = $(self.element),
+                               $parent = $(self.element).parent(),
+                               header = null,
+                               footer = null,
+                               paddingValue = 0,
+                               clipSize = $(window).height();
+
+                       if ( self._inheritedSize.isDefinedHeight ) {
+                               return self._inheritedSize.height;
+                       }
+
+                       if ( $parent.hasClass("ui-content") ) {
+                               paddingValue = parseInt($parent.css("padding-top"), 10);
+                               clipSize = clipSize - ( paddingValue || 0 );
+                               paddingValue = parseInt($parent.css("padding-bottom"), 10);
+                               clipSize = clipSize - ( paddingValue || 0);
+                               header = $parent.siblings(".ui-header");
+                               footer = $parent.siblings(".ui-footer");
+
+                               if ( header ) {
+                                       if ( header.outerHeight(true) === null ) {
+                                               clipSize = clipSize - ( $(".ui-header").outerHeight() || 0 );
+                                       } else {
+                                               clipSize = clipSize - header.outerHeight(true);
+                                       }
+                               }
+                               if ( footer ) {
+                                       clipSize = clipSize - footer.outerHeight(true);
+                               }
+                       } else {
+                               clipSize = view.height();
+                       }
+                       return clipSize;
+               },
+
+               _calculateColumnSize : function () {
+                       var self = this,
+                               $tempBlock,
+                               $cell;
+
+                       $tempBlock = self._makeRows( 1 );
+                       self._$view.append( $tempBlock.children().first() );
+                       if ( self._direction ) {
+                               // x-axis
+                               self._viewSize = self._$view.width();
+                               $cell = self._$view.children().first().children().first();
+                               self._cellSize = $cell.outerWidth(true);
+                               self._cellOtherSize = $cell.outerHeight(true);
+                       } else {
+                               // y-axis
+                               self._viewSize = self._$view.height();
+                               $cell = self._$view.children().first().children().first();
+                               self._cellSize = $cell.outerHeight(true);
+                               self._cellOtherSize = $cell.outerWidth(true);
+                       }
+                       $tempBlock.remove();
+                       self._$view.children().remove();
+               },
+
+               _calculateColumnCount : function ( ) {
+                       var self = this,
+                               $view = $(self.element),
+                               viewSize = self._direction ? $view.innerHeight() : $view.innerWidth(),
+                               itemCount = 0 ;
+
+                       if ( self._direction ) {
+                               viewSize = viewSize - ( parseInt( $view.css("padding-top"), 10 ) + parseInt( $view.css("padding-bottom"), 10 ) );
+                       } else {
+                               viewSize = viewSize - ( parseInt( $view.css("padding-left"), 10 ) + parseInt( $view.css("padding-right"), 10 ) );
+                       }
+
+                       itemCount = parseInt( (viewSize / self._cellOtherSize), 10);
+                       return itemCount > 0 ? itemCount : 1 ;
+               },
+
+               // Read the position of clip form property ('webkit-transform').
+               // @return : number - position of clip.
+               _getClipPosition : function () {
+                       var self = this,
+                               matrix = null,
+                               contents = null,
+                               result = -self._cellSize,
+                               $scrollview = self._$view.closest(".ui-scrollview-view");
+
+                       if ( $scrollview ) {
+                               matrix = $scrollview.css("-webkit-transform");
+                               contents = matrix.substr( 7 );
+                               contents = contents.substr( 0, contents.length - 1 );
+                               contents = contents.split( ', ' );
+                               result =  Math.abs(contents [5]);
+                       }
+                       return result;
+               },
+
+               //----------------------------------------------------//
+               //              DOM Element handle              //
+               //----------------------------------------------------//
+               _makeRows : function ( count ) {
+                       var self = this,
+                               opts = self.options,
+                               index = 0,
+                               $row = null,
+                               $wrapper = null;
+
+                       $wrapper = $( self._createElement( "div" ) );
+                       $wrapper.addClass("ui-scrollview-view");
+                       for ( index = 0; index < count ; index += 1 ) {
+                               $row = self._makeRow( self._template, index );
+                               if ( self._direction ) {
+                                       $row.css("top", 0).css("left", ( index * self._cellSize ));
+                               }
+                               $wrapper.append($row);
+                       }
+                       return $wrapper;
+               },
+
+               // make a single row block
+               _makeRow : function ( myTemplate, rowIndex ) {
+                       var self = this,
+                               opts = self.options,
+                               index = rowIndex * self._itemCount,
+                               htmlData = null,
+                               itemData = null,
+                               colIndex = 0,
+                               attrName = self._direction ? "top" : "left",
+                               blockClassName = self._direction ? "ui-virtualgrid-wrapblock-x" : "ui-virtualgrid-wrapblock-y",
+                               blockAttrName = self._direction ? "top" : "left",
+                               wrapBlock = $( self._createElement( "div" ) );
+
+                       wrapBlock.addClass( blockClassName ).attr("row-index", rowIndex);
+                       for ( colIndex = 0; colIndex < self._itemCount; colIndex++ ) {
+                               htmlData = self._makeHtmlData( myTemplate, index, colIndex);
+                               if ( htmlData ) {
+                                       wrapBlock.append( htmlData );
+                               }
+                               index += 1;
+                       }
+                       return wrapBlock;
+               },
+
+               _makeHtmlData : function ( myTemplate, dataIndex, colIndex ) {
+                       var self = this,
+                               htmlData = null,
+                               itemData = null,
+                               attrName = self._direction ? "top" : "left";
+
+                       itemData = self._itemData( dataIndex );
+                       if ( itemData ) {
+                               htmlData = myTemplate.tmpl( itemData );
+                               $(htmlData).css(attrName, ( colIndex * self._cellOtherSize )).addClass("virtualgrid-item");
+                       }
+                       return htmlData;
+               },
+
+               _increaseRow : function ( num ) {
+                       var self = this,
+                               rotation = self.options.rotation,
+                               $row = null,
+                               headItemIndex = 0,
+                               tailItemIndex = 0,
+                               itemIndex = 0,
+                               size = self._scalableSize,
+                               idx = 0;
+
+                       headItemIndex = parseInt( $(self._$view.children().first()).attr("row-index"), 10) - 1;
+                       tailItemIndex = parseInt( $(self._$view.children()[self._rowsPerView]).attr("row-index"), 10) + 1;
+
+                       for ( idx = 1 ; idx <= num ; idx++ ) {
+                               if ( tailItemIndex + idx  >= self._totalRowCnt ) {
+                                       $row = self._makeRow( self._template, headItemIndex );
+                                       self._$view.prepend($row);
+                                       headItemIndex -= 1;
+                               } else {
+                                       $row = self._makeRow( self._template, tailItemIndex + idx );
+                                       self._$view.append($row);
+                               }
+                               if ( self._direction ) {
+                                       $row.width(self._cellSize);
+                               } else {
+                                       $row.height(self._cellSize);
+                               }
+                       }
+               },
+
+               _decreaseRow : function ( num ) {
+                       var self = this,
+                               idx = 0;
+
+                       for ( idx = 0 ; idx < num ; idx++ ) {
+                               self._$view.children().last().remove();
+                       }
+               },
+
+               _replaceRows : function ( curCnt, prevCnt, maxCnt, clipPosition ) {
+                       var self = this,
+                               $rows = self._$view.children(),
+                               prevRowIndex = 0,
+                               rowIndex = 0,
+                               diffRowCnt = 0,
+                               targetCnt = 1,
+                               filterCondition = ( self._filterRatio * self._cellSize) + self._cellSize,
+                               idx = 0;
+
+                       if ( filterCondition < clipPosition ) {
+                               targetCnt += 1;
+                       }
+
+                       prevRowIndex = parseInt( $($rows[targetCnt]).attr("row-index"), 10);
+                       if ( prevRowIndex === 0 ) {
+                               // only top.
+                               rowIndex = maxCnt - targetCnt;
+                       } else {
+                               rowIndex = Math.round( (prevRowIndex * prevCnt) / curCnt );
+                               if ( rowIndex + self._rowsPerView >= maxCnt ) {
+                                       // only bottom.
+                                       rowIndex = maxCnt - self._rowsPerView;
+                               }
+                               diffRowCnt = prevRowIndex - rowIndex;
+                               rowIndex -= targetCnt;
+                       }
+
+                       for ( idx = 0 ; idx < $rows.length ; idx += 1 ) {
+                               self._replaceRow($rows[idx], circularNum( rowIndex, self._totalRowCnt ));
+                               rowIndex++;
+                       }
+                       return -diffRowCnt;
+               },
+
+               _replaceRow : function ( block, index ) {
+                       var self = this,
+                               opts = self.options,
+                               $columns = null,
+                               $column = null,
+                               $block = block.attr ? block : $( block ),
+                               data = null,
+                               htmlData = null,
+                               myTemplate = null,
+                               idx = 0,
+                               dataIdx = 0,
+                               tempBlocks = null;
+
+                       $columns = $block.attr("row-index", index).children();
+                       if ( $columns.length !== self._itemCount ) {
+                               $block.children().remove();
+                               tempBlocks = $(self._makeRow( self._template, index ));
+                               $block.append(tempBlocks.children());
+                               tempBlocks.remove();
+                               return ;
+                       }
+
+                       dataIdx = index * self._itemCount;
+                       for ( idx = 0; idx < self._itemCount ; idx += 1 ) {
+                               $column = $columns.eq(idx);
+                               data = self._itemData(dataIdx);
+                               if ( $column && data ) {
+                                       myTemplate = self._template;
+                                       htmlData = myTemplate.tmpl( data );
+                                       self._replace( $column, htmlData, false );
+                                       htmlData.remove();      // Clear temporary htmlData to free cache
+                                       dataIdx ++;
+                               } else if ($column && !data ) {
+                                       $column.remove();
+                               }
+                       }
+               },
+
+               _createElement : function ( tag ) {
+                       var element = document.createElement( tag );
+
+                       this._fragment.appendChild( element );
+                       return element;
+               },
+
+               /* Text & image src replace function */
+               // @param oldItem   : prev HtmlDivElement
+               // @param newItem   : new HtmlDivElement for replace
+               // @param key       :
+               _replace : function ( oldItem, newItem, key ) {
+                       var NODETYPE = { ELEMENT_NODE : 1, TEXT_NODE : 3 };
+
+                       $( oldItem ).find( ".ui-li-text-main", ".ui-li-text-sub", "ui-btn-text" ).each( function ( index ) {
+                               var oldObj = $( this ),
+                                       newText = $( newItem ).find( ".ui-li-text-main", ".ui-li-text-sub", "ui-btn-text" ).eq( index ).text();
+
+                               $( oldObj ).contents().filter( function () {
+                                       return ( this.nodeType == NODETYPE.TEXT_NODE );
+                               }).get( 0 ).data = newText;
+                       });
+
+                       $( oldItem ).find( "img" ).each( function ( imgIndex ) {
+                               var oldObj = $( this ),
+                                       newImg = $( newItem ).find( "img" ).eq( imgIndex ).attr( "src" );
+
+                               $( oldObj ).attr( "src", newImg );
+                       });
+                       $( oldItem).removeData();
+                       if ( key ) {
+                               $( oldItem ).data( key, $( newItem ).data( key ) );
+                       }
+               }
+       } );
+
+       $( document ).bind( "pagecreate create", function ( e ) {
+               $(":jqmData(role='virtualgrid')").virtualgrid();
+       } );
+} (jQuery, window, document) );
+/* ***************************************************************************
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ * ***************************************************************************
+ *
+ *     Author: Wongi Lee <wongi11.lee@samsung.com>
+ *             Youmin Ha <youmin.ha@samsung.com>
+ */
+
+/**
+ * Virtual List Widget for unlimited data.
+ * To support more then 1,000 items, special list widget developed. 
+ * Fast initialize and light DOM tree.
+ * DB connection and works like DB cursor.
+ * 
+ * HTML Attributes:
+ *
+ *             data-role:      virtuallistview
+ *             data-template : jQuery.template ID that populate into virtual list 
+ *             data-row : Optional. Set number of <li> elements that are used for data handling. 
+ *             
+ *             ID : <UL> element that has "data-role=virtuallist" must have ID attribute.
+ *
+ * * APIs:
+ *
+ *             create ( {
+ *                             itemData: function ( idx ) { return json_obj; },
+ *                             numItemData: number or function () { return number; },
+ *                             cacheItemData: function ( minIdx, maxIdx ) {}
+ *                             } )
+ *                     : Create a virtuallist widget. At this moment, _create method is called.
+ *                     args : A collection of options
+ *                             itemData: A function that returns JSON object for given index. Mandatory.
+ *                             numItemData: Total number of itemData. Mandatory.
+ *                             cacheItemData: Virtuallist will ask itemData between minIdx and maxIdx.
+ *                                            Developers can implement this function for preparing data.
+ *                                            Optional.
+ *
+ * Events:
+ *
+ *             touchstart : Temporary preventDefault applied on touchstart event to avoid broken screen.
+ *
+ * Examples:
+ *
+ *             <script id="tmp-3-2-7" type="text/x-jquery-tmpl">
+ *                     <li class="ui-li-3-2-7">
+ *                             <span class="ui-li-text-main">${NAME}</span>
+ *                             <img src="00_winset_icon_favorite_on.png" class="ui-li-icon-sub">
+ *                             <span class="ui-li-text-sub">${ACTIVE}</span>
+ *                             <span class="ui-li-text-sub2">${FROM}</span>
+ *                     </li>
+ *             </script>
+ *
+ *             <ul id="virtuallist-normal_3_2_7_ul" data-role="virtuallistview" data-template="tmp-3-2-7" data-dbtable="JSON_DATA" data-row="100">
+ *             </ul>
+ *
+ */
+
+/**
+       @class VirtualList
+       In the Web environment, it is challenging to display a large amount of data in a list, such as displaying a contact list of over 1000 list items. It takes time to display the entire list in HTML and the DOM manipulation is complex.
+
+       The virtual list widget is used to display a list of unlimited data elements on the screen for better performance. This widget provides easy access to databases to retrieve and display data. Virtual lists are based on the jQuery.template plugin as described in the jQuery documentation for jQuery.template plugin.
+
+       To add a virtual list widget to the application, use the following code:
+
+               <script id="tmp-3-2-7" type="text/x-jquery-tmpl">
+                       <li class="ui-li-3-2-7">
+                               <span class="ui-li-text-main">${NAME}</span>
+                               <img src="00_winset_icon_favorite_on.png" class="ui-li-icon-sub"/>
+                               <span class="ui-li-text-sub">${ACTIVE}</span>
+                               <span class="ui-li-text-sub2">${FROM}</span>
+                       </li>
+               </script>
+               <ul id="vlist" data-role="virtuallistview" data-template="tmp-3-2-7" data-dbtable="JSON_DATA" data-row="100"></ul>
+*/
+/**
+       @property {String} data-role
+       Creates the virtual list view. The value must be set to virtuallistview.
+       Only the &gt;ul&lt; element, which a id attribute defined, supports this option. Also, the vlLoadSuccess class attribute must be defined in the &gt;ul&lt; element to ensure that loading data from the database is complete.
+*/
+/**
+       @property {String} data-template
+       Defines the jQuery.template element ID.
+       The jQuery.template must be defined. The template style can use rem units to support scalability.
+*/
+/**
+       @property {Number} data-row
+       Defines the number of virtual list child elements.
+       The minimum value is 20 and the default value is 100. As the value gets higher, the loading time increases while the system performance improves. So you need to pick a value that provides the best performance without excessive loading time.
+*/
+/**
+       @method create
+       @param {function} itemData(index)
+       : function itemData(index) returns the JSON object matched with the given index. The index value is between 0 and numItemData-1.
+       @param {Number} numItemData
+       : number numItemData or function numItemData() defines or returns a static number of items.
+       @param {function} cacheItemData(minIndex, maxIndex)
+       : function cacheItemData(minIndex, maxIndex) prepares the JSON data. This method is called before calling the itemData() method with index values between minIndex and maxIndex.
+*/
+
+(function ( $, undefined ) {
+
+       /* Code for Virtual List Demo */
+       var listCountPerPage = {},      /* Keeps track of the number of lists per page UID. This allows support for multiple nested list in the same page. https://github.com/jquery/jquery-mobile/issues/1617 */
+               _NO_SCROLL = 0,                                 /* ENUM */
+               _SCROLL_DOWN = 1,                               /* ENUM */
+               _SCROLL_UP = -1;                                        /* ENUM */
+
+       $.widget( "tizen.virtuallistview", $.mobile.widget, {
+               options: {
+                       theme: "s",
+                       countTheme: "s",
+                       headerTheme: "s",
+                       dividerTheme: "s",
+                       splitIcon: "arrow-r",
+                       splitTheme: "s",
+                       inset: false,
+                       id:     "",                                     /* Virtual list UL elemet's ID */
+                       childSelector: " li",   /* To support swipe list */
+                       dbtable: "",
+                       template : "",
+                       dbkey: false,                   /* Data's unique Key */
+                       scrollview: false,
+                       row: 100,
+                       page_buf: 30,
+                       initSelector: ":jqmData(role='virtuallistview')"
+               },
+
+               _stylerMouseUp: function () {
+                       $( this ).addClass( "ui-btn-up-s" );
+                       $( this ).removeClass( "ui-btn-down-s" );
+               },
+
+               _stylerMouseDown: function () {
+                       $( this ).addClass( "ui-btn-down-s" );
+                       $( this ).removeClass( "ui-btn-up-s" );
+               },
+
+               _stylerMouseOver: function () {
+                       $( this ).toggleClass( "ui-btn-hover-s" );
+               },
+
+               _stylerMouseOut: function () {
+                       $( this ).toggleClass( "ui-btn-hover-s" );
+                       $( this ).addClass( "ui-btn-up-s" );
+                       $( this ).removeClass( "ui-btn-down-s" );
+               },
+
+               // ?
+               // this         virtuallistview object
+               // @param[in]   template        template name(string)
+               _pushData: function ( template ) {
+                       var o = this.options,
+                               i,
+                               myTemplate = $( "#" + template ),       // Get template object
+                               // NOTE: o.row = # of rows handled at once. Default value is 100.
+                               lastIndex = ( o.row > this._numItemData ? this._numItemData : o.row ),  // last index of handled data
+                               htmlData;
+
+                       for ( i = 0; i < lastIndex; i++ ) {
+                               htmlData = myTemplate.tmpl( this._itemData( i ) );      // Make rows with template,
+                               $( o.id ).append( $( htmlData ).attr( 'id', o.itemIDPrefix + i ) );     // and append it to the vlist object
+                       }
+
+                       // After pushing data re-style virtuallist widget
+                       $( o.id ).trigger( "create" );
+               },
+
+               // Set children <li> elements' position
+               //
+               // this: virtuallist element
+               // event: virtuallistview.options
+               //              TODO: Why this arg name is 'event'? Not resonable.
+               //              (this function is not called with event element as args!)
+               _reposition: function ( event ) {
+                       var o,
+                               t = this,
+                               padding,
+                               margin;
+
+                       if ( event.data ) {
+                               o = event.data;
+                       } else {
+                               o = event;
+                       }
+                       if ( $( o.id + o.childSelector ).size() > 0 ) { // $("#vlistid li")
+                               // first child's top position
+                               // NOTE: the first element may not be '0'!!!
+                               t._title_h = $( o.id + o.childSelector + ':first' ).position().top;
+                               // first child's outer height (TODO: reuse selected items)
+                               t._line_h = $( o.id + o.childSelector + ':first' ).outerHeight();
+
+                               // container(vlist element)'s innerwidth
+                               t._container_w = $( o.id ).innerWidth();
+
+                               // get sum of container's left/right padding
+                               padding = parseInt( $( o.id + o.childSelector ).css( "padding-left" ), 10 )
+                                       + parseInt( $( o.id + o.childSelector ).css( "padding-right" ), 10 );
+
+                               // Add CSS to all <li> elements
+                               //      * absolute position
+                               //      * btn-up
+                               //      * mouse up/down/over/out styles
+                               $( o.id + ">" + o.childSelector )
+                                       .addClass( "position_absolute" )
+                                       .addClass( "ui-btn-up-s" )
+                                       .bind( "mouseup", t._stylerMouseUp )
+                                       .bind( "mousedown", t._stylerMouseDown )
+                                       .bind( "mouseover", t._stylerMouseOver )
+                                       .bind( "mouseout", t._stylerMouseOut );
+                       }
+
+                       // Set absolute top/left position of each <li>
+                       $( o.id + ">" + o.childSelector ).each( function ( index ) {
+                               margin = parseInt( $( this ).css( "margin-left" ), 10 )
+                                       + parseInt( $( this ).css( "margin-right" ), 10 );
+
+                               $( this ).css( "top", t._title_h + t._line_h * index + 'px' )
+                                       .css( "width", t._container_w - padding - margin );
+                       } );
+
+                       // Set Max Listview Height
+                       $( o.id ).height( t._numItemData * t._line_h );
+               },
+
+               _resize: function ( event ) {
+                       var o,
+                               t = this,
+                               padding,
+                               margin;
+
+                       if ( event.data ) {
+                               o = event.data;
+                       } else {
+                               o = event;
+                       }
+
+                       t._container_w = $( o.id ).innerWidth();
+
+                       padding = parseInt( $( o.id + o.childSelector ).css( "padding-left" ), 10 )
+                               + parseInt( $( o.id + o.childSelector ).css( "padding-right" ), 10 );
+
+                       $( o.id + o.childSelector ).each( function (index) {
+                               margin = parseInt( $( this ).css( "margin-left" ), 10 )
+                                       + parseInt( $( this ).css( "margin-right" ), 10 );
+                               $( this ).css( "width", t._container_w - padding - margin );
+                       } );
+               },
+
+               // New scrollmove function supporting scrollTo
+               _scrollmove: function ( ev ) {
+                       var t = ev.data,        // vlist (JQM object)
+                               o = t.options,  // options
+                               prevTopBufLen = t._num_top_items,       // Previous(remembered) top buf length
+                               timerInterval = 100,
+                               i,
+                               _scrollView,
+                               _normalScroll;
+
+                       _scrollView = {
+                               viewTop: function ( ) {
+                                       var sv = $( o.id ).parentsUntil( ".ui-page" ).find( ".ui-scrollview-view" ),
+                                               svTrans = sv.css( "-webkit-transform" ),
+                                               svTransVal = "0,0,0,0,0,0";
+                                       if ( svTrans ) {
+                                               svTransVal = svTrans.replace( /matrix\s*\((.*)\)/, "$1" );      // matrix(a,c,b,d,tx,ty)
+                                       }
+                                       return - parseInt( svTransVal.split(',')[5], 10 );
+                               }
+                       };
+                       _normalScroll = {
+                               viewTop: function ( ) {
+                                       return $( window ).scrollTop( );        // TODO: - _line_h?
+                               }
+                       };
+                       // Get current view top position
+                       function viewTop ( ) {
+                               return o.scrollview ? _scrollView.viewTop() : _normalScroll.viewTop();
+                       }
+                       // log function for debug
+                       function log ( msg ) {
+                               var debug = false;
+                               if ( debug ) {
+                                       console.log( ">>virtualllist: " + msg );
+                               }
+                       }
+
+                       // Timer interval function
+                       // @param[in]   vl      virtuallist object (JQM object)
+                       function timerMove ( vl, undefined ) {
+                               var cy,                         // current y position
+                                       cti,            // current top idx
+                                       cbi,            // current bottom idx
+                                       oti = vl._first_index,  // old top idx
+                                       obi = vl._last_index,   // old botton idx
+                                       dti,                    // delta of top idx
+                                       fromIdx,
+                                       toIdx,  // index range to be moved
+                                       delta,                  // moveItem delta
+                                       rowLen = vl.options.row,        // max. # of items handled at once
+                                       bufSize,                // top/bottom buffer size. unit: # of items
+                                       i;
+
+                               // subroutine: Move itemContents in i2 into i1
+                               function moveItemContents( vl, i1, i2 ) {
+                                       // TODO: Find a efficient way to replace data!
+                                       // Assumption: i1 and i2 has same children.
+                                       var NODETYPE = { ELEMENT_NODE: 1, TEXT_NODE: 3 },
+                                               c1,     // child item 1 (old)
+                                               c2,     // child item 2 (new)
+                                               newText,
+                                               newImg,
+                                               i;
+
+                                       $( i1 ).find( ".ui-li-text-main", ".ui-li-text-sub", ".ui-li-text-sub2", "ui-btn-text" ).each( function ( index ) {
+                                               c1 = $( this );
+                                               newText = $( i2 ).find( ".ui-li-text-main", ".ui-li-text-sub", "ui-btn-text" ).eq( index ).text();
+
+                                               $( c1 ).contents().filter( function () {
+                                                       return ( this.nodeType == NODETYPE.TEXT_NODE );
+                                               } ).get( 0 ).data = newText;
+                                       } );
+
+                                       $( i1 ).find( "img" ).each( function ( imgIdx ) {
+                                               var c1 = $( this );
+                                               newImg = $( i2 ).find( "img" ).eq( imgIdx ).attr( "src" );
+
+                                               $( c1 ).attr( "src", newImg );
+                                       } );
+
+                                       $( i1 ).removeData( );  // Clear old data
+                               }
+
+                               // subroutine: Move item
+                               function moveItem( vl, fromIdx, toIdx ) {
+                                       var itemData,   // data from itemData()
+                                               item,           // item element
+                                               newItem,        // new item element
+                                               tmpl;           // template
+
+                                       log( ">> move item: " + fromIdx + " --> " + toIdx );
+
+                                       // Find current item
+                                       item = $( '#' + vl.options.itemIDPrefix + fromIdx );    // TODO: refactor ID generation!
+                                       if ( ! item || ! item.length ) {
+                                               return false;
+                                       }
+
+                                       // Get new item
+                                       tmpl = $( "#" + vl.options.template );
+                                       if ( tmpl ) {
+                                               newItem = tmpl.tmpl( vl._itemData( toIdx ) );
+
+                                               // TODO: Consider touch block while moving?
+
+                                               // Move item contents
+                                               moveItemContents( vl, item, newItem );
+
+                                               // clean up temporary item
+                                               newItem.remove();
+                                       }
+
+                                       // Move position, and set id
+                                       item.css( 'top', toIdx * vl._line_h )
+                                               .attr( 'id' , vl.options.itemIDPrefix + toIdx );        // TODO: refactor ID generation!
+
+                                       // TODO: Apply jqmdata? check following old code;
+                                       // $( oldItem ).removeData( );  // Clear old data
+                                       // if (key) { $( oldItem ).data( key, $( newItem ).data( key ) ); }
+
+                                       return true;
+                               }
+
+
+                               // Get current view position
+                               cy = viewTop();
+
+                               // Calculate bufSize: rowLen / 3
+                               // NOTE: Assumption: total row length = visible items * 3 (upper+visible+lower)
+                               bufSize = Math.ceil( rowLen / 3 );
+
+                               // Calculate current top/bottom index (to be applied)
+                               // top index = current position / line height
+                               cti = Math.floor( cy / vl._line_h ) - bufSize;  // TODO: consider buffer!
+                               cbi = cti + rowLen - 1;
+
+                               if ( cti < 0 ) {                // Top boundary check
+                                       cbi += ( - cti );
+                                       cti = 0;
+                               } else if ( cbi > ( vl._numItemData - 1 ) ) {           // Bottom boundary check
+                                       cti -= ( cbi - ( vl._numItemData - 1 ) );
+                                       cbi = ( vl._numItemData - 1 );
+                               }
+
+                               // Calculate dti
+                               dti = cti - oti;
+                               log( "cy=" + cy + ", oti=" + oti + ", obi=" + obi + ", cti=" + cti + ", cbi=" + cbi + ", dti=" + dti );
+
+                               // switch: dti = 0 --> timer stop condition: delta=0 or scrollstop event comes. END.
+                               if ( 0 == dti ) {
+                                       // Check timer runtime
+                                       vl.timerStillCount += 1;
+                                       if ( vl.timerStillCount < 12 ) {        // check count ( TODO: test and adjust )
+                                               log("dti=0 " + vl.timerStillCount + " times");
+                                               vl.timerMoveID = setTimeout( timerMove, timerInterval, vl );    // run once more
+                                               return;
+                                       }
+
+                                       log("dti=0 " + vl.timerStillCount + " times. End timer.");
+                                       vl.timerStillCount = 0;
+                                       // Stop timer
+                                       if ( vl.timerMoveID ) {
+                                               clearTimeout( vl.timerMoveID );
+                                               vl.timerMoveID = null;
+                                       }
+                               } else {
+                                       // switch: dti >= # of max elements --> total replace.
+                                       vl.timerStillCount = 0;         // Reset still counter
+
+                                       if ( Math.abs( dti ) >= rowLen ) {
+                                               fromIdx = oti;
+                                               toIdx = obi;
+                                               delta = dti;
+                                               log( ">>> WHOLE CHANGE! delta=" + delta );
+                                       } else {
+                                               // switch: dti < # of max elements --> move t2b or b2t until new top/bottom idx is covered
+                                               if ( dti > 0 ) {
+                                                       fromIdx = oti;
+                                                       toIdx = oti + dti - 1;
+                                                       delta = rowLen;
+                                               } else {
+                                                       fromIdx = obi + dti + 1;        // dti < 0
+                                                       toIdx = obi;
+                                                       delta = -rowLen;
+                                               }
+                                               log( ">>> partial change. delta=" + delta );
+                                       }
+
+                                       // Move items
+                                       for ( i = fromIdx; i <= toIdx; i++ ) {
+                                               moveItem( vl, i, i + delta );           // Change data and position
+                                       }
+
+                                       // Store current top/bottom idx into vl
+                                       vl._first_index = cti;
+                                       vl._last_index = cbi;
+
+                                       // Register timer to check again
+                                       vl.timerMoveID = setTimeout( timerMove, timerInterval, vl );
+                               }
+                               return; // End of function
+                       }
+
+                       // ==== function start ====
+
+                       t.timerStillCount = 0;  // Count do-nothing time.       For behavior tuning.
+
+                       // If a timer function is alive, clear it
+                       if ( t.timerMoveID ) {
+                               clearTimeout( t.timerMoveID );
+                               t.timerMoveID = null;
+                       }
+                       // run TimerMove()
+                       timerMove( t );
+               },
+
+               _recreate: function ( newArray ) {
+                       var t = this,
+                               o = this.options;
+
+                       $( o.id ).empty();
+
+                       t._numItemData = newArray.length;
+                       t._direction = _NO_SCROLL;
+                       t._first_index = 0;
+                       t._last_index = o.row - 1;
+
+                       t._pushData( o.template );
+
+                       if (o.childSelector == " ul" ) {
+                               $( o.id + " ul" ).swipelist();
+                       }
+
+                       $( o.id ).virtuallistview();
+
+                       t.refresh( true );
+
+                       t._reposition( o );
+               },
+
+               // Init virtuallistview
+               // this         virtuallistview object
+               _initList: function () {
+                       var t = this,
+                               o = this.options;
+
+                       /* After AJAX loading success */
+
+                       // Put initial <li> elements
+                       t._pushData( o.template );
+
+                       // find a parent page, and run _reposition() at 'pageshow' event
+                       // TODO: Consider replace parentsUntil().parent() to parent('.ui-page') ???
+                       $( o.id ).parentsUntil( ".ui-page" ).parent().one( "pageshow", function () {
+                               setTimeout( function () {
+                                       t._reposition( o );
+                               }, 0);
+                       });
+
+                       // Bind _scrollmove() at 'scrollstart.virtuallist' event
+                       $( document ).bind( "scrollstart.virtuallist scrollstop.vrituallist", t, t._scrollmove );
+
+                       // Bind _resize() at 'resize.virtuallist'
+                       $( window ).bind( "resize.virtuallist", t._resize );
+
+                       // when ul is a childselector, assume that this is also a swipelist,
+                       // and run swipelist constructor
+                       if ( o.childSelector == " ul" ) {
+                               $( o.id + " ul" ).swipelist();
+                       }
+
+                       t.refresh( true );
+               },
+
+               create: function () {
+                       var o = this.options;
+
+                       /* external API for AJAX callback */
+                       this._create.apply( this, arguments );
+
+                       // TODO: remove this line? _initList() calls reposition...
+                       this._reposition( o );
+               },
+
+               _create: function ( args ) {
+                       // Extend instance variables
+                       $.extend( this, {
+                               _itemData : function ( idx ) { return null; },
+                               _numItemData : 0,
+                               _cacheItemData : function ( minIdx, maxIdx ) { },
+                               _title_h : 0,
+                               _container_w : 0,
+                               _minimum_row : 100,
+                               _direction : _NO_SCROLL,
+                               _first_index : 0,
+                               _last_index : 0,
+                               _num_top_items : 0      // By scroll move, number of hidden elements.
+                       } );
+
+                       // local variables
+                       var t = this,
+                               o = this.options,
+                               $el = this.element,
+                               shortcutsContainer = $('<div class="ui-virtuallist"/>'),
+                               shortcutsList = $('<ul></ul>'),
+                               dividers = $el.find(':jqmData(role="virtuallistview" )'),
+                               lastListItem = null,
+                               shortcutscroll = this,
+                               dbtable_name,
+                               dbtable;
+
+
+                       // Add CSS classes to $el (=virtuallistview)
+                       $el.addClass( function ( i, orig ) {
+                               return orig + " ui-listview ui-virtual-list-container" + ( t.options.inset ? " ui-listview-inset ui-corner-all ui-shadow " : "" );
+                       });
+
+                       // keep the vlist's ID
+                       o.itemIDPrefix = $el.attr( "id" ) + '_';
+                       o.id = "#" + $el.attr( "id" );
+
+                       // when page hides, empty all child elements
+                       $( o.id ).bind( "pagehide", function ( e ) {
+                               $( o.id ).empty();
+                       });
+
+                       // Find if scrollview is used
+                       if ( $( ".ui-scrollview-clip" ).size() > 0 ) {
+                               o.scrollview = true;
+                       } else {
+                               o.scrollview = false;
+                       }
+
+                       // Calculate page buffer size
+                       if ( $el.data( "row" ) ) {
+                               o.row = $el.data( "row" );
+
+                               if ( o.row < t._minimum_row ) {
+                                       o.row = t._minimum_row;
+                               }
+
+                               o.page_buf = parseInt( ( o.row / 2 ), 10 );
+                       }
+
+                       // Get arguments
+                       if ( args ) {
+                               if ( args.itemData && typeof args.itemData == 'function'  ) {
+                                       t._itemData = args.itemData;
+                               } else {
+                                       return;
+                               }
+                               if ( args.numItemData ) {
+                                       if ( typeof args.numItemData == 'function' ) {
+                                               t._numItemData = args.numItemData( );
+                                       } else if ( typeof args.numItemData == 'number' ) {
+                                               t._numItemData = args.numItemData;
+                                       } else {
+                                               return;
+                                       }
+                               } else {
+                                       return;
+                               }
+                       } else {        // No option is given
+                               // Legacy support: dbtable
+                               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!" );
+
+                               /* After DB Load complete, Init Vritual list */
+                               if ( $( o.id ).hasClass( "vlLoadSuccess" ) ) {
+                                       dbtable_name = $el.jqmData('dbtable');
+                                       dbtable = window[ dbtable_name ];
+
+                                       $( o.id ).empty();
+
+                                       if ( !dbtable ) {
+                                               dbtable = { };
+                                       }
+
+                                       t._itemData = function ( idx ) {
+                                               return dbtable[ idx ];
+                                       };
+                                       t._numItemData = dbtable.length;
+                               } else {
+                                       return; // Do nothing
+                               }
+                       }
+
+                       // Get template data
+                       if ( $el.data( "template" ) ) {
+                               o.template = $el.data( "template" );
+
+                               /* to support swipe list, <li> or <ul> can be main node of virtual list. */
+                               if ( $el.data( "swipelist" ) == true ) {
+                                       o.childSelector = " ul";
+                               } else {
+                                       o.childSelector = " li";
+                               }
+                       }
+
+                       // Set data's unique key
+                       // NOTE: Unnecessary?
+                       if ( $el.data( "dbkey" ) ) {
+                               o.dbkey = $el.data( "dbkey" );
+                       }
+
+                       t._first_index = 0;                     // initial top idx of <li> element.
+                       t._last_index = o.row - 1;              // initial bottom idx of <li> element.
+                       t._initList();  // NOTE: Called at here only!
+               },
+
+               destroy : function () {
+                       var o = this.options;
+
+                       $( document ).unbind( "scrollstop" );
+
+                       $( window ).unbind( "resize.virtuallist" );
+
+                       $( o.id ).empty();
+
+                       if ( this.timerMoveID ) {
+                               clearTimeout( this.timerMoveID );
+                               this.timerMoveID = null;
+                       }
+               },
+
+               _itemApply: function ( $list, item ) {
+                       var $countli = item.find( ".ui-li-count" );
+
+                       if ( $countli.length ) {
+                               item.addClass( "ui-li-has-count" );
+                       }
+
+                       $countli.addClass( "ui-btn-up-" + ( $list.jqmData( "counttheme" ) || this.options.countTheme ) + " ui-btn-corner-all" );
+
+                       // TODO class has to be defined in markup
+                       item.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 () {
+                                       item.addClass( $( this ).is( ".ui-li-icon" ) ? "ui-li-has-icon" : "ui-li-has-thumb" );
+                               }).end()
+                               .find( ".ui-li-aside" ).each(function () {
+                                       var $this = $( this );
+                                       $this.prependTo( $this.parent() ); //shift aside to front for css float
+                               } );
+               },
+
+               _removeCorners: function ( li, which ) {
+                       var top = "ui-corner-top ui-corner-tr ui-corner-tl",
+                               bot = "ui-corner-bottom ui-corner-br ui-corner-bl";
+
+                       li = li.add( li.find( ".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb" ) );
+
+                       if ( which === "top" ) {
+                               li.removeClass( top );
+                       } else if ( which === "bottom" ) {
+                               li.removeClass( bot );
+                       } else {
+                               li.removeClass( top + " " + bot );
+                       }
+               },
+
+               _refreshCorners: function ( create ) {
+                       var $li,
+                               $visibleli,
+                               $topli,
+                               $bottomli;
+
+                       if ( this.options.inset ) {
+                               $li = this.element.children( "li" );
+                               // at create time the li are not visible yet so we need to rely on .ui-screen-hidden
+                               $visibleli = create ? $li.not( ".ui-screen-hidden" ) : $li.filter( ":visible" );
+
+                               this._removeCorners( $li );
+
+                               // Select the first visible li element
+                               $topli = $visibleli.first()
+                                       .addClass( "ui-corner-top" );
+
+                               $topli.add( $topli.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" );
+
+                               // Select the last visible li element
+                               $bottomli = $visibleli.last()
+                                       .addClass( "ui-corner-bottom" );
+
+                               $bottomli.add( $bottomli.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" );
+                       }
+               },
+
+               // this         virtuallistview object
+               refresh: function ( create ) {
+                       this.parentPage = this.element.closest( ".ui-page" );
+                       // Make sub page, and move the virtuallist into it...
+                       // NOTE: check this subroutine.
+                       this._createSubPages();
+
+                       var o = this.options,
+                               $list = this.element,
+                               self = this,
+                               dividertheme = $list.jqmData( "dividertheme" ) || o.dividerTheme,
+                               listsplittheme = $list.jqmData( "splittheme" ),
+                               listspliticon = $list.jqmData( "spliticon" ),
+                               li = $list.children( "li" ),
+                               counter = $.support.cssPseudoElement || !$.nodeName( $list[ 0 ], "ol" ) ? 0 : 1,
+                               item,
+                               itemClass,
+                               temTheme,
+                               a,
+                               last,
+                               splittheme,
+                               countParent,
+                               icon,
+                               pos,
+                               numli,
+                               itemTheme;
+
+                       // TODO: ?
+                       if ( counter ) {
+                               $list.find( ".ui-li-dec" ).remove();
+                       }
+
+                       for ( pos = 0, numli = li.length; pos < numli; pos++ ) {
+                               item = li.eq( pos );
+                               itemClass = "ui-li";
+
+                               // If we're creating the element, we update it regardless
+                               if ( create || !item.hasClass( "ui-li" ) ) {
+                                       itemTheme = item.jqmData( "theme" ) || o.theme;
+                                       a = item.children( "a" );
+
+                                       if ( a.length ) {
+                                               icon = item.jqmData( "icon" );
+
+                                               item.buttonMarkup({
+                                                       wrapperEls: "div",
+                                                       shadow: false,
+                                                       corners: false,
+                                                       iconpos: "right",
+                                                       /* icon: a.length > 1 || icon === false ? false : icon || "arrow-r",*/
+                                                       icon: false,    /* Remove unnecessary arrow icon */
+                                                       theme: itemTheme
+                                               });
+
+                                               if ( ( icon != false ) && ( a.length == 1 ) ) {
+                                                       item.addClass( "ui-li-has-arrow" );
+                                               }
+
+                                               a.first().addClass( "ui-link-inherit" );
+
+                                               if ( a.length > 1 ) {
+                                                       itemClass += " ui-li-has-alt";
+
+                                                       last = a.last();
+                                                       splittheme = listsplittheme || last.jqmData( "theme" ) || o.splitTheme;
+
+                                                       last.appendTo(item)
+                                                               .attr( "title", last.getEncodedText() )
+                                                               .addClass( "ui-li-link-alt" )
+                                                               .empty()
+                                                               .buttonMarkup({
+                                                                       shadow: false,
+                                                                       corners: false,
+                                                                       theme: itemTheme,
+                                                                       icon: false,
+                                                                       iconpos: false
+                                                               })
+                                                               .find( ".ui-btn-inner" )
+                                                               .append(
+                                                                       $( "<span />" ).buttonMarkup({
+                                                                               shadow: true,
+                                                                               corners: true,
+                                                                               theme: splittheme,
+                                                                               iconpos: "notext",
+                                                                               icon: listspliticon || last.jqmData( "icon" ) || o.splitIcon
+                                                                       })
+                                                               );
+                                               }
+                                       } else if ( item.jqmData( "role" ) === "list-divider" ) {
+
+                                               itemClass += " ui-li-divider ui-btn ui-bar-" + dividertheme;
+                                               item.attr( "role", "heading" );
+
+                                               //reset counter when a divider heading is encountered
+                                               if ( counter ) {
+                                                       counter = 1;
+                                               }
+
+                                       } else {
+                                               itemClass += " ui-li-static ui-body-" + itemTheme;
+                                       }
+                               }
+
+                               if ( counter && itemClass.indexOf( "ui-li-divider" ) < 0 ) {
+                                       countParent = item.is( ".ui-li-static:first" ) ? item : item.find( ".ui-link-inherit" );
+
+                                       countParent.addClass( "ui-li-jsnumbering" )
+                                               .prepend( "<span class='ui-li-dec'>" + (counter++) + ". </span>" );
+                               }
+
+                               item.add( item.children( ".ui-btn-inner" ) ).addClass( itemClass );
+
+                               self._itemApply( $list, item );
+                       }
+
+                       this._refreshCorners( create );
+               },
+
+               //create a string for ID/subpage url creation
+               _idStringEscape: function ( str ) {
+                       return str.replace(/\W/g , "-");
+               },
+
+               // ?
+               // this         virtuallistview object
+               _createSubPages: function () {
+                       var parentList = this.element,
+                               parentPage = parentList.closest( ".ui-page" ),
+                               parentUrl = parentPage.jqmData( "url" ),
+                               parentId = parentUrl || parentPage[ 0 ][ $.expando ],
+                               parentListId = parentList.attr( "id" ),
+                               o = this.options,
+                               dns = "data-" + $.mobile.ns,
+                               self = this,
+                               persistentFooterID = parentPage.find( ":jqmData(role='footer')" ).jqmData( "id" ),
+                               hasSubPages,
+                               newRemove;
+
+                       if ( typeof listCountPerPage[ parentId ] === "undefined" ) {
+                               listCountPerPage[ parentId ] = -1;
+                       }
+
+                       parentListId = parentListId || ++listCountPerPage[ parentId ];
+
+                       $( parentList.find( "li>ul, li>ol" ).toArray().reverse() ).each(function ( i ) {
+                               var self = this,
+                                       list = $( this ),
+                                       listId = list.attr( "id" ) || parentListId + "-" + i,
+                                       parent = list.parent(),
+                                       nodeEls,
+                                       title = nodeEls.first().getEncodedText(),//url limits to first 30 chars of text
+                                       id = ( parentUrl || "" ) + "&" + $.mobile.subPageUrlKey + "=" + listId,
+                                       theme = list.jqmData( "theme" ) || o.theme,
+                                       countTheme = list.jqmData( "counttheme" ) || parentList.jqmData( "counttheme" ) || o.countTheme,
+                                       newPage,
+                                       anchor;
+
+                               nodeEls = $( list.prevAll().toArray().reverse() );
+                               nodeEls = nodeEls.length ? nodeEls : $( "<span>" + $.trim( parent.contents()[ 0 ].nodeValue ) + "</span>" );
+
+                               //define hasSubPages for use in later removal
+                               hasSubPages = true;
+
+                               newPage = list.detach()
+                                                       .wrap( "<div " + dns + "role='page' " + dns + "url='" + id + "' " + dns + "theme='" + theme + "' " + dns + "count-theme='" + countTheme + "'><div " + dns + "role='content'></div></div>" )
+                                                       .parent()
+                                                               .before( "<div " + dns + "role='header' " + dns + "theme='" + o.headerTheme + "'><div class='ui-title'>" + title + "</div></div>" )
+                                                               .after( persistentFooterID ? $( "<div " + dns + "role='footer' " + dns + "id='" + persistentFooterID + "'>" ) : "" )
+                                                               .parent()
+                                                               .appendTo( $.mobile.pageContainer );
+
+                               newPage.page();
+
+                               anchor = parent.find('a:first');
+
+                               if ( !anchor.length ) {
+                                       anchor = $( "<a/>" ).html( nodeEls || title ).prependTo( parent.empty() );
+                               }
+
+                               anchor.attr( "href", "#" + id );
+
+                       }).virtuallistview();
+
+                       // on pagehide, remove any nested pages along with the parent page, as long as they aren't active
+                       // and aren't embedded
+                       if ( hasSubPages &&
+                                               parentPage.is( ":jqmData(external-page='true')" ) &&
+                                               parentPage.data( "page" ).options.domCache === false ) {
+
+                               newRemove = function ( e, ui ) {
+                                       var nextPage = ui.nextPage, npURL;
+
+                                       if ( ui.nextPage ) {
+                                               npURL = nextPage.jqmData( "url" );
+                                               if ( npURL.indexOf( parentUrl + "&" + $.mobile.subPageUrlKey ) !== 0 ) {
+                                                       self.childPages().remove();
+                                                       parentPage.remove();
+                                               }
+                                       }
+                               };
+
+                               // unbind the original page remove and replace with our specialized version
+                               parentPage
+                                       .unbind( "pagehide.remove" )
+                                       .bind( "pagehide.remove", newRemove );
+                       }
+               },
+
+               // TODO sort out a better way to track sub pages of the virtuallistview this is brittle
+               childPages: function () {
+                       var parentUrl = this.parentPage.jqmData( "url" );
+
+                       return $( ":jqmData(url^='" +  parentUrl + "&" + $.mobile.subPageUrlKey + "')" );
+               }
+       });
+
+       //auto self-init widgets
+       $( document ).bind( "pagecreate create", function ( e ) {
+               $( $.tizen.virtuallistview.prototype.options.initSelector, e.target ).virtuallistview();
+       });
+
+} ( jQuery ) );
+/*!
+ * Globalize
+ *
+ * http://github.com/jquery/globalize
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */
+
+(function( window, undefined ) {
+
+var Globalize,
+       // private variables
+       regexHex,
+       regexInfinity,
+       regexParseFloat,
+       regexTrim,
+       // private JavaScript utility functions
+       arrayIndexOf,
+       endsWith,
+       extend,
+       isArray,
+       isFunction,
+       isObject,
+       startsWith,
+       trim,
+       truncate,
+       zeroPad,
+       // private Globalization utility functions
+       appendPreOrPostMatch,
+       expandFormat,
+       formatDate,
+       formatNumber,
+       getTokenRegExp,
+       getEra,
+       getEraYear,
+       parseExact,
+       parseNegativePattern;
+
+// Global variable (Globalize) or CommonJS module (globalize)
+Globalize = function( cultureSelector ) {
+       return new Globalize.prototype.init( cultureSelector );
+};
+
+if ( typeof require !== "undefined"
+       && typeof exports !== "undefined"
+       && typeof module !== "undefined" ) {
+       // Assume CommonJS
+       module.exports = Globalize;
+} else {
+       // Export as global variable
+       window.Globalize = Globalize;
+}
+
+Globalize.cultures = {};
+
+Globalize.prototype = {
+       constructor: Globalize,
+       init: function( cultureSelector ) {
+               this.cultures = Globalize.cultures;
+               this.cultureSelector = cultureSelector;
+
+               return this;
+       }
+};
+Globalize.prototype.init.prototype = Globalize.prototype;
+
+// 1.   When defining a culture, all fields are required except the ones stated as optional.
+// 2.   Each culture should have a ".calendars" object with at least one calendar named "standard"
+//              which serves as the default calendar in use by that culture.
+// 3.   Each culture should have a ".calendar" object which is the current calendar being used,
+//              it may be dynamically changed at any time to one of the calendars in ".calendars".
+Globalize.cultures[ "default" ] = {
+       // A unique name for the culture in the form <language code>-<country/region code>
+       name: "en",
+       // the name of the culture in the english language
+       englishName: "English",
+       // the name of the culture in its own language
+       nativeName: "English",
+       // whether the culture uses right-to-left text
+       isRTL: false,
+       // "language" is used for so-called "specific" cultures.
+       // For example, the culture "es-CL" means "Spanish, in Chili".
+       // It represents the Spanish-speaking culture as it is in Chili,
+       // which might have different formatting rules or even translations
+       // than Spanish in Spain. A "neutral" culture is one that is not
+       // specific to a region. For example, the culture "es" is the generic
+       // Spanish culture, which may be a more generalized version of the language
+       // that may or may not be what a specific culture expects.
+       // For a specific culture like "es-CL", the "language" field refers to the
+       // neutral, generic culture information for the language it is using.
+       // This is not always a simple matter of the string before the dash.
+       // For example, the "zh-Hans" culture is netural (Simplified Chinese).
+       // And the "zh-SG" culture is Simplified Chinese in Singapore, whose lanugage
+       // field is "zh-CHS", not "zh".
+       // This field should be used to navigate from a specific culture to it's
+       // more general, neutral culture. If a culture is already as general as it
+       // can get, the language may refer to itself.
+       language: "en",
+       // numberFormat defines general number formatting rules, like the digits in
+       // each grouping, the group separator, and how negative numbers are displayed.
+       numberFormat: {
+               // [negativePattern]
+               // Note, numberFormat.pattern has no "positivePattern" unlike percent and currency,
+               // but is still defined as an array for consistency with them.
+               //   negativePattern: one of "(n)|-n|- n|n-|n -"
+               pattern: [ "-n" ],
+               // number of decimal places normally shown
+               decimals: 2,
+               // string that separates number groups, as in 1,000,000
+               ",": ",",
+               // string that separates a number from the fractional portion, as in 1.99
+               ".": ".",
+               // array of numbers indicating the size of each number group.
+               // TODO: more detailed description and example
+               groupSizes: [ 3 ],
+               // symbol used for positive numbers
+               "+": "+",
+               // symbol used for negative numbers
+               "-": "-",
+               // symbol used for NaN (Not-A-Number)
+               NaN: "NaN",
+               // symbol used for Negative Infinity
+               negativeInfinity: "-Infinity",
+               // symbol used for Positive Infinity
+               positiveInfinity: "Infinity",
+               percent: {
+                       // [negativePattern, positivePattern]
+                       //   negativePattern: one of "-n %|-n%|-%n|%-n|%n-|n-%|n%-|-% n|n %-|% n-|% -n|n- %"
+                       //   positivePattern: one of "n %|n%|%n|% n"
+                       pattern: [ "-n %", "n %" ],
+                       // number of decimal places normally shown
+                       decimals: 2,
+                       // array of numbers indicating the size of each number group.
+                       // TODO: more detailed description and example
+                       groupSizes: [ 3 ],
+                       // string that separates number groups, as in 1,000,000
+                       ",": ",",
+                       // string that separates a number from the fractional portion, as in 1.99
+                       ".": ".",
+                       // symbol used to represent a percentage
+                       symbol: "%"
+               },
+               currency: {
+                       // [negativePattern, positivePattern]
+                       //   negativePattern: one of "($n)|-$n|$-n|$n-|(n$)|-n$|n-$|n$-|-n $|-$ n|n $-|$ n-|$ -n|n- $|($ n)|(n $)"
+                       //   positivePattern: one of "$n|n$|$ n|n $"
+                       pattern: [ "($n)", "$n" ],
+                       // number of decimal places normally shown
+                       decimals: 2,
+                       // array of numbers indicating the size of each number group.
+                       // TODO: more detailed description and example
+                       groupSizes: [ 3 ],
+                       // string that separates number groups, as in 1,000,000
+                       ",": ",",
+                       // string that separates a number from the fractional portion, as in 1.99
+                       ".": ".",
+                       // symbol used to represent currency
+                       symbol: "$"
+               }
+       },
+       // calendars defines all the possible calendars used by this culture.
+       // There should be at least one defined with name "standard", and is the default
+       // calendar used by the culture.
+       // A calendar contains information about how dates are formatted, information about
+       // the calendar's eras, a standard set of the date formats,
+       // translations for day and month names, and if the calendar is not based on the Gregorian
+       // calendar, conversion functions to and from the Gregorian calendar.
+       calendars: {
+               standard: {
+                       // name that identifies the type of calendar this is
+                       name: "Gregorian_USEnglish",
+                       // separator of parts of a date (e.g. "/" in 11/05/1955)
+                       "/": "/",
+                       // separator of parts of a time (e.g. ":" in 05:44 PM)
+                       ":": ":",
+                       // the first day of the week (0 = Sunday, 1 = Monday, etc)
+                       firstDay: 0,
+                       days: {
+                               // full day names
+                               names: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ],
+                               // abbreviated day names
+                               namesAbbr: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ],
+                               // shortest day names
+                               namesShort: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa" ]
+                       },
+                       months: {
+                               // full month names (13 months for lunar calendards -- 13th month should be "" if not lunar)
+                               names: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", "" ],
+                               // abbreviated month names
+                               namesAbbr: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "" ]
+                       },
+                       // AM and PM designators in one of these forms:
+                       // The usual view, and the upper and lower case versions
+                       //   [ standard, lowercase, uppercase ]
+                       // The culture does not use AM or PM (likely all standard date formats use 24 hour time)
+                       //   null
+                       AM: [ "AM", "am", "AM" ],
+                       PM: [ "PM", "pm", "PM" ],
+                       eras: [
+                               // eras in reverse chronological order.
+                               // name: the name of the era in this culture (e.g. A.D., C.E.)
+                               // start: when the era starts in ticks (gregorian, gmt), null if it is the earliest supported era.
+                               // offset: offset in years from gregorian calendar
+                               {
+                                       "name": "A.D.",
+                                       "start": null,
+                                       "offset": 0
+                               }
+                       ],
+                       // when a two digit year is given, it will never be parsed as a four digit
+                       // year greater than this year (in the appropriate era for the culture)
+                       // Set it as a full year (e.g. 2029) or use an offset format starting from
+                       // the current year: "+19" would correspond to 2029 if the current year 2010.
+                       twoDigitYearMax: 2029,
+                       // set of predefined date and time patterns used by the culture
+                       // these represent the format someone in this culture would expect
+                       // to see given the portions of the date that are shown.
+                       patterns: {
+                               // short date pattern
+                               d: "M/d/yyyy",
+                               // long date pattern
+                               D: "dddd, MMMM dd, yyyy",
+                               // short time pattern
+                               t: "h:mm tt",
+                               // long time pattern
+                               T: "h:mm:ss tt",
+                               // long date, short time pattern
+                               f: "dddd, MMMM dd, yyyy h:mm tt",
+                               // long date, long time pattern
+                               F: "dddd, MMMM dd, yyyy h:mm:ss tt",
+                               // month/day pattern
+                               M: "MMMM dd",
+                               // month/year pattern
+                               Y: "yyyy MMMM",
+                               // S is a sortable format that does not vary by culture
+                               S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss"
+                       }
+                       // optional fields for each calendar:
+                       /*
+                       monthsGenitive:
+                               Same as months but used when the day preceeds the month.
+                               Omit if the culture has no genitive distinction in month names.
+                               For an explaination of genitive months, see http://blogs.msdn.com/michkap/archive/2004/12/25/332259.aspx
+                       convert:
+                               Allows for the support of non-gregorian based calendars. This convert object is used to
+                               to convert a date to and from a gregorian calendar date to handle parsing and formatting.
+                               The two functions:
+                                       fromGregorian( date )
+                                               Given the date as a parameter, return an array with parts [ year, month, day ]
+                                               corresponding to the non-gregorian based year, month, and day for the calendar.
+                                       toGregorian( year, month, day )
+                                               Given the non-gregorian year, month, and day, return a new Date() object
+                                               set to the corresponding date in the gregorian calendar.
+                       */
+               }
+       },
+       // For localized strings
+       messages: {}
+};
+
+Globalize.cultures[ "default" ].calendar = Globalize.cultures[ "default" ].calendars.standard;
+
+Globalize.cultures[ "en" ] = Globalize.cultures[ "default" ];
+
+Globalize.cultureSelector = "en";
+
+//
+// private variables
+//
+
+regexHex = /^0x[a-f0-9]+$/i;
+regexInfinity = /^[+-]?infinity$/i;
+regexParseFloat = /^[+-]?\d*\.?\d*(e[+-]?\d+)?$/;
+regexTrim = /^\s+|\s+$/g;
+
+//
+// private JavaScript utility functions
+//
+
+arrayIndexOf = function( array, item ) {
+       if ( array.indexOf ) {
+               return array.indexOf( item );
+       }
+       for ( var i = 0, length = array.length; i < length; i++ ) {
+               if ( array[i] === item ) {
+                       return i;
+               }
+       }
+       return -1;
+};
+
+endsWith = function( value, pattern ) {
+       return value.substr( value.length - pattern.length ) === pattern;
+};
+
+extend = function( deep ) {
+       var options, name, src, copy, copyIsArray, clone,
+               target = arguments[0] || {},
+               i = 1,
+               length = arguments.length,
+               deep = false;
+
+       // Handle a deep copy situation
+       if ( typeof target === "boolean" ) {
+               deep = target;
+               target = arguments[1] || {};
+               // skip the boolean and the target
+               i = 2;
+       }
+
+       // Handle case when target is a string or something (possible in deep copy)
+       if ( typeof target !== "object" && !isFunction(target) ) {
+               target = {};
+       }
+
+       for ( ; i < length; i++ ) {
+               // Only deal with non-null/undefined values
+               if ( (options = arguments[ i ]) != null ) {
+                       // Extend the base object
+                       for ( name in options ) {
+                               src = target[ name ];
+                               copy = options[ name ];
+
+                               // Prevent never-ending loop
+                               if ( target === copy ) {
+                                       continue;
+                               }
+
+                               // Recurse if we're merging plain objects or arrays
+                               if ( deep && copy && ( isObject(copy) || (copyIsArray = isArray(copy)) ) ) {
+                                       if ( copyIsArray ) {
+                                               copyIsArray = false;
+                                               clone = src && isArray(src) ? src : [];
+
+                                       } else {
+                                               clone = src && isObject(src) ? src : {};
+                                       }
+
+                                       // Never move original objects, clone them
+                                       target[ name ] = extend( deep, clone, copy );
+
+                               // Don't bring in undefined values
+                               } else if ( copy !== undefined ) {
+                                       target[ name ] = copy;
+                               }
+                       }
+               }
+       }
+
+       // Return the modified object
+       return target;
+};
+
+isArray = Array.isArray || function( obj ) {
+       return Object.prototype.toString.call( obj ) === "[object Array]";
+};
+
+isFunction = function( obj ) {
+       return Object.prototype.toString.call( obj ) === "[object Function]";
+};
+
+isObject = function( obj ) {
+       return Object.prototype.toString.call( obj ) === "[object Object]";
+};
+
+startsWith = function( value, pattern ) {
+       return value.indexOf( pattern ) === 0;
+};
+
+trim = function( value ) {
+       return ( value + "" ).replace( regexTrim, "" );
+};
+
+truncate = function( value ) {
+       if ( isNaN( value ) ) {
+               return NaN;
+       }
+       return Math[ value < 0 ? "ceil" : "floor" ]( value );
+};
+
+zeroPad = function( str, count, left ) {
+       var l;
+       for ( l = str.length; l < count; l += 1 ) {
+               str = ( left ? ("0" + str) : (str + "0") );
+       }
+       return str;
+};
+
+//
+// private Globalization utility functions
+//
+
+appendPreOrPostMatch = function( preMatch, strings ) {
+       // appends pre- and post- token match strings while removing escaped characters.
+       // Returns a single quote count which is used to determine if the token occurs
+       // in a string literal.
+       var quoteCount = 0,
+               escaped = false;
+       for ( var i = 0, il = preMatch.length; i < il; i++ ) {
+               var c = preMatch.charAt( i );
+               switch ( c ) {
+                       case "\'":
+                               if ( escaped ) {
+                                       strings.push( "\'" );
+                               }
+                               else {
+                                       quoteCount++;
+                               }
+                               escaped = false;
+                               break;
+                       case "\\":
+                               if ( escaped ) {
+                                       strings.push( "\\" );
+                               }
+                               escaped = !escaped;
+                               break;
+                       default:
+                               strings.push( c );
+                               escaped = false;
+                               break;
+               }
+       }
+       return quoteCount;
+};
+
+expandFormat = function( cal, format ) {
+       // expands unspecified or single character date formats into the full pattern.
+       format = format || "F";
+       var pattern,
+               patterns = cal.patterns,
+               len = format.length;
+       if ( len === 1 ) {
+               pattern = patterns[ format ];
+               if ( !pattern ) {
+                       throw "Invalid date format string \'" + format + "\'.";
+               }
+               format = pattern;
+       }
+       else if ( len === 2 && format.charAt(0) === "%" ) {
+               // %X escape format -- intended as a custom format string that is only one character, not a built-in format.
+               format = format.charAt( 1 );
+       }
+       return format;
+};
+
+formatDate = function( value, format, culture ) {
+       var cal = culture.calendar,
+               convert = cal.convert;
+
+       if ( !format || !format.length || format === "i" ) {
+               var ret;
+               if ( culture && culture.name.length ) {
+                       if ( convert ) {
+                               // non-gregorian calendar, so we cannot use built-in toLocaleString()
+                               ret = formatDate( value, cal.patterns.F, culture );
+                       }
+                       else {
+                               var eraDate = new Date( value.getTime() ),
+                                       era = getEra( value, cal.eras );
+                               eraDate.setFullYear( getEraYear(value, cal, era) );
+                               ret = eraDate.toLocaleString();
+                       }
+               }
+               else {
+                       ret = value.toString();
+               }
+               return ret;
+       }
+
+       var eras = cal.eras,
+               sortable = format === "s";
+       format = expandFormat( cal, format );
+
+       // Start with an empty string
+       ret = [];
+       var hour,
+               zeros = [ "0", "00", "000" ],
+               foundDay,
+               checkedDay,
+               dayPartRegExp = /([^d]|^)(d|dd)([^d]|$)/g,
+               quoteCount = 0,
+               tokenRegExp = getTokenRegExp(),
+               converted;
+
+       function padZeros( num, c ) {
+               var r, s = num + "";
+               if ( c > 1 && s.length < c ) {
+                       r = ( zeros[c - 2] + s);
+                       return r.substr( r.length - c, c );
+               }
+               else {
+                       r = s;
+               }
+               return r;
+       }
+
+       function hasDay() {
+               if ( foundDay || checkedDay ) {
+                       return foundDay;
+               }
+               foundDay = dayPartRegExp.test( format );
+               checkedDay = true;
+               return foundDay;
+       }
+
+       function getPart( date, part ) {
+               if ( converted ) {
+                       return converted[ part ];
+               }
+               switch ( part ) {
+                       case 0: return date.getFullYear();
+                       case 1: return date.getMonth();
+                       case 2: return date.getDate();
+               }
+       }
+
+       if ( !sortable && convert ) {
+               converted = convert.fromGregorian( value );
+       }
+
+       for ( ; ; ) {
+               // Save the current index
+               var index = tokenRegExp.lastIndex,
+                       // Look for the next pattern
+                       ar = tokenRegExp.exec( format );
+
+               // Append the text before the pattern (or the end of the string if not found)
+               var preMatch = format.slice( index, ar ? ar.index : format.length );
+               quoteCount += appendPreOrPostMatch( preMatch, ret );
+
+               if ( !ar ) {
+                       break;
+               }
+
+               // do not replace any matches that occur inside a string literal.
+               if ( quoteCount % 2 ) {
+                       ret.push( ar[0] );
+                       continue;
+               }
+
+               var current = ar[ 0 ],
+                       clength = current.length;
+
+               switch ( current ) {
+                       case "ddd":
+                               //Day of the week, as a three-letter abbreviation
+                       case "dddd":
+                               // Day of the week, using the full name
+                               var names = ( clength === 3 ) ? cal.days.namesAbbr : cal.days.names;
+                               ret.push( names[value.getDay()] );
+                               break;
+                       case "d":
+                               // Day of month, without leading zero for single-digit days
+                       case "dd":
+                               // Day of month, with leading zero for single-digit days
+                               foundDay = true;
+                               ret.push(
+                                       padZeros( getPart(value, 2), clength )
+                               );
+                               break;
+                       case "MMM":
+                               // Month, as a three-letter abbreviation
+                       case "MMMM":
+                               // Month, using the full name
+                               var part = getPart( value, 1 );
+                               ret.push(
+                                       ( cal.monthsGenitive && hasDay() )
+                                       ?
+                                       cal.monthsGenitive[ clength === 3 ? "namesAbbr" : "names" ][ part ]
+                                       :
+                                       cal.months[ clength === 3 ? "namesAbbr" : "names" ][ part ]
+                               );
+                               break;
+                       case "M":
+                               // Month, as digits, with no leading zero for single-digit months
+                       case "MM":
+                               // Month, as digits, with leading zero for single-digit months
+                               ret.push(
+                                       padZeros( getPart(value, 1) + 1, clength )
+                               );
+                               break;
+                       case "y":
+                               // Year, as two digits, but with no leading zero for years less than 10
+                       case "yy":
+                               // Year, as two digits, with leading zero for years less than 10
+                       case "yyyy":
+                               // Year represented by four full digits
+                               part = converted ? converted[ 0 ] : getEraYear( value, cal, getEra(value, eras), sortable );
+                               if ( clength < 4 ) {
+                                       part = part % 100;
+                               }
+                               ret.push(
+                                       padZeros( part, clength )
+                               );
+                               break;
+                       case "h":
+                               // Hours with no leading zero for single-digit hours, using 12-hour clock
+                       case "hh":
+                               // Hours with leading zero for single-digit hours, using 12-hour clock
+                               hour = value.getHours() % 12;
+                               if ( hour === 0 ) hour = 12;
+                               ret.push(
+                                       padZeros( hour, clength )
+                               );
+                               break;
+                       case "H":
+                               // Hours with no leading zero for single-digit hours, using 24-hour clock
+                       case "HH":
+                               // Hours with leading zero for single-digit hours, using 24-hour clock
+                               ret.push(
+                                       padZeros( value.getHours(), clength )
+                               );
+                               break;
+                       case "m":
+                               // Minutes with no leading zero for single-digit minutes
+                       case "mm":
+                               // Minutes with leading zero for single-digit minutes
+                               ret.push(
+                                       padZeros( value.getMinutes(), clength )
+                               );
+                               break;
+                       case "s":
+                               // Seconds with no leading zero for single-digit seconds
+                       case "ss":
+                               // Seconds with leading zero for single-digit seconds
+                               ret.push(
+                                       padZeros( value.getSeconds(), clength )
+                               );
+                               break;
+                       case "t":
+                               // One character am/pm indicator ("a" or "p")
+                       case "tt":
+                               // Multicharacter am/pm indicator
+                               part = value.getHours() < 12 ? ( cal.AM ? cal.AM[0] : " " ) : ( cal.PM ? cal.PM[0] : " " );
+                               ret.push( clength === 1 ? part.charAt(0) : part );
+                               break;
+                       case "f":
+                               // Deciseconds
+                       case "ff":
+                               // Centiseconds
+                       case "fff":
+                               // Milliseconds
+                               ret.push(
+                                       padZeros( value.getMilliseconds(), 3 ).substr( 0, clength )
+                               );
+                               break;
+                       case "z":
+                               // Time zone offset, no leading zero
+                       case "zz":
+                               // Time zone offset with leading zero
+                               hour = value.getTimezoneOffset() / 60;
+                               ret.push(
+                                       ( hour <= 0 ? "+" : "-" ) + padZeros( Math.floor(Math.abs(hour)), clength )
+                               );
+                               break;
+                       case "zzz":
+                               // Time zone offset with leading zero
+                               hour = value.getTimezoneOffset() / 60;
+                               ret.push(
+                                       ( hour <= 0 ? "+" : "-" ) + padZeros( Math.floor(Math.abs(hour)), 2 )
+                                       // Hard coded ":" separator, rather than using cal.TimeSeparator
+                                       // Repeated here for consistency, plus ":" was already assumed in date parsing.
+                                       + ":" + padZeros( Math.abs(value.getTimezoneOffset() % 60), 2 )
+                               );
+                               break;
+                       case "g":
+                       case "gg":
+                               if ( cal.eras ) {
+                                       ret.push(
+                                               cal.eras[ getEra(value, eras) ].name
+                                       );
+                               }
+                               break;
+               case "/":
+                       ret.push( cal["/"] );
+                       break;
+               default:
+                       throw "Invalid date format pattern \'" + current + "\'.";
+                       break;
+               }
+       }
+       return ret.join( "" );
+};
+
+// formatNumber
+(function() {
+       var expandNumber;
+
+       expandNumber = function( number, precision, formatInfo ) {
+               var groupSizes = formatInfo.groupSizes,
+                       curSize = groupSizes[ 0 ],
+                       curGroupIndex = 1,
+                       factor = Math.pow( 10, precision ),
+                       rounded = Math.round( number * factor ) / factor;
+
+               if ( !isFinite(rounded) ) {
+                       rounded = number;
+               }
+               number = rounded;
+
+               var numberString = number+"",
+                       right = "",
+                       split = numberString.split( /e/i ),
+                       exponent = split.length > 1 ? parseInt( split[1], 10 ) : 0;
+               numberString = split[ 0 ];
+               split = numberString.split( "." );
+               numberString = split[ 0 ];
+               right = split.length > 1 ? split[ 1 ] : "";
+
+               var l;
+               if ( exponent > 0 ) {
+                       right = zeroPad( right, exponent, false );
+                       numberString += right.slice( 0, exponent );
+                       right = right.substr( exponent );
+               }
+               else if ( exponent < 0 ) {
+                       exponent = -exponent;
+                       numberString = zeroPad( numberString, exponent + 1 );
+                       right = numberString.slice( -exponent, numberString.length ) + right;
+                       numberString = numberString.slice( 0, -exponent );
+               }
+
+               if ( precision > 0 ) {
+                       right = formatInfo[ "." ] +
+                               ( (right.length > precision) ? right.slice(0, precision) : zeroPad(right, precision) );
+               }
+               else {
+                       right = "";
+               }
+
+               var stringIndex = numberString.length - 1,
+                       sep = formatInfo[ "," ],
+                       ret = "";
+
+               while ( stringIndex >= 0 ) {
+                       if ( curSize === 0 || curSize > stringIndex ) {
+                               return numberString.slice( 0, stringIndex + 1 ) + ( ret.length ? (sep + ret + right) : right );
+                       }
+                       ret = numberString.slice( stringIndex - curSize + 1, stringIndex + 1 ) + ( ret.length ? (sep + ret) : "" );
+
+                       stringIndex -= curSize;
+
+                       if ( curGroupIndex < groupSizes.length ) {
+                               curSize = groupSizes[ curGroupIndex ];
+                               curGroupIndex++;
+                       }
+               }
+
+               return numberString.slice( 0, stringIndex + 1 ) + sep + ret + right;
+       };
+
+       formatNumber = function( value, format, culture ) {
+               if ( !isFinite(value) ) {
+                       if ( value === Infinity ) {
+                               return culture.numberFormat.positiveInfinity;
+                       }
+                       if ( value === -Infinity ) {
+                               return culture.numberFormat.negativeInfinity;
+                       }
+                       return culture.numberFormat.NaN;
+               }
+               if ( !format || format === "i" ) {
+                       return culture.name.length ? value.toLocaleString() : value.toString();
+               }
+               format = format || "D";
+
+               var nf = culture.numberFormat,
+                       number = Math.abs( value ),
+                       precision = -1,
+                       pattern;
+               if ( format.length > 1 ) precision = parseInt( format.slice(1), 10 );
+
+               var current = format.charAt( 0 ).toUpperCase(),
+                       formatInfo;
+
+               switch ( current ) {
+                       case "D":
+                               pattern = "n";
+                               number = truncate( number );
+                               if ( precision !== -1 ) {
+                                       number = zeroPad( "" + number, precision, true );
+                               }
+                               if ( value < 0 ) number = "-" + number;
+                               break;
+                       case "N":
+                               formatInfo = nf;
+                               // fall through
+                       case "C":
+                               formatInfo = formatInfo || nf.currency;
+                               // fall through
+                       case "P":
+                               formatInfo = formatInfo || nf.percent;
+                               pattern = value < 0 ? formatInfo.pattern[ 0 ] : ( formatInfo.pattern[1] || "n" );
+                               if ( precision === -1 ) precision = formatInfo.decimals;
+                               number = expandNumber( number * (current === "P" ? 100 : 1), precision, formatInfo );
+                               break;
+                       default:
+                               throw "Bad number format specifier: " + current;
+               }
+
+               var patternParts = /n|\$|-|%/g,
+                       ret = "";
+               for ( ; ; ) {
+                       var index = patternParts.lastIndex,
+                               ar = patternParts.exec( pattern );
+
+                       ret += pattern.slice( index, ar ? ar.index : pattern.length );
+
+                       if ( !ar ) {
+                               break;
+                       }
+
+                       switch ( ar[0] ) {
+                               case "n":
+                                       ret += number;
+                                       break;
+                               case "$":
+                                       ret += nf.currency.symbol;
+                                       break;
+                               case "-":
+                                       // don't make 0 negative
+                                       if ( /[1-9]/.test(number) ) {
+                                               ret += nf[ "-" ];
+                                       }
+                                       break;
+                               case "%":
+                                       ret += nf.percent.symbol;
+                                       break;
+                       }
+               }
+
+               return ret;
+       };
+
+}());
+
+getTokenRegExp = function() {
+       // regular expression for matching date and time tokens in format strings.
+       return /\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g;
+};
+
+getEra = function( date, eras ) {
+       if ( !eras ) return 0;
+       var start, ticks = date.getTime();
+       for ( var i = 0, l = eras.length; i < l; i++ ) {
+               start = eras[ i ].start;
+               if ( start === null || ticks >= start ) {
+                       return i;
+               }
+       }
+       return 0;
+};
+
+getEraYear = function( date, cal, era, sortable ) {
+       var year = date.getFullYear();
+       if ( !sortable && cal.eras ) {
+               // convert normal gregorian year to era-shifted gregorian
+               // year by subtracting the era offset
+               year -= cal.eras[ era ].offset;
+       }
+       return year;
+};
+
+// parseExact
+(function() {
+       var expandYear,
+               getDayIndex,
+               getMonthIndex,
+               getParseRegExp,
+               outOfRange,
+               toUpper,
+               toUpperArray;
+
+       expandYear = function( cal, year ) {
+               // expands 2-digit year into 4 digits.
+               if ( year < 100 ) {
+                       var now = new Date(),
+                               era = getEra( now ),
+                               curr = getEraYear( now, cal, era ),
+                               twoDigitYearMax = cal.twoDigitYearMax;
+                       twoDigitYearMax = typeof twoDigitYearMax === "string" ? new Date().getFullYear() % 100 + parseInt( twoDigitYearMax, 10 ) : twoDigitYearMax;
+                       year += curr - ( curr % 100 );
+                       if ( year > twoDigitYearMax ) {
+                               year -= 100;
+                       }
+               }
+               return year;
+       };
+
+       getDayIndex = function  ( cal, value, abbr ) {
+               var ret,
+                       days = cal.days,
+                       upperDays = cal._upperDays;
+               if ( !upperDays ) {
+                       cal._upperDays = upperDays = [
+                               toUpperArray( days.names ),
+                               toUpperArray( days.namesAbbr ),
+                               toUpperArray( days.namesShort )
+                       ];
+               }
+               value = toUpper( value );
+               if ( abbr ) {
+                       ret = arrayIndexOf( upperDays[1], value );
+                       if ( ret === -1 ) {
+                               ret = arrayIndexOf( upperDays[2], value );
+                       }
+               }
+               else {
+                       ret = arrayIndexOf( upperDays[0], value );
+               }
+               return ret;
+       };
+
+       getMonthIndex = function( cal, value, abbr ) {
+               var months = cal.months,
+                       monthsGen = cal.monthsGenitive || cal.months,
+                       upperMonths = cal._upperMonths,
+                       upperMonthsGen = cal._upperMonthsGen;
+               if ( !upperMonths ) {
+                       cal._upperMonths = upperMonths = [
+                               toUpperArray( months.names ),
+                               toUpperArray( months.namesAbbr )
+                       ];
+                       cal._upperMonthsGen = upperMonthsGen = [
+                               toUpperArray( monthsGen.names ),
+                               toUpperArray( monthsGen.namesAbbr )
+                       ];
+               }
+               value = toUpper( value );
+               var i = arrayIndexOf( abbr ? upperMonths[1] : upperMonths[0], value );
+               if ( i < 0 ) {
+                       i = arrayIndexOf( abbr ? upperMonthsGen[1] : upperMonthsGen[0], value );
+               }
+               return i;
+       };
+
+       getParseRegExp = function( cal, format ) {
+               // converts a format string into a regular expression with groups that
+               // can be used to extract date fields from a date string.
+               // check for a cached parse regex.
+               var re = cal._parseRegExp;
+               if ( !re ) {
+                       cal._parseRegExp = re = {};
+               }
+               else {
+                       var reFormat = re[ format ];
+                       if ( reFormat ) {
+                               return reFormat;
+                       }
+               }
+
+               // expand single digit formats, then escape regular expression characters.
+               var expFormat = expandFormat( cal, format ).replace( /([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g, "\\\\$1" ),
+                       regexp = [ "^" ],
+                       groups = [],
+                       index = 0,
+                       quoteCount = 0,
+                       tokenRegExp = getTokenRegExp(),
+                       match;
+
+               // iterate through each date token found.
+               while ( (match = tokenRegExp.exec(expFormat)) !== null ) {
+                       var preMatch = expFormat.slice( index, match.index );
+                       index = tokenRegExp.lastIndex;
+
+                       // don't replace any matches that occur inside a string literal.
+                       quoteCount += appendPreOrPostMatch( preMatch, regexp );
+                       if ( quoteCount % 2 ) {
+                               regexp.push( match[0] );
+                               continue;
+                       }
+
+                       // add a regex group for the token.
+                       var m = match[ 0 ],
+                               len = m.length,
+                               add;
+                       switch ( m ) {
+                               case "dddd": case "ddd":
+                               case "MMMM": case "MMM":
+                               case "gg": case "g":
+                                       add = "(\\D+)";
+                                       break;
+                               case "tt": case "t":
+                                       add = "(\\D*)";
+                                       break;
+                               case "yyyy":
+                               case "fff":
+                               case "ff":
+                               case "f":
+                                       add = "(\\d{" + len + "})";
+                                       break;
+                               case "dd": case "d":
+                               case "MM": case "M":
+                               case "yy": case "y":
+                               case "HH": case "H":
+                               case "hh": case "h":
+                               case "mm": case "m":
+                               case "ss": case "s":
+                                       add = "(\\d\\d?)";
+                                       break;
+                               case "zzz":
+                                       add = "([+-]?\\d\\d?:\\d{2})";
+                                       break;
+                               case "zz": case "z":
+                                       add = "([+-]?\\d\\d?)";
+                                       break;
+                               case "/":
+                                       add = "(\\" + cal[ "/" ] + ")";
+                                       break;
+                               default:
+                                       throw "Invalid date format pattern \'" + m + "\'.";
+                                       break;
+                       }
+                       if ( add ) {
+                               regexp.push( add );
+                       }
+                       groups.push( match[0] );
+               }
+               appendPreOrPostMatch( expFormat.slice(index), regexp );
+               regexp.push( "$" );
+
+               // allow whitespace to differ when matching formats.
+               var regexpStr = regexp.join( "" ).replace( /\s+/g, "\\s+" ),
+                       parseRegExp = { "regExp": regexpStr, "groups": groups };
+
+               // cache the regex for this format.
+               return re[ format ] = parseRegExp;
+       };
+
+       outOfRange = function( value, low, high ) {
+               return value < low || value > high;
+       };
+
+       toUpper = function( value ) {
+               // "he-IL" has non-breaking space in weekday names.
+               return value.split( "\u00A0" ).join( " " ).toUpperCase();
+       };
+
+       toUpperArray = function( arr ) {
+               var results = [];
+               for ( var i = 0, l = arr.length; i < l; i++ ) {
+                       results[ i ] = toUpper( arr[i] );
+               }
+               return results;
+       };
+
+       parseExact = function( value, format, culture ) {
+               // try to parse the date string by matching against the format string
+               // while using the specified culture for date field names.
+               value = trim( value );
+               var cal = culture.calendar,
+                       // convert date formats into regular expressions with groupings.
+                       // use the regexp to determine the input format and extract the date fields.
+                       parseInfo = getParseRegExp( cal, format ),
+                       match = new RegExp( parseInfo.regExp ).exec( value );
+               if ( match === null ) {
+                       return null;
+               }
+               // found a date format that matches the input.
+               var groups = parseInfo.groups,
+                       era = null, year = null, month = null, date = null, weekDay = null,
+                       hour = 0, hourOffset, min = 0, sec = 0, msec = 0, tzMinOffset = null,
+                       pmHour = false;
+               // iterate the format groups to extract and set the date fields.
+               for ( var j = 0, jl = groups.length; j < jl; j++ ) {
+                       var matchGroup = match[ j + 1 ];
+                       if ( matchGroup ) {
+                               var current = groups[ j ],
+                                       clength = current.length,
+                                       matchInt = parseInt( matchGroup, 10 );
+                               switch ( current ) {
+                                       case "dd": case "d":
+                                               // Day of month.
+                                               date = matchInt;
+                                               // check that date is generally in valid range, also checking overflow below.
+                                               if ( outOfRange(date, 1, 31) ) return null;
+                                               break;
+                                       case "MMM": case "MMMM":
+                                               month = getMonthIndex( cal, matchGroup, clength === 3 );
+                                               if ( outOfRange(month, 0, 11) ) return null;
+                                               break;
+                                       case "M": case "MM":
+                                               // Month.
+                                               month = matchInt - 1;
+                                               if ( outOfRange(month, 0, 11) ) return null;
+                                               break;
+                                       case "y": case "yy":
+                                       case "yyyy":
+                                               year = clength < 4 ? expandYear( cal, matchInt ) : matchInt;
+                                               if ( outOfRange(year, 0, 9999) ) return null;
+                                               break;
+                                       case "h": case "hh":
+                                               // Hours (12-hour clock).
+                                               hour = matchInt;
+                                               if ( hour === 12 ) hour = 0;
+                                               if ( outOfRange(hour, 0, 11) ) return null;
+                                               break;
+                                       case "H": case "HH":
+                                               // Hours (24-hour clock).
+                                               hour = matchInt;
+                                               if ( outOfRange(hour, 0, 23) ) return null;
+                                               break;
+                                       case "m": case "mm":
+                                               // Minutes.
+                                               min = matchInt;
+                                               if ( outOfRange(min, 0, 59) ) return null;
+                                               break;
+                                       case "s": case "ss":
+                                               // Seconds.
+                                               sec = matchInt;
+                                               if ( outOfRange(sec, 0, 59) ) return null;
+                                               break;
+                                       case "tt": case "t":
+                                               // AM/PM designator.
+                                               // see if it is standard, upper, or lower case PM. If not, ensure it is at least one of
+                                               // the AM tokens. If not, fail the parse for this format.
+                                               pmHour = cal.PM && ( matchGroup === cal.PM[0] || matchGroup === cal.PM[1] || matchGroup === cal.PM[2] );
+                                               if (
+                                                       !pmHour && (
+                                                               !cal.AM || ( matchGroup !== cal.AM[0] && matchGroup !== cal.AM[1] && matchGroup !== cal.AM[2] )
+                                                       )
+                                               ) return null;
+                                               break;
+                                       case "f":
+                                               // Deciseconds.
+                                       case "ff":
+                                               // Centiseconds.
+                                       case "fff":
+                                               // Milliseconds.
+                                               msec = matchInt * Math.pow( 10, 3 - clength );
+                                               if ( outOfRange(msec, 0, 999) ) return null;
+                                               break;
+                                       case "ddd":
+                                               // Day of week.
+                                       case "dddd":
+                                               // Day of week.
+                                               weekDay = getDayIndex( cal, matchGroup, clength === 3 );
+                                               if ( outOfRange(weekDay, 0, 6) ) return null;
+                                               break;
+                                       case "zzz":
+                                               // Time zone offset in +/- hours:min.
+                                               var offsets = matchGroup.split( /:/ );
+                                               if ( offsets.length !== 2 ) return null;
+                                               hourOffset = parseInt( offsets[0], 10 );
+                                               if ( outOfRange(hourOffset, -12, 13) ) return null;
+                                               var minOffset = parseInt( offsets[1], 10 );
+                                               if ( outOfRange(minOffset, 0, 59) ) return null;
+                                               tzMinOffset = ( hourOffset * 60 ) + ( startsWith(matchGroup, "-") ? -minOffset : minOffset );
+                                               break;
+                                       case "z": case "zz":
+                                               // Time zone offset in +/- hours.
+                                               hourOffset = matchInt;
+                                               if ( outOfRange(hourOffset, -12, 13) ) return null;
+                                               tzMinOffset = hourOffset * 60;
+                                               break;
+                                       case "g": case "gg":
+                                               var eraName = matchGroup;
+                                               if ( !eraName || !cal.eras ) return null;
+                                               eraName = trim( eraName.toLowerCase() );
+                                               for ( var i = 0, l = cal.eras.length; i < l; i++ ) {
+                                                       if ( eraName === cal.eras[i].name.toLowerCase() ) {
+                                                               era = i;
+                                                               break;
+                                                       }
+                                               }
+                                               // could not find an era with that name
+                                               if ( era === null ) return null;
+                                               break;
+                               }
+                       }
+               }
+               var result = new Date(), defaultYear, convert = cal.convert;
+               defaultYear = convert ? convert.fromGregorian( result )[ 0 ] : result.getFullYear();
+               if ( year === null ) {
+                       year = defaultYear;
+               }
+               else if ( cal.eras ) {
+                       // year must be shifted to normal gregorian year
+                       // but not if year was not specified, its already normal gregorian
+                       // per the main if clause above.
+                       year += cal.eras[( era || 0 )].offset;
+               }
+               // set default day and month to 1 and January, so if unspecified, these are the defaults
+               // instead of the current day/month.
+               if ( month === null ) {
+                       month = 0;
+               }
+               if ( date === null ) {
+                       date = 1;
+               }
+               // now have year, month, and date, but in the culture's calendar.
+               // convert to gregorian if necessary
+               if ( convert ) {
+                       result = convert.toGregorian( year, month, date );
+                       // conversion failed, must be an invalid match
+                       if ( result === null ) return null;
+               }
+               else {
+                       // have to set year, month and date together to avoid overflow based on current date.
+                       result.setFullYear( year, month, date );
+                       // check to see if date overflowed for specified month (only checked 1-31 above).
+                       if ( result.getDate() !== date ) return null;
+                       // invalid day of week.
+                       if ( weekDay !== null && result.getDay() !== weekDay ) {
+                               return null;
+                       }
+               }
+               // if pm designator token was found make sure the hours fit the 24-hour clock.
+               if ( pmHour && hour < 12 ) {
+                       hour += 12;
+               }
+               result.setHours( hour, min, sec, msec );
+               if ( tzMinOffset !== null ) {
+                       // adjust timezone to utc before applying local offset.
+                       var adjustedMin = result.getMinutes() - ( tzMinOffset + result.getTimezoneOffset() );
+                       // Safari limits hours and minutes to the range of -127 to 127.  We need to use setHours
+                       // to ensure both these fields will not exceed this range.      adjustedMin will range
+                       // somewhere between -1440 and 1500, so we only need to split this into hours.
+                       result.setHours( result.getHours() + parseInt(adjustedMin / 60, 10), adjustedMin % 60 );
+               }
+               return result;
+       };
+}());
+
+parseNegativePattern = function( value, nf, negativePattern ) {
+       var neg = nf[ "-" ],
+               pos = nf[ "+" ],
+               ret;
+       switch ( negativePattern ) {
+               case "n -":
+                       neg = " " + neg;
+                       pos = " " + pos;
+                       // fall through
+               case "n-":
+                       if ( endsWith(value, neg) ) {
+                               ret = [ "-", value.substr(0, value.length - neg.length) ];
+                       }
+                       else if ( endsWith(value, pos) ) {
+                               ret = [ "+", value.substr(0, value.length - pos.length) ];
+                       }
+                       break;
+               case "- n":
+                       neg += " ";
+                       pos += " ";
+                       // fall through
+               case "-n":
+                       if ( startsWith(value, neg) ) {
+                               ret = [ "-", value.substr(neg.length) ];
+                       }
+                       else if ( startsWith(value, pos) ) {
+                               ret = [ "+", value.substr(pos.length) ];
+                       }
+                       break;
+               case "(n)":
+                       if ( startsWith(value, "(") && endsWith(value, ")") ) {
+                               ret = [ "-", value.substr(1, value.length - 2) ];
+                       }
+                       break;
+       }
+       return ret || [ "", value ];
+};
+
+//
+// public instance functions
+//
+
+Globalize.prototype.findClosestCulture = function( cultureSelector ) {
+       return Globalize.findClosestCulture.call( this, cultureSelector );
+};
+
+Globalize.prototype.format = function( value, format, cultureSelector ) {
+       return Globalize.format.call( this, value, format, cultureSelector );
+};
+
+Globalize.prototype.localize = function( key, cultureSelector ) {
+       return Globalize.localize.call( this, key, cultureSelector );
+};
+
+Globalize.prototype.parseInt = function( value, radix, cultureSelector ) {
+       return Globalize.parseInt.call( this, value, radix, cultureSelector );
+};
+
+Globalize.prototype.parseFloat = function( value, radix, cultureSelector ) {
+       return Globalize.parseFloat.call( this, value, radix, cultureSelector );
+};
+
+Globalize.prototype.culture = function( cultureSelector ) {
+       return Globalize.culture.call( this, cultureSelector );
+};
+
+//
+// public singleton functions
+//
+
+Globalize.addCultureInfo = function( cultureName, baseCultureName, info ) {
+
+       var base = {},
+               isNew = false;
+
+       if ( typeof cultureName !== "string" ) {
+               // cultureName argument is optional string. If not specified, assume info is first
+               // and only argument. Specified info deep-extends current culture.
+               info = cultureName;
+               cultureName = this.culture().name;
+               base = this.cultures[ cultureName ];
+       } else if ( typeof baseCultureName !== "string" ) {
+               // baseCultureName argument is optional string. If not specified, assume info is second
+               // argument. Specified info deep-extends specified culture.
+               // If specified culture does not exist, create by deep-extending default
+               info = baseCultureName;
+               isNew = ( this.cultures[ cultureName ] == null );
+               base = this.cultures[ cultureName ] || this.cultures[ "default" ];
+       } else {
+               // cultureName and baseCultureName specified. Assume a new culture is being created
+               // by deep-extending an specified base culture
+               isNew = true;
+               base = this.cultures[ baseCultureName ];
+       }
+
+       this.cultures[ cultureName ] = extend(true, {},
+               base,
+               info
+       );
+       // Make the standard calendar the current culture if it's a new culture
+       if ( isNew ) {
+               this.cultures[ cultureName ].calendar = this.cultures[ cultureName ].calendars.standard;
+       }
+};
+
+Globalize.findClosestCulture = function( name ) {
+       var match;
+       if ( !name ) {
+               return this.findClosestCulture( this.cultureSelector ) || this.cultures[ "default" ];
+       }
+       if ( typeof name === "string" ) {
+               name = name.split( "," );
+       }
+       if ( isArray(name) ) {
+               var lang,
+                       cultures = this.cultures,
+                       list = name,
+                       i, l = list.length,
+                       prioritized = [];
+               for ( i = 0; i < l; i++ ) {
+                       name = trim( list[i] );
+                       var pri, parts = name.split( ";" );
+                       lang = trim( parts[0] );
+                       if ( parts.length === 1 ) {
+                               pri = 1;
+                       }
+                       else {
+                               name = trim( parts[1] );
+                               if ( name.indexOf("q=") === 0 ) {
+                                       name = name.substr( 2 );
+                                       pri = parseFloat( name );
+                                       pri = isNaN( pri ) ? 0 : pri;
+                               }
+                               else {
+                                       pri = 1;
+                               }
+                       }
+                       prioritized.push({ lang: lang, pri: pri });
+               }
+               prioritized.sort(function( a, b ) {
+                       return a.pri < b.pri ? 1 : -1;
+               });
+
+               // exact match
+               for ( i = 0; i < l; i++ ) {
+                       lang = prioritized[ i ].lang;
+                       match = cultures[ lang ];
+                       if ( match ) {
+                               return match;
+                       }
+               }
+
+               // neutral language match
+               for ( i = 0; i < l; i++ ) {
+                       lang = prioritized[ i ].lang;
+                       do {
+                               var index = lang.lastIndexOf( "-" );
+                               if ( index === -1 ) {
+                                       break;
+                               }
+                               // strip off the last part. e.g. en-US => en
+                               lang = lang.substr( 0, index );
+                               match = cultures[ lang ];
+                               if ( match ) {
+                                       return match;
+                               }
+                       }
+                       while ( 1 );
+               }
+
+               // last resort: match first culture using that language
+               for ( i = 0; i < l; i++ ) {
+                       lang = prioritized[ i ].lang;
+                       for ( var cultureKey in cultures ) {
+                               var culture = cultures[ cultureKey ];
+                               if ( culture.language == lang ) {
+                                       return culture;
+                               }
+                       }
+               }
+       }
+       else if ( typeof name === "object" ) {
+               return name;
+       }
+       return match || null;
+};
+
+Globalize.format = function( value, format, cultureSelector ) {
+       culture = this.findClosestCulture( cultureSelector );
+       if ( value instanceof Date ) {
+               value = formatDate( value, format, culture );
+       }
+       else if ( typeof value === "number" ) {
+               value = formatNumber( value, format, culture );
+       }
+       return value;
+};
+
+Globalize.localize = function( key, cultureSelector ) {
+       return this.findClosestCulture( cultureSelector ).messages[ key ] ||
+               this.cultures[ "default" ].messages[ key ];
+};
+
+Globalize.parseDate = function( value, formats, culture ) {
+       culture = this.findClosestCulture( culture );
+
+       var date, prop, patterns;
+       if ( formats ) {
+               if ( typeof formats === "string" ) {
+                       formats = [ formats ];
+               }
+               if ( formats.length ) {
+                       for ( var i = 0, l = formats.length; i < l; i++ ) {
+                               var format = formats[ i ];
+                               if ( format ) {
+                                       date = parseExact( value, format, culture );
+                                       if ( date ) {
+                                               break;
+                                       }
+                               }
+                       }
+               }
+       } else {
+               patterns = culture.calendar.patterns;
+               for ( prop in patterns ) {
+                       date = parseExact( value, patterns[prop], culture );
+                       if ( date ) {
+                               break;
+                       }
+               }
+       }
+
+       return date || null;
+};
+
+Globalize.parseInt = function( value, radix, cultureSelector ) {
+       return truncate( Globalize.parseFloat(value, radix, cultureSelector) );
+};
+
+Globalize.parseFloat = function( value, radix, cultureSelector ) {
+       // radix argument is optional
+       if ( typeof radix !== "number" ) {
+               cultureSelector = radix;
+               radix = 10;
+       }
+
+       var culture = this.findClosestCulture( cultureSelector );
+       var ret = NaN,
+               nf = culture.numberFormat;
+
+       if ( value.indexOf(culture.numberFormat.currency.symbol) > -1 ) {
+               // remove currency symbol
+               value = value.replace( culture.numberFormat.currency.symbol, "" );
+               // replace decimal seperator
+               value = value.replace( culture.numberFormat.currency["."], culture.numberFormat["."] );
+       }
+
+       // trim leading and trailing whitespace
+       value = trim( value );
+
+       // allow infinity or hexidecimal
+       if ( regexInfinity.test(value) ) {
+               ret = parseFloat( value );
+       }
+       else if ( !radix && regexHex.test(value) ) {
+               ret = parseInt( value, 16 );
+       }
+       else {
+
+               // determine sign and number
+               var signInfo = parseNegativePattern( value, nf, nf.pattern[0] ),
+                       sign = signInfo[ 0 ],
+                       num = signInfo[ 1 ];
+
+               // #44 - try parsing as "(n)"
+               if ( sign === "" && nf.pattern[0] !== "(n)" ) {
+                       signInfo = parseNegativePattern( value, nf, "(n)" );
+                       sign = signInfo[ 0 ];
+                       num = signInfo[ 1 ];
+               }
+
+               // try parsing as "-n"
+               if ( sign === "" && nf.pattern[0] !== "-n" ) {
+                       signInfo = parseNegativePattern( value, nf, "-n" );
+                       sign = signInfo[ 0 ];
+                       num = signInfo[ 1 ];
+               }
+
+               sign = sign || "+";
+
+               // determine exponent and number
+               var exponent,
+                       intAndFraction,
+                       exponentPos = num.indexOf( "e" );
+               if ( exponentPos < 0 ) exponentPos = num.indexOf( "E" );
+               if ( exponentPos < 0 ) {
+                       intAndFraction = num;
+                       exponent = null;
+               }
+               else {
+                       intAndFraction = num.substr( 0, exponentPos );
+                       exponent = num.substr( exponentPos + 1 );
+               }
+               // determine decimal position
+               var integer,
+                       fraction,
+                       decSep = nf[ "." ],
+                       decimalPos = intAndFraction.indexOf( decSep );
+               if ( decimalPos < 0 ) {
+                       integer = intAndFraction;
+                       fraction = null;
+               }
+               else {
+                       integer = intAndFraction.substr( 0, decimalPos );
+                       fraction = intAndFraction.substr( decimalPos + decSep.length );
+               }
+               // handle groups (e.g. 1,000,000)
+               var groupSep = nf[ "," ];
+               integer = integer.split( groupSep ).join( "" );
+               var altGroupSep = groupSep.replace( /\u00A0/g, " " );
+               if ( groupSep !== altGroupSep ) {
+                       integer = integer.split( altGroupSep ).join( "" );
+               }
+               // build a natively parsable number string
+               var p = sign + integer;
+               if ( fraction !== null ) {
+                       p += "." + fraction;
+               }
+               if ( exponent !== null ) {
+                       // exponent itself may have a number patternd
+                       var expSignInfo = parseNegativePattern( exponent, nf, "-n" );
+                       p += "e" + ( expSignInfo[0] || "+" ) + expSignInfo[ 1 ];
+               }
+               if ( regexParseFloat.test(p) ) {
+                       ret = parseFloat( p );
+               }
+       }
+       return ret;
+};
+
+Globalize.culture = function( cultureSelector ) {
+       // setter
+       if ( typeof cultureSelector !== "undefined" ) {
+               this.cultureSelector = cultureSelector;
+       }
+       // getter
+       return this.findClosestCulture( cultureSelector ) || this.culture[ "default" ];
+};
+
+}( this ));
+/**
+ * @class core
+ * loader.js
+ *
+ * Youmin Ha <youmin.ha@samsung.com>
+ *
+ *
+ */
+/*
+       Web UI scaling concept in Tizen Web UI
+
+Generally, web applications must be designed to be showed acceptable on various size and resolution of screens, and web winsets have to be scaled well.  Tizen Web UI Framework supports various viewport settings, and Tizen Web UI widgets are designed to be scalable on various screen sizes.  In order to make web applications scalable on many devices which have different screen size, it is necessary to understand how mobile web browsers deal with screen resolution, and how Tizen Web UI Framework supports scaling for web applications.
+
+
+* Viewport on mobile web browser
+
+Viewport is an area showing web content on the browser.  Unlike desktop browsers, mobile browsers support logical viewport seting, which means that application can set viewport width/height and zoom level by itself.
+The very important thing that to be remembered is that the viewport resolution in pixel is 'Logical', not physical.  For example, if the viewport width is set to 480 on a mobile device having 720px screen width, the viewport width is considered to 480px logically. All elements put on right side from 480px horizontal position will not be shown on the viewport.
+Most mobile browsers set viewport with given content attribute with <meta name="viewport" content="..."> tag in <head> section in the application source html, whereas desktop browsers ignore the tag.
+Detailed usage of viewport meta tag is found in here: http://www.w3.org/TR/mwabp/#bp-viewport
+
+
+* Viewport setting by application developers
+
+When developers write <meta name="viewport" content="..."> in the <head> section of the web application HTML file, Tizen Web UI Framework does not add another viewport meta tag, nor modify developer-defined viewport.
+
+
+* Automatic viewport setting by Tizen Web UI Framework
+
+If developers do not give a viewport meta tag, Tizen Web UI Framework automatically add a viewport meta tag with default viewport setting.
+
+
+* Portrait/landscape mode
+
+
+* Tizen Web UI widgets scaling
+
+
+ */
+( function ($, Globalize, window, undefined) {
+
+       var tizen = {
+               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: false,
+
+                       defaultFontSize: 22,
+                       minified: false,
+
+                       debug: false
+               },
+
+               log : {
+                       debug : function ( msg ) {
+                               if ( tizen.frameworkData.debug ) {
+                                       console.log( msg );
+                               }
+                       },
+                       warn : function ( msg ) {
+                               console.warn( msg );
+                       },
+                       error : function ( msg ) {
+                               console.error( msg );
+                       },
+                       alert : function ( msg ) {
+                               window.alert( msg );
+                       }
+               },
+
+               util : {
+
+                       loadScriptSync : function ( scriptPath, successCB, errorCB ) {
+                               $.ajax( {
+                                       url: scriptPath,
+                                       dataType: 'script',
+                                       async: false,
+                                       crossDomain: false,
+                                       success: successCB,
+                                       error: function ( jqXHR, textStatus, errorThrown ) {
+                                               if ( errorCB ) {
+                                                       errorCB( jqXHR, textStatus, errorThrown );
+                                               } else {
+                                                       var ignoreStatusList = [ 404 ],  // 404: not found
+                                                               errmsg = ( 'Error while loading ' + scriptPath + '\n' + jqXHR.status + ':' + jqXHR.statusText );
+                                                       if ( -1 == $.inArray( jqXHR.status, ignoreStatusList ) ) {
+                                                               tizen.log.alert( errmsg );
+                                                       } else {
+                                                               tizen.log.warn( errmsg );
+                                                       }
+                                               }
+                                       }
+                               } );
+                       },
+                       isMobileBrowser: function ( ) {
+                               var mobileIdx = window.navigator.appVersion.indexOf("Mobile"),
+                                       isMobile = -1 < mobileIdx;
+                               return isMobile;
+                       }
+               },
+
+               css : {
+                       cacheBust: ( document.location.href.match( /debug=true/ ) ) ?
+                                       '?cacheBust=' + ( new Date( ) ).getTime( ) :
+                                       '',
+                       addElementToHead : function ( elem ) {
+                               var head = document.getElementsByTagName( 'head' )[0];
+                               if ( head ) {
+                                       $( head ).prepend( elem );
+                               }
+                       },
+                       makeLink : function ( href ) {
+                               var cssLink = document.createElement( 'link' );
+                               cssLink.setAttribute( 'rel', 'stylesheet' );
+                               cssLink.setAttribute( 'href', href );
+                               cssLink.setAttribute( 'name', 'tizen-theme' );
+                               return cssLink;
+                       },
+                       load: function ( path ) {
+                               var head = document.getElementsByTagName( 'head' )[0],
+                                       cssLinks = head.getElementsByTagName( 'link' ),
+                                       idx,
+                                       l = null;
+                               // Find css link element
+                               for ( idx = 0; idx < cssLinks.length; idx++ ) {
+                                       if ( cssLinks[idx].getAttribute( 'rel' ) != "stylesheet" ) {
+                                               continue;
+                                       }
+                                       if ( cssLinks[idx].getAttribute( 'name' ) == "tizen-theme"
+                                                       || cssLinks[idx].getAttribute( 'href' ) == path ) {
+                                               l = cssLinks[idx];
+                                               break;
+                                       }
+                               }
+                               if ( l ) {      // Found the link element!
+                                       if ( l.getAttribute( 'href' ) == path ) {
+                                               tizen.log.warn( "Theme is already loaded. Skip theme loading in the framework." );
+                                       } else {
+                                               l.setAttribute( 'href', path );
+                                       }
+                               } else {
+                                       this.addElementToHead( this.makeLink( path ) );
+                               }
+                       }
+               },
+
+               getParams: function ( ) {
+                       /* Get data-* params from <script> tag, and set tizen.frameworkData.* values
+                        * Returns true if proper <script> tag is found, or false if not.
+                        */
+                       // Find current <script> tag element
+                       var scriptElems = document.getElementsByTagName( 'script' ),
+                               val = null,
+                               foundScriptTag = false,
+                               idx,
+                               elem,
+                               src,
+                               tokens,
+                               version_idx;
+
+                       function getTizenTheme( ) {
+                               var t = navigator.theme ? navigator.theme.split( ':' )[0] : null;
+                               if ( t ) {
+                                       t = t.replace('-hd', '');
+                                       if ( ! t.match( /^tizen-/ ) ) {
+                                               t = 'tizen-' + t;
+                                       }
+                               }
+                               return t;
+                       }
+
+                       for ( idx in scriptElems ) {
+                               elem = scriptElems[idx];
+                               src = elem.src ? elem.getAttribute( 'src' ) : undefined;
+                               if (src && src.match( this.libFileName )) {
+                                       // Set framework data, only when they are given.
+                                       tokens = src.split(/[\/\\]/);
+                                       version_idx = -3;
+                                       this.frameworkData.rootDir = ( elem.getAttribute( 'data-framework-root' )
+                                               || tokens.slice( 0, tokens.length + version_idx ).join( '/' )
+                                               || this.frameworkData.rootDir ).replace( /^file:(\/\/)?/, '' );
+                                       this.frameworkData.version = elem.getAttribute( 'data-framework-version' )
+                                               || tokens[ tokens.length + version_idx ]
+                                               || this.frameworkData.version;
+                                       this.frameworkData.theme = elem.getAttribute( 'data-framework-theme' )
+                                               || getTizenTheme( )
+                                               || this.frameworkData.theme;
+                                       this.frameworkData.viewportWidth = elem.getAttribute( 'data-framework-viewport-width' )
+                                               || this.frameworkData.viewportWidth;
+                                       this.frameworkData.viewportScale =
+                                               "true" === elem.getAttribute( 'data-framework-viewport-scale' ) ? true
+                                               : this.frameworkData.viewportScale;
+                                       this.frameworkData.minified = src.search(/\.min\.js$/) > -1 ? true : false;
+                                       this.frameworkData.debug = "true" === elem.getAttribute( 'data-framework-debug' ) ? true
+                                               : this.frameworkData.debug;
+                                       foundScriptTag = true;
+                                       break;
+                               }
+                       }
+                       return foundScriptTag;
+               },
+
+               loadTheme: function ( theme ) {
+                       var themePath,
+                               cssPath,
+                               jsPath;
+
+                       if ( ! theme ) {
+                               theme = tizen.frameworkData.theme;
+                       }
+                       themePath = [
+                               tizen.frameworkData.rootDir,
+                               tizen.frameworkData.version,
+                               'themes',
+                               theme
+                       ].join( '/' );
+
+                       jsPath = [ themePath, 'theme.js' ].join( '/' );
+
+                       if ( tizen.frameworkData.minified ) {
+                               cssPath = [themePath, 'tizen-web-ui-fw-theme.min.css'].join( '/' );
+                       } else {
+                               cssPath = [themePath, 'tizen-web-ui-fw-theme.css'].join( '/' );
+                       }
+                       tizen.css.load( cssPath );
+                       tizen.util.loadScriptSync( jsPath );
+               },
+
+               /** Load Globalize culture file, and set default culture.
+                *  @param[in]  language  (optional) Language code. ex) en-US, en, ko-KR, ko
+                *                        If language is not given, read language from html 'lang' attribute, 
+                *                        or from system setting.
+                *  @param[in]  cultureDic (optional) Dictionary having language code->
+                */
+               loadGlobalizeCulture: function ( language, cultureDic ) {
+                       var self = this,
+                               cFPath,
+                               lang,
+                               mockJSXHR;
+
+                       function getLang ( language ) {
+                               var lang = language
+                                               || $( 'html' ).attr( 'lang' )
+                                               || window.navigator.language.split( '.' )[0]    // Webkit, Safari + workaround for Tizen
+                                               || window.navigator.userLanguage        // IE
+                                               || 'en',
+                                       countryCode = null,
+                                       countryCodeIdx = lang.lastIndexOf('-'),
+                                       ignoreCodes = ['Cyrl', 'Latn', 'Mong']; // Not country code!
+                               if ( countryCodeIdx != -1 ) {   // Found country code!
+                                       countryCode = lang.substr( countryCodeIdx + 1 );
+                                       if ( ignoreCodes.join( '-' ).indexOf( countryCode ) < 0 ) {
+                                               // countryCode is not found from ignoreCodes.
+                                               // Make countryCode to uppercase.
+                                               lang = [ lang.substr( 0, countryCodeIdx ), countryCode.toUpperCase( ) ].join( '-' );
+                                       }
+                               }
+                               // NOTE: 'en' to 'en-US', because globalize has no 'en' culture file.
+                               lang = lang == 'en' ? 'en-US' : lang;
+                               return lang;
+                       }
+
+                       function getNeutralLang ( lang ) {
+                               var neutralLangIdx = lang.lastIndexOf( '-' ),
+                                       neutralLang;
+                               if ( neutralLangIdx != -1 ) {
+                                       neutralLang = lang.substr( 0, neutralLangIdx );
+                               }
+                               return neutralLang;
+                       }
+
+                       function getCultureFilePath ( lang, cFDic ) {
+                               var cFPath = null;      // error value
+
+                               if ( "string" != typeof lang ) {
+                                       return null;
+                               }
+                               if ( cFDic && cFDic[lang] ) {
+                                       cFPath = cFDic[lang];
+                               } else {
+                                       // Default Globalize culture file path
+                                       cFPath = [
+                                               self.frameworkData.rootDir,
+                                               self.frameworkData.version,
+                                               'js',
+                                               'cultures',
+                                               ['globalize.culture.', lang, '.js'].join( '' ),
+                                       ].join( '/' );
+                               }
+                               return cFPath;
+                       }
+
+                       function printLoadError( cFPath, jqXHR ) {
+                               tizen.log.error( "Error " + jqXHR.status + ": " + jqXHR.statusText
+                                               + "::Culture file (" + cFPath + ") is failed to load.");
+                       }
+
+                       function loadCultureFile ( cFPath, errCB ) {
+                               function _successCB ( ) {
+                                       tizen.log.debug( "Culture file (" + cFPath + ") is loaded successfully." );
+                               }
+                               function _errCB ( jqXHR, textStatus, err ) {
+                                       if ( errCB ) {
+                                               errCB( jqXHR, textStatus, err );
+                                       } else {
+                                               printLoadError( cFPath, jqXHR );
+                                       }
+                               }
+
+                               if ( ! cFPath ) {       // Invalid cFPath -> Regard it as '404 Not Found' error.
+                                       mockJSXHR = {
+                                               status: 404,
+                                               statusText: "Not Found"
+                                       };
+                                       _errCB( mockJSXHR, null, null );
+                               } else {
+                                       $.ajax( {
+                                               url: cFPath,
+                                               dataType: 'script',
+                                               cache: true,
+                                               async: false,
+                                               success: _successCB,
+                                               error: _errCB
+                                       } );
+                               }
+                       }
+
+                       lang = getLang( language );
+                       cFPath = getCultureFilePath( lang, cultureDic );
+                       loadCultureFile( cFPath,
+                               function ( jqXHR, textStatus, err ) {
+                                       if ( jqXHR.status == 404 ) {
+                                               // If culture file is not found, try once more with neutral lang.
+                                               var nLang = getNeutralLang( lang ),
+                                                       ncFPath = getCultureFilePath( nLang, cultureDic );
+                                               loadCultureFile( ncFPath, null );
+                                       } else {
+                                               printLoadError( cFPath, jqXHR );
+                                       }
+                               } );
+
+                       return lang;
+               },
+               setGlobalize: function ( ) {
+                       var lang = this.loadGlobalizeCulture( );
+
+                       // Set culture
+                       // NOTE: It is not needed to set with neutral lang.
+                       //       Globalize automatically deals with it.
+                       Globalize.culture( lang );
+               },
+               /**
+                * Load custom globalize culture file
+                * Find current system language, and load appropriate culture file from given colture file list.
+                *
+                * @param[in]   cultureDic      collection of 'language':'culture file path' key-val pair.
+                * @example
+                * var myCultures = {
+                *      "en"    : "culture/en.js",
+                *      "fr"    : "culture/fr.js",
+                *      "ko-KR" : "culture/ko-KR.js"
+                * };
+                * loadCultomGlobalizeCulture( myCultures );
+                *
+                * ex) culture/fr.js
+                * -------------------------------
+                * Globalize.addCultureInfo( "fr", {
+                *   messages: {
+                *     "hello" : "bonjour",
+                *     "translate" : "traduire"
+                *   }
+                * } );
+                * -------------------------------
+                */
+               loadCustomGlobalizeCulture: function ( cultureDic ) {
+                       tizen.loadGlobalizeCulture( null, cultureDic );
+               },
+
+               /** Set viewport meta tag for mobile devices.
+                *
+                * @param[in]   viewportWidth   viewport width. "device-width" is OK.
+                */
+               setViewport: function ( viewportWidth ) {
+                       var meta = null,
+                               head,
+                               content;
+
+                       // Do nothing if viewport setting code is already in the code.
+                       $( "meta[name=viewport]" ).each( function ( ) {
+                               meta = this;
+                               return;
+                       });
+                       if ( meta ) {   // Found custom viewport!
+                               content = $( meta ).prop( "content" );
+                               viewportWidth = content.replace( /.*width=(device-width|\d+)\s*,?.*$/gi, "$1" );
+                               tizen.log.warn( "Viewport is set to '" + viewportWidth + "' in a meta tag. Framework skips viewport setting." );
+                       } else {
+                               // Create a meta tag
+                               meta = document.createElement( "meta" );
+                               if ( meta ) {
+                                       meta.name = "viewport";
+                                       content = [ "width=", viewportWidth, ", user-scalable=no" ].join( "" );
+                                       if ( ! isNaN( viewportWidth ) ) {
+                                               // Fix scale to 1.0, if viewport width is set to fixed value.
+                                               // NOTE: Works wrong in Tizen browser!
+                                               //content = [ content, ", initial-scale=1.0, maximum-scale=1.0" ].join( "" );
+                                       }
+                                       meta.content = content;
+                                       tizen.log.debug( content );
+                                       head = document.getElementsByTagName( 'head' ).item( 0 );
+                                       head.insertBefore( meta, head.firstChild );
+                               }
+                       }
+                       return viewportWidth;
+               },
+
+               /**     Read body's font-size, scale it, and reset it.
+                *  param[in]   desired font-size / base font-size.
+                */
+               scaleBaseFontSize: function ( themeDefaultFontSize, ratio ) {
+                       tizen.log.debug( "themedefaultfont size: " + themeDefaultFontSize + ", ratio: " + ratio );
+                       var scaledFontSize = Math.round( themeDefaultFontSize * ratio );
+
+                       $( 'html.ui-mobile' ).css( { 'font-size': scaledFontSize + "px" } );
+                       tizen.log.debug( 'html:font size is set to ' + scaledFontSize );
+                       $( document ).ready( function ( ) {
+                               $( '.ui-mobile' ).children( 'body' ).css( { 'font-size': scaledFontSize + "px" } );
+                       } );
+               },
+
+               setScaling: function ( ) {
+                       var viewportWidth = this.frameworkData.viewportWidth,
+                               themeDefaultFontSize = this.frameworkData.defaultFontSize, // comes from theme.js
+                               ratio = 1;
+
+                       // Keep original font size
+                       $( 'body' ).attr( 'data-tizen-theme-default-font-size', themeDefaultFontSize );
+
+                       // Legacy support: tizen.frameworkData.viewportScale
+                       if ( this.frameworkData.viewportScale == true ) {
+                               viewportWidth = "screen-width";
+                       }
+
+                       if ( "screen-width" == viewportWidth ) {
+                               viewportWidth = document.documentElement.clientWidth;
+                       }
+
+                       viewportWidth = this.setViewport( viewportWidth );      // If custom viewport setting exists, get viewport width
+                       if ( ! isNaN( viewportWidth ) ) {       // fixed width!
+                               ratio = parseFloat( viewportWidth / this.frameworkData.defaultViewportWidth );
+                       }
+                       this.scaleBaseFontSize( themeDefaultFontSize, ratio );
+               }
+       };
+
+       function export2TizenNS ( $, tizen ) {
+               if ( undefined == typeof $.tizen ) {
+                       $.tizen = { };
+               }
+
+               $.tizen.frameworkData = tizen.frameworkData;
+               $.tizen.loadCustomGlobalizeCulture = tizen.loadCustomGlobalizeCulture;
+               $.tizen.loadTheme = tizen.loadTheme;
+
+               $.tizen.__tizen__ = tizen;      // for unit-test
+       }
+
+       export2TizenNS( $, tizen );
+
+       tizen.getParams( );
+       tizen.loadTheme( );
+       tizen.setScaling( );    // Run after loadTheme(), for the default font size.
+       tizen.setGlobalize( );
+
+       // Turn off JQM's auto initialization option.
+       // NOTE: This job must be done before domready.
+       $.mobile.autoInitializePage = false;
+
+       $(document).ready( function ( ) {
+               $.mobile.initializePage( );
+       });
+
+} ( jQuery, window.Globalize, window ) );
+(function($){$.tizen.frameworkData.pkgVersion="0.2.15";}(jQuery));
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.min.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.min.js
new file mode 100644 (file)
index 0000000..fd97899
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+This software is licensed under the MIT license (as defined
+by the OSI at http://www.opensource.org/licenses/mit-license.php)
+
+****************************************************************************
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd.
+Copyright (C) 2011 by Intel Corporation Ltd.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+****************************************************************************
+
+This software incorporates software from other sources, including:
+
+widgets/jquery.mobile.groupindex/
+       initial version taken from
+       git clone https://github.com/jquery/jquery-mobile.git
+       commit a197e17500ed9f4994f532ab384b0b45b414a1ea
+       including theme files (removed php files which required some changes), demo html, js, and also the
+       jquery.mobile.scrollview.{js/css} in the common directories (already copied as part of datetimepicker).
+
+jQuery UI (http://jqueryui.com/) [MIT license]
+
+jQuery Mobile (http://jquerymobile.com/) [MIT license]
+
+jQuery (http://jquery.com/) [MIT license]
+
+(parts of) Underscore (http://documentcloud.github.com/underscore/) [MIT license]
+
+Globalize (http://github.com/jquery/globalize/) [MIT license]
+*/
+function ensureNS(ns){var nsAr=ns.split("."),nsSoFar="";for(var Nix in nsAr)nsSoFar=nsSoFar+(Nix>0?".":"")+nsAr[Nix],eval(nsSoFar+" = "+nsSoFar+" || {};")}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}(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,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){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),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){a.mobile.defaultPageTransition="none",a.mobile.transitionHandlers.depth=a.mobile.transitionHandlers.simultaneous,a.mobile.transitionFallbacks.depth="fade",a.fn.buttonMarkup.defaults.corners=!1,a.mobile.buttonMarkup.hoverDelay=0}(jQuery,this),ensureNS("jQuery.mobile.tizen"),function(){jQuery.extend(jQuery.mobile.tizen,{disableSelection:function(a){var b=this;return $(a).find("*").each(function(){$(this).get(0).tagName!=="INPUT"&&$(this).attr("type")!=="text"&&$(this).get(0).tagName!=="TEXTAREA"&&b.enableSelection(this,"none")}),!0},enableSelection:function(a,b){return $(a).each(function(){switch(b){case"text":case"auto":case"none":val=b;break;default:val="auto"}$(this).css({"user-select":val,"-moz-user-select":val,"-webkit-user-select":val,"-o-user-select":val,"-ms-transform":val})})},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){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 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:!0,overflowEnable:!0,scrollJump:!1},_getViewHeight:function(){return this._$view.height()},_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._$view.width();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=function(a){setTimeout(function(){e._effect_dir=a,e._setEndEffect("in")},100),setTimeout(function(){e._setEndEffect("out")},350)},g=this._vTracker,h=this._hTracker;if(this._outerScrolling)return;g&&(g.update(this.options.overshootEnable),c=g.getPosition(),a=!g.done(),g.getRemained()>this.options.overshootDuration&&(d=this._getViewHeight()-this._$clip.height(),g.isAvail()?g.isMin()?(this._outerScroll(c-g.getRemained()/3,d),d>0&&f(1)):g.isMax()&&(this._outerScroll(g.getRemained()/3,d),d>0&&f(0)):this._speedY>0?this._outerScroll(g.getRemained()/3,d):this._outerScroll(c-g.getRemained()/3,d))),h&&(h.update(this.options.overshootEnable),b=h.getPosition(),a=a||!h.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._didDrag&&f>0&&(this._effect_dir=0,this._setEndEffect("in"))):b<-f?(this._sy=-f,this._didDrag&&f>0&&(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(),!c||this.options.scrollMethod==="translate"?this._setScrollPosition(a,b,c):this._scrollTo(a,b,c)},getScrollPosition:function(){return{x:-this._sx,y:-this._sy}},_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}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(a,b,c){if(this._skip_dragging)return;if(!this._dragging)return;!this._is_inputbox&&!this._is_button&&a.preventDefault();var d=this.options.moveThreshold,e=b-this._lastX,f=c-this._lastY,g=this.options.direction,i=null,j,k,l,m,n,o,p;this._lastMove=h();if(!this._directionLock){j=Math.abs(e),k=Math.abs(f);if(j<d&&k<d)return!1;j<k&&j/k<.5?i="y":j>k&&k/j<.5&&(i="x");if(g&&i&&g!==i){l=this._getAncestorByDirection(i);if(l)return this._propagateDragMove(l,a,b,c,i),!1}this._directionLock=g||i||"none"}n=this._sx,o=this._sy,p=this._directionLock;if(p!=="y"&&this._hTracker){j=this._sx,this._speedX=e,n=j+e,this._doSnapBackX=!1,m=n>0||n<this._maxX;if(m&&p==="x"){l=this._getAncestorByDirection("x");if(l)return this._setScrollPosition(n>0?0:this._maxX,o),this._propagateDragMove(l,a,b,c,i),!1;n=j+e/2,this._doSnapBackX=!0}}if(p!=="x"&&this._vTracker){if(Math.abs(this._startY-c)<d&&p!=="xy")return;k=this._sy,this._speedY=f,o=k+f,this._doSnapBackY=!1,m=o>0||o<this._maxY;if(m&&p==="y"){l=this._getAncestorByDirection("y");if(l)return this._setScrollPosition(n,o>0?0:this._maxY),this._propagateDragMove(l,a,b,c,i),!1;o=k+f/2,this._doSnapBackY=!0}}this.options.overshootEnable===!1&&(this._doSnapBackX=!1,this._doSnapBackY=!1),this._lastX=b,this._lastY=c,this._setScrollPosition(n,o),this._didDrag===!1&&(this._didDrag=!0,this._showScrollBars(),this._showOverflowIndicator())},_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_count=0,c._gesture_timer=d};return b?(dir=b>0?1:-1,this._gesture_timer?this._gesture_dir!==dir?(e(),!1):(this._gesture_count++,this._gesture_count===3?(dir>0?this.scrollTo(0,0,this.options.overshootDuration):this.scrollTo(0,-(this._getViewHeight()-this._$clip.height()),this.options.overshootDuration),e(),!0):!1):(this._gesture_count=1,this._gesture_dir=dir,this._gesture_timer=setTimeout(function(){e()},1e3),!1)):!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(a){var b,f,g;if(a.keyCode==9)return!1;b=e.find(".ui-focus");if(b===d)return;f=b.offset().top,g=e.offset().top+e.height()-b.height(),c._softkeyboard&&(g-=c._softkeyboardHeight),(f<0||f>g)&&c.scrollTo(0,c._sy-f+b.height()+e.offset().top,0);return}),f.bind("keyup",function(b){var d,f,g,h;if(b.keyCode!=9)return;d=a(this).find(":input");for(i=0;i<d.length;i++){if(!a(d[i]).hasClass("ui-focus"))continue;i+1==d.length?f=a(d[0]):f=a(d[i+1]),g=f.offset().top,h=e.offset().top+e.height()-f.height(),c._softkeyboard&&(h-=c._softkeyboardHeight),(g<0||g>h)&&c.scrollTo(0,c._sy-g+f.height()+e.offset().top,0),f.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(b){if(a(".ui-page-active").get(0)!==e.closest(".ui-page").get(0))return;c._softkeyboard=b.state==="on"?!0:!1,c._softkeyboardHeight=b.height}),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)+"%"))),this._vTracker&&(e=a.height(),f=this._getViewHeight(),this._maxY=e-f,this._maxY>0&&(this._maxY=0),this._$vScrollBar&&f&&(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),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')"},_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){i._switchAmPm(i)}),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 b=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){b._showDataSelector(b,this,a.target)})},_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(),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._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,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"))),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")),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)"},_create:function(){var b=this.element,c=this,d,e=b.closest(':jqmData(role="page")'),f;this.scrollview=b.closest(".ui-scrollview-clip"),this.shortcutsContainer=a('<div class="ui-fastscroll"/>'),this.shortcutsList=a("<ul></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(),f=function(b){var e=a(b).position().top,f=c.lastListItem.outerHeight(!0)+c.lastListItem.position().top,g=c.scrollview.height(),h=f-g,i;e=e>h?h:e,e=Math.max(e,0),c.scrollview.scrollview("scrollTo",0,-e),i=c.scrollview.offset(),d.text(a(b).text()).css({marginLeft:-(d.width()/2),marginTop:-(d.height()/2)}).show()},this.shortcutsList.bind("touchstart mousedown vmousedown touchmove vmousemove vmouseover ",function(b){var d=a.mobile.tizen.targetRelativeCoordsFromEvent(b),e=c.shortcutsList.offset();b.target.tagName.toLowerCase()==="li"&&(d.x+=a(b.target).offset().left-e.left,d.y+=a(b.target).offset().top-e.top),c.shortcutsList.find("li").each(function(){var b=a(this);a(b).removeClass("ui-fastscroll-hover").removeClass("ui-fastscroll-hover-up").removeClass("ui-fastscroll-hover-down")}),c.shortcutsList.find("li").each(function(){var b=a(this),c=b.offset().left-e.left,g=b.offset().top-e.top,h=c+Math.abs(b.outerWidth(!0)),i=g+Math.abs(b.outerHeight(!0));return d.x>=c&&d.x<=h&&d.y>=g&&d.y<=i?(f(a(b.data("divider"))),a(b).addClass("ui-fastscroll-hover"),b.index()>0&&a(b).siblings().eq(b.index()-1).addClass("ui-fastscroll-hover-up"),a(b).siblings().eq(b.index()).addClass("ui-fastscroll-hover-down"),!1):!0}),b.preventDefault(),b.stopPropagation()}).bind("touchend mouseup vmouseup vmouseout",function(){d.hide()}),e&&!e.is(":visible")?e.bind("pageshow",function(){c.refresh()}):this.refresh(),b.bind("updatelayout",function(){c.refresh()})},refresh:function(){var b=this,c,d,e,f;this.shortcutsList.find("li").remove(),e=this.element.find(".ui-li-divider"),f=this.element.find("li").not(".ui-li-divider"),e=e.filter(":visible"),f=f.filter(":visible");if(e.length<2){this.shortcutsList.hide();return}this.shortcutsList.show(),this.lastListItem=f.last(),e.each(function(c,d){b.shortcutsList.append(a("<li>"+a(d).text()+"</li>").data("divider",d))}),c=e.first().position().top,this.shortcutsContainer.css("top",c),d=c+this.shortcutsContainer.outerHeight()+"px",this.scrollview.css("min-height",d)}}),a(document).bind("pagecreate create",function(b){a(a.tizen.fastscroll.prototype.options.initSelector,b.target).not(":jqmData(role='none'), :jqmData(role='nojs')").fastscroll()})}(jQuery),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,_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.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.cur_img.css("left",c+"px"),this.next_img.length&&this.next_img.css("left",c+this.window_width+"px"),this.prev_img.length&&this.prev_img.css("left",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.next_img.css("left",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.prev_img.css("left",-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-50),this.cur_img.animate({left:0},e),this.next_img.length&&this.next_img.animate({left:this.window_width},e),this.prev_img.length&&this.prev_img.animate({left:-this.window_width},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")},_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.prev_img.length&&this.prev_img.css("left",-this.window_width+"px"),this.cur_img.css("left","0px"),this.next_img.length&&this.next_img.css("left",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(b).bind("resize",function(){d.refresh()})},_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()},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.prev_img.css("left",-this.window_width),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.next_img.css("left",this.window_width),this._attach(b+2,this.next_img))),this.cur_img.animate({left:0},this.options.duration)):b==this.index-1?(d=this.prev_img,this.prev_img=this.prev_img.prev(),this.prev_img.length&&(this.prev_img.css("left",-this.window_width),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.next_img.css("left",this.window_width),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)}}),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,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-thumb"></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-thumb").length!==0||typeof j!="string")return;q=a([f,j,g].join("")).appendTo(e.addClass(" ui-handler-"+l)),r=e.find(".ui-handler-thumb").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){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){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=b.options,f=a.mobile.getInheritedTheme(c,"s"),g=e.theme||f,h="multimediaview",i=null;a.extend(this,{role:null,isControlHide:!1,controlTimer:null,isVolumeHide:!0,isVertical:!0,backupView:null}),b.role=h,c.addClass("ui-multimediaview"),i=b._createControl(),i.find(".ui-button").each(function(b){a(this).buttonMarkup({corners:!0,theme:g,shadow:!0})}),c[0].nodeName==="VIDEO"&&i.addClass("ui-"+h+"-video"),i.hide(),c.wrap(["<div class='ui-",h,"-wrap ui-",h,"-",g,"'>"].join("")).after(i),e.controls&&c.attr("controls")&&c.removeAttr("controls"),b._addEvent()},_resize:function(){var a=this.element,b=a.parent(),c=b.find(".ui-multimediaview-control"),d=0,e=0,f=null;this._resizeFullscreen(this.options.fullScreen),d=a[0].nodeName==="VIDEO"?a.width():b.width(),e=a[0].nodeName==="VIDEO"?a.height():c.height(),f=a.offset(),this._resizeControl(f,d,e),this._updateSeekBar(),this._updateVolumeState()},_resizeControl:function(a,b,c){var d=this,e=d.element,f=e[0],g=e.parent().find(".ui-multimediaview-control"),h=g.find(".ui-button"),i=g.find(".ui-playpausebutton"),j=g.find(".ui-seekbar"),k=g.find(".ui-durationlabel"),l=g.find(".ui-timestamplabel"),m=g.find(".ui-volumecontrol"),n=m.find(".ui-volumebar"),o=b,p=g.outerHeight(!0),q=0,r=null;g&&(e[0].nodeName==="VIDEO"&&(r=g.offset(),r.left=a.left,r.top=a.top+c-p,g.offset(r)),g.width(o)),j&&(q=g.width()-h.outerWidth(!0)*h.length,q-=(parseInt(h.eq(0).css("margin-left"),10)+parseInt(h.eq(0).css("margin-right"),10))*h.length,d.isVolumeHide||(q-=m.outerWidth(!0)),j.width(q)),k&&!isNaN(f.duration)&&k.find("p").text(d._convertTimeFormat(f.duration)),f.autoplay&&f.paused===!1&&i.removeClass("ui-play-icon").addClass("ui-pause-icon"),j.width()<n.width()+l.width()+k.width()?k.hide():k.show()},_resizeFullscreen:function(b){var c=this,d=c.element,e=d.parent(),f=d.parent().find(".ui-multimediaview-control"),g=f.find(".ui-playpausebutton"),h=f.find(".ui-timestamplabel"),i=f.find(".ui-seekbar"),j=i.find(".ui-duration"),k=i.find(".ui-currenttime"),l=0,m=0;if(b)c.backupView||(c.backupView={width:d[0].style.getPropertyValue("width")||"",height:d[0].style.getPropertyValue("height")||"",position:d.css("position"),zindex:d.css("z-index")}),l=a("body")[0].clientWidth,m=a("body")[0].clientHeight,d.width(l).height(m-1),d.closest(".ui-multimediaview-wrap").height(m-1),d.addClass("ui-"+c.role+"-fullscreen"),d.offset({top:0,left:0});else{if(!c.backupView)return;d.removeClass("ui-"+c.role+"-fullscreen"),d.css({width:c.backupView.width,height:c.backupView.height,position:c.backupView.position,"z-index":c.backupView.zindex}),d.closest(".ui-multimediaview-wrap").css("height",""),c.backupView=null}e.show()},_addEvent:function(){var d=this,e=d.element,f=d.options,g=e[0],h=e.parent().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-handler"),q=h.find(".ui-fullscreenbutton"),r=h.find(".ui-seekbar"),s=r.find(".ui-duration"),t=r.find(".ui-currenttime");a(b).unbind(".multimediaview").bind("pagechange.multimediaview",function(b){var c=a(b.target);c.find(e).length>0&&g.autoplay&&g.play(),f.controls&&(h.show(),d._resize())}).bind("pagebeforechange.multimediaview",function(a){g.played.length!==0&&(g.pause(),h.hide())}),a(c).unbind(".multimediaview").bind("resize.multimediaview orientationchange.multimediaview",function(b){if(!f.controls)return;var c=a(b.target),g=e.parents(".ui-scrollview-clip");g.each(function(b){a.data(this,"scrollview")&&a(this).scrollview("scrollTo",0,0)}),f.fullScreen?(a(".ui-footer").hide(),d._fitContentArea(c)):a(".ui-footer:visible").show(),d._resize()}),e.bind("loadedmetadata.multimediaview",function(a){isNaN(g.duration)||k.find("p").text(d._convertTimeFormat(g.duration)),d._resize()}).bind("timeupdate.multimediaview",function(a){d._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 g.loop=="undefined"||g.loop==="")&&d.stop()}).bind("volumechange.multimediaview",function(a){g.volume<.1?(g.muted=!0,l.removeClass("ui-volume-icon").addClass("ui-mute-icon")):(g.muted=!1,l.removeClass("ui-mute-icon").addClass("ui-volume-icon")),d.isVolumeHide||d._updateVolumeState()}).bind("durationchange.multimediaview",function(a){isNaN(g.duration)||k.find("p").text(d._convertTimeFormat(g.duration)),d._resize()}).bind("error.multimediaview",function(a){switch(a.target.error.code){case a.target.error.MEDIA_ERR_ABORTED:c.alert("You aborted the video playback.");break;case a.target.error.MEDIA_ERR_NETWORK:c.alert("A network error caused the video download to fail part-way.");break;case a.target.error.MEDIA_ERR_DECODE:c.alert("The video playback was aborted due to a corruption problem or because the video used features your browser did not support.");break;case a.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:c.alert("The video could not be loaded, either because the server or network failed or because the format is not supported.");break;default:c.alert("An unknown error occurred.")}}).bind("vclick.multimediaview",function(a){if(!d.options.controls)return;h.fadeToggle("fast",function(){var a=h.offset();d.isControlHide=!d.isControlHide,d.options.mediatype=="video"&&d._startTimer()}),d._resize()}),i.bind("vclick.multimediaview",function(){d._endTimer(),g.paused?g.play():g.pause(),d.options.mediatype=="video"&&d._startTimer()}),q.bind("vclick.multimediaview",function(a){d.fullScreen(!d.options.fullScreen),h.fadeIn("fast"),d._endTimer(),a.preventDefault(),a.stopPropagation()}),r.bind("vmousedown.multimediaview",function(c){var e=c.clientX,f=g.duration,h=s.offset(),i=s.width(),j=(e-h.left)/i,k=f*j;if(!g.played.length)return;g.currentTime=k,d._endTimer(),c.preventDefault(),c.stopPropagation(),a(b).bind("vmousemove.multimediaview",function(a){var b=a.clientX,c=(b-h.left)/i;g.currentTime=f*c,a.preventDefault(),a.stopPropagation()}).bind("vmouseup.multimediaview",function(){a(b).unbind("vmousemove.multimediaview vmouseup.multimediaview"),g.paused?g.pause():g.play()})}),l.bind("vclick.multimediaview",function(){if(d.isVolumeHide){var a=d.element,b=g.volume;d.isVolumeHide=!1,d._resize(),m.fadeIn("fast"),d._updateVolumeState(),d._updateSeekBar()}else d.isVolumeHide=!0,m.fadeOut("fast",function(){d._resize()}),d._updateSeekBar()}),n.bind("vmousedown.multimediaview",function(c){var e=c.clientX,f=o.offset().left,g=o.width(),h=f+g,i=p.offset(),j=(e-f)/g,k=(e-f)/g;d._endTimer(),d._setVolume(k.toFixed(2)),c.preventDefault(),c.stopPropagation(),a(b).bind("vmousemove.multimediaview",function(a){var b=a.clientX,c=(b-f)/g;d._setVolume(c.toFixed(2)),a.preventDefault(),a.stopPropagation()}).bind("vmouseup.multimediaview",function(){a(b).unbind("vmousemove.multimediaview vmouseup.multimediaview"),d.options.mediatype=="video"&&d._startTimer()})})},_removeEvent:function(){var a=this,b=a.element,c=b.parent().find(".ui-multimediaview-control"),d=c.find(".ui-playpausebutton"),e=c.find(".ui-fullscreenbutton"),f=c.find(".ui-seekbar"),g=c.find(".ui-volumecontrol"),h=g.find(".ui-volumebar"),i=g.find(".ui-handler");b.unbind(".multimediaview"),d.unbind(".multimediaview"),e.unbind(".multimediaview"),f.unbind(".multimediaview"),h.unbind(".multimediaview"),i.unbind(".multimediaview")},_createControl:function(){var b=this,c=b.element,d=a("<span></span>").addClass("ui-"+b.role+"-control"),e=a("<span></span>").addClass("ui-playpausebutton ui-button"),f=a("<span></span>").addClass("ui-seekbar"),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"),l=a("<span></span>").addClass("ui-guide"),m=a("<span></span>").addClass("ui-value"),n=a("<span></span>").addClass("ui-handler"),o=a("<span></span>").addClass("ui-fullscreenbutton ui-button"),p=a("<span></span>").addClass("ui-duration"),q=a("<span></span>").addClass("ui-currenttime");return f.append(p).append(q).append(h).append(g),e.addClass("ui-play-icon"),i.addClass(c[0].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),b.element[0].nodeName==="VIDEO"&&(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().find(".ui-multimediaview-control"),e=d.find(".ui-volumecontrol");b.controlTimer=setTimeout(function(){b.isVolumeHide=!0,b.isControlHide=!0,b.controlTimer=null,e.hide(),d.fadeOut("fast")},a)},_endTimer:function(){this.controlTimer&&(clearTimeout(this.controlTimer),this.controlTimer=null)},_convertTimeFormat:function(a){var b=parseInt(a%60,10).toString(),c=parseInt(a/60%60,10).toString(),d=parseInt(a/3600,10).toString(),e=(d.length<2?"0"+d:d)+":"+(c.length<2?"0"+c:c)+":"+(b.length<2?"0"+b:b);return e},_updateSeekBar:function(a){var b=this,c=b.element,d=c[0].duration,e=c.parent().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[0].currentTime),m=parseInt(a/d*k,10),g.offset(j),h.offset(j).width(m),i.find("p").text(b._convertTimeFormat(a))},_updateVolumeState:function(){var a=this,b=a.element,c=b.parent().find(".ui-multimediaview-control"),d=c.find(".ui-volumecontrol"),e=c.find(".ui-volumebutton"),f=d.find(".ui-volumebar"),g=d.find(".ui-guide"),h=d.find(".ui-value"),i=d.find(".ui-handler"),j=i.width(),k=i.height(),l=g.height(),m=g.width(),n=0,o=0,p=0,q=null,r=b[0].volume;n=parseInt(g.offset().top,10),o=parseInt(g.offset().left,10),p=o,q=i.offset(),q.top=n-parseInt((k-l)/2,10),q.left=p+parseInt(m*r,10)-parseInt(j/2,10),i.offset(q),h.width(parseInt(m*r,10))},_setVolume:function(a){var b=this.element[0];if(a<0||a>1)return;b.volume=a},_fitContentArea:function(b,d){typeof d=="undefined"&&(d=c);var e=a(b),f=a(".ui-content:visible:first"),g=a(".ui-header:visible").outerHeight()||0,h=a(".ui-footer:visible").outerHeight()||0,i=parseFloat(f.css("padding-top")),j=parseFloat(f.css("padding-bottom")),k=d===c?c.innerHeight:a(d).height(),l=k-(g+h)-(i+j);f.offset({top:g+i}).height(l)},width:function(a){var b=this,c=arguments,d=b.element;if(c.length===0)return d.width();c.length===1&&(d.width(a),b._resize())},height:function(a){var b=this,c=b.element,d=arguments;if(d.length===0)return c.height();d.length===1&&(c.height(a),b._resize())},fullScreen:function(b){var c=this,d=c.element,e=d.parent().find(".ui-multimediaview-control"),f=e.find(".ui-fullscreenbutton"),g=arguments,h=c.options,i=a(".ui-page-active");if(g.length===0)return h.fullScreen;g.length===1&&(d.parents(".ui-content").scrollview("scrollTo",0,0),this.options.fullScreen=b,b?(i.children(".ui-header").hide(),i.children(".ui-footer").hide(),i.addClass("ui-fullscreen-page"),this._fitContentArea(i),f.removeClass("ui-fullscreen-on").addClass("ui-fullscreen-off")):(i.children(".ui-header").show(),i.children(".ui-footer").show(),i.removeClass("ui-fullscreen-page"),this._fitContentArea(i),f.removeClass("ui-fullscreen-off").addClass("ui-fullscreen-on")),c._resize())},refresh:function(){this._resize()}}),a(b).bind("pagecreate create",function(b){a.tizen.multimediaview.prototype.enhanceWithin(b.target)})}(jQuery,document,window),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("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,trackPersistentToolbars:!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()},_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')");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()},_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(!1,e))}).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(!1,e),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);if(c.trackPersistentToolbars){var f=a(".ui-footer-fixed:jqmData(id)",this),g=a(".ui-header-fixed:jqmData(id)",this),h=f.length&&e.nextPage&&a(".ui-footer-fixed:jqmData(id='"+f.jqmData("id")+"')",e.nextPage),i=g.length&&e.nextPage&&a(".ui-header-fixed:jqmData(id='"+g.jqmData("id")+"')",e.nextPage);h=h||a();if(h.length||i.length)h.add(i).appendTo(a.mobile.pageContainer),e.nextPage.one("pageshow",function(){h.add(i).appendTo(this)})}}),window.addEventListener("softkeyboardchange",function(c){var d=this;c.state=="on"?(e=a(".ui-page-active .ui-footer"),e.hide()):c.state=="off"&&e.show(),b.updatePagePadding(d),b.updatePageLayout(!0,d)})},_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;g=window.innerHeight-d.height()-e.height(),f.css("min-height",g-parseFloat(f.css("padding-top"))-parseFloat(f.css("padding-bottom"))+"px")},_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-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)&&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(c),f=e.find(":jqmData(role='header')"),g=e.find(":jqmData(role='content')"),h=0,i=0,j=0;e.length?d=e.find(":jqmData(role='footer')"):d=a(document).find(":jqmData(role='footer')").eq(0),i=d.css("display")=="none"?0:d.height(),j=f.css("display")=="none"?0:f.height(),i!=0&&d.css("bottom",0),h=window.innerHeight-i-j,a.support.scrollview&&g.height(h-parseFloat(g.css("padding-top"))-parseFloat(g.css("padding-bottom"))),b&&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")}}),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){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.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),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.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}),this._refresh()}}),a(document).bind("pagecreate create",function(b){a(b.target).find(":jqmData(role='progress')").progress()})}(jQuery,this),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("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,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,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.before(b.popup),b.popup.hide(),b.handleText=e.find(".ui-btn-text"),b.updateSlider(),this.element.bind("change",function(){b.updateSlider()}),b.handle.bind("vmousedown",function(){b.showPopup()}),e.add(document).bind("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}),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).bind("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).bind("pagecreate create",function(c){var d=a.data(b,"jqmSliderInitSelector");a(c.target).find(d).not("select").tizenslider(),a(c.target).find(d).filter("select").slider()})}(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.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=!1,m=!1,n;n=h>i&&h-i,n?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"),l=!1}),a(window).bind("tabbar.scrollstart",function(b){a(b.target).find(".ui-tabbar").length&&(l=!0,m=!1)}),a(window).bind("tabbar.scrollstop",function(b){var d=a(b.target),e=c.find("li").eq(0),f=Math.abs(c.find("li").eq(0).offset().left),g=-1;m=!0,a(b.target).find(".ui-tabbar").length&&l==1&&(c.find("li").each(function(a){var b=c.find("li").eq(a).offset();Math.abs(b.left)<f&&(f=Math.abs(b.left),g=a,e=c.find("li").eq(a))}),d.length&&l==m&&g!=-1&&(l=!1,d.scrollview("scrollTo",-(window.innerWidth/a(b.target).find(".ui-tabbar").data("defaultList")*g),0,357))),a(".ui-tabbar-divider-left").hide(),a(".ui-tabbar-divider-right").hide()}),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()},_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,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("label")),j=a(c.createElement("a"));d.hide().empty().addClass("ui-"+e),a(i).text(f.label).addClass("ui-tokentextarea-label"),d.append(i),a(h).addClass("ui-tokentextarea-input ui-tokentextarea-input-visible ui-input-text ui-body-s"),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)).addClass("ui-tokentextarea-link-base").addClass(g),d.append(j),this._bindEvents(),b._focusStatus="init",d.show(),d.attr("tabindex",-1).focusin(function(a){b.focusIn()}),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"),h=!1;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"),b._trigger("select")}),f.bind("keyup",function(c){var d=c.keyCode,e=a(f).val(),g=[],i;if(d===8)e.length===0&&b._validateTargetBlock();else if(d===13||d===186||d===188){if(e.length!==0){g=e.split(/[,;]/);for(i=0;i<g.length;i++)g[i].length!==0&&g[i].replace(/\s/g,"").length!==0&&b._addTextBlock(g[i])}f.val(""),h=!0}else b._unlockTextBlock();return!h}),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;var e=d.find(".ui-tokentextarea-input");b._modifyInputBoxWidth(),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"),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._currentWidth+=e._calcBlockWidth(j),e._modifyInputBoxWidth(),e._trigger("add")},_removeTextBlock:function(){var a=this,b=this.element,c=b.find("div.ui-tokentextarea-sblock");c!==null&&c.length>0?(a._currentWidth-=a._calcBlockWidth(c),c.remove(),a._modifyInputBoxWidth(),this._trigger("remove")):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-(c._labelWidth+c._anchorWidth)*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("label").show(),a.find(".ui-tokentextarea-desclabel").remove(),a.find("div.ui-tokentextarea-sblock").removeClass("ui-tokentextarea-sblock").addClass("ui-tokentextarea-block"),a.find("div").show(),a.find(".ui-tokentextarea-input").removeClass("ui-tokentextarea-input-invisible").addClass("ui-tokentextarea-input-visible"),a.find("a").show(),this._modifyInputBoxWidth(),this._focusStatus="focusIn",a.removeClass("ui-tokentextarea-focusout").addClass("ui-tokentextarea-focusin")},focusOut:function(){if(this._focusStatus==="focusOut")return;var b=this,d=b.element,e=null,f="",g=0,h=10,i=d.find("label"),j=d.find("span"),k=d.find("div"),l=d.outerWidth(!0)-j.outerWidth(!0)-i.outerWidth(!0),m=0;d.find(".ui-tokentextarea-input").removeClass("ui-tokentextarea-input-visible").addClass("ui-tokentextarea-input-invisible"),d.find("a").hide(),k.hide(),l-=b._reservedWidth;for(g=0;g<k.length;g++){m=a(k[g]).outerWidth(!0);if(l-m<=0){h=g-1;break}a(k[g]).show(),l-=m}h!==k.length&&(f=b._stringFormat(b.options.description,k.length-h-1),e=a(c.createElement("label")),e.text(f),e.addClass("ui-tokentextarea-desclabel").addClass("ui-tokentextarea-desclabel"),a(k[h]).after(e)),this._focusStatus="focusOut",d.removeClass("ui-tokentextarea-focusin").addClass("ui-tokentextarea-focusout")},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"),this._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;if(this._focusStatus==="focusOut")return;arguments.length===0?(e.remove(),this._trigger("clear")):isNaN(b)||(f=b<e.length?b:e.length-1,a(e[f]).remove(),this._trigger("remove")),c._modifyInputBoxWidth()},length:function(){return this.element.find("div").length},refresh:function(){var a=this,b=this.element;a._viewWidth=b.innerWidth(),a._resizeBlocks(),a._modifyInputBoxWidth()},destroy:function(){var a=this.element;a.find("label").remove(),a.find("div").undelegate("click").remove(),a.find("a").remove(),a.find(".ui-tokentextarea-input").unbind("keyup").remove(),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){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 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 h(){return Date.now()}var g={scrolling:0,done:1};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=h()},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=h()-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=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,_template:null,_maxViewSize:0,_modifyViewPos: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});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=a(e.element).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._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!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.children().first(),a._totalRowCnt-1),b.rotation&&a._rowsPerView>=a._totalRowCnt&&a._replaceRow(a._$view.children().last(),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())},_getViewHeight:function(){var a=this;return a._$view.height()},refresh:function(){var b=this,c=b.options,d=0,e=0;b._template=a("#"+c.template);if(!b._template)return;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=b._makeRows(c+2),a(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._maxSize=(b._totalRowCnt-b._rowsPerView)*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();return g},resize:function(){var a=this,b=null,c=0,d=0,e=0,f=0,g=0,h=0,i=0;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._maxSize=(a._totalRowCnt-a._rowsPerView)*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._rowsPerView=c,a._clipSize=g,a._blockScroll=a._rowsPerView>a._totalRowCnt,a._maxSize=(a._totalRowCnt-a._rowsPerView)*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())},_initScrollView:function(){var b=this;a.extend(b.options,b._scrollView.options),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))},_createScrollBar:function(){var b=this,c='<div class="ui-scrollbar ui-scrollbar-',d='"><div class="ui-scrollbar-track"><div class="ui-scrollbar-thumb"></div></div></div>';if(b.options.rotation)return;b._direction?(b._$clip.append(c+"x"+d),b._hScrollBar=a(b._$clip.children(".ui-scrollbar-x")),b._hScrollBar.find(".ui-scrollbar-thumb").addClass("ui-scrollbar-thumb-x")):(b._$clip.append(c+"y"+d),b._vScrollBar=a(b._$clip.children(".ui-scrollbar-y")),b._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";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,e=0,f=0;if(!c.options.rotation)return;for(d=0;d<c._$rows.length;d++)if(a(c._$rows[d]).hasClass(b)){c._direction?e=-(d*c._cellSize-c._clipSize/2+c._cellSize*2):f=-(d*c._cellSize-c._clipSize/2+c._cellSize*2),c.scrollTo(e,f);return}},scrollTo:function(a,b,c){var d=this;d._direction?(d._sx=d._reservedPos,d._reservedPos=a):(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,h=parseInt(g/c._cellSize,10),i=0,j=0,k=null;if(c._blockScroll)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);return}if(g<0&&c._scalableSize<=-(c._maxSize+c._cellSize)){c._stopMScroll(),c._scalableSize=-(c._maxSize+c._cellSize),c._setElementTransform(c._modifyViewPos);return}}if(h>0)for(i=0;i<h;i++)j=-parseInt(d/c._cellSize+i+3,10),k=c._$view.children().last().detach(),c._replaceRow(k,e(j,c._totalRowCnt)),c._$view.prepend(k),c._setScrollBarPosition(-1);else if(h<0)for(i=0;i>h;i--)j=c._rowsPerView-parseInt(d/c._cellSize+i,10),k=c._$view.children().first().detach(),c._replaceRow(k,e(j,c._totalRowCnt)),c._$view.append(k),c._setScrollBarPosition(1);c._scalableSize+=h*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._maxSize-a._modifyViewPos)?-(a._maxSize+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(){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)},_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,i=0;return d._lastMove=h(),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):(d._movePos=c-d._eventPos,i=d._nextPos+d._movePos),d._showScrollBars(),d._setScrollPosition(g,i),!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._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._direction?(c=d._calculateClipHeight(),d._$view.height(c),d._$clip.height(c)):(c=d._calculateClipWidth(),d._$view.width(c),d._$clip.width(c)),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=a(c.element),e=a(c.element).parent(),f=0,g=a(b).width();return c._inheritedSize.isDefinedWidth?c._inheritedSize.width:(e.hasClass("ui-content")?(f=parseInt(e.css("padding-left"),10),g-=f||0,f=parseInt(e.css("padding-right"),10),g-=f||0):g=d.width(),g)},_calculateClipHeight:function(){var c=this,d=a(c.element),e=a(c.element).parent(),f=null,g=null,h=0,i=a(b).height();return c._inheritedSize.isDefinedHeight?c._inheritedSize.height:(e.hasClass("ui-content")?(h=parseInt(e.css("padding-top"),10),i-=h||0,h=parseInt(e.css("padding-bottom"),10),i-=h||0,f=e.siblings(".ui-header"),g=e.siblings(".ui-footer"),f&&(f.outerHeight(!0)===null?i-=a(".ui-header").outerHeight()||0:i-=f.outerHeight(!0)),g&&(i-=g.outerHeight(!0))):i=d.height(),i)},_calculateColumnSize:function(){var a=this,b,c;b=a._makeRows(1),a._$view.append(b.children().first()),a._direction?(a._viewSize=a._$view.width(),c=a._$view.children().first().children().first(),a._cellSize=c.outerWidth(!0),a._cellOtherSize=c.outerHeight(!0)):(a._viewSize=a._$view.height(),c=a._$view.children().first().children().first(),a._cellSize=c.outerHeight(!0),a._cellOtherSize=c.outerWidth(!0)),b.remove(),a._$view.children().remove()},_calculateColumnCount:function(){var b=this,c=a(b.element),d=b._direction?c.innerHeight():c.innerWidth(),e=0;return b._direction?d-=parseInt(c.css("padding-top"),10)+parseInt(c.css("padding-bottom"),10):d-=parseInt(c.css("padding-left"),10)+parseInt(c.css("padding-right"),10),e=parseInt(d/b._cellOtherSize,10),e>0?e: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(b){var c=this,d=c.options,e=0,f=null,g=null;g=a(c._createElement("div")),g.addClass("ui-scrollview-view");for(e=0;e<b;e+=1)f=c._makeRow(c._template,e),c._direction&&f.css("top",0).css("left",e*c._cellSize),g.append(f);return g},_makeRow:function(b,c){var d=this,e=d.options,f=c*d._itemCount,g=null,h=null,i=0,j=d._direction?"top":"left",k=d._direction?"ui-virtualgrid-wrapblock-x":"ui-virtualgrid-wrapblock-y",l=d._direction?"top":"left",m=a(d._createElement("div"));m.addClass(k).attr("row-index",c);for(i=0;i<d._itemCount;i++)g=d._makeHtmlData(b,f,i),g&&m.append(g),f+=1;return m},_makeHtmlData:function(b,c,d){var e=this,f=null,g=null,h=e._direction?"top":"left";return g=e._itemData(c),g&&(f=b.tmpl(g),a(f).css(h,d*e._cellOtherSize).addClass("virtualgrid-item")),f},_increaseRow:function(b){var c=this,d=c.options.rotation,e=null,f=0,g=0,h=0,i=c._scalableSize,j=0;f=parseInt(a(c._$view.children().first()).attr("row-index"),10)-1,g=parseInt(a(c._$view.children()[c._rowsPerView]).attr("row-index"),10)+1;for(j=1;j<=b;j++)g+j>=c._totalRowCnt?(e=c._makeRow(c._template,f),c._$view.prepend(e),f-=1):(e=c._makeRow(c._template,g+j),c._$view.append(e)),c._direction?e.width(c._cellSize):e.height(c._cellSize)},_decreaseRow:function(a){var b=this,c=0;for(c=0;c<a;c++)b._$view.children().last().remove()},_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(b,c){var d=this,e=d.options,f=null,g=null,h=b.attr?b:a(b),i=null,j=null,k=null,l=0,m=0,n=null;f=h.attr("row-index",c).children();if(f.length!==d._itemCount){h.children().remove(),n=a(d._makeRow(d._template,c)),h.append(n.children()),n.remove();return}m=c*d._itemCount;for(l=0;l<d._itemCount;l+=1)g=f.eq(l),i=d._itemData(m),g&&i?(k=d._template,j=k.tmpl(i),d._replace(g,j,!1),j.remove(),m++):g&&!i&&g.remove()},_createElement:function(a){var b=c.createElement(a);return this._fragment.appendChild(b),b},_replace:function(b,c,d){var e={ELEMENT_NODE:1,TEXT_NODE:3};a(b).find(".ui-li-text-main",".ui-li-text-sub","ui-btn-text").each(function(b){var d=a(this),f=a(c).find(".ui-li-text-main",".ui-li-text-sub","ui-btn-text").eq(b).text();a(d).contents().filter(function(){return this.nodeType==e.TEXT_NODE}).get(0).data=f}),a(b).find("img").each(function(b){var d=a(this),e=a(c).find("img").eq(b).attr("src");a(d).attr("src",e)}),a(b).removeData(),d&&a(b).data(d,a(c).data(d))}}),a(c).bind("pagecreate create",function(b){a(":jqmData(role='virtualgrid')").virtualgrid()})}(jQuery,window,document),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;b.data?c=b.data:c=b,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).each(function(b){f=parseInt(a(this).css("margin-left"),10)+parseInt(a(this).css("margin-right"),10),a(this).css("width",d._container_w-e-f)})},_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),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).bind("resize.virtuallist",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).unbind("resize.virtuallist"),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){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=function(a){return new c.prototype.init(a)},typeof require!="undefined"&&typeof exports!="undefined"&&typeof module!="undefined"?module.exports=c:a.Globalize=c,c.cultures={},c.prototype={constructor:c,init:function(a){return this.cultures=c.cultures,this.cultureSelector=a,this}},c.prototype.init.prototype=c.prototype,c.cultures["default"]={name:"en",englishName:"English",nativeName:"English",isRTL:!1,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",NaN:"NaN",negativeInfinity:"-Infinity",positiveInfinity:"Infinity",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss"}}},messages:{}},c.cultures["default"].calendar=c.cultures["default"].calendars.standard,c.cultures.en=c.cultures["default"],c.cultureSelector="en",d=/^0x[a-f0-9]+$/i,e=/^[+-]?infinity$/i,f=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,g=/^\s+|\s+$/g,h=function(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},i=function(a,b){return a.substr(a.length-b.length)===b},j=function(a){var c,d,e,f,g,h,i=arguments[0]||{},n=1,o=arguments.length,a=!1;typeof i=="boolean"&&(a=i,i=arguments[1]||{},n=2),typeof i!="object"&&!l(i)&&(i={});for(;n<o;n++)if((c=arguments[n])!=null)for(d in c){e=i[d],f=c[d];if(i===f)continue;a&&f&&(m(f)||(g=k(f)))?(g?(g=!1,h=e&&k(e)?e:[]):h=e&&m(e)?e:{},i[d]=j(a,h,f)):f!==b&&(i[d]=f)}return i},k=Array.isArray||function(a){return Object.prototype.toString.call(a)==="[object Array]"},l=function(a){return Object.prototype.toString.call(a)==="[object Function]"},m=function(a){return Object.prototype.toString.call(a)==="[object Object]"},n=function(a,b){return a.indexOf(b)===0},o=function(a){return(a+"").replace(g,"")},p=function(a){return isNaN(a)?NaN:Math[a<0?"ceil":"floor"](a)},q=function(a,b,c){var d;for(d=a.length;d<b;d+=1)a=c?"0"+a:a+"0";return a},r=function(a,b){var c=0,d=!1;for(var e=0,f=a.length;e<f;e++){var g=a.charAt(e);switch(g){case"'":d?b.push("'"):c++,d=!1;break;case"\\":d&&b.push("\\"),d=!d;break;default:b.push(g),d=!1}}return c},s=function(a,b){b=b||"F";var c,d=a.patterns,e=b.length;if(e===1){c=d[b];if(!c)throw"Invalid date format string '"+b+"'.";b=c}else e===2&&b.charAt(0)==="%"&&(b=b.charAt(1));return b},t=function(a,b,c){function y(a,b){var c,d=a+"";return b>1&&d.length<b?(c=l[b-2]+d,c.substr(c.length-b,b)):(c=d,c)}function z(){return m||n?m:(m=o.test(b),n=!0,m)}function A(a,b){if(u)return u[b];switch(b){case 0:return a.getFullYear();case 1:return a.getMonth();case 2:return a.getDate()}}var d=c.calendar,e=d.convert;if(!b||!b.length||b==="i"){var f;if(c&&c.name.length)if(e)f=t(a,d.patterns.F,c);else{var g=new Date(a.getTime()),h=w(a,d.eras);g.setFullYear(x(a,d,h)),f=g.toLocaleString()}else f=a.toString();return f}var i=d.eras,j=b==="s";b=s(d,b),f=[];var k,l=["0","00","000"],m,n,o=/([^d]|^)(d|dd)([^d]|$)/g,p=0,q=v(),u;!j&&e&&(u=e.fromGregorian(a));for(;;){var B=q.lastIndex,C=q.exec(b),D=b.slice(B,C?C.index:b.length);p+=r(D,f);if(!C)break;if(p%2){f.push(C[0]);continue}var E=C[0],F=E.length;switch(E){case"ddd":case"dddd":var G=F===3?d.days.namesAbbr:d.days.names;f.push(G[a.getDay()]);break;case"d":case"dd":m=!0,f.push(y(A(a,2),F));break;case"MMM":case"MMMM":var H=A(a,1);f.push(d.monthsGenitive&&z()?d.monthsGenitive[F===3?"namesAbbr":"names"][H]:d.months[F===3?"namesAbbr":"names"][H]);break;case"M":case"MM":f.push(y(A(a,1)+1,F));break;case"y":case"yy":case"yyyy":H=u?u[0]:x(a,d,w(a,i),j),F<4&&(H%=100),f.push(y(H,F));break;case"h":case"hh":k=a.getHours()%12,k===0&&(k=12),f.push(y(k,F));break;case"H":case"HH":f.push(y(a.getHours(),F));break;case"m":case"mm":f.push(y(a.getMinutes(),F));break;case"s":case"ss":f.push(y(a.getSeconds(),F));break;case"t":case"tt":H=a.getHours()<12?d.AM?d.AM[0]:" ":d.PM?d.PM[0]:" ",f.push(F===1?H.charAt(0):H);break;case"f":case"ff":case"fff":f.push(y(a.getMilliseconds(),3).substr(0,F));break;case"z":case"zz":k=a.getTimezoneOffset()/60,f.push((k<=0?"+":"-")+y(Math.floor(Math.abs(k)),F));break;case"zzz":k=a.getTimezoneOffset()/60,f.push((k<=0?"+":"-")+y(Math.floor(Math.abs(k)),2)+":"+y(Math.abs(a.getTimezoneOffset()%60),2));break;case"g":case"gg":d.eras&&f.push(d.eras[w(a,i)].name);break;case"/":f.push(d["/"]);break;default:throw"Invalid date format pattern '"+E+"'."}}return f.join("")},function(){var a;a=function(a,b,c){var d=c.groupSizes,e=d[0],f=1,g=Math.pow(10,b),h=Math.round(a*g)/g;isFinite(h)||(h=a),a=h;var i=a+"",j="",k=i.split(/e/i),l=k.length>1?parseInt(k[1],10):0;i=k[0],k=i.split("."),i=k[0],j=k.length>1?k[1]:"";var m;l>0?(j=q(j,l,!1),i+=j.slice(0,l),j=j.substr(l)):l<0&&(l=-l,i=q(i,l+1),j=i.slice(-l,i.length)+j,i=i.slice(0,-l)),b>0?j=c["."]+(j.length>b?j.slice(0,b):q(j,b)):j="";var n=i.length-1,o=c[","],p="";while(n>=0){if(e===0||e>n)return i.slice(0,n+1)+(p.length?o+p+j:j);p=i.slice(n-e+1,n+1)+(p.length?o+p:""),n-=e,f<d.length&&(e=d[f],f++)}return i.slice(0,n+1)+o+p+j},u=function(b,c,d){if(!isFinite(b))return b===Infinity?d.numberFormat.positiveInfinity:b===-Infinity?d.numberFormat.negativeInfinity:d.numberFormat.NaN;if(!c||c==="i")return d.name.length?b.toLocaleString():b.toString();c=c||"D";var e=d.numberFormat,f=Math.abs(b),g=-1,h;c.length>1&&(g=parseInt(c.slice(1),10));var i=c.charAt(0).toUpperCase(),j;switch(i){case"D":h="n",f=p(f),g!==-1&&(f=q(""+f,g,!0)),b<0&&(f="-"+f);break;case"N":j=e;case"C":j=j||e.currency;case"P":j=j||e.percent,h=b<0?j.pattern[0]:j.pattern[1]||"n",g===-1&&(g=j.decimals),f=a(f*(i==="P"?100:1),g,j);break;default:throw"Bad number format specifier: "+i}var k=/n|\$|-|%/g,l="";for(;;){var m=k.lastIndex,n=k.exec(h);l+=h.slice(m,n?n.index:h.length);if(!n)break;switch(n[0]){case"n":l+=f;break;case"$":l+=e.currency.symbol;break;case"-":/[1-9]/.test(f)&&(l+=e["-"]);break;case"%":l+=e.percent.symbol}}return l}}(),v=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g},w=function(a,b){if(!b)return 0;var c,d=a.getTime();for(var e=0,f=b.length;e<f;e++){c=b[e].start;if(c===null||d>=c)return e}return 0},x=function(a,b,c,d){var e=a.getFullYear();return!d&&b.eras&&(e-=b.eras[c].offset),e},function(){var a,b,c,d,e,f,g;a=function(a,b){if(b<100){var c=new Date,d=w(c),e=x(c,a,d),f=a.twoDigitYearMax;f=typeof f=="string"?(new Date).getFullYear()%100+parseInt(f,10):f,b+=e-e%100,b>f&&(b-=100)}return b},b=function(a,b,c){var d,e=a.days,i=a._upperDays;return i||(a._upperDays=i=[g(e.names),g(e.namesAbbr),g(e.namesShort)]),b=f(b),c?(d=h(i[1],b),d===-1&&(d=h(i[2],b))):d=h(i[0],b),d},c=function(a,b,c){var d=a.months,e=a.monthsGenitive||a.months,i=a._upperMonths,j=a._upperMonthsGen;i||(a._upperMonths=i=[g(d.names),g(d.namesAbbr)],a._upperMonthsGen=j=[g(e.names),g(e.namesAbbr)]),b=f(b);var k=h(c?i[1]:i[0],b);return k<0&&(k=h(c?j[1]:j[0],b)),k},d=function(a,b){var c=a._parseRegExp;if(!c)a._parseRegExp=c={};else{var d=c[b];if(d)return d}var e=s(a,b).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),f=["^"],g=[],h=0,i=0,j=v(),k;while((k=j.exec(e))!==null){var l=e.slice(h,k.index);h=j.lastIndex,i+=r(l,f);if(i%2){f.push(k[0]);continue}var m=k[0],n=m.length,o;switch(
+m){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":o="(\\D+)";break;case"tt":case"t":o="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":o="(\\d{"+n+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":o="(\\d\\d?)";break;case"zzz":o="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":o="([+-]?\\d\\d?)";break;case"/":o="(\\"+a["/"]+")";break;default:throw"Invalid date format pattern '"+m+"'."}o&&f.push(o),g.push(k[0])}r(e.slice(h),f),f.push("$");var p=f.join("").replace(/\s+/g,"\\s+"),q={regExp:p,groups:g};return c[b]=q},e=function(a,b,c){return a<b||a>c},f=function(a){return a.split("\u00a0").join(" ").toUpperCase()},g=function(a){var b=[];for(var c=0,d=a.length;c<d;c++)b[c]=f(a[c]);return b},y=function(f,g,h){f=o(f);var i=h.calendar,j=d(i,g),k=(new RegExp(j.regExp)).exec(f);if(k===null)return null;var l=j.groups,m=null,p=null,q=null,r=null,s=null,t=0,u,v=0,w=0,x=0,y=null,z=!1;for(var A=0,B=l.length;A<B;A++){var C=k[A+1];if(C){var D=l[A],E=D.length,F=parseInt(C,10);switch(D){case"dd":case"d":r=F;if(e(r,1,31))return null;break;case"MMM":case"MMMM":q=c(i,C,E===3);if(e(q,0,11))return null;break;case"M":case"MM":q=F-1;if(e(q,0,11))return null;break;case"y":case"yy":case"yyyy":p=E<4?a(i,F):F;if(e(p,0,9999))return null;break;case"h":case"hh":t=F,t===12&&(t=0);if(e(t,0,11))return null;break;case"H":case"HH":t=F;if(e(t,0,23))return null;break;case"m":case"mm":v=F;if(e(v,0,59))return null;break;case"s":case"ss":w=F;if(e(w,0,59))return null;break;case"tt":case"t":z=i.PM&&(C===i.PM[0]||C===i.PM[1]||C===i.PM[2]);if(!z&&(!i.AM||C!==i.AM[0]&&C!==i.AM[1]&&C!==i.AM[2]))return null;break;case"f":case"ff":case"fff":x=F*Math.pow(10,3-E);if(e(x,0,999))return null;break;case"ddd":case"dddd":s=b(i,C,E===3);if(e(s,0,6))return null;break;case"zzz":var G=C.split(/:/);if(G.length!==2)return null;u=parseInt(G[0],10);if(e(u,-12,13))return null;var H=parseInt(G[1],10);if(e(H,0,59))return null;y=u*60+(n(C,"-")?-H:H);break;case"z":case"zz":u=F;if(e(u,-12,13))return null;y=u*60;break;case"g":case"gg":var I=C;if(!I||!i.eras)return null;I=o(I.toLowerCase());for(var J=0,K=i.eras.length;J<K;J++)if(I===i.eras[J].name.toLowerCase()){m=J;break}if(m===null)return null}}}var L=new Date,M,N=i.convert;M=N?N.fromGregorian(L)[0]:L.getFullYear(),p===null?p=M:i.eras&&(p+=i.eras[m||0].offset),q===null&&(q=0),r===null&&(r=1);if(N){L=N.toGregorian(p,q,r);if(L===null)return null}else{L.setFullYear(p,q,r);if(L.getDate()!==r)return null;if(s!==null&&L.getDay()!==s)return null}z&&t<12&&(t+=12),L.setHours(t,v,w,x);if(y!==null){var O=L.getMinutes()-(y+L.getTimezoneOffset());L.setHours(L.getHours()+parseInt(O/60,10),O%60)}return L}}(),z=function(a,b,c){var d=b["-"],e=b["+"],f;switch(c){case"n -":d=" "+d,e=" "+e;case"n-":i(a,d)?f=["-",a.substr(0,a.length-d.length)]:i(a,e)&&(f=["+",a.substr(0,a.length-e.length)]);break;case"- n":d+=" ",e+=" ";case"-n":n(a,d)?f=["-",a.substr(d.length)]:n(a,e)&&(f=["+",a.substr(e.length)]);break;case"(n)":n(a,"(")&&i(a,")")&&(f=["-",a.substr(1,a.length-2)])}return f||["",a]},c.prototype.findClosestCulture=function(a){return c.findClosestCulture.call(this,a)},c.prototype.format=function(a,b,d){return c.format.call(this,a,b,d)},c.prototype.localize=function(a,b){return c.localize.call(this,a,b)},c.prototype.parseInt=function(a,b,d){return c.parseInt.call(this,a,b,d)},c.prototype.parseFloat=function(a,b,d){return c.parseFloat.call(this,a,b,d)},c.prototype.culture=function(a){return c.culture.call(this,a)},c.addCultureInfo=function(a,b,c){var d={},e=!1;typeof a!="string"?(c=a,a=this.culture().name,d=this.cultures[a]):typeof b!="string"?(c=b,e=this.cultures[a]==null,d=this.cultures[a]||this.cultures["default"]):(e=!0,d=this.cultures[b]),this.cultures[a]=j(!0,{},d,c),e&&(this.cultures[a].calendar=this.cultures[a].calendars.standard)},c.findClosestCulture=function(a){var b;if(!a)return this.findClosestCulture(this.cultureSelector)||this.cultures["default"];typeof a=="string"&&(a=a.split(","));if(k(a)){var c,d=this.cultures,e=a,f,g=e.length,h=[];for(f=0;f<g;f++){a=o(e[f]);var i,j=a.split(";");c=o(j[0]),j.length===1?i=1:(a=o(j[1]),a.indexOf("q=")===0?(a=a.substr(2),i=parseFloat(a),i=isNaN(i)?0:i):i=1),h.push({lang:c,pri:i})}h.sort(function(a,b){return a.pri<b.pri?1:-1});for(f=0;f<g;f++){c=h[f].lang,b=d[c];if(b)return b}for(f=0;f<g;f++){c=h[f].lang;do{var l=c.lastIndexOf("-");if(l===-1)break;c=c.substr(0,l),b=d[c];if(b)return b}while(1)}for(f=0;f<g;f++){c=h[f].lang;for(var m in d){var n=d[m];if(n.language==c)return n}}}else if(typeof a=="object")return a;return b||null},c.format=function(a,b,c){return culture=this.findClosestCulture(c),a instanceof Date?a=t(a,b,culture):typeof a=="number"&&(a=u(a,b,culture)),a},c.localize=function(a,b){return this.findClosestCulture(b).messages[a]||this.cultures["default"].messages[a]},c.parseDate=function(a,b,c){c=this.findClosestCulture(c);var d,e,f;if(b){typeof b=="string"&&(b=[b]);if(b.length)for(var g=0,h=b.length;g<h;g++){var i=b[g];if(i){d=y(a,i,c);if(d)break}}}else{f=c.calendar.patterns;for(e in f){d=y(a,f[e],c);if(d)break}}return d||null},c.parseInt=function(a,b,d){return p(c.parseFloat(a,b,d))},c.parseFloat=function(a,b,c){typeof b!="number"&&(c=b,b=10);var g=this.findClosestCulture(c),h=NaN,i=g.numberFormat;a.indexOf(g.numberFormat.currency.symbol)>-1&&(a=a.replace(g.numberFormat.currency.symbol,""),a=a.replace(g.numberFormat.currency["."],g.numberFormat["."])),a=o(a);if(e.test(a))h=parseFloat(a);else if(!b&&d.test(a))h=parseInt(a,16);else{var j=z(a,i,i.pattern[0]),k=j[0],l=j[1];k===""&&i.pattern[0]!=="(n)"&&(j=z(a,i,"(n)"),k=j[0],l=j[1]),k===""&&i.pattern[0]!=="-n"&&(j=z(a,i,"-n"),k=j[0],l=j[1]),k=k||"+";var m,n,p=l.indexOf("e");p<0&&(p=l.indexOf("E")),p<0?(n=l,m=null):(n=l.substr(0,p),m=l.substr(p+1));var q,r,s=i["."],t=n.indexOf(s);t<0?(q=n,r=null):(q=n.substr(0,t),r=n.substr(t+s.length));var u=i[","];q=q.split(u).join("");var v=u.replace(/\u00A0/g," ");u!==v&&(q=q.split(v).join(""));var w=k+q;r!==null&&(w+="."+r);if(m!==null){var x=z(m,i,"-n");w+="e"+(x[0]||"+")+x[1]}f.test(w)&&(h=parseFloat(w))}return h},c.culture=function(a){return typeof a!="undefined"&&(this.cultureSelector=a),this.findClosestCulture(a)||this.culture["default"]}}(this),function(a,b,c,d){function f(a,b){d==typeof 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.warn("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].join("/"),d=[b,"theme.js"].join("/"),e.frameworkData.minified?c=[b,"tizen-web-ui-fw-theme.min.css"].join("/"):c=[b,"tizen-web-ui-fw-theme.css"].join("/"),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.warn("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"].join(""),!!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.round(b*c);a("html.ui-mobile").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,c=this.frameworkData.defaultFontSize,d=1;a("body").attr("data-tizen-theme-default-font-size",c),this.frameworkData.viewportScale==1&&(b="screen-width"),"screen-width"==b&&(b=document.documentElement.clientWidth),b=this.setViewport(b),isNaN(b)||(d=parseFloat(b/this.frameworkData.defaultViewportWidth)),this.scaleBaseFontSize(c,d)}};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){a.tizen.frameworkData.pkgVersion="0.2.15"}(jQuery);
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/default/tizen-web-ui-fw-theme.css b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/default/tizen-web-ui-fw-theme.css
new file mode 100644 (file)
index 0000000..f51a04a
--- /dev/null
@@ -0,0 +1,98 @@
+.ui-popupwindow-padding {
+  padding: 6px;
+}
+.ui-popupwindow {
+  display: inline-block;
+  position: absolute;
+  padding: 0;
+  z-index: 100 !important;
+}
+.ui-popupwindow-screen {
+  background: #000000;
+  opacity: 0;
+  box-sizing: border-box;
+  -moz-box-sizing: border-box;
+}
+/* 
+ * The settings in this file are part of the theme. They are not part of the structure of ctxpopup.
+ * In the default theme, ui-body-* has a border width of 1px. So, to make the triangles cross this border, we set them in
+ * by 1px.
+ */
+
+.ui-ctxpopup-row .ui-triangle-top {
+    top: 1px;
+}
+
+.ui-ctxpopup-row .ui-triangle-left {
+    left: 1px;
+}
+
+.ui-ctxpopup-row .ui-triangle-right {
+    right: 1px;
+}
+
+.ui-ctxpopup-row .ui-triangle-bottom {
+    bottom: 1px;
+}
+.ui-ctxpopup {
+  display: table;
+}
+.ui-ctxpopup .ui-ctxpopup-row {
+  display: table-row;
+}
+.ui-ctxpopup .ui-ctxpopup-row .ui-ctxpopup-cell {
+  display: table-cell;
+}
+.ui-triangle-container {
+  position: relative;
+}
+.ui-triangle-container .ui-triangle {
+  position: absolute;
+  border-style: solid;
+  border-color: transparent;
+  border-width: 10px;
+}
+.ui-triangle-container .ui-triangle-top {
+  top: 0px;
+  border-top-width: 0px;
+  border-left-color: transparent;
+  border-right-color: transparent;
+  margin-left: -10px;
+}
+.ui-triangle-container .ui-triangle-bottom {
+  bottom: 0px;
+  border-bottom-width: 0px;
+  border-left-color: transparent;
+  border-right-color: transparent;
+  margin-left: -10px;
+}
+.ui-triangle-container .ui-triangle-left {
+  left: 0px;
+  margin-top: -10px;
+  border-left-width: 0px;
+  border-left-color: transparent;
+  border-right-color: transparent;
+}
+.ui-triangle-container .ui-triangle-right {
+  right: 0px;
+  margin-top: -10px;
+  border-right-width: 0px;
+  border-left-color: transparent;
+  border-right-color: transparent;
+}
+.ui-triangle-container-top {
+  height: 10px;
+  top: 0px;
+  margin-top: -10px;
+}
+.ui-triangle-container-bottom {
+  height: 10px;
+  bottom: 0px;
+  margin-bottom: -10px;
+}
+.ui-triangle-container-left {
+  width: 10px;
+}
+.ui-triangle-container-right {
+  width: 10px;
+}
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/default/tizen-web-ui-fw-theme.min.css b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/default/tizen-web-ui-fw-theme.min.css
new file mode 100644 (file)
index 0000000..1c126c8
--- /dev/null
@@ -0,0 +1 @@
+.ui-popupwindow-padding{padding:6px}.ui-popupwindow{display:inline-block;position:absolute;padding:0;z-index:100!important}.ui-popupwindow-screen{background:#000;opacity:0;box-sizing:border-box;-moz-box-sizing:border-box}.ui-ctxpopup-row .ui-triangle-top{top:1px}.ui-ctxpopup-row .ui-triangle-left{left:1px}.ui-ctxpopup-row .ui-triangle-right{right:1px}.ui-ctxpopup-row .ui-triangle-bottom{bottom:1px}.ui-ctxpopup{display:table}.ui-ctxpopup .ui-ctxpopup-row{display:table-row}.ui-ctxpopup .ui-ctxpopup-row .ui-ctxpopup-cell{display:table-cell}.ui-triangle-container{position:relative}.ui-triangle-container .ui-triangle{position:absolute;border-style:solid;border-color:transparent;border-width:10px}.ui-triangle-container .ui-triangle-top{top:0;border-top-width:0;border-left-color:transparent;border-right-color:transparent;margin-left:-10px}.ui-triangle-container .ui-triangle-bottom{bottom:0;border-bottom-width:0;border-left-color:transparent;border-right-color:transparent;margin-left:-10px}.ui-triangle-container .ui-triangle-left{left:0;margin-top:-10px;border-left-width:0;border-left-color:transparent;border-right-color:transparent}.ui-triangle-container .ui-triangle-right{right:0;margin-top:-10px;border-right-width:0;border-left-color:transparent;border-right-color:transparent}.ui-triangle-container-top{height:10px;top:0;margin-top:-10px}.ui-triangle-container-bottom{height:10px;bottom:0;margin-bottom:-10px}.ui-triangle-container-left{width:10px}.ui-triangle-container-right{width:10px}
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_multimedia.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_multimedia.png
new file mode 100644 (file)
index 0000000..611afcb
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_multimedia.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_picture.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_picture.png
new file mode 100644 (file)
index 0000000..be8c2d2
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_picture.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_text.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_text.png
new file mode 100644 (file)
index 0000000..1e2cb5d
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_text.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_unnamed.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_unnamed.png
new file mode 100644 (file)
index 0000000..ec6f36a
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_Nocontents_unnamed.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_delete.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_delete.png
new file mode 100644 (file)
index 0000000..bd66d4f
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_delete.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_dim.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_dim.png
new file mode 100644 (file)
index 0000000..859d3c6
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_dim.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_fullscreen_off.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_fullscreen_off.png
new file mode 100644 (file)
index 0000000..1afb045
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_fullscreen_off.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_fullscreen_on.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_fullscreen_on.png
new file mode 100644 (file)
index 0000000..fc1d516
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_fullscreen_on.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_off.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_off.png
new file mode 100644 (file)
index 0000000..eb555ef
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_off.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_on.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_on.png
new file mode 100644 (file)
index 0000000..aa3704c
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_on.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_pause.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_pause.png
new file mode 100644 (file)
index 0000000..e32a1fb
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_pause.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_play.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_play.png
new file mode 100644 (file)
index 0000000..be36511
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_play.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_press.png
new file mode 100644 (file)
index 0000000..6844f26
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_radio.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_radio.png
new file mode 100644 (file)
index 0000000..83a1a54
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_radio.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_radio_select.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_radio_select.png
new file mode 100644 (file)
index 0000000..8b8ad9d
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_button_radio_select.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_check_bg.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_check_bg.png
new file mode 100644 (file)
index 0000000..1f60e1b
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_check_bg.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_check_bg_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_check_bg_press.png
new file mode 100644 (file)
index 0000000..bf665af
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_check_bg_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_check_checking.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_check_checking.png
new file mode 100644 (file)
index 0000000..4c64b01
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_check_checking.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_contacts_button_header.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_contacts_button_header.png
new file mode 100644 (file)
index 0000000..2046225
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_contacts_button_header.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_contacts_button_header_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_contacts_button_header_press.png
new file mode 100644 (file)
index 0000000..5c814b0
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_contacts_button_header_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_icon_cancel.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_icon_cancel.png
new file mode 100644 (file)
index 0000000..f244de0
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_icon_cancel.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_icon_cancel_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_icon_cancel_press.png
new file mode 100644 (file)
index 0000000..684bb8a
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_icon_cancel_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_list_process_01.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_list_process_01.png
new file mode 100644 (file)
index 0000000..5c8fbb4
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_list_process_01.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_messagebubble_bg_receive.9.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_messagebubble_bg_receive.9.png
new file mode 100644 (file)
index 0000000..a4a7863
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_messagebubble_bg_receive.9.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_messagebubble_bg_sent.9.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_messagebubble_bg_sent.9.png
new file mode 100644 (file)
index 0000000..73abadf
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_messagebubble_bg_sent.9.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_messagebubble_date_bg.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_messagebubble_date_bg.png
new file mode 100644 (file)
index 0000000..5399cb3
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_messagebubble_date_bg.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_page_indicator_01.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_page_indicator_01.png
new file mode 100644 (file)
index 0000000..c950e3b
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_page_indicator_01.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_page_indicator_02.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_page_indicator_02.png
new file mode 100644 (file)
index 0000000..0533e9d
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_page_indicator_02.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_progress_bar.9.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_progress_bar.9.png
new file mode 100644 (file)
index 0000000..43ff4a7
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_progress_bar.9.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_progress_bg.9.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_progress_bg.9.png
new file mode 100644 (file)
index 0000000..8d93e95
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_progress_bg.9.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_scroll_bar_handler.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_scroll_bar_handler.png
new file mode 100644 (file)
index 0000000..52ffbef
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_scroll_bar_handler.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_scroll_bar_handler_hor.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_scroll_bar_handler_hor.png
new file mode 100644 (file)
index 0000000..76a84a9
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/00_scroll_bar_handler_hor.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/ajax-loader.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/ajax-loader.png
new file mode 100644 (file)
index 0000000..811a2cd
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/ajax-loader.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_field_btn_clear.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_field_btn_clear.png
new file mode 100644 (file)
index 0000000..3adb29e
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_field_btn_clear.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_field_btn_clear_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_field_btn_clear_press.png
new file mode 100644 (file)
index 0000000..d17cca6
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_field_btn_clear_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_icon_favorite_off.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_icon_favorite_off.png
new file mode 100644 (file)
index 0000000..79a4f26
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_icon_favorite_off.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_icon_favorite_on.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_icon_favorite_on.png
new file mode 100644 (file)
index 0000000..3737ff7
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_icon_favorite_on.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_search_icon.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_search_icon.png
new file mode 100644 (file)
index 0000000..87e8b34
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_search_icon.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_01.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_01.png
new file mode 100644 (file)
index 0000000..cf4e136
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_01.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_01_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_01_press.png
new file mode 100644 (file)
index 0000000..5a6283c
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_01_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_02.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_02.png
new file mode 100644 (file)
index 0000000..139c428
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_02.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_02_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_02_press.png
new file mode 100644 (file)
index 0000000..9bacefd
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_brightness_02_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_01.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_01.png
new file mode 100644 (file)
index 0000000..5a50be3
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_01.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_01_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_01_press.png
new file mode 100644 (file)
index 0000000..79f1eb1
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_01_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_02.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_02.png
new file mode 100644 (file)
index 0000000..6c65736
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_02.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_02_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_02_press.png
new file mode 100644 (file)
index 0000000..567b91b
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_button_volume_02_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_handle.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_handle.png
new file mode 100644 (file)
index 0000000..c1c00bb
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_handle.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_handle_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_handle_press.png
new file mode 100644 (file)
index 0000000..3d5091c
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_handle_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_popup_bg.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_popup_bg.png
new file mode 100644 (file)
index 0000000..adb5342
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/00_slider_popup_bg.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_back.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_back.png
new file mode 100644 (file)
index 0000000..f87dcaf
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_back.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_back_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_back_press.png
new file mode 100644 (file)
index 0000000..9e5efd5
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_back_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_call.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_call.png
new file mode 100644 (file)
index 0000000..3b37c05
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_call.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_call_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_call_press.png
new file mode 100644 (file)
index 0000000..71828ba
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_call_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_check.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_check.png
new file mode 100644 (file)
index 0000000..309f3c8
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_check.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_check_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_check_press.png
new file mode 100644 (file)
index 0000000..edfb788
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_check_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_cancel.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_cancel.png
new file mode 100644 (file)
index 0000000..fede48b
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_cancel.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_cancel_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_cancel_press.png
new file mode 100644 (file)
index 0000000..d00f52d
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_cancel_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_closed.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_closed.png
new file mode 100644 (file)
index 0000000..f8eaefe
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_closed.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_closed_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_closed_press.png
new file mode 100644 (file)
index 0000000..8dfb3cf
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_closed_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_minus.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_minus.png
new file mode 100644 (file)
index 0000000..6fbfec9
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_minus.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_minus_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_minus_press.png
new file mode 100644 (file)
index 0000000..271efc6
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_minus_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_opened.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_opened.png
new file mode 100644 (file)
index 0000000..7c1859c
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_opened.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_opened_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_opened_press.png
new file mode 100644 (file)
index 0000000..4e4a824
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_opened_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_send.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_send.png
new file mode 100644 (file)
index 0000000..9d61de2
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_send.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_send_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_send_press.png
new file mode 100644 (file)
index 0000000..b3f5eb5
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_expand_send_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_gear.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_gear.png
new file mode 100644 (file)
index 0000000..74f3b23
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_gear.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_gear_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_gear_press.png
new file mode 100644 (file)
index 0000000..0026b1f
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_gear_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_grid.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_grid.png
new file mode 100644 (file)
index 0000000..39b2aea
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_grid.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_grid_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_grid_press.png
new file mode 100644 (file)
index 0000000..394834c
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_grid_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_home.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_home.png
new file mode 100644 (file)
index 0000000..0c34258
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_home.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_home_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_home_press.png
new file mode 100644 (file)
index 0000000..8cf6cc1
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_home_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_info.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_info.png
new file mode 100644 (file)
index 0000000..4b3d4aa
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_info.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_info_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_info_press.png
new file mode 100644 (file)
index 0000000..d64dba0
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_info_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_left.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_left.png
new file mode 100644 (file)
index 0000000..e149d2a
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_left.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_left_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_left_press.png
new file mode 100644 (file)
index 0000000..4021993
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_left_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_plus.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_plus.png
new file mode 100644 (file)
index 0000000..a0c3206
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_plus.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_plus_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_plus_press.png
new file mode 100644 (file)
index 0000000..e57d07a
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_plus_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_refresh.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_refresh.png
new file mode 100644 (file)
index 0000000..3233cda
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_refresh.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_refresh_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_refresh_press.png
new file mode 100644 (file)
index 0000000..a499929
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_refresh_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_rename.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_rename.png
new file mode 100644 (file)
index 0000000..4f35e3b
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_rename.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_rename_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_rename_press.png
new file mode 100644 (file)
index 0000000..0f28a7c
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_rename_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_right.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_right.png
new file mode 100644 (file)
index 0000000..72924f4
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_right.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_right_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_right_press.png
new file mode 100644 (file)
index 0000000..e8f70da
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_right_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_search.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_search.png
new file mode 100644 (file)
index 0000000..4b2a336
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_search.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_search_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_search_press.png
new file mode 100644 (file)
index 0000000..4545ea3
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_search_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_star.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_star.png
new file mode 100644 (file)
index 0000000..d3c5f18
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_star.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_star_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_star_press.png
new file mode 100644 (file)
index 0000000..460352d
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_star_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_warning.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_warning.png
new file mode 100644 (file)
index 0000000..f92e3c1
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_warning.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_warning_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_warning_press.png
new file mode 100644 (file)
index 0000000..86300bb
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_button_warning_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump.png
new file mode 100644 (file)
index 0000000..4bc978a
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump_left.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump_left.png
new file mode 100644 (file)
index 0000000..d02b92d
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump_left.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump_left_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump_left_press.png
new file mode 100644 (file)
index 0000000..1ecc0de
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump_left_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump_press.png
new file mode 100644 (file)
index 0000000..26f5e4f
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/controls/button/00_icon_jump_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_Back.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_Back.png
new file mode 100644 (file)
index 0000000..4326148
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_Back.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_Back_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_Back_press.png
new file mode 100644 (file)
index 0000000..e13f5a4
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_Back_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_edit.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_edit.png
new file mode 100644 (file)
index 0000000..3faa47d
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_edit.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_edit_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_edit_press.png
new file mode 100644 (file)
index 0000000..1ca9b52
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_edit_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_more.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_more.png
new file mode 100644 (file)
index 0000000..7cade58
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_more.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_more_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_more_press.png
new file mode 100644 (file)
index 0000000..1b35166
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_more_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_plus.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_plus.png
new file mode 100644 (file)
index 0000000..e3aee60
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_plus.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_plus_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_plus_press.png
new file mode 100644 (file)
index 0000000..7ce2633
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_icon_plus_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_toolbar_button_bg.9.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_toolbar_button_bg.9.png
new file mode 100644 (file)
index 0000000..c909caf
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_toolbar_button_bg.9.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_toolbar_button_bg.9_press.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_toolbar_button_bg.9_press.png
new file mode 100644 (file)
index 0000000..5e6d4ba
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_toolbar_button_bg.9_press.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_toolbar_button_ef.9.png b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_toolbar_button_ef.9.png
new file mode 100644 (file)
index 0000000..c52cb9a
Binary files /dev/null and b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/images/page/00_toolbar_button_ef.9.png differ
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/theme.js b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/theme.js
new file mode 100644 (file)
index 0000000..1a40465
--- /dev/null
@@ -0,0 +1,70 @@
+(function( $, undefined ) {
+//$.mobile.page.prototype.options.backBtnTheme = "s";
+
+// Clear default theme for child elements
+$( function ( o ) {
+       o.headerTheme = "s";
+       o.footerTheme = "s";
+} ( $.mobile.page.prototype.options ) );
+
+// clear listview
+( function ( o ) {
+       o.theme = "s";
+       o.countTheme = "s";
+       o.headerTheme = "s";
+       o.dividerTheme = "s";
+       o.splitTheme = "s";
+} ( $.mobile.listview.prototype.options ) );
+
+// Collapsible
+( function ( o ) {
+       o.heading = o.heading + ',li';          // Add listitem as a heading
+       o.inset = false;
+       o.iconPos = "right";    // Move iconPos to right position
+       o.collapsedIcon = "arrow-u";
+       o.expandedIcon = "arrow-d";
+       o.animation = true;
+       o.customEventHandler = function ( isCollapse ) {
+               var self = this,
+                       c = $(self).children('.ui-collapsible-content')[0];
+
+               function _getHeight( el ) {
+                       var h = 0,
+                               heading = $( el ).children('.ui-collapsible-heading')[0],
+                               content = $( el ).children('.ui-collapsible-content')[0];
+
+                       h += heading.clientHeight;
+                       $( content ).children().each ( function ( idx, _el ) {
+                               if ( $( _el ).hasClass( 'ui-collapsible' ) ) {  // recursive call for nested collapsible list
+                                       h += _getHeight( _el );
+
+                               } else {
+                                       h += _el.clientHeight;
+                               }
+                       } );
+                       return h;
+               }
+
+               if ( isCollapse ) {
+                       $( c ).data( 'max-height', _getHeight( self ) );
+               } else {
+                       if ( ! $( c ).data( 'max-height' ) ) {
+                               $( c ).data( 'max-height', document.body.clientHeight );
+                       }
+                       $( c ).css( 'max-height', $( c ).data( 'max-height' ) );
+               }
+       };
+} ( $.mobile.collapsible.prototype.options ) );
+
+//clear button theme
+$.mobile.button.prototype.options.theme = "s";
+$.fn.buttonMarkup.defaults.theme = "s";
+
+// Default theme swatch
+$.mobile.page.prototype.options.theme = "s";
+
+// Original scale of the theme
+$.tizen.frameworkData.defaultViewportWidth = 360;      // Fit to device-width
+$.tizen.frameworkData.defaultFontSize = 22;
+
+})(jQuery);
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/tizen-web-ui-fw-theme.css b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/tizen-web-ui-fw-theme.css
new file mode 100644 (file)
index 0000000..c627083
--- /dev/null
@@ -0,0 +1,15791 @@
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+/***************************************************************************
+                    Header / Footer
+                    NavigationBar
+***************************************************************************/
+.ui-bar-s {
+  border: none;
+  background: #f8f6ef;
+  color: #3b73b6;
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: bold;
+  font-size: 1.2727272727272727rem;
+}
+.ui-bar-s .ui-link-inherit {
+  color: #3b73b6;
+}
+.ui-bar-s > .ui-btn.ui-btn-back {
+  background: transparent;
+  position: absolute;
+  right: 0px;
+}
+.ui-bar-s > .ui-btn.ui-btn-back .ui-icon-header-back-btn {
+  top: 0.36363636363636365rem;
+  left: auto;
+  right: 0.5909090909090909rem;
+  margin-top: 0px;
+}
+/* Header style */
+.ui-header.ui-bar-s {
+  position: fixed;
+  top: 0px;
+  min-height: 2.5rem;
+  /* header button position : need to press area more... */
+
+}
+.ui-header.ui-bar-s .ui-title {
+  display: inline-block;
+  color: #3b73b6;
+  min-height: 1.2727272727272727rem;
+  max-height: 1.5454545454545454rem;
+  /* temporary UX strange */
+
+  font-size: 1.2727272727272727rem;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+  outline: 0 !important;
+  text-align: left;
+  margin: 0.7272727272727273rem 0.36363636363636365rem 0.2272727272727273rem 0.36363636363636365rem;
+}
+.ui-header.ui-bar-s > .ui-btn .ui-btn-inner.ui-btn-icon-only .ui-icon {
+  left: 0px;
+  top: 0px;
+  margin-top: 0px;
+}
+.ui-header.ui-bar-s > .ui-btn.ui-btn-back {
+  right: 0.5909090909090909rem;
+}
+.ui-header.ui-bar-s img {
+  display: inline-block;
+  height: 0.7272727272727273rem;
+  width: 0.7272727272727273rem;
+  margin-left: 0.36363636363636365rem;
+}
+.ui-header.ui-bar-s .ui-title-text-sub {
+  position: absolute;
+  top: 1.6363636363636365rem;
+  left: 0.36363636363636365rem;
+  font-size: 0.5454545454545454rem;
+}
+.ui-header.ui-bar-s .ui-title-text-sub img {
+  height: 0.7272727272727273rem;
+  width: 0.7272727272727273rem;
+  margin-left: 0.36363636363636365rem;
+}
+.ui-header.ui-bar-s > .ui-btn {
+  position: absolute;
+  top: 0.7272727272727273rem;
+  margin-top: 0px;
+  height: 1.5454545454545454rem;
+  width: 1.5454545454545454rem;
+  background: transparent;
+  color: #3a3a3a;
+}
+.ui-header.ui-bar-s.ui-title-tabbar > .ui-btn {
+  top: 0.36363636363636365rem;
+}
+.ui-header.ui-bar-s > .ui-btn.ui-btn-icon_only {
+  -o-border-radius: 0px;
+  -ms-border-radius: 0px;
+  -moz-border-radius: 0px;
+  -webkit-border-radius: 0px;
+  border-radius: 0px;
+}
+.ui-header.ui-bar-s > .ui-btn:nth-child(2) {
+  right: 0.5909090909090909rem;
+}
+.ui-header.ui-bar-s > .ui-btn:nth-child(3) {
+  right: 2.5454545454545454rem;
+}
+.ui-header.ui-bar-s > img + h1 + .ui-btn:nth-child(3) {
+  right: 0.5909090909090909rem;
+}
+.ui-header.ui-bar-s > img + h1 + .ui-btn:nth-child(3) + .ui-btn {
+  right: 2.5454545454545454rem;
+}
+.ui-header.ui-bar-s > img + h1 + span.ui-title-text-sub + .ui-btn:nth-child(4) {
+  right: 0.5rem;
+}
+.ui-header.ui-bar-s > img + h1 + span.ui-title-text-sub + .ui-btn:nth-child(4) + .ui-btn {
+  right: 2.6363636363636362rem;
+}
+.ui-header.ui-bar-s > .ui-btn.ui-btn-down-s {
+  background: rgba(64, 147, 247, 0.1);
+  color: #3b73b6;
+}
+.ui-header.ui-bar-s.ui-title-multiline .ui-title {
+  min-height: 1.0909090909090908rem;
+  max-height: 1.0909090909090908rem;
+  /* temporary UX strange */
+
+  font-size: 1rem;
+  margin: 0.4090909090909091rem 0.36363636363636365rem 1rem 0.36363636363636365rem;
+}
+.ui-footer.ui-bar-s {
+  height: 2.2272727272727275rem;
+  text-align: center;
+  bottom: 0px;
+}
+.ui-footer.ui-bar-s > .ui-btn.ui-btn-back, .ui-footer.ui-bar-s > [data-icon="naviframe-more"] {
+  background: transparent;
+}
+.ui-footer.ui-bar-s > .ui-btn.ui-btn-back > .ui-btn-icon-only, .ui-footer.ui-bar-s > [data-icon="naviframe-more"] > .ui-btn-icon-only {
+  width: 2.5454545454545454rem;
+  height: 2.2272727272727275rem;
+  padding: 0px;
+  -webkit-box-shadow: none /* temp code */
+;
+}
+.ui-footer.ui-bar-s [data-icon="naviframe-more"] {
+  position: absolute;
+  left: 0rem;
+  top: 0rem;
+  box-shadow: none;
+  border-width: 0px;
+}
+.ui-footer.ui-bar-s [data-icon="naviframe-more"] .ui-icon-naviframe-more {
+  left: 0.5909090909090909rem;
+  top: 0.36363636363636365rem;
+  margin-top: 0px;
+}
+.ui-footer.ui-bar-s [data-icon="naviframe-more"] .ui-btn-inner {
+  border: none;
+  background: transparent;
+  box-shadow: none;
+}
+.ui-footer.ui-bar-s > [data-role="button"] {
+  font-size: 0.6818181818181819rem;
+  font-weight: bold;
+  color: #999999;
+}
+.ui-footer.ui-bar-s [data-role="controlgroup"] {
+  margin-left: auto;
+  margin-right: auto;
+  margin-top: 0.2727272727272727rem;
+  /* temp value */
+
+  margin-bottom: 0.2727272727272727rem;
+  /* temp value */
+
+  padding-left: 2.6363636363636362rem;
+  padding-right: 2.6363636363636362rem;
+}
+.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"] {
+  background: transparent;
+  min-width: 3.5rem;
+  border-style: solid;
+  border-color: #c0c0c0;
+  border-top-width: 0px;
+  border-bottom-width: 0px;
+  border-left-width: 1px;
+  border-right-width: 1px;
+  border-radius: 0px;
+  box-shadow: none;
+  padding: 0px;
+  margin-left: -0.18181818181818182rem;
+  margin-right: -0.2272727272727273rem;
+}
+.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"].ui-btn-down-s .ui-btn-inner, .ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"] .ui-btn-active-s .ui-btn-inner {
+  background: #f8f6ef;
+}
+.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"].ui-btn-down-s .ui-btn-inner .ui-btn-text, .ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"] .ui-btn-active-s .ui-btn-inner .ui-btn-text {
+  color: #3b73b6;
+}
+.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"] > .ui-btn-inner {
+  border: 0px solid;
+  box-shadow: none;
+}
+.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"] .ui-btn-text {
+  font-size: 0.7727272727272727rem;
+  color: #3a3a3a;
+}
+.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"].ui-corner-right {
+  border-right-width: 0px;
+}
+.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"].ui-corner-left {
+  border-left-width: 0px;
+}
+.ui-footer.ui-bar-s > [data-role="button"]:not([data-icon="naviframe-more"]) {
+  top: 0.2727272727272727rem;
+}
+.ui-footer.ui-bar-s > p {
+  margin-top: 0.36363636363636365rem;
+  margin-bottom: 0.36363636363636365rem;
+}
+.ui-footer.ui-bar-s > h1,
+.ui-footer.ui-bar-s h2,
+.ui-footer.ui-bar-s h3,
+.ui-footer.ui-bar-s h4,
+.ui-footer.ui-bar-s h5,
+.ui-footer.ui-bar-s h6 {
+  display: inline-block;
+}
+/***************************************************************************
+                    Content Top calculate
+***************************************************************************/
+.ui-content {
+  position: relative;
+  top: 0;
+}
+/***************************************************************************
+                    Content Top calculate
+***************************************************************************/
+.ui-body-s {
+  border: 1px solid #2a2a2a;
+  background: #f8f6ef;
+  color: #000000;
+  font-weight: normal;
+  font-family: Helvetica, Arial, sans-serif;
+}
+.ui-body-s .ui-link-inherit {
+  color: #fff;
+}
+.ui-body-s .ui-link {
+  /* ui-body-link */
+
+  color: #2489CE;
+  font-weight: bold;
+}
+.ui-body-s .ui-link:hover {
+  color: #2489CE;
+}
+.ui-body-s .ui-link:active {
+  color: #2489CE;
+}
+.ui-body-s .ui-link:visited {
+  color: #2489CE;
+}
+.ui-btn-box-s {
+  padding: 0.045454545454545456rem;
+}
+.ui-btn-box-s.ui-btn-up-s {
+  color: #363133;
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+  -o-border-radius: 0.3rem;
+  -ms-border-radius: 0.3rem;
+  -moz-border-radius: 0.3rem;
+  -webkit-border-radius: 0.3rem;
+  border-radius: 0.3rem;
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.ui-btn.ui-btn-corner-all .ui-btn-box-s.ui-btn-up-s {
+  -o-border-radius: 1.2rem;
+  -ms-border-radius: 1.2rem;
+  -moz-border-radius: 1.2rem;
+  -webkit-border-radius: 1.2rem;
+  border-radius: 1.2rem;
+}
+.ui-btn-box-s .ui-btn-inner {
+  border: 1px solid;
+  border-color: #c7c5be;
+  -o-border-radius: 0.3rem;
+  -ms-border-radius: 0.3rem;
+  -moz-border-radius: 0.3rem;
+  -webkit-border-radius: 0.3rem;
+  border-radius: 0.3rem;
+  -o-box-sizing: border-box;
+  -ms-box-sizing: border-box;
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+  height: 100%;
+}
+.ui-btn.ui-btn-corner-all.ui-btn-box-s .ui-btn-inner {
+  -o-border-radius: 1.2rem;
+  -ms-border-radius: 1.2rem;
+  -moz-border-radius: 1.2rem;
+  -webkit-border-radius: 1.2rem;
+  border-radius: 1.2rem;
+}
+.ui-ctxpopup .ui-btn-box-s.ui-btn-up-s, .ui-ctxpopup .ui-btn-box-s.ui-btn-hover-s {
+  background: transparent !important;
+  border: none;
+  box-shadow: none;
+  padding: 0;
+  color: white !important;
+}
+.ui-ctxpopup .ui-btn-box-s.ui-btn-down-s {
+  background: #3b73b6 !important;
+  border: none;
+  box-shadow: none;
+  padding: 0;
+  color: white !important;
+  -o-border-radius: 0;
+  -ms-border-radius: 0;
+  -moz-border-radius: 0;
+  -webkit-border-radius: 0;
+  border-radius: 0;
+}
+.ui-ctxpopup .ui-btn-box-s .ui-btn-inner {
+  background: transparent ! important;
+  box-shadow: none;
+  border: none;
+}
+.ui-ctxpopup .ui-btn-down-s {
+  background: #3b73b6 !important;
+}
+.ui-header .ui-btn-box-s,
+.ui-footer .ui-btn-box-s,
+.ui-btn-back.ui-btn-up-s,
+.ui-btn-back.ui-btn-hover-s,
+.ui-btn-back.ui-btn-down-s,
+.ui-popup-container .ui-btn-box-s {
+  font-weight: normal;
+  -o-border-radius: 0.9 rem;
+  -ms-border-radius: 0.9 rem;
+  -moz-border-radius: 0.9 rem;
+  -webkit-border-radius: 0.9 rem;
+  border-radius: 0.9 rem;
+}
+.ui-btn-box-s.ui-btn-hover-s {
+  color: #363133;
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+  -o-border-radius: 0.3em ! important;
+  -ms-border-radius: 0.3em ! important;
+  -moz-border-radius: 0.3em ! important;
+  -webkit-border-radius: 0.3em ! important;
+  border-radius: 0.3em ! important;
+}
+.ui-btn-box-s.ui-btn-hover-s.ui-btn-corner-circle {
+  -o-border-radius: 1em ! important;
+  -ms-border-radius: 1em ! important;
+  -moz-border-radius: 1em ! important;
+  -webkit-border-radius: 1em ! important;
+  border-radius: 1em ! important;
+}
+.ui-btn-box-s.ui-btn-hover-s.ui-btn-corner-all {
+  -o-border-radius: 1.2em ! important;
+  -ms-border-radius: 1.2em ! important;
+  -moz-border-radius: 1.2em ! important;
+  -webkit-border-radius: 1.2em ! important;
+  border-radius: 1.2em ! important;
+}
+.ui-btn-box-s.ui-btn-hover-s.ui-btn-round {
+  -o-border-radius: 1.2em ! important;
+  -ms-border-radius: 1.2em ! important;
+  -moz-border-radius: 1.2em ! important;
+  -webkit-border-radius: 1.2em ! important;
+  border-radius: 1.2em ! important;
+}
+.ui-btn-box-s.ui-btn-down-s .ui-btn-inner {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.ui-btn-up-s, .ui-btn-hover-s, .ui-btn-down-s {
+  font-family: Helvetica, Arial, sans-serif;
+  text-decoration: none;
+}
+/*
+/* Structure */
+/* links within "buttons" 
+-----------------------------------------------------------------------------------------------------------*/
+a.ui-link-inherit {
+  text-decoration: none !important;
+}
+/* Active class used as the "on" state across all themes
+-----------------------------------------------------------------------------------------------------------*/
+/* button default color for active state */
+.ui-btn-active {
+  /* global-active */
+
+  color: #363133;
+  cursor: pointer;
+  text-decoration: none;
+  background: #3b73b6;
+  outline: none;
+}
+.ui-btn-active a.ui-link-inherit {
+  color: #363133;
+}
+/* button inner top highlight
+-----------------------------------------------------------------------------------------------------------*/
+/* corner rounding classes
+-----------------------------------------------------------------------------------------------------------*/
+.ui-corner-tl {
+  -moz-border-radius-topleft: 0.3em;
+  -webkit-border-top-left-radius: 0.3em;
+  border-top-left-radius: 0.3em;
+}
+.ui-corner-tr {
+  -moz-border-radius-topright: 0.3em;
+  -webkit-border-top-right-radius: 0.3em;
+  border-top-right-radius: 0.3em;
+}
+.ui-corner-bl {
+  -moz-border-radius-bottomleft: 0.3em;
+  -webkit-border-bottom-left-radius: 0.3em;
+  border-bottom-left-radius: 0.3em;
+}
+.ui-corner-br {
+  -moz-border-radius-bottomright: 0.3em;
+  -webkit-border-bottom-right-radius: 0.3em;
+  border-bottom-right-radius: 0.3em;
+}
+.ui-corner-top {
+  -moz-border-radius-topleft: 0.3em;
+  -webkit-border-top-left-radius: 0.3em;
+  border-top-left-radius: 0.3em;
+  -moz-border-radius-topright: 0.3em;
+  -webkit-border-top-right-radius: 0.3em;
+  border-top-right-radius: 0.3em;
+}
+.ui-corner-bottom {
+  -moz-border-radius-bottomleft: 0.3em;
+  -webkit-border-bottom-left-radius: 0.3em;
+  border-bottom-left-radius: 0.3em;
+  -moz-border-radius-bottomright: 0.3em;
+  -webkit-border-bottom-right-radius: 0.3em;
+  border-bottom-right-radius: 0.3em;
+}
+.ui-corner-right {
+  -moz-border-radius-topright: 0.3em;
+  -webkit-border-top-right-radius: 0.3em;
+  border-top-right-radius: 0.3em;
+  -moz-border-radius-bottomright: 0.3em;
+  -webkit-border-bottom-right-radius: 0.3em;
+  border-bottom-right-radius: 0.3em;
+}
+.ui-corner-left {
+  -moz-border-radius-topleft: 0.3em;
+  -webkit-border-top-left-radius: 0.3em;
+  border-top-left-radius: 0.3em;
+  -moz-border-radius-bottomleft: 0.3em;
+  -webkit-border-bottom-left-radius: 0.3em;
+  border-bottom-left-radius: 0.3em;
+}
+.ui-corner-none {
+  -o-border-radius: 0;
+  -ms-border-radius: 0;
+  -moz-border-radius: 0;
+  -webkit-border-radius: 0;
+  border-radius: 0;
+}
+/*************************************************************************** 
+                    Icon (Naviframe)
+***************************************************************************/
+.ui-header .ui-btn .ui-btn-icon-only .ui-icon, .ui-footer .ui-btn .ui-btn-icon-only .ui-icon {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+}
+.ui-btn-back .ui-btn-inner .ui-icon-header-back-btn {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+}
+.ui-btn-up-s {
+  /* FIXME : check ux if it needs to be deprecated... */
+
+}
+.ui-btn-up-s .ui-icon-header-back-btn {
+  background-image: url(images/page/00_icon_Back.png);
+}
+.ui-btn-up-s .ui-icon-naviframe-more {
+  background-image: url(images/page/00_icon_more.png);
+}
+.ui-btn-up-s .ui-icon-naviframe-cancel {
+  background-image: url(images/00_icon_cancel.png);
+}
+.ui-btn-up-s .ui-icon-naviframe-edit {
+  background-image: url(images/page/00_icon_edit.png);
+}
+.ui-btn-up-s .ui-icon-naviframe-plus {
+  background-image: url(images/page/00_icon_plus.png);
+}
+.ui-btn-down-s, .ui-btn-hover-s {
+  /* FIXME: check ux if it needs to be deprecated.. */
+
+}
+.ui-btn-down-s .ui-icon-header-back-btn, .ui-btn-hover-s .ui-icon-header-back-btn {
+  background-image: url(images/page/00_icon_Back_press.png);
+}
+.ui-btn-down-s .ui-icon-naviframe-more, .ui-btn-hover-s .ui-icon-naviframe-more {
+  background-image: url(images/page/00_icon_more_press.png);
+}
+.ui-btn-down-s .ui-icon-naviframe-cancel, .ui-btn-hover-s .ui-icon-naviframe-cancel {
+  background-image: url(images/00_icon_cancel_press.png);
+}
+.ui-btn-down-s .ui-icon-naviframe-edit, .ui-btn-hover-s .ui-icon-naviframe-edit {
+  background-image: url(images/page/00_icon_edit_press.png);
+}
+.ui-btn-down-s .ui-icon-naviframe-plus, .ui-btn-hover-s .ui-icon-naviframe-plus {
+  background-image: url(images/page/00_icon_plus_press.png);
+}
+/* Interaction cues
+-----------------------------------------------------------------------------------------------------------*/
+.ui-disabled {
+  filter: alpha(opacity=30);
+  opacity: .3;
+  zoom: 1;
+}
+.ui-disabled, .ui-disabled a {
+  cursor: default !important;
+  pointer-events: none;
+}
+/*
+* jQuery Mobile Framework
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+*/
+/*** less definitions ***/
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+/************************/
+/* some unsets - more probably needed */
+.ui-mobile, .ui-mobile body {
+  height: 100%;
+  font-size: 22px;
+}
+.ui-mobile fieldset, .ui-page {
+  padding: 0;
+  margin: 0;
+}
+.ui-mobile a img, .ui-mobile fieldset {
+  border: 0;
+}
+/* responsive page widths */
+.ui-mobile-viewport {
+  margin: 0;
+  overflow-x: hidden;
+  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+/* "page" containers - full-screen views, one should always be in view post-pageload */
+.ui-mobile [data-role=page], .ui-mobile [data-role=dialog], .ui-page {
+  top: 0;
+  left: 0;
+  width: 100%;
+  min-height: 100%;
+  position: absolute;
+  display: none;
+  border: 0;
+}
+.ui-mobile .ui-page-active {
+  display: block;
+  overflow: visible;
+}
+/* on ios4, setting focus on the page element causes flashing during transitions when there is an outline, so we turn off outlines */
+.ui-page {
+  outline: none;
+}
+.ui-mobile, .ui-mobile .ui-page {
+  background: #f8f6ef;
+  color: #000000;
+}
+/* native overflow scrolling */
+.ui-page.ui-mobile-touch-overflow, .ui-mobile-touch-overflow.ui-native-fixed .ui-content {
+  overflow: auto;
+  height: 100%;
+  -webkit-overflow-scrolling: touch;
+  -moz-overflow-scrolling: touch;
+  -o-overflow-scrolling: touch;
+  -ms-overflow-scrolling: touch;
+  overflow-scrolling: touch;
+}
+.ui-page.ui-mobile-touch-overflow, .ui-page.ui-mobile-touch-overflow * {
+  /* some level of transform keeps elements from blinking out of visibility on iOS */
+
+  transform: rotatey(0);
+  -ms-transform: rotatey(0);
+  -moz-transform: rotatey(0);
+  -webkit-transform: rotatey(0);
+  -o-transform: rotatey(0);
+}
+.ui-page.ui-mobile-pre-transition {
+  display: block;
+}
+/* loading screen */
+.ui-loading .ui-mobile-viewport {
+  overflow: hidden !important;
+}
+.ui-loading .ui-loader {
+  display: block;
+}
+.ui-loading .ui-page {
+  overflow: hidden;
+}
+.ui-loader {
+  display: none;
+  position: absolute;
+  opacity: .85;
+  z-index: 100;
+  left: 50%;
+  width: 200px;
+  margin-left: -130px;
+  margin-top: -35px;
+  padding: 10px 30px;
+}
+.ui-loader h1 {
+  font-size: 1.4545454545454546rem;
+  text-align: center;
+}
+.ui-loader .ui-icon {
+  position: static;
+  display: block;
+  opacity: .9;
+  margin: 0 auto;
+  width: 35px;
+  height: 35px;
+  background-color: transparent;
+}
+.ui-blocker {
+  width: 100%;
+  height: 100%;
+  z-index: 2147483647;
+}
+/*fouc*/
+.ui-mobile-rendering > * {
+  visibility: hidden;
+}
+/*headers, content panels*/
+.ui-bar, .ui-body {
+  position: relative;
+  padding: .4em 15px;
+  overflow: hidden;
+  display: block;
+  clear: both;
+}
+.ui-bar {
+  font-size: 16px;
+  margin: 0;
+}
+.ui-bar h1,
+.ui-bar h2,
+.ui-bar h3,
+.ui-bar h4,
+.ui-bar h5,
+.ui-bar h6 {
+  margin: 0;
+  padding: 0;
+  font-size: 16px;
+  display: inline-block;
+}
+.ui-header, .ui-footer {
+  display: block;
+}
+.ui-page .ui-header, .ui-page .ui-footer {
+  position: fixed;
+  /*position: relative;*/
+  z-index: 1000;
+}
+/* Title button packing order */
+.ui-header .ui-btn-left {
+  top: .4em;
+  float: left;
+}
+.ui-header .ui-btn-right {
+  float: right;
+  top: .4em;
+}
+.ui-header .ui-title, .ui-footer .ui-title {
+  min-height: 1.1em;
+  text-align: center;
+  font-size: 16px;
+  display: block;
+  margin: .6em 90px .8em;
+  padding: 0;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+  outline: 0 !important;
+}
+/*content area*/
+.ui-content {
+  border-width: 0;
+  overflow: visible;
+  overflow-x: hidden;
+  padding: 15px;
+}
+.ui-page-fullscreen .ui-content {
+  padding: 0;
+}
+/* native fixed headers and footers */
+.ui-mobile-touch-overflow.ui-page.ui-native-fixed, .ui-mobile-touch-overflow.ui-page.ui-native-fullscreen {
+  overflow: visible;
+}
+.ui-mobile-touch-overflow.ui-native-fixed .ui-header, .ui-mobile-touch-overflow.ui-native-fixed .ui-footer {
+  position: fixed;
+  left: 0;
+  right: 0;
+  top: 0;
+  z-index: 200;
+}
+.ui-mobile-touch-overflow.ui-page.ui-native-fixed .ui-footer {
+  top: auto;
+  bottom: 0;
+}
+.ui-mobile-touch-overflow.ui-native-fixed .ui-content {
+  padding-top: 2.5em;
+  padding-bottom: 3em;
+  top: 0;
+  bottom: 0;
+  height: auto;
+  position: absolute;
+}
+.ui-mobile-touch-overflow.ui-native-fullscreen .ui-content {
+  padding-top: 0;
+  padding-bottom: 0;
+}
+.ui-mobile-touch-overflow.ui-native-fullscreen .ui-header, .ui-mobile-touch-overflow.ui-native-fullscreen .ui-footer {
+  opacity: .9;
+}
+.ui-native-bars-hidden {
+  display: none;
+}
+/* icons sizing */
+.ui-icon {
+  width: 18px;
+  height: 18px;
+}
+/* fullscreen class on ui-content div */
+.ui-fullscreen img {
+  max-width: 100%;
+}
+/* non-js content hiding */
+.ui-nojs {
+  position: absolute;
+  left: -9999px;
+}
+/* Transitions originally inspired by those from jQtouch, nice work, folks */
+.ui-mobile-viewport-transitioning,
+.ui-mobile-viewport-transitioning .ui-page {
+       width: 100%;
+       height: 100%;
+       overflow: hidden;
+}
+
+.in {
+       -ms-animation-timing-function: ease-out;
+        -ms-animation-duration: 350ms;
+       -o-animation-timing-function: ease-out;
+        -o-animation-duration: 350ms;
+       -webkit-animation-timing-function: ease-out;
+       -webkit-animation-duration: 350ms;
+       -moz-animation-timing-function: ease-out;
+       -moz-animation-duration: 350ms;
+}
+
+.out {
+       -ms-animation-timing-function: ease-in;
+        -ms-animation-duration: 225ms;
+        -o-animation-timing-function: ease-in;
+        -o-animation-duration: 225;
+       -webkit-animation-timing-function: ease-in;
+       -webkit-animation-duration: 225ms;
+       -moz-animation-timing-function: ease-in;
+       -moz-animation-duration: 225;
+}
+
+
+/* fade */
+
+@-webkit-keyframes fadein {
+    from { opacity: 0; }
+    to { opacity: 1; }
+}
+
+@-moz-keyframes fadein {
+    from { opacity: 0; }
+    to { opacity: 1; }
+}
+
+@-webkit-keyframes fadeout {
+    from { opacity: 1; }
+    to { opacity: 0; }
+}
+
+@-moz-keyframes fadeout {
+    from { opacity: 1; }
+    to { opacity: 0; }
+}
+
+.fade.out {
+       opacity: 0;
+       -ms-animation-duration: 125ms;
+        -ms-animation-name: fadeout;
+        -o-animation-duration: 125ms;
+        -o-animation-name: fadeout;
+       -webkit-animation-duration: 125ms;
+       -webkit-animation-name: fadeout;
+       -moz-animation-duration: 125ms;
+       -moz-animation-name: fadeout;
+}
+
+.fade.in {
+       opacity: 1;
+       -ms-animation-duration: 225ms;
+        -ms-animation-name: fadein;
+        -o-animation-duration: 225ms;
+        -o-animation-name: fadein;
+       -webkit-animation-duration: 225ms;
+       -webkit-animation-name: fadein;
+       -moz-animation-duration: 225ms;
+       -moz-animation-name: fadein;
+}
+
+
+/* flip */
+
+/* The properties in this rule are only necessary for the 'flip' transition.
+ * We need specify the perspective to create a projection matrix. This will add
+ * some depth as the element flips. The depth number represents the distance of
+ * the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate
+ * value.
+ */
+
+.viewport-flip {
+       -ms-perspective: 1000;
+       -o-perspective: 1000;
+       -webkit-perspective: 1000;
+       -moz-perspective: 1000;
+       position: absolute;
+}
+.flip {
+       -webkit-backface-visibility:hidden;
+       -webkit-transform:translate3d(0, 0, 0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */
+       -moz-backface-visibility:hidden;
+       -moz-transform:translate3d(0, 0, 0);
+}
+
+.flip.out {
+       -webkit-transform: rotateY(-90deg) scale(.9);
+       -webkit-animation-name: flipouttoleft;
+       -webkit-animation-duration: 175ms;
+       -moz-transform: rotateY(-90deg) scale(.9);
+       -moz-animation-name: flipouttoleft;
+       -moz-animation-duration: 175ms;
+}
+
+.flip.in {
+       -webkit-animation-name: flipintoright;
+       -webkit-animation-duration: 225ms;
+       -moz-animation-name: flipintoright;
+       -moz-animation-duration: 225ms;
+}
+
+.flip.out.reverse {
+       -webkit-transform: rotateY(90deg) scale(.9);
+       -webkit-animation-name: flipouttoright;
+       -moz-transform: rotateY(90deg) scale(.9);
+       -moz-animation-name: flipouttoright;
+}
+
+.flip.in.reverse {
+       -webkit-animation-name: flipintoleft;
+       -moz-animation-name: flipintoleft;
+}
+
+@-webkit-keyframes flipouttoleft {
+    from { -webkit-transform: rotateY(0); }
+    to { -webkit-transform: rotateY(-90deg) scale(.9); }
+}
+@-moz-keyframes flipouttoleft {
+    from { -moz-transform: rotateY(0); }
+    to { -moz-transform: rotateY(-90deg) scale(.9); }
+}
+@-webkit-keyframes flipouttoright {
+    from { -webkit-transform: rotateY(0) ; }
+    to { -webkit-transform: rotateY(90deg) scale(.9); }
+}
+@-moz-keyframes flipouttoright {
+    from { -moz-transform: rotateY(0); }
+    to { -moz-transform: rotateY(90deg) scale(.9); }
+}
+@-webkit-keyframes flipintoleft {
+    from { -webkit-transform: rotateY(-90deg) scale(.9); }
+    to { -webkit-transform: rotateY(0); }
+}
+@-moz-keyframes flipintoleft {
+    from { -moz-transform: rotateY(-90deg) scale(.9); }
+    to { -moz-transform: rotateY(0); }
+}
+@-webkit-keyframes flipintoright {
+    from { -webkit-transform: rotateY(90deg) scale(.9); }
+    to { -webkit-transform: rotateY(0); }
+}
+@-moz-keyframes flipintoright {
+    from { -moz-transform: rotateY(90deg) scale(.9); }
+    to { -moz-transform: rotateY(0); }
+}
+
+
+/* flow transition */
+
+.flow {
+       -webkit-transform-origin: 50% 30%;
+       -moz-transform-origin: 50% 30%;
+       -webkit-box-shadow: 0 0 20px rgba(0,0,0,.4);
+       -moz-box-shadow: 0 0 20px rgba(0,0,0,.4);
+}
+.ui-dialog.flow {
+       -webkit-transform-origin: none;
+       -moz-transform-origin: none;
+       -webkit-box-shadow: none;
+       -moz-box-shadow: none;
+}
+.flow.out {
+       -webkit-transform: translate3d(-100%, 0, 0) scale(.7);
+       -webkit-animation-name: flowouttoleft;
+       -webkit-animation-timing-function: ease;
+       -webkit-animation-duration: 350ms;
+       -moz-transform: translate3d(-100%, 0, 0) scale(.7);
+       -moz-animation-name: flowouttoleft;
+       -moz-animation-timing-function: ease;
+       -moz-animation-duration: 350ms;
+}
+
+.flow.in {
+       -webkit-transform: translate3d(0, 0, 0) scale(1);
+       -webkit-animation-name: flowinfromright;
+       -webkit-animation-timing-function: ease;
+       -webkit-animation-duration: 350ms;
+       -moz-transform: translate3d(0, 0, 0) scale(1);
+       -moz-animation-name: flowinfromright;
+       -moz-animation-timing-function: ease;
+       -moz-animation-duration: 350ms;
+}
+
+.flow.out.reverse {
+       -webkit-transform: translate3d(100%, 0, 0);
+       -webkit-animation-name: flowouttoright;
+       -moz-transform: translate3d(100%, 0, 0);
+       -moz-animation-name: flowouttoright;
+}
+
+.flow.in.reverse {
+       -webkit-animation-name: flowinfromleft;
+       -moz-animation-name: flowinfromleft;
+}
+
+@-webkit-keyframes flowouttoleft {
+    0% { -webkit-transform: translate3d(0, 0, 0) scale(1); }
+       60%, 70% { -webkit-transform: translate3d(0, 0, 0) scale(.7); }
+    100% { -webkit-transform: translate3d(-100%, 0, 0) scale(.7); }
+}
+@-moz-keyframes flowouttoleft {
+    0% { -moz-transform: translate3d(0, 0, 0) scale(1); }
+       60%, 70% { -moz-transform: translate3d(0, 0, 0) scale(.7); }
+    100% { -moz-transform:  translateX(-100%) scale(.7); }
+}
+
+@-webkit-keyframes flowouttoright {
+    0% { -webkit-transform: translate3d(0, 0, 0) scale(1); }
+       60%, 70% { -webkit-transform: translate3d(0, 0, 0) scale(.7); }
+    100% { -webkit-transform:  translate3d(100%, 0, 0) scale(.7); }
+}
+@-moz-keyframes flowouttoright {
+    0% { -moz-transform: translate3d(0, 0, 0) scale(1); }
+       60%, 70% { -moz-transform: translate3d(0, 0, 0) scale(.7); }
+    100% { -moz-transform:  translate3d(100%, 0, 0) scale(.7); }
+}
+
+@-webkit-keyframes flowinfromleft {
+    0% { -webkit-transform: translate3d(-100%, 0, 0) scale(.7); }
+       30%, 40% { -webkit-transform: translate3d(0, 0, 0) scale(.7); }
+    100% { -webkit-transform: translate3d(0, 0, 0) scale(1); }
+}
+@-moz-keyframes flowinfromleft {
+    0% { -moz-transform: translate3d(-100%, 0, 0) scale(.7); }
+       30%, 40% { -moz-transform: translate3d(0, 0, 0) scale(.7); }
+    100% { -moz-transform: translate3d(0, 0, 0) scale(1); }
+}
+@-webkit-keyframes flowinfromright {
+    0% { -webkit-transform: translate3d(100%, 0, 0) scale(.7); }
+       30%, 40% { -webkit-transform: translate3d(0, 0, 0) scale(.7); }
+    100% { -webkit-transform: translate3d(0, 0, 0) scale(1); }
+}
+@-moz-keyframes flowinfromright {
+    0% { -moz-transform: translate3d(100%, 0, 0) scale(.7); }
+       30%, 40% { -moz-transform: translate3d(0, 0, 0) scale(.7); }
+    100% { -moz-transform: translate3d(0, 0, 0) scale(1); }
+}
+
+
+/* pop */
+
+.pop {
+       -webkit-transform-origin: 50% 50%;
+       -moz-transform-origin: 50% 50%;
+}
+
+.pop.in {
+       -webkit-transform: scale(1);
+       -moz-transform: scale(1);
+    opacity: 1;
+       -webkit-animation-name: popin;
+       -moz-animation-name: popin;
+       -webkit-animation-duration: 350ms;
+       -moz-animation-duration: 350ms;
+}
+
+.pop.out {
+       -webkit-animation-name: fadeout;
+       -moz-animation-name: fadeout;
+       opacity: 0;
+       -webkit-animation-duration: 100ms;
+       -moz-animation-duration: 100ms;
+}
+
+.pop.in.reverse {
+       -webkit-animation-name: fadein;
+       -moz-animation-name: fadein;
+}
+
+.pop.out.reverse {
+       -webkit-transform: scale(.8);
+       -moz-transform: scale(.8);
+       -webkit-animation-name: popout;
+       -moz-animation-name: popout;
+}
+
+@-webkit-keyframes popin {
+    from {
+        -webkit-transform: scale(.8);
+        opacity: 0;
+    }
+    to {
+        -webkit-transform: scale(1);
+        opacity: 1;
+    }
+}
+
+@-moz-keyframes popin {
+    from {
+        -moz-transform: scale(.8);
+        opacity: 0;
+    }
+    to {
+        -moz-transform: scale(1);
+        opacity: 1;
+    }
+}
+
+@-webkit-keyframes popout {
+    from {
+        -webkit-transform: scale(1);
+        opacity: 1;
+    }
+    to {
+        -webkit-transform: scale(.8);
+        opacity: 0;
+    }
+}
+
+@-moz-keyframes popout {
+    from {
+        -moz-transform: scale(1);
+        opacity: 1;
+    }
+    to {
+        -moz-transform: scale(.8);
+        opacity: 0;
+    }
+}
+
+
+/* slide */
+
+/* keyframes for slidein from sides */
+@-webkit-keyframes slideinfromright {
+    from { -webkit-transform: translate3d(100%, 0, 0); }
+    to { -webkit-transform: translate3d(0, 0, 0); }
+}
+@-moz-keyframes slideinfromright {
+    from { -moz-transform: translate3d(100%, 0, 0); }
+    to { -moz-transform: translate3d(0, 0, 0); }
+}
+
+@-webkit-keyframes slideinfromleft {
+    from { -webkit-transform: translate3d(-100%, 0, 0); }
+    to { -webkit-transform: translate3d(0, 0, 0); }
+}
+@-moz-keyframes slideinfromleft {
+    from { -moz-transform: translate3d(-100%, 0, 0); }
+    to { -moz-transform: translate3d(0, 0, 0); }
+}
+
+/* keyframes for slideout to sides */
+@-webkit-keyframes slideouttoleft {
+    from { -webkit-transform: translate3d(0, 0, 0); }
+    to { -webkit-transform: translate3d(-100%, 0, 0); }
+}
+@-moz-keyframes slideouttoleft {
+    from { -moz-transform: translate3d(0, 0, 0); }
+    to { -moz-transform: translate3d(-100%, 0, 0); }
+}
+
+@-webkit-keyframes slideouttoright {
+    from { -webkit-transform: translate3d(0, 0, 0); }
+    to { -webkit-transform: translate3d(100%, 0, 0); }
+}
+@-moz-keyframes slideouttoright {
+    from { -moz-transform: translate3d(0, 0, 0); }
+    to { -moz-transform: translate3d(100%, 0, 0); }
+}
+
+.slide.out, .slide.in {
+       -webkit-animation-timing-function: ease-out;
+       -webkit-animation-duration: 350ms;
+       -moz-animation-timing-function: ease-out;
+       -moz-animation-duration: 350ms;
+}
+.slide.out {
+       -webkit-transform: translate3d(-100%, 0, 0);
+       -webkit-animation-name: slideouttoleft;
+       -moz-transform: translate3d(-100%, 0, 0);
+       -moz-animation-name: slideouttoleft;
+}
+
+.slide.in {
+       -webkit-transform: translate3d(0, 0, 0);
+       -webkit-animation-name: slideinfromright;
+       -moz-transform: translate3d(0, 0, 0);
+       -moz-animation-name: slideinfromright;
+}
+
+.slide.out.reverse {
+       -webkit-transform: translate3d(100%, 0, 0);
+       -webkit-animation-name: slideouttoright;
+       -moz-transform: translate3d(100%, 0, 0);
+       -moz-animation-name: slideouttoright;
+}
+
+.slide.in.reverse {
+       -webkit-transform: translate3d(0, 0, 0);
+       -webkit-animation-name: slideinfromleft;
+       -moz-transform: translate3d(0, 0, 0);
+       -moz-animation-name: slideinfromleft;
+}
+
+/* slide down */
+
+.slidedown.out {
+       -webkit-animation-name: fadeout;
+       -moz-animation-name: fadeout;
+       -webkit-animation-duration: 100ms;
+       -moz-animation-duration: 100ms;
+}
+
+.slidedown.in {
+       -webkit-transform: translate3d(0, 0, 0);
+       -webkit-animation-name: slideinfromtop;
+       -moz-transform: translate3d(0, 0, 0);
+       -moz-animation-name: slideinfromtop;
+       -webkit-animation-duration: 250ms;
+       -moz-animation-duration: 250ms;
+}
+
+.slidedown.in.reverse {
+       -webkit-animation-name: fadein;
+       -moz-animation-name: fadein;
+       -webkit-animation-duration: 150ms;
+       -moz-animation-duration: 150ms;
+}
+
+.slidedown.out.reverse {
+       -webkit-transform: translate3d(0, -100%, 0);
+       -moz-transform: translate3d(0, -100%, 0);
+       -webkit-animation-name: slideouttotop;
+       -moz-animation-name: slideouttotop;
+       -webkit-animation-duration: 200ms;
+       -moz-animation-duration: 200ms;
+}
+
+@-webkit-keyframes slideinfromtop {
+    from { -webkit-transform: translate3d(0, -100%, 0); }
+    to { -webkit-transform: translate3d(0, 0, 0); }
+}
+@-moz-keyframes slideinfromtop {
+    from { -moz-transform: translate3d(0, -100%, 0); }
+    to { -moz-transform: translate3d(0, 0, 0); }
+}
+
+@-webkit-keyframes slideouttotop {
+    from { -webkit-transform: translate3d(0, 0, 0); }
+    to { -webkit-transform: translate3d(0, -100%, 0); }
+}
+@-moz-keyframes slideouttotop {
+    from { -moz-transform: translate3d(0, 0, 0); }
+    to { -moz-transform: translate3d(0, -100%, 0); }
+}
+
+/* slide up */
+
+.slideup.out {
+       -webkit-animation-name: fadeout;
+       -moz-animation-name: fadeout;
+       -webkit-animation-duration: 100ms;
+       -moz-animation-duration: 100ms;
+}
+
+.slideup.in {
+       -webkit-transform: translate3d(0, 0, 0);
+       -webkit-animation-name: slideinfrombottom;
+       -moz-transform: translate3d(0, 0, 0);
+       -moz-animation-name: slideinfrombottom;
+       -webkit-animation-duration: 250ms;
+       -moz-animation-duration: 250ms;
+}
+
+.slideup.in.reverse {
+       -webkit-animation-name: fadein;
+       -moz-animation-name: fadein;
+       -webkit-animation-duration: 150ms;
+       -moz-animation-duration: 150ms;
+}
+
+.slideup.out.reverse {
+       -webkit-transform: translate3d(0, 100%, 0);
+       -moz-transform: translate3d(0, 100%, 0);
+       -webkit-animation-name: slideouttobottom;
+       -moz-animation-name: slideouttobottom;
+       -webkit-animation-duration: 200ms;
+       -moz-animation-duration: 200ms;
+}
+
+@-webkit-keyframes slideinfrombottom {
+    from { -webkit-transform: translate3d(0, 100%, 0); }
+    to { -webkit-transform: translate3d(0, 0, 0); }
+}
+@-moz-keyframes slideinfrombottom {
+    from { -moz-transform: translate3d(0, 100%, 0); }
+    to { -moz-transform: translate3d(0, 0, 0); }
+}
+
+@-webkit-keyframes slideouttobottom {
+    from { -webkit-transform: translate3d(0, 0, 0); }
+    to { -webkit-transform: translate3d(0, 100%, 0); }
+}
+@-moz-keyframes slideouttobottom {
+    from { -moz-transform: translate3d(0, 0, 0); }
+    to { -moz-transform: translate3d(0, 100%, 0); }
+}
+
+/* slide fade */
+
+.slidefade.out {
+       -webkit-transform: translate3d(-100%, 0, 0);
+       -webkit-animation-name: slideouttoleft;
+       -moz-transform: translate3d(-100%, 0, 0);
+       -moz-animation-name: slideouttoleft;
+       -webkit-animation-duration: 225ms;
+       -moz-animation-duration: 225ms;
+}
+
+.slidefade.in {
+       -webkit-transform: translate3d(0, 0, 0);
+       -webkit-animation-name: fadein;
+       -moz-transform: translate3d(0, 0, 0);
+       -moz-animation-name: fadein;
+       -webkit-animation-duration: 200ms;
+       -moz-animation-duration: 200ms;
+}
+
+.slidefade.out.reverse {
+       -webkit-transform: translate3d(100%, 0, 0);
+       -webkit-animation-name: slideouttoright;
+       -moz-transform: translate3d(100%, 0, 0);
+       -moz-animation-name: slideouttoright;
+       -webkit-animation-duration: 200ms;
+       -moz-animation-duration: 200ms;
+}
+
+.slidefade.in.reverse {
+       -webkit-transform: translate3d(0, 0, 0);
+       -webkit-animation-name: fadein;
+       -moz-transform: translate3d(0, 0, 0);
+       -moz-animation-name: fadein;
+       -webkit-animation-duration: 200ms;
+       -moz-animation-duration: 200ms;
+}
+
+/* The properties in this rule are only necessary for the 'flip' transition.
+ * We need specify the perspective to create a projection matrix. This will add
+ * some depth as the element flips. The depth number represents the distance of
+ * the viewer from the z-plane. According to the CSS3 spec, 1000 is a moderate
+ * value.
+ */
+
+.viewport-turn {
+       -webkit-perspective: 1000;
+       -moz-perspective: 1000;
+       position: absolute;
+}
+.turn {
+       -webkit-backface-visibility:hidden;
+       -webkit-transform:translate3d(0, 0, 0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */
+       -webkit-transform-origin: 0;
+       -moz-backface-visibility:hidden;
+       -moz-transform:translate3d(0, 0, 0); /* Needed to work around an iOS 3.1 bug that causes listview thumbs to disappear when -webkit-visibility:hidden is used. */
+       -moz-transform-origin: 0;
+}
+
+.turn.out {
+       -webkit-transform: rotateY(-90deg) scale(.9);
+       -webkit-animation-name: flipouttoleft;
+       -moz-transform: rotateY(-90deg) scale(.9);
+       -moz-animation-name: flipouttoleft;
+       -webkit-animation-duration: 125ms;
+       -moz-animation-duration: 125ms;
+}
+
+.turn.in {
+       -webkit-animation-name: flipintoright;
+       -moz-animation-name: flipintoright;
+       -webkit-animation-duration: 250ms;
+       -moz-animation-duration: 250ms;
+}
+
+.turn.out.reverse {
+       -webkit-transform: rotateY(90deg) scale(.9);
+       -webkit-animation-name: flipouttoright;
+       -moz-transform: rotateY(90deg) scale(.9);
+       -moz-animation-name: flipouttoright;
+}
+
+.turn.in.reverse {
+       -webkit-animation-name: flipintoleft;
+       -moz-animation-name: flipintoleft;
+}
+
+@-webkit-keyframes flipouttoleft {
+    from { -webkit-transform: rotateY(0); }
+    to { -webkit-transform: rotateY(-90deg) scale(.9); }
+}
+@-moz-keyframes flipouttoleft {
+    from { -moz-transform: rotateY(0); }
+    to { -moz-transform: rotateY(-90deg) scale(.9); }
+}
+@-webkit-keyframes flipouttoright {
+    from { -webkit-transform: rotateY(0) ; }
+    to { -webkit-transform: rotateY(90deg) scale(.9); }
+}
+@-moz-keyframes flipouttoright {
+    from { -moz-transform: rotateY(0); }
+    to { -moz-transform: rotateY(90deg) scale(.9); }
+}
+@-webkit-keyframes flipintoleft {
+    from { -webkit-transform: rotateY(-90deg) scale(.9); }
+    to { -webkit-transform: rotateY(0); }
+}
+@-moz-keyframes flipintoleft {
+    from { -moz-transform: rotateY(-90deg) scale(.9); }
+    to { -moz-transform: rotateY(0); }
+}
+@-webkit-keyframes flipintoright {
+    from { -webkit-transform: rotateY(90deg) scale(.9); }
+    to { -webkit-transform: rotateY(0); }
+}
+@-moz-keyframes flipintoright {
+    from { -moz-transform: rotateY(90deg) scale(.9); }
+    to { -moz-transform: rotateY(0); }
+}
+
+
+/* depth */
+
+.depth {
+       -webkit-transform-origin: 50% 50%;
+       -moz-transform-origin: 50% 50%;
+}
+
+.depth.out {
+       -webkit-animation-name: depthout;
+       -moz-animation-name: depthout;
+       opacity: 0;
+       -webkit-animation-duration: 250ms;
+       -moz-animation-duration: 250ms;
+       -webkit-animation-timing-function: ease;
+       -moz-animation-timing-function: ease;
+}
+
+.depth.in {
+       -webkit-transform: scale(1);
+       -moz-transform: scale(1);
+       opacity: 1;
+       -webkit-animation-name: depthin;
+       -moz-animation-name: depthin;
+       -webkit-animation-duration: 350ms;
+       -moz-animation-duration: 350ms;
+       -webkit-animation-timing-function: ease;
+       -moz-animation-timing-function: ease;
+}
+
+.depth.in.reverse {
+       -webkit-animation-name: depthinreverse;
+       -moz-animation-name: depthinreverse;
+}
+
+.depth.out.reverse {
+       -webkit-transform: scale(.9);
+       -moz-transform: scale(.9);
+       -webkit-animation-name: depthoutreverse;
+       -moz-animation-name: depthoutreverse;
+}
+
+@-webkit-keyframes depthout {
+    from {
+        -webkit-transform: scale(1);
+        opacity: 1;
+    }
+    to {
+        -webkit-transform: scale(1.1);
+        opacity: 0;
+    }
+}
+
+@-moz-keyframes depthout {
+    from {
+        -moz-transform: scale(1);
+        opacity: 1;
+    }
+    to {
+        -moz-transform: scale(1.1);
+        opacity: 0;
+    }
+}
+
+@-webkit-keyframes depthin {
+    0% {
+        -webkit-transform: scale(.9);
+        opacity: 0;
+    }
+    30% {
+        -webkit-transform: scale(.9);
+        opacity: 0;
+    }
+    100% {
+        -webkit-transform: scale(1);
+        opacity: 1;
+    }
+}
+
+@-moz-keyframes depthin {
+    0% {
+        -moz-transform: scale(.9);
+        opacity: 0;
+    }
+    30% {
+        -moz-transform: scale(.9);
+        opacity: 0;
+    }
+    100% {
+        -moz-transform: scale(1);
+        opacity: 1;
+    }
+}
+
+@-webkit-keyframes depthinreverse {
+    0% {
+        -webkit-transform: scale(1.1);
+        opacity: 0;
+    }
+    30% {
+        -webkit-transform: scale(1.1);
+        opacity: 0;
+    }
+    100% {
+        -webkit-transform: scale(1);
+        opacity: 1;
+    }
+}
+
+@-moz-keyframes depthinreverse {
+    0% {
+        -moz-transform: scale(1.1);
+        opacity: 0;
+    }
+    30% {
+        -moz-transform: scale(1.1);
+        opacity: 0;
+    }
+    100% {
+        -moz-transform: scale(1);
+        opacity: 1;
+    }
+}
+
+@-webkit-keyframes depthoutreverse {
+    from {
+        -webkit-transform: scale(1);
+        opacity: 1;
+    }
+    to {
+        -webkit-transform: scale(.9);
+        opacity: 0;
+    }
+}
+
+@-moz-keyframes depthoutreverse {
+    from {
+        -moz-transform: scale(1);
+        opacity: 1;
+    }
+    to {
+        -moz-transform: scale(.9);
+        opacity: 0;
+    }
+}
+/*
+* jQuery Mobile Framework
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
+*/
+
+/* content configurations. */
+.ui-grid-a, .ui-grid-b, .ui-grid-c, .ui-grid-d { overflow: hidden; }
+.ui-block-a, .ui-block-b, .ui-block-c, .ui-block-d, .ui-block-e { margin: 0; padding: 0; border: 0; float: left; min-height:1px;}
+
+/* grid solo: 100 - single item fallback */
+.ui-grid-solo .ui-block-a { width: 100%; float: none; }
+
+/* grid a: 50/50 */
+.ui-grid-a .ui-block-a, .ui-grid-a .ui-block-b { width: 50%; }
+.ui-grid-a .ui-block-a { clear: left; }
+
+/* grid b: 33/33/33 */
+.ui-grid-b .ui-block-a, .ui-grid-b .ui-block-b, .ui-grid-b .ui-block-c { width: 33.333%; }
+.ui-grid-b .ui-block-a { clear: left; }
+
+/* grid c: 25/25/25/25 */
+.ui-grid-c .ui-block-a, .ui-grid-c .ui-block-b, .ui-grid-c .ui-block-c, .ui-grid-c .ui-block-d { width: 25%; }
+.ui-grid-c .ui-block-a { clear: left; }
+
+/* grid d: 20/20/20/20/20 */
+.ui-grid-d .ui-block-a, .ui-grid-d .ui-block-b, .ui-grid-d .ui-block-c, .ui-grid-d .ui-block-d, .ui-grid-d .ui-block-e { width: 20%; }
+.ui-grid-d .ui-block-a { clear: left; }
+/*
+* jQuery Mobile Framework
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
+*/
+/* fixed page header & footer configuration */
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-header,
+.ui-footer,
+.ui-page-fullscreen .ui-header,
+.ui-page-fullscreen .ui-footer {
+  position: absolute;
+  overflow: hidden;
+  width: 100%;
+  border-left-width: 0;
+  border-right-width: 0;
+}
+.ui-header-fixed, .ui-footer-fixed {
+  z-index: 1000;
+  -webkit-transform: translatez(0);
+  /* Force header/footer rendering to go through the same rendering pipeline as native page scrolling. */
+
+}
+.ui-footer-duplicate, .ui-page-fullscreen .ui-fixed-inline {
+  display: none;
+}
+.ui-page-fullscreen .ui-header, .ui-page-fullscreen .ui-footer {
+  opacity: .9;
+}
+/*
+* jQuery Mobile Framework
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
+*/
+.ui-navbar { overflow: hidden;  }
+.ui-navbar ul, .ui-navbar-expanded ul { list-style:none; padding: 0; margin: 0; position: relative; display: block; border: 0;}
+.ui-navbar-collapsed ul { float: left; width: 75%; margin-right: -2px; }
+.ui-navbar-collapsed .ui-navbar-toggle { float: left; width: 25%; }
+.ui-navbar li.ui-navbar-truncate { position: absolute; left: -9999px; top: -9999px; }
+.ui-navbar li .ui-btn, .ui-navbar .ui-navbar-toggle .ui-btn { display: block; font-size: 12px; text-align: center; margin: 0; border-right-width: 0; }
+.ui-navbar li .ui-btn {  margin-right: -1px; }
+.ui-navbar li .ui-btn:last-child { margin-right: 0; }
+.ui-header .ui-navbar li .ui-btn, .ui-header .ui-navbar .ui-navbar-toggle .ui-btn,
+.ui-footer .ui-navbar li .ui-btn, .ui-footer .ui-navbar .ui-navbar-toggle .ui-btn { border-top-width: 0; border-bottom-width: 0; }
+.ui-navbar .ui-btn-inner { padding-left: 2px; padding-right: 2px; }
+.ui-navbar-noicons li .ui-btn .ui-btn-inner, .ui-navbar-noicons .ui-navbar-toggle .ui-btn-inner { padding-top: .8em; padding-bottom: .9em; }
+/*expanded page styles*/
+.ui-navbar-expanded .ui-btn { margin: 0; font-size: 14px; }
+.ui-navbar-expanded .ui-btn-inner { padding-left: 5px; padding-right: 5px;  }
+.ui-navbar-expanded .ui-btn-icon-top .ui-btn-inner { padding: 45px 5px 15px; text-align: center; }
+.ui-navbar-expanded .ui-btn-icon-top .ui-icon { top: 15px; }
+.ui-navbar-expanded .ui-btn-icon-bottom .ui-btn-inner { padding: 15px 5px 45px; text-align: center; }
+.ui-navbar-expanded .ui-btn-icon-bottom .ui-icon { bottom: 15px; }
+.ui-navbar-expanded li .ui-btn .ui-btn-inner { min-height: 2.5em; }
+.ui-navbar-expanded .ui-navbar-noicons .ui-btn .ui-btn-inner { padding-top: 1.8em; padding-bottom: 1.9em; }
+/*
+* jQuery Mobile Framework
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
+*/
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+/* Button colors are defined in config.less
+
+/* Edit button size */
+.ui-btn {
+  display: block;
+  text-align: center;
+  cursor: pointer;
+  position: relative;
+  /*margin: .2em 0px; padding: 0; */
+  vertical-align: middle;
+}
+/* wongi_1018 : For button align. */
+.ui-btn:focus, .ui-btn:active {
+  outline: none;
+}
+.ui-header .ui-btn, .ui-footer .ui-btn, .ui-bar .ui-btn {
+  display: inline-block;
+  font-size: 0.5909090909090909rem;
+  margin: 0;
+}
+.ui-btn-inline {
+  display: inline-block;
+}
+.ui-btn-inner {
+  padding: 0.5em 0.4090909090909091rem;
+  display: block;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+  position: relative;
+  zoom: 1;
+}
+.ui-header .ui-btn-inner, .ui-footer .ui-btn-inner, .ui-bar .ui-btn-inner {
+  padding: 0.7em 0 0.7em;
+}
+/* wongi_1024 : Button text middle align */
+.ui-header .ui-btn-inner.ui-btn-icon-only, .ui-footer .ui-btn-inner, .ui-bar .ui-btn-inner.ui-btn-icon-only {
+  padding: 0.4em 0.36363636363636365rem 0.5em;
+}
+/* wongi_1024 : Button text middle align */
+.ui-btn-icon-notext {
+  width: 1.6363636363636365rem;
+  height: 1.6363636363636365rem;
+}
+.ui-btn-icon-notext .ui-btn-inner {
+  padding: 0.09090909090909091rem 0.045454545454545456rem 0.09090909090909091rem 0.13636363636363635rem;
+}
+.ui-btn-icon-notext .ui-btn-inner .ui-icon {
+  margin-left: -0.7272727272727273rem;
+  margin-top: -0.7272727272727273rem;
+}
+.ui-btn-icon-notext .ui-btn-text {
+  position: absolute;
+  left: -45.409090909090914rem;
+}
+.ui-btn-icon-left .ui-btn-inner {
+  padding-left: 1.5rem;
+}
+.ui-header .ui-btn-icon-left .ui-btn-inner, .ui-footer .ui-btn-icon-left .ui-btn-inner, .ui-bar .ui-btn-icon-left .ui-btn-inner {
+  padding-left: 1.2272727272727273rem;
+}
+.ui-btn-icon-right .ui-btn-inner {
+  padding-right: 1.5rem;
+}
+.ui-header .ui-btn-icon-right .ui-btn-inner, .ui-footer .ui-btn-icon-right .ui-btn-inner, .ui-bar .ui-btn-icon-right .ui-btn-inner {
+  padding-right: 1.2272727272727273rem;
+}
+.ui-btn-icon-top .ui-btn-inner {
+  padding-top: 1.2272727272727273rem;
+}
+.ui-header .ui-btn-icon-top .ui-btn-inner, .ui-footer .ui-btn-icon-top .ui-btn-inner, .ui-bar .ui-btn-icon-top .ui-btn-inner {
+  padding-top: 1.2272727272727273rem;
+}
+.ui-btn-icon-bottom .ui-btn-inner {
+  padding-bottom: 1.5rem;
+}
+.ui-header .ui-btn-icon-bottom .ui-btn-inner, .ui-footer .ui-btn-icon-bottom .ui-btn-inner, .ui-bar .ui-btn-icon-bottom .ui-btn-inner {
+  padding-bottom: 1.2272727272727273rem;
+}
+/*btn icon positioning*/
+.ui-btn-icon-notext .ui-icon {
+  display: block;
+}
+.ui-btn-icon-left .ui-icon, .ui-btn-icon-right .ui-icon, .ui-btn-icon-circle .ui-icon {
+  position: absolute;
+  /*top: 50%; margin-top: -9px;*/
+}
+/* wongi_1018 : do not use. No more use 18px default icons. */
+.ui-btn-icon-top .ui-icon, .ui-btn-icon-bottom .ui-icon {
+  position: absolute;
+  left: 50%;
+  margin-left: -9px;
+}
+.ui-btn-icon-left .ui-icon {
+  left: /*10px;*/ 0rem;
+}
+/* wongi_1018 : with 64px icon, left 10 -> 0 for good looking. */
+.ui-btn-icon-circle .ui-icon {
+  left: 0rem;
+}
+/* wongi_1018 : for circle icon center positioning. */
+.ui-btn-icon-right .ui-icon {
+  right: 0.4545454545454546rem;
+}
+.ui-btn-icon-top .ui-icon {
+  top: 0rem;
+  margin-top: 0;
+}
+.ui-btn-icon-bottom .ui-icon {
+  bottom: 0rem;
+}
+.ui-header .ui-btn-icon-right .ui-icon, .ui-footer .ui-btn-icon-right .ui-icon, .ui-bar .ui-btn-icon-right .ui-icon {
+  right: 0.18181818181818182rem;
+}
+.ui-header .ui-btn-icon-top .ui-icon, .ui-footer .ui-btn-icon-top .ui-icon, .ui-bar .ui-btn-icon-top .ui-icon {
+  top: 0.18181818181818182rem;
+}
+.ui-header .ui-btn-icon-bottom .ui-icon, .ui-footer .ui-btn-icon-bottom .ui-icon, .ui-bar .ui-btn-icon-bottom .ui-icon {
+  bottom: 0.18181818181818182rem;
+}
+/*hiding native button,inputs */
+.ui-btn-hidden {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  -webkit-appearance: button;
+  opacity: .1;
+  cursor: pointer;
+  background: transparent;
+  font-size: 0.045454545454545456rem;
+  border: none;
+  line-height: 45.409090909090914rem;
+}
+.ui-btn-text {
+  /*padding-left : 80px;*/
+  margin-left: auto;
+  margin-right: auto;
+  padding: 0 1px;
+  /* Webkit width(ellipsis) problem workaround */
+
+}
+.ui-li .ui-btn.ui-btn-icon_only {
+  top: 50%;
+  margin-top: -0.7272727272727273rem;
+}
+.ui-li .ui-btn .ui-btn-inner.ui-btn-hastxt {
+  padding: 0.2em 0.5em;
+}
+.ui-btn-icon-nobg.ui-btn-down-s .ui-btn-inner {
+  background: transparent ! important;
+}
+.ui-btn.ui-btn-box-s.ui-btn-down-s .ui-btn-inner {
+  color: #f8f6ef;
+}
+.ui-header .ui-btn-box-s:not(.ui-input-cancel):not(.ui-btn-search-front-icon),
+.ui-header .ui-btn-box-s:not(.ui-input-cancel):not(.ui-btn-search-front-icon) .ui-btn-inner,
+.ui-header .ui-btn.ui-btn-box-s.ui-btn-down-s:not(.ui-input-cancel):not(.ui-btn-search-front-icon) .ui-btn-inner,
+.ui-btn.ui-btn-back.ui-btn-up-s .ui-btn-inner,
+.ui-btn.ui-btn-back.ui-btn-hover-s .ui-btn-inner,
+.ui-btn.ui-btn-back.ui-btn-down-s .ui-btn-inner {
+  background: transparent;
+  border: none;
+  box-shadow: none;
+}
+.ui-btn-icon-top .ui-btn-inner.ui-btn-hastxt, .ui-li .ui-btn-icon-top .ui-btn-inner.ui-btn-hastxt {
+  padding-top: 2.3636363636363638rem;
+}
+.ui-btn-icon-bottom .ui-btn-inner.ui-btn-hastxt, .ui-li .ui-btn-icon-bottom .ui-btn-inner.ui-btn-hastxt {
+  padding-bottom: 2.3636363636363638rem;
+}
+/* wongi_1017 : Icons */
+/* icons sizing */
+.ui-btn .ui-icon {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+}
+.ui-btn.ui-btn-edit .ui-icon {
+  width: 3.3636363636363638rem;
+  height: 3.3636363636363638rem;
+}
+/* Padding for Icon with text */
+.ui-btn .ui-btn-text.ui-btn-text-padding-left {
+  padding-left: 2rem;
+}
+.ui-btn .ui-btn-text.ui-btn-text-padding-right {
+  padding-right: 2.1818181818181817rem;
+}
+.ui-btn .ui-btn-text.ui-btn-text-padding-top {
+  padding-top: 1.4545454545454546rem;
+}
+.ui-icon {
+  z-index: 10;
+  background-repeat: no-repeat;
+  vertical-align: middle;
+  background-position: 0% 0%;
+  background-size: 100%;
+}
+.ui-btn-box.s .ui-icon {
+  position: absolute;
+}
+.ui-btn-box-s.ui-btn-icon-left .ui-icon, .ui-btn-box-s.ui-btn-icon-right .ui-icon {
+  margin-top: -0.7272727272727273rem;
+  top: 50%;
+}
+.ui-btn-box-s.ui-btn-icon-top .ui-icon, .ui-btn-box-s.ui-btn-icon-bottom .ui-icon {
+  margin-left: -0.7272727272727273rem;
+  left: 50%;
+}
+.tizen-icon-common {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+}
+.tizen-smallicon-common {
+  width: 0.9090909090909092rem ! important;
+  height: 0.9090909090909092rem ! important;
+  top: 50% ! important;
+  left: 50% ! important;
+  margin-top: -0.4545454545454546rem ! important;
+  margin-left: -0.4545454545454546rem ! important;
+}
+.ui-icon-bg {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/00_btn_circle_bg_normal.png);
+  z-index: 0;
+}
+.ui-icon-arrow-l {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_left.png);
+}
+.ui-icon-arrow-r {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_right.png);
+}
+.ui-icon-arrow-u {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_expand_opened.png);
+}
+.ui-icon-arrow-d {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_expand_closed.png);
+}
+.ui-icon-delete {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_expand_cancel.png);
+}
+.ui-icon-plus {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_plus.png);
+}
+.ui-icon-minus {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_expand_minus.png);
+}
+.ui-icon-check {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_check.png);
+}
+.ui-icon-gear {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_gear.png);
+}
+.ui-icon-refresh {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_refresh.png);
+}
+.ui-icon-forward {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_expand_send.png);
+}
+.ui-icon-back {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_back.png);
+}
+.ui-icon-grid {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_grid.png);
+}
+.ui-icon-star {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_star.png);
+}
+.ui-icon-alert {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_warning.png);
+}
+.ui-icon-info {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_info.png);
+}
+.ui-icon-home {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_home.png);
+}
+.ui-icon-search {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_search.png);
+}
+.ui-icon-call {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_call.png);
+}
+.ui-icon-rename {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_rename.png);
+}
+.ui-icon-scrolltop {
+  width: 0.9090909090909092rem ! important;
+  height: 0.9090909090909092rem ! important;
+  top: 50% ! important;
+  left: 50% ! important;
+  margin-top: -0.4545454545454546rem ! important;
+  margin-left: -0.4545454545454546rem ! important;
+  background-image: url(images/controls/button/00_icon_jump.png);
+}
+.ui-icon-scrollleft {
+  width: 0.9090909090909092rem ! important;
+  height: 0.9090909090909092rem ! important;
+  top: 50% ! important;
+  left: 50% ! important;
+  margin-top: -0.4545454545454546rem ! important;
+  margin-left: -0.4545454545454546rem ! important;
+  background-image: url(images/controls/button/00_icon_jump_left.png);
+}
+.ui-icon-expandable-divider-opened {
+  width: 1.9090909090909092rem;
+  height: 1.9090909090909092rem;
+  position: absolute;
+  right: 1.2727272727272727rem;
+  top: 0rem;
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+  background-image: url(images/00_indexlist_icon_opened.png);
+}
+.ui-icon-expandable-divider-closed {
+  width: 1.9090909090909092rem;
+  height: 1.9090909090909092rem;
+  position: absolute;
+  right: 1.2727272727272727rem;
+  top: 0rem;
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+  background-image: url(images/00_indexlist_icon_closed.png);
+}
+/* Pressed images */
+.ui-btn-down-s .ui-icon-bg, .ui-btn-down-s.ui-tizen-icon-bg {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/00_btn_circle_bg_press.png);
+  z-index: 0;
+}
+.ui-btn-down-s .ui-icon-arrow-l {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_left_press.png);
+}
+.ui-btn-down-s .ui-icon-arrow-r {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_right_press.png);
+}
+.ui-btn-down-s .ui-icon-arrow-u {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_expand_opened_press.png);
+}
+.ui-btn-down-s .ui-icon-arrow-d {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_expand_closed_press.png);
+}
+.ui-btn-down-s .ui-icon-delete {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_expand_cancel_press.png);
+}
+.ui-btn-down-s .ui-icon-plus {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_plus_press.png);
+}
+.ui-btn-down-s .ui-icon-minus {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_expand_minus_press.png);
+}
+.ui-btn-down-s .ui-icon-check {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_check_press.png);
+}
+.ui-btn-down-s .ui-icon-gear {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_gear_press.png);
+}
+.ui-btn-down-s .ui-icon-refresh {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_refresh_press.png);
+}
+.ui-btn-down-s .ui-icon-forward {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_expand_send_press.png);
+}
+.ui-btn-down-s .ui-icon-back {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_back_press.png);
+}
+.ui-btn-down-s .ui-icon-grid {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_grid_press.png);
+}
+.ui-btn-down-s .ui-icon-star {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_star_press.png);
+}
+.ui-btn-down-s .ui-icon-alert {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_warning_press.png);
+}
+.ui-btn-down-s .ui-icon-info {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_info_press.png);
+}
+.ui-btn-down-s .ui-icon-home {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_home_press.png);
+}
+.ui-btn-down-s .ui-icon-search {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_search_press.png);
+}
+.ui-btn-down-s .ui-icon-call {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_call_press.png);
+}
+.ui-btn-down-s .ui-icon-rename {
+  /* Overlap original property */
+
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  /* margin-top : 50 */
+
+  /* top : -32 * @unit_base; */
+
+  background-image: url(images/controls/button/00_button_rename_press.png);
+}
+.ui-btn-down-s .ui-icon-scrolltop {
+  width: 0.9090909090909092rem ! important;
+  height: 0.9090909090909092rem ! important;
+  top: 50% ! important;
+  left: 50% ! important;
+  margin-top: -0.4545454545454546rem ! important;
+  margin-left: -0.4545454545454546rem ! important;
+  background-image: url(images/controls/button/00_icon_jump_press.png);
+}
+.ui-btn-down-s .ui-icon-scrollleft {
+  width: 0.9090909090909092rem ! important;
+  height: 0.9090909090909092rem ! important;
+  top: 50% ! important;
+  left: 50% ! important;
+  margin-top: -0.4545454545454546rem ! important;
+  margin-left: -0.4545454545454546rem ! important;
+  background-image: url(images/controls/button/00_icon_jump_left_press.png);
+}
+.ui-btn-inner.ui-btn-icon-only {
+  padding: 0.7272727272727273rem 0.7272727272727273rem;
+}
+.ui-btn-icon-only .ui-btn-text {
+  left: -9999px;
+  display: none;
+}
+.ui-btn.ui-btn-corner-all {
+  -o-border-radius: 1.2em ! important;
+  -ms-border-radius: 1.2em ! important;
+  -moz-border-radius: 1.2em ! important;
+  -webkit-border-radius: 1.2em ! important;
+  border-radius: 1.2em ! important;
+}
+/* No BG button : data-iconbg = "nobg" */
+.ui-btn.ui-btn-icon-nobg {
+  box-shadow: none;
+}
+.ui-btn-corner-circle {
+  -o-border-radius: 1em ! important;
+  -ms-border-radius: 1em ! important;
+  -moz-border-radius: 1em ! important;
+  -webkit-border-radius: 1em ! important;
+  border-radius: 1em ! important;
+}
+.ui-btn-round {
+  -o-border-radius: 1.2em ! important;
+  -ms-border-radius: 1.2em ! important;
+  -moz-border-radius: 1.2em ! important;
+  -webkit-border-radius: 1.2em ! important;
+  border-radius: 1.2em ! important;
+}
+.ui-btn-round .ui-btn-inner {
+  -o-border-radius: 1.2em ! important;
+  -ms-border-radius: 1.2em ! important;
+  -moz-border-radius: 1.2em ! important;
+  -webkit-border-radius: 1.2em ! important;
+  border-radius: 1.2em ! important;
+}
+.ui-btn.ui-btn-icon-nobg, .ui-btn .ui-btn-icon-nobg {
+  background: transparent;
+  background-color: transparent;
+  border: none;
+}
+/* Contact Edit Style */
+.ui-btn.ui-btn-edit .ui-btn-text {
+  color: #f9f9f9;
+}
+.ui-btn.ui-btn-edit .ui-btn-inner {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+.ui-btn-box-s {
+  color: #363133;
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+/*
+ * jQuery Mobile Collapsible CSS
+ * for Tizen Web UI
+ */
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-collapsible-inset {
+  margin: .5em 0;
+}
+.ui-collapsible-inset .ui-collapsible-heading {
+  margin: 0;
+}
+.ui-collapsible-inset .ui-collapsible-heading .ui-btn {
+  border-right-width: 1px;
+  border-left-width: 1px;
+}
+.ui-collapsible-collapsed + .ui-collapsible:not(.ui-collapsible-inset) .ui-collapsible-heading .ui-btn {
+  border-top-width: 0;
+}
+.ui-collapsible-set .ui-collapsible:not(.ui-collapsible-inset) .ui-collapsible-heading .ui-btn {
+  border-top-width: 1px;
+}
+.ui-collapsible-heading {
+  font-size: 1rem;
+  display: block;
+  margin: 0 -15px;
+  padding: 0;
+  position: relative;
+}
+.ui-collapsible-heading .ui-btn {
+  text-align: left;
+  margin: 0;
+  border-left-width: 0;
+  border-right-width: 0;
+}
+.ui-collapsible-heading .ui-btn-text {
+  color: #000000;
+}
+.ui-collapsible-heading .ui-btn-inner, .ui-collapsible-heading .ui-btn-icon-left .ui-btn-inner {
+  padding-left: 40px;
+}
+.ui-collapsible-heading .ui-btn-icon-right .ui-btn-inner {
+  padding-left: 12px;
+  padding-right: 40px;
+}
+.ui-collapsible-heading .ui-btn-icon-top .ui-btn-inner, .ui-collapsible-heading .ui-btn-icon-bottom .ui-btn-inner {
+  padding-right: 40px;
+  text-align: center;
+}
+.ui-collapsible-heading .ui-btn-inner > .ui-icon-arrow-d {
+  -webkit-transition: all 0.33s ease;
+  -moz-transition: all 0.33s ease;
+  -ms-transition: all 0.33s ease;
+  -o-transition: all 0.33s ease;
+  transition: all 0.33s ease;
+  -webkit-transform: rotate(180deg);
+  -moz-transform: rotate(180deg);
+  -ms-transform: rotate(180deg);
+  -o-transform: rotate(180deg);
+  transform: rotate(180deg);
+}
+.ui-collapsible-heading .ui-btn-inner > .ui-icon-arrow-u {
+  background-image: url(images/controls/button/00_button_expand_closed.png);
+  -webkit-transition: all 0.33s ease;
+  -moz-transition: all 0.33s ease;
+  -ms-transition: all 0.33s ease;
+  -o-transition: all 0.33s ease;
+  transition: all 0.33s ease;
+  -webkit-transform: rotate(0deg);
+  -moz-transform: rotate(0deg);
+  -ms-transform: rotate(0deg);
+  -o-transform: rotate(0deg);
+  transform: rotate(0deg);
+}
+.ui-collapsible-heading .ui-btn span.ui-btn {
+  position: absolute;
+  left: 6px;
+  top: 50%;
+  margin: -12px 0 0 0;
+  width: 20px;
+  height: 20px;
+  padding: 1px 0px 1px 2px;
+  text-indent: -9999px;
+}
+.ui-collapsible-heading .ui-btn span.ui-btn .ui-btn-inner {
+  padding: 10px 0;
+}
+.ui-collapsible-heading .ui-btn span.ui-btn .ui-icon {
+  left: 0;
+  margin-top: -10px;
+}
+.ui-collapsible-heading-status {
+  position: absolute;
+  top: -9999px;
+  left: 0px;
+}
+.ui-collapsible-content {
+  display: block;
+  margin: 0 -15px;
+  padding: 0px 15px;
+  border-left-width: 0;
+  border-right-width: 0;
+  border-top: none;
+  /* Overrides ui-body-* */
+
+  background-image: none;
+  /* Overrides ui-body-* */
+
+  visibility: visible;
+  overflow: auto;
+  -webkit-transition: all 0.5s ease;
+  -moz-transition: all 0.5s ease;
+  -ms-transition: all 0.5s ease;
+  -o-transition: all 0.5s ease;
+  transition: all 0.5s ease;
+}
+.ui-collapsible-inset .ui-collapsible-content {
+  margin: 0;
+  border-right-width: 1px;
+  border-left-width: 1px;
+}
+.ui-collapsible-content-collapsed {
+  overflow: hidden;
+  max-height: 0px !important;
+  visibility: hidden;
+}
+.ui-collapsible-set {
+  margin: .5em 0;
+}
+.ui-collapsible-set .ui-collapsible {
+  margin: -1px 0 0;
+}
+.ui-collapsible-set .ui-collapsible:first-child {
+  margin-top: 0;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-dialog {
+  min-height: 480px;
+}
+.ui-dialog .ui-header, .ui-dialog .ui-content, .ui-dialog .ui-footer {
+  margin: 15px;
+  position: relative;
+}
+.ui-dialog .ui-header, .ui-dialog .ui-footer {
+  z-index: 10;
+  width: auto;
+}
+.ui-dialog .ui-header .ui-btn-left {
+  width: 0px;
+  border-width: 0px;
+}
+.ui-dialog .center_info {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+}
+.ui-dialog .center_info .popup-text {
+  font-size: 42px;
+  background: #213c49;
+  width: 100%;
+}
+.ui-dialog .center_info .popup-text p {
+  text-align: center;
+  padding: 22px 16px;
+}
+/*
+* jQuery Mobile Framework
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
+*/
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-checkbox .ui-btn-inner, .ui-radio .ui-btn-inner {
+  white-space: normal;
+}
+.ui-checkbox, .ui-radio {
+  position: relative;
+  margin: 0;
+}
+.ui-checkbox .ui-btn-corner-all, .ui-radio .ui-btn-corner-all {
+  -o-border-radius: 0;
+  -ms-border-radius: 0;
+  -moz-border-radius: 0;
+  -webkit-border-radius: 0;
+  border-radius: 0;
+}
+.ui-checkbox .ui-btn-inner, .ui-radio .ui-btn-inner {
+  border-top: 0;
+}
+.ui-checkbox .ui-btn-up-s, .ui-radio .ui-btn-up-s {
+  border: 0;
+  background: transparent;
+  font-weight: normal;
+}
+.ui-checkbox .ui-btn-hover-s, .ui-radio .ui-btn-hover-s {
+  border: 0;
+  background: transparent;
+  font-weight: normal;
+}
+.ui-checkbox .ui-btn-down-s, .ui-radio .ui-btn-down-s {
+  border: 0;
+  background: transparent;
+  font-weight: normal;
+}
+.ui-checkbox input, .ui-radio input {
+  z-index: 1;
+  margin: 0px;
+  left: 0.4545454545454546rem;
+  position: absolute;
+  outline: 0 !important;
+}
+.ui-checkbox > input, .ui-radio > input {
+  display: none;
+}
+.ui-checkbox .ui-btn, .ui-radio .ui-btn {
+  z-index: 2;
+  height: 100%;
+  margin: 0;
+  text-align: left;
+}
+.ui-checkbox .ui-btn.ui-btn-icon-left, .ui-radio .ui-btn.ui-btn-icon-left {
+  display: inline-block;
+}
+.ui-checkbox .ui-btn.ui-btn-icon-left .ui-btn-inner, .ui-radio .ui-btn.ui-btn-icon-left .ui-btn-inner {
+  min-width: 1.8181818181818183rem;
+  display: inline-block;
+  line-height: 1.4545454545454546rem;
+  padding: 0 0.7272727272727273rem 0 0.7272727272727273rem;
+  /* TODO : after button fixed, recheck! */
+
+}
+.ui-checkbox .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-btn-text, .ui-radio .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-btn-text {
+  display: inline-block;
+  vertical-align: middle;
+  min-height: 1.4545454545454546rem;
+}
+.ui-checkbox .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-btn-text.ui-btn-text-padding-left, .ui-radio .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-btn-text.ui-btn-text-padding-left {
+  padding-left: 1.0909090909090908rem;
+}
+.ui-checkbox .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-icon, .ui-radio .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-icon {
+  position: absolute;
+  top: 50%;
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  margin-top: -0.7272727272727273rem;
+}
+.ui-checkbox.favorite input {
+  position: absolute;
+  left: -10000px;
+  height: 100%;
+  outline: 0 !important;
+}
+.ui-checkbox.favorite .ui-btn.ui-btn-icon-left {
+  display: block;
+}
+.ui-checkbox.favorite .ui-btn.ui-btn-icon-left .ui-btn-inner {
+  display: inline-block;
+  line-height: 1.4545454545454546rem;
+  padding: 0 0 0 0.7272727272727273rem;
+  /* TODO : after button fixed, recheck! */
+
+}
+.ui-checkbox.favorite .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-btn-text {
+  display: inline-block;
+  vertical-align: middle;
+}
+.ui-checkbox.favorite .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-btn-text.ui-btn-text-padding-left {
+  padding-left: 1.0909090909090908rem;
+}
+.ui-checkbox.favorite .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-icon {
+  position: absolute;
+  top: 50%;
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  margin-top: -0.7272727272727273rem;
+}
+/* put img inside of checkbox(normal, favorite style) */
+.ui-icon-checkbox-off,
+.ui-icon-checkbox-on,
+.favorite .ui-icon-checkbox-off,
+.favorite .ui-icon-checkbox-on,
+.ui-icon-checkbox-on-press,
+.ui-icon-checkbox-off-press,
+.ui-icon-radio-off,
+.ui-icon-radio-on,
+.ui-icon-radio-on-press,
+.ui-icon-radio-off-press {
+  background-size: 100% 100%;
+  background-color: transparent;
+}
+.ui-icon-checkbox-off {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  background-image: url(images/00_check_bg.png);
+}
+.ui-icon-checkbox-on {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  background-image: url(images/00_check_checking.png), url(images/00_check_bg.png);
+  background-repeat: no-repeat;
+}
+.ui-icon-checkbox-off-press {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  background-image: url(images/00_check_bg_press.png);
+}
+.ui-icon-checkbox-on-press {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  background-image: url(images/00_check_checking.png), url(images/00_check_bg_press.png);
+  background-repeat: no-repeat;
+}
+.favorite .ui-icon-checkbox-off, .favorite .ui-icon-checkbox-off-press {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  background-image: url(images/controls/00_icon_favorite_off.png);
+}
+.favorite .ui-icon-checkbox-on, .favorite .ui-icon-checkbox-on-press {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  background-image: url(images/controls/00_icon_favorite_on.png);
+}
+.ui-icon-radio-off {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  background-image: url(images/00_button_radio.png);
+}
+.ui-icon-radio-on {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  background-image: url(images/00_button_radio_select.png), url(images/00_button_radio.png);
+}
+.ui-icon-radio-on-press {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  background-image: url(images/00_button_radio.png);
+}
+.ui-icon-radio-off-press {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  background-image: url(images/00_button_radio.png);
+}
+/*
+* jQuery Mobile Framework
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
+*/
+.ui-field-contain { padding: 1.5em 0; margin: 0; border-bottom-width: 1px; overflow: visible; }
+.ui-field-contain:first-child { border-top-width: 0; }
+@media all {
+       .ui-field-contain { border-width: 0; padding: 0; margin: 0.8em 0; }
+}
+/*
+* jQuery Mobile Framework
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
+*/
+.ui-select { display: block; position: relative; }
+.ui-select select { position: absolute; left: -9999px; top: -9999px; }
+.ui-select .ui-btn { overflow: hidden; }
+.ui-select .ui-btn select { cursor: pointer; -webkit-appearance: button; left: 0; top:0; width: 100%;  min-height: 1.5em; min-height: 100%; height: 3em; max-height: 100%; opacity: 0; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter: alpha(opacity=0); z-index: 2; }
+@-moz-document url-prefix() {.ui-select .ui-btn select { opacity: 0.0001; }}
+.ui-select .ui-btn select.ui-select-nativeonly { opacity: 1; text-indent: 0; }
+
+.ui-select .ui-btn-icon-right .ui-btn-inner { padding-right: 45px; } 
+.ui-select .ui-btn-icon-right .ui-icon { right: 15px;  }
+
+/* labels */
+label.ui-select { font-size: 16px; line-height: 1.4;  font-weight: normal; margin: 0 0 .3em; display: block; }
+
+/*listbox*/
+.ui-select .ui-btn-text, .ui-selectmenu .ui-btn-text { display: block; min-height: 1em; }
+.ui-select .ui-btn-text { text-overflow: ellipsis; overflow: hidden;}
+
+.ui-selectmenu { position: absolute; padding: 0; z-index: 100 !important; width: 80%; max-width: 350px; padding: 6px; }
+.ui-selectmenu .ui-listview { margin: 0; }
+.ui-selectmenu .ui-btn.ui-li-divider { cursor: default; }
+.ui-selectmenu-hidden { top: -9999px; left: -9999px; }
+.ui-selectmenu-screen { position: absolute; top: 0; left: 0; width: 100%; height: 100%;  z-index: 99; }
+.ui-screen-hidden, .ui-selectmenu-list .ui-li .ui-icon { display: none; }
+.ui-selectmenu-list .ui-li .ui-icon { display: block; }
+.ui-li.ui-selectmenu-placeholder { display: none; }
+.ui-selectmenu .ui-header .ui-title { margin: 0.6em 46px 0.8em; }
+
+@media all and (min-width: 450px){
+       label.ui-select { vertical-align: top;  display: inline-block;  width: 20%;  margin: 0 2% 0 0; }
+       .ui-select { width: 60%; display: inline-block; }
+}
+
+/* when no placeholder is defined in a multiple select, the header height doesn't even extend past the close button.  this shim's content in there */
+.ui-selectmenu .ui-header h1:after { content: '.'; visibility: hidden; }
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+label.ui-input-text {
+  font-size: 1rem;
+  line-height: 1.2;
+  display: block;
+  font-weight: normal;
+  margin: 0 0 .3em;
+}
+input.ui-input-text, textarea.ui-input-text {
+  background-image: none;
+  padding: .4em;
+  line-height: 1.4;
+  font-size: 0.7272727272727273rem;
+  display: block;
+}
+input.ui-input-text {
+  appearance: none;
+  -webkit-appearance: none;
+}
+textarea.ui-input-text {
+  height: 2.272727272727273rem;
+  resize: none;
+  -webkit-transition: height 200ms linear;
+  -moz-transition: height 200ms linear;
+  -o-transition: height 200ms linear;
+  -ms-transition: height 200ms linear;
+  transition: height 200ms linear;
+}
+.ui-input-search {
+  position: relative;
+  padding-right: 1.6363636363636365rem;
+  padding-left: 1.6363636363636365rem;
+  border: 1px solid #999999;
+  -webkit-box-shadow: inset 0.09090909090909091rem 0.09090909090909091rem 0.09090909090909091rem #999999;
+  -moz-box-shadow: inset 0.09090909090909091rem 0.09090909090909091rem 0.09090909090909091rem #999999;
+  -o-box-shadow: inset 0.09090909090909091rem 0.09090909090909091rem 0.09090909090909091rem #999999;
+  -ms-box-shadow: inset 0.09090909090909091rem 0.09090909090909091rem 0.09090909090909091rem #999999;
+  box-shadow: inset 0.09090909090909091rem 0.09090909090909091rem 0.09090909090909091rem #999999;
+}
+.ui-input-search input.ui-input-text {
+  width: 100%;
+  border: none;
+  background: transparent none;
+  outline: 0 !important;
+}
+.ui-input-search .ui-btn-down-s, .ui-input-search .ui-btn-up-s, .ui-input-search .ui-btn-hover-s {
+  border: none;
+  background: transparent none;
+}
+.ui-input-search .ui-btn-icon-notext.ui-input-clear {
+  width: 1.6363636363636365rem;
+  height: 1.5rem;
+}
+.ui-input-search .ui-btn-icon-notext.ui-input-clear .ui-btn-inner {
+  padding: 0.2727272727272727rem;
+}
+.ui-input-search .ui-btn-inner .ui-icon-deleteSearch {
+  width: 1rem;
+  height: 1rem;
+  margin-top: 0px;
+  margin-left: 0px;
+}
+.ui-input-search .ui-input-clear {
+  position: absolute;
+  right: 0;
+  top: 0;
+  vertical-align: middle;
+}
+.ui-input-search .ui-input-clear-hidden {
+  display: none;
+}
+/* code for label+inputbox : remove this code if webApp dev. controls input area */
+@media all and (min-width: 721*@unit_base) {
+  label.ui-input-text:not([data-type='search']) {
+    vertical-align: top;
+    display: inline-block;
+    margin: 0 2% 0 0;
+  }
+  input.ui-input-text:not([data-type='search']), textarea.ui-input-text:not([data-type='search']) {
+    width: 60%;
+    display: inline-block;
+  }
+  .ui-input-search input.ui-input-text:not([data-type='search']) {
+    width: 85%;
+  }
+}
+/* search bar */
+.ui-body-s > div > .ui-field-contain > .input-search-bar, .ui-body-s > .ui-field-contain > .input-search-bar {
+  margin: -2.1818181818181817rem -0.6818181818181819rem -1.4545454545454546rem -0.6818181818181819rem;
+}
+/* Need to confirm exact concept */
+.input-search-bar {
+  position: relative;
+  background-color: #f8f6ef;
+  padding: 0.5909090909090909rem;
+  vertical-align: middle;
+}
+.input-search-bar .ui-corner-all {
+  -o-border-radius: 0.3em;
+  -ms-border-radius: 0.3em;
+  -moz-border-radius: 0.3em;
+  -webkit-border-radius: 0.3em;
+  border-radius: 0.3em;
+}
+.input-search-bar .ui-input-search {
+  font-size: 0.7272727272727273rem;
+  display: block;
+  position: relative;
+  background-color: #ffffff;
+}
+.input-search-bar .ui-input-search .ui-input-text {
+  height: 1.5rem;
+  padding: 0px;
+  margin-right: 1.7272727272727273rem;
+}
+.input-search-bar .ui-input-search .ui-image-search {
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  width: 1rem;
+  height: 1rem;
+  margin: 0.2727272727272727rem;
+}
+.input-search-bar .ui-input-search-default {
+  margin-right: 3.409090909090909rem;
+  -webkit-transition: all 400ms linear;
+  -moz-transition: all 400ms linear;
+  -o-transition: all 400ms linear;
+  -ms-transition: all 400ms linear;
+  transition: all 400ms linear;
+}
+.input-search-bar .ui-input-search-wide {
+  margin-right: 0rem;
+  -webkit-transition: all 400ms linear;
+  -moz-transition: all 400ms linear;
+  -o-transition: all 400ms linear;
+  -ms-transition: all 400ms linear;
+  transition: all 400ms linear;
+}
+.input-search-bar .ui-btn-icon-cancel.ui-input-cancel {
+  display: inline-block;
+  position: absolute;
+  top: 0.13636363636363635rem;
+  right: 0rem;
+  height: 1.5rem;
+  margin-right: 0.4545454545454546rem;
+  vertical-align: middle;
+  padding: 0px;
+  border-color: none;
+  width: 3.090909090909091rem;
+  -webkit-transition: all 400ms linear;
+  -moz-transition: all 400ms linear;
+  -o-transition: all 400ms linear;
+  -ms-transition: all 400ms linear;
+  transition: all 400ms linear;
+}
+.input-search-bar .ui-btn-icon-cancel.ui-input-cancel .ui-btn-inner {
+  padding-top: 0.2727272727272727rem;
+  padding-bottom: 0.2727272727272727rem;
+}
+.input-search-bar .ui-btn-icon-cancel.ui-input-cancel .ui-btn-inner .ui-btn-text {
+  font-size: 0.6818181818181819rem;
+}
+.input-search-bar .ui-btn-icon-cancel.ui-input-cancel.ui-btn-cancel-hide {
+  right: -3.409090909090909rem;
+  visibility: hidden;
+}
+.input-search-bar .ui-btn-icon-cancel.ui-input-cancel.ui-btn-cancel-show {
+  right: 0px;
+  visibility: visible;
+}
+.input-search-bar .ui-search-bar-icon {
+  margin-left: 1.9090909090909092rem;
+}
+.input-search-bar .ui-btn.ui-btn-search-front-icon {
+  position: absolute;
+  width: 1.590909090909091rem;
+  height: 1.590909090909091rem;
+  top: 0.09090909090909091rem;
+  border-radius: 3rem;
+}
+.input-search-bar .ui-btn.ui-btn-search-front-icon > .ui-btn-inner.ui-btn-icon-only {
+  border-radius: 3rem;
+}
+.ui-header .input-search-bar {
+  padding-top: 0.18181818181818182rem;
+  padding-bottom: 0.18181818181818182rem;
+}
+.ui-image-search {
+  background-image: url(images/controls/00_search_icon.png);
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+}
+.ui-icon-deleteSearch {
+  background-image: url(images/controls/00_field_btn_clear.png);
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-controlgroup, fieldset.ui-controlgroup {
+  padding: 0;
+  margin: .5em 0 1em;
+}
+.ui-bar .ui-controlgroup {
+  margin: 0 .3em;
+}
+.ui-controlgroup-label {
+  font-size: 1em;
+  line-height: 1.4;
+  font-weight: normal;
+  margin: 0 0 .3em;
+}
+.ui-controlgroup-controls {
+  display: block;
+}
+.ui-controlgroup li {
+  list-style: none;
+}
+.ui-controlgroup .ui-btn-inner {
+  white-space: nowrap;
+}
+.ui-controlgroup .ui-checkbox label label, .ui-controlgroup .ui-radio label {
+  font-size: 1em;
+}
+.ui-controlgroup .ui-radio {
+  width: 25%;
+  overflow: hidden;
+}
+.ui-controlgroup .ui-radio label {
+  text-align: center;
+  white-space: nowrap;
+}
+.ui-controlgroup .ui-radio-off, .ui-controlgroup .ui-radio-on {
+  width: 100%;
+}
+.ui-controlgroup .ui-radio-on .ui-btn-inner {
+  background: #f8f6ef;
+}
+.ui-controlgroup .ui-radio-on .ui-btn-inner .ui-btn-text {
+  color: #3b73b6;
+}
+.ui-controlgroup .ui-corner-left {
+  border-left-width: 0px;
+}
+.ui-controlgroup .ui-corner-right {
+  border-right-width: 0px;
+}
+.ui-controlgroup-vertical .ui-btn, .ui-controlgroup-vertical .ui-checkbox, .ui-controlgroup-vertical .ui-radio {
+  margin: 0;
+  border-bottom-width: 0;
+}
+.ui-controlgroup-vertical .ui-controlgroup-last {
+  border-bottom-width: 1px;
+}
+.ui-controlgroup-vertical .ui-radio {
+  width: 100%;
+}
+.ui-controlgroup-vertical .ui-radio label {
+  text-align: left;
+}
+.ui-controlgroup-vertical .ui-radio label .ui-btn-inner {
+  margin-left: 0.7272727272727273rem;
+  margin-right: 0.7272727272727273rem;
+}
+.ui-controlgroup-horizontal {
+  padding: 0;
+}
+.ui-controlgroup-horizontal .ui-btn {
+  display: inline-block;
+  margin-left: -0.18181818181818182rem;
+  margin-right: -0.13636363636363635rem;
+}
+.ui-controlgroup-horizontal .ui-checkbox, .ui-controlgroup-horizontal .ui-radio {
+  float: left;
+  margin: 0 -1px 0 0;
+}
+.ui-controlgroup-horizontal .ui-controlgroup-last {
+  margin-right: 0;
+}
+.ui-controlgroup-horizontal [data-role="button"] {
+  border-top: 0px;
+  border-bottom: 0px;
+  border-radius: 0px;
+  box-shadow: none;
+  background: none;
+}
+.ui-controlgroup-horizontal [data-role="button"].ui-btn-down-s .ui-btn-inner, .ui-controlgroup-horizontal [data-role="button"] .ui-btn-active-s .ui-btn-inner {
+  background: #f8f6ef;
+}
+.ui-controlgroup-horizontal [data-role="button"].ui-btn-down-s .ui-btn-inner .ui-btn-text, .ui-controlgroup-horizontal [data-role="button"] .ui-btn-active-s .ui-btn-inner .ui-btn-text {
+  color: #3b73b6;
+}
+.ui-controlgroup-horizontal [data-role="button"].ui-btn-down-s .ui-btn-inner {
+  background: -webkit-linear-gradient(top, #d2d2c8 0%, #f6f8ef 100%);
+}
+.ui-controlgroup-horizontal [data-role="button"] > .ui-btn-inner {
+  border: 0px solid;
+  box-shadow: none;
+  padding-top: 0.2272727272727273rem;
+  padding-bottom: 0.2272727272727273rem;
+  padding-left: 0.4545454545454546rem;
+  padding-right: 0.4545454545454546rem;
+}
+.ui-controlgroup-horizontal label > span.ui-btn-inner {
+  padding-top: 0.13636363636363635rem;
+  padding-bottom: 0.13636363636363635rem;
+}
+/*
+* jQuery Mobile Framework
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
+*/
+/*** less definitions ***/
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+/************************/
+.ui-listview {
+  margin: 0;
+  counter-reset: listnumbering;
+  border-top-color: rgba(211, 209, 203, 0.5);
+  /* listview: fonts for li with a link */
+
+}
+.ui-listview li.ui-btn > .ui-btn-hastxt > .ui-btn-text.ui-btn-text-padding-right {
+  padding-right: 0rem;
+}
+.ui-listview .ui-li {
+  border-left-width: 0px;
+  border-right-width: 0px;
+  border-top-width: 0px;
+}
+.ui-listview .ui-li > .ui-btn-inner {
+  border-bottom-width: 1px;
+  border-bottom-style: solid;
+  border-bottom-color: rgba(211, 209, 203, 0.5);
+  margin-left: 0.5909090909090909rem;
+  margin-right: 0.5909090909090909rem;
+}
+.ui-listview .ui-li-static {
+  background-color: #f8f6ef;
+  border-bottom-width: 1px;
+  border-bottom-style: solid;
+  border-bottom-color: rgba(211, 209, 203, 0.5);
+  margin-left: 0.5909090909090909rem;
+  margin-right: 0.5909090909090909rem;
+}
+.ui-listview .ui-li:not(.ui-li-divider):not(.ui-li-static) {
+  min-height: 2.5rem;
+}
+.ui-listview .ui-li.ui-li-has-multiline:not(.ui-li-divider):not(.ui-li-static) {
+  min-height: 2.909090909090909rem;
+}
+.ui-listview li.ui-btn-up-s, .ui-listview li.ui-btn-hover-s {
+  background: none;
+  background-color: #f8f6ef;
+  color: #000000;
+}
+.ui-listview li.ui-btn-down-s {
+  background: none;
+  background-color: #5787c2;
+  color: #000000;
+}
+.ui-listview li.ui-btn-up-s > .ui-li > .ui-btn-text > a.ui-link-inherit, .ui-listview li.ui-btn-hover-s > .ui-li > .ui-btn-text > a.ui-link-inherit {
+  color: #000000;
+}
+.ui-listview li.ui-btn-down-s > .ui-li > .ui-btn-text > a.ui-link-inherit {
+  color: #f9f9f9;
+}
+.ui-content .ui-listview {
+  margin-left: -0.36363636363636365rem;
+  margin-right: -0.36363636363636365rem;
+  padding-bottom: 1px;
+}
+.ui-content .ui-listview .ui-listview {
+  margin: 0;
+}
+.ui-content .ui-listview-inset {
+  margin: 1em 0;
+}
+.ui-listview, .ui-li, .ui-collapsible-heading {
+  list-style: none;
+  padding: 0;
+  font-size: 1rem;
+}
+.ui-li, .ui-collapsible-heading, .ui-li.ui-field-contain {
+  display: block;
+  margin: 0;
+  position: relative;
+  overflow: visible;
+  text-align: left;
+}
+.ui-li .ui-btn {
+  top: 50%;
+  margin-top: -0.8em;
+}
+.ui-li h3,
+.ui-collapsible-heading h3,
+.ui-collapsible > .ui-collapsible-content h3,
+.ui-listview li h3 {
+  margin-top: 0px;
+  margin-bottom: 0px;
+  font-size: 1rem;
+  font-weight: normal;
+}
+.ui-li form,
+.ui-collapsible-heading form,
+.ui-collapsible > .ui-collapsible-content form,
+.ui-listview li form {
+  display: inline-block;
+}
+.ui-li .ui-btn-text,
+.ui-collapsible-heading .ui-btn-text,
+.ui-collapsible > .ui-collapsible-content .ui-btn-text,
+.ui-listview li .ui-btn-text {
+  position: relative;
+}
+.ui-li .ui-btn-text a.ui-link-inherit,
+.ui-collapsible-heading .ui-btn-text a.ui-link-inherit,
+.ui-collapsible > .ui-collapsible-content .ui-btn-text a.ui-link-inherit,
+.ui-listview li .ui-btn-text a.ui-link-inherit {
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  -o-text-overflow: ellipsis;
+  overflow: hidden !important;
+}
+.ui-li:last-child,
+.ui-collapsible-heading:last-child,
+.ui-collapsible > .ui-collapsible-content:last-child,
+.ui-listview li:last-child,
+.ui-li.ui-field-contain:last-child,
+.ui-collapsible-heading.ui-field-contain:last-child,
+.ui-collapsible > .ui-collapsible-content.ui-field-contain:last-child,
+.ui-listview li.ui-field-contain:last-child {
+  border-bottom-width: 1px;
+}
+.ui-li > .ui-btn-inner,
+.ui-collapsible-heading > .ui-btn-inner,
+.ui-collapsible > .ui-collapsible-content > .ui-btn-inner,
+.ui-listview li > .ui-btn-inner,
+.ui-li.ui-collapsible-heading > .ui-collapsible-heading-toggle,
+.ui-collapsible-heading.ui-collapsible-heading > .ui-collapsible-heading-toggle,
+.ui-collapsible > .ui-collapsible-content.ui-collapsible-heading > .ui-collapsible-heading-toggle,
+.ui-listview li.ui-collapsible-heading > .ui-collapsible-heading-toggle {
+  display: block;
+  position: relative;
+  padding: 0;
+  border-width: 0;
+}
+.ui-li > .ui-btn-inner.ui-btn-hastxt,
+.ui-collapsible-heading > .ui-btn-inner.ui-btn-hastxt,
+.ui-collapsible > .ui-collapsible-content > .ui-btn-inner.ui-btn-hastxt,
+.ui-listview li > .ui-btn-inner.ui-btn-hastxt {
+  padding: 0px 0px;
+}
+.ui-li .ui-btn-inner a.ui-link-inherit,
+.ui-collapsible-heading .ui-btn-inner a.ui-link-inherit,
+.ui-collapsible > .ui-collapsible-content .ui-btn-inner a.ui-link-inherit,
+.ui-listview li .ui-btn-inner a.ui-link-inherit,
+.ui-li .ui-collapsible-heading-toggle > .ui-btn-inner,
+.ui-collapsible-heading .ui-collapsible-heading-toggle > .ui-btn-inner,
+.ui-collapsible > .ui-collapsible-content .ui-collapsible-heading-toggle > .ui-btn-inner,
+.ui-listview li .ui-collapsible-heading-toggle > .ui-btn-inner,
+.ui-li > li,
+.ui-collapsible-heading > li,
+.ui-collapsible > .ui-collapsible-content > li,
+.ui-listview li > li,
+.ui-li.ui-li-static,
+.ui-collapsible-heading.ui-li-static,
+.ui-collapsible > .ui-collapsible-content.ui-li-static,
+.ui-listview li.ui-li-static {
+  padding-top: 0.6818181818181819rem;
+  padding-bottom: 0.6818181818181819rem;
+  display: block;
+  white-space: normal;
+  border-left-width: 0px;
+  border-right-width: 0px;
+}
+.ui-li .ui-btn-inner a.ui-link-inherit,
+.ui-collapsible-heading .ui-btn-inner a.ui-link-inherit,
+.ui-collapsible > .ui-collapsible-content .ui-btn-inner a.ui-link-inherit,
+.ui-listview li .ui-btn-inner a.ui-link-inherit,
+.ui-li .ui-collapsible-heading-toggle,
+.ui-collapsible-heading .ui-collapsible-heading-toggle,
+.ui-collapsible > .ui-collapsible-content .ui-collapsible-heading-toggle,
+.ui-listview li .ui-collapsible-heading-toggle {
+  white-space: normal;
+  overflow: visible !important;
+}
+.ui-li .ui-toggle-switch:last-child,
+.ui-collapsible-heading .ui-toggle-switch:last-child,
+.ui-collapsible > .ui-collapsible-content .ui-toggle-switch:last-child,
+.ui-listview li .ui-toggle-switch:last-child {
+  top: 50%;
+  margin-top: -0.7727272727272727rem;
+  display: inline-block;
+  position: absolute;
+  right: 0px;
+}
+.ui-li [data-role="button"]:last-child,
+.ui-collapsible-heading [data-role="button"]:last-child,
+.ui-collapsible > .ui-collapsible-content [data-role="button"]:last-child,
+.ui-listview li [data-role="button"]:last-child {
+  position: absolute;
+  right: 0px;
+}
+.ui-li .ui-radio:first-child,
+.ui-collapsible-heading .ui-radio:first-child,
+.ui-collapsible > .ui-collapsible-content .ui-radio:first-child,
+.ui-listview li .ui-radio:first-child,
+.ui-li .ui-checkbox:first-child,
+.ui-collapsible-heading .ui-checkbox:first-child,
+.ui-collapsible > .ui-collapsible-content .ui-checkbox:first-child,
+.ui-listview li .ui-checkbox:first-child {
+  position: absolute;
+  top: 50%;
+  margin-top: -0.6818181818181819rem;
+  left: -0.18181818181818182rem;
+  width: 1.3636363636363638rem;
+  height: 1.3636363636363638rem;
+}
+.ui-li .ui-radio:first-child .ui-btn-inner,
+.ui-collapsible-heading .ui-radio:first-child .ui-btn-inner,
+.ui-collapsible > .ui-collapsible-content .ui-radio:first-child .ui-btn-inner,
+.ui-listview li .ui-radio:first-child .ui-btn-inner,
+.ui-li .ui-checkbox:first-child .ui-btn-inner,
+.ui-collapsible-heading .ui-checkbox:first-child .ui-btn-inner,
+.ui-collapsible > .ui-collapsible-content .ui-checkbox:first-child .ui-btn-inner,
+.ui-listview li .ui-checkbox:first-child .ui-btn-inner {
+  line-height: 0.9090909090909092rem;
+  color: transparent;
+}
+.ui-li .ui-radio:first-child .ui-btn-inner .ui-icon,
+.ui-collapsible-heading .ui-radio:first-child .ui-btn-inner .ui-icon,
+.ui-collapsible > .ui-collapsible-content .ui-radio:first-child .ui-btn-inner .ui-icon,
+.ui-listview li .ui-radio:first-child .ui-btn-inner .ui-icon,
+.ui-li .ui-checkbox:first-child .ui-btn-inner .ui-icon,
+.ui-collapsible-heading .ui-checkbox:first-child .ui-btn-inner .ui-icon,
+.ui-collapsible > .ui-collapsible-content .ui-checkbox:first-child .ui-btn-inner .ui-icon,
+.ui-listview li .ui-checkbox:first-child .ui-btn-inner .ui-icon {
+  left: 0.2272727272727273rem;
+}
+.ui-li .ui-radio:first-child label.ui-btn-icon_only,
+.ui-collapsible-heading .ui-radio:first-child label.ui-btn-icon_only,
+.ui-collapsible > .ui-collapsible-content .ui-radio:first-child label.ui-btn-icon_only,
+.ui-listview li .ui-radio:first-child label.ui-btn-icon_only,
+.ui-li .ui-checkbox:first-child label.ui-btn-icon_only,
+.ui-collapsible-heading .ui-checkbox:first-child label.ui-btn-icon_only,
+.ui-collapsible > .ui-collapsible-content .ui-checkbox:first-child label.ui-btn-icon_only,
+.ui-listview li .ui-checkbox:first-child label.ui-btn-icon_only {
+  top: 0px;
+  margin-top: 0px;
+}
+.ui-li img.ui-li-bigicon,
+.ui-collapsible-heading img.ui-li-bigicon,
+.ui-collapsible > .ui-collapsible-content img.ui-li-bigicon,
+.ui-listview li img.ui-li-bigicon {
+  position: absolute;
+  width: 1.590909090909091rem;
+  height: 1.590909090909091rem;
+  top: 50%;
+  margin-top: -0.8181818181818182rem;
+}
+.ui-li img.ui-li-bigicon:first-child,
+.ui-collapsible-heading img.ui-li-bigicon:first-child,
+.ui-collapsible > .ui-collapsible-content img.ui-li-bigicon:first-child,
+.ui-listview li img.ui-li-bigicon:first-child {
+  left: 0px;
+}
+.ui-li img.ui-li-bigicon:nth-child(2),
+.ui-collapsible-heading img.ui-li-bigicon:nth-child(2),
+.ui-collapsible > .ui-collapsible-content img.ui-li-bigicon:nth-child(2),
+.ui-listview li img.ui-li-bigicon:nth-child(2) {
+  left: 1.6363636363636365rem;
+}
+.ui-li img.ui-li-bigicon:last-child,
+.ui-collapsible-heading img.ui-li-bigicon:last-child,
+.ui-collapsible > .ui-collapsible-content img.ui-li-bigicon:last-child,
+.ui-listview li img.ui-li-bigicon:last-child {
+  right: 0.7272727272727273rem;
+}
+.ui-li .ui-li-color-bar + img.ui-li-bigicon:nth-child(2),
+.ui-collapsible-heading .ui-li-color-bar + img.ui-li-bigicon:nth-child(2),
+.ui-collapsible > .ui-collapsible-content .ui-li-color-bar + img.ui-li-bigicon:nth-child(2),
+.ui-listview li .ui-li-color-bar + img.ui-li-bigicon:nth-child(2) {
+  left: 0px;
+}
+.ui-li .ui-li-color-bar,
+.ui-collapsible-heading .ui-li-color-bar,
+.ui-collapsible > .ui-collapsible-content .ui-li-color-bar,
+.ui-listview li .ui-li-color-bar {
+  position: absolute;
+  width: 0.13636363636363635rem;
+  height: 2.9545454545454546rem;
+  top: 0rem;
+  left: -0.5909090909090909rem;
+  background-color: #000000;
+}
+li.ui-li-thumbnail-right img.ui-li-bigicon.ui-li-thumb {
+  left: auto;
+  right: 0px;
+  width: 2.3181818181818183rem;
+  height: 2.3181818181818183rem;
+  margin-top: -1.1363636363636365rem;
+}
+.ui-li.ui-li-has-multiline .ui-btn-inner a.ui-link-inherit, .ui-li.ui-li-has-multiline.ui-li-static {
+  padding-top: 0.3181818181818182rem;
+  padding-bottom: 1.2727272727272727rem;
+}
+.ui-li.ui-li-has-multiline a {
+  white-space: normal;
+  overflow: visible !important;
+  padding-right: 0.7272727272727273rem;
+  /* ellipsis for normal text */
+
+}
+/********************************************/
+/************  Add ellipsis *****************/
+/********************************************/
+.ui-li.ui-li-text-ellipsis .ui-btn-inner a.ui-link-inherit {
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  -o-text-overflow: ellipsis;
+  overflow: hidden !important;
+}
+.ui-li.ui-li-text-ellipsis a {
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  -o-text-overflow: ellipsis;
+  overflow: hidden !important;
+}
+.ui-li.ui-li-text-ellipsis.ui-li-static {
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  -o-text-overflow: ellipsis;
+  overflow: hidden !important;
+}
+/********************************************/
+/*************** Edit Field *****************/
+/********************************************/
+.ui-li > input {
+  border-style: none;
+  border-width: 0px;
+  outline-color: #f8f6ef;
+  font-size: 1.0454545454545454rem;
+  line-height: 1;
+  padding-top: 0px;
+  padding-bottom: 0px;
+}
+/********************************************/
+/*************** Divider ********************/
+/********************************************/
+.ui-listview li.ui-li-divider {
+  background: #f8f6ef;
+  color: #3b73b6;
+  border-bottom-width: 0px;
+  border-top-width: 0px;
+  cursor: default;
+  counter-reset: listnumbering;
+  font-weight: bold;
+  height: 1.7272727272727273rem;
+  font-size: 0.7272727272727273rem;
+}
+.ui-listview li.ui-li-divider > .ui-btn-inner > .ui-btn-text {
+  font-size: 0.7272727272727273rem;
+}
+.ui-listview li.ui-li-divider.ui-btn {
+  top: 0px;
+  margin-top: 0rem;
+  border-radius: 0px;
+  font-size: 0.7272727272727273rem;
+}
+.ui-listview li.ui-li-divider.ui-btn .ui-btn-inner.ui-btn-hastxt {
+  height: 100%;
+  padding-left: 0px;
+}
+.ui-listview li.ui-li-divider.ui-btn .ui-btn-inner.ui-btn-hastxt .ui-btn-text {
+  position: absolute;
+  top: 0.2272727272727273rem;
+  height: 0.8181818181818182rem;
+  padding-right: 0.4545454545454546rem;
+}
+.ui-listview li.ui-li-divider:not(.ui-btn) {
+  margin-left: 0.5454545454545454rem;
+  margin-right: 0.5454545454545454rem;
+}
+.ui-listview li.ui-li-divider > .ui-btn-text {
+  position: absolute;
+  top: 0.2272727272727273rem;
+  height: 0.8181818181818182rem;
+  padding-right: 0.4545454545454546rem;
+}
+.ui-listview li.ui-li-divider[data-style="dialogue"] {
+  height: 0.9090909090909092rem;
+  padding: 0px;
+  padding-top: 0.9090909090909092rem;
+  padding-bottom: 0rem;
+  padding-left: 0.4545454545454546rem;
+  margin-left: 0.18181818181818182rem;
+  margin-right: 0.18181818181818182rem;
+  font-size: 0.7272727272727273rem;
+  font-weight: bold;
+  color: #3b73b6;
+  background: #f8f6ef;
+}
+.ui-listview li.ui-li-divider[data-style="check"] {
+  height: 1.7272727272727273rem;
+  padding-top: 0px;
+  padding-bottom: 0px;
+  padding-left: 0px;
+}
+.ui-listview li.ui-li-divider[data-style="check"] label {
+  top: 0px;
+  margin: 0;
+}
+.ui-listview li.ui-li-divider[data-style="check"] label .ui-btn-inner {
+  z-index: 5;
+  position: absolute;
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  background: #f8f6ef;
+  padding: 0;
+}
+.ui-listview li.ui-li-divider[data-style="check"] .ui-btn-text {
+  padding-left: 1.6818181818181819rem;
+}
+.ui-listview li.ui-li-divider .ui-divider-normal-line {
+  display: inline-block;
+  position: absolute;
+  top: 1.0454545454545454rem;
+  width: 100%;
+  height: 0.09090909090909091rem;
+  background: #3b73b6;
+}
+.ui-listview li.ui-li-divider.ui-btn-down-s {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.ui-listview li.ui-li-divider.ui-btn-down-s .ui-divider-normal-line {
+  background: #f8f6ef;
+}
+.ui-listview li.ui-li-divider.ui-btn-down-s label > .ui-btn-inner {
+  background: #3b73b6;
+}
+.ui-listview li.ui-li-divider + li.ui-li-dialogue {
+  border-top-left-radius: 3px;
+  border-top-right-radius: 3px;
+}
+.ui-divider-expand-div {
+  position: absolute;
+  width: 4.454545454545455rem;
+  height: 1.9090909090909092rem;
+  top: 0.4545454545454546rem;
+  right: 0px;
+  border-left-width: 1px;
+  border-left-style: solid;
+  border-left-color: rgba(0, 0, 0, 0.5);
+}
+.ui-li-has-thumb:not(.ui-li-thumbnail-right) .ui-btn-inner a.ui-link-inherit, .ui-li-has-thumb:not(.ui-li-thumbnail-right).ui-li-static {
+  padding-left: 2.0454545454545454rem;
+}
+.ui-li-has-thumb:not(.ui-li-thumbnail-right) .ui-li-text-sub {
+  padding-left: 2.0454545454545454rem;
+  padding-right: 0px;
+  /* ellipsis for sub text */
+
+}
+.ui-li-has-checkbox .ui-btn-inner a.ui-link-inherit,
+.ui-li-has-radio .ui-btn-inner a.ui-link-inherit,
+.ui-li-has-checkbox.ui-li-static,
+.ui-li-has-radio.ui-li-static {
+  padding-left: 1.6363636363636365rem;
+}
+.ui-li-has-checkbox .ui-li-text-sub, .ui-li-has-radio .ui-li-text-sub {
+  padding-left: 1.6363636363636365rem;
+}
+.ui-li-has-thumb.ui-li-has-checkbox .ui-btn-inner a.ui-link-inherit,
+.ui-li-has-thumb.ui-li-has-radio .ui-btn-inner a.ui-link-inherit,
+.ui-li-has-thumb.ui-li-has-checkbox.ui-li-static,
+.ui-li-has-thumb.ui-li-has-radio.ui-li-static {
+  padding-left: 3.5454545454545454rem;
+}
+.ui-li-has-thumb.ui-li-has-checkbox .ui-li-text-sub, .ui-li-has-thumb.ui-li-has-radio .ui-li-text-sub {
+  padding-left: 3.5454545454545454rem;
+}
+.ui-li.ui-li-has-right-circle-btn .ui-btn-inner a {
+  padding-right: 2.1818181818181817rem;
+}
+.ui-li.ui-li-has-right-btn:not(.ui-swipelist-item) .ui-btn-inner a {
+  padding-right: 3.590909090909091rem;
+}
+.ui-li.ui-li-thumbnail-right .ui-btn-inner a {
+  padding-right: 2.3636363636363638rem;
+}
+.ui-li.ui-li-static.ui-li-has-right-circle-btn {
+  padding-right: 2.1818181818181817rem;
+}
+.ui-li.ui-li-static.ui-li-has-right-btn:not(.ui-swipelist-item) {
+  padding-right: 3.590909090909091rem;
+}
+.ui-li.ui-li-static.ui-li-thumbnail-right {
+  padding-right: 2.3636363636363638rem;
+}
+.ui-li-has-icon .ui-btn-inner a.ui-link-inherit, .ui-li-has-icon.ui-li-static {
+  min-height: 20px;
+  padding-left: 40px;
+}
+.ui-li-has-icon .ui-li-text-sub {
+  padding-left: 40px;
+}
+.ui-li-heading {
+  font-size: 16px;
+  font-weight: bold;
+  display: block;
+  margin: .6em 0;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  -o-text-overflow: ellipsis;
+  overflow: hidden !important;
+}
+.ui-li-thumb, .ui-li-icon {
+  position: absolute;
+  left: 1px;
+  top: 0;
+  max-height: 3.272727272727273rem;
+  max-width: 3.272727272727273rem;
+}
+.ui-listview * .ui-btn-inner > .ui-btn > .ui-btn-inner {
+  border-top: 0px;
+}
+.ui-li-sub, .ui-li-sub-setting {
+  float: right;
+  text-align: right;
+  font-size: 0.7272727272727273rem;
+  margin: .3em 0;
+}
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+/* ~~~~~~~~~~~~~~              NEW   LIST   STYLE                   ~~~~~~~~~ */
+/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
+.ui-li-text-sub {
+  float: right;
+  text-align: right;
+  font-size: 0.7272727272727273rem;
+  color: #646464;
+  position: absolute;
+  right: 0px;
+  top: 0.9090909090909092rem;
+  width: 95%;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  -o-text-overflow: ellipsis;
+  overflow: hidden !important;
+}
+.ui-li-text-sub > img {
+  position: relative;
+  width: 0.7727272727272727rem;
+  height: 0.7727272727272727rem;
+  margin: 0 0.36363636363636365rem 0 0.36363636363636365rem;
+}
+.ui-li-text-sub2 {
+  float: right;
+  text-align: right;
+  font-size: 0.7272727272727273rem;
+  color: #646464;
+  position: absolute;
+  right: 0px;
+  top: 0.7272727272727273rem;
+  width: 60%;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  -o-text-overflow: ellipsis;
+  overflow: hidden !important;
+}
+.ui-li-text-sub2 > img {
+  width: 0.7727272727272727rem;
+  height: 0.7727272727272727rem;
+  margin: 0 0 0 0.36363636363636365rem;
+}
+/*
+li:not(.ui-li-has-multiline) .ui-li-text-sub {
+       position : absolute;
+       right : 16 * @unit_base;
+       top: 22 * @unit_base;
+       margin-top: 0px;
+}*/
+.ui-li-has-multiline .ui-li-text-sub {
+  position: absolute;
+  text-align: left;
+  right: auto;
+  left: 0px;
+  top: 1.590909090909091rem;
+  margin-top: 0px;
+  width: 90%;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  -o-text-overflow: ellipsis;
+  overflow: hidden !important;
+}
+.ui-li-has-multiline.ui-li-has-right-btn .ui-btn-inner a .ui-li-text-sub {
+  width: 74%;
+}
+.ui-li-has-multiline.ui-li-has-right-btn.ui-li-has-thumb .ui-btn-inner a .ui-li-text-sub {
+  width: 64%;
+}
+.ui-li-has-multiline.ui-li-static.ui-li-has-right-btn .ui-li-text-sub {
+  width: 74%;
+}
+.ui-li-has-multiline.ui-li-static.ui-li-has-right-btn.ui-li-has-thumb .ui-li-text-sub {
+  width: 64%;
+}
+.ui-li-icon-sub-right, .ui-li-icon-sub {
+  position: absolute;
+  left: auto;
+  width: 0.7727272727272727rem;
+  height: 0.7727272727272727rem;
+  margin: 0 0;
+}
+.ui-li-icon-sub-right {
+  right: 0.36363636363636365rem;
+}
+.ui-listview li.ui-li-dialogue {
+  margin-left: 0.18181818181818182rem;
+  margin-right: 0.18181818181818182rem;
+  padding-left: 0.4545454545454546rem;
+  padding-right: 0.4545454545454546rem;
+  border-style: solid;
+  border-color: #8e9aa3;
+  border-width: 1px;
+}
+.ui-listview li.ui-li-dialogue > .ui-btn-inner {
+  margin-left: 0px;
+  margin-right: 0px;
+  border-bottom-width: 0px;
+}
+.ui-listview li.ui-li-dialogue:first-child {
+  border-top-width: 1px;
+  border-top-left-radius: 3px;
+  border-top-right-radius: 3px;
+}
+.ui-listview li.ui-li-dialogue:last-child {
+  border-bottom-left-radius: 3px;
+  border-bottom-right-radius: 3px;
+}
+.ui-listview li.ui-li-dialogue > img {
+  margin-left: 0.2727272727272727rem;
+}
+.ui-listview li.ui-li-dialogue [data-role="button"]:last-child {
+  margin-right: 0.4545454545454546rem;
+}
+.ui-listview li.ui-li-dialogue .ui-link-inherit > .ui-btn {
+  margin-right: 0px;
+}
+.ui-listview li.ui-li-dialogue.ui-li-static .ui-li-text-sub, .ui-listview li.ui-li-dialogue.ui-li-static .ui-toggle-switch {
+  right: 0.4545454545454546rem;
+}
+.ui-listview li.ui-li-dialogue.ui-li-static.ui-li-has-checkbox, .ui-listview li.ui-li-dialogue.ui-li-static.ui-li-has-radio {
+  padding-left: 1.6363636363636365rem;
+}
+.ui-listview li.ui-li-dialogue.ui-li-static .ui-checkbox, .ui-listview li.ui-li-dialogue.ui-li-static .ui-radio {
+  left: 0px;
+}
+.ui-listview li.ui-li-dialogue.ui-li-has-multiline.ui-li-static .ui-li-text-sub {
+  padding-left: 0.4545454545454546rem;
+}
+.ui-listview li.ui-li-dialogue.ui-li-has-multiline.ui-li-static .ui-li-text-sub2 {
+  padding-right: 0.4545454545454546rem;
+}
+.ui-listview li.ui-li-dialogue.ui-li-has-multiline.ui-li-static.ui-li-has-checkbox .ui-li-text-sub, .ui-listview li.ui-li-dialogue.ui-li-has-multiline.ui-li-static.ui-li-has-radio .ui-li-text-sub {
+  padding-left: 1.9090909090909092rem;
+}
+.ui-listview > li.ui-li-dialogue.ui-body-s:not(.ui-li-expanded), .ui-listview > li.ui-li-dialogue.ui-btn-hover-up-s:not(.ui-btn-down-s):not(.ui-li-expanded), .ui-listview > li.ui-li-dialogue.ui-btn-up-s:not(.ui-li-expanded) {
+  background: #efede5;
+}
+.ui-listview > li.ui-li-dialogue.ui-li-expanded {
+  padding-left: 1.1818181818181819rem;
+  background: #dcdad3;
+}
+.ui-listview > li.ui-li-dialogue.ui-li-divider {
+  height: 1.4545454545454546rem;
+  padding: 0px;
+}
+.ui-listview > li.ui-li-group-title {
+  padding-top: 1.4545454545454546rem;
+}
+.ui-listview > li.ui-li-group-title span {
+  padding-left: 0.7272727272727273rem;
+}
+.ui-listview > li.ui-li-dialogue-divider {
+  padding-top: 0.9090909090909092rem;
+  padding-bottom: 0rem;
+  padding-left: 0.4545454545454546rem;
+  margin-left: 0.18181818181818182rem;
+  margin-right: 0.18181818181818182rem;
+  background: #efede5;
+  font-size: 0.7272727272727273rem;
+  font-weight: bold;
+  color: #3b73b6;
+}
+.ui-listview li.ui-li-dialogue-edit {
+  padding-left: 5.2727272727272725rem;
+  padding-top: 0.5454545454545454rem;
+  padding-bottom: 0.5454545454545454rem;
+}
+.ui-listview li.ui-li-dialogue-edit .ui-edit-title {
+  position: absolute;
+  left: 0.4545454545454546rem;
+  width: 4.136363636363637rem;
+  padding-right: 0.36363636363636365rem;
+  display: inline-block;
+  top: 50%;
+  margin-top: -0.5909090909090909rem;
+  border-right-color: #b9b8b2;
+  border-right-width: 1px;
+  border-right-style: solid;
+}
+.ui-listview li.ui-li-dialogue-edit input {
+  font-size: 1rem;
+  background: transparent;
+  outline-color: transparent;
+  width: 100%;
+  padding-left: 0px;
+  padding-right: 0px;
+}
+.ui-listview > .ui-li.ui-li-dialogue-edit.ui-li-has-right-btn {
+  padding-right: 5rem;
+}
+.ui-listview .ui-li-static.ui-li-bubble-receive, .ui-listview .ui-li-static.ui-li-bubble-left {
+  color: #ffffff;
+}
+.ui-listview .ui-li-static.ui-li-bubble-receive > .ui-li-bubble-time, .ui-listview .ui-li-static.ui-li-bubble-left > .ui-li-bubble-time {
+  color: #d30000;
+}
+.ui-listview .ui-li-static.ui-li-bubble-sent, .ui-listview .ui-li-static.ui-li-bubble-right {
+  color: #000000;
+}
+.ui-listview .ui-li-static.ui-li-bubble-sent > .ui-li-bubble-time, .ui-listview .ui-li-static.ui-li-bubble-right > .ui-li-bubble-time {
+  color: #39a6d7;
+}
+.ui-listview .ui-li-static.ui-li-bubble-sos {
+  color: #e94949;
+}
+.ui-listview .ui-li-static.ui-li-bubble-sos > .ui-li-bubble-time {
+  color: #d30000;
+}
+.ui-listview .ui-li-static.ui-li-bubble-date {
+  background-color: rgba(225, 225, 225, 0);
+  color: #686868;
+  font-style: italic;
+}
+.ui-listview span.ui-li-bubble-time {
+  font-weight: bold;
+}
+.ui-listview .ui-li-bubble-receive,
+.ui-listview .ui-li-bubble-left,
+.ui-listview .ui-li-bubble-sent,
+.ui-listview .ui-li-bubble-right,
+.ui-listview .ui-li-bubble-sos {
+  display: inline-block;
+  background-clip: padding-box;
+  max-width: 80%;
+  word-wrap: break-word;
+  font-size: 0.8636363636363636rem;
+}
+.ui-listview .ui-li-bubble-receive p,
+.ui-listview .ui-li-bubble-left p,
+.ui-listview .ui-li-bubble-sent p,
+.ui-listview .ui-li-bubble-right p,
+.ui-listview .ui-li-bubble-sos p,
+.ui-listview .ui-li-bubble-receive span,
+.ui-listview .ui-li-bubble-left span,
+.ui-listview .ui-li-bubble-sent span,
+.ui-listview .ui-li-bubble-right span,
+.ui-listview .ui-li-bubble-sos span {
+  font-size: 0.8636363636363636rem;
+}
+.ui-listview .ui-li-bubble-receive img,
+.ui-listview .ui-li-bubble-left img,
+.ui-listview .ui-li-bubble-sent img,
+.ui-listview .ui-li-bubble-right img,
+.ui-listview .ui-li-bubble-sos img {
+  position: relative;
+  min-width: 7.272727272727273rem;
+  min-height: 7.272727272727273rem;
+}
+.ui-listview .ui-li-bubble-receive, .ui-listview .ui-li-bubble-left {
+  margin-left: 0px;
+  margin-right: auto;
+  border-image-source: url(images/00_messagebubble_bg_receive.9.png);
+  border-image-slice: 57 14 21 48 fill;
+  border-image-width: auto;
+  padding: 9px 14px 21px 48px;
+}
+.ui-listview .ui-li-bubble-receive > .ui-li-bubble-time, .ui-listview .ui-li-bubble-left > .ui-li-bubble-time {
+  position: absolute;
+  display: inline-block;
+  bottom: 0.36363636363636365rem;
+  left: 100%;
+  font-size: 0.5rem;
+}
+.ui-listview .ui-li-bubble-sent, .ui-listview .ui-li-bubble-right {
+  margin-left: auto;
+  margin-right: 0px;
+  border-image-source: url(images/00_messagebubble_bg_sent.9.png);
+  border-image-slice: 55 47 20 13 fill;
+  border-image-width: auto;
+  padding: 9px 47px 20px 13px;
+}
+.ui-listview .ui-li-bubble-sent > .ui-li-bubble-time, .ui-listview .ui-li-bubble-right > .ui-li-bubble-time {
+  position: absolute;
+  display: inline-block;
+  bottom: 0.36363636363636365rem;
+  right: 100%;
+  font-size: 0.5rem;
+}
+.ui-listview .ui-li-bubble-date {
+  float: left;
+  width: 100%;
+  height: 1.0909090909090908rem;
+  background-image: url(images/00_messagebubble_date_bg.png);
+  background-repeat: repeat-x;
+  background-position: center center;
+  font-size: 0.7272727272727273rem;
+  margin: 0.9090909090909092rem 0.2727272727272727rem;
+  border: 0px none red;
+  padding: 0 0;
+  padding-top: 0.5em;
+  text-align: center;
+}
+.ui-listview .ui-li-bubble-date * {
+  display: inline-block;
+  background-color: #f8f6ef;
+  padding-left: 0.5em;
+  padding-right: 0.5em;
+}
+@-webkit-keyframes addliitem {
+  from {
+    -webkit-transform: scale(0.5);
+    -moz-transform: scale(0.5);
+    opacity: 0;
+  }
+  to {
+    -webkit-transform: scale(1);
+    -moz-transform: scale(1);
+    opacity: 1;
+  }
+}
+.addli {
+  -webkit-animation-name: addliitem;
+  -moz-animation-name: addliitem;
+  -webkit-animation-duration: 0.5s;
+  -moz-animation-duration: 0.5s;
+  -webkit-transition-timing-function: linear;
+  -moz-transition-timing-function: linear;
+}
+@-webkit-keyframes removeliitem {
+  from {
+    -webkit-transform: scale(1);
+    -moz-transform: scale(1);
+    opacity: 1;
+  }
+  to {
+    -webkit-transform: scale(0.5);
+    -moz-transform: scale(0.5);
+    opacity: 0;
+  }
+}
+.removeli {
+  -webkit-animation-name: removeliitem;
+  -moz-animation-name: removeliitem;
+  -webkit-animation-duration: 0.5s;
+  -moz-animation-duration: 0.5s;
+  -webkit-transition-timing-function: linear;
+  -moz-transition-timing-function: linear;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-controlgroup .ui-radio > .ui-btn {
+  background: #f8f6ef;
+}
+.ui-controlgroup .ui-btn-text {
+  font-size: 0.7727272727272727rem;
+  font-weight: bold;
+  color: #3a3a3a;
+}
+.ui-controlgroup .ui-btn-inner .ui-corner-left .ui-controlgroup-first {
+  -o-border-radius: .3em;
+  -ms-border-radius: .3em;
+  -moz-border-radius: .3em ;
+  -webkit-border-radius: .3em ;
+  border-radius: .3em ;
+}
+.ui-controlgroup .ui-btn-inner .ui-corner-right .ui-controlgroup-last {
+  -o-border-radius: .3em;
+  -ms-border-radius: .3em;
+  -moz-border-radius: .3em ;
+  -webkit-border-radius: .3em ;
+  border-radius: .3em ;
+}
+.ui-controlgroup .ui-radio-off.ui-btn-hover-s.ui-btn-down-s .ui-btn-inner, .ui-controlgroup .ui-radio-on .ui-btn-inner {
+  color: #f9f9f9;
+}
+.ui-controlgroup .ui-radio-off .ui-btn-inner {
+  color: #f9f9f9;
+}
+.ui-controlgroup.ui-controlgroup-horizontal .ui-radio .ui-btn-down-s .ui-btn-inner {
+  background: -webkit-linear-gradient(top, #d2d2c8 0%, #f6f8ef 100%);
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-option-header {
+  overflow: hidden;
+  background: #1a5274;
+}
+.ui-option-header-1-row {
+  height: 4.818181818181818rem;
+  border: none;
+}
+.ui-option-header-2-row {
+  height: 8.90909090909091rem;
+  border: none;
+}
+.ui-option-header-row-1 {
+  height: 4.818181818181818rem;
+}
+.ui-option-header-row-2 {
+  height: 8.90909090909091rem;
+  margin-top: -2px;
+  padding: 0rem 0.2272727272727273rem 0.2727272727272727rem 0.2272727272727273rem;
+}
+.ui-option-header-row-2 div {
+  margin-top: 0.2272727272727273rem;
+  margin-bottom: 0.2272727272727273rem;
+}
+.ui-option-header .ui-btn {
+  display: block;
+  margin: 0.13636363636363635rem 0.2272727272727273rem 0.2272727272727273rem 0.2272727272727273rem;
+}
+.ui-option-header .ui-input-search .ui-btn {
+  display: none;
+}
+.ui-option-header .ui-btn-text {
+  line-height: 1.5454545454545454rem;
+  font-weight: bold;
+}
+.ui-option-header .ui-btn-down-s.ui-btn-hover-s .ui-btn-inner, .ui-option-header .ui-btn-down-s .ui-btn-inner {
+  background: -webkit-linear-gradient(top, #4aa4da 0%, #2b8ac3 100%);
+}
+.ui-option-header .ui-btn-hover-s .ui-btn-inner, .ui-option-header .ui-btn-up-s .ui-btn-inner {
+  background: -webkit-linear-gradient(top, #38708d 0%, #245d80 100%);
+}
+.ui-option-header .ui-btn-inner {
+  padding-top: 0.2727272727272727rem;
+  padding-bottom: 0.2727272727272727rem;
+  color: #f9f9f9;
+}
+.ui-option-header .ui-controlgroup-horizontal .ui-btn {
+  display: inline-block !important;
+  margin: -0.13636363636363635rem !important;
+}
+.ui-option-header .ui-controlgroup, .ui-option-header fieldset.ui-controlgroup {
+  margin-bottom: 0px !important;
+}
+.ui-option-header .ui-controlgroup-horizontal .ui-corner-left {
+  margin-left: 0.2272727272727273rem !important;
+}
+.ui-option-header .ui-controlgroup-horizontal .ui-corner-right {
+  margin-right: 0.2272727272727273rem !important;
+}
+.ui-option-header-triangle-arrow {
+  top: -0.5454545454545454rem;
+  height: 0.4545454545454546rem;
+  width: 100%;
+  position: relative;
+  margin-bottom: -0.4545454545454546rem;
+}
+.ui-header.ui-option-header-resizing .ui-option-header .ui-btn {
+  background: transparent;
+  border: none;
+  width: 100%;
+  top: 0.7272727272727273rem;
+}
+.ui-header.ui-option-header-resizing .ui-option-header .ui-btn .ui-btn-inner {
+  width: 92%;
+  padding: 0.66em 0px 0.66em;
+  margin: 0px auto;
+}
+.ui-header.ui-option-header-resizing .ui-option-header .input-search-bar .ui-btn {
+  width: 28%;
+  /* 134  * @unit_base; */
+
+}
+/*
+.ui-triangle {
+  color : @color_optionheader_Background; 
+
+  position: absolute;
+  bottom: 0px;
+  border-style: solid;
+       
+       margin-left : -10 * @unit_base;
+
+       border-left-width : 10 * @unit_base;
+       border-top-width : 0 * @unit_base;
+       border-right-width :10 * @unit_base;
+       border-bottom-width : 10 * @unit_base;
+       border-bottom-color : @color_optionheader_Background;
+}
+*/
+.ui-triangle-image {
+  background-image: url(images/00_winset_control_top_arrow.png);
+  background-size: 100% 100%;
+  position: absolute;
+  width: 1.2727272727272727rem;
+  height: 1.0909090909090908rem;
+  left: 50%;
+}
+.ui-btn-up-s .ui-icon-optiontray, .ui-btn-hover-s .ui-icon-optiontray {
+  background-size: 100% 100%;
+  background-image: url(images/00_winset_more.png);
+}
+.ui-btn-down-s .ui-icon-optiontray {
+  background-size: 100% 100%;
+  background-image: url(images/00_winset_more_press.png);
+}
+.ui-header .ui-btn .ui-btn-icon-only {
+  padding: 0 0 0 0;
+  height: 100%;
+}
+.ui-header .ui-btn .ui-btn-icon-only .ui-icon-optiontray {
+  width: 2.5454545454545454rem;
+  height: 2.5454545454545454rem;
+  left: 1.3636363636363638rem;
+}
+/*
+* jQuery Mobile Framework
+* Copyright (c) jQuery Project
+* Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt) licenses.
+*/
+/*** less definitions ***/
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+ul.ui-virtual-list-container > li.position_absolute {
+  position: absolute;
+}
+ul.ui-virtual-list-container > ul.position_absolute {
+  position: absolute;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-scrollview-clip {
+  position: relative;
+}
+.ui-scrollview-view {
+  overflow: visible;
+  overflow-x: hidden;
+}
+.ui-scrolllistview .ui-li-divider {
+  z-index: 10;
+}
+.ui-scrollbar {
+  position: absolute;
+  overflow: hidden;
+  opacity: 0;
+}
+.ui-scrollbar-visible {
+  opacity: 1;
+}
+.ui-scrollbar-y {
+  top: 0.09090909090909091rem;
+  right: 0.09090909090909091rem;
+  bottom: 0.09090909090909091rem;
+  width: 0.36363636363636365rem;
+}
+.ui-scrollbar-x {
+  right: 0.09090909090909091rem;
+  bottom: 0.09090909090909091rem;
+  left: 0.09090909090909091rem;
+  height: 0.36363636363636365rem;
+}
+.ui-scrollbar-track {
+  position: relative;
+  width: 100%;
+  height: 100%;
+}
+.ui-scrollbar-thumb {
+  position: absolute;
+  top: 0;
+  left: 0;
+  background-color: #c6c4be;
+}
+.ui-scrollbar-y .ui-scrollbar-thumb {
+  width: 0.2272727272727273rem;
+  height: 100%;
+  -o-border-radius: 0.09090909090909091rem;
+  -ms-border-radius: 0.09090909090909091rem;
+  -moz-border-radius: 0.09090909090909091rem;
+  -webkit-border-radius: 0.09090909090909091rem;
+  border-radius: 0.09090909090909091rem;
+  -o-box-shadow: 0.045454545454545456rem 0.045454545454545456rem 0.09090909090909091rem #94928c;
+  -ms-box-shadow: 0.045454545454545456rem 0.045454545454545456rem 0.09090909090909091rem #94928c;
+  -moz-box-shadow: 0.045454545454545456rem 0.045454545454545456rem 0.09090909090909091rem #94928c;
+  -webkit-box-shadow: 0.045454545454545456rem 0.045454545454545456rem 0.09090909090909091rem #94928c;
+  box-shadow: 0.045454545454545456rem 0.045454545454545456rem 0.09090909090909091rem #94928c;
+}
+.ui-scrollbar-x .ui-scrollbar-thumb {
+  width: 100%;
+  height: 0.2272727272727273rem;
+  -o-border-radius: 0.09090909090909091rem;
+  -ms-border-radius: 0.09090909090909091rem;
+  -moz-border-radius: 0.09090909090909091rem;
+  -webkit-border-radius: 0.09090909090909091rem;
+  border-radius: 0.09090909090909091rem;
+}
+.ui-scroll-jump-top-bg {
+  position: absolute;
+  top: 0.4090909090909091rem;
+  right: 0.5909090909090909rem;
+  width: 1.6818181818181819rem;
+  height: 1.6818181818181819rem;
+}
+.ui-scroll-jump-left-bg {
+  position: absolute;
+  bottom: 0.4090909090909091rem;
+  left: 0.5909090909090909rem;
+  width: 1.6818181818181819rem;
+  height: 1.6818181818181819rem;
+}
+.ui-overflow-indicator-top {
+  position: absolute;
+  display: block;
+  top: 0;
+  width: 100%;
+  height: 0.4545454545454546rem;
+  opacity: 0;
+  background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ffffff), color-stop(1, #808080));
+}
+.ui-overflow-indicator-bottom {
+  position: absolute;
+  display: block;
+  bottom: 0;
+  width: 100%;
+  height: 0.4545454545454546rem;
+  opacity: 0;
+  background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #808080), color-stop(1, #ffffff));
+}
+/*
+ * the values below are for the group index
+ */
+/*
+ * padding here set to zero - otherwise the list scrolls underneith the top heading and can be seen above it
+ */
+.ui-content.ui-scrollview-clip {
+  padding: 0;
+}
+.ui-content.ui-scrollview-clip > div.ui-scrollview-view {
+  margin: 0;
+  padding-left: 0.36363636363636365rem;
+  padding-right: 0.36363636363636365rem;
+}
+/*
+ * this seems to effect how far the top divider is place wrt to the scrollview
+ * without this, it is placed too high, so it is clipped in half
+ */
+.ui-content.ui-scrollview-clip > .ui-listview.ui-scrollview-view {
+  margin: 0;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+@-webkit-keyframes ui-datetime-in {
+  from {
+    -webkit-transform: translatey(0.6363636363636364rem) scale(0.9);
+  }
+  to {
+    -webkit-transform: translatey(0) scale(1);
+  }
+}
+@-webkit-keyframes ui-datetime-out {
+  from {
+    opacity: 0.8;
+    -webkit-transform: translatey(0) scale(0.6);
+  }
+  to {
+    opacity: 0;
+    -webkit-transform: translatey(-0.6363636363636364rem) scale(0.6);
+  }
+}
+.ui-datefield .ui-datefield-seperator {
+  display: inline-block;
+  min-width: 0.4545454545454546rem;
+  text-align: center;
+}
+.ui-datefield .date, .ui-datefield .time, .ui-datefield .ui-datefield-tab {
+  display: inline-block;
+}
+.ui-datefield .ui-datefield-tab {
+  min-width: 0.9090909090909092rem;
+}
+.ui-datefield .ui-btn-box-s .ui-btn-inner.ui-btn-hastxt {
+  padding: 0.1em 0.5em;
+}
+.ui-datefield .ui-datefield-selected {
+  display: inline-block;
+  color: #3b73b6;
+}
+.ui-datefield .ui-datefield-selected.in {
+  -ms-animation: ui-datetime-in 0.3s 1 ease;
+  -o-animation: ui-datetime-in 0.3s 1 ease;
+  -moz-animation: ui-datetime-in 0.3s 1 ease;
+  -webkit-animation: ui-datetime-in 0.3s 1 ease;
+}
+.ui-datefield .ui-datefield-selected.out {
+  -ms-animation: ui-datetime-out 0.3s 1 ease;
+  -o-animation: ui-datetime-out 0.3s 1 ease;
+  -moz-animation: ui-datetime-out 0.3s 1 ease;
+  -webkit-animation: ui-datetime-out 0.3s 1 ease;
+}
+.ui-datetime {
+  margin: 0;
+  height: 1.6363636363636365rem;
+}
+.ui-datetime-text-main {
+  position: relative;
+  font-size: 1rem;
+  top: 0 ;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+  padding-top: 0.3em;
+}
+.ui-datetime-text-main .ui-datefield-period.ui-btn {
+  margin-top: -0.3em;
+  height: 1.2727272727272727rem;
+  right: auto;
+  position: relative ! important;
+}
+.ui-datetime-text-sub {
+  top: 0.6818181818181819rem ! important;
+  color: #3b73b6 ! important;
+  background: transparent ! important;
+  font-size: 0.7272727272727273rem ! important;
+}
+.ui-datetimepicker-selector ul {
+  padding: 0;
+  display: inline;
+  list-style: none;
+  vertical-align: middle;
+  margin: 0;
+}
+.ui-datetimepicker-selector ul li {
+  font-size: 1rem;
+  float: left;
+  padding: 0.6818181818181819rem 0.18181818181818182rem 0 0.18181818181818182rem;
+  max-width: 5.454545454545455rem;
+  min-width: 2.7272727272727275rem;
+}
+.ui-datetimepicker-selector ul li a.ui-link {
+  text-decoration: none;
+  color: rgba(249, 249, 249, 0.4);
+}
+.ui-datetimepicker-selector ul li a.ui-link:hover {
+  color: rgba(249, 249, 249, 0.4);
+}
+.ui-datetimepicker-selector ul li.current a.ui-link {
+  color: #f9f9f9;
+}
+.ui-datetimepicker {
+  left: 0 !important;
+  padding: 0;
+}
+.ui-datetimepicker .ui-popupwindow-padding {
+  background: #3b73b6 !important;
+  border-radius: 0 !important;
+  -ms-border-radius: 0 !important;
+  -o-border-radius: 0 !important;
+  -moz-border-radius: 0 !important;
+  -webkit-border-radius: 0 !important;
+  box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.6) !important;
+  border-width: 0 !important;
+  text-align: center !important;
+}
+.ui-datetimepicker .ui-popupwindow-padding div {
+  height: 2.409090909090909rem;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+/* Resource color mapping table
+
+@color_popup_title_bg: popup_title_bg.png
+@color_popup_text_bg:  popup_bg.png
+@color_popup_button_bg:        popup_button_bg.png
+@color_popup_font:             Popup title & default
+@color_popup_text_font:        Popup text
+
+*/
+.ui-popupwindow-screen {
+  background: #000000;
+  opacity: 0;
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 1200;
+}
+.ui-popupwindow {
+  position: absolute;
+  z-index: 1201 !important;
+  color: #f8f6ef;
+  background: #f8f6ef;
+}
+.ui-popupwindow .popup-title {
+  width: 100%;
+  height: 100%;
+  font-size: 1.0909090909090908rem;
+  background: #5093b6;
+}
+.ui-popupwindow .popup-title p {
+  margin: 0rem 0rem;
+  padding: 0.5909090909090909rem 0rem;
+}
+.ui-popupwindow .popup-text {
+  width: 100%;
+  color: black;
+  font-size: 1.0909090909090908rem;
+  background: #f8f6ef;
+}
+.ui-popupwindow .popup-text p {
+  text-align: center;
+  padding: 1rem 0.7272727272727273rem;
+}
+.ui-popupwindow .center_info {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+}
+.ui-popupwindow .center_title {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .center_basic_1btn {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .center_basic_1btn .popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_basic_1btn .popup-button-bg .ui-btn {
+  width: 18.272727272727273rem;
+  height: 3.3636363636363638rem;
+  margin: auto;
+}
+.ui-popupwindow .center_basic_2btn {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .center_basic_2btn .popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_basic_2btn .popup-button-bg .ui-btn {
+  width: 12.454545454545455rem;
+  height: 3.3636363636363638rem;
+  margin-top: 0rem;
+  margin-bottom: 0rem;
+  margin-left: 0.2272727272727273rem;
+  margin-right: 0.2272727272727273rem;
+  display: inline-block;
+}
+.ui-popupwindow .center_basic_3btn {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .center_basic_3btn .popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_basic_3btn .popup-button-bg .ui-btn {
+  width: 8.454545454545455rem;
+  height: 3.3636363636363638rem;
+  margin-top: 0rem;
+  margin-bottom: 0rem;
+  margin-left: 0.2272727272727273rem;
+  margin-right: 0.2272727272727273rem;
+  display: inline-block;
+}
+.ui-popupwindow .center_title_1btn {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .center_title_1btn .popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_title_1btn .popup-button-bg .ui-btn {
+  width: 18.272727272727273rem;
+  height: 3.3636363636363638rem;
+  margin: auto;
+}
+.ui-popupwindow .center_title_2btn {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .center_title_2btn .popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_title_2btn .popup-button-bg .ui-btn {
+  width: 12.454545454545455rem;
+  height: 3.3636363636363638rem;
+  margin-top: 0rem;
+  margin-bottom: 0rem;
+  margin-left: 0.2272727272727273rem;
+  margin-right: 0.2272727272727273rem;
+  display: inline-block;
+}
+.ui-popupwindow .center_title_3btn {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .center_title_3btn .popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_title_3btn .popup-button-bg .ui-btn {
+  width: 8.454545454545455rem;
+  height: 3.3636363636363638rem;
+  margin-top: 0rem;
+  margin-bottom: 0rem;
+  margin-left: 0.2272727272727273rem;
+  margin-right: 0.2272727272727273rem;
+  display: inline-block;
+}
+.ui-popupwindow .center_button_vertical {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .center_button_vertical .popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 1px;
+  padding-bottom: 0.7272727272727273rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_button_vertical .popup-button-bg .ui-btn {
+  width: 16.181818181818183rem;
+  height: 3.3636363636363638rem;
+  margin-top: 0.7272727272727273rem;
+  margin-bottom: 0rem;
+  margin-left: auto;
+  margin-right: auto;
+}
+.ui-popupwindow .center_checkbox {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .center_checkbox .popup-check-bg {
+  font-size: 1.0909090909090908rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0rem;
+  padding-bottom: 1rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_checkbox .popup-check-bg .ui-checkbox .ui-btn {
+  text-align: center;
+  background: #f8f6ef;
+  border: 0rem;
+}
+.ui-popupwindow .center_checkbox .popup-check-bg .ui-checkbox .ui-btn .ui-btn-inner {
+  border: 0rem;
+}
+.ui-popupwindow .center_checkbox .popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_checkbox .popup-button-bg .ui-btn {
+  width: 12.454545454545455rem;
+  height: 3.3636363636363638rem;
+  margin-top: 0rem;
+  margin-bottom: 0rem;
+  margin-left: 0.2272727272727273rem;
+  margin-right: 0.2272727272727273rem;
+  display: inline-block;
+}
+.ui-popupwindow .center_liststyle_1btn {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .center_liststyle_1btn .popup-scroller-bg {
+  width: 100%;
+  overflow: hidden;
+  background: #f8f6ef;
+  height: 23.272727272727273rem;
+}
+.ui-popupwindow .center_liststyle_1btn .popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_liststyle_1btn .popup-button-bg .ui-btn {
+  width: 18.272727272727273rem;
+  height: 3.3636363636363638rem;
+  margin: auto;
+}
+.ui-popupwindow .center_liststyle_2btn {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .center_liststyle_2btn .popup-scroller-bg {
+  width: 100%;
+  overflow: hidden;
+  background: #f8f6ef;
+  height: 23.272727272727273rem;
+}
+.ui-popupwindow .center_liststyle_2btn .popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_liststyle_2btn .popup-button-bg .ui-btn {
+  width: 12.454545454545455rem;
+  height: 3.3636363636363638rem;
+  margin-top: 0rem;
+  margin-bottom: 0rem;
+  margin-left: 0.2272727272727273rem;
+  margin-right: 0.2272727272727273rem;
+  display: inline-block;
+}
+.ui-popupwindow .center_liststyle_3btn {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .center_liststyle_3btn .popup-scroller-bg {
+  width: 100%;
+  overflow: hidden;
+  background: #f8f6ef;
+  height: 23.272727272727273rem;
+}
+.ui-popupwindow .center_liststyle_3btn .popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_liststyle_3btn .popup-button-bg .ui-btn {
+  width: 8.454545454545455rem;
+  height: 3.3636363636363638rem;
+  margin-top: 0rem;
+  margin-bottom: 0rem;
+  margin-left: 0.2272727272727273rem;
+  margin-right: 0.2272727272727273rem;
+  display: inline-block;
+}
+.ui-popupwindow .center_progressbar {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .center_progressbar .popup-text {
+  font-size: 1.1818181818181819rem;
+  font-color: #999999;
+  background: #f8f6ef;
+  width: 100%;
+  height: 3.181818181818182rem;
+}
+.ui-popupwindow .center_progressbar .popup-text p {
+  height: 100%;
+  text-align: center;
+  padding: 1rem 0.7272727272727273rem 0rem 0.7272727272727273rem;
+}
+.ui-popupwindow .center_progressbar .popup-text-bottom-bg {
+  font-size: 1.1818181818181819rem;
+  font-color: #999999;
+  background: #f8f6ef;
+  width: 100%;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_progressbar .popup-text-bottom-bg .text-left {
+  width: 40%;
+  height: 2.1818181818181817rem;
+  padding: 0rem 0.7272727272727273rem 0rem 0.7272727272727273rem;
+  text-align: left;
+  display: inline-block;
+}
+.ui-popupwindow .center_progressbar .popup-text-bottom-bg .text-right {
+  width: 40%;
+  height: 2.1818181818181817rem;
+  padding: 0rem 0.7272727272727273rem 0rem 0.7272727272727273rem;
+  text-align: right;
+  display: inline-block;
+}
+.ui-popupwindow .center_progressbar .popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .center_progressbar .popup-button-bg .ui-btn {
+  width: 18.272727272727273rem;
+  height: 3.3636363636363638rem;
+  margin: auto;
+}
+.ui-popupwindow .center_progressbar .popup-progress-bg {
+  background: #f8f6ef;
+  width: 100%;
+  height: 100%;
+}
+.ui-popupwindow .centertext_progressbar {
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  text-align: center;
+}
+.ui-popupwindow .centertext_progressbar .popup-text {
+  font-size: 1.1818181818181819rem;
+  font-color: #999999;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 1rem;
+  padding-bottom: 0.7272727272727273rem;
+}
+.ui-popupwindow .centertext_progressbar .popup-text p {
+  text-align: center;
+}
+.ui-popupwindow .centertext_progressbar .popup-text-bottom-bg {
+  font-size: 1.1818181818181819rem;
+  font-color: #999999;
+  background: #f8f6ef;
+  width: 100%;
+  vertical-align: middle;
+}
+.ui-popupwindow .centertext_progressbar .popup-text-bottom-bg .text-left {
+  width: 40%;
+  height: 1.8181818181818183rem;
+  padding: 0.7272727272727273rem 0.7272727272727273rem 1rem 0.7272727272727273rem;
+  text-align: left;
+  display: inline-block;
+}
+.ui-popupwindow .centertext_progressbar .popup-text-bottom-bg .text-right {
+  width: 40%;
+  height: 1.8181818181818183rem;
+  padding: 0.7272727272727273rem 0.7272727272727273rem 1rem 0.7272727272727273rem;
+  text-align: right;
+  display: inline-block;
+}
+.ui-popupwindow .centertext_progressbar .popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popupwindow .centertext_progressbar .popup-button-bg .ui-btn {
+  width: 18.272727272727273rem;
+  height: 3.3636363636363638rem;
+  margin: auto;
+}
+.ui-popupwindow .centertext_progressbar .popup-progress-bg {
+  background: #f8f6ef;
+  width: 100%;
+  height: 100%;
+}
+.ui-popupwindow .ui-btn {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.ui-popupwindow .ui-btn.ui-btn-hover-s {
+  background: #5e88a3;
+}
+.ui-popupwindow .ui-btn.ui-btn-down-s {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+.ui-popupwindow > .ui-volumecontrol {
+  display: table;
+  margin: auto;
+  background: rgba(0, 0, 0, 0.666667);
+  width: 18.90909090909091rem;
+  height: 30.727272727272727rem;
+  padding-top: 1rem;
+}
+.ui-popupwindow > .ui-volumecontrol h1 {
+  font-size: 1.0909090909090908rem;
+  display: table;
+  margin: auto;
+  color: #c0c0c0;
+}
+.ui-popupwindow > .ui-volumecontrol .ui-volumecontrol-icon {
+  display: table;
+  width: 100%;
+  height: 5.818181818181818rem;
+  padding-top: 0.9545454545454546rem;
+  padding-bottom: 0.9545454545454546rem;
+  padding-left: 7.5rem;
+  padding-right: 7.5rem;
+}
+.ui-popupwindow > .ui-volumecontrol .ui-volumecontrol-indicator {
+  display: table;
+  width: 100%;
+  height: 19.09090909090909rem;
+  padding-left: 3.090909090909091rem;
+  padding-right: 3.090909090909091rem;
+}
+.ui-popupwindow > .ui-volumecontrol .ui-corner-all {
+  -o-border-radius: 0.3em !important;
+  -ms-border-radius: 0.3em !important;
+  -moz-border-radius: 0.3em !important;
+  -webkit-border-radius: 0.3em !important;
+  border-radius: 0.3em !important;
+}
+.ui-popupwindow-corner-all {
+  -o-border-radius: 0em !important;
+  -ms-border-radius: 0em !important;
+  -moz-border-radius: 0em !important;
+  -webkit-border-radius: 0em !important;
+  border-radius: 0em !important;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-ctxpopup {
+  display: table;
+}
+.ui-ctxpopup .ui-ctxpopup-row .ui-triangle-top {
+  top: 2px;
+}
+.ui-ctxpopup .ui-ctxpopup-row .ui-triangle-left {
+  left: 2px;
+}
+.ui-ctxpopup .ui-ctxpopup-row .ui-triangle-right {
+  right: 2px;
+}
+.ui-ctxpopup .ui-ctxpopup-row .ui-triangle-bottom {
+  bottom: 2px;
+}
+.ui-ctxpopup .ui-ctxpopup-row {
+  display: table-row;
+}
+.ui-ctxpopup .ui-ctxpopup-row .ui-ctxpopup-cell {
+  display: table-cell;
+}
+.ui-ctxpopup .ui-ctxpopup-row .ui-popupwindow-padding {
+  background: #444444;
+  border: none;
+  -ms-box-shadow: 0rem 0rem 0.5454545454545454rem rgba(0, 0, 0, 0.6);
+  -o-box-shadow: 0rem 0rem 0.5454545454545454rem rgba(0, 0, 0, 0.6);
+  -moz-box-shadow: 0rem 0rem 0.5454545454545454rem rgba(0, 0, 0, 0.6);
+  -webkit-box-shadow: 0rem 0rem 0.5454545454545454rem rgba(0, 0, 0, 0.6);
+  box-shadow: 0rem 0rem 0.5454545454545454rem rgba(0, 0, 0, 0.6);
+  -o-border-radius: 0.3em;
+  -ms-border-radius: 0.3em;
+  -moz-border-radius: 0.3em;
+  -webkit-border-radius: 0.3em;
+  border-radius: 0.3em;
+}
+.ui-ctxpopup .ui-listview li.ui-btn-up-s, .ui-ctxpopup .ui-listview li.ui-btn-hover-s {
+  background: transparent;
+}
+.ui-ctxpopup .ui-listview li.ui-btn-down-s {
+  background: rgba(26, 82, 116, 0.3);
+}
+.ui-ctxpopup .ui-listview li:last-child {
+  border-bottom-left-radius: 0.3em;
+  border-bottom-right-radius: 0.3em;
+}
+.ui-ctxpopup .ui-listview li:first-child {
+  border-top-left-radius: 0.3em;
+  border-top-right-radius: 0.3em;
+}
+.ui-ctxpopup .ui-listview {
+  max-width: 28.181818181818183rem;
+  border: none;
+}
+.ui-ctxpopup .ui-listview > .ui-li {
+  color: #ffffff;
+  border-bottom-color: #2d2d2d;
+  border-top-width: 1px;
+  border-top-color: #5b5b5b;
+  margin-left: 0;
+  margin-right: 0;
+}
+.ui-ctxpopup .ui-listview > .ui-li:first-child, .ui-ctxpopup .ui-listview > .ui-li:last-child {
+  border-top-width: 0px;
+}
+.ui-ctxpopup .ui-listview > .ui-li .ui-btn-inner {
+  margin: 0;
+  padding-left: 0.4545454545454546rem;
+  padding-right: 0.4545454545454546rem;
+}
+.ui-ctxpopup .ui-listview li.ui-btn-up-s > .ui-li > .ui-btn-text > a.ui-link-inherit, .ui-ctxpopup .ui-listview li.ui-btn-hover-s > .ui-li > .ui-btn-text > a.ui-link-inherit, .ui-ctxpopup .ui-listview li.ui-btn-down-s > .ui-li > .ui-btn-text > a.ui-link-inherit {
+  color: #ffffff;
+}
+.ui-ctxpopup .ui-listview > .ui-li:last-child {
+  border: none;
+}
+.ui-ctxpopup .horizontal {
+  color: #ffffff;
+  max-width: 29.454545454545457rem;
+}
+.ui-ctxpopup .horizontal .icon .ui-btn {
+  padding: 0;
+  background: transparent ! important;
+}
+.ui-ctxpopup .horizontal .icon .ui-btn .ui-btn-icon-only {
+  width: 4.363636363636363rem;
+  height: 2.909090909090909rem;
+  padding: 0;
+}
+.ui-ctxpopup .horizontal .icon .ui-btn .ui-icon {
+  top: 0;
+  height: inherit;
+  width: inherit;
+  margin: 0;
+  background-position: center;
+  -ms-background-size: 2.1818181818181817rem 2.1818181818181817rem;
+  -moz-background-size: 2.1818181818181817rem 2.1818181818181817rem;
+  -o-background-size: 2.1818181818181817rem 2.1818181818181817rem;
+  -webkit-background-size: 2.1818181818181817rem 2.1818181818181817rem;
+  background-size: 2.1818181818181817rem 2.1818181818181817rem;
+}
+.ui-ctxpopup .horizontal .text {
+  padding: 0 0.4545454545454546rem;
+  min-width: 2.1818181818181817rem;
+}
+.ui-ctxpopup .horizontal a.ui-link {
+  color: #ffffff;
+  text-decoration: none;
+}
+.ui-ctxpopup .horizontal ul {
+  padding: 0;
+  display: inline-block;
+  list-style: none;
+  vertical-align: middle;
+  margin: 0;
+}
+.ui-ctxpopup .horizontal li {
+  line-height: 2.909090909090909rem;
+  min-height: 2.909090909090909rem;
+  min-width: 4.363636363636363rem;
+  float: left;
+  display: inline-block;
+  border-left: 1px solid #5b5b5b;
+  border-right: 1px solid #2d2d2d;
+  text-align: center;
+}
+.ui-ctxpopup .horizontal li:first-of-type {
+  border-top-left-radius: 0.3em;
+  border-bottom-left-radius: 0.3em;
+  border-left: none;
+}
+.ui-ctxpopup .horizontal li:last-of-type {
+  border-top-right-radius: 0.3em;
+  border-bottom-right-radius: 0.3em;
+  border-right: none;
+  margin-right: 0;
+}
+.ui-ctxpopup .horizontal li:active, .ui-ctxpopup .horizontal td:active {
+  background: #3b73b6;
+}
+.ui-ctxpopup .button table .ui-btn {
+  margin: 0rem;
+  padding: 0;
+  height: 2.5454545454545454rem;
+  width: 6rem;
+}
+.ui-arrow {
+  border-style: solid;
+  border-width: 10px;
+  width: 0;
+  height: 0px;
+  position: absolute;
+}
+.ui-arrow.top {
+  border-color: transparent transparent #444444 transparent;
+}
+.ui-arrow.left {
+  border-color: transparent transparent transparent #444444;
+}
+.ui-arrow.right {
+  border-color: transparent #444444 transparent transparent;
+}
+.ui-arrow.bottom {
+  border-color: #444444 transparent transparent transparent;
+}
+.ui-ctxpopup-container {
+  z-index: 1200;
+  display: inline-bloack;
+  position: absolute;
+  padding: 0;
+  outline: 0;
+}
+.ui-ctxpopup-container .ui-popup {
+  border: none;
+  background: #444444;
+  -o-border-radius: 0.3em;
+  -ms-border-radius: 0.3em;
+  -moz-border-radius: 0.3em;
+  -webkit-border-radius: 0.3em;
+  border-radius: 0.3em;
+}
+.ui-ctxpopup-container .ui-listview li:first-child {
+  border-top-left-radius: 0.3em;
+  border-top-right-radius: 0.3em;
+}
+.poptop {
+  -webkit-transform-origin: 0% 0%;
+  -moz-transform-origin: 0% 0%;
+}
+.poptop.in {
+  -webkit-transform: scale(1);
+  -moz-transform: scale(1);
+  opacity: 1;
+  -webkit-animation-name: scalepopin;
+  -moz-animation-name: scalepopin;
+  -webkit-animation-duration: 350ms;
+  -moz-animation-duration: 350ms;
+}
+.poptop.out {
+  -webkit-animation-name: fadeout;
+  -moz-animation-name: fadeout;
+  opacity: 0;
+  -webkit-animation-duration: 100ms;
+  -moz-animation-duration: 100ms;
+}
+.poptop.in.reverse {
+  -webkit-animation-name: fadein;
+  -moz-animation-name: fadein;
+}
+.poptop.out.reverse {
+  -webkit-transform: scale(0.8);
+  -moz-transform: scale(0.8);
+  -webkit-animation-name: scalepopout;
+  -moz-animation-name: scalepopout;
+}
+@-webkit-keyframes scalepopin {
+  from {
+    -webkit-transform: scale(0.8);
+    opacity: 0;
+  }
+  to {
+    -webkit-transform: scale(1);
+    opacity: 1;
+  }
+}
+.popbottom {
+  -webkit-transform-origin: 0% 100%;
+  -moz-transform-origin: 0% 100%;
+}
+.popbottom.in {
+  -webkit-transform: scale(1);
+  -moz-transform: scale(1);
+  opacity: 1;
+  -webkit-animation-name: scalepopin;
+  -moz-animation-name: scalepopin;
+  -webkit-animation-duration: 350ms;
+  -moz-animation-duration: 350ms;
+}
+.popbottom.out {
+  -webkit-animation-name: fadeout;
+  -moz-animation-name: fadeout;
+  opacity: 0;
+  -webkit-animation-duration: 100ms;
+  -moz-animation-duration: 100ms;
+}
+.popbottom.in.reverse {
+  -webkit-animation-name: fadein;
+  -moz-animation-name: fadein;
+}
+.popbottom.out.reverse {
+  -webkit-transform: scale(0.8);
+  -moz-transform: scale(0.8);
+  -webkit-animation-name: scalepopout;
+  -moz-animation-name: scalepopout;
+}
+@-moz-keyframes scalepopin {
+  from {
+    -moz-transform: scale(0.8);
+    opacity: 0;
+  }
+  to {
+    -moz-transform: scale(1);
+    opacity: 1;
+  }
+}
+@-webkit-keyframes scalepopout {
+  from {
+    -webkit-transform: scale(1);
+    opacity: 1;
+  }
+  to {
+    -webkit-transform: scale(0.8);
+    opacity: 0;
+  }
+}
+@-moz-keyframes scalepopout {
+  from {
+    -moz-transform: scale(1);
+    opacity: 1;
+  }
+  to {
+    -moz-transform: scale(0.8);
+    opacity: 0;
+  }
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+@-webkit-keyframes ui-scale-animation {
+  from {
+    -webkit-transform: scalex(0);
+  }
+  to {
+    -webkit-transform: scalex(1);
+  }
+}
+.ui-progressbar-value {
+  height: 100%;
+  background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #3677c3), color-stop(1, #96b8e0));
+  -o-border-radius: 0.4545454545454546rem;
+  -ms-border-radius: 0.4545454545454546rem;
+  -moz-border-radius: 0.4545454545454546rem;
+  -webkit-border-radius: 0.4545454545454546rem;
+  border-radius: 0.4545454545454546rem;
+  -o-box-shadow: -1px -1px 1px #b3c8e2;
+  -ms-box-shadow: -1px -1px 1px #b3c8e2;
+  -moz-box-shadow: -1px -1px 1px #b3c8e2;
+  -webkit-box-shadow: -1px -1px 1px #b3c8e2;
+  box-shadow: -1px -1px 1px #b3c8e2;
+}
+.ui-progressbar-bg {
+  position: relative;
+  overflow: hidden;
+  top: 0.2272727272727273rem;
+  height: 0.3181818181818182rem;
+  margin-left: 0.2272727272727273rem;
+  margin-right: 0.2272727272727273rem;
+  -o-border-radius: 0.4545454545454546rem;
+  -ms-border-radius: 0.4545454545454546rem;
+  -moz-border-radius: 0.4545454545454546rem;
+  -webkit-border-radius: 0.4545454545454546rem;
+  border-radius: 0.4545454545454546rem;
+  border: 1px;
+  border-style: solid;
+  border-color: #a3a09e;
+  -o-box-shadow: 1px -1px 1px #a3a09e;
+  -ms-box-shadow: 1px -1px 1px #a3a09e;
+  -moz-box-shadow: 1px -1px 1px #a3a09e;
+  -webkit-box-shadow: 1px -1px 1px #a3a09e;
+  box-shadow: 1px -1px 1px #a3a09e;
+  background-color: #cac8c4;
+}
+.ui-progressbar {
+  position: relative;
+  margin-left: 0.9545454545454546rem;
+  margin-right: 0.9545454545454546rem;
+  height: 0.8181818181818182rem;
+  background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #f6f3ef), color-stop(1, #cac8c4));
+  -o-box-shadow: 1px 1px 0px white;
+  -ms-box-shadow: 1px 1px 0px white;
+  -moz-box-shadow: 1px 1px 0px white;
+  -webkit-box-shadow: 1px 1px 0px white;
+  box-shadow: 1px 1px 0px white;
+  -o-border-radius: 0.4545454545454546rem;
+  -ms-border-radius: 0.4545454545454546rem;
+  -moz-border-radius: 0.4545454545454546rem;
+  -webkit-border-radius: 0.4545454545454546rem;
+  border-radius: 0.4545454545454546rem;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+/* Progress - circle style */
+@-webkit-keyframes ui-rotate-animation {
+  from {
+    -webkit-transform: rotate(0deg);
+  }
+  to {
+    -webkit-transform: rotate(360deg);
+  }
+}
+.ui-progress-container-circle {
+  position: absolute;
+}
+.ui-li .ui-progress-container-circle {
+  top: 22%;
+}
+.ui-progress-circle {
+  position: relative;
+  top: 0;
+  height: 1.4545454545454546rem;
+  width: 1.4545454545454546rem;
+  background: url(images/00_list_process_01.png) no-repeat;
+  -ms-background-size: 1.4545454545454546rem 1.4545454545454546rem;
+  -moz-background-size: 1.4545454545454546rem 1.4545454545454546rem;
+  -o-background-size: 1.4545454545454546rem 1.4545454545454546rem;
+  -webkit-background-size: 1.4545454545454546rem 1.4545454545454546rem;
+  background-size: 1.4545454545454546rem 1.4545454545454546rem;
+}
+.ui-progress-circle-running {
+  -webkit-animation: ui-rotate-animation 1s infinite linear;
+}
+/* Progress - pending style */
+@-webkit-keyframes ui-move-animation {
+  from {
+    -webkit-transform: translatey(-0.6363636363636364rem);
+  }
+  to {
+    -webkit-transform: translatey(0);
+  }
+}
+.ui-progress-pending {
+  position: relative;
+  top: 0;
+  width: 100%;
+  height: 0.9545454545454546rem;
+  padding-top: 0;
+  padding-bottom: 0;
+  background: -webkit-gradient(linear, left top, right bottom, color-stop(0%, rgba(0, 0, 0, 0)), color-stop(25%, rgba(0, 0, 0, 0)), color-stop(25%, #3677c3), color-stop(50%, #3677c3), color-stop(50%, rgba(0, 0, 0, 0)), color-stop(75%, rgba(0, 0, 0, 0)), color-stop(75%, #3677c3));
+  background-color: #cac8c4;
+  -ms-background-size: 0.6363636363636364rem 0.6363636363636364rem;
+  -moz-background-size: 0.6363636363636364rem 0.6363636363636364rem;
+  -o-background-size: 0.6363636363636364rem 0.6363636363636364rem;
+  -webkit-background-size: 0.6363636363636364rem 0.6363636363636364rem;
+  background-size: 0.6363636363636364rem 0.6363636363636364rem;
+}
+.ui-progress-pending-running {
+  -webkit-animation: ui-move-animation 0.5s infinite linear;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+label.ui-slider {
+  display: block;
+}
+select.ui-slider-switch {
+  display: none;
+}
+.ui-slider-container {
+  position: relative;
+  vertical-align: middle;
+  height: 0.8181818181818182rem;
+  margin-left: 0.7272727272727273rem;
+  margin-right: 0.7272727272727273rem;
+  margin-top: 0.8181818181818182rem;
+  margin-bottom: 0.8181818181818182rem;
+  background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #f6f3ef), color-stop(1, #cac8c4));
+  -o-box-shadow: 1px 1px 0px white;
+  -ms-box-shadow: 1px 1px 0px white;
+  -moz-box-shadow: 1px 1px 0px white;
+  -webkit-box-shadow: 1px 1px 0px white;
+  box-shadow: 1px 1px 0px white;
+  -o-border-radius: 0.4545454545454546rem;
+  -ms-border-radius: 0.4545454545454546rem;
+  -moz-border-radius: 0.4545454545454546rem;
+  -webkit-border-radius: 0.4545454545454546rem;
+  border-radius: 0.4545454545454546rem;
+}
+.ui-li > .ui-slider-container {
+  margin-top: 0;
+  margin-bottom: 0;
+}
+.ui-slider-left-volume, .ui-slider-left-bright {
+  position: absolute;
+  vertical-align: middle;
+  top: -0.5rem;
+  left: -2.272727272727273rem;
+  height: 1.6818181818181819rem;
+  width: 1.6818181818181819rem;
+  background: url(images/controls/00_slider_button_brightness_01.png) no-repeat;
+  -ms-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  -moz-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  -o-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  -webkit-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  background-size: 1.6818181818181819rem 1.6818181818181819rem;
+}
+.ui-slider-left-volume {
+  background: url(images/controls/00_slider_button_volume_01.png) no-repeat;
+  -ms-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  -moz-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  -o-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  -webkit-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  background-size: 1.6818181818181819rem 1.6818181818181819rem;
+}
+.ui-slider-right-volume, .ui-slider-right-bright {
+  position: absolute;
+  top: -0.5rem;
+  right: -2.272727272727273rem;
+  height: 1.6818181818181819rem;
+  width: 1.6818181818181819rem;
+  vertical-align: middle;
+  background: url(images/controls/00_slider_button_brightness_02.png) no-repeat;
+  -ms-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  -moz-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  -o-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  -webkit-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  background-size: 1.6818181818181819rem 1.6818181818181819rem;
+}
+.ui-slider-right-volume {
+  background: url(images/controls/00_slider_button_volume_02.png) no-repeat;
+  -ms-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  -moz-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  -o-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  -webkit-background-size: 1.6818181818181819rem 1.6818181818181819rem;
+  background-size: 1.6818181818181819rem 1.6818181818181819rem;
+}
+.ui-slider-left-text {
+  position: absolute;
+  top: -0.5rem;
+  height: 1.6818181818181819rem;
+  text-align: center;
+  color: #646464;
+}
+.ui-slider-right-text {
+  position: absolute;
+  top: -0.5rem;
+  height: 1.6818181818181819rem;
+  text-align: center;
+  color: #646464;
+}
+div.ui-slider:not(.ui-toggle-switch) {
+  position: relative;
+  top: 0.2272727272727273rem;
+  height: 0.3181818181818182rem;
+  margin-left: 0.2272727272727273rem;
+  margin-right: 0.2272727272727273rem;
+  -o-border-radius: 0.4545454545454546rem;
+  -ms-border-radius: 0.4545454545454546rem;
+  -moz-border-radius: 0.4545454545454546rem;
+  -webkit-border-radius: 0.4545454545454546rem;
+  border-radius: 0.4545454545454546rem;
+  border: 1px;
+  border-style: solid;
+  border-color: #a3a09e;
+  -o-box-shadow: 1px -1px 1px #a3a09e;
+  -ms-box-shadow: 1px -1px 1px #a3a09e;
+  -moz-box-shadow: 1px -1px 1px #a3a09e;
+  -webkit-box-shadow: 1px -1px 1px #a3a09e;
+  box-shadow: 1px -1px 1px #a3a09e;
+  background-color: #cac8c4;
+}
+div.ui-slider:not(.ui-toggle-switch) .ui-btn {
+  top: -0.75rem;
+  margin-top: 0;
+}
+div.ui-slider:not(.ui-toggle-switch) .ui-btn-inner {
+  padding: 0.3rem 0 0 0;
+}
+div.ui-slider:not(.ui-toggle-switch) .ui-btn-text {
+  color: #3b73b6;
+}
+a.ui-slider-handle {
+  position: relative;
+  z-index: 10;
+  width: 1.6363636363636365rem;
+  height: 1.6363636363636365rem;
+  margin-left: -0.8636363636363636rem;
+  color: #3b73b6;
+  font-size: 0.95rem;
+  background: url(images/controls/00_slider_handle.png) no-repeat;
+  -ms-background-size: 1.6363636363636365rem 1.6363636363636365rem;
+  -moz-background-size: 1.6363636363636365rem 1.6363636363636365rem;
+  -o-background-size: 1.6363636363636365rem 1.6363636363636365rem;
+  -webkit-background-size: 1.6363636363636365rem 1.6363636363636365rem;
+  background-size: 1.6363636363636365rem 1.6363636363636365rem;
+}
+.ui-slider-popup {
+  position: absolute !important;
+  z-index: 100;
+  width: 2.0454545454545454rem;
+  height: 2.4545454545454546rem;
+  top: -2.7272727272727275rem;
+  padding-top: 0.1rem;
+  color: #f9f9f9;
+  text-align: center;
+  font-size: 1.5rem;
+  background: url(images/controls/00_slider_popup_bg.png) no-repeat;
+  -ms-background-size: 2.0454545454545454rem 2.4545454545454546rem;
+  -moz-background-size: 2.0454545454545454rem 2.4545454545454546rem;
+  -o-background-size: 2.0454545454545454rem 2.4545454545454546rem;
+  -webkit-background-size: 2.0454545454545454rem 2.4545454545454546rem;
+  background-size: 2.0454545454545454rem 2.4545454545454546rem;
+}
+.ui-slider-bg {
+  position: absolute;
+  height: 0.3181818181818182rem;
+  width: 0;
+  background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #3677c3), color-stop(1, #96b8e0));
+  -o-border-radius: 0.4545454545454546rem;
+  -ms-border-radius: 0.4545454545454546rem;
+  -moz-border-radius: 0.4545454545454546rem;
+  -webkit-border-radius: 0.4545454545454546rem;
+  border-radius: 0.4545454545454546rem;
+  -o-box-shadow: -1px -1px 1px #b3c8e2;
+  -ms-box-shadow: -1px -1px 1px #b3c8e2;
+  -moz-box-shadow: -1px -1px 1px #b3c8e2;
+  -webkit-box-shadow: -1px -1px 1px #b3c8e2;
+  box-shadow: -1px -1px 1px #b3c8e2;
+}
+.ui-slider-handle-press {
+  position: absolute;
+  z-index: 15;
+  width: 1.6818181818181819rem;
+  height: 1.6818181818181819rem;
+  background: url(images/controls/00_slider_handle_press.png) no-repeat;
+  -ms-background-size: 1.6363636363636365rem 1.6363636363636365rem;
+  -moz-background-size: 1.6363636363636365rem 1.6363636363636365rem;
+  -o-background-size: 1.6363636363636365rem 1.6363636363636365rem;
+  -webkit-background-size: 1.6363636363636365rem 1.6363636363636365rem;
+  background-size: 1.6363636363636365rem 1.6363636363636365rem;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-gallery {
+  position: relative;
+  width: 100%;
+}
+.ui-gallery-bg {
+  display: none;
+  position: absolute;
+  text-align: center;
+  width: 100%;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+/* tickernoti */
+@-webkit-keyframes ui-ticker-show {
+  from {
+    opacity: 0;
+    -webkit-transform: translatey(-2.272727272727273rem);
+    top: -2.272727272727273rem;
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: translatey(0);
+    top: 0;
+  }
+}
+@-webkit-keyframes ui-ticker-hide {
+  from {
+    opacity: 1;
+    -webkit-transform: translatey(0);
+    top: 0;
+  }
+  to {
+    opacity: 0;
+    -webkit-transform: translatey(-2.272727272727273rem);
+    top: -2.272727272727273rem;
+  }
+}
+.ui-ticker {
+  position: fixed;
+  display: none;
+  left: 0;
+  width: 100%;
+  height: 2.272727272727273rem;
+  z-index: 2147483547;
+  background: #444444;
+}
+.ui-ticker.fix {
+  display: block;
+  top: 0;
+}
+.ui-ticker.show {
+  display: block;
+  -ms-animation: ui-ticker-show 0.8s 1 ease;
+  -o-animation: ui-ticker-show 0.8s 1 ease;
+  -moz-animation: ui-ticker-show 0.8s 1 ease;
+  -webkit-animation: ui-ticker-show 0.8s 1 ease;
+  top: 0;
+}
+.ui-ticker.hide {
+  display: block;
+  -ms-animation: ui-ticker-hide 0.8s 1 ease;
+  -o-animation: ui-ticker-hide 0.8s 1 ease;
+  -ms-animation: ui-ticker-hide 0.8s 1 ease;
+  -webkit-animation: ui-ticker-hide 0.8s 1 ease;
+  top: -2.272727272727273rem;
+}
+.ui-ticker-btn {
+  position: relative;
+  margin-top: 0.4545454545454546rem;
+  margin-left: 0.36363636363636365rem;
+  margin-right: 0.36363636363636365rem;
+  vertical-align: middle;
+  float: right;
+}
+.ui-ticker-btn .ui-btn-inner {
+  padding: 0.15rem 0 0 0;
+  height: 1.2727272727272727rem;
+  width: 3.5rem;
+  font-size: 0.81rem;
+  color: #ffffff;
+  background: #404040;
+  border: 1px;
+  border-color: #323232;
+  box-shadow: 0 0 1px 1px #323232;
+}
+.ui-ticker-btn .ui-btn-box-s.ui-btn-up-s {
+  background: #404040;
+  box-shadow: 0 0 1px 1px #323232;
+  border-color: #323232;
+}
+.ui-ticker-btn .ui-btn-box-s.ui-btn-hover-s {
+  background: #404040;
+  box-shadow: 0 0 1px 1px #323232;
+  border-color: #323232;
+}
+.ui-ticker-icon {
+  position: absolute;
+  top: 0;
+  height: 1.4545454545454546rem;
+  width: 1.4545454545454546rem;
+  margin-top: 0.4090909090909091rem;
+  margin-bottom: 0.4090909090909091rem;
+  margin-left: 0.36363636363636365rem;
+  margin-right: 0.36363636363636365rem;
+  vertical-align: middle;
+}
+.ui-ticker-text1-bg {
+  position: absolute;
+  top: 0;
+  height: 0.8181818181818182rem;
+  left: 2.1818181818181817rem;
+  margin-top: 0.36363636363636365rem;
+  font-size: 0.68rem;
+  color: #ffffff;
+}
+.ui-ticker-text2-bg {
+  position: absolute;
+  top: 0;
+  height: 0.7272727272727273rem;
+  left: 2.1818181818181817rem;
+  margin-top: 1.1818181818181819rem;
+  font-size: 0.54rem;
+  color: #ffffff;
+}
+/* smallpopup */
+@-webkit-keyframes ui-smallpopup-show {
+  from {
+    opacity: 0;
+    -webkit-transform: scaley(0);
+  }
+  to {
+    opacity: 1;
+    -webkit-transform: scaley(1);
+  }
+}
+@-webkit-keyframes ui-smallpopup-hide {
+  from {
+    opacity: 1;
+    left: 0;
+    -webkit-transform: scaley(1);
+  }
+  to {
+    opacity: 0;
+    left: 0;
+    -webkit-transform: scaley(0);
+  }
+}
+.ui-smallpopup {
+  position: fixed;
+  display: none;
+  left: 0;
+  width: 100%;
+  z-index: 1100;
+  background: #444444;
+  vertical-align: middle;
+  font-size: 0.72rem;
+  word-break: break-all;
+}
+.ui-smallpopup.fix {
+  display: block;
+}
+.ui-smallpopup.show {
+  display: block;
+  -moz-animation: ui-smallpopup-show 0.5s 1 ease;
+  -ms-animation: ui-smallpopup-show 0.5s 1 ease;
+  -o-animation: ui-smallpopup-show 0.5s 1 ease;
+  -webkit-animation: ui-smallpopup-show 0.5s 1 ease;
+}
+.ui-smallpopup.hide {
+  display: block;
+  left: -100%;
+  -moz-animation: ui-smallpopup-hide 0.5s 1 ease;
+  -ms-animation: ui-smallpopup-hide 0.5s 1 ease;
+  -o-animation: ui-smallpopup-hide 0.5s 1 ease;
+  -webkit-animation: ui-smallpopup-hide 0.5s 1 ease;
+}
+.ui-smallpopup-text-bg {
+  position: relative;
+  margin-top: 0.18181818181818182rem;
+  margin-bottom: 0.18181818181818182rem;
+  margin-left: 0.36363636363636365rem;
+  margin-right: 0.36363636363636365rem;
+  color: #ffffff;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-swipe {
+  list-style-type: none;
+}
+.ui-swipe-item {
+  height: 1.1818181818181819rem;
+  -ms-user-select: none;
+  -o-user-select: none;
+  -moz-user-select: none;
+  -webkit-user-select: none;
+  -user-select: none;
+  opacity: 0;
+  text-align: center;
+}
+.ui-swipe-item .ui-btn {
+  margin-top: -1.5em ! important;
+  position: relative ! important;
+}
+.ui-swipe-item p {
+  margin: 0;
+}
+.ui-swipe-item-cover {
+  position: absolute;
+  border: none;
+  top: 0%;
+  left: 0%;
+  width: 100%;
+  height: 100%;
+  z-index: 100;
+}
+.ui-swipe-item-cover .ui-swipe-item-cover-inner {
+  position: absolute;
+  padding-top: 0.6818181818181819rem;
+  padding-bottom: 0.6818181818181819rem;
+  padding-left: 0.36363636363636365rem;
+  width: 100%;
+  text-align: left;
+}
+.ui-swipe-item-cover .ui-swipe-item-cover-inner .ui-li-text-sub {
+  position: absolute;
+  padding-right: 0.7272727272727273rem;
+}
+.ui-swipe-item-cover p {
+  margin: 0;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-fastscroll {
+  position: absolute;
+  right: 0rem;
+  background-color: #e6e3d8;
+  width: 1.1363636363636365rem;
+  -ms-user-select: none;
+  -o-user-select: none;
+  -moz-user-select: none;
+  -webkit-user-select: none;
+  user-select: none;
+  margin: 0;
+  padding-right: 0.08em;
+  opacity: 1;
+}
+.ui-fastscroll ul {
+  list-style-type: none;
+  margin: 0;
+  padding: 0;
+}
+.ui-fastscroll li {
+  cursor: pointer;
+  color: #a09f9a;
+  padding: 0.09090909090909091rem 0.09090909090909091rem 0.09090909090909091rem 0.09090909090909091rem;
+  text-align: center;
+  font-size: 0.7272727272727273rem;
+  font-weight: bold;
+  border-left-width: 0.13636363636363635rem;
+  border-left-color: #3b73b6;
+  border-left-style: solid;
+}
+.ui-fastscroll2 {
+  position: absolute;
+  right: 0rem;
+  -ms-user-select: none;
+  -o-user-select: none;
+  -moz-user-select: none;
+  -webkit-user-select: none;
+  user-select: none;
+  margin: 0;
+  padding-right: 0.08em;
+  opacity: 1;
+}
+.ui-fastscroll2 ul {
+  list-style-type: none;
+  margin: 0;
+  padding: 0;
+}
+.ui-fastscroll2 li {
+  cursor: pointer;
+  color: #a09f9a;
+  padding: 0.09090909090909091rem 0.09090909090909091rem 0.09090909090909091rem 0.09090909090909091rem;
+  text-align: right;
+}
+.ui-fastscroll-bg {
+  position: absolute;
+  right: 0rem;
+  background-color: #e6e3d8;
+  width: 1.1363636363636365rem;
+  z-index: 10;
+  top: 0;
+}
+.ui-fastscroll-popup {
+  position: absolute;
+  background: #3b73b6;
+  color: #ffffff;
+  padding: 0.4545454545454546rem 1.3636363636363638rem;
+  -ms-box-shadow: 0.36363636363636365rem 0.4545454545454546rem 0rem rgba(199, 199, 199, 0.5);
+  -o-box-shadow: 0.36363636363636365rem 0.4545454545454546rem 0rem rgba(199, 199, 199, 0.5);
+  -moz-box-shadow: 0.36363636363636365rem 0.4545454545454546rem 0rem rgba(199, 199, 199, 0.5);
+  -webkit-box-shadow: 0.36363636363636365rem 0.4545454545454546rem 0rem rgba(199, 199, 199, 0.5);
+  box-shadow: 0.36363636363636365rem 0.4545454545454546rem 0rem rgba(199, 199, 199, 0.5);
+  text-align: center;
+  font-size: 3.409090909090909rem;
+  font-weight: bold;
+  display: none;
+  box-sizing: border-box;
+  left: 50%;
+  top: 50%;
+}
+li.ui-fastscroll-hover {
+  color: #3b73b6;
+}
+li.ui-fastscroll-hover, li.ui-fastscroll-hover-up, li.ui-fastscroll-hover-down {
+  background: #f8f6ef;
+  border-style: solid;
+  border-color: #3b73b6;
+  border-width: 0px;
+  border-right-width: 0.13636363636363635rem;
+  border-left-width: 1px;
+  border-left-color: #f8f6ef;
+}
+li.ui-fastscroll-hover-up {
+  border-top-width: 0.13636363636363635rem;
+}
+li.ui-fastscroll-hover-down {
+  border-bottom-width: 0.13636363636363635rem;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+/* dayselector CSS */
+.ui-dayselector label {
+  height: 2.5454545454545454rem;
+  width: 2.909090909090909rem;
+}
+.ui-dayselector {
+  display: inline-block;
+}
+.ui-dayselector .ui-btn {
+  border-color: #1a5274;
+  border-style: solid;
+  border-width: 0.045454545454545456rem;
+}
+.ui-dayselector .ui-btn .ui-btn-inner {
+  text-align: center;
+  padding: 0.4em 0px;
+}
+.ui-dayselector .ui-checkbox-off {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.ui-dayselector .ui-checkbox-off .ui-btn-text {
+  color: #f9f9f9;
+}
+.ui-dayselector .ui-checkbox-off.ui-btn-down-s.ui-btn-hover-s {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+.ui-dayselector .ui-checkbox-on {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+.ui-dayselector .ui-checkbox-on .ui-btn-text {
+  color: #f9f9f9;
+}
+.ui-dayselector .ui-checkbox-on.ui-btn-down-s.ui-btn-hover-s {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.ui-dayselector .ui-dayselector-label-6 .ui-btn-text {
+  color: #00a8e7;
+}
+.ui-dayselector .ui-dayselector-label-6.ui-checkbox-on .ui-btn-text {
+  color: #f9f9f9;
+}
+.ui-dayselector .ui-dayselector-label-0 .ui-btn-text {
+  color: #f01402;
+}
+.ui-dayselector .ui-checkbox {
+  height: 2.0454545454545454rem;
+}
+.ui-dayselector .ui-checkbox .ui-btn {
+  width: 2.1363636363636362rem;
+}
+.ui-dayselector .ui-checkbox .ui-btn.ui-corner-left {
+  border-top-left-radius: 0.2272727272727273rem;
+  border-bottom-left-radius: 0.2272727272727273rem;
+}
+.ui-dayselector .ui-checkbox .ui-btn.ui-corner-right {
+  border-top-right-radius: 0.2272727272727273rem;
+  border-bottom-right-radius: 0.2272727272727273rem;
+}
+.ui-dayselector .todons-dayselector-disabled .ui-dayselector-label-6 {
+  color: #121212;
+}
+.ui-dayselector .todons-dayselector-disabled .ui-dayselector-label-0 {
+  color: #363636;
+}
+.ui-dayselector.ui-controlgroup-vertical .ui-checkbox .ui-btn {
+  width: 2.909090909090909rem;
+}
+.ui-dayselector.ui-controlgroup-vertical .ui-checkbox .ui-btn .ui-btn-text {
+  margin-left: 0.09090909090909091rem;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+div.ui-slider.ui-toggle-switch {
+  width: 3rem;
+  height: 1.590909090909091rem;
+  background-color: transparent;
+  margin-top: 0.2272727272727273rem;
+  margin-bottom: 0.2272727272727273rem;
+}
+div.ui-slider.ui-toggle-switch .ui-slider-label {
+  position: absolute;
+  width: 3rem;
+  height: 1.590909090909091rem;
+  background-size: cover;
+  -ms-background-size: cover;
+  -webkit-background-size: cover;
+  -o-background-size: cover;
+  -moz-background-size: cover;
+}
+div.ui-slider.ui-toggle-switch .ui-slider-label.ui-slider-label-a {
+  background: url(images/00_button_on.png) no-repeat;
+}
+div.ui-slider.ui-toggle-switch .ui-slider-label.ui-slider-label-b {
+  background: url(images/00_button_off.png) no-repeat;
+}
+div.ui-slider.ui-toggle-switch .ui-slider-inneroffset a {
+  background: none;
+}
+.ui-slider-switch:not(.ui-toggle-switch) {
+  width: 4.181818181818182rem;
+}
+div.ui-slider.ui-slider-switch:not(.ui-toggle-switch) {
+  position: relative;
+  margin-top: 0.2272727272727273rem;
+  margin-bottom: 0.2272727272727273rem;
+  height: 1.4545454545454546rem;
+  top: 0;
+  margin: 0.2272727272727273rem;
+  border-radius: 0.6818181818181819rem;
+}
+div.ui-slider.ui-slider-switch:not(.ui-toggle-switch) .ui-slider-inneroffset {
+  position: relative;
+  margin: -1px 0.7272727272727273rem;
+  z-index: 1;
+}
+div.ui-slider.ui-slider-switch:not(.ui-toggle-switch) a.ui-slider-handle {
+  position: absolute;
+  background: #ffffff;
+  top: 50%;
+  margin: 1px 0 0 -0.6818181818181819rem;
+  border-radius: 0.6818181818181819rem;
+  border: 2px solid gray;
+  width: 1.2727272727272727rem;
+  height: 1.2727272727272727rem;
+}
+div.ui-slider.ui-slider-switch:not(.ui-toggle-switch) a.ui-slider-handle-snapping {
+  -webkit-transition: left 70ms linear;
+}
+div.ui-slider.ui-slider-switch:not(.ui-toggle-switch) span {
+  position: absolute;
+  overflow: hidden;
+  text-align: center;
+  height: 1.4545454545454546rem;
+  font-weight: bold;
+  font-size: 0.7272727272727273rem;
+  border-radius: 0.6818181818181819rem;
+  white-space: nowrap;
+  line-height: 2;
+}
+div.ui-slider.ui-slider-switch:not(.ui-toggle-switch) span.ui-slider-label-a {
+  left: 0px;
+  color: white;
+  z-index: 1;
+  text-indent: -1.5em;
+}
+div.ui-slider.ui-slider-switch:not(.ui-toggle-switch) span.ui-slider-label-b {
+  right: 0px;
+  color: black;
+  z-index: 0;
+  text-indent: 1.5em;
+}
+.ui-slider-switch .ui-slider-handle .ui-btn-inner {
+  padding: 0;
+}
+.ui-triangle-container {
+  position: relative;
+}
+.ui-triangle-container .ui-triangle {
+  position: absolute;
+  border-style: solid;
+  border-color: transparent;
+  border-width: 10px;
+}
+.ui-triangle-container .ui-triangle-top {
+  top: 0px;
+  border-top-width: 0px;
+  border-left-color: transparent;
+  border-right-color: transparent;
+  margin-left: -10px;
+}
+.ui-triangle-container .ui-triangle-bottom {
+  bottom: 0px;
+  border-bottom-width: 0px;
+  border-left-color: transparent;
+  border-right-color: transparent;
+  margin-left: -10px;
+}
+.ui-triangle-container .ui-triangle-left {
+  left: 0px;
+  margin-top: -10px;
+  border-left-width: 0px;
+  border-left-color: transparent;
+  border-right-color: transparent;
+}
+.ui-triangle-container .ui-triangle-right {
+  right: 0px;
+  margin-top: -10px;
+  border-right-width: 0px;
+  border-left-color: transparent;
+  border-right-color: transparent;
+}
+.ui-triangle-container-top {
+  height: 10px;
+  top: 0px;
+  margin-top: -10px;
+}
+.ui-triangle-container-bottom {
+  height: 10px;
+  bottom: 0px;
+  margin-bottom: -10px;
+}
+.ui-triangle-container-left {
+  width: 10px;
+}
+.ui-triangle-container-right {
+  width: 10px;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-tokentextarea {
+  display: table;
+  outline: none;
+}
+.ui-tokentextarea .ui-tokentextarea-label {
+  display: inline-block;
+  text-align: center;
+  position: relative;
+  margin-left: .3em;
+  margin-right: .3em;
+  padding: .6em 0em;
+  color: #666666;
+  font-weight: bold;
+  text-align: center;
+  font-size: 1em;
+}
+.ui-tokentextarea-input {
+  outline: none;
+  position: relative;
+  border: 0 !important;
+  padding: 0 !important;
+  margin: .5em;
+  color: #222222;
+  text-align: left;
+  font-size: 1em;
+}
+.ui-tokentextarea-input-visible {
+  display: inline-block !important;
+}
+.ui-tokentextarea-input-invisible {
+  display: none !important;
+}
+.ui-tokentextarea div {
+  display: inline-block;
+  text-align: center;
+  cursor: pointer;
+  position: relative;
+  margin-left: .3em;
+  margin-right: .3em;
+  margin-bottom: .3em;
+  margin-top: .3em;
+  padding: .2em .5em;
+  font-size: 1em;
+  text-shadow: 0 0.1em 0.1em rgba(0, 0, 0, 0.3);
+  -ms-border-radius: .2em;
+  -o-border-radius: .2em;
+  -webkit-border-radius: .2em;
+  -moz-border-radius: .2em;
+  border-radius: .2em;
+  -o-box-shadow: 0 0.1em 0.1em rgba(0, 0, 0, 0.2);
+  -ms-box-shadow: 0 0.1em 0.1em rgba(0, 0, 0, 0.2);
+  -moz-box-shadow: 0 0.1em 0.1em rgba(0, 0, 0, 0.2);
+  -webkit-box-shadow: 0 0.1em 0.1em rgba(0, 0, 0, 0.2);
+  box-shadow: 0 0.1em 0.1em rgba(0, 0, 0, 0.2);
+  color: #ffffff;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+div.ui-tokentextarea-block {
+  background-color: #5f8abd;
+  background-image: url(./images/00_contacts_button_header.png);
+  background-size: contain;
+  background-repeat: no-repeat;
+  padding-left: .7em;
+}
+div.ui-tokentextarea-sblock {
+  background-color: #365984;
+  background-image: url(./images/00_contacts_button_header_press.png);
+  background-size: contain;
+  background-repeat: no-repeat;
+  padding-left: .7em;
+}
+.ui-tokentextarea .ui-tokentextarea-desclabel {
+  display: inline-block;
+  outline: none;
+  position: relative;
+  border: 0;
+  color: #666666;
+  text-align: left;
+  font-size: 1em;
+}
+.ui-tokentextarea-focus-button {
+  background-image: url(./images/00_button_expand_opened.png);
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-handler {
+  position: absolute;
+  overflow: hidden;
+  opacity: 0;
+}
+.ui-handler-visible {
+  opacity: 1;
+}
+.ui-handler-direction-y {
+  top: 0.2272727272727273rem;
+  right: 0.2272727272727273rem;
+  bottom: 0.2272727272727273rem;
+  width: 1.0909090909090908rem;
+}
+.ui-handler-direction-x {
+  right: 0.2272727272727273rem;
+  bottom: 0.2272727272727273rem;
+  left: 0.2272727272727273rem;
+  height: 1.0909090909090908rem;
+}
+.ui-handler-track {
+  position: relative;
+  width: 100%;
+  height: 100%;
+}
+.ui-handler-thumb {
+  position: absolute;
+  top: 0;
+  left: 0;
+  background-position: center;
+  background-repeat: no-repeat;
+  -o-border-radius: 0.11363636363636365rem;
+  -ms-border-radius: 0.11363636363636365rem;
+  -moz-border-radius: 0.11363636363636365rem;
+  -webkit-border-radius: 0.11363636363636365rem;
+  border-radius: 0.11363636363636365rem;
+}
+.ui-handler-direction-y .ui-handler-thumb {
+  width: 1.0909090909090908rem;
+  height: 4.863636363636364rem;
+  background-size: 1.0909090909090908rem 0.9090909090909092rem;
+}
+.ui-handler-direction-x .ui-handler-thumb {
+  width: 4.863636363636364rem;
+  height: 1.0909090909090908rem;
+  background-size: 0.9090909090909092rem 1.0909090909090908rem;
+}
+/* S
+-----------------------------------------------------------------------------------------------------------*/
+.ui-handler-s .ui-handler-thumb {
+  background-color: rgba(150, 150, 150, 0.5);
+}
+.ui-handler-s .ui-handler-direction-y .ui-handler-thumb {
+  background-image: url("images/00_scroll_bar_handler.png");
+}
+.ui-handler-s .ui-handler-direction-x .ui-handler-thumb {
+  background-image: url("images/00_scroll_bar_handler_hor.png");
+}
+/*
+ * jQuery Mobile Framework
+ * Copyright (c) jQuery Project
+ * Dual licensed under the MIT (MIT-LICENSE.txt) or GPL (GPL-LICENSE.txt)
+ * licenses.
+ */
+/*** less definitions ***/
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-virtualgrid {
+  overflow: hidden;
+  position: absolute;
+}
+.ui-virtualgrid-wrapblock {
+  position: absolute;
+  left: 0;
+}
+.ui-virtualgrid-wrapblock-x {
+  float: left;
+  overflow: hidden;
+}
+.ui-scrollbar-thumb-x {
+  width: 1.5rem !important;
+}
+.ui-scrollbar-thumb-y {
+  height: 1.5rem !important;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-multimediaview {
+  background-color: #f9f9f9;
+  overflow: hidden;
+}
+.ui-multimediaview-wrap {
+  position: relative;
+  width: 100%;
+  margin-top: 0.7272727272727273rem;
+  margin-bottom: 0.7272727272727273rem;
+  padding: 0;
+  border: 0;
+}
+.ui-multimediaview-fullscreen {
+  position: absolute !important;
+  z-index: 1100 !important;
+}
+.ui-multimediaview-control span {
+  display: inline-block;
+}
+.ui-multimediaview-control {
+  position: relative;
+  display: block;
+  z-index: 1101 !important;
+  padding: 0;
+  margin: 0;
+  outline: 0;
+  border: 0;
+  height: 1.9090909090909092rem;
+}
+.ui-multimediaview-control span.ui-button {
+  background-position: center center;
+  background-size: 80%;
+  background-repeat: no-repeat;
+  width: 1.6818181818181819rem;
+  height: 1.6818181818181819rem;
+  margin: 0.09090909090909091rem;
+}
+.ui-multimediaview-control .ui-playpausebutton {
+  float: left;
+}
+.ui-multimediaview-control .ui-timestamplabel {
+  text-align: center;
+  float: left;
+}
+.ui-multimediaview-control .ui-timestamplabel p {
+  margin-top: -0.22272727272727275rem;
+  margin-left: 0.09090909090909091rem;
+  padding: 0;
+  text-align: center;
+  font-size: 0.5rem;
+  line-height: 0.6363636363636364rem;
+  text-align: left;
+}
+.ui-multimediaview-control .ui-durationlabel {
+  text-align: center;
+  float: right;
+}
+.ui-multimediaview-control .ui-durationlabel p {
+  margin-top: -0.22272727272727275rem;
+  margin-right: 0.09090909090909091rem;
+  padding: 0;
+  text-align: center;
+  font-size: 0.5rem;
+  line-height: 0.6363636363636364rem;
+  text-align: right;
+}
+.ui-multimediaview-control .ui-seekbar {
+  margin-top: 0.26136363636363635rem;
+  padding-left: 0.09090909090909091rem;
+  padding-right: 0.09090909090909091rem;
+  height: 0.36363636363636365rem;
+  float: left;
+}
+.ui-multimediaview-control .ui-seekbar .ui-duration {
+  margin: 0;
+  padding: 0;
+  width: 100%;
+  height: 0.36363636363636365rem;
+  border-radius: 1.5em;
+}
+.ui-multimediaview-control .ui-seekbar .ui-currenttime {
+  margin: 0;
+  padding: 0;
+  height: 0.36363636363636365rem;
+  position: absolute;
+  border-radius: 1.5em;
+}
+.ui-multimediaview-control .ui-volumecontrol {
+  width: 5rem;
+  height: 100%;
+  float: left;
+}
+.ui-multimediaview-control .ui-volumecontrol .ui-volumebar {
+  height: 100%;
+  padding-top: 0.7954545454545455rem;
+  padding-left: 0.9090909090909092rem;
+  display: block;
+}
+.ui-multimediaview-control .ui-volumecontrol .ui-volumebar .ui-guide {
+  width: 3.6363636363636367rem;
+  height: 0.36363636363636365rem;
+  position: absolute;
+  border-radius: 1.5em;
+}
+.ui-multimediaview-control .ui-volumecontrol .ui-volumebar .ui-value {
+  margin: 0;
+  padding: 0;
+  height: 0.36363636363636365rem;
+  position: absolute;
+  border-radius: 1.5em;
+}
+.ui-multimediaview-control .ui-volumecontrol .ui-volumebar .ui-handler {
+  margin: 0;
+  padding: 0;
+  width: 0.6818181818181819rem;
+  height: 0.6818181818181819rem;
+  position: absolute;
+  border-style: solid;
+  border-width: 1px;
+  border-radius: 1.5em;
+}
+.ui-fullscreen-page {
+  padding: 0 !important;
+}
+/* S
+-----------------------------------------------------------------------------------------------------------*/
+.ui-multimediaview-s .ui-multimediaview-video {
+  background-color: rgba(248, 246, 239, 0.5);
+}
+.ui-multimediaview-s .ui-timestamplabel {
+  color: #4a84c9;
+}
+.ui-multimediaview-s .ui-durationlabel {
+  color: #808080;
+}
+.ui-multimediaview-s span.ui-button {
+  background-color: #f8f6ef;
+}
+.ui-multimediaview-s span.ui-play-icon {
+  background-image: url(./images/00_button_play.png);
+}
+.ui-multimediaview-s span.ui-pause-icon {
+  background-image: url(./images/00_button_pause.png);
+}
+.ui-multimediaview-s span.ui-volume-icon {
+  background-image: url(./images/controls/00_slider_button_volume_02.png);
+}
+.ui-multimediaview-s span.ui-mute-icon {
+  background-image: url(./images/controls/00_slider_button_volume_01.png);
+}
+.ui-multimediaview-s span.ui-fullscreen-on {
+  background-image: url(./images/00_button_fullscreen_on.png);
+}
+.ui-multimediaview-s span.ui-fullscreen-off {
+  background-image: url(./images/00_button_fullscreen_off.png);
+}
+.ui-multimediaview-s .ui-seekbar .ui-duration {
+  background-color: #cbc8c5;
+}
+.ui-multimediaview-s .ui-seekbar .ui-currenttime {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.ui-multimediaview-s .ui-volumebar .ui-guide {
+  background-color: #cbc8c5;
+}
+.ui-multimediaview-s .ui-volumebar .ui-value {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.ui-multimediaview-s .ui-volumebar .ui-handler {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+  border-color: #bab9b4;
+}
+.ui-popup-screen {
+       top: 0;
+       left: 0;
+       width: 100%;
+       height: 100%;
+       border: 0;
+       position: absolute;
+       filter: Alpha(Opacity=50);
+       opacity: 0;
+}
+
+.ui-popup-screen-background-hack {
+       background-color: black;
+       filter: Alpha(Opacity=0);
+}
+
+@-webkit-keyframes popup-fadein {
+    from { opacity: 0; }
+    to { opacity: 0.5; }
+}
+
+@-moz-keyframes popup-fadein {
+    from { opacity: 0; }
+    to { opacity: 0.5; }
+}
+
+@-webkit-keyframes popup-fadeout {
+    from { opacity: 0.5; }
+    to { opacity: 0; }
+}
+
+@-moz-keyframes popup-fadeout {
+    from { opacity: 0.5; }
+    to { opacity: 0; }
+}
+
+.ui-popup-screen.fade.in {
+       opacity: 0.5;
+       -webkit-animation-name: popup-fadein;
+       -moz-animation-name: popup-fadein;
+}
+
+.ui-popup-screen.fade.out {
+       opacity: 0;
+       -webkit-animation-name: popup-fadeout;
+       -moz-animation-name: popup-fadeout;
+}
+
+.ui-popup.ui-content,
+.ui-popup .ui-content {
+       overflow: visible;
+}
+
+.ui-popup > img {
+       width: auto;
+       height: auto;
+       max-width: 100%;
+       max-height: 100%;
+       vertical-align: middle;
+}
+.ui-popup iframe {
+       vertical-align: middle;
+}
+
+@media all and (min-width: 450px){
+       .ui-popup .ui-field-contain label.ui-submit,
+       .ui-popup .ui-field-contain .ui-controlgroup-label,
+       .ui-popup .ui-field-contain label.ui-select,
+       .ui-popup .ui-field-contain label.ui-input-text {
+               font-size: 16px; line-height: 1.4; display: block; font-weight: normal; margin: 0 0 .3em;
+       }
+       .ui-popup .ui-field-contain .ui-btn.ui-submit,
+       .ui-popup .ui-field-contain .ui-controlgroup-controls,
+       .ui-popup .ui-field-contain .ui-select,
+       .ui-popup .ui-field-contain input.ui-input-text,
+       .ui-popup .ui-field-contain textarea.ui-input-text,
+       .ui-popup .ui-field-contain .ui-input-search {
+               width: 100%; display: block;
+       }
+}
+
+.ui-popup > .ui-btn-left,
+.ui-popup > .ui-btn-right {
+       position: absolute; 
+       top: -9px;
+       margin: 0;
+       z-index: 1101;
+}
+.ui-popup > .ui-btn-left { left: -9px; }
+.ui-popup > .ui-btn-right { right: -9px; }
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+.ui-popup-screen {
+  background: #000000;
+  opacity: 0;
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 1200;
+}
+.ui-popup-scroller-bg {
+  width: 100%;
+}
+.ui-popup-container {
+  position: absolute;
+  width: 86.12%;
+  z-index: 1201 !important;
+  background: #f8f6ef;
+  text-align: center;
+  outline-color: #f8f6ef;
+  display: -moz-box;
+  display: -webkit-box;
+  display: box;
+  -ms-box-orient: vertical;
+  -moz-box-orient: vertical;
+  -o-box-orient: vertical;
+  -webkit-box-orient: vertical;
+  box-orient: vertical;
+  -ms-box-align: center;
+  -moz-box-align: center;
+  -o-box-align: center;
+  -webkit-box-align: center;
+  box-align: center;
+  -ms-box-pack: center;
+  -moz-box-pack: center;
+  -o-box-pack: center;
+  -webkit-box-pack: center;
+  box-pack: center;
+  /***** Normal Samples *****/
+
+}
+.ui-popup-container .ui-popup {
+  padding: 3px 2px 2px 2px;
+  background: #f8f6ef;
+  width: 100%;
+}
+.ui-popup-container .ui-popup > .ui-popup-title, .ui-popup-container .ui-popup > .ui-popup-text, .ui-popup-container .ui-popup > .ui-popup-button-bg {
+  width: 100%;
+}
+.ui-popup-container .ui-popup-title {
+  width: 100%;
+  height: 1.8181818181818183rem;
+  text-align: left;
+  color: #3b73b6;
+  font-size: 1.0909090909090908rem;
+  font-weight: bold;
+}
+.ui-popup-container .ui-popup-title h1 {
+  font-size: 1.0909090909090908rem;
+  font-weight: bold;
+  color: #3b73b6;
+  margin: 0px;
+  padding-top: 0.4545454545454546rem;
+  padding-left: 0.7272727272727273rem;
+}
+.ui-popup-container .ui-popup-text {
+  margin-top: 1rem;
+  margin-bottom: 1rem;
+  color: black;
+  font-size: 0.9090909090909092rem;
+  background: #f8f6ef;
+  text-align: center;
+}
+.ui-popup-container .ui-popup-text .ui-li .ui-radio label, .ui-popup-container .ui-popup-text .ui-li .ui-checkbox label {
+  background: transparent;
+}
+.ui-popup-container .ui-popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  height: 1.6818181818181819rem;
+  padding-top: 0.4545454545454546rem;
+  padding-bottom: 0.4545454545454546rem;
+  width: 100%;
+  vertical-align: middle;
+}
+.ui-popup-container .ui-popup-button-bg > .ui-btn {
+  display: inline-block;
+  margin: auto;
+  height: 1.6818181818181819rem;
+}
+.ui-popup-container .ui-popup-button-bg .ui-btn-inner {
+  padding-top: 0.2272727272727273rem;
+  padding-bottom: 0.2272727272727273rem;
+  padding-left: 0.9090909090909092rem;
+  padding-right: 0.9090909090909092rem;
+}
+.ui-popup-container .center_basic_3btn .ui-btn, .ui-popup-container .center_title_3btn .ui-btn {
+  max-width: 3.6363636363636367rem;
+  height: 1.6818181818181819rem;
+  margin-top: 0rem;
+  margin-bottom: 0rem;
+  margin-left: 0.2272727272727273rem;
+  margin-right: 0.2272727272727273rem;
+  display: inline-block;
+}
+.ui-popup-container .center_button_vertical .ui-popup-button-bg {
+  display: block;
+  height: auto;
+}
+.ui-popup-container .center_button_vertical .ui-popup-button-bg > .ui-btn {
+  display: block;
+  width: 9.090909090909092rem;
+}
+.ui-popup-container .center_checkbox .ui-popup-check-bg {
+  font-size: 0.9090909090909092rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0rem;
+  padding-bottom: 1rem;
+  vertical-align: middle;
+}
+.ui-popup-container .center_checkbox .ui-popup-check-bg .ui-checkbox .ui-btn {
+  text-align: center;
+  background: #f8f6ef;
+  border: 0rem;
+}
+.ui-popup-container .center_checkbox .ui-popup-check-bg .ui-checkbox .ui-btn .ui-btn-inner {
+  border: 0rem;
+}
+.ui-popup-container .center_checkbox .ui-popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popup-container .center_checkbox .ui-popup-button-bg .ui-btn {
+  width: 5.909090909090909rem;
+  height: 1.6818181818181819rem;
+  margin-top: 0rem;
+  margin-bottom: 0rem;
+  margin-left: 0.2272727272727273rem;
+  margin-right: 0.2272727272727273rem;
+  display: inline-block;
+}
+.ui-popup-container .center_liststyle_1btn .ui-popup-scroller-bg {
+  width: 100%;
+  overflow: hidden;
+  background: #f8f6ef;
+  height: 11.636363636363637rem;
+}
+.ui-popup-container .center_liststyle_1btn .ui-popup-button-bg {
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popup-container .center_liststyle_2btn .ui-popup-scroller-bg {
+  width: 100%;
+  overflow: hidden;
+  background: #f8f6ef;
+  height: 11.636363636363637rem;
+}
+.ui-popup-container .center_liststyle_2btn .ui-popup-button-bg {
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popup-container .center_liststyle_2btn .ui-popup-button-bg .ui-btn {
+  width: 5.909090909090909rem;
+  height: 1.6818181818181819rem;
+  margin-top: 0rem;
+  margin-bottom: 0rem;
+  margin-left: 0.2272727272727273rem;
+  margin-right: 0.2272727272727273rem;
+  display: inline-block;
+}
+.ui-popup-container .center_liststyle_2btn .ui-popup-button-bg .ui-btn .ui-btn-inner {
+  padding-top: 0.2272727272727273rem;
+  padding-bottom: 0.2272727272727273rem;
+  padding-left: 0.9090909090909092rem;
+  padding-right: 0.9090909090909092rem;
+}
+.ui-popup-container .center_title_2btn .ui-popup-button-bg .ui-btn {
+  width: 5.909090909090909rem;
+}
+.ui-popup-container .center_liststyle_3btn .ui-popup-scroller-bg {
+  width: 100%;
+  overflow: hidden;
+  background: #f8f6ef;
+  height: 11.636363636363637rem;
+}
+.ui-popup-container .center_liststyle_3btn .ui-popup-button-bg {
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popup-container .center_liststyle_3btn .ui-popup-button-bg .ui-btn {
+  max-width: 3.6363636363636367rem;
+  height: 1.6818181818181819rem;
+  margin-top: 0rem;
+  margin-bottom: 0rem;
+  margin-left: 0.2272727272727273rem;
+  margin-right: 0.2272727272727273rem;
+  display: inline-block;
+}
+.ui-popup-container .center_progressbar {
+  text-align: center;
+}
+.ui-popup-container .center_progressbar .ui-popup-text {
+  font-size: 1.1818181818181819rem;
+  font-color: #999999;
+  background: #f8f6ef;
+  width: 100%;
+  height: 3.181818181818182rem;
+}
+.ui-popup-container .center_progressbar .ui-popup-text p {
+  height: 100%;
+  text-align: center;
+  padding: 1rem 0.7272727272727273rem 0rem 0.7272727272727273rem;
+}
+.ui-popup-container .center_progressbar .ui-popup-text-bottom-bg {
+  font-size: 1.1818181818181819rem;
+  font-color: #999999;
+  background: #f8f6ef;
+  width: 100%;
+  vertical-align: middle;
+}
+.ui-popup-container .center_progressbar .ui-popup-text-bottom-bg .text-left {
+  width: 40%;
+  height: 2.1818181818181817rem;
+  padding: 0rem 0.7272727272727273rem 0rem 0.7272727272727273rem;
+  text-align: left;
+  display: inline-block;
+}
+.ui-popup-container .center_progressbar .ui-popup-text-bottom-bg .text-right {
+  width: 40%;
+  height: 2.1818181818181817rem;
+  padding: 0rem 0.7272727272727273rem 0rem 0.7272727272727273rem;
+  text-align: right;
+  display: inline-block;
+}
+.ui-popup-container .center_progressbar .ui-popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popup-container .center_progressbar .ui-popup-button-bg .ui-btn {
+  width: 9.136363636363637rem;
+  height: 1.6818181818181819rem;
+  margin: auto;
+}
+.ui-popup-container .center_progressbar .ui-popup-progress-bg {
+  background: #f8f6ef;
+  width: 100%;
+  height: 100%;
+}
+.ui-popup-container .centertext_progressbar {
+  text-align: center;
+}
+.ui-popup-container .centertext_progressbar .ui-popup-text {
+  font-size: 1.1818181818181819rem;
+  font-color: #999999;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 1rem;
+  padding-bottom: 0.7272727272727273rem;
+}
+.ui-popup-container .centertext_progressbar .ui-popup-text p {
+  text-align: center;
+}
+.ui-popup-container .centertext_progressbar .ui-popup-text-bottom-bg {
+  font-size: 1.1818181818181819rem;
+  font-color: #999999;
+  background: #f8f6ef;
+  width: 100%;
+  vertical-align: middle;
+}
+.ui-popup-container .centertext_progressbar .ui-popup-text-bottom-bg .text-left {
+  width: 40%;
+  height: 1.8181818181818183rem;
+  padding: 0.7272727272727273rem 0.7272727272727273rem 1rem 0.7272727272727273rem;
+  text-align: left;
+  display: inline-block;
+}
+.ui-popup-container .centertext_progressbar .ui-popup-text-bottom-bg .text-right {
+  width: 40%;
+  height: 1.8181818181818183rem;
+  padding: 0.7272727272727273rem 0.7272727272727273rem 1rem 0.7272727272727273rem;
+  text-align: right;
+  display: inline-block;
+}
+.ui-popup-container .centertext_progressbar .ui-popup-button-bg {
+  font-size: 1.4545454545454546rem;
+  background: #f8f6ef;
+  width: 100%;
+  padding-top: 0.5rem;
+  padding-bottom: 0.5rem;
+  vertical-align: middle;
+}
+.ui-popup-container .centertext_progressbar .ui-popup-button-bg .ui-btn {
+  width: 18.272727272727273rem;
+  height: 1.6818181818181819rem;
+  margin: auto;
+}
+.ui-popup-container .centertext_progressbar .ui-popup-progress-bg {
+  background: #f8f6ef;
+  width: 100%;
+  height: 100%;
+}
+/*
+ * Misc. classes for Tizen web ui framework
+ *
+ * All classes in this file has highest priority.
+ */
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+/* text-ellipsis
+ * elements using this class needs following constraints;
+ *  - width must not be 'auto'
+ *  - display must be 'block' or 'inline-block'
+ */
+.ui-text-ellipsis {
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  -o-text-overflow: ellipsis;
+  overflow: hidden !important;
+}
+/****************************
+ * Tizen Common Less Header *
+ ****************************/
+/*
+ * Common definition for theme
+ * 'config.less' in each theme must include this file.
+ */
+/******************************
+  z-index order collection
+ ******************************/
+/******************************
+  Global LESS mixin collection
+ ******************************/
+/***************************************************************************
+                   Body
+***************************************************************************/
+/***************************************************************************
+                   Naviframe
+***************************************************************************/
+/* #3b73b6 *//* title text */
+/* B052L4 : Title text button */
+/* B052L5 : Title text button press */
+/* B052L1P : Title text button press bg */
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Tabbar
+***************************************************************************/
+/* B0514P1 : 00_tab_press_ef.9.png */
+/* B052L6P */
+/* B052L6 */
+/***************************************************************************
+                   List
+***************************************************************************/
+/* B0211 */
+/* B041        */
+/* B0221 */
+/* W021L1 */
+/* W021L2 */
+/***************************************************************************
+                   Shortcut Scroll
+***************************************************************************/
+/* B0723 : 00_fast_scroll_rollover_bg.9.png */
+/* B0721 : Rollover text */
+/* B0731 : 00_fast_scroll_popup_bg.png */
+/* B0732 : Scroll popup text */
+/***************************************************************************
+                   SearchBar(forms.textinput)
+***************************************************************************/
+/* Search default text */
+/* W301 : 00_search_edit_field_bg.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* B061L1 : Popop info */
+/***************************************************************************
+                        Button(connected with other winset)
+***************************************************************************/
+.LESSbutton_box_style {
+  color: #363133;
+}
+.LESSbutton_up_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+}
+.LESSbutton_box_style {
+  background: #ebe8e3;
+  background: -webkit-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -moz-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -o-linear-gradient(top, #ebe8e3, #eae7e2);
+  background: -ms-linear-gradient(top, #ebe8e3, #eae7e2);
+  border: 1px solid;
+  border-color: #dcdad3;
+  -o-box-shadow: 0 0 1px 1px #ffffff;
+  -ms-box-shadow: 0 0 1px 1px #ffffff;
+  -moz-box-shadow: 0 0 1px 1px #ffffff;
+  -webkit-box-shadow: 0 0 1px 1px #ffffff;
+  box-shadow: 0 0 1px 1px #ffffff;
+}
+.LESSbutton_inner_box_style {
+  background: #f7f5ee;
+  background: -webkit-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -ms-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -o-linear-gradient(top, #faf7f2, #f8f5f0);
+  background: -moz-linear-gradient(top, #faf7f2, #f8f5f0);
+  -o-box-shadow: none;
+  -ms-box-shadow: none;
+  -moz-box-shadow: none;
+  -webkit-box-shadow: none;
+  box-shadow: none;
+}
+.LESSbutton_inner_pressstyle {
+  color: #f8f6ef;
+}
+.LESSbutton_text1_style {
+  font-family: Helvetica, Arial, sans-serif;
+  font-weight: normal;
+  font-size: 1.0rem;
+  font-style: normal;
+  color: #000000;
+}
+.LESSbutton_hover_style {
+  color: #363133;
+}
+.LESSbutton_down_style {
+  background: #3b73b6;
+  color: #f8f6ef;
+}
+.LESSbutton_edit_style {
+  background: #c95858;
+  background: -webkit-gradient(linear, left top, left bottom, from(#c95858), to(#a12828));
+  background: -moz_linear-gradient(top, #c95858, #a12828);
+}
+/***************************************************************************
+                        contextual popup
+***************************************************************************/
+/* #1A5274 */
+/***************************************************************************
+                   Scrollview
+***************************************************************************/
+/***************************************************************************
+                   Date Time picker
+***************************************************************************/
+/***************************************************************************
+                   DaySelector
+***************************************************************************/
+/* #00a8e7 */
+/* #f01402 */
+/* #f9f9f9 *//* #f9f9f9 */.LESSDayselectorButtonNormal {
+  background: #7e9db2;
+  background: -webkit-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -moz-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -ms-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: -o-linear-gradient(top, #7e9db2 0%, #547990 100%);
+  background: linear-gradient(top, #7e9db2 0%, #547990 100%);
+}
+.LESSDayaselectorButtonPress {
+  background: #3b7796;
+  background: -webkit-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -moz-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -ms-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: -o-linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+  background: linear-gradient(top, #3b7796 0%, #2f5b75 100%);
+}
+/***************************************************************************
+                   OptionHeader
+***************************************************************************/
+/* #f9f9f9 */
+/***************************************************************************
+                   SegmentControl
+***************************************************************************/
+/* #F9F9F9*/
+/* #F9F9F9*/
+/***************************************************************************
+                   ControlGroup
+***************************************************************************/
+/* 00_divider_line.9.png */
+/***************************************************************************
+                   Popup
+***************************************************************************/
+/* popup_title_bg.png */
+/* maybe not use only popupwindow*/
+.LESSpopup_button_style {
+  /*   background: @color_popup_buttonbg;
+       background: @color_popup_buttonbg_webkit;
+       background: @color_popup_buttonbg_moz;
+       background: @color_popup_buttonbg_ms;
+       background: @color_popup_buttonbg_o;
+       color: @color_popup_buttontext;*/
+
+}
+.LESSpopup_button_hover_style {
+  background: #5e88a3;
+}
+.LESSpopup_button_press_style {
+  background: #43a0d9;
+  background: -webkit-gradient(linear, left top, left bottom, from(#43a0d9), to(#388bb9));
+  background: -moz-linear-gradient(top, #43a0d9, #388bb9);
+  background: -ms-linear-gradient(top, #43a0d9, #388bb9);
+  background: -o-linear-gradient(top, #43a0d9, #388bb9);
+}
+/***************************************************************************
+                    Button
+***************************************************************************/
+.LESStoggleswitch_on_style {
+  background: #2a7eac;
+  background: -webkit-gradient(linear, left top, left bottom, from(#2174a7), to(#4ba5db));
+  background: -moz-linear-gradient(top, #2174a7, #4ba5db);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_off_style {
+  color: #cbcbcb;
+  background: #97a1a7;
+  background: -webkit-gradient(linear, left top, left bottom, from(#727272), to(#8d8d8d));
+  background: -moz-linear-gradient(top, #727272, #8d8d8d);
+  border-radius: 4px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+}
+.LESStoggleswitch_reed_style {
+  background: #fdfdfd;
+  background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#e7e7e7));
+  background: -moz-linear-gradient(top, #fdfdfd, #e7e7e7);
+  border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -moz-border-radius: 2px;
+}
+.LESSbutton_editpress_style {
+  background: #931818;
+  background: -webkit-gradient(linear, left top, left bottom, from(#931818), to(#6e1717));
+  background: -moz-linear-gradient(top, #931818, #6e1717);
+}
+.LESSbutton_edit_padding {
+  padding: 0.5em 0.8em;
+}
+/***************************************************************************
+                    Tickernoti
+***************************************************************************/
+/***************************************************************************
+                    Smallpopup
+***************************************************************************/
+/***************************************************************************
+                    No Contents
+***************************************************************************/
+/***************************************************************************
+                    Slider
+***************************************************************************/
+/***************************************************************************
+                    Progress
+***************************************************************************/
+/***************************************************************************
+                   Handler
+***************************************************************************/
+/***************************************************************************
+                   multimediaview
+***************************************************************************/
+.LESSmultimediaview_bar_active_style {
+  background-color: #4a84c9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#6289d9), to(#295b98));
+  background-image: -moz-linear-gradient(top, #6289d9, #295b98);
+  background-image: -o-linear-gradient(top, #6289d9, #295b98);
+  background-image: -ms-linear-gradient(top, #6289d9, #295b98);
+}
+.LESSmultimediaview_bar_handle_style {
+  background-color: #f9f9f9;
+  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#e6e6e6));
+  background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
+  background-image: -ms-linear-gradient(top, #ffffff, #e6e6e6);
+}
+/***************************************************************************
+                   tokentextarea
+***************************************************************************/
+/***************************************************************************
+***************************************************************************/
+/***************************************************************************
+                    Tabbar
+***************************************************************************/
+.ui-tabbar {
+  background: #f8f6ef;
+  z-index: 1000;
+}
+.ui-tabbar.ui-portrait-tabbar {
+  /* portrait style */
+
+}
+.ui-tabbar.ui-landscape-tabbar {
+  /* landscape style */
+
+}
+.ui-tabbar a.ui-btn {
+  background: #f8f6ef;
+  color: #999999;
+  padding-top: 0.8636363636363636rem;
+  padding-bottom: 0.8636363636363636rem;
+}
+.ui-tabbar a.ui-btn .ui-btn-inner {
+  padding-top: 0px;
+  padding-bottom: 0px;
+  border-left: 1px solid;
+  border-color: #c0c0c0;
+  border-radius: 0px;
+  -0-border-radius: 0px;
+  -ms-border-radius: 0px;
+  -webkit-border-radius: 0px;
+}
+.ui-tabbar a.ui-btn .ui-icon {
+  width: 1.4545454545454546rem;
+  height: 1.4545454545454546rem;
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+}
+.ui-tabbar.ui-tabbar-persist a.ui-btn {
+  background: #f8f6ef;
+}
+.ui-tabbar.ui-tabbar-persist a.ui-state-persist, .ui-tabbar.ui-tabbar-persist a.ui-state-persist.ui-btn-active, .ui-tabbar.ui-tabbar-persist a.ui-btn-show-style {
+  color: #3b73b6;
+}
+.ui-tabbar.ui-tabbar-persist a.ui-btn-hover-s.ui-btn-down-s:not(.ui-state-persist) {
+  color: #3b73b6;
+  background: -webkit-linear-gradient(top, #d2d2c8 0%, #f6f8ef 100%);
+}
+.ui-tabbar:not(.ui-tabbar-persist) a.ui-btn {
+  background: #f8f6ef;
+}
+.ui-tabbar:not(.ui-tabbar-persist) a.ui-btn-active, .ui-tabbar:not(.ui-tabbar-persist) .ui-btn-show-style {
+  color: #3b73b6;
+}
+.ui-tabbar:not(.ui-tabbar-persist) a.ui-btn.ui-btn-hover-s.ui-btn-down-s {
+  color: #3b73b6;
+  background: -webkit-linear-gradient(top, #d2d2c8 0%, #f6f8ef 100%);
+}
+.ui-tabbar .ui-btn-inner {
+  font-size: 0.6818181818181819rem;
+  font-weight: bold;
+}
+.ui-tabbar .ui-btn-inner .ui-icon {
+  top: 0.4545454545454546rem;
+  left: 50%;
+  margin-left: -0.7272727272727273rem;
+}
+.ui-tabbar.ui-tabbar-notext a.ui-btn {
+  padding-top: 0.5rem;
+  padding-bottom: 0.4545454545454546rem;
+}
+.ui-tabbar.ui-tabbar-notext .ui-btn-inner {
+  height: 1.5454545454545454rem;
+}
+.ui-tabbar.ui-tabbar-notext .ui-btn-inner .ui-icon {
+  top: 0px;
+}
+/* title font size when title tabbar */
+.ui-header.ui-bar-s.ui-title-tabbar .ui-title {
+  font-size: 1rem;
+  margin-top: 0.36363636363636365rem;
+  margin-bottom: 0rem;
+}
+.ui-header.ui-bar-s.ui-title-tabbar .ui-tabbar.ui-tabbar-noicons a.ui-btn {
+  padding-top: 0.6818181818181819rem;
+  padding-bottom: 0.5909090909090909rem;
+}
+.ui-header.ui-bar-s.ui-title-tabbar .ui-tabbar.ui-tabbar-notext a.ui-btn {
+  padding-top: 0.3181818181818182rem;
+  padding-bottom: 0.2272727272727273rem;
+}
+.ui-header.ui-bar-s.ui-title-tabbar .ui-tabbar.ui-portrait-tabbar {
+  /* portrait style */
+
+}
+.ui-header.ui-bar-s.ui-title-tabbar .ui-tabbar.ui-landscape-tabbar {
+  /* landscape style */
+
+}
+.ui-header.ui-bar-s.ui-title-tabbar-multiline .ui-tabbar a.ui-btn {
+  padding-top: 0.5rem;
+  padding-bottom: 0.4545454545454546rem;
+}
+.ui-header.ui-bar-s.ui-title-tabbar-multiline .ui-tabbar a.ui-btn .ui-btn-inner {
+  height: 2.4545454545454546rem;
+}
+.ui-header.ui-bar-s.ui-title-tabbar-multiline .ui-tabbar a.ui-btn .ui-btn-inner .ui-btn-text {
+  padding-top: 0px;
+  line-height: 3.8636363636363638rem;
+}
+.ui-header.ui-bar-s.ui-title-tabbar-multiline .ui-tabbar a.ui-btn .ui-btn-inner .ui-icon {
+  top: 0px;
+}
+.ui-header.ui-bar-s li:first-child .ui-btn-inner {
+  border-left-width: 0px;
+}
+.ui-footer.ui-bar-s .ui-tabbar {
+  height: 2.2272727272727275rem;
+  margin-left: auto;
+  margin-right: auto;
+}
+.ui-footer.ui-bar-s .ui-tabbar a.ui-btn {
+  padding-top: 0.7272727272727273rem;
+  padding-bottom: 0.7272727272727273rem;
+}
+.ui-footer.ui-bar-s .ui-tabbar .ui-btn-inner .ui-icon {
+  top: 0px;
+}
+.ui-footer.ui-bar-s .ui-tabbar.ui-tabbar-notext a.ui-btn {
+  padding-top: 0.36363636363636365rem;
+  padding-bottom: 0.3181818181818182rem;
+}
+.ui-footer.ui-bar-s .ui-tabbar li:first-child .ui-btn-inner {
+  border-left-width: 0px;
+}
+.ui-footer.ui-bar-s .ui-tabbar.ui-tabbar-margin-back {
+  margin-right: 2.5454545454545454rem;
+}
+.ui-footer.ui-bar-s .ui-tabbar.ui-tabbar-margin-more {
+  margin-left: 2.5454545454545454rem;
+}
+.ui-footer.ui-bar-s .ui-btn-back ~ .ui-tabbar li:last-child .ui-btn-inner {
+  border-right: 1px solid;
+  border-right-color: #c0c0c0;
+}
+.ui-footer.ui-bar-s [data-icon="naviframe-more"] ~ .ui-tabbar li:first-child .ui-btn-inner {
+  border-left: 1px solid;
+  border-left-color: #c0c0c0;
+}
+.ui-tabbar-s.ui-navbar-noicons {
+  font-size: 1rem;
+}
+/* Scrollable tabbar */
+.ui-tabbar .tabbar-scroll-ul {
+  margin-top: 0px;
+  margin-bottom: 0px;
+  padding-left: 0px;
+}
+.ui-tabbar .tabbar-scroll-ul .tabbar-scroll-li {
+  position: relative;
+  display: inline-block;
+  margin-left: -0.36363636363636365rem;
+}
+.ui-tabbar .tabbar-scroll-ul .tabbar-scroll-li a {
+  width: 100%;
+}
+.ui-tabbar .tabbar-scroll-ul li.tabbar-scroll-li:first-child {
+  margin-left: 0px;
+}
+.ui-tabbar-divider {
+  position: absolute;
+  top: 0px;
+  width: 0.4545454545454546rem;
+  height: 2.5rem;
+  background: -webkit-linear-gradient(left, #00009b 0%, #f6f8ef 100%);
+}
+.ui-tabbar-divider-left {
+  left: 0px;
+  border-top-right-radius: 0.4545454545454546rem;
+  border-bottom-right-radius: 0.4545454545454546rem;
+  background: -webkit-linear-gradient(left, #00009b 0%, #f6f8ef 100%);
+}
+.ui-tabbar-divider-right {
+  right: 0px;
+  border-top-left-radius: 0.4545454545454546rem;
+  border-bottom-left-radius: 0.4545454545454546rem;
+  background: -webkit-linear-gradient(right, #00009b 0%, #f6f8ef 100%);
+}
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/tizen-web-ui-fw-theme.min.css b/org.tizen.common.verrari/templates/cli/tizenwebuifw-common-resources/tizen-web-ui-fw/latest/themes/tizen-white/tizen-web-ui-fw-theme.min.css
new file mode 100644 (file)
index 0000000..006e19a
--- /dev/null
@@ -0,0 +1 @@
+.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-bar-s{border:0;background:#f8f6ef;color:#3b73b6;font-family:Helvetica,Arial,sans-serif;font-weight:700;font-size:1.2727272727272727rem}.ui-bar-s .ui-link-inherit{color:#3b73b6}.ui-bar-s>.ui-btn.ui-btn-back{background:transparent;position:absolute;right:0}.ui-bar-s>.ui-btn.ui-btn-back .ui-icon-header-back-btn{top:.36363636363636365rem;left:auto;right:.5909090909090909rem;margin-top:0}.ui-header.ui-bar-s{position:fixed;top:0;min-height:2.5rem}.ui-header.ui-bar-s .ui-title{display:inline-block;color:#3b73b6;min-height:1.2727272727272727rem;max-height:1.5454545454545454rem;font-size:1.2727272727272727rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0!important;text-align:left;margin:.7272727272727273rem .36363636363636365rem .2272727272727273rem .36363636363636365rem}.ui-header.ui-bar-s>.ui-btn .ui-btn-inner.ui-btn-icon-only .ui-icon{left:0;top:0;margin-top:0}.ui-header.ui-bar-s>.ui-btn.ui-btn-back{right:.5909090909090909rem}.ui-header.ui-bar-s img{display:inline-block;height:.7272727272727273rem;width:.7272727272727273rem;margin-left:.36363636363636365rem}.ui-header.ui-bar-s .ui-title-text-sub{position:absolute;top:1.6363636363636365rem;left:.36363636363636365rem;font-size:.5454545454545454rem}.ui-header.ui-bar-s .ui-title-text-sub img{height:.7272727272727273rem;width:.7272727272727273rem;margin-left:.36363636363636365rem}.ui-header.ui-bar-s>.ui-btn{position:absolute;top:.7272727272727273rem;margin-top:0;height:1.5454545454545454rem;width:1.5454545454545454rem;background:transparent;color:#3a3a3a}.ui-header.ui-bar-s.ui-title-tabbar>.ui-btn{top:.36363636363636365rem}.ui-header.ui-bar-s>.ui-btn.ui-btn-icon_only{-o-border-radius:0;-ms-border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.ui-header.ui-bar-s>.ui-btn:nth-child(2){right:.5909090909090909rem}.ui-header.ui-bar-s>.ui-btn:nth-child(3){right:2.5454545454545454rem}.ui-header.ui-bar-s>img+h1+.ui-btn:nth-child(3){right:.5909090909090909rem}.ui-header.ui-bar-s>img+h1+.ui-btn:nth-child(3)+.ui-btn{right:2.5454545454545454rem}.ui-header.ui-bar-s>img+h1+span.ui-title-text-sub+.ui-btn:nth-child(4){right:.5rem}.ui-header.ui-bar-s>img+h1+span.ui-title-text-sub+.ui-btn:nth-child(4)+.ui-btn{right:2.6363636363636362rem}.ui-header.ui-bar-s>.ui-btn.ui-btn-down-s{background:rgba(64,147,247,.1);color:#3b73b6}.ui-header.ui-bar-s.ui-title-multiline .ui-title{min-height:1.0909090909090908rem;max-height:1.0909090909090908rem;font-size:1rem;margin:.4090909090909091rem .36363636363636365rem 1rem .36363636363636365rem}.ui-footer.ui-bar-s{height:2.2272727272727275rem;text-align:center;bottom:0}.ui-footer.ui-bar-s>.ui-btn.ui-btn-back,.ui-footer.ui-bar-s>[data-icon="naviframe-more"]{background:transparent}.ui-footer.ui-bar-s>.ui-btn.ui-btn-back>.ui-btn-icon-only,.ui-footer.ui-bar-s>[data-icon="naviframe-more"]>.ui-btn-icon-only{width:2.5454545454545454rem;height:2.2272727272727275rem;padding:0;-webkit-box-shadow:none}.ui-footer.ui-bar-s [data-icon="naviframe-more"]{position:absolute;left:0rem;top:0rem;box-shadow:none;border-width:0}.ui-footer.ui-bar-s [data-icon="naviframe-more"] .ui-icon-naviframe-more{left:.5909090909090909rem;top:.36363636363636365rem;margin-top:0}.ui-footer.ui-bar-s [data-icon="naviframe-more"] .ui-btn-inner{border:0;background:transparent;box-shadow:none}.ui-footer.ui-bar-s>[data-role="button"]{font-size:.6818181818181819rem;font-weight:700;color:#999}.ui-footer.ui-bar-s [data-role="controlgroup"]{margin-left:auto;margin-right:auto;margin-top:.2727272727272727rem;margin-bottom:.2727272727272727rem;padding-left:2.6363636363636362rem;padding-right:2.6363636363636362rem}.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"]{background:transparent;min-width:3.5rem;border-style:solid;border-color:#c0c0c0;border-top-width:0;border-bottom-width:0;border-left-width:1px;border-right-width:1px;border-radius:0;box-shadow:none;padding:0;margin-left:-.18181818181818182rem;margin-right:-.2272727272727273rem}.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"].ui-btn-down-s .ui-btn-inner,.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"] .ui-btn-active-s .ui-btn-inner{background:#f8f6ef}.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"].ui-btn-down-s .ui-btn-inner .ui-btn-text,.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"] .ui-btn-active-s .ui-btn-inner .ui-btn-text{color:#3b73b6}.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"]>.ui-btn-inner{border:0 solid;box-shadow:none}.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"] .ui-btn-text{font-size:.7727272727272727rem;color:#3a3a3a}.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"].ui-corner-right{border-right-width:0}.ui-footer.ui-bar-s [data-role="controlgroup"] [data-role="button"].ui-corner-left{border-left-width:0}.ui-footer.ui-bar-s>[data-role="button"]:not([data-icon="naviframe-more"]){top:.2727272727272727rem}.ui-footer.ui-bar-s>p{margin-top:.36363636363636365rem;margin-bottom:.36363636363636365rem}.ui-footer.ui-bar-s>h1,.ui-footer.ui-bar-s h2,.ui-footer.ui-bar-s h3,.ui-footer.ui-bar-s h4,.ui-footer.ui-bar-s h5,.ui-footer.ui-bar-s h6{display:inline-block}.ui-content{position:relative;top:0}.ui-body-s{border:1px solid #2a2a2a;background:#f8f6ef;color:#000;font-weight:400;font-family:Helvetica,Arial,sans-serif}.ui-body-s .ui-link-inherit{color:#fff}.ui-body-s .ui-link{color:#2489CE;font-weight:700}.ui-body-s .ui-link:hover{color:#2489CE}.ui-body-s .ui-link:active{color:#2489CE}.ui-body-s .ui-link:visited{color:#2489CE}.ui-btn-box-s{padding:.045454545454545456rem}.ui-btn-box-s.ui-btn-up-s{color:#363133;background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff;-o-border-radius:.3rem;-ms-border-radius:.3rem;-moz-border-radius:.3rem;-webkit-border-radius:.3rem;border-radius:.3rem;font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.ui-btn.ui-btn-corner-all .ui-btn-box-s.ui-btn-up-s{-o-border-radius:1.2rem;-ms-border-radius:1.2rem;-moz-border-radius:1.2rem;-webkit-border-radius:1.2rem;border-radius:1.2rem}.ui-btn-box-s .ui-btn-inner{border:1px solid;border-color:#c7c5be;-o-border-radius:.3rem;-ms-border-radius:.3rem;-moz-border-radius:.3rem;-webkit-border-radius:.3rem;border-radius:.3rem;-o-box-sizing:border-box;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;height:100%}.ui-btn.ui-btn-corner-all.ui-btn-box-s .ui-btn-inner{-o-border-radius:1.2rem;-ms-border-radius:1.2rem;-moz-border-radius:1.2rem;-webkit-border-radius:1.2rem;border-radius:1.2rem}.ui-ctxpopup .ui-btn-box-s.ui-btn-up-s,.ui-ctxpopup .ui-btn-box-s.ui-btn-hover-s{background:transparent!important;border:0;box-shadow:none;padding:0;color:#fff!important}.ui-ctxpopup .ui-btn-box-s.ui-btn-down-s{background:#3b73b6!important;border:0;box-shadow:none;padding:0;color:#fff!important;-o-border-radius:0;-ms-border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.ui-ctxpopup .ui-btn-box-s .ui-btn-inner{background:transparent ! important;box-shadow:none;border:0}.ui-ctxpopup .ui-btn-down-s{background:#3b73b6!important}.ui-header .ui-btn-box-s,.ui-footer .ui-btn-box-s,.ui-btn-back.ui-btn-up-s,.ui-btn-back.ui-btn-hover-s,.ui-btn-back.ui-btn-down-s,.ui-popup-container .ui-btn-box-s{font-weight:400;-o-border-radius:.9 rem;-ms-border-radius:.9 rem;-moz-border-radius:.9 rem;-webkit-border-radius:.9 rem;border-radius:.9 rem}.ui-btn-box-s.ui-btn-hover-s{color:#363133;font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000;-o-border-radius:.3em ! important;-ms-border-radius:.3em ! important;-moz-border-radius:.3em ! important;-webkit-border-radius:.3em ! important;border-radius:.3em ! important}.ui-btn-box-s.ui-btn-hover-s.ui-btn-corner-circle{-o-border-radius:1em ! important;-ms-border-radius:1em ! important;-moz-border-radius:1em ! important;-webkit-border-radius:1em ! important;border-radius:1em ! important}.ui-btn-box-s.ui-btn-hover-s.ui-btn-corner-all{-o-border-radius:1.2em ! important;-ms-border-radius:1.2em ! important;-moz-border-radius:1.2em ! important;-webkit-border-radius:1.2em ! important;border-radius:1.2em ! important}.ui-btn-box-s.ui-btn-hover-s.ui-btn-round{-o-border-radius:1.2em ! important;-ms-border-radius:1.2em ! important;-moz-border-radius:1.2em ! important;-webkit-border-radius:1.2em ! important;border-radius:1.2em ! important}.ui-btn-box-s.ui-btn-down-s .ui-btn-inner{background:#3b73b6;color:#f8f6ef}.ui-btn-up-s,.ui-btn-hover-s,.ui-btn-down-s{font-family:Helvetica,Arial,sans-serif;text-decoration:none}a.ui-link-inherit{text-decoration:none!important}.ui-btn-active{color:#363133;cursor:pointer;text-decoration:none;background:#3b73b6;outline:0}.ui-btn-active a.ui-link-inherit{color:#363133}.ui-corner-tl{-moz-border-radius-topleft:.3em;-webkit-border-top-left-radius:.3em;border-top-left-radius:.3em}.ui-corner-tr{-moz-border-radius-topright:.3em;-webkit-border-top-right-radius:.3em;border-top-right-radius:.3em}.ui-corner-bl{-moz-border-radius-bottomleft:.3em;-webkit-border-bottom-left-radius:.3em;border-bottom-left-radius:.3em}.ui-corner-br{-moz-border-radius-bottomright:.3em;-webkit-border-bottom-right-radius:.3em;border-bottom-right-radius:.3em}.ui-corner-top{-moz-border-radius-topleft:.3em;-webkit-border-top-left-radius:.3em;border-top-left-radius:.3em;-moz-border-radius-topright:.3em;-webkit-border-top-right-radius:.3em;border-top-right-radius:.3em}.ui-corner-bottom{-moz-border-radius-bottomleft:.3em;-webkit-border-bottom-left-radius:.3em;border-bottom-left-radius:.3em;-moz-border-radius-bottomright:.3em;-webkit-border-bottom-right-radius:.3em;border-bottom-right-radius:.3em}.ui-corner-right{-moz-border-radius-topright:.3em;-webkit-border-top-right-radius:.3em;border-top-right-radius:.3em;-moz-border-radius-bottomright:.3em;-webkit-border-bottom-right-radius:.3em;border-bottom-right-radius:.3em}.ui-corner-left{-moz-border-radius-topleft:.3em;-webkit-border-top-left-radius:.3em;border-top-left-radius:.3em;-moz-border-radius-bottomleft:.3em;-webkit-border-bottom-left-radius:.3em;border-bottom-left-radius:.3em}.ui-corner-none{-o-border-radius:0;-ms-border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.ui-header .ui-btn .ui-btn-icon-only .ui-icon,.ui-footer .ui-btn .ui-btn-icon-only .ui-icon{width:1.4545454545454546rem;height:1.4545454545454546rem}.ui-btn-back .ui-btn-inner .ui-icon-header-back-btn{width:1.4545454545454546rem;height:1.4545454545454546rem;background-repeat:no-repeat;background-size:100% 100%}.ui-btn-up-s{}.ui-btn-up-s .ui-icon-header-back-btn{background-image:url(images/page/00_icon_Back.png)}.ui-btn-up-s .ui-icon-naviframe-more{background-image:url(images/page/00_icon_more.png)}.ui-btn-up-s .ui-icon-naviframe-cancel{background-image:url(images/00_icon_cancel.png)}.ui-btn-up-s .ui-icon-naviframe-edit{background-image:url(images/page/00_icon_edit.png)}.ui-btn-up-s .ui-icon-naviframe-plus{background-image:url(images/page/00_icon_plus.png)}.ui-btn-down-s,.ui-btn-hover-s{}.ui-btn-down-s .ui-icon-header-back-btn,.ui-btn-hover-s .ui-icon-header-back-btn{background-image:url(images/page/00_icon_Back_press.png)}.ui-btn-down-s .ui-icon-naviframe-more,.ui-btn-hover-s .ui-icon-naviframe-more{background-image:url(images/page/00_icon_more_press.png)}.ui-btn-down-s .ui-icon-naviframe-cancel,.ui-btn-hover-s .ui-icon-naviframe-cancel{background-image:url(images/00_icon_cancel_press.png)}.ui-btn-down-s .ui-icon-naviframe-edit,.ui-btn-hover-s .ui-icon-naviframe-edit{background-image:url(images/page/00_icon_edit_press.png)}.ui-btn-down-s .ui-icon-naviframe-plus,.ui-btn-hover-s .ui-icon-naviframe-plus{background-image:url(images/page/00_icon_plus_press.png)}.ui-disabled{filter:alpha(opacity=30);opacity:.3;zoom:1}.ui-disabled,.ui-disabled a{cursor:default!important;pointer-events:none}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-mobile,.ui-mobile body{height:100%;font-size:22px}.ui-mobile fieldset,.ui-page{padding:0;margin:0}.ui-mobile a img,.ui-mobile fieldset{border:0}.ui-mobile-viewport{margin:0;overflow-x:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.ui-mobile [data-role=page],.ui-mobile [data-role=dialog],.ui-page{top:0;left:0;width:100%;min-height:100%;position:absolute;display:none;border:0}.ui-mobile .ui-page-active{display:block;overflow:visible}.ui-page{outline:0}.ui-mobile,.ui-mobile .ui-page{background:#f8f6ef;color:#000}.ui-page.ui-mobile-touch-overflow,.ui-mobile-touch-overflow.ui-native-fixed .ui-content{overflow:auto;height:100%;-webkit-overflow-scrolling:touch;-moz-overflow-scrolling:touch;-o-overflow-scrolling:touch;-ms-overflow-scrolling:touch;overflow-scrolling:touch}.ui-page.ui-mobile-touch-overflow,.ui-page.ui-mobile-touch-overflow *{transform:rotatey(0);-ms-transform:rotatey(0);-moz-transform:rotatey(0);-webkit-transform:rotatey(0);-o-transform:rotatey(0)}.ui-page.ui-mobile-pre-transition{display:block}.ui-loading .ui-mobile-viewport{overflow:hidden!important}.ui-loading .ui-loader{display:block}.ui-loading .ui-page{overflow:hidden}.ui-loader{display:none;position:absolute;opacity:.85;z-index:100;left:50%;width:200px;margin-left:-130px;margin-top:-35px;padding:10px 30px}.ui-loader h1{font-size:1.4545454545454546rem;text-align:center}.ui-loader .ui-icon{position:static;display:block;opacity:.9;margin:0 auto;width:35px;height:35px;background-color:transparent}.ui-blocker{width:100%;height:100%;z-index:2147483647}.ui-mobile-rendering>*{visibility:hidden}.ui-bar,.ui-body{position:relative;padding:.4em 15px;overflow:hidden;display:block;clear:both}.ui-bar{font-size:16px;margin:0}.ui-bar h1,.ui-bar h2,.ui-bar h3,.ui-bar h4,.ui-bar h5,.ui-bar h6{margin:0;padding:0;font-size:16px;display:inline-block}.ui-header,.ui-footer{display:block}.ui-page .ui-header,.ui-page .ui-footer{position:fixed;z-index:1000}.ui-header .ui-btn-left{top:.4em;float:left}.ui-header .ui-btn-right{float:right;top:.4em}.ui-header .ui-title,.ui-footer .ui-title{min-height:1.1em;text-align:center;font-size:16px;display:block;margin:.6em 90px .8em;padding:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;outline:0!important}.ui-content{border-width:0;overflow:visible;overflow-x:hidden;padding:15px}.ui-page-fullscreen .ui-content{padding:0}.ui-mobile-touch-overflow.ui-page.ui-native-fixed,.ui-mobile-touch-overflow.ui-page.ui-native-fullscreen{overflow:visible}.ui-mobile-touch-overflow.ui-native-fixed .ui-header,.ui-mobile-touch-overflow.ui-native-fixed .ui-footer{position:fixed;left:0;right:0;top:0;z-index:200}.ui-mobile-touch-overflow.ui-page.ui-native-fixed .ui-footer{top:auto;bottom:0}.ui-mobile-touch-overflow.ui-native-fixed .ui-content{padding-top:2.5em;padding-bottom:3em;top:0;bottom:0;height:auto;position:absolute}.ui-mobile-touch-overflow.ui-native-fullscreen .ui-content{padding-top:0;padding-bottom:0}.ui-mobile-touch-overflow.ui-native-fullscreen .ui-header,.ui-mobile-touch-overflow.ui-native-fullscreen .ui-footer{opacity:.9}.ui-native-bars-hidden{display:none}.ui-icon{width:18px;height:18px}.ui-fullscreen img{max-width:100%}.ui-nojs{position:absolute;left:-9999px}.ui-mobile-viewport-transitioning,.ui-mobile-viewport-transitioning .ui-page{width:100%;height:100%;overflow:hidden}.in{-ms-animation-timing-function:ease-out;-ms-animation-duration:350ms;-o-animation-timing-function:ease-out;-o-animation-duration:350ms;-webkit-animation-timing-function:ease-out;-webkit-animation-duration:350ms;-moz-animation-timing-function:ease-out;-moz-animation-duration:350ms}.out{-ms-animation-timing-function:ease-in;-ms-animation-duration:225ms;-o-animation-timing-function:ease-in;-o-animation-duration:225;-webkit-animation-timing-function:ease-in;-webkit-animation-duration:225ms;-moz-animation-timing-function:ease-in;-moz-animation-duration:225}@-webkit-keyframes fadein{from{ opacity:0}to{opacity:1}}@-moz-keyframes fadein{from{ opacity:0}to{opacity:1}}@-webkit-keyframes fadeout{from{ opacity:1}to{opacity:0}}@-moz-keyframes fadeout{from{ opacity:1}to{opacity:0}}.fade.out{opacity:0;-ms-animation-duration:125ms;-ms-animation-name:fadeout;-o-animation-duration:125ms;-o-animation-name:fadeout;-webkit-animation-duration:125ms;-webkit-animation-name:fadeout;-moz-animation-duration:125ms;-moz-animation-name:fadeout}.fade.in{opacity:1;-ms-animation-duration:225ms;-ms-animation-name:fadein;-o-animation-duration:225ms;-o-animation-name:fadein;-webkit-animation-duration:225ms;-webkit-animation-name:fadein;-moz-animation-duration:225ms;-moz-animation-name:fadein}.viewport-flip{-ms-perspective:1000;-o-perspective:1000;-webkit-perspective:1000;-moz-perspective:1000;position:absolute}.flip{-webkit-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-backface-visibility:hidden;-moz-transform:translate3d(0,0,0)}.flip.out{-webkit-transform:rotateY(-90deg) scale(.9);-webkit-animation-name:flipouttoleft;-webkit-animation-duration:175ms;-moz-transform:rotateY(-90deg) scale(.9);-moz-animation-name:flipouttoleft;-moz-animation-duration:175ms}.flip.in{-webkit-animation-name:flipintoright;-webkit-animation-duration:225ms;-moz-animation-name:flipintoright;-moz-animation-duration:225ms}.flip.out.reverse{-webkit-transform:rotateY(90deg) scale(.9);-webkit-animation-name:flipouttoright;-moz-transform:rotateY(90deg) scale(.9);-moz-animation-name:flipouttoright}.flip.in.reverse{-webkit-animation-name:flipintoleft;-moz-animation-name:flipintoleft}@-webkit-keyframes flipouttoleft{from{ -webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(-90deg) scale(.9)}}@-moz-keyframes flipouttoleft{from{ -moz-transform:rotateY(0)}to{-moz-transform:rotateY(-90deg) scale(.9)}}@-webkit-keyframes flipouttoright{from{ -webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(90deg) scale(.9)}}@-moz-keyframes flipouttoright{from{ -moz-transform:rotateY(0)}to{-moz-transform:rotateY(90deg) scale(.9)}}@-webkit-keyframes flipintoleft{from{ -webkit-transform:rotateY(-90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoleft{from{ -moz-transform:rotateY(-90deg) scale(.9)}to{-moz-transform:rotateY(0)}}@-webkit-keyframes flipintoright{from{ -webkit-transform:rotateY(90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoright{from{ -moz-transform:rotateY(90deg) scale(.9)}to{-moz-transform:rotateY(0)}}.flow{-webkit-transform-origin:50% 30%;-moz-transform-origin:50% 30%;-webkit-box-shadow:0 0 20px rgba(0,0,0,.4);-moz-box-shadow:0 0 20px rgba(0,0,0,.4)}.ui-dialog.flow{-webkit-transform-origin:none;-moz-transform-origin:none;-webkit-box-shadow:none;-moz-box-shadow:none}.flow.out{-webkit-transform:translate3d(-100%,0,0) scale(.7);-webkit-animation-name:flowouttoleft;-webkit-animation-timing-function:ease;-webkit-animation-duration:350ms;-moz-transform:translate3d(-100%,0,0) scale(.7);-moz-animation-name:flowouttoleft;-moz-animation-timing-function:ease;-moz-animation-duration:350ms}.flow.in{-webkit-transform:translate3d(0,0,0) scale(1);-webkit-animation-name:flowinfromright;-webkit-animation-timing-function:ease;-webkit-animation-duration:350ms;-moz-transform:translate3d(0,0,0) scale(1);-moz-animation-name:flowinfromright;-moz-animation-timing-function:ease;-moz-animation-duration:350ms}.flow.out.reverse{-webkit-transform:translate3d(100%,0,0);-webkit-animation-name:flowouttoright;-moz-transform:translate3d(100%,0,0);-moz-animation-name:flowouttoright}.flow.in.reverse{-webkit-animation-name:flowinfromleft;-moz-animation-name:flowinfromleft}@-webkit-keyframes flowouttoleft{0%{ -webkit-transform:translate3d(0,0,0) scale(1)}60%,70%{-webkit-transform:translate3d(0,0,0) scale(.7)}100%{-webkit-transform:translate3d(-100%,0,0) scale(.7)}}@-moz-keyframes flowouttoleft{0%{ -moz-transform:translate3d(0,0,0) scale(1)}60%,70%{-moz-transform:translate3d(0,0,0) scale(.7)}100%{-moz-transform:translateX(-100%) scale(.7)}}@-webkit-keyframes flowouttoright{0%{ -webkit-transform:translate3d(0,0,0) scale(1)}60%,70%{-webkit-transform:translate3d(0,0,0) scale(.7)}100%{-webkit-transform:translate3d(100%,0,0) scale(.7)}}@-moz-keyframes flowouttoright{0%{ -moz-transform:translate3d(0,0,0) scale(1)}60%,70%{-moz-transform:translate3d(0,0,0) scale(.7)}100%{-moz-transform:translate3d(100%,0,0) scale(.7)}}@-webkit-keyframes flowinfromleft{0%{ -webkit-transform:translate3d(-100%,0,0) scale(.7)}30%,40%{-webkit-transform:translate3d(0,0,0) scale(.7)}100%{-webkit-transform:translate3d(0,0,0) scale(1)}}@-moz-keyframes flowinfromleft{0%{ -moz-transform:translate3d(-100%,0,0) scale(.7)}30%,40%{-moz-transform:translate3d(0,0,0) scale(.7)}100%{-moz-transform:translate3d(0,0,0) scale(1)}}@-webkit-keyframes flowinfromright{0%{ -webkit-transform:translate3d(100%,0,0) scale(.7)}30%,40%{-webkit-transform:translate3d(0,0,0) scale(.7)}100%{-webkit-transform:translate3d(0,0,0) scale(1)}}@-moz-keyframes flowinfromright{0%{ -moz-transform:translate3d(100%,0,0) scale(.7)}30%,40%{-moz-transform:translate3d(0,0,0) scale(.7)}100%{-moz-transform:translate3d(0,0,0) scale(1)}}.pop{-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%}.pop.in{-webkit-transform:scale(1);-moz-transform:scale(1);opacity:1;-webkit-animation-name:popin;-moz-animation-name:popin;-webkit-animation-duration:350ms;-moz-animation-duration:350ms}.pop.out{-webkit-animation-name:fadeout;-moz-animation-name:fadeout;opacity:0;-webkit-animation-duration:100ms;-moz-animation-duration:100ms}.pop.in.reverse{-webkit-animation-name:fadein;-moz-animation-name:fadein}.pop.out.reverse{-webkit-transform:scale(.8);-moz-transform:scale(.8);-webkit-animation-name:popout;-moz-animation-name:popout}@-webkit-keyframes popin{from{ -webkit-transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);opacity:1}}@-moz-keyframes popin{from{ -moz-transform:scale(.8);opacity:0}to{-moz-transform:scale(1);opacity:1}}@-webkit-keyframes popout{from{ -webkit-transform:scale(1);opacity:1}to{-webkit-transform:scale(.8);opacity:0}}@-moz-keyframes popout{from{ -moz-transform:scale(1);opacity:1}to{-moz-transform:scale(.8);opacity:0}}@-webkit-keyframes slideinfromright{from{ -webkit-transform:translate3d(100%,0,0)}to{-webkit-transform:translate3d(0,0,0)}}@-moz-keyframes slideinfromright{from{ -moz-transform:translate3d(100%,0,0)}to{-moz-transform:translate3d(0,0,0)}}@-webkit-keyframes slideinfromleft{from{ -webkit-transform:translate3d(-100%,0,0)}to{-webkit-transform:translate3d(0,0,0)}}@-moz-keyframes slideinfromleft{from{ -moz-transform:translate3d(-100%,0,0)}to{-moz-transform:translate3d(0,0,0)}}@-webkit-keyframes slideouttoleft{from{ -webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(-100%,0,0)}}@-moz-keyframes slideouttoleft{from{ -moz-transform:translate3d(0,0,0)}to{-moz-transform:translate3d(-100%,0,0)}}@-webkit-keyframes slideouttoright{from{ -webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(100%,0,0)}}@-moz-keyframes slideouttoright{from{ -moz-transform:translate3d(0,0,0)}to{-moz-transform:translate3d(100%,0,0)}}.slide.out,.slide.in{-webkit-animation-timing-function:ease-out;-webkit-animation-duration:350ms;-moz-animation-timing-function:ease-out;-moz-animation-duration:350ms}.slide.out{-webkit-transform:translate3d(-100%,0,0);-webkit-animation-name:slideouttoleft;-moz-transform:translate3d(-100%,0,0);-moz-animation-name:slideouttoleft}.slide.in{-webkit-transform:translate3d(0,0,0);-webkit-animation-name:slideinfromright;-moz-transform:translate3d(0,0,0);-moz-animation-name:slideinfromright}.slide.out.reverse{-webkit-transform:translate3d(100%,0,0);-webkit-animation-name:slideouttoright;-moz-transform:translate3d(100%,0,0);-moz-animation-name:slideouttoright}.slide.in.reverse{-webkit-transform:translate3d(0,0,0);-webkit-animation-name:slideinfromleft;-moz-transform:translate3d(0,0,0);-moz-animation-name:slideinfromleft}.slidedown.out{-webkit-animation-name:fadeout;-moz-animation-name:fadeout;-webkit-animation-duration:100ms;-moz-animation-duration:100ms}.slidedown.in{-webkit-transform:translate3d(0,0,0);-webkit-animation-name:slideinfromtop;-moz-transform:translate3d(0,0,0);-moz-animation-name:slideinfromtop;-webkit-animation-duration:250ms;-moz-animation-duration:250ms}.slidedown.in.reverse{-webkit-animation-name:fadein;-moz-animation-name:fadein;-webkit-animation-duration:150ms;-moz-animation-duration:150ms}.slidedown.out.reverse{-webkit-transform:translate3d(0,-100%,0);-moz-transform:translate3d(0,-100%,0);-webkit-animation-name:slideouttotop;-moz-animation-name:slideouttotop;-webkit-animation-duration:200ms;-moz-animation-duration:200ms}@-webkit-keyframes slideinfromtop{from{ -webkit-transform:translate3d(0,-100%,0)}to{-webkit-transform:translate3d(0,0,0)}}@-moz-keyframes slideinfromtop{from{ -moz-transform:translate3d(0,-100%,0)}to{-moz-transform:translate3d(0,0,0)}}@-webkit-keyframes slideouttotop{from{ -webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(0,-100%,0)}}@-moz-keyframes slideouttotop{from{ -moz-transform:translate3d(0,0,0)}to{-moz-transform:translate3d(0,-100%,0)}}.slideup.out{-webkit-animation-name:fadeout;-moz-animation-name:fadeout;-webkit-animation-duration:100ms;-moz-animation-duration:100ms}.slideup.in{-webkit-transform:translate3d(0,0,0);-webkit-animation-name:slideinfrombottom;-moz-transform:translate3d(0,0,0);-moz-animation-name:slideinfrombottom;-webkit-animation-duration:250ms;-moz-animation-duration:250ms}.slideup.in.reverse{-webkit-animation-name:fadein;-moz-animation-name:fadein;-webkit-animation-duration:150ms;-moz-animation-duration:150ms}.slideup.out.reverse{-webkit-transform:translate3d(0,100%,0);-moz-transform:translate3d(0,100%,0);-webkit-animation-name:slideouttobottom;-moz-animation-name:slideouttobottom;-webkit-animation-duration:200ms;-moz-animation-duration:200ms}@-webkit-keyframes slideinfrombottom{from{ -webkit-transform:translate3d(0,100%,0)}to{-webkit-transform:translate3d(0,0,0)}}@-moz-keyframes slideinfrombottom{from{ -moz-transform:translate3d(0,100%,0)}to{-moz-transform:translate3d(0,0,0)}}@-webkit-keyframes slideouttobottom{from{ -webkit-transform:translate3d(0,0,0)}to{-webkit-transform:translate3d(0,100%,0)}}@-moz-keyframes slideouttobottom{from{ -moz-transform:translate3d(0,0,0)}to{-moz-transform:translate3d(0,100%,0)}}.slidefade.out{-webkit-transform:translate3d(-100%,0,0);-webkit-animation-name:slideouttoleft;-moz-transform:translate3d(-100%,0,0);-moz-animation-name:slideouttoleft;-webkit-animation-duration:225ms;-moz-animation-duration:225ms}.slidefade.in{-webkit-transform:translate3d(0,0,0);-webkit-animation-name:fadein;-moz-transform:translate3d(0,0,0);-moz-animation-name:fadein;-webkit-animation-duration:200ms;-moz-animation-duration:200ms}.slidefade.out.reverse{-webkit-transform:translate3d(100%,0,0);-webkit-animation-name:slideouttoright;-moz-transform:translate3d(100%,0,0);-moz-animation-name:slideouttoright;-webkit-animation-duration:200ms;-moz-animation-duration:200ms}.slidefade.in.reverse{-webkit-transform:translate3d(0,0,0);-webkit-animation-name:fadein;-moz-transform:translate3d(0,0,0);-moz-animation-name:fadein;-webkit-animation-duration:200ms;-moz-animation-duration:200ms}.viewport-turn{-webkit-perspective:1000;-moz-perspective:1000;position:absolute}.turn{-webkit-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-webkit-transform-origin:0;-moz-backface-visibility:hidden;-moz-transform:translate3d(0,0,0);-moz-transform-origin:0}.turn.out{-webkit-transform:rotateY(-90deg) scale(.9);-webkit-animation-name:flipouttoleft;-moz-transform:rotateY(-90deg) scale(.9);-moz-animation-name:flipouttoleft;-webkit-animation-duration:125ms;-moz-animation-duration:125ms}.turn.in{-webkit-animation-name:flipintoright;-moz-animation-name:flipintoright;-webkit-animation-duration:250ms;-moz-animation-duration:250ms}.turn.out.reverse{-webkit-transform:rotateY(90deg) scale(.9);-webkit-animation-name:flipouttoright;-moz-transform:rotateY(90deg) scale(.9);-moz-animation-name:flipouttoright}.turn.in.reverse{-webkit-animation-name:flipintoleft;-moz-animation-name:flipintoleft}@-webkit-keyframes flipouttoleft{from{ -webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(-90deg) scale(.9)}}@-moz-keyframes flipouttoleft{from{ -moz-transform:rotateY(0)}to{-moz-transform:rotateY(-90deg) scale(.9)}}@-webkit-keyframes flipouttoright{from{ -webkit-transform:rotateY(0)}to{-webkit-transform:rotateY(90deg) scale(.9)}}@-moz-keyframes flipouttoright{from{ -moz-transform:rotateY(0)}to{-moz-transform:rotateY(90deg) scale(.9)}}@-webkit-keyframes flipintoleft{from{ -webkit-transform:rotateY(-90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoleft{from{ -moz-transform:rotateY(-90deg) scale(.9)}to{-moz-transform:rotateY(0)}}@-webkit-keyframes flipintoright{from{ -webkit-transform:rotateY(90deg) scale(.9)}to{-webkit-transform:rotateY(0)}}@-moz-keyframes flipintoright{from{ -moz-transform:rotateY(90deg) scale(.9)}to{-moz-transform:rotateY(0)}}.depth{-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%}.depth.out{-webkit-animation-name:depthout;-moz-animation-name:depthout;opacity:0;-webkit-animation-duration:250ms;-moz-animation-duration:250ms;-webkit-animation-timing-function:ease;-moz-animation-timing-function:ease}.depth.in{-webkit-transform:scale(1);-moz-transform:scale(1);opacity:1;-webkit-animation-name:depthin;-moz-animation-name:depthin;-webkit-animation-duration:350ms;-moz-animation-duration:350ms;-webkit-animation-timing-function:ease;-moz-animation-timing-function:ease}.depth.in.reverse{-webkit-animation-name:depthinreverse;-moz-animation-name:depthinreverse}.depth.out.reverse{-webkit-transform:scale(.9);-moz-transform:scale(.9);-webkit-animation-name:depthoutreverse;-moz-animation-name:depthoutreverse}@-webkit-keyframes depthout{from{ -webkit-transform:scale(1);opacity:1}to{-webkit-transform:scale(1.1);opacity:0}}@-moz-keyframes depthout{from{ -moz-transform:scale(1);opacity:1}to{-moz-transform:scale(1.1);opacity:0}}@-webkit-keyframes depthin{0%{ -webkit-transform:scale(.9);opacity:0}30%{-webkit-transform:scale(.9);opacity:0}100%{-webkit-transform:scale(1);opacity:1}}@-moz-keyframes depthin{0%{ -moz-transform:scale(.9);opacity:0}30%{-moz-transform:scale(.9);opacity:0}100%{-moz-transform:scale(1);opacity:1}}@-webkit-keyframes depthinreverse{0%{ -webkit-transform:scale(1.1);opacity:0}30%{-webkit-transform:scale(1.1);opacity:0}100%{-webkit-transform:scale(1);opacity:1}}@-moz-keyframes depthinreverse{0%{ -moz-transform:scale(1.1);opacity:0}30%{-moz-transform:scale(1.1);opacity:0}100%{-moz-transform:scale(1);opacity:1}}@-webkit-keyframes depthoutreverse{from{ -webkit-transform:scale(1);opacity:1}to{-webkit-transform:scale(.9);opacity:0}}@-moz-keyframes depthoutreverse{from{ -moz-transform:scale(1);opacity:1}to{-moz-transform:scale(.9);opacity:0}}.ui-grid-a,.ui-grid-b,.ui-grid-c,.ui-grid-d{overflow:hidden}.ui-block-a,.ui-block-b,.ui-block-c,.ui-block-d,.ui-block-e{margin:0;padding:0;border:0;float:left;min-height:1px}.ui-grid-solo .ui-block-a{width:100%;float:none}.ui-grid-a .ui-block-a,.ui-grid-a .ui-block-b{width:50%}.ui-grid-a .ui-block-a{clear:left}.ui-grid-b .ui-block-a,.ui-grid-b .ui-block-b,.ui-grid-b .ui-block-c{width:33.333%}.ui-grid-b .ui-block-a{clear:left}.ui-grid-c .ui-block-a,.ui-grid-c .ui-block-b,.ui-grid-c .ui-block-c,.ui-grid-c .ui-block-d{width:25%}.ui-grid-c .ui-block-a{clear:left}.ui-grid-d .ui-block-a,.ui-grid-d .ui-block-b,.ui-grid-d .ui-block-c,.ui-grid-d .ui-block-d,.ui-grid-d .ui-block-e{width:20%}.ui-grid-d .ui-block-a{clear:left}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-header,.ui-footer,.ui-page-fullscreen .ui-header,.ui-page-fullscreen .ui-footer{position:absolute;overflow:hidden;width:100%;border-left-width:0;border-right-width:0}.ui-header-fixed,.ui-footer-fixed{z-index:1000;-webkit-transform:translatez(0)}.ui-footer-duplicate,.ui-page-fullscreen .ui-fixed-inline{display:none}.ui-page-fullscreen .ui-header,.ui-page-fullscreen .ui-footer{opacity:.9}.ui-navbar{overflow:hidden}.ui-navbar ul,.ui-navbar-expanded ul{list-style:none;padding:0;margin:0;position:relative;display:block;border:0}.ui-navbar-collapsed ul{float:left;width:75%;margin-right:-2px}.ui-navbar-collapsed .ui-navbar-toggle{float:left;width:25%}.ui-navbar li.ui-navbar-truncate{position:absolute;left:-9999px;top:-9999px}.ui-navbar li .ui-btn,.ui-navbar .ui-navbar-toggle .ui-btn{display:block;font-size:12px;text-align:center;margin:0;border-right-width:0}.ui-navbar li .ui-btn{margin-right:-1px}.ui-navbar li .ui-btn:last-child{margin-right:0}.ui-header .ui-navbar li .ui-btn,.ui-header .ui-navbar .ui-navbar-toggle .ui-btn,.ui-footer .ui-navbar li .ui-btn,.ui-footer .ui-navbar .ui-navbar-toggle .ui-btn{border-top-width:0;border-bottom-width:0}.ui-navbar .ui-btn-inner{padding-left:2px;padding-right:2px}.ui-navbar-noicons li .ui-btn .ui-btn-inner,.ui-navbar-noicons .ui-navbar-toggle .ui-btn-inner{padding-top:.8em;padding-bottom:.9em}.ui-navbar-expanded .ui-btn{margin:0;font-size:14px}.ui-navbar-expanded .ui-btn-inner{padding-left:5px;padding-right:5px}.ui-navbar-expanded .ui-btn-icon-top .ui-btn-inner{padding:45px 5px 15px;text-align:center}.ui-navbar-expanded .ui-btn-icon-top .ui-icon{top:15px}.ui-navbar-expanded .ui-btn-icon-bottom .ui-btn-inner{padding:15px 5px 45px;text-align:center}.ui-navbar-expanded .ui-btn-icon-bottom .ui-icon{bottom:15px}.ui-navbar-expanded li .ui-btn .ui-btn-inner{min-height:2.5em}.ui-navbar-expanded .ui-navbar-noicons .ui-btn .ui-btn-inner{padding-top:1.8em;padding-bottom:1.9em}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-btn{display:block;text-align:center;cursor:pointer;position:relative;vertical-align:middle}.ui-btn:focus,.ui-btn:active{outline:0}.ui-header .ui-btn,.ui-footer .ui-btn,.ui-bar .ui-btn{display:inline-block;font-size:.5909090909090909rem;margin:0}.ui-btn-inline{display:inline-block}.ui-btn-inner{padding:.5em .4090909090909091rem;display:block;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;position:relative;zoom:1}.ui-header .ui-btn-inner,.ui-footer .ui-btn-inner,.ui-bar .ui-btn-inner{padding:.7em 0 .7em}.ui-header .ui-btn-inner.ui-btn-icon-only,.ui-footer .ui-btn-inner,.ui-bar .ui-btn-inner.ui-btn-icon-only{padding:.4em .36363636363636365rem .5em}.ui-btn-icon-notext{width:1.6363636363636365rem;height:1.6363636363636365rem}.ui-btn-icon-notext .ui-btn-inner{padding:.09090909090909091rem .045454545454545456rem .09090909090909091rem .13636363636363635rem}.ui-btn-icon-notext .ui-btn-inner .ui-icon{margin-left:-.7272727272727273rem;margin-top:-.7272727272727273rem}.ui-btn-icon-notext .ui-btn-text{position:absolute;left:-45.409090909090914rem}.ui-btn-icon-left .ui-btn-inner{padding-left:1.5rem}.ui-header .ui-btn-icon-left .ui-btn-inner,.ui-footer .ui-btn-icon-left .ui-btn-inner,.ui-bar .ui-btn-icon-left .ui-btn-inner{padding-left:1.2272727272727273rem}.ui-btn-icon-right .ui-btn-inner{padding-right:1.5rem}.ui-header .ui-btn-icon-right .ui-btn-inner,.ui-footer .ui-btn-icon-right .ui-btn-inner,.ui-bar .ui-btn-icon-right .ui-btn-inner{padding-right:1.2272727272727273rem}.ui-btn-icon-top .ui-btn-inner{padding-top:1.2272727272727273rem}.ui-header .ui-btn-icon-top .ui-btn-inner,.ui-footer .ui-btn-icon-top .ui-btn-inner,.ui-bar .ui-btn-icon-top .ui-btn-inner{padding-top:1.2272727272727273rem}.ui-btn-icon-bottom .ui-btn-inner{padding-bottom:1.5rem}.ui-header .ui-btn-icon-bottom .ui-btn-inner,.ui-footer .ui-btn-icon-bottom .ui-btn-inner,.ui-bar .ui-btn-icon-bottom .ui-btn-inner{padding-bottom:1.2272727272727273rem}.ui-btn-icon-notext .ui-icon{display:block}.ui-btn-icon-left .ui-icon,.ui-btn-icon-right .ui-icon,.ui-btn-icon-circle .ui-icon{position:absolute}.ui-btn-icon-top .ui-icon,.ui-btn-icon-bottom .ui-icon{position:absolute;left:50%;margin-left:-9px}.ui-btn-icon-left .ui-icon{left:0rem}.ui-btn-icon-circle .ui-icon{left:0rem}.ui-btn-icon-right .ui-icon{right:.4545454545454546rem}.ui-btn-icon-top .ui-icon{top:0rem;margin-top:0}.ui-btn-icon-bottom .ui-icon{bottom:0rem}.ui-header .ui-btn-icon-right .ui-icon,.ui-footer .ui-btn-icon-right .ui-icon,.ui-bar .ui-btn-icon-right .ui-icon{right:.18181818181818182rem}.ui-header .ui-btn-icon-top .ui-icon,.ui-footer .ui-btn-icon-top .ui-icon,.ui-bar .ui-btn-icon-top .ui-icon{top:.18181818181818182rem}.ui-header .ui-btn-icon-bottom .ui-icon,.ui-footer .ui-btn-icon-bottom .ui-icon,.ui-bar .ui-btn-icon-bottom .ui-icon{bottom:.18181818181818182rem}.ui-btn-hidden{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-appearance:button;opacity:.1;cursor:pointer;background:transparent;font-size:.045454545454545456rem;border:0;line-height:45.409090909090914rem}.ui-btn-text{margin-left:auto;margin-right:auto;padding:0 1px}.ui-li .ui-btn.ui-btn-icon_only{top:50%;margin-top:-.7272727272727273rem}.ui-li .ui-btn .ui-btn-inner.ui-btn-hastxt{padding:.2em .5em}.ui-btn-icon-nobg.ui-btn-down-s .ui-btn-inner{background:transparent ! important}.ui-btn.ui-btn-box-s.ui-btn-down-s .ui-btn-inner{color:#f8f6ef}.ui-header .ui-btn-box-s:not(.ui-input-cancel):not(.ui-btn-search-front-icon),.ui-header .ui-btn-box-s:not(.ui-input-cancel):not(.ui-btn-search-front-icon) .ui-btn-inner,.ui-header .ui-btn.ui-btn-box-s.ui-btn-down-s:not(.ui-input-cancel):not(.ui-btn-search-front-icon) .ui-btn-inner,.ui-btn.ui-btn-back.ui-btn-up-s .ui-btn-inner,.ui-btn.ui-btn-back.ui-btn-hover-s .ui-btn-inner,.ui-btn.ui-btn-back.ui-btn-down-s .ui-btn-inner{background:transparent;border:0;box-shadow:none}.ui-btn-icon-top .ui-btn-inner.ui-btn-hastxt,.ui-li .ui-btn-icon-top .ui-btn-inner.ui-btn-hastxt{padding-top:2.3636363636363638rem}.ui-btn-icon-bottom .ui-btn-inner.ui-btn-hastxt,.ui-li .ui-btn-icon-bottom .ui-btn-inner.ui-btn-hastxt{padding-bottom:2.3636363636363638rem}.ui-btn .ui-icon{width:1.4545454545454546rem;height:1.4545454545454546rem}.ui-btn.ui-btn-edit .ui-icon{width:3.3636363636363638rem;height:3.3636363636363638rem}.ui-btn .ui-btn-text.ui-btn-text-padding-left{padding-left:2rem}.ui-btn .ui-btn-text.ui-btn-text-padding-right{padding-right:2.1818181818181817rem}.ui-btn .ui-btn-text.ui-btn-text-padding-top{padding-top:1.4545454545454546rem}.ui-icon{z-index:10;background-repeat:no-repeat;vertical-align:middle;background-position:0 0;background-size:100%}.ui-btn-box.s .ui-icon{position:absolute}.ui-btn-box-s.ui-btn-icon-left .ui-icon,.ui-btn-box-s.ui-btn-icon-right .ui-icon{margin-top:-.7272727272727273rem;top:50%}.ui-btn-box-s.ui-btn-icon-top .ui-icon,.ui-btn-box-s.ui-btn-icon-bottom .ui-icon{margin-left:-.7272727272727273rem;left:50%}.tizen-icon-common{width:1.4545454545454546rem;height:1.4545454545454546rem}.tizen-smallicon-common{width:.9090909090909092rem ! important;height:.9090909090909092rem ! important;top:50% ! important;left:50% ! important;margin-top:-.4545454545454546rem ! important;margin-left:-.4545454545454546rem ! important}.ui-icon-bg{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/00_btn_circle_bg_normal.png);z-index:0}.ui-icon-arrow-l{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_left.png)}.ui-icon-arrow-r{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_right.png)}.ui-icon-arrow-u{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_expand_opened.png)}.ui-icon-arrow-d{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_expand_closed.png)}.ui-icon-delete{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_expand_cancel.png)}.ui-icon-plus{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_plus.png)}.ui-icon-minus{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_expand_minus.png)}.ui-icon-check{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_check.png)}.ui-icon-gear{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_gear.png)}.ui-icon-refresh{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_refresh.png)}.ui-icon-forward{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_expand_send.png)}.ui-icon-back{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_back.png)}.ui-icon-grid{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_grid.png)}.ui-icon-star{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_star.png)}.ui-icon-alert{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_warning.png)}.ui-icon-info{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_info.png)}.ui-icon-home{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_home.png)}.ui-icon-search{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_search.png)}.ui-icon-call{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_call.png)}.ui-icon-rename{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_rename.png)}.ui-icon-scrolltop{width:.9090909090909092rem ! important;height:.9090909090909092rem ! important;top:50% ! important;left:50% ! important;margin-top:-.4545454545454546rem ! important;margin-left:-.4545454545454546rem ! important;background-image:url(images/controls/button/00_icon_jump.png)}.ui-icon-scrollleft{width:.9090909090909092rem ! important;height:.9090909090909092rem ! important;top:50% ! important;left:50% ! important;margin-top:-.4545454545454546rem ! important;margin-left:-.4545454545454546rem ! important;background-image:url(images/controls/button/00_icon_jump_left.png)}.ui-icon-expandable-divider-opened{width:1.9090909090909092rem;height:1.9090909090909092rem;position:absolute;right:1.2727272727272727rem;top:0rem;background-repeat:no-repeat;background-size:100% 100%;background-image:url(images/00_indexlist_icon_opened.png)}.ui-icon-expandable-divider-closed{width:1.9090909090909092rem;height:1.9090909090909092rem;position:absolute;right:1.2727272727272727rem;top:0rem;background-repeat:no-repeat;background-size:100% 100%;background-image:url(images/00_indexlist_icon_closed.png)}.ui-btn-down-s .ui-icon-bg,.ui-btn-down-s.ui-tizen-icon-bg{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/00_btn_circle_bg_press.png);z-index:0}.ui-btn-down-s .ui-icon-arrow-l{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_left_press.png)}.ui-btn-down-s .ui-icon-arrow-r{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_right_press.png)}.ui-btn-down-s .ui-icon-arrow-u{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_expand_opened_press.png)}.ui-btn-down-s .ui-icon-arrow-d{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_expand_closed_press.png)}.ui-btn-down-s .ui-icon-delete{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_expand_cancel_press.png)}.ui-btn-down-s .ui-icon-plus{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_plus_press.png)}.ui-btn-down-s .ui-icon-minus{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_expand_minus_press.png)}.ui-btn-down-s .ui-icon-check{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_check_press.png)}.ui-btn-down-s .ui-icon-gear{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_gear_press.png)}.ui-btn-down-s .ui-icon-refresh{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_refresh_press.png)}.ui-btn-down-s .ui-icon-forward{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_expand_send_press.png)}.ui-btn-down-s .ui-icon-back{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_back_press.png)}.ui-btn-down-s .ui-icon-grid{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_grid_press.png)}.ui-btn-down-s .ui-icon-star{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_star_press.png)}.ui-btn-down-s .ui-icon-alert{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_warning_press.png)}.ui-btn-down-s .ui-icon-info{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_info_press.png)}.ui-btn-down-s .ui-icon-home{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_home_press.png)}.ui-btn-down-s .ui-icon-search{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_search_press.png)}.ui-btn-down-s .ui-icon-call{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_call_press.png)}.ui-btn-down-s .ui-icon-rename{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/button/00_button_rename_press.png)}.ui-btn-down-s .ui-icon-scrolltop{width:.9090909090909092rem ! important;height:.9090909090909092rem ! important;top:50% ! important;left:50% ! important;margin-top:-.4545454545454546rem ! important;margin-left:-.4545454545454546rem ! important;background-image:url(images/controls/button/00_icon_jump_press.png)}.ui-btn-down-s .ui-icon-scrollleft{width:.9090909090909092rem ! important;height:.9090909090909092rem ! important;top:50% ! important;left:50% ! important;margin-top:-.4545454545454546rem ! important;margin-left:-.4545454545454546rem ! important;background-image:url(images/controls/button/00_icon_jump_left_press.png)}.ui-btn-inner.ui-btn-icon-only{padding:.7272727272727273rem .7272727272727273rem}.ui-btn-icon-only .ui-btn-text{left:-9999px;display:none}.ui-btn.ui-btn-corner-all{-o-border-radius:1.2em ! important;-ms-border-radius:1.2em ! important;-moz-border-radius:1.2em ! important;-webkit-border-radius:1.2em ! important;border-radius:1.2em ! important}.ui-btn.ui-btn-icon-nobg{box-shadow:none}.ui-btn-corner-circle{-o-border-radius:1em ! important;-ms-border-radius:1em ! important;-moz-border-radius:1em ! important;-webkit-border-radius:1em ! important;border-radius:1em ! important}.ui-btn-round{-o-border-radius:1.2em ! important;-ms-border-radius:1.2em ! important;-moz-border-radius:1.2em ! important;-webkit-border-radius:1.2em ! important;border-radius:1.2em ! important}.ui-btn-round .ui-btn-inner{-o-border-radius:1.2em ! important;-ms-border-radius:1.2em ! important;-moz-border-radius:1.2em ! important;-webkit-border-radius:1.2em ! important;border-radius:1.2em ! important}.ui-btn.ui-btn-icon-nobg,.ui-btn .ui-btn-icon-nobg{background:transparent;background-color:transparent;border:0}.ui-btn.ui-btn-edit .ui-btn-text{color:#f9f9f9}.ui-btn.ui-btn-edit .ui-btn-inner{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.ui-btn-box-s{color:#363133;background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-collapsible-inset{margin:.5em 0}.ui-collapsible-inset .ui-collapsible-heading{margin:0}.ui-collapsible-inset .ui-collapsible-heading .ui-btn{border-right-width:1px;border-left-width:1px}.ui-collapsible-collapsed+.ui-collapsible:not(.ui-collapsible-inset) .ui-collapsible-heading .ui-btn{border-top-width:0}.ui-collapsible-set .ui-collapsible:not(.ui-collapsible-inset) .ui-collapsible-heading .ui-btn{border-top-width:1px}.ui-collapsible-heading{font-size:1rem;display:block;margin:0 -15px;padding:0;position:relative}.ui-collapsible-heading .ui-btn{text-align:left;margin:0;border-left-width:0;border-right-width:0}.ui-collapsible-heading .ui-btn-text{color:#000}.ui-collapsible-heading .ui-btn-inner,.ui-collapsible-heading .ui-btn-icon-left .ui-btn-inner{padding-left:40px}.ui-collapsible-heading .ui-btn-icon-right .ui-btn-inner{padding-left:12px;padding-right:40px}.ui-collapsible-heading .ui-btn-icon-top .ui-btn-inner,.ui-collapsible-heading .ui-btn-icon-bottom .ui-btn-inner{padding-right:40px;text-align:center}.ui-collapsible-heading .ui-btn-inner>.ui-icon-arrow-d{-webkit-transition:all .33s ease;-moz-transition:all .33s ease;-ms-transition:all .33s ease;-o-transition:all .33s ease;transition:all .33s ease;-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg)}.ui-collapsible-heading .ui-btn-inner>.ui-icon-arrow-u{background-image:url(images/controls/button/00_button_expand_closed.png);-webkit-transition:all .33s ease;-moz-transition:all .33s ease;-ms-transition:all .33s ease;-o-transition:all .33s ease;transition:all .33s ease;-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0deg)}.ui-collapsible-heading .ui-btn span.ui-btn{position:absolute;left:6px;top:50%;margin:-12px 0 0 0;width:20px;height:20px;padding:1px 0 1px 2px;text-indent:-9999px}.ui-collapsible-heading .ui-btn span.ui-btn .ui-btn-inner{padding:10px 0}.ui-collapsible-heading .ui-btn span.ui-btn .ui-icon{left:0;margin-top:-10px}.ui-collapsible-heading-status{position:absolute;top:-9999px;left:0}.ui-collapsible-content{display:block;margin:0 -15px;padding:0 15px;border-left-width:0;border-right-width:0;border-top:0;background-image:none;visibility:visible;overflow:auto;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-ms-transition:all .5s ease;-o-transition:all .5s ease;transition:all .5s ease}.ui-collapsible-inset .ui-collapsible-content{margin:0;border-right-width:1px;border-left-width:1px}.ui-collapsible-content-collapsed{overflow:hidden;max-height:0!important;visibility:hidden}.ui-collapsible-set{margin:.5em 0}.ui-collapsible-set .ui-collapsible{margin:-1px 0 0}.ui-collapsible-set .ui-collapsible:first-child{margin-top:0}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-dialog{min-height:480px}.ui-dialog .ui-header,.ui-dialog .ui-content,.ui-dialog .ui-footer{margin:15px;position:relative}.ui-dialog .ui-header,.ui-dialog .ui-footer{z-index:10;width:auto}.ui-dialog .ui-header .ui-btn-left{width:0;border-width:0}.ui-dialog .center_info{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center}.ui-dialog .center_info .popup-text{font-size:42px;background:#213c49;width:100%}.ui-dialog .center_info .popup-text p{text-align:center;padding:22px 16px}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-checkbox .ui-btn-inner,.ui-radio .ui-btn-inner{white-space:normal}.ui-checkbox,.ui-radio{position:relative;margin:0}.ui-checkbox .ui-btn-corner-all,.ui-radio .ui-btn-corner-all{-o-border-radius:0;-ms-border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}.ui-checkbox .ui-btn-inner,.ui-radio .ui-btn-inner{border-top:0}.ui-checkbox .ui-btn-up-s,.ui-radio .ui-btn-up-s{border:0;background:transparent;font-weight:400}.ui-checkbox .ui-btn-hover-s,.ui-radio .ui-btn-hover-s{border:0;background:transparent;font-weight:400}.ui-checkbox .ui-btn-down-s,.ui-radio .ui-btn-down-s{border:0;background:transparent;font-weight:400}.ui-checkbox input,.ui-radio input{z-index:1;margin:0;left:.4545454545454546rem;position:absolute;outline:0!important}.ui-checkbox>input,.ui-radio>input{display:none}.ui-checkbox .ui-btn,.ui-radio .ui-btn{z-index:2;height:100%;margin:0;text-align:left}.ui-checkbox .ui-btn.ui-btn-icon-left,.ui-radio .ui-btn.ui-btn-icon-left{display:inline-block}.ui-checkbox .ui-btn.ui-btn-icon-left .ui-btn-inner,.ui-radio .ui-btn.ui-btn-icon-left .ui-btn-inner{min-width:1.8181818181818183rem;display:inline-block;line-height:1.4545454545454546rem;padding:0 .7272727272727273rem 0 .7272727272727273rem}.ui-checkbox .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-btn-text,.ui-radio .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-btn-text{display:inline-block;vertical-align:middle;min-height:1.4545454545454546rem}.ui-checkbox .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-btn-text.ui-btn-text-padding-left,.ui-radio .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-btn-text.ui-btn-text-padding-left{padding-left:1.0909090909090908rem}.ui-checkbox .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-icon,.ui-radio .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-icon{position:absolute;top:50%;width:1.4545454545454546rem;height:1.4545454545454546rem;margin-top:-.7272727272727273rem}.ui-checkbox.favorite input{position:absolute;left:-10000px;height:100%;outline:0!important}.ui-checkbox.favorite .ui-btn.ui-btn-icon-left{display:block}.ui-checkbox.favorite .ui-btn.ui-btn-icon-left .ui-btn-inner{display:inline-block;line-height:1.4545454545454546rem;padding:0 0 0 .7272727272727273rem}.ui-checkbox.favorite .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-btn-text{display:inline-block;vertical-align:middle}.ui-checkbox.favorite .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-btn-text.ui-btn-text-padding-left{padding-left:1.0909090909090908rem}.ui-checkbox.favorite .ui-btn.ui-btn-icon-left .ui-btn-inner .ui-icon{position:absolute;top:50%;width:1.4545454545454546rem;height:1.4545454545454546rem;margin-top:-.7272727272727273rem}.ui-icon-checkbox-off,.ui-icon-checkbox-on,.favorite .ui-icon-checkbox-off,.favorite .ui-icon-checkbox-on,.ui-icon-checkbox-on-press,.ui-icon-checkbox-off-press,.ui-icon-radio-off,.ui-icon-radio-on,.ui-icon-radio-on-press,.ui-icon-radio-off-press{background-size:100% 100%;background-color:transparent}.ui-icon-checkbox-off{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/00_check_bg.png)}.ui-icon-checkbox-on{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/00_check_checking.png),url(images/00_check_bg.png);background-repeat:no-repeat}.ui-icon-checkbox-off-press{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/00_check_bg_press.png)}.ui-icon-checkbox-on-press{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/00_check_checking.png),url(images/00_check_bg_press.png);background-repeat:no-repeat}.favorite .ui-icon-checkbox-off,.favorite .ui-icon-checkbox-off-press{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/00_icon_favorite_off.png)}.favorite .ui-icon-checkbox-on,.favorite .ui-icon-checkbox-on-press{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/controls/00_icon_favorite_on.png)}.ui-icon-radio-off{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/00_button_radio.png)}.ui-icon-radio-on{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/00_button_radio_select.png),url(images/00_button_radio.png)}.ui-icon-radio-on-press{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/00_button_radio.png)}.ui-icon-radio-off-press{width:1.4545454545454546rem;height:1.4545454545454546rem;background-image:url(images/00_button_radio.png)}.ui-field-contain{padding:1.5em 0;margin:0;border-bottom-width:1px;overflow:visible}.ui-field-contain:first-child{border-top-width:0}@media all{.ui-field-contain{ border-width:0;padding:0;margin:.8em 0}}.ui-select{display:block;position:relative}.ui-select select{position:absolute;left:-9999px;top:-9999px}.ui-select .ui-btn{overflow:hidden}.ui-select .ui-btn select{cursor:pointer;-webkit-appearance:button;left:0;top:0;width:100%;min-height:1.5em;min-height:100%;height:3em;max-height:100%;opacity:0;-ms-filter:"alpha(Opacity=0)";filter:alpha(opacity=0);z-index:2}@-moz-document url-prefix(){.ui-select .ui-btn select{ opacity:.0001}}.ui-select .ui-btn select.ui-select-nativeonly{opacity:1;text-indent:0}.ui-select .ui-btn-icon-right .ui-btn-inner{padding-right:45px}.ui-select .ui-btn-icon-right .ui-icon{right:15px}label.ui-select{font-size:16px;line-height:1.4;font-weight:400;margin:0 0 .3em;display:block}.ui-select .ui-btn-text,.ui-selectmenu .ui-btn-text{display:block;min-height:1em}.ui-select .ui-btn-text{text-overflow:ellipsis;overflow:hidden}.ui-selectmenu{position:absolute;padding:0;z-index:100!important;width:80%;max-width:350px;padding:6px}.ui-selectmenu .ui-listview{margin:0}.ui-selectmenu .ui-btn.ui-li-divider{cursor:default}.ui-selectmenu-hidden{top:-9999px;left:-9999px}.ui-selectmenu-screen{position:absolute;top:0;left:0;width:100%;height:100%;z-index:99}.ui-screen-hidden,.ui-selectmenu-list .ui-li .ui-icon{display:none}.ui-selectmenu-list .ui-li .ui-icon{display:block}.ui-li.ui-selectmenu-placeholder{display:none}.ui-selectmenu .ui-header .ui-title{margin:.6em 46px .8em}@media all and (min-width: 450px){label.ui-select{ vertical-align:top;display:inline-block;width:20%;margin:0 2% 0 0}.ui-select{width:60%;display:inline-block}}.ui-selectmenu .ui-header h1:after{content:'.';visibility:hidden}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}label.ui-input-text{font-size:1rem;line-height:1.2;display:block;font-weight:400;margin:0 0 .3em}input.ui-input-text,textarea.ui-input-text{background-image:none;padding:.4em;line-height:1.4;font-size:.7272727272727273rem;display:block}input.ui-input-text{appearance:none;-webkit-appearance:none}textarea.ui-input-text{height:2.272727272727273rem;resize:none;-webkit-transition:height 200ms linear;-moz-transition:height 200ms linear;-o-transition:height 200ms linear;-ms-transition:height 200ms linear;transition:height 200ms linear}.ui-input-search{position:relative;padding-right:1.6363636363636365rem;padding-left:1.6363636363636365rem;border:1px solid #999;-webkit-box-shadow:inset .09090909090909091rem .09090909090909091rem .09090909090909091rem #999;-moz-box-shadow:inset .09090909090909091rem .09090909090909091rem .09090909090909091rem #999;-o-box-shadow:inset .09090909090909091rem .09090909090909091rem .09090909090909091rem #999;-ms-box-shadow:inset .09090909090909091rem .09090909090909091rem .09090909090909091rem #999;box-shadow:inset .09090909090909091rem .09090909090909091rem .09090909090909091rem #999}.ui-input-search input.ui-input-text{width:100%;border:0;background:transparent none;outline:0!important}.ui-input-search .ui-btn-down-s,.ui-input-search .ui-btn-up-s,.ui-input-search .ui-btn-hover-s{border:0;background:transparent none}.ui-input-search .ui-btn-icon-notext.ui-input-clear{width:1.6363636363636365rem;height:1.5rem}.ui-input-search .ui-btn-icon-notext.ui-input-clear .ui-btn-inner{padding:.2727272727272727rem}.ui-input-search .ui-btn-inner .ui-icon-deleteSearch{width:1rem;height:1rem;margin-top:0;margin-left:0}.ui-input-search .ui-input-clear{position:absolute;right:0;top:0;vertical-align:middle}.ui-input-search .ui-input-clear-hidden{display:none}@media all and (min-width: 721*@unit_base){label.ui-input-text:not([data-type='search']){ vertical-align:top;display:inline-block;margin:0 2% 0 0}input.ui-input-text:not([data-type='search']),textarea.ui-input-text:not([data-type='search']){width:60%;display:inline-block}.ui-input-search input.ui-input-text:not([data-type='search']){width:85%}}.ui-body-s>div>.ui-field-contain>.input-search-bar,.ui-body-s>.ui-field-contain>.input-search-bar{margin:-2.1818181818181817rem -.6818181818181819rem -1.4545454545454546rem -.6818181818181819rem}.input-search-bar{position:relative;background-color:#f8f6ef;padding:.5909090909090909rem;vertical-align:middle}.input-search-bar .ui-corner-all{-o-border-radius:.3em;-ms-border-radius:.3em;-moz-border-radius:.3em;-webkit-border-radius:.3em;border-radius:.3em}.input-search-bar .ui-input-search{font-size:.7272727272727273rem;display:block;position:relative;background-color:#fff}.input-search-bar .ui-input-search .ui-input-text{height:1.5rem;padding:0;margin-right:1.7272727272727273rem}.input-search-bar .ui-input-search .ui-image-search{position:absolute;top:0;left:0;width:1rem;height:1rem;margin:.2727272727272727rem}.input-search-bar .ui-input-search-default{margin-right:3.409090909090909rem;-webkit-transition:all 400ms linear;-moz-transition:all 400ms linear;-o-transition:all 400ms linear;-ms-transition:all 400ms linear;transition:all 400ms linear}.input-search-bar .ui-input-search-wide{margin-right:0rem;-webkit-transition:all 400ms linear;-moz-transition:all 400ms linear;-o-transition:all 400ms linear;-ms-transition:all 400ms linear;transition:all 400ms linear}.input-search-bar .ui-btn-icon-cancel.ui-input-cancel{display:inline-block;position:absolute;top:.13636363636363635rem;right:0rem;height:1.5rem;margin-right:.4545454545454546rem;vertical-align:middle;padding:0;border-color:none;width:3.090909090909091rem;-webkit-transition:all 400ms linear;-moz-transition:all 400ms linear;-o-transition:all 400ms linear;-ms-transition:all 400ms linear;transition:all 400ms linear}.input-search-bar .ui-btn-icon-cancel.ui-input-cancel .ui-btn-inner{padding-top:.2727272727272727rem;padding-bottom:.2727272727272727rem}.input-search-bar .ui-btn-icon-cancel.ui-input-cancel .ui-btn-inner .ui-btn-text{font-size:.6818181818181819rem}.input-search-bar .ui-btn-icon-cancel.ui-input-cancel.ui-btn-cancel-hide{right:-3.409090909090909rem;visibility:hidden}.input-search-bar .ui-btn-icon-cancel.ui-input-cancel.ui-btn-cancel-show{right:0;visibility:visible}.input-search-bar .ui-search-bar-icon{margin-left:1.9090909090909092rem}.input-search-bar .ui-btn.ui-btn-search-front-icon{position:absolute;width:1.590909090909091rem;height:1.590909090909091rem;top:.09090909090909091rem;border-radius:3rem}.input-search-bar .ui-btn.ui-btn-search-front-icon>.ui-btn-inner.ui-btn-icon-only{border-radius:3rem}.ui-header .input-search-bar{padding-top:.18181818181818182rem;padding-bottom:.18181818181818182rem}.ui-image-search{background-image:url(images/controls/00_search_icon.png);background-repeat:no-repeat;background-size:100% 100%}.ui-icon-deleteSearch{background-image:url(images/controls/00_field_btn_clear.png);background-repeat:no-repeat;background-size:100% 100%}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-controlgroup,fieldset.ui-controlgroup{padding:0;margin:.5em 0 1em}.ui-bar .ui-controlgroup{margin:0 .3em}.ui-controlgroup-label{font-size:1em;line-height:1.4;font-weight:400;margin:0 0 .3em}.ui-controlgroup-controls{display:block}.ui-controlgroup li{list-style:none}.ui-controlgroup .ui-btn-inner{white-space:nowrap}.ui-controlgroup .ui-checkbox label label,.ui-controlgroup .ui-radio label{font-size:1em}.ui-controlgroup .ui-radio{width:25%;overflow:hidden}.ui-controlgroup .ui-radio label{text-align:center;white-space:nowrap}.ui-controlgroup .ui-radio-off,.ui-controlgroup .ui-radio-on{width:100%}.ui-controlgroup .ui-radio-on .ui-btn-inner{background:#f8f6ef}.ui-controlgroup .ui-radio-on .ui-btn-inner .ui-btn-text{color:#3b73b6}.ui-controlgroup .ui-corner-left{border-left-width:0}.ui-controlgroup .ui-corner-right{border-right-width:0}.ui-controlgroup-vertical .ui-btn,.ui-controlgroup-vertical .ui-checkbox,.ui-controlgroup-vertical .ui-radio{margin:0;border-bottom-width:0}.ui-controlgroup-vertical .ui-controlgroup-last{border-bottom-width:1px}.ui-controlgroup-vertical .ui-radio{width:100%}.ui-controlgroup-vertical .ui-radio label{text-align:left}.ui-controlgroup-vertical .ui-radio label .ui-btn-inner{margin-left:.7272727272727273rem;margin-right:.7272727272727273rem}.ui-controlgroup-horizontal{padding:0}.ui-controlgroup-horizontal .ui-btn{display:inline-block;margin-left:-.18181818181818182rem;margin-right:-.13636363636363635rem}.ui-controlgroup-horizontal .ui-checkbox,.ui-controlgroup-horizontal .ui-radio{float:left;margin:0 -1px 0 0}.ui-controlgroup-horizontal .ui-controlgroup-last{margin-right:0}.ui-controlgroup-horizontal [data-role="button"]{border-top:0;border-bottom:0;border-radius:0;box-shadow:none;background:0}.ui-controlgroup-horizontal [data-role="button"].ui-btn-down-s .ui-btn-inner,.ui-controlgroup-horizontal [data-role="button"] .ui-btn-active-s .ui-btn-inner{background:#f8f6ef}.ui-controlgroup-horizontal [data-role="button"].ui-btn-down-s .ui-btn-inner .ui-btn-text,.ui-controlgroup-horizontal [data-role="button"] .ui-btn-active-s .ui-btn-inner .ui-btn-text{color:#3b73b6}.ui-controlgroup-horizontal [data-role="button"].ui-btn-down-s .ui-btn-inner{background:-webkit-linear-gradient(top, #d2d2c8 0, #f6f8ef 100%)}.ui-controlgroup-horizontal [data-role="button"]>.ui-btn-inner{border:0 solid;box-shadow:none;padding-top:.2272727272727273rem;padding-bottom:.2272727272727273rem;padding-left:.4545454545454546rem;padding-right:.4545454545454546rem}.ui-controlgroup-horizontal label>span.ui-btn-inner{padding-top:.13636363636363635rem;padding-bottom:.13636363636363635rem}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-listview{margin:0;counter-reset:listnumbering;border-top-color:rgba(211,209,203,.5)}.ui-listview li.ui-btn>.ui-btn-hastxt>.ui-btn-text.ui-btn-text-padding-right{padding-right:0rem}.ui-listview .ui-li{border-left-width:0;border-right-width:0;border-top-width:0}.ui-listview .ui-li>.ui-btn-inner{border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(211,209,203,.5);margin-left:.5909090909090909rem;margin-right:.5909090909090909rem}.ui-listview .ui-li-static{background-color:#f8f6ef;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(211,209,203,.5);margin-left:.5909090909090909rem;margin-right:.5909090909090909rem}.ui-listview .ui-li:not(.ui-li-divider):not(.ui-li-static){min-height:2.5rem}.ui-listview .ui-li.ui-li-has-multiline:not(.ui-li-divider):not(.ui-li-static){min-height:2.909090909090909rem}.ui-listview li.ui-btn-up-s,.ui-listview li.ui-btn-hover-s{background:0;background-color:#f8f6ef;color:#000}.ui-listview li.ui-btn-down-s{background:0;background-color:#5787c2;color:#000}.ui-listview li.ui-btn-up-s>.ui-li>.ui-btn-text>a.ui-link-inherit,.ui-listview li.ui-btn-hover-s>.ui-li>.ui-btn-text>a.ui-link-inherit{color:#000}.ui-listview li.ui-btn-down-s>.ui-li>.ui-btn-text>a.ui-link-inherit{color:#f9f9f9}.ui-content .ui-listview{margin-left:-.36363636363636365rem;margin-right:-.36363636363636365rem;padding-bottom:1px}.ui-content .ui-listview .ui-listview{margin:0}.ui-content .ui-listview-inset{margin:1em 0}.ui-listview,.ui-li,.ui-collapsible-heading{list-style:none;padding:0;font-size:1rem}.ui-li,.ui-collapsible-heading,.ui-li.ui-field-contain{display:block;margin:0;position:relative;overflow:visible;text-align:left}.ui-li .ui-btn{top:50%;margin-top:-.8em}.ui-li h3,.ui-collapsible-heading h3,.ui-collapsible>.ui-collapsible-content h3,.ui-listview li h3{margin-top:0;margin-bottom:0;font-size:1rem;font-weight:400}.ui-li form,.ui-collapsible-heading form,.ui-collapsible>.ui-collapsible-content form,.ui-listview li form{display:inline-block}.ui-li .ui-btn-text,.ui-collapsible-heading .ui-btn-text,.ui-collapsible>.ui-collapsible-content .ui-btn-text,.ui-listview li .ui-btn-text{position:relative}.ui-li .ui-btn-text a.ui-link-inherit,.ui-collapsible-heading .ui-btn-text a.ui-link-inherit,.ui-collapsible>.ui-collapsible-content .ui-btn-text a.ui-link-inherit,.ui-listview li .ui-btn-text a.ui-link-inherit{white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow:hidden!important}.ui-li:last-child,.ui-collapsible-heading:last-child,.ui-collapsible>.ui-collapsible-content:last-child,.ui-listview li:last-child,.ui-li.ui-field-contain:last-child,.ui-collapsible-heading.ui-field-contain:last-child,.ui-collapsible>.ui-collapsible-content.ui-field-contain:last-child,.ui-listview li.ui-field-contain:last-child{border-bottom-width:1px}.ui-li>.ui-btn-inner,.ui-collapsible-heading>.ui-btn-inner,.ui-collapsible>.ui-collapsible-content>.ui-btn-inner,.ui-listview li>.ui-btn-inner,.ui-li.ui-collapsible-heading>.ui-collapsible-heading-toggle,.ui-collapsible-heading.ui-collapsible-heading>.ui-collapsible-heading-toggle,.ui-collapsible>.ui-collapsible-content.ui-collapsible-heading>.ui-collapsible-heading-toggle,.ui-listview li.ui-collapsible-heading>.ui-collapsible-heading-toggle{display:block;position:relative;padding:0;border-width:0}.ui-li>.ui-btn-inner.ui-btn-hastxt,.ui-collapsible-heading>.ui-btn-inner.ui-btn-hastxt,.ui-collapsible>.ui-collapsible-content>.ui-btn-inner.ui-btn-hastxt,.ui-listview li>.ui-btn-inner.ui-btn-hastxt{padding:0 0}.ui-li .ui-btn-inner a.ui-link-inherit,.ui-collapsible-heading .ui-btn-inner a.ui-link-inherit,.ui-collapsible>.ui-collapsible-content .ui-btn-inner a.ui-link-inherit,.ui-listview li .ui-btn-inner a.ui-link-inherit,.ui-li .ui-collapsible-heading-toggle>.ui-btn-inner,.ui-collapsible-heading .ui-collapsible-heading-toggle>.ui-btn-inner,.ui-collapsible>.ui-collapsible-content .ui-collapsible-heading-toggle>.ui-btn-inner,.ui-listview li .ui-collapsible-heading-toggle>.ui-btn-inner,.ui-li>li,.ui-collapsible-heading>li,.ui-collapsible>.ui-collapsible-content>li,.ui-listview li>li,.ui-li.ui-li-static,.ui-collapsible-heading.ui-li-static,.ui-collapsible>.ui-collapsible-content.ui-li-static,.ui-listview li.ui-li-static{padding-top:.6818181818181819rem;padding-bottom:.6818181818181819rem;display:block;white-space:normal;border-left-width:0;border-right-width:0}.ui-li .ui-btn-inner a.ui-link-inherit,.ui-collapsible-heading .ui-btn-inner a.ui-link-inherit,.ui-collapsible>.ui-collapsible-content .ui-btn-inner a.ui-link-inherit,.ui-listview li .ui-btn-inner a.ui-link-inherit,.ui-li .ui-collapsible-heading-toggle,.ui-collapsible-heading .ui-collapsible-heading-toggle,.ui-collapsible>.ui-collapsible-content .ui-collapsible-heading-toggle,.ui-listview li .ui-collapsible-heading-toggle{white-space:normal;overflow:visible!important}.ui-li .ui-toggle-switch:last-child,.ui-collapsible-heading .ui-toggle-switch:last-child,.ui-collapsible>.ui-collapsible-content .ui-toggle-switch:last-child,.ui-listview li .ui-toggle-switch:last-child{top:50%;margin-top:-.7727272727272727rem;display:inline-block;position:absolute;right:0}.ui-li [data-role="button"]:last-child,.ui-collapsible-heading [data-role="button"]:last-child,.ui-collapsible>.ui-collapsible-content [data-role="button"]:last-child,.ui-listview li [data-role="button"]:last-child{position:absolute;right:0}.ui-li .ui-radio:first-child,.ui-collapsible-heading .ui-radio:first-child,.ui-collapsible>.ui-collapsible-content .ui-radio:first-child,.ui-listview li .ui-radio:first-child,.ui-li .ui-checkbox:first-child,.ui-collapsible-heading .ui-checkbox:first-child,.ui-collapsible>.ui-collapsible-content .ui-checkbox:first-child,.ui-listview li .ui-checkbox:first-child{position:absolute;top:50%;margin-top:-.6818181818181819rem;left:-.18181818181818182rem;width:1.3636363636363638rem;height:1.3636363636363638rem}.ui-li .ui-radio:first-child .ui-btn-inner,.ui-collapsible-heading .ui-radio:first-child .ui-btn-inner,.ui-collapsible>.ui-collapsible-content .ui-radio:first-child .ui-btn-inner,.ui-listview li .ui-radio:first-child .ui-btn-inner,.ui-li .ui-checkbox:first-child .ui-btn-inner,.ui-collapsible-heading .ui-checkbox:first-child .ui-btn-inner,.ui-collapsible>.ui-collapsible-content .ui-checkbox:first-child .ui-btn-inner,.ui-listview li .ui-checkbox:first-child .ui-btn-inner{line-height:.9090909090909092rem;color:transparent}.ui-li .ui-radio:first-child .ui-btn-inner .ui-icon,.ui-collapsible-heading .ui-radio:first-child .ui-btn-inner .ui-icon,.ui-collapsible>.ui-collapsible-content .ui-radio:first-child .ui-btn-inner .ui-icon,.ui-listview li .ui-radio:first-child .ui-btn-inner .ui-icon,.ui-li .ui-checkbox:first-child .ui-btn-inner .ui-icon,.ui-collapsible-heading .ui-checkbox:first-child .ui-btn-inner .ui-icon,.ui-collapsible>.ui-collapsible-content .ui-checkbox:first-child .ui-btn-inner .ui-icon,.ui-listview li .ui-checkbox:first-child .ui-btn-inner .ui-icon{left:.2272727272727273rem}.ui-li .ui-radio:first-child label.ui-btn-icon_only,.ui-collapsible-heading .ui-radio:first-child label.ui-btn-icon_only,.ui-collapsible>.ui-collapsible-content .ui-radio:first-child label.ui-btn-icon_only,.ui-listview li .ui-radio:first-child label.ui-btn-icon_only,.ui-li .ui-checkbox:first-child label.ui-btn-icon_only,.ui-collapsible-heading .ui-checkbox:first-child label.ui-btn-icon_only,.ui-collapsible>.ui-collapsible-content .ui-checkbox:first-child label.ui-btn-icon_only,.ui-listview li .ui-checkbox:first-child label.ui-btn-icon_only{top:0;margin-top:0}.ui-li img.ui-li-bigicon,.ui-collapsible-heading img.ui-li-bigicon,.ui-collapsible>.ui-collapsible-content img.ui-li-bigicon,.ui-listview li img.ui-li-bigicon{position:absolute;width:1.590909090909091rem;height:1.590909090909091rem;top:50%;margin-top:-.8181818181818182rem}.ui-li img.ui-li-bigicon:first-child,.ui-collapsible-heading img.ui-li-bigicon:first-child,.ui-collapsible>.ui-collapsible-content img.ui-li-bigicon:first-child,.ui-listview li img.ui-li-bigicon:first-child{left:0}.ui-li img.ui-li-bigicon:nth-child(2),.ui-collapsible-heading img.ui-li-bigicon:nth-child(2),.ui-collapsible>.ui-collapsible-content img.ui-li-bigicon:nth-child(2),.ui-listview li img.ui-li-bigicon:nth-child(2){left:1.6363636363636365rem}.ui-li img.ui-li-bigicon:last-child,.ui-collapsible-heading img.ui-li-bigicon:last-child,.ui-collapsible>.ui-collapsible-content img.ui-li-bigicon:last-child,.ui-listview li img.ui-li-bigicon:last-child{right:.7272727272727273rem}.ui-li .ui-li-color-bar+img.ui-li-bigicon:nth-child(2),.ui-collapsible-heading .ui-li-color-bar+img.ui-li-bigicon:nth-child(2),.ui-collapsible>.ui-collapsible-content .ui-li-color-bar+img.ui-li-bigicon:nth-child(2),.ui-listview li .ui-li-color-bar+img.ui-li-bigicon:nth-child(2){left:0}.ui-li .ui-li-color-bar,.ui-collapsible-heading .ui-li-color-bar,.ui-collapsible>.ui-collapsible-content .ui-li-color-bar,.ui-listview li .ui-li-color-bar{position:absolute;width:.13636363636363635rem;height:2.9545454545454546rem;top:0rem;left:-.5909090909090909rem;background-color:#000}li.ui-li-thumbnail-right img.ui-li-bigicon.ui-li-thumb{left:auto;right:0;width:2.3181818181818183rem;height:2.3181818181818183rem;margin-top:-1.1363636363636365rem}.ui-li.ui-li-has-multiline .ui-btn-inner a.ui-link-inherit,.ui-li.ui-li-has-multiline.ui-li-static{padding-top:.3181818181818182rem;padding-bottom:1.2727272727272727rem}.ui-li.ui-li-has-multiline a{white-space:normal;overflow:visible!important;padding-right:.7272727272727273rem}.ui-li.ui-li-text-ellipsis .ui-btn-inner a.ui-link-inherit{white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow:hidden!important}.ui-li.ui-li-text-ellipsis a{white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow:hidden!important}.ui-li.ui-li-text-ellipsis.ui-li-static{white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow:hidden!important}.ui-li>input{border-style:none;border-width:0;outline-color:#f8f6ef;font-size:1.0454545454545454rem;line-height:1;padding-top:0;padding-bottom:0}.ui-listview li.ui-li-divider{background:#f8f6ef;color:#3b73b6;border-bottom-width:0;border-top-width:0;cursor:default;counter-reset:listnumbering;font-weight:700;height:1.7272727272727273rem;font-size:.7272727272727273rem}.ui-listview li.ui-li-divider>.ui-btn-inner>.ui-btn-text{font-size:.7272727272727273rem}.ui-listview li.ui-li-divider.ui-btn{top:0;margin-top:0rem;border-radius:0;font-size:.7272727272727273rem}.ui-listview li.ui-li-divider.ui-btn .ui-btn-inner.ui-btn-hastxt{height:100%;padding-left:0}.ui-listview li.ui-li-divider.ui-btn .ui-btn-inner.ui-btn-hastxt .ui-btn-text{position:absolute;top:.2272727272727273rem;height:.8181818181818182rem;padding-right:.4545454545454546rem}.ui-listview li.ui-li-divider:not(.ui-btn){margin-left:.5454545454545454rem;margin-right:.5454545454545454rem}.ui-listview li.ui-li-divider>.ui-btn-text{position:absolute;top:.2272727272727273rem;height:.8181818181818182rem;padding-right:.4545454545454546rem}.ui-listview li.ui-li-divider[data-style="dialogue"]{height:.9090909090909092rem;padding:0;padding-top:.9090909090909092rem;padding-bottom:0rem;padding-left:.4545454545454546rem;margin-left:.18181818181818182rem;margin-right:.18181818181818182rem;font-size:.7272727272727273rem;font-weight:700;color:#3b73b6;background:#f8f6ef}.ui-listview li.ui-li-divider[data-style="check"]{height:1.7272727272727273rem;padding-top:0;padding-bottom:0;padding-left:0}.ui-listview li.ui-li-divider[data-style="check"] label{top:0;margin:0}.ui-listview li.ui-li-divider[data-style="check"] label .ui-btn-inner{z-index:5;position:absolute;width:1.4545454545454546rem;height:1.4545454545454546rem;background:#f8f6ef;padding:0}.ui-listview li.ui-li-divider[data-style="check"] .ui-btn-text{padding-left:1.6818181818181819rem}.ui-listview li.ui-li-divider .ui-divider-normal-line{display:inline-block;position:absolute;top:1.0454545454545454rem;width:100%;height:.09090909090909091rem;background:#3b73b6}.ui-listview li.ui-li-divider.ui-btn-down-s{background:#3b73b6;color:#f8f6ef}.ui-listview li.ui-li-divider.ui-btn-down-s .ui-divider-normal-line{background:#f8f6ef}.ui-listview li.ui-li-divider.ui-btn-down-s label>.ui-btn-inner{background:#3b73b6}.ui-listview li.ui-li-divider+li.ui-li-dialogue{border-top-left-radius:3px;border-top-right-radius:3px}.ui-divider-expand-div{position:absolute;width:4.454545454545455rem;height:1.9090909090909092rem;top:.4545454545454546rem;right:0;border-left-width:1px;border-left-style:solid;border-left-color:rgba(0,0,0,.5)}.ui-li-has-thumb:not(.ui-li-thumbnail-right) .ui-btn-inner a.ui-link-inherit,.ui-li-has-thumb:not(.ui-li-thumbnail-right).ui-li-static{padding-left:2.0454545454545454rem}.ui-li-has-thumb:not(.ui-li-thumbnail-right) .ui-li-text-sub{padding-left:2.0454545454545454rem;padding-right:0}.ui-li-has-checkbox .ui-btn-inner a.ui-link-inherit,.ui-li-has-radio .ui-btn-inner a.ui-link-inherit,.ui-li-has-checkbox.ui-li-static,.ui-li-has-radio.ui-li-static{padding-left:1.6363636363636365rem}.ui-li-has-checkbox .ui-li-text-sub,.ui-li-has-radio .ui-li-text-sub{padding-left:1.6363636363636365rem}.ui-li-has-thumb.ui-li-has-checkbox .ui-btn-inner a.ui-link-inherit,.ui-li-has-thumb.ui-li-has-radio .ui-btn-inner a.ui-link-inherit,.ui-li-has-thumb.ui-li-has-checkbox.ui-li-static,.ui-li-has-thumb.ui-li-has-radio.ui-li-static{padding-left:3.5454545454545454rem}.ui-li-has-thumb.ui-li-has-checkbox .ui-li-text-sub,.ui-li-has-thumb.ui-li-has-radio .ui-li-text-sub{padding-left:3.5454545454545454rem}.ui-li.ui-li-has-right-circle-btn .ui-btn-inner a{padding-right:2.1818181818181817rem}.ui-li.ui-li-has-right-btn:not(.ui-swipelist-item) .ui-btn-inner a{padding-right:3.590909090909091rem}.ui-li.ui-li-thumbnail-right .ui-btn-inner a{padding-right:2.3636363636363638rem}.ui-li.ui-li-static.ui-li-has-right-circle-btn{padding-right:2.1818181818181817rem}.ui-li.ui-li-static.ui-li-has-right-btn:not(.ui-swipelist-item){padding-right:3.590909090909091rem}.ui-li.ui-li-static.ui-li-thumbnail-right{padding-right:2.3636363636363638rem}.ui-li-has-icon .ui-btn-inner a.ui-link-inherit,.ui-li-has-icon.ui-li-static{min-height:20px;padding-left:40px}.ui-li-has-icon .ui-li-text-sub{padding-left:40px}.ui-li-heading{font-size:16px;font-weight:700;display:block;margin:.6em 0;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow:hidden!important}.ui-li-thumb,.ui-li-icon{position:absolute;left:1px;top:0;max-height:3.272727272727273rem;max-width:3.272727272727273rem}.ui-listview * .ui-btn-inner>.ui-btn>.ui-btn-inner{border-top:0}.ui-li-sub,.ui-li-sub-setting{float:right;text-align:right;font-size:.7272727272727273rem;margin:.3em 0}.ui-li-text-sub{float:right;text-align:right;font-size:.7272727272727273rem;color:#646464;position:absolute;right:0;top:.9090909090909092rem;width:95%;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow:hidden!important}.ui-li-text-sub>img{position:relative;width:.7727272727272727rem;height:.7727272727272727rem;margin:0 .36363636363636365rem 0 .36363636363636365rem}.ui-li-text-sub2{float:right;text-align:right;font-size:.7272727272727273rem;color:#646464;position:absolute;right:0;top:.7272727272727273rem;width:60%;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow:hidden!important}.ui-li-text-sub2>img{width:.7727272727272727rem;height:.7727272727272727rem;margin:0 0 0 .36363636363636365rem}.ui-li-has-multiline .ui-li-text-sub{position:absolute;text-align:left;right:auto;left:0;top:1.590909090909091rem;margin-top:0;width:90%;white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow:hidden!important}.ui-li-has-multiline.ui-li-has-right-btn .ui-btn-inner a .ui-li-text-sub{width:74%}.ui-li-has-multiline.ui-li-has-right-btn.ui-li-has-thumb .ui-btn-inner a .ui-li-text-sub{width:64%}.ui-li-has-multiline.ui-li-static.ui-li-has-right-btn .ui-li-text-sub{width:74%}.ui-li-has-multiline.ui-li-static.ui-li-has-right-btn.ui-li-has-thumb .ui-li-text-sub{width:64%}.ui-li-icon-sub-right,.ui-li-icon-sub{position:absolute;left:auto;width:.7727272727272727rem;height:.7727272727272727rem;margin:0 0}.ui-li-icon-sub-right{right:.36363636363636365rem}.ui-listview li.ui-li-dialogue{margin-left:.18181818181818182rem;margin-right:.18181818181818182rem;padding-left:.4545454545454546rem;padding-right:.4545454545454546rem;border-style:solid;border-color:#8e9aa3;border-width:1px}.ui-listview li.ui-li-dialogue>.ui-btn-inner{margin-left:0;margin-right:0;border-bottom-width:0}.ui-listview li.ui-li-dialogue:first-child{border-top-width:1px;border-top-left-radius:3px;border-top-right-radius:3px}.ui-listview li.ui-li-dialogue:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.ui-listview li.ui-li-dialogue>img{margin-left:.2727272727272727rem}.ui-listview li.ui-li-dialogue [data-role="button"]:last-child{margin-right:.4545454545454546rem}.ui-listview li.ui-li-dialogue .ui-link-inherit>.ui-btn{margin-right:0}.ui-listview li.ui-li-dialogue.ui-li-static .ui-li-text-sub,.ui-listview li.ui-li-dialogue.ui-li-static .ui-toggle-switch{right:.4545454545454546rem}.ui-listview li.ui-li-dialogue.ui-li-static.ui-li-has-checkbox,.ui-listview li.ui-li-dialogue.ui-li-static.ui-li-has-radio{padding-left:1.6363636363636365rem}.ui-listview li.ui-li-dialogue.ui-li-static .ui-checkbox,.ui-listview li.ui-li-dialogue.ui-li-static .ui-radio{left:0}.ui-listview li.ui-li-dialogue.ui-li-has-multiline.ui-li-static .ui-li-text-sub{padding-left:.4545454545454546rem}.ui-listview li.ui-li-dialogue.ui-li-has-multiline.ui-li-static .ui-li-text-sub2{padding-right:.4545454545454546rem}.ui-listview li.ui-li-dialogue.ui-li-has-multiline.ui-li-static.ui-li-has-checkbox .ui-li-text-sub,.ui-listview li.ui-li-dialogue.ui-li-has-multiline.ui-li-static.ui-li-has-radio .ui-li-text-sub{padding-left:1.9090909090909092rem}.ui-listview>li.ui-li-dialogue.ui-body-s:not(.ui-li-expanded),.ui-listview>li.ui-li-dialogue.ui-btn-hover-up-s:not(.ui-btn-down-s):not(.ui-li-expanded),.ui-listview>li.ui-li-dialogue.ui-btn-up-s:not(.ui-li-expanded){background:#efede5}.ui-listview>li.ui-li-dialogue.ui-li-expanded{padding-left:1.1818181818181819rem;background:#dcdad3}.ui-listview>li.ui-li-dialogue.ui-li-divider{height:1.4545454545454546rem;padding:0}.ui-listview>li.ui-li-group-title{padding-top:1.4545454545454546rem}.ui-listview>li.ui-li-group-title span{padding-left:.7272727272727273rem}.ui-listview>li.ui-li-dialogue-divider{padding-top:.9090909090909092rem;padding-bottom:0rem;padding-left:.4545454545454546rem;margin-left:.18181818181818182rem;margin-right:.18181818181818182rem;background:#efede5;font-size:.7272727272727273rem;font-weight:700;color:#3b73b6}.ui-listview li.ui-li-dialogue-edit{padding-left:5.2727272727272725rem;padding-top:.5454545454545454rem;padding-bottom:.5454545454545454rem}.ui-listview li.ui-li-dialogue-edit .ui-edit-title{position:absolute;left:.4545454545454546rem;width:4.136363636363637rem;padding-right:.36363636363636365rem;display:inline-block;top:50%;margin-top:-.5909090909090909rem;border-right-color:#b9b8b2;border-right-width:1px;border-right-style:solid}.ui-listview li.ui-li-dialogue-edit input{font-size:1rem;background:transparent;outline-color:transparent;width:100%;padding-left:0;padding-right:0}.ui-listview>.ui-li.ui-li-dialogue-edit.ui-li-has-right-btn{padding-right:5rem}.ui-listview .ui-li-static.ui-li-bubble-receive,.ui-listview .ui-li-static.ui-li-bubble-left{color:#fff}.ui-listview .ui-li-static.ui-li-bubble-receive>.ui-li-bubble-time,.ui-listview .ui-li-static.ui-li-bubble-left>.ui-li-bubble-time{color:#d30000}.ui-listview .ui-li-static.ui-li-bubble-sent,.ui-listview .ui-li-static.ui-li-bubble-right{color:#000}.ui-listview .ui-li-static.ui-li-bubble-sent>.ui-li-bubble-time,.ui-listview .ui-li-static.ui-li-bubble-right>.ui-li-bubble-time{color:#39a6d7}.ui-listview .ui-li-static.ui-li-bubble-sos{color:#e94949}.ui-listview .ui-li-static.ui-li-bubble-sos>.ui-li-bubble-time{color:#d30000}.ui-listview .ui-li-static.ui-li-bubble-date{background-color:rgba(225,225,225,0);color:#686868;font-style:italic}.ui-listview span.ui-li-bubble-time{font-weight:700}.ui-listview .ui-li-bubble-receive,.ui-listview .ui-li-bubble-left,.ui-listview .ui-li-bubble-sent,.ui-listview .ui-li-bubble-right,.ui-listview .ui-li-bubble-sos{display:inline-block;background-clip:padding-box;max-width:80%;word-wrap:break-word;font-size:.8636363636363636rem}.ui-listview .ui-li-bubble-receive p,.ui-listview .ui-li-bubble-left p,.ui-listview .ui-li-bubble-sent p,.ui-listview .ui-li-bubble-right p,.ui-listview .ui-li-bubble-sos p,.ui-listview .ui-li-bubble-receive span,.ui-listview .ui-li-bubble-left span,.ui-listview .ui-li-bubble-sent span,.ui-listview .ui-li-bubble-right span,.ui-listview .ui-li-bubble-sos span{font-size:.8636363636363636rem}.ui-listview .ui-li-bubble-receive img,.ui-listview .ui-li-bubble-left img,.ui-listview .ui-li-bubble-sent img,.ui-listview .ui-li-bubble-right img,.ui-listview .ui-li-bubble-sos img{position:relative;min-width:7.272727272727273rem;min-height:7.272727272727273rem}.ui-listview .ui-li-bubble-receive,.ui-listview .ui-li-bubble-left{margin-left:0;margin-right:auto;border-image-source:url(images/00_messagebubble_bg_receive.9.png);border-image-slice:57 14 21 48 fill;border-image-width:auto;padding:9px 14px 21px 48px}.ui-listview .ui-li-bubble-receive>.ui-li-bubble-time,.ui-listview .ui-li-bubble-left>.ui-li-bubble-time{position:absolute;display:inline-block;bottom:.36363636363636365rem;left:100%;font-size:.5rem}.ui-listview .ui-li-bubble-sent,.ui-listview .ui-li-bubble-right{margin-left:auto;margin-right:0;border-image-source:url(images/00_messagebubble_bg_sent.9.png);border-image-slice:55 47 20 13 fill;border-image-width:auto;padding:9px 47px 20px 13px}.ui-listview .ui-li-bubble-sent>.ui-li-bubble-time,.ui-listview .ui-li-bubble-right>.ui-li-bubble-time{position:absolute;display:inline-block;bottom:.36363636363636365rem;right:100%;font-size:.5rem}.ui-listview .ui-li-bubble-date{float:left;width:100%;height:1.0909090909090908rem;background-image:url(images/00_messagebubble_date_bg.png);background-repeat:repeat-x;background-position:center center;font-size:.7272727272727273rem;margin:.9090909090909092rem .2727272727272727rem;border:0 none red;padding:0 0;padding-top:.5em;text-align:center}.ui-listview .ui-li-bubble-date *{display:inline-block;background-color:#f8f6ef;padding-left:.5em;padding-right:.5em}@-webkit-keyframes addliitem{from{ -webkit-transform:scale(0.5);-moz-transform:scale(0.5);opacity:0}to{-webkit-transform:scale(1);-moz-transform:scale(1);opacity:1}}.addli{-webkit-animation-name:addliitem;-moz-animation-name:addliitem;-webkit-animation-duration:.5s;-moz-animation-duration:.5s;-webkit-transition-timing-function:linear;-moz-transition-timing-function:linear}@-webkit-keyframes removeliitem{from{ -webkit-transform:scale(1);-moz-transform:scale(1);opacity:1}to{-webkit-transform:scale(0.5);-moz-transform:scale(0.5);opacity:0}}.removeli{-webkit-animation-name:removeliitem;-moz-animation-name:removeliitem;-webkit-animation-duration:.5s;-moz-animation-duration:.5s;-webkit-transition-timing-function:linear;-moz-transition-timing-function:linear}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-controlgroup .ui-radio>.ui-btn{background:#f8f6ef}.ui-controlgroup .ui-btn-text{font-size:.7727272727272727rem;font-weight:700;color:#3a3a3a}.ui-controlgroup .ui-btn-inner .ui-corner-left .ui-controlgroup-first{-o-border-radius:.3em;-ms-border-radius:.3em;-moz-border-radius:.3em;-webkit-border-radius:.3em;border-radius:.3em}.ui-controlgroup .ui-btn-inner .ui-corner-right .ui-controlgroup-last{-o-border-radius:.3em;-ms-border-radius:.3em;-moz-border-radius:.3em;-webkit-border-radius:.3em;border-radius:.3em}.ui-controlgroup .ui-radio-off.ui-btn-hover-s.ui-btn-down-s .ui-btn-inner,.ui-controlgroup .ui-radio-on .ui-btn-inner{color:#f9f9f9}.ui-controlgroup .ui-radio-off .ui-btn-inner{color:#f9f9f9}.ui-controlgroup.ui-controlgroup-horizontal .ui-radio .ui-btn-down-s .ui-btn-inner{background:-webkit-linear-gradient(top, #d2d2c8 0, #f6f8ef 100%)}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-option-header{overflow:hidden;background:#1a5274}.ui-option-header-1-row{height:4.818181818181818rem;border:0}.ui-option-header-2-row{height:8.90909090909091rem;border:0}.ui-option-header-row-1{height:4.818181818181818rem}.ui-option-header-row-2{height:8.90909090909091rem;margin-top:-2px;padding:0rem .2272727272727273rem .2727272727272727rem .2272727272727273rem}.ui-option-header-row-2 div{margin-top:.2272727272727273rem;margin-bottom:.2272727272727273rem}.ui-option-header .ui-btn{display:block;margin:.13636363636363635rem .2272727272727273rem .2272727272727273rem .2272727272727273rem}.ui-option-header .ui-input-search .ui-btn{display:none}.ui-option-header .ui-btn-text{line-height:1.5454545454545454rem;font-weight:700}.ui-option-header .ui-btn-down-s.ui-btn-hover-s .ui-btn-inner,.ui-option-header .ui-btn-down-s .ui-btn-inner{background:-webkit-linear-gradient(top, #4aa4da 0, #2b8ac3 100%)}.ui-option-header .ui-btn-hover-s .ui-btn-inner,.ui-option-header .ui-btn-up-s .ui-btn-inner{background:-webkit-linear-gradient(top, #38708d 0, #245d80 100%)}.ui-option-header .ui-btn-inner{padding-top:.2727272727272727rem;padding-bottom:.2727272727272727rem;color:#f9f9f9}.ui-option-header .ui-controlgroup-horizontal .ui-btn{display:inline-block!important;margin:-.13636363636363635rem!important}.ui-option-header .ui-controlgroup,.ui-option-header fieldset.ui-controlgroup{margin-bottom:0!important}.ui-option-header .ui-controlgroup-horizontal .ui-corner-left{margin-left:.2272727272727273rem!important}.ui-option-header .ui-controlgroup-horizontal .ui-corner-right{margin-right:.2272727272727273rem!important}.ui-option-header-triangle-arrow{top:-.5454545454545454rem;height:.4545454545454546rem;width:100%;position:relative;margin-bottom:-.4545454545454546rem}.ui-header.ui-option-header-resizing .ui-option-header .ui-btn{background:transparent;border:0;width:100%;top:.7272727272727273rem}.ui-header.ui-option-header-resizing .ui-option-header .ui-btn .ui-btn-inner{width:92%;padding:.66em 0 .66em;margin:0 auto}.ui-header.ui-option-header-resizing .ui-option-header .input-search-bar .ui-btn{width:28%}.ui-triangle-image{background-image:url(images/00_winset_control_top_arrow.png);background-size:100% 100%;position:absolute;width:1.2727272727272727rem;height:1.0909090909090908rem;left:50%}.ui-btn-up-s .ui-icon-optiontray,.ui-btn-hover-s .ui-icon-optiontray{background-size:100% 100%;background-image:url(images/00_winset_more.png)}.ui-btn-down-s .ui-icon-optiontray{background-size:100% 100%;background-image:url(images/00_winset_more_press.png)}.ui-header .ui-btn .ui-btn-icon-only{padding:0;height:100%}.ui-header .ui-btn .ui-btn-icon-only .ui-icon-optiontray{width:2.5454545454545454rem;height:2.5454545454545454rem;left:1.3636363636363638rem}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}ul.ui-virtual-list-container>li.position_absolute{position:absolute}ul.ui-virtual-list-container>ul.position_absolute{position:absolute}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-scrollview-clip{position:relative}.ui-scrollview-view{overflow:visible;overflow-x:hidden}.ui-scrolllistview .ui-li-divider{z-index:10}.ui-scrollbar{position:absolute;overflow:hidden;opacity:0}.ui-scrollbar-visible{opacity:1}.ui-scrollbar-y{top:.09090909090909091rem;right:.09090909090909091rem;bottom:.09090909090909091rem;width:.36363636363636365rem}.ui-scrollbar-x{right:.09090909090909091rem;bottom:.09090909090909091rem;left:.09090909090909091rem;height:.36363636363636365rem}.ui-scrollbar-track{position:relative;width:100%;height:100%}.ui-scrollbar-thumb{position:absolute;top:0;left:0;background-color:#c6c4be}.ui-scrollbar-y .ui-scrollbar-thumb{width:.2272727272727273rem;height:100%;-o-border-radius:.09090909090909091rem;-ms-border-radius:.09090909090909091rem;-moz-border-radius:.09090909090909091rem;-webkit-border-radius:.09090909090909091rem;border-radius:.09090909090909091rem;-o-box-shadow:.045454545454545456rem .045454545454545456rem .09090909090909091rem #94928c;-ms-box-shadow:.045454545454545456rem .045454545454545456rem .09090909090909091rem #94928c;-moz-box-shadow:.045454545454545456rem .045454545454545456rem .09090909090909091rem #94928c;-webkit-box-shadow:.045454545454545456rem .045454545454545456rem .09090909090909091rem #94928c;box-shadow:.045454545454545456rem .045454545454545456rem .09090909090909091rem #94928c}.ui-scrollbar-x .ui-scrollbar-thumb{width:100%;height:.2272727272727273rem;-o-border-radius:.09090909090909091rem;-ms-border-radius:.09090909090909091rem;-moz-border-radius:.09090909090909091rem;-webkit-border-radius:.09090909090909091rem;border-radius:.09090909090909091rem}.ui-scroll-jump-top-bg{position:absolute;top:.4090909090909091rem;right:.5909090909090909rem;width:1.6818181818181819rem;height:1.6818181818181819rem}.ui-scroll-jump-left-bg{position:absolute;bottom:.4090909090909091rem;left:.5909090909090909rem;width:1.6818181818181819rem;height:1.6818181818181819rem}.ui-overflow-indicator-top{position:absolute;display:block;top:0;width:100%;height:.4545454545454546rem;opacity:0;background:-webkit-gradient(linear,left bottom,left top,color-stop(0, #fff),color-stop(1, #808080))}.ui-overflow-indicator-bottom{position:absolute;display:block;bottom:0;width:100%;height:.4545454545454546rem;opacity:0;background:-webkit-gradient(linear,left bottom,left top,color-stop(0, #808080),color-stop(1, #fff))}.ui-content.ui-scrollview-clip{padding:0}.ui-content.ui-scrollview-clip>div.ui-scrollview-view{margin:0;padding-left:.36363636363636365rem;padding-right:.36363636363636365rem}.ui-content.ui-scrollview-clip>.ui-listview.ui-scrollview-view{margin:0}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}@-webkit-keyframes ui-datetime-in{from{ -webkit-transform:translatey(0.6363636363636364rem) scale(0.9)}to{-webkit-transform:translatey(0) scale(1)}}@-webkit-keyframes ui-datetime-out{from{ opacity:.8;-webkit-transform:translatey(0) scale(0.6)}to{opacity:0;-webkit-transform:translatey(-.6363636363636364rem) scale(0.6)}}.ui-datefield .ui-datefield-seperator{display:inline-block;min-width:.4545454545454546rem;text-align:center}.ui-datefield .date,.ui-datefield .time,.ui-datefield .ui-datefield-tab{display:inline-block}.ui-datefield .ui-datefield-tab{min-width:.9090909090909092rem}.ui-datefield .ui-btn-box-s .ui-btn-inner.ui-btn-hastxt{padding:.1em .5em}.ui-datefield .ui-datefield-selected{display:inline-block;color:#3b73b6}.ui-datefield .ui-datefield-selected.in{-ms-animation:ui-datetime-in .3s 1 ease;-o-animation:ui-datetime-in .3s 1 ease;-moz-animation:ui-datetime-in .3s 1 ease;-webkit-animation:ui-datetime-in .3s 1 ease}.ui-datefield .ui-datefield-selected.out{-ms-animation:ui-datetime-out .3s 1 ease;-o-animation:ui-datetime-out .3s 1 ease;-moz-animation:ui-datetime-out .3s 1 ease;-webkit-animation:ui-datetime-out .3s 1 ease}.ui-datetime{margin:0;height:1.6363636363636365rem}.ui-datetime-text-main{position:relative;font-size:1rem;top:0;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;padding-top:.3em}.ui-datetime-text-main .ui-datefield-period.ui-btn{margin-top:-.3em;height:1.2727272727272727rem;right:auto;position:relative ! important}.ui-datetime-text-sub{top:.6818181818181819rem ! important;color:#3b73b6 ! important;background:transparent ! important;font-size:.7272727272727273rem ! important}.ui-datetimepicker-selector ul{padding:0;display:inline;list-style:none;vertical-align:middle;margin:0}.ui-datetimepicker-selector ul li{font-size:1rem;float:left;padding:.6818181818181819rem .18181818181818182rem 0 .18181818181818182rem;max-width:5.454545454545455rem;min-width:2.7272727272727275rem}.ui-datetimepicker-selector ul li a.ui-link{text-decoration:none;color:rgba(249,249,249,.4)}.ui-datetimepicker-selector ul li a.ui-link:hover{color:rgba(249,249,249,.4)}.ui-datetimepicker-selector ul li.current a.ui-link{color:#f9f9f9}.ui-datetimepicker{left:0!important;padding:0}.ui-datetimepicker .ui-popupwindow-padding{background:#3b73b6!important;border-radius:0!important;-ms-border-radius:0!important;-o-border-radius:0!important;-moz-border-radius:0!important;-webkit-border-radius:0!important;box-shadow:0 0 12px rgba(0,0,0,.6)!important;border-width:0!important;text-align:center!important}.ui-datetimepicker .ui-popupwindow-padding div{height:2.409090909090909rem}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-popupwindow-screen{background:#000;opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1200}.ui-popupwindow{position:absolute;z-index:1201!important;color:#f8f6ef;background:#f8f6ef}.ui-popupwindow .popup-title{width:100%;height:100%;font-size:1.0909090909090908rem;background:#5093b6}.ui-popupwindow .popup-title p{margin:0rem 0rem;padding:.5909090909090909rem 0rem}.ui-popupwindow .popup-text{width:100%;color:#000;font-size:1.0909090909090908rem;background:#f8f6ef}.ui-popupwindow .popup-text p{text-align:center;padding:1rem .7272727272727273rem}.ui-popupwindow .center_info{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center}.ui-popupwindow .center_title{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .center_basic_1btn{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .center_basic_1btn .popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popupwindow .center_basic_1btn .popup-button-bg .ui-btn{width:18.272727272727273rem;height:3.3636363636363638rem;margin:auto}.ui-popupwindow .center_basic_2btn{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .center_basic_2btn .popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popupwindow .center_basic_2btn .popup-button-bg .ui-btn{width:12.454545454545455rem;height:3.3636363636363638rem;margin-top:0rem;margin-bottom:0rem;margin-left:.2272727272727273rem;margin-right:.2272727272727273rem;display:inline-block}.ui-popupwindow .center_basic_3btn{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .center_basic_3btn .popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popupwindow .center_basic_3btn .popup-button-bg .ui-btn{width:8.454545454545455rem;height:3.3636363636363638rem;margin-top:0rem;margin-bottom:0rem;margin-left:.2272727272727273rem;margin-right:.2272727272727273rem;display:inline-block}.ui-popupwindow .center_title_1btn{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .center_title_1btn .popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popupwindow .center_title_1btn .popup-button-bg .ui-btn{width:18.272727272727273rem;height:3.3636363636363638rem;margin:auto}.ui-popupwindow .center_title_2btn{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .center_title_2btn .popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popupwindow .center_title_2btn .popup-button-bg .ui-btn{width:12.454545454545455rem;height:3.3636363636363638rem;margin-top:0rem;margin-bottom:0rem;margin-left:.2272727272727273rem;margin-right:.2272727272727273rem;display:inline-block}.ui-popupwindow .center_title_3btn{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .center_title_3btn .popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popupwindow .center_title_3btn .popup-button-bg .ui-btn{width:8.454545454545455rem;height:3.3636363636363638rem;margin-top:0rem;margin-bottom:0rem;margin-left:.2272727272727273rem;margin-right:.2272727272727273rem;display:inline-block}.ui-popupwindow .center_button_vertical{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .center_button_vertical .popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:1px;padding-bottom:.7272727272727273rem;vertical-align:middle}.ui-popupwindow .center_button_vertical .popup-button-bg .ui-btn{width:16.181818181818183rem;height:3.3636363636363638rem;margin-top:.7272727272727273rem;margin-bottom:0rem;margin-left:auto;margin-right:auto}.ui-popupwindow .center_checkbox{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .center_checkbox .popup-check-bg{font-size:1.0909090909090908rem;background:#f8f6ef;width:100%;padding-top:0rem;padding-bottom:1rem;vertical-align:middle}.ui-popupwindow .center_checkbox .popup-check-bg .ui-checkbox .ui-btn{text-align:center;background:#f8f6ef;border:0rem}.ui-popupwindow .center_checkbox .popup-check-bg .ui-checkbox .ui-btn .ui-btn-inner{border:0rem}.ui-popupwindow .center_checkbox .popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popupwindow .center_checkbox .popup-button-bg .ui-btn{width:12.454545454545455rem;height:3.3636363636363638rem;margin-top:0rem;margin-bottom:0rem;margin-left:.2272727272727273rem;margin-right:.2272727272727273rem;display:inline-block}.ui-popupwindow .center_liststyle_1btn{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .center_liststyle_1btn .popup-scroller-bg{width:100%;overflow:hidden;background:#f8f6ef;height:23.272727272727273rem}.ui-popupwindow .center_liststyle_1btn .popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popupwindow .center_liststyle_1btn .popup-button-bg .ui-btn{width:18.272727272727273rem;height:3.3636363636363638rem;margin:auto}.ui-popupwindow .center_liststyle_2btn{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .center_liststyle_2btn .popup-scroller-bg{width:100%;overflow:hidden;background:#f8f6ef;height:23.272727272727273rem}.ui-popupwindow .center_liststyle_2btn .popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popupwindow .center_liststyle_2btn .popup-button-bg .ui-btn{width:12.454545454545455rem;height:3.3636363636363638rem;margin-top:0rem;margin-bottom:0rem;margin-left:.2272727272727273rem;margin-right:.2272727272727273rem;display:inline-block}.ui-popupwindow .center_liststyle_3btn{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .center_liststyle_3btn .popup-scroller-bg{width:100%;overflow:hidden;background:#f8f6ef;height:23.272727272727273rem}.ui-popupwindow .center_liststyle_3btn .popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popupwindow .center_liststyle_3btn .popup-button-bg .ui-btn{width:8.454545454545455rem;height:3.3636363636363638rem;margin-top:0rem;margin-bottom:0rem;margin-left:.2272727272727273rem;margin-right:.2272727272727273rem;display:inline-block}.ui-popupwindow .center_progressbar{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .center_progressbar .popup-text{font-size:1.1818181818181819rem;font-color:#999;background:#f8f6ef;width:100%;height:3.181818181818182rem}.ui-popupwindow .center_progressbar .popup-text p{height:100%;text-align:center;padding:1rem .7272727272727273rem 0rem .7272727272727273rem}.ui-popupwindow .center_progressbar .popup-text-bottom-bg{font-size:1.1818181818181819rem;font-color:#999;background:#f8f6ef;width:100%;vertical-align:middle}.ui-popupwindow .center_progressbar .popup-text-bottom-bg .text-left{width:40%;height:2.1818181818181817rem;padding:0rem .7272727272727273rem 0rem .7272727272727273rem;text-align:left;display:inline-block}.ui-popupwindow .center_progressbar .popup-text-bottom-bg .text-right{width:40%;height:2.1818181818181817rem;padding:0rem .7272727272727273rem 0rem .7272727272727273rem;text-align:right;display:inline-block}.ui-popupwindow .center_progressbar .popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popupwindow .center_progressbar .popup-button-bg .ui-btn{width:18.272727272727273rem;height:3.3636363636363638rem;margin:auto}.ui-popupwindow .center_progressbar .popup-progress-bg{background:#f8f6ef;width:100%;height:100%}.ui-popupwindow .centertext_progressbar{display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center;text-align:center}.ui-popupwindow .centertext_progressbar .popup-text{font-size:1.1818181818181819rem;font-color:#999;background:#f8f6ef;width:100%;padding-top:1rem;padding-bottom:.7272727272727273rem}.ui-popupwindow .centertext_progressbar .popup-text p{text-align:center}.ui-popupwindow .centertext_progressbar .popup-text-bottom-bg{font-size:1.1818181818181819rem;font-color:#999;background:#f8f6ef;width:100%;vertical-align:middle}.ui-popupwindow .centertext_progressbar .popup-text-bottom-bg .text-left{width:40%;height:1.8181818181818183rem;padding:.7272727272727273rem .7272727272727273rem 1rem .7272727272727273rem;text-align:left;display:inline-block}.ui-popupwindow .centertext_progressbar .popup-text-bottom-bg .text-right{width:40%;height:1.8181818181818183rem;padding:.7272727272727273rem .7272727272727273rem 1rem .7272727272727273rem;text-align:right;display:inline-block}.ui-popupwindow .centertext_progressbar .popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popupwindow .centertext_progressbar .popup-button-bg .ui-btn{width:18.272727272727273rem;height:3.3636363636363638rem;margin:auto}.ui-popupwindow .centertext_progressbar .popup-progress-bg{background:#f8f6ef;width:100%;height:100%}.ui-popupwindow .ui-btn{}.ui-popupwindow .ui-btn.ui-btn-hover-s{background:#5e88a3}.ui-popupwindow .ui-btn.ui-btn-down-s{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.ui-popupwindow>.ui-volumecontrol{display:table;margin:auto;background:rgba(0,0,0,.666667);width:18.90909090909091rem;height:30.727272727272727rem;padding-top:1rem}.ui-popupwindow>.ui-volumecontrol h1{font-size:1.0909090909090908rem;display:table;margin:auto;color:#c0c0c0}.ui-popupwindow>.ui-volumecontrol .ui-volumecontrol-icon{display:table;width:100%;height:5.818181818181818rem;padding-top:.9545454545454546rem;padding-bottom:.9545454545454546rem;padding-left:7.5rem;padding-right:7.5rem}.ui-popupwindow>.ui-volumecontrol .ui-volumecontrol-indicator{display:table;width:100%;height:19.09090909090909rem;padding-left:3.090909090909091rem;padding-right:3.090909090909091rem}.ui-popupwindow>.ui-volumecontrol .ui-corner-all{-o-border-radius:.3em!important;-ms-border-radius:.3em!important;-moz-border-radius:.3em!important;-webkit-border-radius:.3em!important;border-radius:.3em!important}.ui-popupwindow-corner-all{-o-border-radius:0!important;-ms-border-radius:0!important;-moz-border-radius:0!important;-webkit-border-radius:0!important;border-radius:0!important}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-ctxpopup{display:table}.ui-ctxpopup .ui-ctxpopup-row .ui-triangle-top{top:2px}.ui-ctxpopup .ui-ctxpopup-row .ui-triangle-left{left:2px}.ui-ctxpopup .ui-ctxpopup-row .ui-triangle-right{right:2px}.ui-ctxpopup .ui-ctxpopup-row .ui-triangle-bottom{bottom:2px}.ui-ctxpopup .ui-ctxpopup-row{display:table-row}.ui-ctxpopup .ui-ctxpopup-row .ui-ctxpopup-cell{display:table-cell}.ui-ctxpopup .ui-ctxpopup-row .ui-popupwindow-padding{background:#444;border:0;-ms-box-shadow:0rem 0rem .5454545454545454rem rgba(0,0,0,.6);-o-box-shadow:0rem 0rem .5454545454545454rem rgba(0,0,0,.6);-moz-box-shadow:0rem 0rem .5454545454545454rem rgba(0,0,0,.6);-webkit-box-shadow:0rem 0rem .5454545454545454rem rgba(0,0,0,.6);box-shadow:0rem 0rem .5454545454545454rem rgba(0,0,0,.6);-o-border-radius:.3em;-ms-border-radius:.3em;-moz-border-radius:.3em;-webkit-border-radius:.3em;border-radius:.3em}.ui-ctxpopup .ui-listview li.ui-btn-up-s,.ui-ctxpopup .ui-listview li.ui-btn-hover-s{background:transparent}.ui-ctxpopup .ui-listview li.ui-btn-down-s{background:rgba(26,82,116,.3)}.ui-ctxpopup .ui-listview li:last-child{border-bottom-left-radius:.3em;border-bottom-right-radius:.3em}.ui-ctxpopup .ui-listview li:first-child{border-top-left-radius:.3em;border-top-right-radius:.3em}.ui-ctxpopup .ui-listview{max-width:28.181818181818183rem;border:0}.ui-ctxpopup .ui-listview>.ui-li{color:#fff;border-bottom-color:#2d2d2d;border-top-width:1px;border-top-color:#5b5b5b;margin-left:0;margin-right:0}.ui-ctxpopup .ui-listview>.ui-li:first-child,.ui-ctxpopup .ui-listview>.ui-li:last-child{border-top-width:0}.ui-ctxpopup .ui-listview>.ui-li .ui-btn-inner{margin:0;padding-left:.4545454545454546rem;padding-right:.4545454545454546rem}.ui-ctxpopup .ui-listview li.ui-btn-up-s>.ui-li>.ui-btn-text>a.ui-link-inherit,.ui-ctxpopup .ui-listview li.ui-btn-hover-s>.ui-li>.ui-btn-text>a.ui-link-inherit,.ui-ctxpopup .ui-listview li.ui-btn-down-s>.ui-li>.ui-btn-text>a.ui-link-inherit{color:#fff}.ui-ctxpopup .ui-listview>.ui-li:last-child{border:0}.ui-ctxpopup .horizontal{color:#fff;max-width:29.454545454545457rem}.ui-ctxpopup .horizontal .icon .ui-btn{padding:0;background:transparent ! important}.ui-ctxpopup .horizontal .icon .ui-btn .ui-btn-icon-only{width:4.363636363636363rem;height:2.909090909090909rem;padding:0}.ui-ctxpopup .horizontal .icon .ui-btn .ui-icon{top:0;height:inherit;width:inherit;margin:0;background-position:center;-ms-background-size:2.1818181818181817rem 2.1818181818181817rem;-moz-background-size:2.1818181818181817rem 2.1818181818181817rem;-o-background-size:2.1818181818181817rem 2.1818181818181817rem;-webkit-background-size:2.1818181818181817rem 2.1818181818181817rem;background-size:2.1818181818181817rem 2.1818181818181817rem}.ui-ctxpopup .horizontal .text{padding:0 .4545454545454546rem;min-width:2.1818181818181817rem}.ui-ctxpopup .horizontal a.ui-link{color:#fff;text-decoration:none}.ui-ctxpopup .horizontal ul{padding:0;display:inline-block;list-style:none;vertical-align:middle;margin:0}.ui-ctxpopup .horizontal li{line-height:2.909090909090909rem;min-height:2.909090909090909rem;min-width:4.363636363636363rem;float:left;display:inline-block;border-left:1px solid #5b5b5b;border-right:1px solid #2d2d2d;text-align:center}.ui-ctxpopup .horizontal li:first-of-type{border-top-left-radius:.3em;border-bottom-left-radius:.3em;border-left:0}.ui-ctxpopup .horizontal li:last-of-type{border-top-right-radius:.3em;border-bottom-right-radius:.3em;border-right:0;margin-right:0}.ui-ctxpopup .horizontal li:active,.ui-ctxpopup .horizontal td:active{background:#3b73b6}.ui-ctxpopup .button table .ui-btn{margin:0rem;padding:0;height:2.5454545454545454rem;width:6rem}.ui-arrow{border-style:solid;border-width:10px;width:0;height:0;position:absolute}.ui-arrow.top{border-color:transparent transparent #444 transparent}.ui-arrow.left{border-color:transparent transparent transparent #444}.ui-arrow.right{border-color:transparent #444 transparent transparent}.ui-arrow.bottom{border-color:#444 transparent transparent transparent}.ui-ctxpopup-container{z-index:1200;display:inline-bloack;position:absolute;padding:0;outline:0}.ui-ctxpopup-container .ui-popup{border:0;background:#444;-o-border-radius:.3em;-ms-border-radius:.3em;-moz-border-radius:.3em;-webkit-border-radius:.3em;border-radius:.3em}.ui-ctxpopup-container .ui-listview li:first-child{border-top-left-radius:.3em;border-top-right-radius:.3em}.poptop{-webkit-transform-origin:0 0;-moz-transform-origin:0 0}.poptop.in{-webkit-transform:scale(1);-moz-transform:scale(1);opacity:1;-webkit-animation-name:scalepopin;-moz-animation-name:scalepopin;-webkit-animation-duration:350ms;-moz-animation-duration:350ms}.poptop.out{-webkit-animation-name:fadeout;-moz-animation-name:fadeout;opacity:0;-webkit-animation-duration:100ms;-moz-animation-duration:100ms}.poptop.in.reverse{-webkit-animation-name:fadein;-moz-animation-name:fadein}.poptop.out.reverse{-webkit-transform:scale(0.8);-moz-transform:scale(0.8);-webkit-animation-name:scalepopout;-moz-animation-name:scalepopout}@-webkit-keyframes scalepopin{from{ -webkit-transform:scale(0.8);opacity:0}to{-webkit-transform:scale(1);opacity:1}}.popbottom{-webkit-transform-origin:0 100%;-moz-transform-origin:0 100%}.popbottom.in{-webkit-transform:scale(1);-moz-transform:scale(1);opacity:1;-webkit-animation-name:scalepopin;-moz-animation-name:scalepopin;-webkit-animation-duration:350ms;-moz-animation-duration:350ms}.popbottom.out{-webkit-animation-name:fadeout;-moz-animation-name:fadeout;opacity:0;-webkit-animation-duration:100ms;-moz-animation-duration:100ms}.popbottom.in.reverse{-webkit-animation-name:fadein;-moz-animation-name:fadein}.popbottom.out.reverse{-webkit-transform:scale(0.8);-moz-transform:scale(0.8);-webkit-animation-name:scalepopout;-moz-animation-name:scalepopout}@-moz-keyframes scalepopin{from{ -moz-transform:scale(0.8);opacity:0}to{-moz-transform:scale(1);opacity:1}}@-webkit-keyframes scalepopout{from{ -webkit-transform:scale(1);opacity:1}to{-webkit-transform:scale(0.8);opacity:0}}@-moz-keyframes scalepopout{from{ -moz-transform:scale(1);opacity:1}to{-moz-transform:scale(0.8);opacity:0}}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}@-webkit-keyframes ui-scale-animation{from{ -webkit-transform:scalex(0)}to{-webkit-transform:scalex(1)}}.ui-progressbar-value{height:100%;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0, #3677c3),color-stop(1, #96b8e0));-o-border-radius:.4545454545454546rem;-ms-border-radius:.4545454545454546rem;-moz-border-radius:.4545454545454546rem;-webkit-border-radius:.4545454545454546rem;border-radius:.4545454545454546rem;-o-box-shadow:-1px -1px 1px #b3c8e2;-ms-box-shadow:-1px -1px 1px #b3c8e2;-moz-box-shadow:-1px -1px 1px #b3c8e2;-webkit-box-shadow:-1px -1px 1px #b3c8e2;box-shadow:-1px -1px 1px #b3c8e2}.ui-progressbar-bg{position:relative;overflow:hidden;top:.2272727272727273rem;height:.3181818181818182rem;margin-left:.2272727272727273rem;margin-right:.2272727272727273rem;-o-border-radius:.4545454545454546rem;-ms-border-radius:.4545454545454546rem;-moz-border-radius:.4545454545454546rem;-webkit-border-radius:.4545454545454546rem;border-radius:.4545454545454546rem;border:1px;border-style:solid;border-color:#a3a09e;-o-box-shadow:1px -1px 1px #a3a09e;-ms-box-shadow:1px -1px 1px #a3a09e;-moz-box-shadow:1px -1px 1px #a3a09e;-webkit-box-shadow:1px -1px 1px #a3a09e;box-shadow:1px -1px 1px #a3a09e;background-color:#cac8c4}.ui-progressbar{position:relative;margin-left:.9545454545454546rem;margin-right:.9545454545454546rem;height:.8181818181818182rem;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0, #f6f3ef),color-stop(1, #cac8c4));-o-box-shadow:1px 1px 0 white;-ms-box-shadow:1px 1px 0 white;-moz-box-shadow:1px 1px 0 white;-webkit-box-shadow:1px 1px 0 white;box-shadow:1px 1px 0 white;-o-border-radius:.4545454545454546rem;-ms-border-radius:.4545454545454546rem;-moz-border-radius:.4545454545454546rem;-webkit-border-radius:.4545454545454546rem;border-radius:.4545454545454546rem}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}@-webkit-keyframes ui-rotate-animation{from{ -webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}.ui-progress-container-circle{position:absolute}.ui-li .ui-progress-container-circle{top:22%}.ui-progress-circle{position:relative;top:0;height:1.4545454545454546rem;width:1.4545454545454546rem;background:url(images/00_list_process_01.png) no-repeat;-ms-background-size:1.4545454545454546rem 1.4545454545454546rem;-moz-background-size:1.4545454545454546rem 1.4545454545454546rem;-o-background-size:1.4545454545454546rem 1.4545454545454546rem;-webkit-background-size:1.4545454545454546rem 1.4545454545454546rem;background-size:1.4545454545454546rem 1.4545454545454546rem}.ui-progress-circle-running{-webkit-animation:ui-rotate-animation 1s infinite linear}@-webkit-keyframes ui-move-animation{from{ -webkit-transform:translatey(-.6363636363636364rem)}to{-webkit-transform:translatey(0)}}.ui-progress-pending{position:relative;top:0;width:100%;height:.9545454545454546rem;padding-top:0;padding-bottom:0;background:-webkit-gradient(linear,left top,right bottom,color-stop(0%,rgba(0,0,0,0)),color-stop(25%,rgba(0,0,0,0)),color-stop(25%, #3677c3),color-stop(50%, #3677c3),color-stop(50%,rgba(0,0,0,0)),color-stop(75%,rgba(0,0,0,0)),color-stop(75%, #3677c3));background-color:#cac8c4;-ms-background-size:.6363636363636364rem .6363636363636364rem;-moz-background-size:.6363636363636364rem .6363636363636364rem;-o-background-size:.6363636363636364rem .6363636363636364rem;-webkit-background-size:.6363636363636364rem .6363636363636364rem;background-size:.6363636363636364rem .6363636363636364rem}.ui-progress-pending-running{-webkit-animation:ui-move-animation .5s infinite linear}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}label.ui-slider{display:block}select.ui-slider-switch{display:none}.ui-slider-container{position:relative;vertical-align:middle;height:.8181818181818182rem;margin-left:.7272727272727273rem;margin-right:.7272727272727273rem;margin-top:.8181818181818182rem;margin-bottom:.8181818181818182rem;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0, #f6f3ef),color-stop(1, #cac8c4));-o-box-shadow:1px 1px 0 white;-ms-box-shadow:1px 1px 0 white;-moz-box-shadow:1px 1px 0 white;-webkit-box-shadow:1px 1px 0 white;box-shadow:1px 1px 0 white;-o-border-radius:.4545454545454546rem;-ms-border-radius:.4545454545454546rem;-moz-border-radius:.4545454545454546rem;-webkit-border-radius:.4545454545454546rem;border-radius:.4545454545454546rem}.ui-li>.ui-slider-container{margin-top:0;margin-bottom:0}.ui-slider-left-volume,.ui-slider-left-bright{position:absolute;vertical-align:middle;top:-.5rem;left:-2.272727272727273rem;height:1.6818181818181819rem;width:1.6818181818181819rem;background:url(images/controls/00_slider_button_brightness_01.png) no-repeat;-ms-background-size:1.6818181818181819rem 1.6818181818181819rem;-moz-background-size:1.6818181818181819rem 1.6818181818181819rem;-o-background-size:1.6818181818181819rem 1.6818181818181819rem;-webkit-background-size:1.6818181818181819rem 1.6818181818181819rem;background-size:1.6818181818181819rem 1.6818181818181819rem}.ui-slider-left-volume{background:url(images/controls/00_slider_button_volume_01.png) no-repeat;-ms-background-size:1.6818181818181819rem 1.6818181818181819rem;-moz-background-size:1.6818181818181819rem 1.6818181818181819rem;-o-background-size:1.6818181818181819rem 1.6818181818181819rem;-webkit-background-size:1.6818181818181819rem 1.6818181818181819rem;background-size:1.6818181818181819rem 1.6818181818181819rem}.ui-slider-right-volume,.ui-slider-right-bright{position:absolute;top:-.5rem;right:-2.272727272727273rem;height:1.6818181818181819rem;width:1.6818181818181819rem;vertical-align:middle;background:url(images/controls/00_slider_button_brightness_02.png) no-repeat;-ms-background-size:1.6818181818181819rem 1.6818181818181819rem;-moz-background-size:1.6818181818181819rem 1.6818181818181819rem;-o-background-size:1.6818181818181819rem 1.6818181818181819rem;-webkit-background-size:1.6818181818181819rem 1.6818181818181819rem;background-size:1.6818181818181819rem 1.6818181818181819rem}.ui-slider-right-volume{background:url(images/controls/00_slider_button_volume_02.png) no-repeat;-ms-background-size:1.6818181818181819rem 1.6818181818181819rem;-moz-background-size:1.6818181818181819rem 1.6818181818181819rem;-o-background-size:1.6818181818181819rem 1.6818181818181819rem;-webkit-background-size:1.6818181818181819rem 1.6818181818181819rem;background-size:1.6818181818181819rem 1.6818181818181819rem}.ui-slider-left-text{position:absolute;top:-.5rem;height:1.6818181818181819rem;text-align:center;color:#646464}.ui-slider-right-text{position:absolute;top:-.5rem;height:1.6818181818181819rem;text-align:center;color:#646464}div.ui-slider:not(.ui-toggle-switch){position:relative;top:.2272727272727273rem;height:.3181818181818182rem;margin-left:.2272727272727273rem;margin-right:.2272727272727273rem;-o-border-radius:.4545454545454546rem;-ms-border-radius:.4545454545454546rem;-moz-border-radius:.4545454545454546rem;-webkit-border-radius:.4545454545454546rem;border-radius:.4545454545454546rem;border:1px;border-style:solid;border-color:#a3a09e;-o-box-shadow:1px -1px 1px #a3a09e;-ms-box-shadow:1px -1px 1px #a3a09e;-moz-box-shadow:1px -1px 1px #a3a09e;-webkit-box-shadow:1px -1px 1px #a3a09e;box-shadow:1px -1px 1px #a3a09e;background-color:#cac8c4}div.ui-slider:not(.ui-toggle-switch) .ui-btn{top:-.75rem;margin-top:0}div.ui-slider:not(.ui-toggle-switch) .ui-btn-inner{padding:.3rem 0 0 0}div.ui-slider:not(.ui-toggle-switch) .ui-btn-text{color:#3b73b6}a.ui-slider-handle{position:relative;z-index:10;width:1.6363636363636365rem;height:1.6363636363636365rem;margin-left:-.8636363636363636rem;color:#3b73b6;font-size:.95rem;background:url(images/controls/00_slider_handle.png) no-repeat;-ms-background-size:1.6363636363636365rem 1.6363636363636365rem;-moz-background-size:1.6363636363636365rem 1.6363636363636365rem;-o-background-size:1.6363636363636365rem 1.6363636363636365rem;-webkit-background-size:1.6363636363636365rem 1.6363636363636365rem;background-size:1.6363636363636365rem 1.6363636363636365rem}.ui-slider-popup{position:absolute!important;z-index:100;width:2.0454545454545454rem;height:2.4545454545454546rem;top:-2.7272727272727275rem;padding-top:.1rem;color:#f9f9f9;text-align:center;font-size:1.5rem;background:url(images/controls/00_slider_popup_bg.png) no-repeat;-ms-background-size:2.0454545454545454rem 2.4545454545454546rem;-moz-background-size:2.0454545454545454rem 2.4545454545454546rem;-o-background-size:2.0454545454545454rem 2.4545454545454546rem;-webkit-background-size:2.0454545454545454rem 2.4545454545454546rem;background-size:2.0454545454545454rem 2.4545454545454546rem}.ui-slider-bg{position:absolute;height:.3181818181818182rem;width:0;background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0, #3677c3),color-stop(1, #96b8e0));-o-border-radius:.4545454545454546rem;-ms-border-radius:.4545454545454546rem;-moz-border-radius:.4545454545454546rem;-webkit-border-radius:.4545454545454546rem;border-radius:.4545454545454546rem;-o-box-shadow:-1px -1px 1px #b3c8e2;-ms-box-shadow:-1px -1px 1px #b3c8e2;-moz-box-shadow:-1px -1px 1px #b3c8e2;-webkit-box-shadow:-1px -1px 1px #b3c8e2;box-shadow:-1px -1px 1px #b3c8e2}.ui-slider-handle-press{position:absolute;z-index:15;width:1.6818181818181819rem;height:1.6818181818181819rem;background:url(images/controls/00_slider_handle_press.png) no-repeat;-ms-background-size:1.6363636363636365rem 1.6363636363636365rem;-moz-background-size:1.6363636363636365rem 1.6363636363636365rem;-o-background-size:1.6363636363636365rem 1.6363636363636365rem;-webkit-background-size:1.6363636363636365rem 1.6363636363636365rem;background-size:1.6363636363636365rem 1.6363636363636365rem}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-gallery{position:relative;width:100%}.ui-gallery-bg{display:none;position:absolute;text-align:center;width:100%}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}@-webkit-keyframes ui-ticker-show{from{ opacity:0;-webkit-transform:translatey(-2.272727272727273rem);top:-2.272727272727273rem}to{opacity:1;-webkit-transform:translatey(0);top:0}}@-webkit-keyframes ui-ticker-hide{from{ opacity:1;-webkit-transform:translatey(0);top:0}to{opacity:0;-webkit-transform:translatey(-2.272727272727273rem);top:-2.272727272727273rem}}.ui-ticker{position:fixed;display:none;left:0;width:100%;height:2.272727272727273rem;z-index:2147483547;background:#444}.ui-ticker.fix{display:block;top:0}.ui-ticker.show{display:block;-ms-animation:ui-ticker-show .8s 1 ease;-o-animation:ui-ticker-show .8s 1 ease;-moz-animation:ui-ticker-show .8s 1 ease;-webkit-animation:ui-ticker-show .8s 1 ease;top:0}.ui-ticker.hide{display:block;-ms-animation:ui-ticker-hide .8s 1 ease;-o-animation:ui-ticker-hide .8s 1 ease;-ms-animation:ui-ticker-hide .8s 1 ease;-webkit-animation:ui-ticker-hide .8s 1 ease;top:-2.272727272727273rem}.ui-ticker-btn{position:relative;margin-top:.4545454545454546rem;margin-left:.36363636363636365rem;margin-right:.36363636363636365rem;vertical-align:middle;float:right}.ui-ticker-btn .ui-btn-inner{padding:.15rem 0 0 0;height:1.2727272727272727rem;width:3.5rem;font-size:.81rem;color:#fff;background:#404040;border:1px;border-color:#323232;box-shadow:0 0 1px 1px #323232}.ui-ticker-btn .ui-btn-box-s.ui-btn-up-s{background:#404040;box-shadow:0 0 1px 1px #323232;border-color:#323232}.ui-ticker-btn .ui-btn-box-s.ui-btn-hover-s{background:#404040;box-shadow:0 0 1px 1px #323232;border-color:#323232}.ui-ticker-icon{position:absolute;top:0;height:1.4545454545454546rem;width:1.4545454545454546rem;margin-top:.4090909090909091rem;margin-bottom:.4090909090909091rem;margin-left:.36363636363636365rem;margin-right:.36363636363636365rem;vertical-align:middle}.ui-ticker-text1-bg{position:absolute;top:0;height:.8181818181818182rem;left:2.1818181818181817rem;margin-top:.36363636363636365rem;font-size:.68rem;color:#fff}.ui-ticker-text2-bg{position:absolute;top:0;height:.7272727272727273rem;left:2.1818181818181817rem;margin-top:1.1818181818181819rem;font-size:.54rem;color:#fff}@-webkit-keyframes ui-smallpopup-show{from{ opacity:0;-webkit-transform:scaley(0)}to{opacity:1;-webkit-transform:scaley(1)}}@-webkit-keyframes ui-smallpopup-hide{from{ opacity:1;left:0;-webkit-transform:scaley(1)}to{opacity:0;left:0;-webkit-transform:scaley(0)}}.ui-smallpopup{position:fixed;display:none;left:0;width:100%;z-index:1100;background:#444;vertical-align:middle;font-size:.72rem;word-break:break-all}.ui-smallpopup.fix{display:block}.ui-smallpopup.show{display:block;-moz-animation:ui-smallpopup-show .5s 1 ease;-ms-animation:ui-smallpopup-show .5s 1 ease;-o-animation:ui-smallpopup-show .5s 1 ease;-webkit-animation:ui-smallpopup-show .5s 1 ease}.ui-smallpopup.hide{display:block;left:-100%;-moz-animation:ui-smallpopup-hide .5s 1 ease;-ms-animation:ui-smallpopup-hide .5s 1 ease;-o-animation:ui-smallpopup-hide .5s 1 ease;-webkit-animation:ui-smallpopup-hide .5s 1 ease}.ui-smallpopup-text-bg{position:relative;margin-top:.18181818181818182rem;margin-bottom:.18181818181818182rem;margin-left:.36363636363636365rem;margin-right:.36363636363636365rem;color:#fff}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-swipe{list-style-type:none}.ui-swipe-item{height:1.1818181818181819rem;-ms-user-select:none;-o-user-select:none;-moz-user-select:none;-webkit-user-select:none;-user-select:none;opacity:0;text-align:center}.ui-swipe-item .ui-btn{margin-top:-1.5em ! important;position:relative ! important}.ui-swipe-item p{margin:0}.ui-swipe-item-cover{position:absolute;border:0;top:0;left:0;width:100%;height:100%;z-index:100}.ui-swipe-item-cover .ui-swipe-item-cover-inner{position:absolute;padding-top:.6818181818181819rem;padding-bottom:.6818181818181819rem;padding-left:.36363636363636365rem;width:100%;text-align:left}.ui-swipe-item-cover .ui-swipe-item-cover-inner .ui-li-text-sub{position:absolute;padding-right:.7272727272727273rem}.ui-swipe-item-cover p{margin:0}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-fastscroll{position:absolute;right:0rem;background-color:#e6e3d8;width:1.1363636363636365rem;-ms-user-select:none;-o-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none;margin:0;padding-right:.08em;opacity:1}.ui-fastscroll ul{list-style-type:none;margin:0;padding:0}.ui-fastscroll li{cursor:pointer;color:#a09f9a;padding:.09090909090909091rem .09090909090909091rem .09090909090909091rem .09090909090909091rem;text-align:center;font-size:.7272727272727273rem;font-weight:700;border-left-width:.13636363636363635rem;border-left-color:#3b73b6;border-left-style:solid}.ui-fastscroll2{position:absolute;right:0rem;-ms-user-select:none;-o-user-select:none;-moz-user-select:none;-webkit-user-select:none;user-select:none;margin:0;padding-right:.08em;opacity:1}.ui-fastscroll2 ul{list-style-type:none;margin:0;padding:0}.ui-fastscroll2 li{cursor:pointer;color:#a09f9a;padding:.09090909090909091rem .09090909090909091rem .09090909090909091rem .09090909090909091rem;text-align:right}.ui-fastscroll-bg{position:absolute;right:0rem;background-color:#e6e3d8;width:1.1363636363636365rem;z-index:10;top:0}.ui-fastscroll-popup{position:absolute;background:#3b73b6;color:#fff;padding:.4545454545454546rem 1.3636363636363638rem;-ms-box-shadow:.36363636363636365rem .4545454545454546rem 0rem rgba(199,199,199,.5);-o-box-shadow:.36363636363636365rem .4545454545454546rem 0rem rgba(199,199,199,.5);-moz-box-shadow:.36363636363636365rem .4545454545454546rem 0rem rgba(199,199,199,.5);-webkit-box-shadow:.36363636363636365rem .4545454545454546rem 0rem rgba(199,199,199,.5);box-shadow:.36363636363636365rem .4545454545454546rem 0rem rgba(199,199,199,.5);text-align:center;font-size:3.409090909090909rem;font-weight:700;display:none;box-sizing:border-box;left:50%;top:50%}li.ui-fastscroll-hover{color:#3b73b6}li.ui-fastscroll-hover,li.ui-fastscroll-hover-up,li.ui-fastscroll-hover-down{background:#f8f6ef;border-style:solid;border-color:#3b73b6;border-width:0;border-right-width:.13636363636363635rem;border-left-width:1px;border-left-color:#f8f6ef}li.ui-fastscroll-hover-up{border-top-width:.13636363636363635rem}li.ui-fastscroll-hover-down{border-bottom-width:.13636363636363635rem}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-dayselector label{height:2.5454545454545454rem;width:2.909090909090909rem}.ui-dayselector{display:inline-block}.ui-dayselector .ui-btn{border-color:#1a5274;border-style:solid;border-width:.045454545454545456rem}.ui-dayselector .ui-btn .ui-btn-inner{text-align:center;padding:.4em 0}.ui-dayselector .ui-checkbox-off{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.ui-dayselector .ui-checkbox-off .ui-btn-text{color:#f9f9f9}.ui-dayselector .ui-checkbox-off.ui-btn-down-s.ui-btn-hover-s{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.ui-dayselector .ui-checkbox-on{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.ui-dayselector .ui-checkbox-on .ui-btn-text{color:#f9f9f9}.ui-dayselector .ui-checkbox-on.ui-btn-down-s.ui-btn-hover-s{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.ui-dayselector .ui-dayselector-label-6 .ui-btn-text{color:#00a8e7}.ui-dayselector .ui-dayselector-label-6.ui-checkbox-on .ui-btn-text{color:#f9f9f9}.ui-dayselector .ui-dayselector-label-0 .ui-btn-text{color:#f01402}.ui-dayselector .ui-checkbox{height:2.0454545454545454rem}.ui-dayselector .ui-checkbox .ui-btn{width:2.1363636363636362rem}.ui-dayselector .ui-checkbox .ui-btn.ui-corner-left{border-top-left-radius:.2272727272727273rem;border-bottom-left-radius:.2272727272727273rem}.ui-dayselector .ui-checkbox .ui-btn.ui-corner-right{border-top-right-radius:.2272727272727273rem;border-bottom-right-radius:.2272727272727273rem}.ui-dayselector .todons-dayselector-disabled .ui-dayselector-label-6{color:#121212}.ui-dayselector .todons-dayselector-disabled .ui-dayselector-label-0{color:#363636}.ui-dayselector.ui-controlgroup-vertical .ui-checkbox .ui-btn{width:2.909090909090909rem}.ui-dayselector.ui-controlgroup-vertical .ui-checkbox .ui-btn .ui-btn-text{margin-left:.09090909090909091rem}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}div.ui-slider.ui-toggle-switch{width:3rem;height:1.590909090909091rem;background-color:transparent;margin-top:.2272727272727273rem;margin-bottom:.2272727272727273rem}div.ui-slider.ui-toggle-switch .ui-slider-label{position:absolute;width:3rem;height:1.590909090909091rem;background-size:cover;-ms-background-size:cover;-webkit-background-size:cover;-o-background-size:cover;-moz-background-size:cover}div.ui-slider.ui-toggle-switch .ui-slider-label.ui-slider-label-a{background:url(images/00_button_on.png) no-repeat}div.ui-slider.ui-toggle-switch .ui-slider-label.ui-slider-label-b{background:url(images/00_button_off.png) no-repeat}div.ui-slider.ui-toggle-switch .ui-slider-inneroffset a{background:0}.ui-slider-switch:not(.ui-toggle-switch){width:4.181818181818182rem}div.ui-slider.ui-slider-switch:not(.ui-toggle-switch){position:relative;margin-top:.2272727272727273rem;margin-bottom:.2272727272727273rem;height:1.4545454545454546rem;top:0;margin:.2272727272727273rem;border-radius:.6818181818181819rem}div.ui-slider.ui-slider-switch:not(.ui-toggle-switch) .ui-slider-inneroffset{position:relative;margin:-1px .7272727272727273rem;z-index:1}div.ui-slider.ui-slider-switch:not(.ui-toggle-switch) a.ui-slider-handle{position:absolute;background:#fff;top:50%;margin:1px 0 0 -.6818181818181819rem;border-radius:.6818181818181819rem;border:2px solid gray;width:1.2727272727272727rem;height:1.2727272727272727rem}div.ui-slider.ui-slider-switch:not(.ui-toggle-switch) a.ui-slider-handle-snapping{-webkit-transition:left 70ms linear}div.ui-slider.ui-slider-switch:not(.ui-toggle-switch) span{position:absolute;overflow:hidden;text-align:center;height:1.4545454545454546rem;font-weight:700;font-size:.7272727272727273rem;border-radius:.6818181818181819rem;white-space:nowrap;line-height:2}div.ui-slider.ui-slider-switch:not(.ui-toggle-switch) span.ui-slider-label-a{left:0;color:#fff;z-index:1;text-indent:-1.5em}div.ui-slider.ui-slider-switch:not(.ui-toggle-switch) span.ui-slider-label-b{right:0;color:#000;z-index:0;text-indent:1.5em}.ui-slider-switch .ui-slider-handle .ui-btn-inner{padding:0}.ui-triangle-container{position:relative}.ui-triangle-container .ui-triangle{position:absolute;border-style:solid;border-color:transparent;border-width:10px}.ui-triangle-container .ui-triangle-top{top:0;border-top-width:0;border-left-color:transparent;border-right-color:transparent;margin-left:-10px}.ui-triangle-container .ui-triangle-bottom{bottom:0;border-bottom-width:0;border-left-color:transparent;border-right-color:transparent;margin-left:-10px}.ui-triangle-container .ui-triangle-left{left:0;margin-top:-10px;border-left-width:0;border-left-color:transparent;border-right-color:transparent}.ui-triangle-container .ui-triangle-right{right:0;margin-top:-10px;border-right-width:0;border-left-color:transparent;border-right-color:transparent}.ui-triangle-container-top{height:10px;top:0;margin-top:-10px}.ui-triangle-container-bottom{height:10px;bottom:0;margin-bottom:-10px}.ui-triangle-container-left{width:10px}.ui-triangle-container-right{width:10px}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-tokentextarea{display:table;outline:0}.ui-tokentextarea .ui-tokentextarea-label{display:inline-block;text-align:center;position:relative;margin-left:.3em;margin-right:.3em;padding:.6em 0;color:#666;font-weight:700;text-align:center;font-size:1em}.ui-tokentextarea-input{outline:0;position:relative;border:0!important;padding:0!important;margin:.5em;color:#222;text-align:left;font-size:1em}.ui-tokentextarea-input-visible{display:inline-block!important}.ui-tokentextarea-input-invisible{display:none!important}.ui-tokentextarea div{display:inline-block;text-align:center;cursor:pointer;position:relative;margin-left:.3em;margin-right:.3em;margin-bottom:.3em;margin-top:.3em;padding:.2em .5em;font-size:1em;text-shadow:0 .1em .1em rgba(0,0,0,.3);-ms-border-radius:.2em;-o-border-radius:.2em;-webkit-border-radius:.2em;-moz-border-radius:.2em;border-radius:.2em;-o-box-shadow:0 .1em .1em rgba(0,0,0,.2);-ms-box-shadow:0 .1em .1em rgba(0,0,0,.2);-moz-box-shadow:0 .1em .1em rgba(0,0,0,.2);-webkit-box-shadow:0 .1em .1em rgba(0,0,0,.2);box-shadow:0 .1em .1em rgba(0,0,0,.2);color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}div.ui-tokentextarea-block{background-color:#5f8abd;background-image:url(./images/00_contacts_button_header.png);background-size:contain;background-repeat:no-repeat;padding-left:.7em}div.ui-tokentextarea-sblock{background-color:#365984;background-image:url(./images/00_contacts_button_header_press.png);background-size:contain;background-repeat:no-repeat;padding-left:.7em}.ui-tokentextarea .ui-tokentextarea-desclabel{display:inline-block;outline:0;position:relative;border:0;color:#666;text-align:left;font-size:1em}.ui-tokentextarea-focus-button{background-image:url(./images/00_button_expand_opened.png)}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-handler{position:absolute;overflow:hidden;opacity:0}.ui-handler-visible{opacity:1}.ui-handler-direction-y{top:.2272727272727273rem;right:.2272727272727273rem;bottom:.2272727272727273rem;width:1.0909090909090908rem}.ui-handler-direction-x{right:.2272727272727273rem;bottom:.2272727272727273rem;left:.2272727272727273rem;height:1.0909090909090908rem}.ui-handler-track{position:relative;width:100%;height:100%}.ui-handler-thumb{position:absolute;top:0;left:0;background-position:center;background-repeat:no-repeat;-o-border-radius:.11363636363636365rem;-ms-border-radius:.11363636363636365rem;-moz-border-radius:.11363636363636365rem;-webkit-border-radius:.11363636363636365rem;border-radius:.11363636363636365rem}.ui-handler-direction-y .ui-handler-thumb{width:1.0909090909090908rem;height:4.863636363636364rem;background-size:1.0909090909090908rem .9090909090909092rem}.ui-handler-direction-x .ui-handler-thumb{width:4.863636363636364rem;height:1.0909090909090908rem;background-size:.9090909090909092rem 1.0909090909090908rem}.ui-handler-s .ui-handler-thumb{background-color:rgba(150,150,150,.5)}.ui-handler-s .ui-handler-direction-y .ui-handler-thumb{background-image:url("images/00_scroll_bar_handler.png")}.ui-handler-s .ui-handler-direction-x .ui-handler-thumb{background-image:url("images/00_scroll_bar_handler_hor.png")}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-virtualgrid{overflow:hidden;position:absolute}.ui-virtualgrid-wrapblock{position:absolute;left:0}.ui-virtualgrid-wrapblock-x{float:left;overflow:hidden}.ui-scrollbar-thumb-x{width:1.5rem!important}.ui-scrollbar-thumb-y{height:1.5rem!important}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-multimediaview{background-color:#f9f9f9;overflow:hidden}.ui-multimediaview-wrap{position:relative;width:100%;margin-top:.7272727272727273rem;margin-bottom:.7272727272727273rem;padding:0;border:0}.ui-multimediaview-fullscreen{position:absolute!important;z-index:1100!important}.ui-multimediaview-control span{display:inline-block}.ui-multimediaview-control{position:relative;display:block;z-index:1101!important;padding:0;margin:0;outline:0;border:0;height:1.9090909090909092rem}.ui-multimediaview-control span.ui-button{background-position:center center;background-size:80%;background-repeat:no-repeat;width:1.6818181818181819rem;height:1.6818181818181819rem;margin:.09090909090909091rem}.ui-multimediaview-control .ui-playpausebutton{float:left}.ui-multimediaview-control .ui-timestamplabel{text-align:center;float:left}.ui-multimediaview-control .ui-timestamplabel p{margin-top:-.22272727272727275rem;margin-left:.09090909090909091rem;padding:0;text-align:center;font-size:.5rem;line-height:.6363636363636364rem;text-align:left}.ui-multimediaview-control .ui-durationlabel{text-align:center;float:right}.ui-multimediaview-control .ui-durationlabel p{margin-top:-.22272727272727275rem;margin-right:.09090909090909091rem;padding:0;text-align:center;font-size:.5rem;line-height:.6363636363636364rem;text-align:right}.ui-multimediaview-control .ui-seekbar{margin-top:.26136363636363635rem;padding-left:.09090909090909091rem;padding-right:.09090909090909091rem;height:.36363636363636365rem;float:left}.ui-multimediaview-control .ui-seekbar .ui-duration{margin:0;padding:0;width:100%;height:.36363636363636365rem;border-radius:1.5em}.ui-multimediaview-control .ui-seekbar .ui-currenttime{margin:0;padding:0;height:.36363636363636365rem;position:absolute;border-radius:1.5em}.ui-multimediaview-control .ui-volumecontrol{width:5rem;height:100%;float:left}.ui-multimediaview-control .ui-volumecontrol .ui-volumebar{height:100%;padding-top:.7954545454545455rem;padding-left:.9090909090909092rem;display:block}.ui-multimediaview-control .ui-volumecontrol .ui-volumebar .ui-guide{width:3.6363636363636367rem;height:.36363636363636365rem;position:absolute;border-radius:1.5em}.ui-multimediaview-control .ui-volumecontrol .ui-volumebar .ui-value{margin:0;padding:0;height:.36363636363636365rem;position:absolute;border-radius:1.5em}.ui-multimediaview-control .ui-volumecontrol .ui-volumebar .ui-handler{margin:0;padding:0;width:.6818181818181819rem;height:.6818181818181819rem;position:absolute;border-style:solid;border-width:1px;border-radius:1.5em}.ui-fullscreen-page{padding:0!important}.ui-multimediaview-s .ui-multimediaview-video{background-color:rgba(248,246,239,.5)}.ui-multimediaview-s .ui-timestamplabel{color:#4a84c9}.ui-multimediaview-s .ui-durationlabel{color:#808080}.ui-multimediaview-s span.ui-button{background-color:#f8f6ef}.ui-multimediaview-s span.ui-play-icon{background-image:url(./images/00_button_play.png)}.ui-multimediaview-s span.ui-pause-icon{background-image:url(./images/00_button_pause.png)}.ui-multimediaview-s span.ui-volume-icon{background-image:url(./images/controls/00_slider_button_volume_02.png)}.ui-multimediaview-s span.ui-mute-icon{background-image:url(./images/controls/00_slider_button_volume_01.png)}.ui-multimediaview-s span.ui-fullscreen-on{background-image:url(./images/00_button_fullscreen_on.png)}.ui-multimediaview-s span.ui-fullscreen-off{background-image:url(./images/00_button_fullscreen_off.png)}.ui-multimediaview-s .ui-seekbar .ui-duration{background-color:#cbc8c5}.ui-multimediaview-s .ui-seekbar .ui-currenttime{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.ui-multimediaview-s .ui-volumebar .ui-guide{background-color:#cbc8c5}.ui-multimediaview-s .ui-volumebar .ui-value{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.ui-multimediaview-s .ui-volumebar .ui-handler{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6);border-color:#bab9b4}.ui-popup-screen{top:0;left:0;width:100%;height:100%;border:0;position:absolute;filter:Alpha(Opacity=50);opacity:0}.ui-popup-screen-background-hack{background-color:#000;filter:Alpha(Opacity=0)}@-webkit-keyframes popup-fadein{from{ opacity:0}to{opacity:.5}}@-moz-keyframes popup-fadein{from{ opacity:0}to{opacity:.5}}@-webkit-keyframes popup-fadeout{from{ opacity:.5}to{opacity:0}}@-moz-keyframes popup-fadeout{from{ opacity:.5}to{opacity:0}}.ui-popup-screen.fade.in{opacity:.5;-webkit-animation-name:popup-fadein;-moz-animation-name:popup-fadein}.ui-popup-screen.fade.out{opacity:0;-webkit-animation-name:popup-fadeout;-moz-animation-name:popup-fadeout}.ui-popup.ui-content,.ui-popup .ui-content{overflow:visible}.ui-popup>img{width:auto;height:auto;max-width:100%;max-height:100%;vertical-align:middle}.ui-popup iframe{vertical-align:middle}@media all and (min-width: 450px){.ui-popup .ui-field-contain label.ui-submit,.ui-popup .ui-field-contain .ui-controlgroup-label,.ui-popup .ui-field-contain label.ui-select,.ui-popup .ui-field-contain label.ui-input-text{ font-size:16px;line-height:1.4;display:block;font-weight:400;margin:0 0 .3em}.ui-popup .ui-field-contain .ui-btn.ui-submit,.ui-popup .ui-field-contain .ui-controlgroup-controls,.ui-popup .ui-field-contain .ui-select,.ui-popup .ui-field-contain input.ui-input-text,.ui-popup .ui-field-contain textarea.ui-input-text,.ui-popup .ui-field-contain .ui-input-search{width:100%;display:block}}.ui-popup>.ui-btn-left,.ui-popup>.ui-btn-right{position:absolute;top:-9px;margin:0;z-index:1101}.ui-popup>.ui-btn-left{left:-9px}.ui-popup>.ui-btn-right{right:-9px}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-popup-screen{background:#000;opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1200}.ui-popup-scroller-bg{width:100%}.ui-popup-container{position:absolute;width:86.12%;z-index:1201!important;background:#f8f6ef;text-align:center;outline-color:#f8f6ef;display:-moz-box;display:-webkit-box;display:box;-ms-box-orient:vertical;-moz-box-orient:vertical;-o-box-orient:vertical;-webkit-box-orient:vertical;box-orient:vertical;-ms-box-align:center;-moz-box-align:center;-o-box-align:center;-webkit-box-align:center;box-align:center;-ms-box-pack:center;-moz-box-pack:center;-o-box-pack:center;-webkit-box-pack:center;box-pack:center}.ui-popup-container .ui-popup{padding:3px 2px 2px 2px;background:#f8f6ef;width:100%}.ui-popup-container .ui-popup>.ui-popup-title,.ui-popup-container .ui-popup>.ui-popup-text,.ui-popup-container .ui-popup>.ui-popup-button-bg{width:100%}.ui-popup-container .ui-popup-title{width:100%;height:1.8181818181818183rem;text-align:left;color:#3b73b6;font-size:1.0909090909090908rem;font-weight:700}.ui-popup-container .ui-popup-title h1{font-size:1.0909090909090908rem;font-weight:700;color:#3b73b6;margin:0;padding-top:.4545454545454546rem;padding-left:.7272727272727273rem}.ui-popup-container .ui-popup-text{margin-top:1rem;margin-bottom:1rem;color:#000;font-size:.9090909090909092rem;background:#f8f6ef;text-align:center}.ui-popup-container .ui-popup-text .ui-li .ui-radio label,.ui-popup-container .ui-popup-text .ui-li .ui-checkbox label{background:transparent}.ui-popup-container .ui-popup-button-bg{font-size:1.4545454545454546rem;height:1.6818181818181819rem;padding-top:.4545454545454546rem;padding-bottom:.4545454545454546rem;width:100%;vertical-align:middle}.ui-popup-container .ui-popup-button-bg>.ui-btn{display:inline-block;margin:auto;height:1.6818181818181819rem}.ui-popup-container .ui-popup-button-bg .ui-btn-inner{padding-top:.2272727272727273rem;padding-bottom:.2272727272727273rem;padding-left:.9090909090909092rem;padding-right:.9090909090909092rem}.ui-popup-container .center_basic_3btn .ui-btn,.ui-popup-container .center_title_3btn .ui-btn{max-width:3.6363636363636367rem;height:1.6818181818181819rem;margin-top:0rem;margin-bottom:0rem;margin-left:.2272727272727273rem;margin-right:.2272727272727273rem;display:inline-block}.ui-popup-container .center_button_vertical .ui-popup-button-bg{display:block;height:auto}.ui-popup-container .center_button_vertical .ui-popup-button-bg>.ui-btn{display:block;width:9.090909090909092rem}.ui-popup-container .center_checkbox .ui-popup-check-bg{font-size:.9090909090909092rem;background:#f8f6ef;width:100%;padding-top:0rem;padding-bottom:1rem;vertical-align:middle}.ui-popup-container .center_checkbox .ui-popup-check-bg .ui-checkbox .ui-btn{text-align:center;background:#f8f6ef;border:0rem}.ui-popup-container .center_checkbox .ui-popup-check-bg .ui-checkbox .ui-btn .ui-btn-inner{border:0rem}.ui-popup-container .center_checkbox .ui-popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popup-container .center_checkbox .ui-popup-button-bg .ui-btn{width:5.909090909090909rem;height:1.6818181818181819rem;margin-top:0rem;margin-bottom:0rem;margin-left:.2272727272727273rem;margin-right:.2272727272727273rem;display:inline-block}.ui-popup-container .center_liststyle_1btn .ui-popup-scroller-bg{width:100%;overflow:hidden;background:#f8f6ef;height:11.636363636363637rem}.ui-popup-container .center_liststyle_1btn .ui-popup-button-bg{padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popup-container .center_liststyle_2btn .ui-popup-scroller-bg{width:100%;overflow:hidden;background:#f8f6ef;height:11.636363636363637rem}.ui-popup-container .center_liststyle_2btn .ui-popup-button-bg{padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popup-container .center_liststyle_2btn .ui-popup-button-bg .ui-btn{width:5.909090909090909rem;height:1.6818181818181819rem;margin-top:0rem;margin-bottom:0rem;margin-left:.2272727272727273rem;margin-right:.2272727272727273rem;display:inline-block}.ui-popup-container .center_liststyle_2btn .ui-popup-button-bg .ui-btn .ui-btn-inner{padding-top:.2272727272727273rem;padding-bottom:.2272727272727273rem;padding-left:.9090909090909092rem;padding-right:.9090909090909092rem}.ui-popup-container .center_title_2btn .ui-popup-button-bg .ui-btn{width:5.909090909090909rem}.ui-popup-container .center_liststyle_3btn .ui-popup-scroller-bg{width:100%;overflow:hidden;background:#f8f6ef;height:11.636363636363637rem}.ui-popup-container .center_liststyle_3btn .ui-popup-button-bg{padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popup-container .center_liststyle_3btn .ui-popup-button-bg .ui-btn{max-width:3.6363636363636367rem;height:1.6818181818181819rem;margin-top:0rem;margin-bottom:0rem;margin-left:.2272727272727273rem;margin-right:.2272727272727273rem;display:inline-block}.ui-popup-container .center_progressbar{text-align:center}.ui-popup-container .center_progressbar .ui-popup-text{font-size:1.1818181818181819rem;font-color:#999;background:#f8f6ef;width:100%;height:3.181818181818182rem}.ui-popup-container .center_progressbar .ui-popup-text p{height:100%;text-align:center;padding:1rem .7272727272727273rem 0rem .7272727272727273rem}.ui-popup-container .center_progressbar .ui-popup-text-bottom-bg{font-size:1.1818181818181819rem;font-color:#999;background:#f8f6ef;width:100%;vertical-align:middle}.ui-popup-container .center_progressbar .ui-popup-text-bottom-bg .text-left{width:40%;height:2.1818181818181817rem;padding:0rem .7272727272727273rem 0rem .7272727272727273rem;text-align:left;display:inline-block}.ui-popup-container .center_progressbar .ui-popup-text-bottom-bg .text-right{width:40%;height:2.1818181818181817rem;padding:0rem .7272727272727273rem 0rem .7272727272727273rem;text-align:right;display:inline-block}.ui-popup-container .center_progressbar .ui-popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popup-container .center_progressbar .ui-popup-button-bg .ui-btn{width:9.136363636363637rem;height:1.6818181818181819rem;margin:auto}.ui-popup-container .center_progressbar .ui-popup-progress-bg{background:#f8f6ef;width:100%;height:100%}.ui-popup-container .centertext_progressbar{text-align:center}.ui-popup-container .centertext_progressbar .ui-popup-text{font-size:1.1818181818181819rem;font-color:#999;background:#f8f6ef;width:100%;padding-top:1rem;padding-bottom:.7272727272727273rem}.ui-popup-container .centertext_progressbar .ui-popup-text p{text-align:center}.ui-popup-container .centertext_progressbar .ui-popup-text-bottom-bg{font-size:1.1818181818181819rem;font-color:#999;background:#f8f6ef;width:100%;vertical-align:middle}.ui-popup-container .centertext_progressbar .ui-popup-text-bottom-bg .text-left{width:40%;height:1.8181818181818183rem;padding:.7272727272727273rem .7272727272727273rem 1rem .7272727272727273rem;text-align:left;display:inline-block}.ui-popup-container .centertext_progressbar .ui-popup-text-bottom-bg .text-right{width:40%;height:1.8181818181818183rem;padding:.7272727272727273rem .7272727272727273rem 1rem .7272727272727273rem;text-align:right;display:inline-block}.ui-popup-container .centertext_progressbar .ui-popup-button-bg{font-size:1.4545454545454546rem;background:#f8f6ef;width:100%;padding-top:.5rem;padding-bottom:.5rem;vertical-align:middle}.ui-popup-container .centertext_progressbar .ui-popup-button-bg .ui-btn{width:18.272727272727273rem;height:1.6818181818181819rem;margin:auto}.ui-popup-container .centertext_progressbar .ui-popup-progress-bg{background:#f8f6ef;width:100%;height:100%}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-text-ellipsis{white-space:nowrap;text-overflow:ellipsis;-o-text-overflow:ellipsis;overflow:hidden!important}.LESSbutton_box_style{color:#363133}.LESSbutton_up_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2)}.LESSbutton_box_style{background:#ebe8e3;background:-webkit-linear-gradient(top, #ebe8e3, #eae7e2);background:-moz-linear-gradient(top, #ebe8e3, #eae7e2);background:-o-linear-gradient(top, #ebe8e3, #eae7e2);background:-ms-linear-gradient(top, #ebe8e3, #eae7e2);border:1px solid;border-color:#dcdad3;-o-box-shadow:0 0 1px 1px #fff;-ms-box-shadow:0 0 1px 1px #fff;-moz-box-shadow:0 0 1px 1px #fff;-webkit-box-shadow:0 0 1px 1px #fff;box-shadow:0 0 1px 1px #fff}.LESSbutton_inner_box_style{background:#f7f5ee;background:-webkit-linear-gradient(top, #faf7f2, #f8f5f0);background:-ms-linear-gradient(top, #faf7f2, #f8f5f0);background:-o-linear-gradient(top, #faf7f2, #f8f5f0);background:-moz-linear-gradient(top, #faf7f2, #f8f5f0);-o-box-shadow:none;-ms-box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.LESSbutton_inner_pressstyle{color:#f8f6ef}.LESSbutton_text1_style{font-family:Helvetica,Arial,sans-serif;font-weight:400;font-size:1.0rem;font-style:normal;color:#000}.LESSbutton_hover_style{color:#363133}.LESSbutton_down_style{background:#3b73b6;color:#f8f6ef}.LESSbutton_edit_style{background:#c95858;background:-webkit-gradient(linear,left top,left bottom,from( #c95858),to( #a12828));background:-moz_linear-gradient(top, #c95858, #a12828)}.LESSDayselectorButtonNormal{background:#7e9db2;background:-webkit-linear-gradient(top, #7e9db2 0, #547990 100%);background:-moz-linear-gradient(top, #7e9db2 0, #547990 100%);background:-ms-linear-gradient(top, #7e9db2 0, #547990 100%);background:-o-linear-gradient(top, #7e9db2 0, #547990 100%);background:linear-gradient(top, #7e9db2 0, #547990 100%)}.LESSDayaselectorButtonPress{background:#3b7796;background:-webkit-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-moz-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-ms-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:-o-linear-gradient(top, #3b7796 0, #2f5b75 100%);background:linear-gradient(top, #3b7796 0, #2f5b75 100%)}.LESSpopup_button_style{}.LESSpopup_button_hover_style{background:#5e88a3}.LESSpopup_button_press_style{background:#43a0d9;background:-webkit-gradient(linear,left top,left bottom,from( #43a0d9),to( #388bb9));background:-moz-linear-gradient(top, #43a0d9, #388bb9);background:-ms-linear-gradient(top, #43a0d9, #388bb9);background:-o-linear-gradient(top, #43a0d9, #388bb9)}.LESStoggleswitch_on_style{background:#2a7eac;background:-webkit-gradient(linear,left top,left bottom,from( #2174a7),to( #4ba5db));background:-moz-linear-gradient(top, #2174a7, #4ba5db);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_off_style{color:#cbcbcb;background:#97a1a7;background:-webkit-gradient(linear,left top,left bottom,from( #727272),to( #8d8d8d));background:-moz-linear-gradient(top, #727272, #8d8d8d);border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.LESStoggleswitch_reed_style{background:#fdfdfd;background:-webkit-gradient(linear,left top,left bottom,from( #fdfdfd),to( #e7e7e7));background:-moz-linear-gradient(top, #fdfdfd, #e7e7e7);border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.LESSbutton_editpress_style{background:#931818;background:-webkit-gradient(linear,left top,left bottom,from( #931818),to( #6e1717));background:-moz-linear-gradient(top, #931818, #6e1717)}.LESSbutton_edit_padding{padding:.5em .8em}.LESSmultimediaview_bar_active_style{background-color:#4a84c9;background-image:-webkit-gradient(linear,left top,left bottom,from( #6289d9),to( #295b98));background-image:-moz-linear-gradient(top, #6289d9, #295b98);background-image:-o-linear-gradient(top, #6289d9, #295b98);background-image:-ms-linear-gradient(top, #6289d9, #295b98)}.LESSmultimediaview_bar_handle_style{background-color:#f9f9f9;background-image:-webkit-gradient(linear,left top,left bottom,from( #fff),to( #e6e6e6));background-image:-moz-linear-gradient(top, #fff, #e6e6e6);background-image:-o-linear-gradient(top, #fff, #e6e6e6);background-image:-ms-linear-gradient(top, #fff, #e6e6e6)}.ui-tabbar{background:#f8f6ef;z-index:1000}.ui-tabbar.ui-portrait-tabbar{}.ui-tabbar.ui-landscape-tabbar{}.ui-tabbar a.ui-btn{background:#f8f6ef;color:#999;padding-top:.8636363636363636rem;padding-bottom:.8636363636363636rem}.ui-tabbar a.ui-btn .ui-btn-inner{padding-top:0;padding-bottom:0;border-left:1px solid;border-color:#c0c0c0;border-radius:0;-0-border-radius:0;-ms-border-radius:0;-webkit-border-radius:0}.ui-tabbar a.ui-btn .ui-icon{width:1.4545454545454546rem;height:1.4545454545454546rem;background-repeat:no-repeat;background-size:100% 100%}.ui-tabbar.ui-tabbar-persist a.ui-btn{background:#f8f6ef}.ui-tabbar.ui-tabbar-persist a.ui-state-persist,.ui-tabbar.ui-tabbar-persist a.ui-state-persist.ui-btn-active,.ui-tabbar.ui-tabbar-persist a.ui-btn-show-style{color:#3b73b6}.ui-tabbar.ui-tabbar-persist a.ui-btn-hover-s.ui-btn-down-s:not(.ui-state-persist){color:#3b73b6;background:-webkit-linear-gradient(top, #d2d2c8 0, #f6f8ef 100%)}.ui-tabbar:not(.ui-tabbar-persist) a.ui-btn{background:#f8f6ef}.ui-tabbar:not(.ui-tabbar-persist) a.ui-btn-active,.ui-tabbar:not(.ui-tabbar-persist) .ui-btn-show-style{color:#3b73b6}.ui-tabbar:not(.ui-tabbar-persist) a.ui-btn.ui-btn-hover-s.ui-btn-down-s{color:#3b73b6;background:-webkit-linear-gradient(top, #d2d2c8 0, #f6f8ef 100%)}.ui-tabbar .ui-btn-inner{font-size:.6818181818181819rem;font-weight:700}.ui-tabbar .ui-btn-inner .ui-icon{top:.4545454545454546rem;left:50%;margin-left:-.7272727272727273rem}.ui-tabbar.ui-tabbar-notext a.ui-btn{padding-top:.5rem;padding-bottom:.4545454545454546rem}.ui-tabbar.ui-tabbar-notext .ui-btn-inner{height:1.5454545454545454rem}.ui-tabbar.ui-tabbar-notext .ui-btn-inner .ui-icon{top:0}.ui-header.ui-bar-s.ui-title-tabbar .ui-title{font-size:1rem;margin-top:.36363636363636365rem;margin-bottom:0rem}.ui-header.ui-bar-s.ui-title-tabbar .ui-tabbar.ui-tabbar-noicons a.ui-btn{padding-top:.6818181818181819rem;padding-bottom:.5909090909090909rem}.ui-header.ui-bar-s.ui-title-tabbar .ui-tabbar.ui-tabbar-notext a.ui-btn{padding-top:.3181818181818182rem;padding-bottom:.2272727272727273rem}.ui-header.ui-bar-s.ui-title-tabbar .ui-tabbar.ui-portrait-tabbar{}.ui-header.ui-bar-s.ui-title-tabbar .ui-tabbar.ui-landscape-tabbar{}.ui-header.ui-bar-s.ui-title-tabbar-multiline .ui-tabbar a.ui-btn{padding-top:.5rem;padding-bottom:.4545454545454546rem}.ui-header.ui-bar-s.ui-title-tabbar-multiline .ui-tabbar a.ui-btn .ui-btn-inner{height:2.4545454545454546rem}.ui-header.ui-bar-s.ui-title-tabbar-multiline .ui-tabbar a.ui-btn .ui-btn-inner .ui-btn-text{padding-top:0;line-height:3.8636363636363638rem}.ui-header.ui-bar-s.ui-title-tabbar-multiline .ui-tabbar a.ui-btn .ui-btn-inner .ui-icon{top:0}.ui-header.ui-bar-s li:first-child .ui-btn-inner{border-left-width:0}.ui-footer.ui-bar-s .ui-tabbar{height:2.2272727272727275rem;margin-left:auto;margin-right:auto}.ui-footer.ui-bar-s .ui-tabbar a.ui-btn{padding-top:.7272727272727273rem;padding-bottom:.7272727272727273rem}.ui-footer.ui-bar-s .ui-tabbar .ui-btn-inner .ui-icon{top:0}.ui-footer.ui-bar-s .ui-tabbar.ui-tabbar-notext a.ui-btn{padding-top:.36363636363636365rem;padding-bottom:.3181818181818182rem}.ui-footer.ui-bar-s .ui-tabbar li:first-child .ui-btn-inner{border-left-width:0}.ui-footer.ui-bar-s .ui-tabbar.ui-tabbar-margin-back{margin-right:2.5454545454545454rem}.ui-footer.ui-bar-s .ui-tabbar.ui-tabbar-margin-more{margin-left:2.5454545454545454rem}.ui-footer.ui-bar-s .ui-btn-back~.ui-tabbar li:last-child .ui-btn-inner{border-right:1px solid;border-right-color:#c0c0c0}.ui-footer.ui-bar-s [data-icon="naviframe-more"]~.ui-tabbar li:first-child .ui-btn-inner{border-left:1px solid;border-left-color:#c0c0c0}.ui-tabbar-s.ui-navbar-noicons{font-size:1rem}.ui-tabbar .tabbar-scroll-ul{margin-top:0;margin-bottom:0;padding-left:0}.ui-tabbar .tabbar-scroll-ul .tabbar-scroll-li{position:relative;display:inline-block;margin-left:-.36363636363636365rem}.ui-tabbar .tabbar-scroll-ul .tabbar-scroll-li a{width:100%}.ui-tabbar .tabbar-scroll-ul li.tabbar-scroll-li:first-child{margin-left:0}.ui-tabbar-divider{position:absolute;top:0;width:.4545454545454546rem;height:2.5rem;background:-webkit-linear-gradient(left, #00009b 0, #f6f8ef 100%)}.ui-tabbar-divider-left{left:0;border-top-right-radius:.4545454545454546rem;border-bottom-right-radius:.4545454545454546rem;background:-webkit-linear-gradient(left, #00009b 0, #f6f8ef 100%)}.ui-tabbar-divider-right{right:0;border-top-left-radius:.4545454545454546rem;border-bottom-left-radius:.4545454545454546rem;background:-webkit-linear-gradient(right, #00009b 0, #f6f8ef 100%)}
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/META-INF/MANIFEST.MF b/org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..0a48a67
--- /dev/null
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Tizen-Template-Name: tizenwebuifw-masterdetail
+Tizen-Template-Description: Tizen Web UI Framework - MasterDetail
+Tizen-Template-Tags: tizenwebuifw,tizen,master,detail
+Tizen-Template-Version: 0.1
+Tizen-Template-Dependency: tizenwebuifw-common-resources
+Tizen-Template-Exclude: META-INF/*;*.template
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/META-INF/messages.properties b/org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/META-INF/messages.properties
new file mode 100644 (file)
index 0000000..f9a7d81
--- /dev/null
@@ -0,0 +1,4 @@
+#Properties file for tizenwebuifw-masterdetail.jar
+MetaDescriptionContent = HTML meta description [string][optional]
+HtmlTitle = HTML Title [string][optional]
+TizenWebUIFWTheme = Tizen Web UI Framework Theme [tizen-white][optional]
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/head.template b/org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/head.template
new file mode 100644 (file)
index 0000000..b3c6047
--- /dev/null
@@ -0,0 +1,28 @@
+<!------------------------------------------------------------------------------------------------
+ Copyright $@{YEAR()} $@{USER()} All rights reserved.
+------------------------------------------------------------------------------------------------->
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8"/>
+    <meta name="description" content="$${MetaDescriptionContent|"Tizen template generated by Tizen Web IDE"}"/>
+
+    <title>$${HtmlTitle|"Title"}</title>
+
+    <!--NOTE:
+    Additional scripts and css files are to be placed here.
+    You can use jQuery namespace($) and all functionalities in jQuery
+    in your script.  For example:
+
+        <script src="main.js"></script>
+        <link rel="stylesheet" href="my.css">
+    -->
+
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/jquery.js"></script>
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"></script>
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" data-framework-theme="$${TizenWebUIFWTheme?default("tizen-white")}"></script>
+    <script type="text/javascript" src="./js/main.js"></script>
+    <link rel="stylesheet" type="text/css" href="./css/style.css"/>
+</head>
+
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/index.html b/org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/index.html
new file mode 100644 (file)
index 0000000..b634389
--- /dev/null
@@ -0,0 +1,34 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page">
+    <div data-role="header" data-position="fixed">
+        <h1>Master-Detail Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <div >
+            <h2>Introduction</h2>
+            <p>This template is for a master-detail structured application.</p>
+        </div>
+        <div>
+            <div data-role="collapsible" data-collapsed="true">
+                <h3>More in this section</h3>
+                <ul data-role="listview" >
+                    <li class="ui-li-1line ui-li-dialogue" data-expandable="true" id="section" data-initial-expansion="true">Details</li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="index.html">Introduction</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section1.html">Section 1</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <p>&nbsp&nbsp&copy; Your Company</p>
+    </div><!-- /footer -->
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/section1.html b/org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/section1.html
new file mode 100644 (file)
index 0000000..0af0787
--- /dev/null
@@ -0,0 +1,34 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page">
+    <div data-role="header" data-position="fixed">
+        <h1>Master-Detail Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <div>
+            <h2>Section 1</h2>
+            <p>This is Secion 1.</p>
+        </div>
+        <div>
+            <div data-role="collapsible" data-collapsed="true">
+                <h3>More in this section</h3>
+                <ul data-role="listview">
+                    <li class="ui-li-1line ui-li-dialogue" data-expandable="true" id="section" data-initial-expansion="true">Details</li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="index.html">Introduction</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section1.html">Section 1</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <p></p>
+    </div><!-- /footer -->
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/section2.html b/org.tizen.common.verrari/templates/cli/tizenwebuifw-masterdetail/section2.html
new file mode 100644 (file)
index 0000000..5db963d
--- /dev/null
@@ -0,0 +1,34 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page">
+    <div data-role="header" data-position="fixed">
+        <h1>Master-Detail Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <div>
+            <h2>Section 2</h2>
+            <p>This is Secion 2.</p>
+        </div>
+        <div>
+            <div data-role="collapsible" data-collapsed="true">
+                <h3>More in this section</h3>
+                <ul data-role="listview">
+                    <li class="ui-li-1line ui-li-dialogue" data-expandable="true" id="section" data-initial-expansion="true">Details</li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="index.html">Introduction</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section1.html">Section 1</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <p></p>
+    </div><!-- /footer -->
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-multipage/META-INF/MANIFEST.MF b/org.tizen.common.verrari/templates/cli/tizenwebuifw-multipage/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..017b992
--- /dev/null
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Tizen-Template-Name: tizenwebuifw-multipage
+Tizen-Template-Description: Tizen Web UI Framework - Mutil Page
+Tizen-Template-Tags: tizenwebuifw,tizen,multipage,multi
+Tizen-Template-Version: 0.1
+Tizen-Template-Dependency: tizenwebuifw-common-resources
+Tizen-Template-Exclude: META-INF/*;*.template
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-multipage/META-INF/messages.properties b/org.tizen.common.verrari/templates/cli/tizenwebuifw-multipage/META-INF/messages.properties
new file mode 100644 (file)
index 0000000..76336bb
--- /dev/null
@@ -0,0 +1,4 @@
+#Properties file for tizenwebuifw-multipage.jar
+MetaDescriptionContent = HTML meta description [string][optional]
+HtmlTitle = HTML Title [string][optional]
+TizenWebUIFWTheme = Tizen Web UI Framework Theme [tizen-white][optional]
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-multipage/head.template b/org.tizen.common.verrari/templates/cli/tizenwebuifw-multipage/head.template
new file mode 100644 (file)
index 0000000..b3c6047
--- /dev/null
@@ -0,0 +1,28 @@
+<!------------------------------------------------------------------------------------------------
+ Copyright $@{YEAR()} $@{USER()} All rights reserved.
+------------------------------------------------------------------------------------------------->
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8"/>
+    <meta name="description" content="$${MetaDescriptionContent|"Tizen template generated by Tizen Web IDE"}"/>
+
+    <title>$${HtmlTitle|"Title"}</title>
+
+    <!--NOTE:
+    Additional scripts and css files are to be placed here.
+    You can use jQuery namespace($) and all functionalities in jQuery
+    in your script.  For example:
+
+        <script src="main.js"></script>
+        <link rel="stylesheet" href="my.css">
+    -->
+
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/jquery.js"></script>
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"></script>
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" data-framework-theme="$${TizenWebUIFWTheme?default("tizen-white")}"></script>
+    <script type="text/javascript" src="./js/main.js"></script>
+    <link rel="stylesheet" type="text/css" href="./css/style.css"/>
+</head>
+
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-multipage/index.html b/org.tizen.common.verrari/templates/cli/tizenwebuifw-multipage/index.html
new file mode 100644 (file)
index 0000000..1d63a2d
--- /dev/null
@@ -0,0 +1,63 @@
+$$include{"head.template"}
+
+<body>
+
+<!-- Start of first page: #one -->
+<div data-role="page" id="one">
+    <div data-role="header" data-position="fixed">
+        <h1>Multi-Page Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <h2>One</h2>
+        <p>
+            This is a multi-page boilerplate template that you can copy to build
+            your first Tizen Web UI Framework page. This template contains multiple "page"
+            containers inside.
+        </p>
+        <p>
+            You link to internal pages by referring to the ID of the page you
+            want to show. For example, to <a href="#two">link</a> to the page
+            with an ID of "two", my link would have a
+            <code>href="#two"</code>
+            in the code.
+        </p>
+        <h3>Show internal pages:</h3>
+        <p><a href="#two" data-role="button">Show page "two"</a></p>
+        <p><a href="#popup"  data-role="button" data-position-to="window" data-rel="popup">Show page "popup" (as a dialog)</a></p>
+
+        <div id="popup" data-role="popup" data-style="center_title_1btn">
+            <div class="ui-popup-title">
+                <h1>Popup title</h1>
+            </div>
+            <div class="ui-popup-text">Pop-up dialog box, a child window that blocks user interact to the parent windows</div>
+            <a href="#" data-inlie="true" data-role="button" onclick="javascript:$('#popup').popup('close');">Close</a>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page one -->
+
+
+<!-- Start of second page: #two -->
+<div data-role="page" id="two">
+    <div data-role="header" data-position="fixed">
+        <h1>Two</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <h2>Two</h2>
+        <p>I have an id of "two" on my page container. I'm the second
+            page container in this multi-page template.</p>
+        <p><a href="#one" data-direction="reverse" data-role="button">Back to page "one"</a></p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page two -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/META-INF/MANIFEST.MF b/org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..b3deb3b
--- /dev/null
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Tizen-Template-Name: tizenwebuifw-navigation
+Tizen-Template-Description: Tizen Web UI Framework - Navigation
+Tizen-Template-Tags: tizenwebuifw,tizen,navigation
+Tizen-Template-Version: 0.1
+Tizen-Template-Dependency: tizenwebuifw-common-resources
+Tizen-Template-Exclude: META-INF/*;*.template
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/META-INF/messages.properties b/org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/META-INF/messages.properties
new file mode 100644 (file)
index 0000000..de7ce2e
--- /dev/null
@@ -0,0 +1,4 @@
+#Properties file for tizenwebuifw-navigation.jar
+MetaDescriptionContent = HTML meta description [string][optional]
+HtmlTitle = HTML Title [string][optional]
+TizenWebUIFWTheme = Tizen Web UI Framework Theme [tizen-white][optional]
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/head.template b/org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/head.template
new file mode 100644 (file)
index 0000000..b3c6047
--- /dev/null
@@ -0,0 +1,28 @@
+<!------------------------------------------------------------------------------------------------
+ Copyright $@{YEAR()} $@{USER()} All rights reserved.
+------------------------------------------------------------------------------------------------->
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8"/>
+    <meta name="description" content="$${MetaDescriptionContent|"Tizen template generated by Tizen Web IDE"}"/>
+
+    <title>$${HtmlTitle|"Title"}</title>
+
+    <!--NOTE:
+    Additional scripts and css files are to be placed here.
+    You can use jQuery namespace($) and all functionalities in jQuery
+    in your script.  For example:
+
+        <script src="main.js"></script>
+        <link rel="stylesheet" href="my.css">
+    -->
+
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/jquery.js"></script>
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"></script>
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" data-framework-theme="$${TizenWebUIFWTheme?default("tizen-white")}"></script>
+    <script type="text/javascript" src="./js/main.js"></script>
+    <link rel="stylesheet" type="text/css" href="./css/style.css"/>
+</head>
+
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/index.html b/org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/index.html
new file mode 100644 (file)
index 0000000..3f1fc1b
--- /dev/null
@@ -0,0 +1,30 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page">
+    <div data-role="header" data-position="fixed" data-id="foo">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <ul data-role="listview">
+            <li><a class="ui-li-text-main">Classic</a></li>
+            <li><a class="ui-li-text-main">2012 Hit song</a></li>
+            <li><a class="ui-li-text-main">In the gym</a></li>
+            <li><a class="ui-li-text-main">For baby</a></li>
+            <li><a class="ui-li-text-main">My favorite</a></li>
+        </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="foo1">
+        <div data-role="controlgroup" data-type="horizontal">
+            <a data-role="button" href="index.html">Playlist</a>
+            <a data-role="button" href="section1.html">Music</a>
+            <a data-role="button" href="section2.html">Artist</a>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/section1.html b/org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/section1.html
new file mode 100644 (file)
index 0000000..daa55da
--- /dev/null
@@ -0,0 +1,32 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page">
+    <div data-role="header" data-position="fixed" data-id="foo">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <ul data-role="listview">
+            <li><a class="ui-li-text-main" href="index.html">All I Want For Chritsmas Is You</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Baby(Feat.Ludacris)</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Baby I Love You</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Because Of You</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Geek In The Pink</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Hangover (Feat. Flo Rida)</a></li>
+            <li><a class="ui-li-text-main" href="index.html">I'm Yours</a></li>
+        </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="foo1">
+        <div data-role="controlgroup" data-type="horizontal">
+            <a data-role="button" href="index.html">Playlist</a>
+            <a data-role="button" href="section1.html">Music</a>
+            <a data-role="button" href="section2.html">Artist</a>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/section2.html b/org.tizen.common.verrari/templates/cli/tizenwebuifw-navigation/section2.html
new file mode 100644 (file)
index 0000000..a093ad2
--- /dev/null
@@ -0,0 +1,50 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page">
+    <div data-role="header" data-position="fixed" data-id="foo">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <ul data-role="listview">
+            <li data-role="list-divider">A</li>
+            <li><a href="index.html">Adam Lambert</a></li>
+            <li><a href="index.html">Adele</a></li>
+            <li><a href="index.html">Amy Winehouse</a></li>
+
+            <li data-role="list-divider">B</li>
+            <li><a href="index.html">Beyonce</a></li>
+
+            <li data-role="list-divider">C</li>
+            <li><a href="index.html">Chris Brown</a></li>
+
+            <li data-role="list-divider">D</li>
+            <li><a href="index.html">David Guetta</a></li>
+            <li><a href="index.html">Drake</a></li>
+
+            <li data-role="list-divider">E</li>
+            <li><a href="index.html">Ed Sheeran</a></li>
+            <li><a href="index.html">Eric Benet</a></li>
+
+            <li data-role="list-divider">F</li>
+            <li><a href="index.html">Far East Movement</a></li>
+
+            <li data-role="list-divider">H</li>
+            <li><a href="index.html">Hope</a></li>
+            <li><a href="index.html">Hot Chelle Rae</a></li>
+        </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="foo1">
+        <div data-role="controlgroup" data-type="horizontal">
+            <a data-role="button" href="index.html">Playlist</a>
+            <a data-role="button" href="section1.html">Music</a>
+            <a data-role="button" href="section2.html">Artist</a>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-singlepage/META-INF/MANIFEST.MF b/org.tizen.common.verrari/templates/cli/tizenwebuifw-singlepage/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..3233b4d
--- /dev/null
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Tizen-Template-Name: tizenwebuifw-singlepage
+Tizen-Template-Description: Tizen Web UI Framework - Single Page
+Tizen-Template-Tags: tizenwebuifw,tizen,singlepage,single
+Tizen-Template-Version: 0.1
+Tizen-Template-Dependency: tizenwebuifw-common-resources
+Tizen-Template-Exclude: META-INF/*;*.template
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-singlepage/META-INF/messages.properties b/org.tizen.common.verrari/templates/cli/tizenwebuifw-singlepage/META-INF/messages.properties
new file mode 100644 (file)
index 0000000..8f05b0a
--- /dev/null
@@ -0,0 +1,4 @@
+#Properties file for tizenwebuifw-singlepage.jar
+MetaDescriptionContent = HTML meta description [string][optional]
+HtmlTitle = HTML Title [string][optional]
+TizenWebUIFWTheme = Tizen Web UI Framework Theme [tizen-white][optional]
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-singlepage/head.template b/org.tizen.common.verrari/templates/cli/tizenwebuifw-singlepage/head.template
new file mode 100644 (file)
index 0000000..b3c6047
--- /dev/null
@@ -0,0 +1,28 @@
+<!------------------------------------------------------------------------------------------------
+ Copyright $@{YEAR()} $@{USER()} All rights reserved.
+------------------------------------------------------------------------------------------------->
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8"/>
+    <meta name="description" content="$${MetaDescriptionContent|"Tizen template generated by Tizen Web IDE"}"/>
+
+    <title>$${HtmlTitle|"Title"}</title>
+
+    <!--NOTE:
+    Additional scripts and css files are to be placed here.
+    You can use jQuery namespace($) and all functionalities in jQuery
+    in your script.  For example:
+
+        <script src="main.js"></script>
+        <link rel="stylesheet" href="my.css">
+    -->
+
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/jquery.js"></script>
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"></script>
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" data-framework-theme="$${TizenWebUIFWTheme?default("tizen-white")}"></script>
+    <script type="text/javascript" src="./js/main.js"></script>
+    <link rel="stylesheet" type="text/css" href="./css/style.css"/>
+</head>
+
diff --git a/org.tizen.common.verrari/templates/cli/tizenwebuifw-singlepage/index.html b/org.tizen.common.verrari/templates/cli/tizenwebuifw-singlepage/index.html
new file mode 100644 (file)
index 0000000..baa675f
--- /dev/null
@@ -0,0 +1,20 @@
+$$include{"head.template"}
+
+<body>
+
+<div data-role="page">
+    <div data-role="header" data-position="fixed">
+        <h1>Single-Page Application </h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <p>This is a single page boilerplate template that you can copy to build your first Tizen Web UI Framework page.</p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <h4>Footer content</h4>
+    </div><!-- /footer -->
+</div><!-- /page -->
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/engine/config/CONFIGBase b/org.tizen.common.verrari/templates/engine/config/CONFIGBase
new file mode 100644 (file)
index 0000000..ae4dce3
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/$${WidgetID}" version="1.0.0" viewmodes="maximized">
+    <tizen:application id="$@{APPLICATIONID()}" required_version="1.0"/>
+    <content src="$${ContentSRC|"index.html"}"/>
+$$if{TizenWebUIFWProject}
+    <tizen:privilege name="http://tizen.org/privilege/tizen"/>
+    <tizen:privilege name="http://tizen.org/privilege/application.kill"/>
+$$endif
+    <icon src="$${IconSRC|"icon.png"}"/>
+    <name>$${WidgetID}</name>
+</widget>
diff --git a/org.tizen.common.verrari/templates/engine/css/CSSBase b/org.tizen.common.verrari/templates/engine/css/CSSBase
new file mode 100644 (file)
index 0000000..090e31d
--- /dev/null
@@ -0,0 +1,10 @@
+$$if{CSSDescription}
+    $$include{"CSSDescription"}
+$$endif
+
+$$if{CSSTizenBasicBlank}
+    $$include{"CSSTizenBasicBlank"}
+$$else
+body {
+}
+$$endif
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/css/CSSDescription b/org.tizen.common.verrari/templates/engine/css/CSSDescription
new file mode 100644 (file)
index 0000000..b8f586a
--- /dev/null
@@ -0,0 +1 @@
+/* Copyright $@{YEAR()} $@{USER()} All rights reserved. */
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/css/CSSTizenBasicBlank b/org.tizen.common.verrari/templates/engine/css/CSSTizenBasicBlank
new file mode 100644 (file)
index 0000000..cb8727f
--- /dev/null
@@ -0,0 +1,119 @@
+* {
+    font-family: Lucida Sans, Arial, Helvetica, sans-serif;
+}
+
+body {
+    margin: 0px auto;
+}
+
+header h1 {
+    font-size: 36px;
+    margin: 0px;
+}
+
+header h2 {
+    font-size: 18px;
+    margin: 0px;
+    color: #888;
+    font-style: italic;
+}
+
+nav ul {
+    list-style: none;
+    padding: 0px;
+    display: block;
+    clear: right;
+    background-color: #666;
+    padding-left: 4px;
+    height: 24px;
+}
+
+nav ul li {
+    display: inline;
+    padding: 0px 20px 5px 10px;
+    height: 24px;
+    border-right: 1px solid #ccc;
+}
+
+nav ul li a {
+    color: #EFD3D3;
+    text-decoration: none;
+    font-size: 13px;
+    font-weight: bold;
+}
+
+nav ul li a:hover {
+    color: #fff;
+}
+
+article > header h1 {
+    font-size: 20px;
+    margin-left: 14px;
+}
+
+article > header h1 a {
+    color: #993333;
+}
+
+article > header h1 img {
+    vertical-align:middle;
+}
+
+article > section header h1 {
+    font-size: 16px;
+}
+
+article p {
+    clear: both;
+}
+
+article > section video {
+    width: 480px;
+    height: 200px;
+}
+
+article > section div.no-html5-video,
+article > section div#no-canvas {
+    width: 480px;
+    height: 40px;
+    border: 1px solid #993333;
+    text-align: center;
+    color: #993333;
+    font-size: 13px;
+    font-style: italic;
+    background-color: #F7E9E9;
+}
+
+article > section div#no-canvas {
+    display: none;
+}
+
+article > section form {
+    border: 1px solid #888;
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    border-radius: 10px;
+    -moz-box-shadow: 10px 10px 5px #888;
+    -webkit-box-shadow: 10px 10px 5px #888;
+    box-shadow: 10px 10px 5px #888;
+    background-color: #eee;
+    padding: 10px;
+    margin-bottom: 30px;
+}
+
+article > section label {
+    font-weight: bold;
+    font-size: 13px;
+}
+
+article > section input {
+    margin-bottom: 3px;
+    font-size: 13px;
+}
+
+footer p {
+    text-align: center;
+    font-size: 12px;
+    color: #888;
+    margin-top: 24px;
+}
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLBase b/org.tizen.common.verrari/templates/engine/html/HTMLBase
new file mode 100644 (file)
index 0000000..c4a2f34
--- /dev/null
@@ -0,0 +1,80 @@
+$$if{HTMLDescription}
+    $$include{"HTMLDescription"}
+$$endif
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8"/>
+$$if{MetaViewport}
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
+$$endif
+    <meta name="description" content="$${MetaDescriptionContent|"Tizen template generated by Tizen Web IDE"}"/>
+
+    <title>$${HtmlTitle|"Title"}</title>
+
+$$if{TizenWebUIFWProject}
+    <!--NOTE:
+    Additional scripts and css files are to be placed here.
+    You can use jQuery namespace($) and all functionalities in jQuery
+    in your script.  For example:
+
+        <script src="main.js"></script>
+        <link rel="stylesheet" href="my.css">
+    -->
+  $$if{TizenWebUIFWTargetLib}
+    <script type="text/javascript" src="$${TizenWebUIFWJQuery|"/usr/share/tizen-web-ui-fw/latest/js/jquery.js"}\"></script>
+    <script type="text/javascript" src="$${TizenWebUIFWLibs|"/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"}"></script>
+    <script type="text/javascript" src="$${TizenWebUIFWJS|"/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js"}" data-framework-theme="$${TizenWebUIFWTheme?default("tizen-white")}"></script>
+  $$else
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/jquery.js"></script>
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"></script>
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" data-framework-theme="tizen-white"></script>
+  $$endif
+$$elseif{JQMProject}
+    <link rel="stylesheet" href="$${JQMCSS}"/>
+    <script type="text/javascript" src="$${JQuery}"></script>
+    <script type="text/javascript" src="$${JQMJS}"></script>
+$$endif
+    <script type="text/javascript" src="./js/main.js"></script>
+    <link rel="stylesheet" type="text/css" href="./css/style.css"/>
+</head>
+<body>
+$$if{HTMLTizenBasicBlank}
+    $$include{"HTMLTizenBasicBlank"}
+$$elseif{HTMLTizenWebUIFWSinglePage}
+    $$include{"HTMLTizenWebUIFWSinglePage"}
+$$elseif{HTMLTizenWebUIFWMultiPage}
+    $$include{"HTMLTizenWebUIFWMultiPage"}
+$$elseif{HTMLTizenWebUIFWMasterDetailIndex}
+    $$include{"HTMLTizenWebUIFWMasterDetailIndex"}
+$$elseif{HTMLTizenWebUIFWMasterDetailSection1}
+    $$include{"HTMLTizenWebUIFWMasterDetailSection1"}
+$$elseif{HTMLTizenWebUIFWMasterDetailSection2}
+    $$include{"HTMLTizenWebUIFWMasterDetailSection2"}
+$$elseif{HTMLTizenWebUIFWNavigationIndex}
+    $$include{"HTMLTizenWebUIFWNavigationIndex"}
+$$elseif{HTMLTizenWebUIFWNavigationSection1}
+    $$include{"HTMLTizenWebUIFWNavigationSection1"}
+$$elseif{HTMLTizenWebUIFWNavigationSection2}
+    $$include{"HTMLTizenWebUIFWNavigationSection2"}
+$$elseif{HTMLJQMSinglePage}
+    $$include{"HTMLJQMSinglePage"}
+$$elseif{HTMLJQMMultiPage}
+    $$include{"HTMLJQMMultiPage"}
+$$elseif{HTMLJQMMasterDetailIndex}
+    $$include{"HTMLJQMMasterDetailIndex"}
+$$elseif{HTMLJQMMasterDetailSection1}
+    $$include{"HTMLJQMMasterDetailSection1"}
+$$elseif{HTMLJQMMasterDetailSection2}
+    $$include{"HTMLJQMMasterDetailSection2"}
+$$elseif{HTMLJQMNavigationIndex}
+    $$include{"HTMLJQMNavigationIndex"}
+$$elseif{HTMLJQMNavigationSection1}
+    $$include{"HTMLJQMNavigationSection1"}
+$$elseif{HTMLJQMNavigationSection2}
+    $$include{"HTMLJQMNavigationSection2"}
+$$endif
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLDescription b/org.tizen.common.verrari/templates/engine/html/HTMLDescription
new file mode 100644 (file)
index 0000000..7d9adf3
--- /dev/null
@@ -0,0 +1,3 @@
+<!------------------------------------------------------------------------------------------------
+ Copyright $@{YEAR()} $@{USER()} All rights reserved.
+------------------------------------------------------------------------------------------------->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLJQMMasterDetailIndex b/org.tizen.common.verrari/templates/engine/html/HTMLJQMMasterDetailIndex
new file mode 100644 (file)
index 0000000..77d0062
--- /dev/null
@@ -0,0 +1,33 @@
+<div data-role="page" class="type-interior" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Master-Detail Application</h1>
+        <a href="index.html" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <div class="content-primary">
+            <h2>Introduction</h2>
+            <p>This template is for a master-detail structured application.</p>
+            <ul>
+                <li>Left bars to navigate details (master)
+                <li>Right content pane (detail)
+            </ul>
+        </div><!--/content-primary -->
+
+        <div class="content-secondary">
+            <div data-role="collapsible" data-collapsed="true" data-content-theme="$${JQMTheme|'c'}">
+                <h3>More in this section</h3>
+                <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}">
+                    <li data-role="list-divider">Details</li>
+                    <li><a href="index.html">Introduction</a></li>
+                    <li><a href="section1.html">Section 1</a></li>
+                    <li><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" class="footer-docs" data-theme="$${JQMTheme|'a'}" data-position="fixed">
+        <p>&copy; Your Company</p>
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLJQMMasterDetailSection1 b/org.tizen.common.verrari/templates/engine/html/HTMLJQMMasterDetailSection1
new file mode 100644 (file)
index 0000000..42e7b44
--- /dev/null
@@ -0,0 +1,30 @@
+<div data-role="page" class="type-interior" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Master-Detail Application</h1>
+        <a href="index.html" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <div class="content-primary">
+            <h2>Section 1</h2>
+
+            <p>This is Section 1.</p>
+        </div><!--/content-primary -->
+
+        <div class="content-secondary">
+            <div data-role="collapsible" data-collapsed="true" data-content-theme="$${JQMTheme|'c'}">
+                <h3>More in this section</h3>
+                <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}">
+                    <li data-role="list-divider">Details</li>
+                    <li><a href="index.html">Introduction</a></li>
+                    <li><a href="section1.html">Section 1</a></li>
+                    <li><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" class="footer-docs" data-theme="$${JQMTheme|'a'}" data-position="fixed">
+        <p></p>
+    </div>
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLJQMMasterDetailSection2 b/org.tizen.common.verrari/templates/engine/html/HTMLJQMMasterDetailSection2
new file mode 100644 (file)
index 0000000..aec3ea7
--- /dev/null
@@ -0,0 +1,30 @@
+<div data-role="page" class="type-interior" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Master-Detail Application</h1>
+        <a href="index.html" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <div class="content-primary">
+            <h2>Section 2</h2>
+
+            <p>This is Section 2.</p>
+        </div><!--/content-primary -->
+
+        <div class="content-secondary">
+            <div data-role="collapsible" data-collapsed="true" data-content-theme="$${JQMTheme|'c'}">
+                <h3>More in this section</h3>
+                <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}">
+                    <li data-role="list-divider">Details</li>
+                    <li><a href="index.html">Introduction</a></li>
+                    <li><a href="section1.html">Section 1</a></li>
+                    <li><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" class="footer-docs" data-theme="$${JQMTheme|'a'}" data-position="fixed">
+        <p></p>
+    </div>
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLJQMMultiPage b/org.tizen.common.verrari/templates/engine/html/HTMLJQMMultiPage
new file mode 100644 (file)
index 0000000..93f8068
--- /dev/null
@@ -0,0 +1,93 @@
+<!-- Start of first page: #one -->
+<div data-role="page" id="one" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Multi-Page Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <h2>One</h2>
+        <p>
+            This is a multi-page boilerplate template that you can copy to build
+            your first jQuery Mobile page. This template contains multiple "page"
+            containers inside.
+        </p>
+        <p>
+            You link to internal pages by referring to the ID of the page you
+            want to show. For example, to <a href="#two">link</a> to the page
+            with an ID of "two", my link would have a
+            <code>href="#two"</code>
+            in the code.
+        </p>
+
+        <h3>Show internal pages:</h3>
+        <p>
+            <a href="#two" data-role="button">Show page "two"</a>
+        </p>
+        <p>
+            <a href="#popup" data-role="button" data-rel="dialog"
+                data-transition="pop">Show page "popup" (as a dialog)</a>
+        </p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page one -->
+
+
+<!-- Start of second page: #two -->
+<div data-role="page" id="two" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Two</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <h2>Two</h2>
+        <p>I have an id of "two" on my page container. I'm the second
+            page container in this multi-page template.</p>
+        <p>
+            Notice that the theme is different for this page because we've added
+            a few
+            <code>data-theme</code>
+            swatch assigments here to show off how flexible it is. You can add
+            any content or widget to these pages, but we're keeping these
+            simple.
+        </p>
+        <p>
+            <a href="#one" data-direction="reverse" data-role="button">Back to page "one"</a>
+        </p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page two -->
+
+
+<!-- Start of third page: #popup -->
+<div data-role="page" id="popup" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Dialog</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <h2>Popup</h2>
+        <p>
+            I have an id of "popup" on my page container and only look like a
+            dialog because the link to me had a
+            <code>data-rel="dialog"</code>
+            attribute which gives me this inset look and a
+            <code>data-transition="pop"</code>
+            attribute to change the transition to pop. Without this, I'd be
+            styled as a normal page.
+        </p>
+        <p>
+            <a href="#one" data-rel="back" data-role="button" data-inline="true"
+                data-icon="back">Back to page "one"</a>
+        </p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page popup -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLJQMNavigationIndex b/org.tizen.common.verrari/templates/engine/html/HTMLJQMNavigationIndex
new file mode 100644 (file)
index 0000000..f5f9581
--- /dev/null
@@ -0,0 +1,25 @@
+<div data-role="page" id="foo" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}" style="margin-top: 0;">
+                    <li><a href="index.html">Classic</a></li>
+                    <li><a href="index.html">2011 Hit song</a></li>
+                    <li><a href="index.html">In the gym</a></li>
+                    <li><a href="index.html">For baby</a></li>
+                    <li><a href="index.html">My favorite </a></li>
+                </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="fool" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <div data-role="navbar">
+            <ul>
+                <li><a href="index.html" class="ui-btn-active">Play List</a></li>
+                <li><a href="section1.html">Music</a></li>
+                <li><a href="section2.html">Artist</a></li>
+            </ul>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLJQMNavigationSection1 b/org.tizen.common.verrari/templates/engine/html/HTMLJQMNavigationSection1
new file mode 100644 (file)
index 0000000..7d933af
--- /dev/null
@@ -0,0 +1,27 @@
+<div data-role="page" id="foo" data-position="fixed" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}" style="margin-top: 0;">
+                    <li><a href="index.html">All I Want For Chritsmas Is You</a></li>
+                    <li><a href="index.html">Baby(Feat.Ludacris)</a></li>
+                    <li><a href="index.html">Baby I Love You</a></li>
+                    <li><a href="index.html">Because Of You</a></li>
+                    <li><a href="index.html">Geek In The Pink</a></li>
+                    <li><a href="index.html">Hangover (Feat. Flo Rida)</a></li>
+                    <li><a href="index.html">I'm Yours</a></li>
+                </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="fool" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <div data-role="navbar">
+            <ul>
+                <li><a href="index.html" >Play List</a></li>
+                <li><a href="section1.html"  class="ui-btn-active">Music</a></li>
+                <li><a href="section2.html">Artist</a></li>
+            </ul>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLJQMNavigationSection2 b/org.tizen.common.verrari/templates/engine/html/HTMLJQMNavigationSection2
new file mode 100644 (file)
index 0000000..2ff3cdc
--- /dev/null
@@ -0,0 +1,45 @@
+<div data-role="page" id="foo" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}" style="margin-top: 0;">
+                    <li data-role="list-divider">A</li>
+                    <li><a href="index.html">Adam Lambert</a></li>
+                    <li><a href="index.html">Adele</a></li>
+                    <li><a href="index.html">Amy Winehouse</a></li>
+
+                    <li data-role="list-divider">B</li>
+                    <li><a href="index.html">Beyonce</a></li>
+
+                    <li data-role="list-divider">C</li>
+                    <li><a href="index.html">Chris Brown</a></li>
+
+                    <li data-role="list-divider">D</li>
+                    <li><a href="index.html">David Guetta</a></li>
+                    <li><a href="index.html">Drake</a></li>
+
+                    <li data-role="list-divider">E</li>
+                    <li><a href="index.html">Ed Sheeran</a></li>
+                    <li><a href="index.html">Eric Benet</a></li>
+
+                    <li data-role="list-divider">F</li>
+                    <li><a href="index.html">Far East Movement</a></li>
+
+                    <li data-role="list-divider">H</li>
+                    <li><a href="index.html">Hope</a></li>
+                    <li><a href="index.html">Hot Chelle Rae</a></li>
+                </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="fool" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <div data-role="navbar">
+            <ul>
+                <li><a href="index.html" >Play List</a></li>
+                <li><a href="section1.html">Music</a></li>
+                <li><a href="section2.html" class="ui-btn-active">Artist</a></li>
+            </ul>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLJQMSinglePage b/org.tizen.common.verrari/templates/engine/html/HTMLJQMSinglePage
new file mode 100644 (file)
index 0000000..cbacab6
--- /dev/null
@@ -0,0 +1,14 @@
+<div data-role="page" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Single-Page Application </h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <p>This is a single page boilerplate template that you can copy to build your first jQuery Mobile page.</p>
+            <canvas width="" height="300"></canvas>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h4>Footer content</h4>
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLTizenBasicBlank b/org.tizen.common.verrari/templates/engine/html/HTMLTizenBasicBlank
new file mode 100644 (file)
index 0000000..ddddff8
--- /dev/null
@@ -0,0 +1,39 @@
+<header>
+  <hgroup>
+    <h1>Tizen App</h1>
+    <h2>An empty template of Tizen</h2>
+  </hgroup>
+</header>
+
+<nav>
+  <ul>
+     <li><a href="#">Home</a></li>
+     <li><a href="#">About Us</a></li>
+     <li><a href="#">Contact Us</a></li>
+  </ul>
+</nav>
+
+<article>
+  <header>
+    <h1>
+      <img src="images/tizen_32.png" /> Application Name
+    </h1>
+  </header>
+  <p>This is an empty template of Tizen Web Application. Tizen will support multiple device categories:
+    <ul>
+      <li>smartphones, tablets and smart TVs
+      <li>netbooks, in-vehicle infotainment devices
+    </ul>
+  </p>
+  <section>
+    <p>This is a basic section of a document.</p>
+    <p>The following button displays a time using JavaScript.</p>
+    <div id="divbutton1">
+      <button onclick="startTime();">Clock</button>
+    </div>
+  </section>
+</article>
+
+<footer>
+  <p>&copy; 2012 Company Name. All rights reserved.</p>
+</footer>
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWMasterDetailIndex b/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWMasterDetailIndex
new file mode 100644 (file)
index 0000000..bebe950
--- /dev/null
@@ -0,0 +1,35 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed">
+        <h1>Master-Detail Application</h1>
+        <a id="opt_text" data-icon="optiontray"></a>
+        <div data-role="controlbar">
+            <ul>
+            <li><a href="index.html" class="ui-btn-active">Introduction</a></li>
+            <li><a href="section1.html">Section 1</a></li>
+            <li><a href="section2.html">Section 2</a></li>
+            </ul>
+        </div>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <div >
+            <h2>Introduction</h2>
+            <p>This template is for a master-detail structured application.</p>
+        </div>
+        <div>
+            <div data-role="collapsible" data-collapsed="true">
+                <h3>More in this section</h3>
+                <ul data-role="listview" >
+                    <li class="ui-li-1line ui-li-dialogue" data-expandable="true" id="section" data-initial-expansion="true">Details</li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="index.html">Introduction</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section1.html">Section 1</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <p>&nbsp&nbsp&copy; Your Company</p>
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWMasterDetailSection1 b/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWMasterDetailSection1
new file mode 100644 (file)
index 0000000..dc4a574
--- /dev/null
@@ -0,0 +1,32 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed">
+        <h1>Master-Detail Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <div data-role="controlgroup" data-type="horizontal">
+            <a data-role="button">Button 1</a>
+            <a data-role="button">Button 2</a>
+            <a data-role="button">Button 3</a>
+        </div>
+        <div>
+            <h2>Section 1</h2>
+            <p>This is Secion 1.</p>
+        </div>
+        <div>
+            <div data-role="collapsible" data-collapsed="true">
+                <h3>More in this section</h3>
+                <ul data-role="listview">
+                    <li class="ui-li-1line ui-li-dialogue" data-expandable="true" id="section" data-initial-expansion="true">Details</li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="index.html">Introduction</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section1.html">Section 1</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <p></p>
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWMasterDetailSection2 b/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWMasterDetailSection2
new file mode 100644 (file)
index 0000000..4a618ef
--- /dev/null
@@ -0,0 +1,36 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed">
+        <h1>Master-Detail Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <div>
+            <h2>Section 2</h2>
+            <p>This is Secion 2.</p>
+        </div>
+        <div>
+            <div data-role="collapsible" data-collapsed="true">
+                <h3>More in this section</h3>
+                <ul data-role="listview">
+                    <li class="ui-li-1line ui-li-dialogue" data-expandable="true" id="section" data-initial-expansion="true">Details</li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="index.html">Introduction</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section1.html">Section 1</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+<!--
+            <div data-role="fieldcontain">
+                <fieldset data-role="controlgroup" data-type="horizontal">
+                    <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment1" value="on" checked="checked" />
+                    <label for="segment1">Button1</label>
+                    <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment2" value="off" />
+                    <label for="segment2">Button2</label>
+                </fieldset>
+            </div>
+-->
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWMultiPage b/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWMultiPage
new file mode 100644 (file)
index 0000000..126b616
--- /dev/null
@@ -0,0 +1,56 @@
+<!-- Start of first page: #one -->
+<div data-role="page" id="one">
+    <div data-role="header" data-position="fixed">
+        <h1>Multi-Page Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <h2>One</h2>
+        <p>
+            This is a multi-page boilerplate template that you can copy to build
+            your first Tizen Web UI Framework page. This template contains multiple "page"
+            containers inside.
+        </p>
+        <p>
+            You link to internal pages by referring to the ID of the page you
+            want to show. For example, to <a href="#two">link</a> to the page
+            with an ID of "two", my link would have a
+            <code>href="#two"</code>
+            in the code.
+        </p>
+        <h3>Show internal pages:</h3>
+        <p><a href="#two" data-role="button">Show page "two"</a></p>
+        <p><a href="#popup"  data-role="button" data-position-to="window" data-rel="popup">Show page "popup" (as a dialog)</a></p>
+
+        <div id="popup" data-role="popup" data-style="center_title_1btn">
+            <div class="ui-popup-title">
+                <h1>Popup title</h1>
+            </div>
+            <div class="ui-popup-text">Pop-up dialog box, a child window that blocks user interact to the parent windows</div>
+            <a href="#" data-inlie="true" data-role="button" onclick="javascript:$('#popup').popup('close');">Close</a>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page one -->
+
+
+<!-- Start of second page: #two -->
+<div data-role="page" id="two">
+    <div data-role="header" data-position="fixed">
+        <h1>Two</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <h2>Two</h2>
+        <p>I have an id of "two" on my page container. I'm the second
+            page container in this multi-page template.</p>
+        <p><a href="#one" data-direction="reverse" data-role="button">Back to page "one"</a></p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page two -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWNavigationIndex b/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWNavigationIndex
new file mode 100644 (file)
index 0000000..889114f
--- /dev/null
@@ -0,0 +1,23 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed" data-id="foo">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <ul data-role="listview">
+            <li><a class="ui-li-text-main">Classic</a></li>
+            <li><a class="ui-li-text-main">2012 Hit song</a></li>
+            <li><a class="ui-li-text-main">In the gym</a></li>
+            <li><a class="ui-li-text-main">For baby</a></li>
+            <li><a class="ui-li-text-main">My favorite</a></li>
+        </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="foo1">
+        <div data-role="controlgroup" data-type="horizontal">
+            <a data-role="button" href="index.html">Playlist</a>
+            <a data-role="button" href="section1.html">Music</a>
+            <a data-role="button" href="section2.html">Artist</a>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWNavigationSection1 b/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWNavigationSection1
new file mode 100644 (file)
index 0000000..c37e92a
--- /dev/null
@@ -0,0 +1,25 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed" data-id="foo">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <ul data-role="listview">
+            <li><a class="ui-li-text-main" href="index.html">All I Want For Chritsmas Is You</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Baby(Feat.Ludacris)</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Baby I Love You</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Because Of You</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Geek In The Pink</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Hangover (Feat. Flo Rida)</a></li>
+            <li><a class="ui-li-text-main" href="index.html">I'm Yours</a></li>
+        </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="foo1">
+        <div data-role="controlgroup" data-type="horizontal">
+            <a data-role="button" href="index.html">Playlist</a>
+            <a data-role="button" href="section1.html">Music</a>
+            <a data-role="button" href="section2.html">Artist</a>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWNavigationSection2 b/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWNavigationSection2
new file mode 100644 (file)
index 0000000..e602ffe
--- /dev/null
@@ -0,0 +1,43 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed" data-id="foo">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <ul data-role="listview">
+            <li data-role="list-divider">A</li>
+            <li><a href="index.html">Adam Lambert</a></li>
+            <li><a href="index.html">Adele</a></li>
+            <li><a href="index.html">Amy Winehouse</a></li>
+
+            <li data-role="list-divider">B</li>
+            <li><a href="index.html">Beyonce</a></li>
+
+            <li data-role="list-divider">C</li>
+            <li><a href="index.html">Chris Brown</a></li>
+
+            <li data-role="list-divider">D</li>
+            <li><a href="index.html">David Guetta</a></li>
+            <li><a href="index.html">Drake</a></li>
+
+            <li data-role="list-divider">E</li>
+            <li><a href="index.html">Ed Sheeran</a></li>
+            <li><a href="index.html">Eric Benet</a></li>
+
+            <li data-role="list-divider">F</li>
+            <li><a href="index.html">Far East Movement</a></li>
+
+            <li data-role="list-divider">H</li>
+            <li><a href="index.html">Hope</a></li>
+            <li><a href="index.html">Hot Chelle Rae</a></li>
+        </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="foo1">
+        <div data-role="controlgroup" data-type="horizontal">
+            <a data-role="button" href="index.html">Playlist</a>
+            <a data-role="button" href="section1.html">Music</a>
+            <a data-role="button" href="section2.html">Artist</a>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWSinglePage b/org.tizen.common.verrari/templates/engine/html/HTMLTizenWebUIFWSinglePage
new file mode 100644 (file)
index 0000000..080e29c
--- /dev/null
@@ -0,0 +1,13 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed">
+        <h1>Single-Page Application </h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <p>This is a single page boilerplate template that you can copy to build your first Tizen Web UI Framework page.</p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <h4>Footer content</h4>
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/js/JSBase b/org.tizen.common.verrari/templates/engine/js/JSBase
new file mode 100644 (file)
index 0000000..ec9c993
--- /dev/null
@@ -0,0 +1,19 @@
+$$if{JSDescription}
+    $$include{"JSDescription"}
+$$endif
+
+$$if{JSTizenBasicBlank}
+    $$include{"JSTizenBasicBlank"}
+$$elseif{JSJQM}
+    $$include{"JSJQM"}
+$$elseif{JSTizenWebUIFW}
+    $$include{"JSTizenWebUIFW"}
+$$else
+//Initialize function
+var init = function () {
+    // TODO:: Do your initialization job
+    console.log("init() called");
+};
+// window.onload can work without <body onload="">
+window.onload = init;
+$$endif
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/js/JSDescription b/org.tizen.common.verrari/templates/engine/js/JSDescription
new file mode 100644 (file)
index 0000000..9a61796
--- /dev/null
@@ -0,0 +1,3 @@
+/*
+ * Copyright $@{YEAR()} $@{USER()} All rights reserved.
+ */
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/js/JSJQM b/org.tizen.common.verrari/templates/engine/js/JSJQM
new file mode 100644 (file)
index 0000000..40f9755
--- /dev/null
@@ -0,0 +1,6 @@
+//Initialize function
+var init = function () {
+    // TODO:: Do your initialization job
+    console.log("init() called");
+};
+$(document).bind('pageinit', init);
diff --git a/org.tizen.common.verrari/templates/engine/js/JSTizenBasicBlank b/org.tizen.common.verrari/templates/engine/js/JSTizenBasicBlank
new file mode 100644 (file)
index 0000000..31dd9ec
--- /dev/null
@@ -0,0 +1,29 @@
+var startTime;
+var checkTime;
+
+//Initialize function
+var init = function () {
+    // TODO:: Do your initialization job
+    console.log("init() called");
+};
+// window.onload can work without <body onload="">
+window.onload = init;
+
+function startTime() {
+    var today = new Date();
+    var h = today.getHours();
+
+    var m = today.getMinutes();
+    var s = today.getSeconds();
+    m = checkTime(m);
+    s = checkTime(s);
+    document.getElementById('divbutton1').innerHTML="Current time: " + h + ":" + m + ":" + s;
+    t = setTimeout(startTime, 250);
+}
+
+function checkTime(i) {
+    if (i < 10) {
+        i="0" + i;
+    }
+    return i;
+}
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/engine/js/JSTizenWebUIFW b/org.tizen.common.verrari/templates/engine/js/JSTizenWebUIFW
new file mode 100644 (file)
index 0000000..5b77420
--- /dev/null
@@ -0,0 +1,10 @@
+//Initialize function
+var init = function () {
+    $('div[data-role="page"]:first .ui-btn-back').bind("click", function(event) {
+        var currentApp = tizen.application.getCurrentApplication();
+        currentApp.exit();
+    });
+    // TODO:: Do your initialization job
+    console.log("init() called");
+};
+$(document).bind('pageinit', init);
\ No newline at end of file
diff --git a/org.tizen.common.verrari/templates/jar/common-resources.jar b/org.tizen.common.verrari/templates/jar/common-resources.jar
new file mode 100644 (file)
index 0000000..c4b75bc
Binary files /dev/null and b/org.tizen.common.verrari/templates/jar/common-resources.jar differ
diff --git a/org.tizen.common.verrari/templates/jar/jqm-common-resources.jar b/org.tizen.common.verrari/templates/jar/jqm-common-resources.jar
new file mode 100644 (file)
index 0000000..e5b3272
Binary files /dev/null and b/org.tizen.common.verrari/templates/jar/jqm-common-resources.jar differ
diff --git a/org.tizen.common.verrari/templates/jar/jqm-masterdetail.jar b/org.tizen.common.verrari/templates/jar/jqm-masterdetail.jar
new file mode 100644 (file)
index 0000000..d742920
Binary files /dev/null and b/org.tizen.common.verrari/templates/jar/jqm-masterdetail.jar differ
diff --git a/org.tizen.common.verrari/templates/jar/jqm-multipage.jar b/org.tizen.common.verrari/templates/jar/jqm-multipage.jar
new file mode 100644 (file)
index 0000000..8610480
Binary files /dev/null and b/org.tizen.common.verrari/templates/jar/jqm-multipage.jar differ
diff --git a/org.tizen.common.verrari/templates/jar/jqm-navigation.jar b/org.tizen.common.verrari/templates/jar/jqm-navigation.jar
new file mode 100644 (file)
index 0000000..e213a0f
Binary files /dev/null and b/org.tizen.common.verrari/templates/jar/jqm-navigation.jar differ
diff --git a/org.tizen.common.verrari/templates/jar/jqm-singlepage.jar b/org.tizen.common.verrari/templates/jar/jqm-singlepage.jar
new file mode 100644 (file)
index 0000000..6ca4098
Binary files /dev/null and b/org.tizen.common.verrari/templates/jar/jqm-singlepage.jar differ
diff --git a/org.tizen.common.verrari/templates/jar/tizen-basic.jar b/org.tizen.common.verrari/templates/jar/tizen-basic.jar
new file mode 100644 (file)
index 0000000..e065a65
Binary files /dev/null and b/org.tizen.common.verrari/templates/jar/tizen-basic.jar differ
diff --git a/org.tizen.common.verrari/templates/jar/tizenwebuifw-common-resources.jar b/org.tizen.common.verrari/templates/jar/tizenwebuifw-common-resources.jar
new file mode 100644 (file)
index 0000000..d36c4d4
Binary files /dev/null and b/org.tizen.common.verrari/templates/jar/tizenwebuifw-common-resources.jar differ
diff --git a/org.tizen.common.verrari/templates/jar/tizenwebuifw-masterdetail.jar b/org.tizen.common.verrari/templates/jar/tizenwebuifw-masterdetail.jar
new file mode 100644 (file)
index 0000000..5eaa5dc
Binary files /dev/null and b/org.tizen.common.verrari/templates/jar/tizenwebuifw-masterdetail.jar differ
diff --git a/org.tizen.common.verrari/templates/jar/tizenwebuifw-multipage.jar b/org.tizen.common.verrari/templates/jar/tizenwebuifw-multipage.jar
new file mode 100644 (file)
index 0000000..6811753
Binary files /dev/null and b/org.tizen.common.verrari/templates/jar/tizenwebuifw-multipage.jar differ
diff --git a/org.tizen.common.verrari/templates/jar/tizenwebuifw-navigation.jar b/org.tizen.common.verrari/templates/jar/tizenwebuifw-navigation.jar
new file mode 100644 (file)
index 0000000..b7ed0e6
Binary files /dev/null and b/org.tizen.common.verrari/templates/jar/tizenwebuifw-navigation.jar differ
diff --git a/org.tizen.common.verrari/templates/jar/tizenwebuifw-singlepage.jar b/org.tizen.common.verrari/templates/jar/tizenwebuifw-singlepage.jar
new file mode 100644 (file)
index 0000000..09d55cf
Binary files /dev/null and b/org.tizen.common.verrari/templates/jar/tizenwebuifw-singlepage.jar differ
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/TemplateEngineFactoryTest.java b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/TemplateEngineFactoryTest.java
new file mode 100755 (executable)
index 0000000..66280c5
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.engine;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Test;
+import org.tizen.common.Factory;
+import org.tizen.common.verrari.ITemplateEngine;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateEngine;
+import org.tizen.common.verrari.engine.jsoup.JsoupTemplateEngine;
+
+/**
+ * TemplateEngineFactoryTest.
+ *
+ * Test case for {@link TemplateEngineFactory}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see TemplateEngineFactory
+ *
+ */
+public class TemplateEngineFactoryTest {
+
+    /**
+     * Test {@link TemplateEngineFactory#getInstance()}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see TemplateEngineFactory#getInstance()
+     */
+    @Test
+    public void test_getInstance() throws Exception {
+        Factory<ITemplateEngine> engineFactory = TemplateEngineFactory.getInstance();
+        assertNotNull(engineFactory);
+    }
+
+    /**
+     * Test {@link TemplateEngineFactory#create()}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see TemplateEngineFactory#create()
+     */
+    @Test
+    public void test_create() throws Exception {
+        ITemplateEngine engine = TemplateEngineFactory.getInstance().create();
+        assertNotNull(engine);
+    }
+
+    /**
+     * Test {@link TemplateEngineFactory#create(Class)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see TemplateEngineFactory#create(Class)
+     */
+    @Test
+    public void test_create2() throws Exception {
+        TemplateEngineFactory factory = new TemplateEngineFactory();
+        assertNull(factory.create(null));
+        assertNotNull(factory.create(FreemarkerTemplateEngine.class));
+        assertNotNull(factory.create(JsoupTemplateEngine.class));
+    }
+
+}
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateEngineTest.java b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateEngineTest.java
new file mode 100755 (executable)
index 0000000..1612b0c
--- /dev/null
@@ -0,0 +1,158 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.engine.freemarker;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+
+import org.junit.Test;
+import org.tizen.common.config.Preference;
+import org.tizen.common.config.provider.PropertiesProvider;
+import org.tizen.common.verrari.model.ModelManager;
+import org.tizen.common.verrari.template.ClasspathResourceTemplate;
+import org.tizen.common.verrari.template.InMemoryTemplate;
+import org.tizen.common.verrari.template.TemplateManager;
+import org.tizen.common.verrari.util.BufferFactory;
+
+/**
+ * FreemarkerTemplateEngineTest.
+ *
+ * Test case for {@link FreemarkerTemplateEngine}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see FreemarkerTemplateEngine
+ *
+ */
+public class FreemarkerTemplateEngineTest {
+
+    public String head = 
+            "<#if TizenWebUIFW_Default?exists>" + "\n" +
+            "    <script src=\"tizen-web-ui-fw/latest/js/jquery.js\"></script>" + "\n" +
+            "    <script src=\"tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js\"></script>" + "\n" +
+            "    <script src=\"tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js\" data-framework-theme=\"tizen-gray\" data-framework-viewport-scale=\"false\"></script>" + "\n" +
+            "<#elseif TizenWebUIFW_PATH?exists>" + "\n" +
+            "    <script src=\"${TizenWebUIFW_JQuery?default(\"/usr/share/tizen-web-ui-fw/latest/js/jquery.js\")}\"></script>" + "\n" +
+            "    <script src=\"${TizenWebUIFW_Libs?default(\"/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js\")}\"></script>" + "\n" +
+            "    <script src=\"${TizenWebUIFW_JS?default(\"/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js\")}\" data-framework-theme=\"${theme?default(\"tizen-gray\")}\" data-framework-viewport-scale=\"${scale?default(\"false\")}\"></script>" + "\n" +
+            "</#if>";
+
+    /**
+     * Test {@link FreemarkerTemplateEngine#generate(TargetUnit unit)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see FreemarkerTemplateEngine#generate(TargetUnit unit)
+     */
+    @Test
+    public void test_generate() throws Exception {
+        FreemarkerTemplateEngine engine = new FreemarkerTemplateEngine();
+        final TemplateManager templateProvider = new TemplateManager();
+        engine.setTemplateProvider( templateProvider );
+
+        PropertiesProvider provider = new PropertiesProvider();
+        provider.set( "description_date", "2012");
+        provider.set( "description_author", "changhyun1.lee@samsung.com");
+        Preference.register( "test", provider );
+
+        templateProvider.addTemplate( "description.ftl", new ClasspathResourceTemplate( "org/tizen/common/verrari/engine/freemarker/description.ftl", getClass() ) );
+        templateProvider.addTemplate( "test_html_body.ftl", new ClasspathResourceTemplate( "org/tizen/common/verrari/engine/freemarker/test_html_body.ftl", getClass() ) );
+        templateProvider.addTemplate( "testHtmlTemplate", new ClasspathResourceTemplate( "org/tizen/common/verrari/engine/freemarker/test_html.ftl", getClass() ) );
+
+        {
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel( "index_html_title", "Tizen Empty" );
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate( "testHtmlTemplate", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue( 0 < result.length() );
+            assertTrue( result.contains( "changhyun1.lee@samsung.com" ) );
+            assertTrue( result.contains( "Tizen Empty" ) );
+            assertFalse( result.contains( "<script src=\"main.js\"></script>" ) );
+        }
+
+        {
+            final ModelManager modelManager = new ModelManager();
+
+            modelManager.addModel("index_html_title", "Tizen Web UI FW - Single");
+            modelManager.addModel("TizenWebUIFW_Enable", "");
+            modelManager.addModel("head_script_tizenwebuifw", head);
+            modelManager.addModel("test_html_body_tizenwebuifw_single", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate( "testHtmlTemplate", modelManager, byteOut );
+            templateProvider.addTemplate( "regenHtmlTemplate", new InMemoryTemplate( byteOut.toByteArray(), "utf-8", BufferFactory.getInstance() ) );
+            final String result = byteOut.toString();
+            assertTrue( 0 < result.length() );
+            assertTrue( result.contains( "changhyun1.lee@samsung.com" ) );
+            assertTrue( result.contains( "Tizen Web UI FW - Single" ) );
+            assertTrue( result.contains( "TizenWebUIFW_Default" ) );
+            assertTrue( result.contains( "TizenWebUIFW_PATH" ) );
+            assertTrue( result.contains( "This is a single page boilerplate template" ) );
+            assertTrue( result.contains( "<script src=\"main.js\"></script>" ) );
+        }
+
+        {
+            final ModelManager modelManager = new ModelManager();
+
+            modelManager.addModel("index_html_title", "Tizen Web UI FW - Multi");
+            modelManager.addModel("TizenWebUIFW_Enable", "");
+            modelManager.addModel("head_script_tizenwebuifw", head);
+            modelManager.addModel("test_html_body_tizenwebuifw_multi", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate( "testHtmlTemplate", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue( 0 < result.length() );
+            assertTrue( result.contains( "changhyun1.lee@samsung.com" ) );
+            assertTrue( result.contains( "Tizen Web UI FW - Multi" ) );
+            assertTrue( result.contains( "TizenWebUIFW_Default" ) );
+            assertTrue( result.contains( "This is a multi-page boilerplate template" ) );
+            assertTrue( result.contains( "<script src=\"main.js\"></script>" ) );
+        }
+
+        {
+            final ModelManager modelManager = new ModelManager();
+
+            modelManager.addModel("TizenWebUIFW_PATH", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate( "regenHtmlTemplate", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue( 0 < result.length() );
+            assertTrue( result.contains( "changhyun1.lee@samsung.com" ) );
+            assertTrue( result.contains( "Tizen Web UI FW - Single" ) );
+            assertFalse( result.contains( "TizenWebUIFW_PATH" ) );
+            assertTrue( result.contains( "This is a single page boilerplate template" ) );
+            assertTrue( result.contains( "<script src=\"main.js\"></script>" ) );
+            
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateTransformerTest.java b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/FreemarkerTemplateTransformerTest.java
new file mode 100644 (file)
index 0000000..66ad0bb
--- /dev/null
@@ -0,0 +1,150 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.engine.freemarker;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+/**
+ * FreemarkerTemplateTransformerTest.
+ *
+ * Test case for {@link TemplateTransformer}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see FreemarkerTemplateTransformer
+ *
+ */
+public class FreemarkerTemplateTransformerTest {
+
+    public static final String source =
+            "This is test case. \n" +
+            "$$include{\"HTMLDescription\"} \n" +
+            "$# this line is comment. \n" +
+            "$# this line is comment. \n" +
+            "$${test1}  $${test2|'title'}  $${test3} \n" +
+            "$${test4}  $${test5}  $# $${test6} \n" +
+            "$$if{key1} \n" +
+            "$$elseif{key2} \n" +
+            "$$else  \n" +
+            "$$endif \n" +
+            "$@{function()} \n";
+
+    /**
+     * Test {@link FreemarkerTemplateTransformer#translateTransform(String contents)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see FreemarkerTemplateTransformer#translateTransform(String contents)
+     */
+    @Test
+    public void test_translateTransform() throws Exception {
+        FreemarkerTemplateTransformer transfer = new FreemarkerTemplateTransformer();
+        String result = transfer.templateTranslate(source);
+        assertFalse(result.contains("$${"));
+        assertTrue(result.contains("${"));
+    }
+
+    /**
+     * Test {@link FreemarkerTemplateTransformer#translateFunction(String contents)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see FreemarkerTemplateTransformer#translateFunction(String contents)
+     */
+    @Test
+    public void test_translateFunction() throws Exception {
+        FreemarkerTemplateTransformer transfer = new FreemarkerTemplateTransformer();
+        String result = transfer.translateFunction(source);
+        assertFalse(result.contains("$@{function()}"));
+        assertTrue(result.contains("${function()}"));
+    }
+
+    /**
+     * Test {@link FreemarkerTemplateTransformer#translateInclude(String contents)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see FreemarkerTemplateTransformer#translateInclude(String contents)
+     */
+    @Test
+    public void test_translateInclude() throws Exception {
+        FreemarkerTemplateTransformer transfer = new FreemarkerTemplateTransformer();
+        String result = transfer.translateInclude(source);
+        assertFalse(result.contains("$$include"));
+        assertTrue(result.contains("<#include"));
+    }
+
+    /**
+     * Test {@link FreemarkerTemplateTransformer#translateIf(String contents)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see FreemarkerTemplateTransformer#translateIf(String contents)
+     */
+    @Test
+    public void test_translateIf() throws Exception {
+        FreemarkerTemplateTransformer transfer = new FreemarkerTemplateTransformer();
+        String result = transfer.translateIf(source);
+        assertFalse(result.contains("$$if"));
+        assertFalse(result.contains("$$elseif"));
+        assertFalse(result.contains("$$else"));
+        assertFalse(result.contains("$$endif"));
+        assertTrue(result.contains("<#if"));
+        assertTrue(result.contains("<#elseif"));
+        assertTrue(result.contains("<#else>"));
+        assertTrue(result.contains("</#if>"));
+    }
+
+    /**
+     * Test {@link TemplateTransformer#templateTranslate(String contents)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see TemplateTransformer#templateTranslate(String contents)
+     */
+    @Test
+    public void test_templateTranslate() throws Exception {
+        FreemarkerTemplateTransformer transfer = new FreemarkerTemplateTransformer();
+        String result = transfer.templateTranslate(source);
+        assertFalse(result.contains("$${"));
+        assertTrue(result.contains("${"));
+        assertFalse(result.contains("$$include"));
+        assertTrue(result.contains("<#include"));
+        assertFalse(result.contains("$$if"));
+        assertFalse(result.contains("$$elseif"));
+        assertFalse(result.contains("$$else"));
+        assertFalse(result.contains("$$endif"));
+        assertTrue(result.contains("<#if"));
+        assertTrue(result.contains("<#elseif"));
+        assertTrue(result.contains("<#else>"));
+        assertTrue(result.contains("</#if>"));
+    }
+
+}
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/config/CONFIGBase b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/config/CONFIGBase
new file mode 100644 (file)
index 0000000..ae4dce3
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/$${WidgetID}" version="1.0.0" viewmodes="maximized">
+    <tizen:application id="$@{APPLICATIONID()}" required_version="1.0"/>
+    <content src="$${ContentSRC|"index.html"}"/>
+$$if{TizenWebUIFWProject}
+    <tizen:privilege name="http://tizen.org/privilege/tizen"/>
+    <tizen:privilege name="http://tizen.org/privilege/application.kill"/>
+$$endif
+    <icon src="$${IconSRC|"icon.png"}"/>
+    <name>$${WidgetID}</name>
+</widget>
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/config/FreemarkerTemplateEngineTest.java b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/config/FreemarkerTemplateEngineTest.java
new file mode 100755 (executable)
index 0000000..9978922
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.engine.freemarker.config;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+
+import org.junit.Test;
+import org.tizen.common.util.FileUtil;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateEngine;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateTransformer;
+import org.tizen.common.verrari.model.ModelManager;
+import org.tizen.common.verrari.template.InMemoryTemplate;
+import org.tizen.common.verrari.template.TemplateManager;
+import org.tizen.common.verrari.util.BufferFactory;
+
+/**
+ * FreemarkerTemplateEngineTest.
+ *
+ * Test case for {@link FreemarkerTemplateEngine}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see FreemarkerTemplateEngine
+ *
+ */
+public class FreemarkerTemplateEngineTest {
+    /**
+     * Test {@link FreemarkerTemplateEngine#generate(final String templateKey, final IModelProvider modelProvider, final OutputStream output)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see FreemarkerTemplateEngine#generate(final String templateKey, final IModelProvider modelProvider, final OutputStream output)
+     */
+    @Test
+    public void test_generateConfig() throws Exception {
+        FreemarkerTemplateEngine engine = new FreemarkerTemplateEngine();
+        final TemplateManager templateProvider = new TemplateManager();
+        engine.setTemplateProvider(templateProvider);
+
+        templateProvider.addTemplate("CONFIGBase", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/config/CONFIGBase"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+
+        {
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("WidgetID", "MyWidget");
+            modelManager.addModel("ContentSRC", "index.html");
+            modelManager.addModel("IconSRC", "icon.png");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("CONFIGBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"));
+            assertTrue(result.contains("id=\"http://yourdomain/MyWidget\""));
+            assertTrue(result.contains("required_version=\"1.0\""));
+            assertTrue(result.contains("<content src=\"index.html\"/>"));
+            assertTrue(result.contains("<icon src=\"icon.png\"/>"));
+            assertTrue(result.contains("<name>MyWidget</name>"));
+            assertFalse(result.contains("<tizen:privilege name=\"http://tizen.org/privilege/api/tizen\"/>"));
+        }
+
+        {
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("WidgetID", "MyWidget");
+            modelManager.addModel("ContentSRC", "index.html");
+            modelManager.addModel("IconSRC", "icon.png");
+            modelManager.addModel("TizenWebUIFWProject", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("CONFIGBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"));
+            assertTrue(result.contains("id=\"http://yourdomain/MyWidget\""));
+            assertTrue(result.contains("required_version=\"1.0\"/>"));
+            assertTrue(result.contains("<content src=\"index.html\"/>"));
+            assertTrue(result.contains("<icon src=\"icon.png\"/>"));
+            assertTrue(result.contains("<name>MyWidget</name>"));
+            assertFalse(result.contains("<tizen:privilege name=\"http://tizen.org/privilege/api/tizen\"/>"));
+        }
+    }
+
+}
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/css/CSSBase b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/css/CSSBase
new file mode 100644 (file)
index 0000000..090e31d
--- /dev/null
@@ -0,0 +1,10 @@
+$$if{CSSDescription}
+    $$include{"CSSDescription"}
+$$endif
+
+$$if{CSSTizenBasicBlank}
+    $$include{"CSSTizenBasicBlank"}
+$$else
+body {
+}
+$$endif
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/css/CSSDescription b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/css/CSSDescription
new file mode 100644 (file)
index 0000000..b8f586a
--- /dev/null
@@ -0,0 +1 @@
+/* Copyright $@{YEAR()} $@{USER()} All rights reserved. */
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/css/CSSTizenBasicBlank b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/css/CSSTizenBasicBlank
new file mode 100644 (file)
index 0000000..cb8727f
--- /dev/null
@@ -0,0 +1,119 @@
+* {
+    font-family: Lucida Sans, Arial, Helvetica, sans-serif;
+}
+
+body {
+    margin: 0px auto;
+}
+
+header h1 {
+    font-size: 36px;
+    margin: 0px;
+}
+
+header h2 {
+    font-size: 18px;
+    margin: 0px;
+    color: #888;
+    font-style: italic;
+}
+
+nav ul {
+    list-style: none;
+    padding: 0px;
+    display: block;
+    clear: right;
+    background-color: #666;
+    padding-left: 4px;
+    height: 24px;
+}
+
+nav ul li {
+    display: inline;
+    padding: 0px 20px 5px 10px;
+    height: 24px;
+    border-right: 1px solid #ccc;
+}
+
+nav ul li a {
+    color: #EFD3D3;
+    text-decoration: none;
+    font-size: 13px;
+    font-weight: bold;
+}
+
+nav ul li a:hover {
+    color: #fff;
+}
+
+article > header h1 {
+    font-size: 20px;
+    margin-left: 14px;
+}
+
+article > header h1 a {
+    color: #993333;
+}
+
+article > header h1 img {
+    vertical-align:middle;
+}
+
+article > section header h1 {
+    font-size: 16px;
+}
+
+article p {
+    clear: both;
+}
+
+article > section video {
+    width: 480px;
+    height: 200px;
+}
+
+article > section div.no-html5-video,
+article > section div#no-canvas {
+    width: 480px;
+    height: 40px;
+    border: 1px solid #993333;
+    text-align: center;
+    color: #993333;
+    font-size: 13px;
+    font-style: italic;
+    background-color: #F7E9E9;
+}
+
+article > section div#no-canvas {
+    display: none;
+}
+
+article > section form {
+    border: 1px solid #888;
+    -moz-border-radius: 10px;
+    -webkit-border-radius: 10px;
+    border-radius: 10px;
+    -moz-box-shadow: 10px 10px 5px #888;
+    -webkit-box-shadow: 10px 10px 5px #888;
+    box-shadow: 10px 10px 5px #888;
+    background-color: #eee;
+    padding: 10px;
+    margin-bottom: 30px;
+}
+
+article > section label {
+    font-weight: bold;
+    font-size: 13px;
+}
+
+article > section input {
+    margin-bottom: 3px;
+    font-size: 13px;
+}
+
+footer p {
+    text-align: center;
+    font-size: 12px;
+    color: #888;
+    margin-top: 24px;
+}
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/css/FreemarkerTemplateEngineTest.java b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/css/FreemarkerTemplateEngineTest.java
new file mode 100755 (executable)
index 0000000..0c158e8
--- /dev/null
@@ -0,0 +1,115 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.engine.freemarker.css;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+
+import org.junit.Test;
+import org.tizen.common.util.FileUtil;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateEngine;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateTransformer;
+import org.tizen.common.verrari.model.ModelManager;
+import org.tizen.common.verrari.template.InMemoryTemplate;
+import org.tizen.common.verrari.template.TemplateManager;
+import org.tizen.common.verrari.util.BufferFactory;
+
+/**
+ * FreemarkerTemplateEngineTest.
+ *
+ * Test case for {@link FreemarkerTemplateEngine}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see FreemarkerTemplateEngine
+ *
+ */
+public class FreemarkerTemplateEngineTest {
+    /**
+     * Test {@link FreemarkerTemplateEngine#generate(final String templateKey, final IModelProvider modelProvider, final OutputStream output)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see FreemarkerTemplateEngine#generate(final String templateKey, final IModelProvider modelProvider, final OutputStream output)
+     */
+    @Test
+    public void test_generateCSS() throws Exception {
+        FreemarkerTemplateEngine engine = new FreemarkerTemplateEngine();
+        final TemplateManager templateProvider = new TemplateManager();
+        engine.setTemplateProvider( templateProvider );
+
+        templateProvider.addTemplate("CSSBase", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/css/CSSBase"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("CSSDescription", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/css/CSSDescription"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("CSSTizenBasicBlank", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/css/CSSTizenBasicBlank"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+
+        {
+            // empty & not description
+            final ModelManager modelManager = new ModelManager();
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("CSSBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertFalse(result.contains("Copyright"));
+            assertTrue(result.contains("body {"));
+        }
+
+        {
+            // empty & include description
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("CSSDescription", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("CSSBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains(System.getProperty("user.name")));
+            assertTrue(result.contains("body {"));
+        }
+
+        {
+            // TizenBasicBlank & include description
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("CSSDescription", "");
+            modelManager.addModel("CSSTizenBasicBlank", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("CSSBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains(System.getProperty("user.name")));
+            assertTrue(result.contains("body {"));
+            assertTrue(result.contains("margin: 0px auto;"));
+        }
+    }
+}
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/description.ftl b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/description.ftl
new file mode 100644 (file)
index 0000000..b958b39
--- /dev/null
@@ -0,0 +1,3 @@
+<!------------------------------------------------------------------------------------------------
+ Copyright ${description_date!"2012"} ${description_author!"author"} All rights reserved.
+------------------------------------------------------------------------------------------------->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/FreemarkerTemplateEngineTest.java b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/FreemarkerTemplateEngineTest.java
new file mode 100755 (executable)
index 0000000..cae0859
--- /dev/null
@@ -0,0 +1,574 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.engine.freemarker.html;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+
+import org.junit.Test;
+import org.tizen.common.util.FileUtil;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateEngine;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateTransformer;
+import org.tizen.common.verrari.model.ModelManager;
+import org.tizen.common.verrari.template.InMemoryTemplate;
+import org.tizen.common.verrari.template.TemplateManager;
+import org.tizen.common.verrari.util.BufferFactory;
+
+/**
+ * FreemarkerTemplateEngineTest.
+ *
+ * Test case for {@link FreemarkerTemplateEngine}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see FreemarkerTemplateEngine
+ *
+ */
+public class FreemarkerTemplateEngineTest {
+    /**
+     * Test {@link FreemarkerTemplateEngine#generate(final String templateKey, final IModelProvider modelProvider, final OutputStream output)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see FreemarkerTemplateEngine#generate(final String templateKey, final IModelProvider modelProvider, final OutputStream output)
+     */
+    @Test
+    public void test_generate() throws Exception {
+        FreemarkerTemplateEngine engine = new FreemarkerTemplateEngine();
+        final TemplateManager templateProvider = new TemplateManager();
+        engine.setTemplateProvider( templateProvider );
+
+        templateProvider.addTemplate("HTMLBase", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLBase"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLDescription", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLDescription"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLTizenBasicBlank", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenBasicBlank"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLTizenWebUIFWSinglePage", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWSinglePage"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLTizenWebUIFWMultiPage", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMultiPage"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLTizenWebUIFWMasterDetailIndex", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMasterDetailIndex"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLTizenWebUIFWMasterDetailSection1", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMasterDetailSection1"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLTizenWebUIFWMasterDetailSection2", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMasterDetailSection2"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLTizenWebUIFWNavigationIndex", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWNavigationIndex"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLTizenWebUIFWNavigationSection1", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWNavigationSection1"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLTizenWebUIFWNavigationSection2", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWNavigationSection2"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLJQMSinglePage", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMSinglePage"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLJQMMultiPage", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMultiPage"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLJQMMasterDetailIndex", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMasterDetailIndex"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLJQMMasterDetailSection1", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMasterDetailSection1"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLJQMMasterDetailSection2", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMasterDetailSection2"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLJQMNavigationIndex", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMNavigationIndex"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLJQMNavigationSection1", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMNavigationSection1"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("HTMLJQMNavigationSection2", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMNavigationSection2"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+
+        {
+            // empty & not description
+            final ModelManager modelManager = new ModelManager();
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertFalse(result.contains("Copyright"));
+            assertFalse(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("Tizen template generated by Tizen Web IDE"));
+            assertTrue(result.contains("Title"));
+            assertFalse(result.contains("jquery.js"));
+            assertFalse(result.contains("tizen-web-ui-fw-libs.js"));
+            assertFalse(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+        }
+
+        {
+            // empty & description
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaViewport", "");
+            modelManager.addModel("MetaDescriptionContent", "test MetaDescriptionContent");
+            modelManager.addModel("HtmlTitle", "test HtmlTitle");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("test MetaDescriptionContent"));
+            assertTrue(result.contains("test HtmlTitle"));
+            assertFalse(result.contains("jquery.js"));
+            assertFalse(result.contains("tizen-web-ui-fw-libs.js"));
+            assertFalse(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+        }
+
+        {
+            // TizenBasicBlank & description
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaViewport", "");
+            modelManager.addModel("MetaDescriptionContent", "Tizen basic template generated by Tizen Web IDE");
+            modelManager.addModel("HtmlTitle", "Tizen Web IDE - Tizen - Tizen basic Application");
+            modelManager.addModel("HTMLTizenBasicBlank", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("<meta charset=\"utf-8\"/>"));
+            assertTrue(result.contains("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0\"/>"));
+            assertTrue(result.contains("Tizen Web IDE - Tizen - Tizen basic Application"));
+            assertFalse(result.contains("jquery.js"));
+            assertFalse(result.contains("tizen-web-ui-fw-libs.js"));
+            assertFalse(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("An empty template of Tizen"));
+        }
+
+        {
+            // TizenWebUIFW - single
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaDescriptionContent", "A Tizen Web UI FW single-page template generated by Tizen Web IDE");
+            modelManager.addModel("HtmlTitle", "Tizen Web IDE - Template - Tizen - Tizen Web UI Framework - Single-Page");
+            modelManager.addModel("TizenWebUIFWProject", "");
+            modelManager.addModel("TizenWebUIFWTargetLib", "");
+            modelManager.addModel("HTMLTizenWebUIFWSinglePage", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("<meta charset=\"utf-8\"/>"));
+            assertFalse(result.contains("<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0\"/>"));
+            assertTrue(result.contains("Tizen Web IDE - Template - Tizen - Tizen Web UI Framework - Single-Page"));
+            assertTrue(result.contains("jquery.js"));
+            assertTrue(result.contains("tizen-web-ui-fw-libs.js"));
+            assertTrue(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Single-Page Application"));
+        }
+
+        {
+            // TizenWebUIFW - multi
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaDescriptionContent", "TizenWebUIFWProject");
+            modelManager.addModel("HtmlTitle", "TizenWebUIFWProject");
+            modelManager.addModel("TizenWebUIFWProject", "");
+            modelManager.addModel("TizenWebUIFWTargetLib", "");
+            modelManager.addModel("HTMLTizenWebUIFWMultiPage", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertFalse(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("TizenWebUIFWProject"));
+            assertTrue(result.contains("jquery.js"));
+            assertTrue(result.contains("tizen-web-ui-fw-libs.js"));
+            assertTrue(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Multi-Page Application"));
+        }
+
+        {
+            // TizenWebUIFW - masterdetail - index.html
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaDescriptionContent", "TizenWebUIFWMasterDetailIndex");
+            modelManager.addModel("HtmlTitle", "TizenWebUIFWMasterDetailIndex");
+            modelManager.addModel("TizenWebUIFWProject", "");
+            modelManager.addModel("TizenWebUIFWTargetLib", "");
+            modelManager.addModel("HTMLTizenWebUIFWMasterDetailIndex", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertFalse(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("TizenWebUIFWMasterDetailIndex"));
+            assertTrue(result.contains("jquery.js"));
+            assertTrue(result.contains("tizen-web-ui-fw-libs.js"));
+            assertTrue(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Introduction"));
+        }
+        {
+            // TizenWebUIFW - masterdetail - section1.html
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaDescriptionContent", "TizenWebUIFWMasterDetailSection1");
+            modelManager.addModel("HtmlTitle", "TizenWebUIFWMasterDetailSection1");
+            modelManager.addModel("TizenWebUIFWProject", "");
+            modelManager.addModel("TizenWebUIFWTargetLib", "");
+            modelManager.addModel("HTMLTizenWebUIFWMasterDetailSection1", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertFalse(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("TizenWebUIFWMasterDetailSection1"));
+            assertTrue(result.contains("jquery.js"));
+            assertTrue(result.contains("tizen-web-ui-fw-libs.js"));
+            assertTrue(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Section 1"));
+        }
+        {
+            // TizenWebUIFW - masterdetail - section2.html
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaDescriptionContent", "TizenWebUIFWMasterDetailSection2");
+            modelManager.addModel("HtmlTitle", "TizenWebUIFWMasterDetailSection2");
+            modelManager.addModel("TizenWebUIFWProject", "");
+            modelManager.addModel("TizenWebUIFWTargetLib", "");
+            modelManager.addModel("HTMLTizenWebUIFWMasterDetailSection2", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertFalse(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("TizenWebUIFWMasterDetailSection2"));
+            assertTrue(result.contains("jquery.js"));
+            assertTrue(result.contains("tizen-web-ui-fw-libs.js"));
+            assertTrue(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Section 2"));
+        }
+
+        {
+            // TizenWebUIFW - navigation - index.html
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaDescriptionContent", "TizenWebUIFWNavigationIndex");
+            modelManager.addModel("HtmlTitle", "TizenWebUIFWNavigationIndex");
+            modelManager.addModel("TizenWebUIFWProject", "");
+            modelManager.addModel("TizenWebUIFWTargetLib", "");
+            modelManager.addModel("HTMLTizenWebUIFWNavigationIndex", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertFalse(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("TizenWebUIFWNavigationIndex"));
+            assertTrue(result.contains("jquery.js"));
+            assertTrue(result.contains("tizen-web-ui-fw-libs.js"));
+            assertTrue(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Classic"));
+        }
+        {
+            // TizenWebUIFW - navigation - section1.html
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaDescriptionContent", "TizenWebUIFWNavigationSection1");
+            modelManager.addModel("HtmlTitle", "TizenWebUIFWNavigationSection1");
+            modelManager.addModel("TizenWebUIFWProject", "");
+            modelManager.addModel("TizenWebUIFWTargetLib", "");
+            modelManager.addModel("HTMLTizenWebUIFWNavigationSection1", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertFalse(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("TizenWebUIFWNavigationSection1"));
+            assertTrue(result.contains("jquery.js"));
+            assertTrue(result.contains("tizen-web-ui-fw-libs.js"));
+            assertTrue(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("I'm Yours"));
+        }
+        {
+            // TizenWebUIFW - navigation - section2.html
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaDescriptionContent", "TizenWebUIFWNavigationSection2");
+            modelManager.addModel("HtmlTitle", "TizenWebUIFWNavigationSection2");
+            modelManager.addModel("TizenWebUIFWProject", "");
+            modelManager.addModel("TizenWebUIFWTargetLib", "");
+            modelManager.addModel("HTMLTizenWebUIFWNavigationSection2", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertFalse(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("TizenWebUIFWNavigationSection2"));
+            assertTrue(result.contains("jquery.js"));
+            assertTrue(result.contains("tizen-web-ui-fw-libs.js"));
+            assertTrue(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Adam Lambert"));
+        }
+
+        {
+            // JQM - single
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaViewport", "");
+            modelManager.addModel("MetaDescriptionContent", "JQMSinglePage");
+            modelManager.addModel("HtmlTitle", "JQMSinglePage");
+            modelManager.addModel("JQMProject", "");
+            modelManager.addModel("JQMCSS", "./css/jquery.mobile-1.1.0.css");
+            modelManager.addModel("JQuery", "./js/jquery-1.7.1.js");
+            modelManager.addModel("JQMJS", "./js/jquery.mobile-1.1.0.js");
+            modelManager.addModel("HTMLJQMSinglePage", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("JQMSinglePage"));
+            assertTrue(result.contains("./js/jquery-1.7.1.js"));
+            assertFalse(result.contains("tizen-web-ui-fw-libs.js"));
+            assertFalse(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Single-Page Application"));
+        }
+
+        {
+            // JQM - multi
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaViewport", "");
+            modelManager.addModel("MetaDescriptionContent", "JQMMultiPage");
+            modelManager.addModel("HtmlTitle", "JQMMultiPage");
+            modelManager.addModel("JQMProject", "");
+            modelManager.addModel("JQMCSS", "./css/jquery.mobile-1.1.0.css");
+            modelManager.addModel("JQuery", "./js/jquery-1.7.1.js");
+            modelManager.addModel("JQMJS", "./js/jquery.mobile-1.1.0.js");
+            modelManager.addModel("HTMLJQMMultiPage", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("JQMMultiPage"));
+            assertTrue(result.contains("./js/jquery-1.7.1.js"));
+            assertFalse(result.contains("tizen-web-ui-fw-libs.js"));
+            assertFalse(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Multi-Page Application"));
+        }
+
+        {
+            // JQM - masterdetail - index.html
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaViewport", "");
+            modelManager.addModel("MetaDescriptionContent", "JQMMasterDetailIndex");
+            modelManager.addModel("HtmlTitle", "JQMMasterDetailIndex");
+            modelManager.addModel("JQMProject", "");
+            modelManager.addModel("JQMCSS", "./css/jquery.mobile-1.1.0.css");
+            modelManager.addModel("JQuery", "./js/jquery-1.7.1.js");
+            modelManager.addModel("JQMJS", "./js/jquery.mobile-1.1.0.js");
+            modelManager.addModel("HTMLJQMMasterDetailIndex", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("JQMMasterDetailIndex"));
+            assertTrue(result.contains("./js/jquery-1.7.1.js"));
+            assertFalse(result.contains("tizen-web-ui-fw-libs.js"));
+            assertFalse(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Introduction"));
+        }
+        {
+            // JQM - masterdetail - section1.html
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaViewport", "");
+            modelManager.addModel("MetaDescriptionContent", "JQMMasterDetailSection1");
+            modelManager.addModel("HtmlTitle", "JQMMasterDetailSection1");
+            modelManager.addModel("JQMProject", "");
+            modelManager.addModel("JQMCSS", "./css/jquery.mobile-1.1.0.css");
+            modelManager.addModel("JQuery", "./js/jquery-1.7.1.js");
+            modelManager.addModel("JQMJS", "./js/jquery.mobile-1.1.0.js");
+            modelManager.addModel("HTMLJQMMasterDetailSection1", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("JQMMasterDetailSection1"));
+            assertTrue(result.contains("./js/jquery-1.7.1.js"));
+            assertFalse(result.contains("tizen-web-ui-fw-libs.js"));
+            assertFalse(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Section 1"));
+        }
+        {
+            // JQM - masterdetail - section2.html
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaViewport", "");
+            modelManager.addModel("MetaDescriptionContent", "JQMMasterDetailSection2");
+            modelManager.addModel("HtmlTitle", "JQMMasterDetailSection2");
+            modelManager.addModel("JQMProject", "");
+            modelManager.addModel("JQMCSS", "./css/jquery.mobile-1.1.0.css");
+            modelManager.addModel("JQuery", "./js/jquery-1.7.1.js");
+            modelManager.addModel("JQMJS", "./js/jquery.mobile-1.1.0.js");
+            modelManager.addModel("HTMLJQMMasterDetailSection2", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("JQMMasterDetailSection2"));
+            assertTrue(result.contains("./js/jquery-1.7.1.js"));
+            assertFalse(result.contains("tizen-web-ui-fw-libs.js"));
+            assertFalse(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Section 2"));
+        }
+
+        {
+            // JQM - navigation - index.html
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaViewport", "");
+            modelManager.addModel("MetaDescriptionContent", "JQMNavigationIndex");
+            modelManager.addModel("HtmlTitle", "JQMNavigationIndex");
+            modelManager.addModel("JQMProject", "");
+            modelManager.addModel("JQMCSS", "./css/jquery.mobile-1.1.0.css");
+            modelManager.addModel("JQuery", "./js/jquery-1.7.1.js");
+            modelManager.addModel("JQMJS", "./js/jquery.mobile-1.1.0.js");
+            modelManager.addModel("HTMLJQMNavigationIndex", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("JQMNavigationIndex"));
+            assertTrue(result.contains("./js/jquery-1.7.1.js"));
+            assertFalse(result.contains("tizen-web-ui-fw-libs.js"));
+            assertFalse(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Classic"));
+        }
+        {
+            // JQM - navigation - section1.html
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaViewport", "");
+            modelManager.addModel("MetaDescriptionContent", "JQMNavigationSection1");
+            modelManager.addModel("HtmlTitle", "JQMNavigationSection1");
+            modelManager.addModel("JQMProject", "");
+            modelManager.addModel("JQMCSS", "./css/jquery.mobile-1.1.0.css");
+            modelManager.addModel("JQuery", "./js/jquery-1.7.1.js");
+            modelManager.addModel("JQMJS", "./js/jquery.mobile-1.1.0.js");
+            modelManager.addModel("HTMLJQMNavigationSection1", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("JQMNavigationSection1"));
+            assertTrue(result.contains("./js/jquery-1.7.1.js"));
+            assertFalse(result.contains("tizen-web-ui-fw-libs.js"));
+            assertFalse(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("All I Want For Chritsmas Is You"));
+        }
+        {
+            // JQM - navigation - section2.html
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("HTMLDescription", "");
+            modelManager.addModel("MetaViewport", "");
+            modelManager.addModel("MetaDescriptionContent", "JQMNavigationSection2");
+            modelManager.addModel("HtmlTitle", "JQMNavigationSection2");
+            modelManager.addModel("JQMProject", "");
+            modelManager.addModel("JQMCSS", "./css/jquery.mobile-1.1.0.css");
+            modelManager.addModel("JQuery", "./js/jquery-1.7.1.js");
+            modelManager.addModel("JQMJS", "./js/jquery.mobile-1.1.0.js");
+            modelManager.addModel("HTMLJQMNavigationSection2", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("HTMLBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("meta name=\"viewport\""));
+            assertTrue(result.contains("JQMNavigationSection2"));
+            assertTrue(result.contains("./js/jquery-1.7.1.js"));
+            assertFalse(result.contains("tizen-web-ui-fw-libs.js"));
+            assertFalse(result.contains("tizen-web-ui-fw.js"));
+            assertTrue(result.contains("<script type=\"text/javascript\" src=\"./js/main.js\"></script>"));
+            assertTrue(result.contains("<link rel=\"stylesheet\" type=\"text/css\" href=\"./css/style.css\"/>"));
+            assertTrue(result.contains("Adam Lambert"));
+        }
+    }
+
+}
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLBase b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLBase
new file mode 100644 (file)
index 0000000..0dd59f2
--- /dev/null
@@ -0,0 +1,85 @@
+$$if{HTMLDescription}
+    $$include{"HTMLDescription"}
+$$endif
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8"/>
+$$if{MetaViewport}
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
+$$endif
+    <meta name="description" content="$${MetaDescriptionContent|"Tizen template generated by Tizen Web IDE"}"/>
+
+    <title>$${HtmlTitle|"Title"}</title>
+
+$$if{TizenWebUIFWProject}
+    <!--NOTE:
+    Additional scripts and css files are to be placed here.
+    You can use jQuery namespace($) and all functionalities in jQuery
+    in your script.  For example:
+
+        <script src="main.js"></script>
+        <link rel="stylesheet" href="my.css">
+
+    When you want to manipulate elements in your code, you have to
+    use domReady for your code to work properly, like this;
+
+        domReady(function(){ ... });
+    -->
+  $$if{TizenWebUIFWTargetLib}
+    <script type="text/javascript" src="$${TizenWebUIFWJQuery|"/usr/share/tizen-web-ui-fw/latest/js/jquery.js"}\"></script>
+    <script type="text/javascript" src="$${TizenWebUIFWLibs|"/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"}"></script>
+    <script type="text/javascript" src="$${TizenWebUIFWJS|"/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js"}" data-framework-theme="$${TizenWebUIFWTheme?default("tizen-white")}" data-framework-viewport-scale="$${TizenWebUIFWScale?default("false")}"></script>
+  $$else
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/jquery.js"></script>
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"></script>
+    <script type="text/javascript" src="tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" data-framework-theme="tizen-white" data-framework-viewport-scale="false"></script>
+  $$endif
+$$elseif{JQMProject}
+    <link rel="stylesheet" href="$${JQMCSS}"/>
+    <script type="text/javascript" src="$${JQuery}"></script>
+    <script type="text/javascript" src="$${JQMJS}"></script>
+$$endif
+    <script type="text/javascript" src="./js/main.js"></script>
+    <link rel="stylesheet" type="text/css" href="./css/style.css"/>
+</head>
+<body>
+$$if{HTMLTizenBasicBlank}
+    $$include{"HTMLTizenBasicBlank"}
+$$elseif{HTMLTizenWebUIFWSinglePage}
+    $$include{"HTMLTizenWebUIFWSinglePage"}
+$$elseif{HTMLTizenWebUIFWMultiPage}
+    $$include{"HTMLTizenWebUIFWMultiPage"}
+$$elseif{HTMLTizenWebUIFWMasterDetailIndex}
+    $$include{"HTMLTizenWebUIFWMasterDetailIndex"}
+$$elseif{HTMLTizenWebUIFWMasterDetailSection1}
+    $$include{"HTMLTizenWebUIFWMasterDetailSection1"}
+$$elseif{HTMLTizenWebUIFWMasterDetailSection2}
+    $$include{"HTMLTizenWebUIFWMasterDetailSection2"}
+$$elseif{HTMLTizenWebUIFWNavigationIndex}
+    $$include{"HTMLTizenWebUIFWNavigationIndex"}
+$$elseif{HTMLTizenWebUIFWNavigationSection1}
+    $$include{"HTMLTizenWebUIFWNavigationSection1"}
+$$elseif{HTMLTizenWebUIFWNavigationSection2}
+    $$include{"HTMLTizenWebUIFWNavigationSection2"}
+$$elseif{HTMLJQMSinglePage}
+    $$include{"HTMLJQMSinglePage"}
+$$elseif{HTMLJQMMultiPage}
+    $$include{"HTMLJQMMultiPage"}
+$$elseif{HTMLJQMMasterDetailIndex}
+    $$include{"HTMLJQMMasterDetailIndex"}
+$$elseif{HTMLJQMMasterDetailSection1}
+    $$include{"HTMLJQMMasterDetailSection1"}
+$$elseif{HTMLJQMMasterDetailSection2}
+    $$include{"HTMLJQMMasterDetailSection2"}
+$$elseif{HTMLJQMNavigationIndex}
+    $$include{"HTMLJQMNavigationIndex"}
+$$elseif{HTMLJQMNavigationSection1}
+    $$include{"HTMLJQMNavigationSection1"}
+$$elseif{HTMLJQMNavigationSection2}
+    $$include{"HTMLJQMNavigationSection2"}
+$$endif
+
+</body>
+</html>
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLDescription b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLDescription
new file mode 100644 (file)
index 0000000..7d9adf3
--- /dev/null
@@ -0,0 +1,3 @@
+<!------------------------------------------------------------------------------------------------
+ Copyright $@{YEAR()} $@{USER()} All rights reserved.
+------------------------------------------------------------------------------------------------->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMasterDetailIndex b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMasterDetailIndex
new file mode 100644 (file)
index 0000000..77d0062
--- /dev/null
@@ -0,0 +1,33 @@
+<div data-role="page" class="type-interior" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Master-Detail Application</h1>
+        <a href="index.html" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <div class="content-primary">
+            <h2>Introduction</h2>
+            <p>This template is for a master-detail structured application.</p>
+            <ul>
+                <li>Left bars to navigate details (master)
+                <li>Right content pane (detail)
+            </ul>
+        </div><!--/content-primary -->
+
+        <div class="content-secondary">
+            <div data-role="collapsible" data-collapsed="true" data-content-theme="$${JQMTheme|'c'}">
+                <h3>More in this section</h3>
+                <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}">
+                    <li data-role="list-divider">Details</li>
+                    <li><a href="index.html">Introduction</a></li>
+                    <li><a href="section1.html">Section 1</a></li>
+                    <li><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" class="footer-docs" data-theme="$${JQMTheme|'a'}" data-position="fixed">
+        <p>&copy; Your Company</p>
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMasterDetailSection1 b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMasterDetailSection1
new file mode 100644 (file)
index 0000000..42e7b44
--- /dev/null
@@ -0,0 +1,30 @@
+<div data-role="page" class="type-interior" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Master-Detail Application</h1>
+        <a href="index.html" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <div class="content-primary">
+            <h2>Section 1</h2>
+
+            <p>This is Section 1.</p>
+        </div><!--/content-primary -->
+
+        <div class="content-secondary">
+            <div data-role="collapsible" data-collapsed="true" data-content-theme="$${JQMTheme|'c'}">
+                <h3>More in this section</h3>
+                <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}">
+                    <li data-role="list-divider">Details</li>
+                    <li><a href="index.html">Introduction</a></li>
+                    <li><a href="section1.html">Section 1</a></li>
+                    <li><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" class="footer-docs" data-theme="$${JQMTheme|'a'}" data-position="fixed">
+        <p></p>
+    </div>
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMasterDetailSection2 b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMasterDetailSection2
new file mode 100644 (file)
index 0000000..aec3ea7
--- /dev/null
@@ -0,0 +1,30 @@
+<div data-role="page" class="type-interior" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Master-Detail Application</h1>
+        <a href="index.html" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <div class="content-primary">
+            <h2>Section 2</h2>
+
+            <p>This is Section 2.</p>
+        </div><!--/content-primary -->
+
+        <div class="content-secondary">
+            <div data-role="collapsible" data-collapsed="true" data-content-theme="$${JQMTheme|'c'}">
+                <h3>More in this section</h3>
+                <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}">
+                    <li data-role="list-divider">Details</li>
+                    <li><a href="index.html">Introduction</a></li>
+                    <li><a href="section1.html">Section 1</a></li>
+                    <li><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" class="footer-docs" data-theme="$${JQMTheme|'a'}" data-position="fixed">
+        <p></p>
+    </div>
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMultiPage b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMMultiPage
new file mode 100644 (file)
index 0000000..93f8068
--- /dev/null
@@ -0,0 +1,93 @@
+<!-- Start of first page: #one -->
+<div data-role="page" id="one" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Multi-Page Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <h2>One</h2>
+        <p>
+            This is a multi-page boilerplate template that you can copy to build
+            your first jQuery Mobile page. This template contains multiple "page"
+            containers inside.
+        </p>
+        <p>
+            You link to internal pages by referring to the ID of the page you
+            want to show. For example, to <a href="#two">link</a> to the page
+            with an ID of "two", my link would have a
+            <code>href="#two"</code>
+            in the code.
+        </p>
+
+        <h3>Show internal pages:</h3>
+        <p>
+            <a href="#two" data-role="button">Show page "two"</a>
+        </p>
+        <p>
+            <a href="#popup" data-role="button" data-rel="dialog"
+                data-transition="pop">Show page "popup" (as a dialog)</a>
+        </p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page one -->
+
+
+<!-- Start of second page: #two -->
+<div data-role="page" id="two" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Two</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <h2>Two</h2>
+        <p>I have an id of "two" on my page container. I'm the second
+            page container in this multi-page template.</p>
+        <p>
+            Notice that the theme is different for this page because we've added
+            a few
+            <code>data-theme</code>
+            swatch assigments here to show off how flexible it is. You can add
+            any content or widget to these pages, but we're keeping these
+            simple.
+        </p>
+        <p>
+            <a href="#one" data-direction="reverse" data-role="button">Back to page "one"</a>
+        </p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page two -->
+
+
+<!-- Start of third page: #popup -->
+<div data-role="page" id="popup" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Dialog</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <h2>Popup</h2>
+        <p>
+            I have an id of "popup" on my page container and only look like a
+            dialog because the link to me had a
+            <code>data-rel="dialog"</code>
+            attribute which gives me this inset look and a
+            <code>data-transition="pop"</code>
+            attribute to change the transition to pop. Without this, I'd be
+            styled as a normal page.
+        </p>
+        <p>
+            <a href="#one" data-rel="back" data-role="button" data-inline="true"
+                data-icon="back">Back to page "one"</a>
+        </p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page popup -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMNavigationIndex b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMNavigationIndex
new file mode 100644 (file)
index 0000000..f5f9581
--- /dev/null
@@ -0,0 +1,25 @@
+<div data-role="page" id="foo" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}" style="margin-top: 0;">
+                    <li><a href="index.html">Classic</a></li>
+                    <li><a href="index.html">2011 Hit song</a></li>
+                    <li><a href="index.html">In the gym</a></li>
+                    <li><a href="index.html">For baby</a></li>
+                    <li><a href="index.html">My favorite </a></li>
+                </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="fool" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <div data-role="navbar">
+            <ul>
+                <li><a href="index.html" class="ui-btn-active">Play List</a></li>
+                <li><a href="section1.html">Music</a></li>
+                <li><a href="section2.html">Artist</a></li>
+            </ul>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMNavigationSection1 b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMNavigationSection1
new file mode 100644 (file)
index 0000000..7d933af
--- /dev/null
@@ -0,0 +1,27 @@
+<div data-role="page" id="foo" data-position="fixed" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}" style="margin-top: 0;">
+                    <li><a href="index.html">All I Want For Chritsmas Is You</a></li>
+                    <li><a href="index.html">Baby(Feat.Ludacris)</a></li>
+                    <li><a href="index.html">Baby I Love You</a></li>
+                    <li><a href="index.html">Because Of You</a></li>
+                    <li><a href="index.html">Geek In The Pink</a></li>
+                    <li><a href="index.html">Hangover (Feat. Flo Rida)</a></li>
+                    <li><a href="index.html">I'm Yours</a></li>
+                </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="fool" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <div data-role="navbar">
+            <ul>
+                <li><a href="index.html" >Play List</a></li>
+                <li><a href="section1.html"  class="ui-btn-active">Music</a></li>
+                <li><a href="section2.html">Artist</a></li>
+            </ul>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMNavigationSection2 b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMNavigationSection2
new file mode 100644 (file)
index 0000000..2ff3cdc
--- /dev/null
@@ -0,0 +1,45 @@
+<div data-role="page" id="foo" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <ul data-role="listview" data-dividertheme="$${JQMTheme|'b'}" style="margin-top: 0;">
+                    <li data-role="list-divider">A</li>
+                    <li><a href="index.html">Adam Lambert</a></li>
+                    <li><a href="index.html">Adele</a></li>
+                    <li><a href="index.html">Amy Winehouse</a></li>
+
+                    <li data-role="list-divider">B</li>
+                    <li><a href="index.html">Beyonce</a></li>
+
+                    <li data-role="list-divider">C</li>
+                    <li><a href="index.html">Chris Brown</a></li>
+
+                    <li data-role="list-divider">D</li>
+                    <li><a href="index.html">David Guetta</a></li>
+                    <li><a href="index.html">Drake</a></li>
+
+                    <li data-role="list-divider">E</li>
+                    <li><a href="index.html">Ed Sheeran</a></li>
+                    <li><a href="index.html">Eric Benet</a></li>
+
+                    <li data-role="list-divider">F</li>
+                    <li><a href="index.html">Far East Movement</a></li>
+
+                    <li data-role="list-divider">H</li>
+                    <li><a href="index.html">Hope</a></li>
+                    <li><a href="index.html">Hot Chelle Rae</a></li>
+                </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-id="fool" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <div data-role="navbar">
+            <ul>
+                <li><a href="index.html" >Play List</a></li>
+                <li><a href="section1.html">Music</a></li>
+                <li><a href="section2.html" class="ui-btn-active">Artist</a></li>
+            </ul>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMSinglePage b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLJQMSinglePage
new file mode 100644 (file)
index 0000000..cbacab6
--- /dev/null
@@ -0,0 +1,14 @@
+<div data-role="page" data-theme="$${JQMTheme|'c'}">
+    <div data-role="header" data-theme="$${JQMTheme|'a'}">
+        <h1>Single-Page Application </h1>
+    </div><!-- /header -->
+
+    <div data-role="content" data-theme="$${JQMTheme|'c'}">
+        <p>This is a single page boilerplate template that you can copy to build your first jQuery Mobile page.</p>
+            <canvas width="" height="300"></canvas>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-theme="$${JQMTheme|'a'}">
+        <h4>Footer content</h4>
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenBasicBlank b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenBasicBlank
new file mode 100644 (file)
index 0000000..ddddff8
--- /dev/null
@@ -0,0 +1,39 @@
+<header>
+  <hgroup>
+    <h1>Tizen App</h1>
+    <h2>An empty template of Tizen</h2>
+  </hgroup>
+</header>
+
+<nav>
+  <ul>
+     <li><a href="#">Home</a></li>
+     <li><a href="#">About Us</a></li>
+     <li><a href="#">Contact Us</a></li>
+  </ul>
+</nav>
+
+<article>
+  <header>
+    <h1>
+      <img src="images/tizen_32.png" /> Application Name
+    </h1>
+  </header>
+  <p>This is an empty template of Tizen Web Application. Tizen will support multiple device categories:
+    <ul>
+      <li>smartphones, tablets and smart TVs
+      <li>netbooks, in-vehicle infotainment devices
+    </ul>
+  </p>
+  <section>
+    <p>This is a basic section of a document.</p>
+    <p>The following button displays a time using JavaScript.</p>
+    <div id="divbutton1">
+      <button onclick="startTime();">Clock</button>
+    </div>
+  </section>
+</article>
+
+<footer>
+  <p>&copy; 2012 Company Name. All rights reserved.</p>
+</footer>
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMasterDetailIndex b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMasterDetailIndex
new file mode 100644 (file)
index 0000000..58f9d05
--- /dev/null
@@ -0,0 +1,35 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed">
+        <h1>Master-Detail Application</h1>
+        <a id="opt_text" data-icon="optiontray"></a>
+        <div id="myoptionheader1" data-role="optionheader" data-for="opt_text">
+            <div class="ui-grid-b ">
+                <div class="ui-block-a"><a data-role="button" href="index.html">Introduction</a></div>
+                <div class="ui-block-b"><a data-role="button" href="section1.html">Section 1</a></div>
+                <div class="ui-block-c"><a data-role="button" href="section2.html">Section 2</a></div>
+            </div>
+        </div>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <div >
+            <h2>Introduction</h2>
+            <p>This template is for a master-detail structured application.</p>
+        </div>
+        <div>
+            <div data-role="collapsible" data-collapsed="true">
+                <h3>More in this section</h3>
+                <ul data-role="listview" >
+                    <li class="ui-li-1line ui-li-dialogue" data-expandable="true" id="section" data-initial-expansion="true">Details</li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="index.html">Introduction</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section1.html">Section 1</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <p>&nbsp&nbsp&copy; Your Company</p>
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMasterDetailSection1 b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMasterDetailSection1
new file mode 100644 (file)
index 0000000..7e577c7
--- /dev/null
@@ -0,0 +1,37 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed">
+        <h1>Master-Detail Application</h1>
+        <div data-role="fieldcontain">
+            <fieldset data-role="controlgroup" data-type="horizontal">
+                <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment1" value="on" checked="checked" />
+                <label for="segment1">Button1</label>
+                <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment2" value="off" />
+                <label for="segment2">Button2</label>
+                <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment3" value="off" />
+                <label for="segment3">Button3</label>
+            </fieldset>
+        </div>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <div>
+            <h2>Section 1</h2>
+            <p>This is Secion 1.</p>
+        </div>
+        <div>
+            <div data-role="collapsible" data-collapsed="true">
+                <h3>More in this section</h3>
+                <ul data-role="listview">
+                    <li class="ui-li-1line ui-li-dialogue" data-expandable="true" id="section" data-initial-expansion="true">Details</li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="index.html">Introduction</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section1.html">Section 1</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <p></p>
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMasterDetailSection2 b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMasterDetailSection2
new file mode 100644 (file)
index 0000000..905c213
--- /dev/null
@@ -0,0 +1,34 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed">
+        <h1>Master-Detail Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <div>
+            <h2>Section 2</h2>
+            <p>This is Secion 2.</p>
+        </div>
+        <div>
+            <div data-role="collapsible" data-collapsed="true">
+                <h3>More in this section</h3>
+                <ul data-role="listview">
+                    <li class="ui-li-1line ui-li-dialogue" data-expandable="true" id="section" data-initial-expansion="true">Details</li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="index.html">Introduction</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section1.html">Section 1</a></li>
+                    <li class="ui-li-1line ui-li-dialogue" data-expanded-by="section"><a href="section2.html">Section 2</a></li>
+                </ul>
+            </div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <div data-role="fieldcontain">
+            <fieldset data-role="controlgroup" data-type="horizontal">
+                <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment1" value="on" checked="checked" />
+                <label for="segment1">Button1</label>
+                <input type="radio" name="radio-view-8" data-icon="segment-titlestyle-segonly" id="segment2" value="off" />
+                <label for="segment2">Button2</label>
+            </fieldset>
+        </div>
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMultiPage b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWMultiPage
new file mode 100644 (file)
index 0000000..26a4cbe
--- /dev/null
@@ -0,0 +1,54 @@
+<!-- Start of first page: #one -->
+<div data-role="page" id="one">
+    <div data-role="header" data-position="fixed">
+        <h1>Multi-Page Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <h2>One</h2>
+        <p>
+            This is a multi-page boilerplate template that you can copy to build
+            your first Tizen Web UI Framework page. This template contains multiple "page"
+            containers inside.
+        </p>
+        <p>
+            You link to internal pages by referring to the ID of the page you
+            want to show. For example, to <a href="#two">link</a> to the page
+            with an ID of "two", my link would have a
+            <code>href="#two"</code>
+            in the code.
+        </p>
+        <h3>Show internal pages:</h3>
+        <p><a href="#two" data-role="button">Show page "two"</a></p>
+        <p><a href="#popup"  data-role="button" aria-haspopup="true" data-rel="popupwindow">Show page "popup" (as a dialog)</a></p>
+
+        <div id="popup" data-role="popupwindow" data-style="center_title_1btn">
+            <p data-role="title">Popup</p>
+            <p data-role="text">Pop-up dialog box, a child window that blocks user interact to the parent windows</p>
+            <div data-role="button-bg"><a href="#" data-role="button" onclick="javascript:$('#popup').popupwindow('close');">Close</a></div>
+        </div>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page one -->
+
+
+<!-- Start of second page: #two -->
+<div data-role="page" id="two">
+    <div data-role="header" data-position="fixed">
+        <h1>Two</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <h2>Two</h2>
+        <p>I have an id of "two" on my page container. I'm the second
+            page container in this multi-page template.</p>
+        <p><a href="#one" data-direction="reverse" data-role="button">Back to page "one"</a></p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <h4>Page Footer</h4>
+    </div><!-- /footer -->
+</div><!-- /page two -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWNavigationIndex b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWNavigationIndex
new file mode 100644 (file)
index 0000000..16d6396
--- /dev/null
@@ -0,0 +1,25 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed" data-id="foo">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <ul data-role="listview">
+            <li><a class="ui-li-text-main">Classic</a></li>
+            <li><a class="ui-li-text-main">2012 Hit song</a></li>
+            <li><a class="ui-li-text-main">In the gym</a></li>
+            <li><a class="ui-li-text-main">For baby</a></li>
+            <li><a class="ui-li-text-main">My favorite</a></li>
+        </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-id="foo1">
+        <div data-role="controlbar" data-style="tabbar">
+            <ul>
+                <li><a href="index.html" data-icon="ctrlbar-playlists" class="ui-btn-active ui-state-persist">Play List</a></li>
+                <li><a href="section1.html" data-icon="ctrlbar-music_albums">Music</a></li>
+                <li><a href="section2.html" data-icon="ctrlbar-artist">Artist</a></li>
+            </ul>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWNavigationSection1 b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWNavigationSection1
new file mode 100644 (file)
index 0000000..b0cac41
--- /dev/null
@@ -0,0 +1,27 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed" data-id="foo">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <ul data-role="listview">
+            <li><a class="ui-li-text-main" href="index.html">All I Want For Chritsmas Is You</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Baby(Feat.Ludacris)</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Baby I Love You</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Because Of You</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Geek In The Pink</a></li>
+            <li><a class="ui-li-text-main" href="index.html">Hangover (Feat. Flo Rida)</a></li>
+            <li><a class="ui-li-text-main" href="index.html">I'm Yours</a></li>
+        </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-id="foo1">
+        <div data-role="controlbar" data-style="tabbar">
+            <ul>
+                <li><a href="index.html" data-icon="ctrlbar-playlists">Play List</a></li>
+                <li><a href="section1.html" data-icon="ctrlbar-music_albums" class="ui-btn-active ui-state-persist">Music</a></li>
+                <li><a href="section2.html" data-icon="ctrlbar-artist">Artist</a></li>
+            </ul>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWNavigationSection2 b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWNavigationSection2
new file mode 100644 (file)
index 0000000..5cc7a36
--- /dev/null
@@ -0,0 +1,45 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed" data-id="foo">
+        <h1>Navigation Application</h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <ul data-role="listview">
+            <li data-role="list-divider">A</li>
+            <li><a href="index.html">Adam Lambert</a></li>
+            <li><a href="index.html">Adele</a></li>
+            <li><a href="index.html">Amy Winehouse</a></li>
+
+            <li data-role="list-divider">B</li>
+            <li><a href="index.html">Beyonce</a></li>
+
+            <li data-role="list-divider">C</li>
+            <li><a href="index.html">Chris Brown</a></li>
+
+            <li data-role="list-divider">D</li>
+            <li><a href="index.html">David Guetta</a></li>
+            <li><a href="index.html">Drake</a></li>
+
+            <li data-role="list-divider">E</li>
+            <li><a href="index.html">Ed Sheeran</a></li>
+            <li><a href="index.html">Eric Benet</a></li>
+
+            <li data-role="list-divider">F</li>
+            <li><a href="index.html">Far East Movement</a></li>
+
+            <li data-role="list-divider">H</li>
+            <li><a href="index.html">Hope</a></li>
+            <li><a href="index.html">Hot Chelle Rae</a></li>
+        </ul>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed" data-id="foo1">
+        <div data-role="controlbar" data-style="tabbar">
+            <ul>
+                <li><a href="index.html" data-icon="ctrlbar-playlists">Play List</a></li>
+                <li><a href="section1.html" data-icon="ctrlbar-music_albums">Music</a></li>
+                <li><a href="section2.html" data-icon="ctrlbar-artist" class="ui-btn-active ui-state-persist">Artist</a></li>
+            </ul>
+        </div><!-- /navbar -->
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWSinglePage b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/html/HTMLTizenWebUIFWSinglePage
new file mode 100644 (file)
index 0000000..080e29c
--- /dev/null
@@ -0,0 +1,13 @@
+<div data-role="page">
+    <div data-role="header" data-position="fixed">
+        <h1>Single-Page Application </h1>
+    </div><!-- /header -->
+
+    <div data-role="content">
+        <p>This is a single page boilerplate template that you can copy to build your first Tizen Web UI Framework page.</p>
+    </div><!-- /content -->
+
+    <div data-role="footer" data-position="fixed">
+        <h4>Footer content</h4>
+    </div><!-- /footer -->
+</div><!-- /page -->
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/FreemarkerTemplateEngineTest.java b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/FreemarkerTemplateEngineTest.java
new file mode 100755 (executable)
index 0000000..2215f25
--- /dev/null
@@ -0,0 +1,142 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.engine.freemarker.js;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+
+import org.junit.Test;
+import org.tizen.common.util.FileUtil;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateEngine;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateTransformer;
+import org.tizen.common.verrari.model.ModelManager;
+import org.tizen.common.verrari.template.InMemoryTemplate;
+import org.tizen.common.verrari.template.TemplateManager;
+import org.tizen.common.verrari.util.BufferFactory;
+
+/**
+ * FreemarkerTemplateEngineTest.
+ *
+ * Test case for {@link FreemarkerTemplateEngine}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see FreemarkerTemplateEngine
+ *
+ */
+public class FreemarkerTemplateEngineTest {
+    /**
+     * Test {@link FreemarkerTemplateEngine#generate(final String templateKey, final IModelProvider modelProvider, final OutputStream output)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see FreemarkerTemplateEngine#generate(final String templateKey, final IModelProvider modelProvider, final OutputStream output)
+     */
+    @Test
+    public void test_generateCSS() throws Exception {
+        FreemarkerTemplateEngine engine = new FreemarkerTemplateEngine();
+        final TemplateManager templateProvider = new TemplateManager();
+        engine.setTemplateProvider( templateProvider );
+
+        templateProvider.addTemplate("JSBase", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/js/JSBase"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("JSDescription", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/js/JSDescription"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("JSJQM", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/js/JSJQM"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("JSTizenBasicBlank", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/js/JSTizenBasicBlank"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+        templateProvider.addTemplate("JSTizenWebUIFW", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/js/JSTizenWebUIFW"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+
+        {
+            // empty & not description
+            final ModelManager modelManager = new ModelManager();
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("JSBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertFalse(result.contains("Copyright"));
+            assertTrue(result.contains("window.onload = init;"));
+        }
+
+        {
+            // empty & include description
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("JSDescription", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("JSBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("window.onload = init;"));
+        }
+
+        {
+            // TizenBasicBlank & include description
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("JSDescription", "");
+            modelManager.addModel("JSTizenBasicBlank", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("JSBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("function startTime()"));
+        }
+
+        {
+            // JQM & include description
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("JSDescription", "");
+            modelManager.addModel("JSJQM", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("JSBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("$(document).bind('pageinit', init);"));
+        }
+
+        {
+            // TizenWebUIFW & include description
+            final ModelManager modelManager = new ModelManager();
+            modelManager.addModel("JSDescription", "");
+            modelManager.addModel("JSTizenWebUIFW", "");
+
+            final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+            engine.generate("JSBase", modelManager, byteOut );
+            final String result = byteOut.toString();
+            assertTrue(0 < result.length());
+            assertTrue(result.contains("Copyright"));
+            assertTrue(result.contains("tizen.application.exit();"));
+        }
+    }
+}
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSBase b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSBase
new file mode 100644 (file)
index 0000000..ec9c993
--- /dev/null
@@ -0,0 +1,19 @@
+$$if{JSDescription}
+    $$include{"JSDescription"}
+$$endif
+
+$$if{JSTizenBasicBlank}
+    $$include{"JSTizenBasicBlank"}
+$$elseif{JSJQM}
+    $$include{"JSJQM"}
+$$elseif{JSTizenWebUIFW}
+    $$include{"JSTizenWebUIFW"}
+$$else
+//Initialize function
+var init = function () {
+    // TODO:: Do your initialization job
+    console.log("init() called");
+};
+// window.onload can work without <body onload="">
+window.onload = init;
+$$endif
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSDescription b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSDescription
new file mode 100644 (file)
index 0000000..9a61796
--- /dev/null
@@ -0,0 +1,3 @@
+/*
+ * Copyright $@{YEAR()} $@{USER()} All rights reserved.
+ */
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSJQM b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSJQM
new file mode 100644 (file)
index 0000000..40f9755
--- /dev/null
@@ -0,0 +1,6 @@
+//Initialize function
+var init = function () {
+    // TODO:: Do your initialization job
+    console.log("init() called");
+};
+$(document).bind('pageinit', init);
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSTizenBasicBlank b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSTizenBasicBlank
new file mode 100644 (file)
index 0000000..31dd9ec
--- /dev/null
@@ -0,0 +1,29 @@
+var startTime;
+var checkTime;
+
+//Initialize function
+var init = function () {
+    // TODO:: Do your initialization job
+    console.log("init() called");
+};
+// window.onload can work without <body onload="">
+window.onload = init;
+
+function startTime() {
+    var today = new Date();
+    var h = today.getHours();
+
+    var m = today.getMinutes();
+    var s = today.getSeconds();
+    m = checkTime(m);
+    s = checkTime(s);
+    document.getElementById('divbutton1').innerHTML="Current time: " + h + ":" + m + ":" + s;
+    t = setTimeout(startTime, 250);
+}
+
+function checkTime(i) {
+    if (i < 10) {
+        i="0" + i;
+    }
+    return i;
+}
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSTizenWebUIFW b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/js/JSTizenWebUIFW
new file mode 100644 (file)
index 0000000..2d29467
--- /dev/null
@@ -0,0 +1,9 @@
+//Initialize function
+var init = function () {
+    $('div[data-role="page"]:first .ui-btn-back').bind("click", function(event) {
+        tizen.application.exit();
+    });
+    // TODO:: Do your initialization job
+    console.log("init() called");
+};
+$(document).bind('pageinit', init);
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/method/FreemarkerTemplateEngineMethodTest.java b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/method/FreemarkerTemplateEngineMethodTest.java
new file mode 100755 (executable)
index 0000000..f2ffb92
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.engine.freemarker.method;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+
+import org.junit.Test;
+import org.tizen.common.util.FileUtil;
+import org.tizen.common.verrari.IModelManager;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerModelManager;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateEngine;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateTransformer;
+import org.tizen.common.verrari.engine.method.AbstractTemplateEngineMethod;
+import org.tizen.common.verrari.model.ModelManager;
+import org.tizen.common.verrari.template.InMemoryTemplate;
+import org.tizen.common.verrari.template.TemplateManager;
+import org.tizen.common.verrari.util.BufferFactory;
+
+/**
+ * FreemarkerTemplateEngineMethodTest.
+ *
+ * Test case for {@link FreemarkerTemplateEngineMethodTest}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see FreemarkerTemplateEngineMethod
+ *
+ */
+public class FreemarkerTemplateEngineMethodTest {
+    /**
+     * Test {@link FreemarkerTemplateEngineMethod}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see FreemarkerTemplateEngineMethod
+     */
+    @Test
+    public void getXXXWrapper() throws Exception {
+        FreemarkerTemplateEngine engine = new FreemarkerTemplateEngine();
+        final TemplateManager templateProvider = new TemplateManager();
+        engine.setTemplateProvider(templateProvider);
+
+        templateProvider.addTemplate("TESTFile", new InMemoryTemplate(new FreemarkerTemplateTransformer().templateTranslate(FileUtil.readTextFile(new File("./test/src/org/tizen/common/verrari/engine/freemarker/method/TESTFile"), null)).getBytes(), "utf-8", BufferFactory.getInstance()));
+
+        final IModelManager modelManager = new FreemarkerModelManager( new ModelManager() );
+
+        assertNotNull(modelManager.getModel("YEAR"));
+        assertNotNull(modelManager.getModel("DATE"));
+        assertNotNull(modelManager.getModel("TIME"));
+        assertNotNull(modelManager.getModel("USER"));
+        assertNotNull(modelManager.getModel("APPLICATIONID"));
+
+        final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+        engine.generate("TESTFile", modelManager, byteOut );
+        final String result = byteOut.toString();
+        assertTrue(0 < result.length());
+        assertTrue(result.contains(AbstractTemplateEngineMethod.getYear()));
+        assertTrue(result.contains(AbstractTemplateEngineMethod.getDate()));
+        assertTrue(result.contains(AbstractTemplateEngineMethod.getUser()));
+    }
+
+}
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/method/TESTFile b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/method/TESTFile
new file mode 100644 (file)
index 0000000..d6bc9ec
--- /dev/null
@@ -0,0 +1,5 @@
+Year:"$@{YEAR()}"
+Date:"$@{DATE()}"
+Time:"$@{TIME()}"
+User:"$@{USER()}"
+ApplicationID:"$@{APPLICATIONID()}"
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/test_html.ftl b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/test_html.ftl
new file mode 100644 (file)
index 0000000..3e950db
--- /dev/null
@@ -0,0 +1,36 @@
+<#include "description.ftl">
+
+<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, target-densityDpi=device-dpi"/>
+    <meta name="description" content="${meta_description_content!"Tizen template generated by Tizen Web IDE"}"/>
+
+    <title>${index_html_title!'Title'}</title>
+
+<#if TizenWebUIFW_Enable?exists>
+${head_script_tizenwebuifw!""}
+
+        <!--NOTE:
+        Additional scripts and css files are to be placed here.
+        You can use jQuery namespace($) and all functionalities in jQuery
+        in your script.  For example:
+
+            <script src="main.js"></script>
+            <link rel="stylesheet" href="my.css">
+
+        When you want to manipulate elements in your code, you have to
+        use domReady for your code to work properly, like this;
+
+            domReady(function(){ ... });
+        -->
+</#if>
+    <script type="text/javascript" src="./js/main.js"></script>
+    <link rel="stylesheet" type="text/css" href="./css/style.css"/>
+</head>
+
+<body>
+<#include "test_html_body.ftl">
+</body>
+</html>
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/test_html_body.ftl b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/freemarker/test_html_body.ftl
new file mode 100644 (file)
index 0000000..363eba5
--- /dev/null
@@ -0,0 +1,77 @@
+<#if TizenWebUIFW_Enable?exists>
+    <#if test_html_body_tizenwebuifw_single?exists>
+        <div data-role="page">
+            <div data-role="header" data-position="fixed">
+                <h1>Single-Page Application </h1>
+            </div><!-- /header -->
+
+            <div data-role="content">
+                <p>This is a single page boilerplate template that you can copy to build your first Tizen Web UI Framework page.</p>
+            </div><!-- /content -->
+
+            <div data-role="footer" data-position="fixed">
+                <h4>Footer content</h4>
+            </div><!-- /footer -->
+        </div><!-- /page -->
+    <#elseif test_html_body_tizenwebuifw_multi?exists>
+        <!-- Start of first page: #one -->
+        <div data-role="page" id="one">
+            <div data-role="header" data-position="fixed">
+                <h1>Multi-Page Application</h1>
+            </div><!-- /header -->
+
+            <div data-role="content">
+                <h2>One</h2>
+                <p>
+                    This is a multi-page boilerplate template that you can copy to build
+                    your first Tizen Web UI Framework page. This template contains multiple "page"
+                    containers inside.
+                </p>
+                <p>
+                    You link to internal pages by referring to the ID of the page you
+                    want to show. For example, to <a href="#two">link</a> to the page
+                    with an ID of "two", my link would have a
+                    <code>href="#two"</code>
+                    in the code.
+                </p>
+                <h3>Show internal pages:</h3>
+                <p><a href="#two" data-role="button">Show page "two"</a></p>
+                <p><a href="#popup"  data-role="button" aria-haspopup="true" data-rel="popupwindow">Show page "popup" (as a dialog)</a></p>
+
+                <div id="popup" data-role="popupwindow" data-style="center_title_1btn">
+                    <p data-role="title">Popup</p>
+                    <p data-role="text">Pop-up dialog box, a child window that blocks user interact to the parent windows</p>
+                    <div data-role="button-bg"><a href="#" data-role="button" onclick="javascript:$('#popup').popupwindow('close');">Close</a></div>
+                </div>
+            </div><!-- /content -->
+
+            <div data-role="footer" data-position="fixed">
+                <h4>Page Footer</h4>
+            </div><!-- /footer -->
+        </div><!-- /page one -->
+
+        <!-- Start of second page: #two -->
+        <div data-role="page" id="two">
+            <div data-role="header" data-position="fixed">
+                <h1>Two</h1>
+            </div><!-- /header -->
+
+            <div data-role="content">
+                <h2>Two</h2>
+                <p>I have an id of "two" on my page container. I'm the second
+                    page container in this multi-page template.</p>
+                <p><a href="#one" data-direction="reverse" data-role="button">Back to page "one"</a></p>
+            </div><!-- /content -->
+
+            <div data-role="footer" data-position="fixed">
+                <h4>Page Footer</h4>
+            </div><!-- /footer -->
+        </div><!-- /page two -->
+    </#if>
+<#else>
+    <header>
+    </header>
+
+    <footer>
+    </footer>
+</#if>
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/jsoup/JsoupTemplateEngineTest.java b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/jsoup/JsoupTemplateEngineTest.java
new file mode 100755 (executable)
index 0000000..be22ce0
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.engine.jsoup;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+
+import org.jsoup.nodes.Attribute;
+import org.jsoup.nodes.Attributes;
+import org.junit.Test;
+import org.tizen.common.verrari.model.ModelManager;
+import org.tizen.common.verrari.template.ClasspathResourceTemplate;
+import org.tizen.common.verrari.template.TemplateManager;
+
+public class JsoupTemplateEngineTest {
+
+    /**
+     * Test {@link JsoupTemplateEngine#generate(TargetUnit unit)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see JsoupTemplateEngine#generate(TargetUnit unit)
+     */
+    @Test
+    public void test_generate() throws Exception {
+        JsoupTemplateEngine engine = new JsoupTemplateEngine();
+        final TemplateManager templateProvider = new TemplateManager();
+        templateProvider.addTemplate("jsoupTemplate", new ClasspathResourceTemplate( "org/tizen/common/verrari/engine/jsoup/TizenSingle.html", getClass() ) );
+        engine.setTemplateProvider( templateProvider );
+
+        // selector - http://jsoup.org/apidocs/org/jsoup/select/Selector.html
+        ModelManager mapModel = new ModelManager();
+        Attribute jquery = new Attribute("src", "/usr/share/tizen-web-ui-fw/latest/js/jquery.js");
+        mapModel.addModel("script[src$=tizen-web-ui-fw/latest/js/jquery.js]", jquery);
+
+        Attribute tizenwebuifwlibs = new Attribute("src", "/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js");
+        mapModel.addModel("script[src$=tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js]", tizenwebuifwlibs);
+
+        Attributes tizenwebuifw = new Attributes();
+        tizenwebuifw.put("src", "/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js");
+        tizenwebuifw.put("data-framework-theme", "tizen-white");
+        tizenwebuifw.put("data-framework-viewport-scale", "true");
+        mapModel.addModel("script[src$=tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js]", tizenwebuifw);
+        
+        final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+        engine.generate( "jsoupTemplate", mapModel, byteOut );
+
+        final String result = byteOut.toString();
+        assertFalse( result.contains( "tizen-gray" ) );
+        assertTrue( result.contains( "tizen-white" ) );
+
+    }
+
+}
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/jsoup/TizenSingle.html b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/jsoup/TizenSingle.html
new file mode 100644 (file)
index 0000000..587dae8
--- /dev/null
@@ -0,0 +1,46 @@
+<!--
+ Copyright 2012 changhyun1.lee@samsung.com All rights reserved.
+-------------------------------------------------------------------------------------------------><!DOCTYPE html>
+<html>
+ <head>
+  <meta charset="utf-8" />
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, target-densityDpi=device-dpi" />
+  <meta name="description" content="Tizen template generated by Tizen Web IDE" />
+  <title>Tizen Web UI FW - Single</title>
+  <script src="./tizen-web-ui-fw/latest/js/jquery.js"></script>
+  <script src="./tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"></script>
+  <script src="./tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" data-framework-theme="tizen-gray" data-framework-viewport-scale="false"></script>
+  <!--NOTE:
+        Additional scripts and css files are to be placed here.
+        You can use jQuery namespace($) and all functionalities in jQuery
+        in your script.  For example:
+
+            <script src="main.js"></script>
+            <link rel="stylesheet" href="my.css">
+
+        When you want to manipulate elements in your code, you have to
+        use domReady for your code to work properly, like this;
+
+            domReady(function(){ ... });
+        -->
+  <script type="text/javascript" src="./js/main.js"></script>
+  <link rel="stylesheet" type="text/css" href="./css/style.css" />
+ </head>
+ <body>
+  <div data-role="page">
+   <div data-role="header" data-position="fixed">
+    <h1>Single-Page Application </h1>
+   </div>
+   <!-- /header -->
+   <div data-role="content">
+    <p>This is a single page boilerplate template that you can copy to build your first Tizen Web UI Framework page.</p>
+   </div>
+   <!-- /content -->
+   <div data-role="footer" data-position="fixed">
+    <h4>Footer content</h4>
+   </div>
+   <!-- /footer -->
+  </div>
+  <!-- /page -->
+ </body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/jsoup/genTizenSingle.html b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/engine/jsoup/genTizenSingle.html
new file mode 100755 (executable)
index 0000000..79f5d74
--- /dev/null
@@ -0,0 +1,46 @@
+<!--
+ Copyright 2012 changhyun1.lee@samsung.com All rights reserved.
+-------------------------------------------------------------------------------------------------><!DOCTYPE html>
+<html>
+ <head> 
+  <meta charset="utf-8" /> 
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, target-densityDpi=device-dpi" /> 
+  <meta name="description" content="Tizen template generated by Tizen Web IDE" /> 
+  <title>Tizen Web UI FW - Single</title> 
+  <script src="/usr/share/tizen-web-ui-fw/latest/js/jquery.js"></script> 
+  <script src="/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw-libs.js"></script> 
+  <script src="/usr/share/tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js" data-framework-theme="tizen-white" data-framework-viewport-scale="true"></script> 
+  <!--NOTE:
+        Additional scripts and css files are to be placed here.
+        You can use jQuery namespace($) and all functionalities in jQuery
+        in your script.  For example:
+
+            <script src="main.js"></script>
+            <link rel="stylesheet" href="my.css">
+
+        When you want to manipulate elements in your code, you have to
+        use domReady for your code to work properly, like this;
+
+            domReady(function(){ ... });
+        --> 
+  <script type="text/javascript" src="./js/main.js"></script> 
+  <link rel="stylesheet" type="text/css" href="./css/style.css" /> 
+ </head> 
+ <body> 
+  <div data-role="page"> 
+   <div data-role="header" data-position="fixed"> 
+    <h1>Single-Page Application </h1> 
+   </div> 
+   <!-- /header --> 
+   <div data-role="content"> 
+    <p>This is a single page boilerplate template that you can copy to build your first Tizen Web UI Framework page.</p> 
+   </div> 
+   <!-- /content --> 
+   <div data-role="footer" data-position="fixed"> 
+    <h4>Footer content</h4> 
+   </div> 
+   <!-- /footer --> 
+  </div> 
+  <!-- /page -->  
+ </body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/FileTemplateTest.java b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/FileTemplateTest.java
new file mode 100755 (executable)
index 0000000..0261147
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.template;
+
+import static org.junit.Assert.assertEquals;
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.tizen.common.config.Preference;
+import org.tizen.common.config.provider.SystemPropertiesProvider;
+
+/**
+ * FileTemplateTest.
+ *
+ * Test case for {@link FileTemplate}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see FileTemplate
+ *
+ */
+public class FileTemplateTest {
+
+    protected File file;
+    protected FileTemplate fileTemplate;
+
+    @Before
+    public void setUp() {
+        Preference.register( "JVM", new SystemPropertiesProvider() );
+        file = new File("./test/src/org/tizen/common/verrari/template/test_html.ftl");
+        fileTemplate = new FileTemplate(file);
+    }
+
+    @After
+    public void tearDown() {
+    }
+
+    /**
+     * Test {@link FileTemplate#getEncoding()}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see FileTemplate#getEncoding()
+     */
+    @Test
+    public void test_getEncoding() throws Exception {
+        assertEquals(System.getProperty("file.encoding"), fileTemplate.getEncoding());
+    }
+
+    /**
+     * Test {@link FileTemplate#open()}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see FileTemplate#open()
+     */
+    @Test
+    public void test_open() throws Exception {
+        //assertTrue(fileTemplate.open().);
+        String templateContents;
+        String fileConents;
+
+        InputStream in = null;
+        BufferedReader bufferedReader = null;
+        InputStreamReader streamReader = null;
+        // get FileTemplate contents.
+        try {
+            in = fileTemplate.open(); 
+            streamReader = new InputStreamReader( in, fileTemplate.getEncoding());
+            bufferedReader = new BufferedReader(streamReader, 8192);
+            StringBuilder text = new StringBuilder();
+            final char[] buffer = new char[8192];
+            int nRead = 0;
+            while (0 < (nRead = bufferedReader.read(buffer))) {
+                text.append( buffer, 0, nRead );
+            }
+            templateContents = text.toString();
+        } finally {
+            tryClose( bufferedReader, streamReader, in );
+        }
+
+        // get File contents.
+        try {
+            in = new FileInputStream( file );
+            streamReader = new InputStreamReader( in, System.getProperty("file.encoding"));
+            bufferedReader = new BufferedReader(streamReader, 8192);
+            StringBuilder text = new StringBuilder();
+            final char[] buffer = new char[8192];
+            int nRead = 0;
+            while (0 < (nRead = bufferedReader.read(buffer))) {
+                text.append( buffer, 0, nRead );
+            }
+            fileConents = text.toString();
+        } finally {
+            tryClose( bufferedReader, streamReader, in );
+        }
+
+        assertEquals(templateContents, fileConents);
+    }
+
+}
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/TemplateManagerTest.java b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/TemplateManagerTest.java
new file mode 100755 (executable)
index 0000000..aa88e25
--- /dev/null
@@ -0,0 +1,173 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.template;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.tizen.common.verrari.ITemplate;
+
+/**
+ * StaticTemplateProviderTest.
+ *
+ * Test case for {@link TemplateManager}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see TemplateManager
+ *
+ */
+public class TemplateManagerTest {
+
+    /**
+     * old config value for url handler
+     */
+    protected String oldConfig;
+
+    /**
+     * template manager to use in test case
+     */
+    protected TemplateManager stp;
+
+    /**
+     * Initialze test case
+     */
+    @Before
+    public void setUp() {
+        stp = new TemplateManager();
+        
+        oldConfig = System.getProperty( "java.protocol.handler.pkgs" );
+        System.setProperty( "java.protocol.handler.pkgs", "org.tizen.common.util.url" );
+
+    }
+
+    /**
+     * Clean up test case
+     */
+    @After
+    public void tearDown() {
+        if ( null == oldConfig )
+        {
+            System.clearProperty( "java.protocol.handler.pkgs" );
+        }
+        else
+        {
+            System.setProperty( "java.protocol.handler.pkgs", oldConfig );
+        }
+    }
+
+    /**
+     * Test {@link TemplateManager#addTemplate(String, ITemplate)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see TemplateManager#addTemplate(String, ITemplate)
+     */
+    @Test
+    public void test_addTemplate() throws Exception {
+        assertTrue( stp.isEmpty() );
+        
+        final URLTemplate template = new URLTemplate( "cp:///test_html.ftl" );
+        stp.addTemplate("testhtml", template );
+        assertFalse(stp.isEmpty());
+    }
+
+    /**
+     * Test {@link TemplateManager#getTemplate()}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see TemplateManager#getTemplate()
+     */
+    @Test
+    public void test_getTemplate() throws Exception {
+        assertTrue(stp.isEmpty());
+        final URLTemplate template = new URLTemplate( "cp:///test_html.ftl" );
+        stp.addTemplate("testhtml", template );
+        assertNotNull(stp.getTemplate("testhtml"));
+    }
+
+    /**
+     * Test {@link TemplateManager#removeTemplate(String)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see TemplateManager#removeTemplate(String)
+     */
+    @Test
+    public void test_removeTemplate() throws Exception {
+        assertTrue(stp.isEmpty());
+        stp.addTemplate("testhtml",new URLTemplate( "cp:///test_html.ftl" ) );
+        assertFalse(stp.isEmpty());
+        stp.removeTemplate(null);
+        assertFalse(stp.isEmpty());
+        stp.removeTemplate("testhtml");
+        assertTrue(stp.isEmpty());
+    }
+
+    /**
+     * Test {@link TemplateManager#getTemplates()}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see TemplateManager#getTemplates()
+     */
+    @Test
+    public void test_getTemplates() throws Exception {
+        assertTrue(stp.isEmpty());
+        stp.addTemplate("testhtml", new URLTemplate( "cp:///test_html.ftl" ) );
+        assertFalse(stp.isEmpty());
+
+        Collection<String> templates = stp.keys();
+        assertFalse(templates.isEmpty());
+        assertNotNull(stp.getTemplate("testhtml"));
+    }
+
+    /**
+     * Test {@link TemplateManager#isEmpty()}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see TemplateManager#isEmpty()
+     */
+    @Test
+    public void test_isEmpty() throws Exception {
+        assertTrue(stp.isEmpty());
+        stp.addTemplate("testhtml", new URLTemplate( "cp:///test_html.ftl" ) );
+        assertFalse(stp.isEmpty());
+        stp.removeTemplate("testhtml");
+        assertTrue(stp.isEmpty());
+    }
+
+}
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/TemplateTransformerTest.java b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/TemplateTransformerTest.java
new file mode 100644 (file)
index 0000000..2bf5207
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Verrari - TemplateEngine
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.verrari.template;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.tizen.common.verrari.engine.freemarker.FreemarkerTemplateTransformer;
+
+/**
+ * TemplateTransferTest.
+ *
+ * Test case for {@link TemplateTransformer}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see TemplateTransformer
+ *
+ */
+public class TemplateTransformerTest {
+
+    public static final String source =
+            "This is test case. \n" +
+            "$# this line is comment. \n" +
+            "$# this line is comment. \n" +
+            "$${test1}  $${test2}  $${test3} \n" +
+            "$${test4}  $${test5}  $# $${test6} \n";
+
+    /**
+     * Test {@link TemplateTransformer#templateTranslate(String contents)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see TemplateTransformer#templateTranslate(String contents)
+     */
+    @Test
+    public void test_templateTransfer() throws Exception {
+        String genSource = new FreemarkerTemplateTransformer().templateTranslate(source);
+        assertFalse(genSource.contains("$$"));
+        assertFalse(genSource.contains("$#"));
+        assertFalse(genSource.contains("comment"));
+        assertTrue(genSource.contains("${test1}"));
+        assertTrue(genSource.contains("${test2}"));
+        assertTrue(genSource.contains("${test3}"));
+        assertTrue(genSource.contains("${test4}"));
+        assertTrue(genSource.contains("${test5}"));
+        assertFalse(genSource.contains("${test6}"));
+    }
+
+    /**
+     * Test {@link TemplateTransformer#translateLineComment(String contents)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see TemplateTransformer#translateLineComment(String contents)
+     */
+    @Test
+    public void test_deleteComments() throws Exception {
+        String genSource = new FreemarkerTemplateTransformer().translateLineComment(source);
+        assertFalse(genSource.contains("$#"));
+        assertFalse(genSource.contains("comment"));
+        assertFalse(genSource.contains("$${test6}"));
+        assertTrue(genSource.contains("$$"));
+        assertTrue(genSource.contains("$${test1}"));
+        assertTrue(genSource.contains("$${test2}"));
+        assertTrue(genSource.contains("$${test3}"));
+        assertTrue(genSource.contains("$${test4}"));
+        assertTrue(genSource.contains("$${test5}"));
+    }
+
+}
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/config.xml b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/config.xml
new file mode 100755 (executable)
index 0000000..6e166f3
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget
+       version="1.0"
+       xmlns="http://www.w3.org/ns/widgets"
+       xmlns:tizen="http://tizen.org/ns/widgets"
+       id="http://<{site.domain}>/<{tizne.app.name}>"
+       viewmodes="fullscreen">
+
+       <icon src="<{wac.icon}>"/>
+
+       <content src="<{wac.content}>"/>
+
+       <name><{tizen.app.name}></name>
+
+       <tizen:application id="<{tizen.app.id}>" required_version="1.0"/>
+
+</widget>
diff --git a/org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/test_html.ftl b/org.tizen.common.verrari/test/src/org/tizen/common/verrari/template/test_html.ftl
new file mode 100644 (file)
index 0000000..00ed030
--- /dev/null
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title> ${test_html!'defaultName'} </title>
+</head>
+
+<body>
+</body>
+</html>
old mode 100644 (file)
new mode 100755 (executable)
index c619f68..13f5c5b
@@ -1,8 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-       <classpathentry exported="true" kind="lib" path="sdblib.jar"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-logging-1.1.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-collections-3.2.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-pool-1.6.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-lang3-3.1.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/commons-io-2.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/freemarker.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/log4j-1.2.17.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/slf4j-api-1.6.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="lib/slf4j-log4j12-1.6.4.jar"/>
+       <classpathentry exported="true" kind="lib" path="test/lib/junit-4.10.jar" sourcepath="test/lib/junit-4.10-src.jar"/>
+       <classpathentry exported="true" kind="lib" path="test/lib/mockito-all-1.9.0.jar"/>
+       <classpathentry kind="lib" path="test/lib/asm-4.0.jar"/>
+       <classpathentry kind="lib" path="test/lib/asm-tree-4.0.jar"/>
+       <classpathentry exported="true" kind="lib" path="test/lib/powermock-mockito-1.4.12-full.jar"/>
+       <classpathentry exported="true" kind="lib" path="test/lib/javassist-3.16.1-GA.jar"/>
+       <classpathentry kind="lib" path="lib/ant.jar"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
        <classpathentry kind="src" path="src"/>
+       <classpathentry kind="src" path="test/src"/>
        <classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/org.tizen.common/.settings/org.eclipse.core.resources.prefs b/org.tizen.common/.settings/org.eclipse.core.resources.prefs
new file mode 100644 (file)
index 0000000..05557ba
--- /dev/null
@@ -0,0 +1,3 @@
+#Tue Jun 05 12:49:09 KST 2012
+eclipse.preferences.version=1
+encoding/<project>=utf-8
diff --git a/org.tizen.common/32_TIZEN_SDK_icon.png b/org.tizen.common/32_TIZEN_SDK_icon.png
new file mode 100644 (file)
index 0000000..e511542
Binary files /dev/null and b/org.tizen.common/32_TIZEN_SDK_icon.png differ
old mode 100644 (file)
new mode 100755 (executable)
index 10823da..1b1f517
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
-Bundle-Name: Tizen Common
+Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.tizen.common;singleton:=true
-Bundle-Version: 1.17.0.qualifier
-Bundle-Vendor: Samsung
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %Bundle-Vendor
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
  org.eclipse.ui.ide,
  org.eclipse.core.resources,
- org.eclipse.core.filesystem
+ org.eclipse.core.filesystem,
+ org.junit4;bundle-version="4.8.1";resolution:=optional
 Export-Package: 
- org.tizen.sdblib,
- org.tizen.common.cache,
- org.tizen.common.console,
- org.tizen.common.control,
- org.tizen.common.log,
- org.tizen.common.manager,
- org.tizen.common.model,
- org.tizen.common.properties,
- org.tizen.common.swt,
- org.tizen.common.util
+ freemarker.cache,
+ freemarker.core,
+ freemarker.ext.dom,
+ freemarker.template,
+ junit.framework,
+ org.apache.commons.lang3,
+ org.apache.commons.lang3.builder,
+ org.apache.commons.lang3.concurrent,
+ org.apache.commons.lang3.event,
+ org.apache.commons.lang3.exception,
+ org.apache.commons.lang3.math,
+ org.apache.commons.lang3.mutable,
+ org.apache.commons.lang3.reflect,
+ org.apache.commons.lang3.text,
+ org.apache.commons.lang3.text.translate,
+ org.apache.commons.lang3.time,
+ org.apache.commons.lang3.tuple,
+ org.apache.commons.logging,
+ org.apache.log4j,
+ org.junit,
+ org.junit.experimental,
+ org.junit.experimental.categories,
+ org.junit.experimental.max,
+ org.junit.experimental.results,
+ org.junit.experimental.runners,
+ org.junit.experimental.theories,
+ org.junit.experimental.theories.internal,
+ org.junit.experimental.theories.suppliers,
+ org.junit.internal,
+ org.junit.internal.builders,
+ org.junit.internal.matchers,
+ org.junit.internal.requests,
+ org.junit.internal.runners,
+ org.junit.internal.runners.model,
+ org.junit.internal.runners.rules,
+ org.junit.internal.runners.statements,
+ org.junit.matchers,
+ org.junit.rules,
+ org.junit.runner,
+ org.junit.runner.manipulation,
+ org.junit.runner.notification,
+ org.junit.runners,
+ org.junit.runners.model,
+ org.mockito,
+ org.mockito.asm,
+ org.mockito.asm.signature,
+ org.mockito.asm.tree,
+ org.mockito.asm.tree.analysis,
+ org.mockito.asm.util,
+ org.mockito.cglib.beans,
+ org.mockito.cglib.core,
+ org.mockito.cglib.proxy,
+ org.mockito.cglib.reflect,
+ org.mockito.cglib.transform,
+ org.mockito.cglib.transform.impl,
+ org.mockito.cglib.util,
+ org.mockito.configuration,
+ org.mockito.exceptions,
+ org.mockito.exceptions.base,
+ org.mockito.exceptions.misusing,
+ org.mockito.exceptions.verification,
+ org.mockito.exceptions.verification.junit,
+ org.mockito.internal,
+ org.mockito.internal.configuration,
+ org.mockito.internal.configuration.injection,
+ org.mockito.internal.configuration.injection.filter,
+ org.mockito.internal.creation,
+ org.mockito.internal.creation.cglib,
+ org.mockito.internal.creation.jmock,
+ org.mockito.internal.debugging,
+ org.mockito.internal.exceptions,
+ org.mockito.internal.exceptions.base,
+ org.mockito.internal.exceptions.util,
+ org.mockito.internal.invocation,
+ org.mockito.internal.invocation.finder,
+ org.mockito.internal.invocation.realmethod,
+ org.mockito.internal.listeners,
+ org.mockito.internal.matchers,
+ org.mockito.internal.matchers.apachecommons,
+ org.mockito.internal.progress,
+ org.mockito.internal.reporting,
+ org.mockito.internal.runners,
+ org.mockito.internal.runners.util,
+ org.mockito.internal.stubbing,
+ org.mockito.internal.stubbing.answers,
+ org.mockito.internal.stubbing.defaultanswers,
+ org.mockito.internal.util,
+ org.mockito.internal.util.junit,
+ org.mockito.internal.util.reflection,
+ org.mockito.internal.verification,
+ org.mockito.internal.verification.api,
+ org.mockito.internal.verification.argumentmatching,
+ org.mockito.internal.verification.checkers,
+ org.mockito.invocation,
+ org.mockito.listeners,
+ org.mockito.runners,
+ org.mockito.stubbing,
+ org.mockito.stubbing.answers,
+ org.mockito.verification,
+ org.powermock.api.extension.listener,
+ org.powermock.api.extension.proxyframework,
+ org.powermock.api.mockito,
+ org.powermock.api.mockito.expectation,
+ org.powermock.api.mockito.internal,
+ org.powermock.api.mockito.internal.configuration,
+ org.powermock.api.mockito.internal.expectation,
+ org.powermock.api.mockito.internal.invocationcontrol,
+ org.powermock.api.mockito.internal.mockcreation,
+ org.powermock.api.mockito.internal.verification,
+ org.powermock.api.mockito.mockpolicies,
+ org.powermock.api.mockito.powermocklistener,
+ org.powermock.api.mockito.verification,
+ org.powermock.api.support,
+ org.powermock.api.support.membermodification,
+ org.powermock.api.support.membermodification.strategy,
+ org.powermock.api.support.membermodification.strategy.impl,
+ org.powermock.classloading,
+ org.powermock.classloading.spi,
+ org.powermock.core,
+ org.powermock.core.classloader,
+ org.powermock.core.classloader.annotations,
+ org.powermock.core.spi,
+ org.powermock.core.spi.listener,
+ org.powermock.core.spi.support,
+ org.powermock.core.spi.testresult,
+ org.powermock.core.spi.testresult.impl,
+ org.powermock.core.testlisteners,
+ org.powermock.core.transformers,
+ org.powermock.core.transformers.impl,
+ org.powermock.mockpolicies,
+ org.powermock.mockpolicies.impl,
+ org.powermock.mockpolicies.support,
+ org.powermock.modules.junit3,
+ org.powermock.modules.junit3.internal,
+ org.powermock.modules.junit3.internal.impl,
+ org.powermock.modules.junit4,
+ org.powermock.modules.junit4.common.internal,
+ org.powermock.modules.junit4.common.internal.impl,
+ org.powermock.modules.junit4.internal.impl,
+ org.powermock.modules.junit4.internal.impl.testcaseworkaround,
+ org.powermock.modules.junit4.legacy,
+ org.powermock.modules.junit4.legacy.internal.impl,
+ org.powermock.modules.junit4.legacy.internal.impl.testcaseworkaround,
+ org.powermock.modules.testng,
+ org.powermock.modules.testng.internal,
+ org.powermock.reflect,
+ org.powermock.reflect.exceptions,
+ org.powermock.reflect.internal,
+ org.powermock.reflect.internal.matcherstrategies,
+ org.powermock.reflect.internal.primitivesupport,
+ org.powermock.reflect.matching,
+ org.powermock.reflect.proxyframework,
+ org.powermock.reflect.spi,
+ org.powermock.tests.utils,
+ org.powermock.tests.utils.impl,
+ org.slf4j,
+ org.tizen.common,
+ org.tizen.common.classloader,
+ org.tizen.common.config,
+ org.tizen.common.config.loader,
+ org.tizen.common.config.provider,
+ org.tizen.common.core.application,
+ org.tizen.common.core.command,
+ org.tizen.common.core.command.file,
+ org.tizen.common.core.command.policy,
+ org.tizen.common.core.command.prompter,
+ org.tizen.common.core.command.sdb,
+ org.tizen.common.core.command.zip,
+ org.tizen.common.daemon,
+ org.tizen.common.file,
+ org.tizen.common.file.filter,
+ org.tizen.common.rds,
+ org.tizen.common.rds.ui.preference,
+ org.tizen.common.ui,
+ org.tizen.common.ui.dialog,
+ org.tizen.common.ui.page.preference,
+ org.tizen.common.ui.page.wizard,
+ org.tizen.common.ui.view.console,
+ org.tizen.common.ui.widget,
+ org.tizen.common.util,
+ org.tizen.common.util.cache,
+ org.tizen.common.util.io,
+ org.tizen.common.util.log,
+ org.tizen.common.util.url.classpath,
+ org.tizen.common.util.url.cp,
+ org.tizen.common.util.url.vf
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Import-Package: 
  org.eclipse.jface.text,
- org.eclipse.ui.console
+ org.eclipse.ui.console,
+ org.tizen.sdblib
 Bundle-Activator: org.tizen.common.CommonPlugin
 Bundle-ActivationPolicy: lazy
-Bundle-ClassPath: sdblib.jar,
- .
+Bundle-ClassPath: .,
+ lib/log4j-1.2.17.jar,
+ lib/slf4j-api-1.6.4.jar,
+ lib/slf4j-log4j12-1.6.4.jar,
+ lib/freemarker.jar,
+ lib/commons-io-2.4.jar,
+ lib/commons-lang3-3.1.jar,
+ lib/commons-collections-3.2.1.jar,
+ lib/commons-pool-1.6.jar,
+ lib/commons-logging-1.1.1.jar
index 99ec9ad..36f81dc 100644 (file)
@@ -1,3 +1,26 @@
+Bundle-Name = Tizen SDK Common Tools
+Bundle-Vendor = The Linux Foundation
+
 activity.name = newXsdDisabler
 activity.name.0 = newDtdDisabler
-activity.name.1 = ValidateMenuItemDisabler
\ No newline at end of file
+activity.name.1 = ValidateMenuItemDisabler
+
+name = Tizen
+page.name = Tizen SDK
+activity.description = Popup UI
+activity.name.2 = Popup UI
+category.description = Disable CDT launch UI when Native App Perspective is activated.
+category.name.0 = CDT launch UI
+activity.description.0 = Launch UI elements from CDT
+activity.name.3 = CDT Launch UI Elements
+category.description.0 = Disable CDT Toolchain Editor Page when Tizen Perspective is activated.
+category.name.1 = CDT ToolChain Editor Page
+activity.description.1 = ToolChain Editor Property Page
+activity.name.4 = CDT ToolChain Editor Page Elements
+activity.description.2 = Wizard UI
+activity.name.5 = Wizard UI
+activity.description.3 = PopupMenus
+activity.name.6 = PopupMenus
+extension-point.name = Prompter
+RDS.name=Rapid Development Support
+crashreporter = Crash Reporter
\ No newline at end of file
index 95bb5ff..d713227 100644 (file)
@@ -37,5 +37,17 @@ A copy of the license is included in <a href="about_files/epl-v10.html">about_fi
 </ul>
 </p>
 
+<h4>FreeMarker</h4>
+<p>
+FreeMarker is a "template engine"; a generic tool to generate text output (anything from HTML to autogenerated source code) based on templates. It's a Java package, a class library for Java programmers. It's not an application for end-users in itself, but something that programmers can embed into their products.
+</p>
+
+<p>
+A copy of the license is included in <a href="about_files/freemarker-LICENSE.txt">about_files/freemarker-LICENSE.txt</a>. The home page is located at:
+<ul>
+<a href="http://freemarker.sourceforge.net/">http://freemarker.sourceforge.net/</a>
+</ul>
+</p>
+
 </body>
 </html>
\ No newline at end of file
diff --git a/org.tizen.common/about.ini b/org.tizen.common/about.ini
new file mode 100644 (file)
index 0000000..fc8fa16
--- /dev/null
@@ -0,0 +1,32 @@
+# about.ini
+# contains information about a feature
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# "%key" are externalized strings defined in about.properties
+# This file does not need to be translated.
+
+# Property "aboutText" contains blurb for "About" dialog (translated)
+aboutText=%blurb
+
+# Property "windowImage" contains path to window icon (16x16)
+# needed for primary features only
+
+# Property "featureImage" contains path to feature image (32x32)
+featureImage=32_TIZEN_SDK_icon.png
+
+# Property "aboutImage" contains path to product image (500x330 or 115x164)
+# needed for primary features only
+
+# Property "appName" contains name of the application (translated)
+# needed for primary features only
+
+# Property "welcomePage" contains path to welcome page (special XML-based format)
+# welcomePage=$nl$/welcome.xml
+
+# Property "welcomePerspective" contains the id of the perspective in which the
+# welcome page is to be opened.
+# optional
+
+# Property "tipsAndTricksHref" contains the Help topic href to a tips and tricks page 
+# optional
+# tipsAndTricksHref=/org.tizen.doc.user/tips/tizen_tips.htm
+
diff --git a/org.tizen.common/about.mappings b/org.tizen.common/about.mappings
new file mode 100644 (file)
index 0000000..361d43c
--- /dev/null
@@ -0,0 +1,6 @@
+# about.mappings
+# contains fill-ins for about.properties and bundle.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+0=Tzen SDK Common Tools
+1=date-time
diff --git a/org.tizen.common/about.properties b/org.tizen.common/about.properties
new file mode 100644 (file)
index 0000000..5c2e80a
--- /dev/null
@@ -0,0 +1,12 @@
+# about.properties
+# contains externalized strings for about.ini
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# fill-ins are supplied by about.mappings
+# This file should be translated.
+
+blurb={0}\n\
+\n\
+Version : {featureVersion}\n\
+Build id : {1}\n\
+\n\
+Visit https://developer.tizen.org \n
\ No newline at end of file
diff --git a/org.tizen.common/about_files/freemarker-LICENSE.txt b/org.tizen.common/about_files/freemarker-LICENSE.txt
new file mode 100644 (file)
index 0000000..4c5f086
--- /dev/null
@@ -0,0 +1,69 @@
+FreeMarker 1.x was released under the LGPL license. Later, by community\r
+consensus, we have switched over to a BSD-style license. As of FreeMarker\r
+2.2pre1, the original author, Benjamin Geer, has relinquished the copyright in\r
+behalf of Visigoth Software Society. The current copyright holder is the\r
+Visigoth Software Society.\r
+\r
+------------------------------------------------------------------------------\r
+Copyright (c) 2003 The Visigoth Software Society. All rights reserved.\r
+\r
+Redistribution and use in source and binary forms, with or without\r
+modification, are permitted provided that the following conditions are met:\r
+\r
+1.  Redistributions of source code must retain the above copyright notice,\r
+    this list of conditions and the following disclaimer.\r
+\r
+2.  The end-user documentation included with the redistribution, if any, must\r
+    include the following acknowlegement:\r
+      "This product includes software developed by the \r
+      Visigoth Software Society (http://www.visigoths.org/)."\r
+    Alternately, this acknowlegement may appear in the software itself, if and\r
+    wherever such third-party acknowlegements normally appear.\r
+\r
+3.  Neither the name "FreeMarker", "Visigoth", nor any of the names of the\r
+    project contributors may be used to endorse or promote products derived\r
+    from this software without prior written permission. For written\r
+    permission, please contact visigoths@visigoths.org.\r
+\r
+4.  Products derived from this software may not be called "FreeMarker" or\r
+    "Visigoth" nor may "FreeMarker" or "Visigoth" appear in their names\r
+    without prior written permission of the Visigoth Software Society.\r
+\r
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\r
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\r
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\r
+VISIGOTH SOFTWARE SOCIETY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+------------------------------------------------------------------------------\r
+\r
+This software consists of voluntary contributions made by many individuals on\r
+behalf of the Visigoth Software Society. For more information on the Visigoth\r
+Software Society, please see http://www.visigoths.org/\r
+\r
+------------------------------------------------------------------------------\r
+\r
+FREEMARKER SUBCOMPONENTS UNDER DIFFERENT LICENSE:\r
+\r
+FreeMarker includes a number of subcomponents that are licensed by the Apache\r
+Software Foundation under the Apache License, Version 2.0. Your use of these\r
+subcomponents is subject to the terms and conditions of the Apache License,\r
+Version 2.0. You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+    \r
+The subcomponents under this licence are the following files, which are\r
+included both in freemarker.jar and in the source code:\r
+  \r
+    freemarker/ext/jsp/web-app_2_2.dtd\r
+    freemarker/ext/jsp/web-app_2_3.dtd\r
+    freemarker/ext/jsp/web-app_2_4.xsd\r
+    freemarker/ext/jsp/web-app_2_5.xsd\r
+    freemarker/ext/jsp/web-jsptaglibrary_1_1.dtd\r
+    freemarker/ext/jsp/web-jsptaglibrary_1_2.dtd\r
+    freemarker/ext/jsp/web-jsptaglibrary_2_0.xsd\r
+    freemarker/ext/jsp/web-jsptaglibrary_2_1.xsd\r
old mode 100644 (file)
new mode 100755 (executable)
index 889acff..c0e18c7
@@ -1,11 +1,24 @@
-source.. = src/\r
-output.. = bin/\r
+#Wed, 14 Nov 2012 12:16:43 +0900\r
+source..=src/\r
+output..=bin/\r
 bin.includes = META-INF/,\\r
                .,\\r
                icons/,\\r
-               sdblib.jar,\\r
                about.html,\\r
                about_files/,\\r
-               plugin.xml\r
-javacSource = 1.6
-javacTarget = 1.6
+               plugin.xml,\\r
+               lib/,\\r
+               lib/commons-io-2.4.jar,\\r
+               lib/commons-lang3-3.1.jar,\\r
+               lib/commons-collections-3.2.1.jar,\\r
+               lib/commons-pool-1.6.jar,\\r
+               OSGI-INF/,\\r
+               OSGI-INF/l10n/bundle.properties,\\r
+               lib/commons-logging-1.1.1.jar,\\r
+               32_TIZEN_SDK_icon.png,\\r
+               about.ini,\\r
+               about.properties,\\r
+               about.mappings,\\r
+               schema/\r
+javacSource=1.6\r
+javacTarget=1.6\r
diff --git a/org.tizen.common/icons/back.gif b/org.tizen.common/icons/back.gif
new file mode 100644 (file)
index 0000000..4fb4150
Binary files /dev/null and b/org.tizen.common/icons/back.gif differ
diff --git a/org.tizen.common/icons/forward.gif b/org.tizen.common/icons/forward.gif
new file mode 100644 (file)
index 0000000..e2f8c3e
Binary files /dev/null and b/org.tizen.common/icons/forward.gif differ
diff --git a/org.tizen.common/icons/msg_close_hover.png b/org.tizen.common/icons/msg_close_hover.png
new file mode 100644 (file)
index 0000000..9ccad05
Binary files /dev/null and b/org.tizen.common/icons/msg_close_hover.png differ
diff --git a/org.tizen.common/icons/msg_close_normal.png b/org.tizen.common/icons/msg_close_normal.png
new file mode 100644 (file)
index 0000000..392bf6b
Binary files /dev/null and b/org.tizen.common/icons/msg_close_normal.png differ
diff --git a/org.tizen.common/icons/msg_close_push.png b/org.tizen.common/icons/msg_close_push.png
new file mode 100644 (file)
index 0000000..804eac7
Binary files /dev/null and b/org.tizen.common/icons/msg_close_push.png differ
diff --git a/org.tizen.common/lib/ant.jar b/org.tizen.common/lib/ant.jar
new file mode 100644 (file)
index 0000000..b3a94df
Binary files /dev/null and b/org.tizen.common/lib/ant.jar differ
diff --git a/org.tizen.common/lib/commons-collections-3.2.1.jar b/org.tizen.common/lib/commons-collections-3.2.1.jar
new file mode 100644 (file)
index 0000000..c35fa1f
Binary files /dev/null and b/org.tizen.common/lib/commons-collections-3.2.1.jar differ
diff --git a/org.tizen.common/lib/commons-io-2.4.jar b/org.tizen.common/lib/commons-io-2.4.jar
new file mode 100644 (file)
index 0000000..90035a4
Binary files /dev/null and b/org.tizen.common/lib/commons-io-2.4.jar differ
diff --git a/org.tizen.common/lib/commons-lang3-3.1.jar b/org.tizen.common/lib/commons-lang3-3.1.jar
new file mode 100644 (file)
index 0000000..a85e539
Binary files /dev/null and b/org.tizen.common/lib/commons-lang3-3.1.jar differ
diff --git a/org.tizen.common/lib/commons-logging-1.1.1.jar b/org.tizen.common/lib/commons-logging-1.1.1.jar
new file mode 100644 (file)
index 0000000..1deef14
Binary files /dev/null and b/org.tizen.common/lib/commons-logging-1.1.1.jar differ
diff --git a/org.tizen.common/lib/commons-pool-1.6.jar b/org.tizen.common/lib/commons-pool-1.6.jar
new file mode 100644 (file)
index 0000000..72ca75a
Binary files /dev/null and b/org.tizen.common/lib/commons-pool-1.6.jar differ
diff --git a/org.tizen.common/lib/freemarker.jar b/org.tizen.common/lib/freemarker.jar
new file mode 100644 (file)
index 0000000..b3673e2
Binary files /dev/null and b/org.tizen.common/lib/freemarker.jar differ
diff --git a/org.tizen.common/lib/log4j-1.2.17.jar b/org.tizen.common/lib/log4j-1.2.17.jar
new file mode 100644 (file)
index 0000000..068867e
Binary files /dev/null and b/org.tizen.common/lib/log4j-1.2.17.jar differ
diff --git a/org.tizen.common/lib/slf4j-api-1.6.4.jar b/org.tizen.common/lib/slf4j-api-1.6.4.jar
new file mode 100644 (file)
index 0000000..4d23f41
Binary files /dev/null and b/org.tizen.common/lib/slf4j-api-1.6.4.jar differ
diff --git a/org.tizen.common/lib/slf4j-log4j12-1.6.4.jar b/org.tizen.common/lib/slf4j-log4j12-1.6.4.jar
new file mode 100644 (file)
index 0000000..daa3aa1
Binary files /dev/null and b/org.tizen.common/lib/slf4j-log4j12-1.6.4.jar differ
index bbe192e..68a79c7 100644 (file)
@@ -1,25 +1,48 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
 <?eclipse version="3.4"?>\r
 <plugin>\r
+    <extension-point id="org.tizen.common.prompter" name="%extension-point.name" schema="schema/org.tizen.common.prompter.exsd"/>\r
+    <extension-point id="org.tizen.common.crashreporter" name="%crashreporter" schema="schema/org.tizen.common.crashreporter.exsd"/>\r
+    <extension\r
+        point="org.eclipse.ui.bindings">\r
+        <key\r
+            commandId="org.eclipse.ui.project.buildProject"\r
+            contextId="org.eclipse.ui.contexts.window"\r
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"\r
+            sequence="F10">\r
+        </key>\r
+        <key\r
+            commandId="org.eclipse.ui.project.buildProject"\r
+            contextId="org.eclipse.ui.contexts.window"\r
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"\r
+            sequence="M1+M2+F10">\r
+        </key>\r
+    </extension>\r
     <extension\r
         point="org.eclipse.ui.newWizards">\r
         <category\r
             id="org.tizen.nativeapp.newCategory"\r
-            name="Tizen">\r
+            name="%name">\r
         </category>\r
     </extension>\r
     <extension\r
         point="org.eclipse.ui.preferencePages">\r
         <page\r
-            class="org.tizen.common.preferences.TizenBasePreferencePage"\r
+            class="org.tizen.common.ui.page.preference.TizenBasePreferencePage"\r
             id="org.tizen.common.preferences.tizencommon"\r
-            name="Tizen SDK">\r
+            name="%page.name">\r
         </page>\r
+        <page\r
+             category="org.tizen.common.preferences.tizencommon"\r
+             class="org.tizen.common.rds.ui.preference.RdsPreferencePage"\r
+             id="org.tizen.common.preferences.rds"\r
+             name="%RDS.name">\r
+       </page>\r
     </extension>\r
     <extension\r
         point="org.eclipse.ui.startup">\r
         <startup\r
-            class="org.tizen.common.util.UpdateManager">\r
+            class="org.tizen.common.core.application.UpdateManager">\r
         </startup>\r
     </extension>\r
     <!-- activities start -->\r
         point="org.eclipse.ui.activities">\r
         <!-- disable rhino lauch shortcuts & wst launch shortcut -->\r
         <activity\r
-            name="Popup UI"\r
-            description="Popup UI"\r
+            name="%activity.name.2"\r
+            description="%activity.description"\r
             id="org.tizen.web.launch.DisablePopupMenu">\r
         <enabledWhen>\r
             <with variable="activeWorkbenchWindow.activePerspective">\r
                 <and>\r
                     <not>\r
-                        <equals value="org.tizen.web.ui.perspective.WACwidget"/>\r
+                        <equals value="org.tizen.web.ui.perspective.WebWidget"/>\r
                     </not>\r
                     <not>\r
                         <equals value="org.tizen.nativeapp.perspective"/>\r
                     </not>\r
+                    <not>\r
+                        <equals value="org.tizen.nativeplatform.perspective"/>\r
+                    </not>                    \r
+                    <not>\r
+                        <equals value="org.tizen.webguibuilder.BuilderPerspective"/>\r
+                    </not>\r
                 </and>\r
             </with>\r
         </enabledWhen>\r
         point="org.eclipse.ui.activities">\r
         <!-- disable CDT launch ui -->\r
         <category\r
-            name="CDT launch UI"\r
-            description="Disable CDT launch UI when Native App Perspective is activated."\r
+            name="%category.name.0"\r
+            description="%category.description"\r
             id="org.tizen.nativeapp.CDTLaunchUICategory">\r
          </category>\r
 \r
         <activity\r
-            name="CDT Launch UI Elements"\r
-            description="Launch UI elements from CDT"\r
+            name="%activity.name.3"\r
+            description="%activity.description.0"\r
             id="org.tizen.nativeapp.DisableCDTLaunchUIActivity">\r
 \r
             <enabledWhen>\r
                 <with variable="activeWorkbenchWindow.activePerspective">\r
                     <and>\r
                         <not>\r
-                            <equals value="org.tizen.web.ui.perspective.WACwidget"/>\r
+                            <equals value="org.tizen.web.ui.perspective.WebWidget"/>\r
                         </not>\r
                         <not>\r
                             <equals value="org.tizen.nativeapp.perspective"/>\r
                         </not>\r
+                       <not>\r
+                               <equals value="org.tizen.nativeplatform.perspective"/>\r
+                       </not>                        \r
+                        <not>\r
+                            <equals value="org.tizen.webguibuilder.BuilderPerspective"/>\r
+                        </not>\r
                     </and>\r
                 </with>\r
             </enabledWhen>\r
 \r
         <!-- disable CDT toolchain editor page -->\r
         <category\r
-              description="Disable CDT Toolchain Editor Page when Tizen Perspective is activated."\r
+              description="%category.description.0"\r
               id="org.tizen.nativeapp.CDTToolChainEditorPageCategory"\r
-              name="CDT ToolChain Editor Page">\r
+              name="%category.name.1">\r
         </category>\r
         <activity\r
-              description="ToolChain Editor Property Page"\r
+              description="%activity.description.1"\r
               id="org.tizen.nativeapp.DisableCDTToolChainEditorPageActivity"\r
-              name="CDT ToolChain Editor Page Elements">\r
+              name="%activity.name.4">\r
             <enabledWhen>\r
                 <with variable="activeWorkbenchWindow.activePerspective">\r
                     <and>\r
                         <not>\r
-                            <equals value="org.tizen.web.ui.perspective.WACwidget"/>\r
+                            <equals value="org.tizen.web.ui.perspective.WebWidget"/>\r
                         </not>\r
                         <not>\r
                             <equals value="org.tizen.nativeapp.perspective"/>\r
                         </not>\r
+                       <not>\r
+                               <equals value="org.tizen.nativeplatform.perspective"/>\r
+                       </not>                         \r
+                        <not>\r
+                            <equals value="org.tizen.webguibuilder.BuilderPerspective"/>\r
+                        </not>\r
                     </and>\r
                 </with>\r
             </enabledWhen>\r
 \r
 \r
         <activity\r
-            name="Wizard UI"\r
-            description="Wizard UI"\r
+            name="%activity.name.5"\r
+            description="%activity.description.2"\r
             id="org.tizen.web.DisableWizardsActivity">\r
             <enabledWhen>\r
                 <with variable="activeWorkbenchWindow.activePerspective">\r
                     <and>\r
                         <not>\r
-                            <equals value="org.tizen.web.ui.perspective.WACwidget"/>\r
+                            <equals value="org.tizen.web.ui.perspective.WebWidget"/>\r
                         </not>\r
                         <not>\r
                             <equals value="org.tizen.nativeapp.perspective"/>\r
                         </not>\r
+                       <not>\r
+                               <equals value="org.tizen.nativeplatform.perspective"/>\r
+                       </not>                         \r
+                        <not>\r
+                            <equals value="org.tizen.webguibuilder.BuilderPerspective"/>\r
+                        </not>\r
                     </and>\r
                 </with>\r
             </enabledWhen>\r
         </activity>\r
         <activityPatternBinding\r
             activityId="org.tizen.web.DisableWizardsActivity"\r
-            pattern="com\.samsung\.tizen\.guibuilder/com\.samsung\.tizen\.guibuilder\.wizard\.newSgmWizard">\r
-        </activityPatternBinding>\r
-        <activityPatternBinding\r
-            activityId="org.tizen.web.DisableWizardsActivity"\r
             pattern="org\.eclipse\.jdt\.ui/org\.eclipse\.jdt\.ui\.wizards\.JavaProjectWizard">\r
         </activityPatternBinding>\r
         <activityPatternBinding\r
             activityId="org.tizen.web.DisableWizardsActivity"\r
             pattern="org\.eclipse\.wst\.xml\.ui/org\.eclipse\.wst\.xml\.ui\.XMLExampleProjectCreationWizard">\r
         </activityPatternBinding>\r
-        <activityPatternBinding\r
-            activityId="org.tizen.web.DisableWizardsActivity"\r
-            pattern="org\.eclipse\.wst\.web\.ui/org\.eclipse\.wst\.web\.ui\.internal\.wizards\.SimpleWebProjectWizard">\r
-        </activityPatternBinding>\r
 \r
 \r
         <activityPatternBinding\r
         </activityPatternBinding>\r
         <activityPatternBinding\r
             activityId="org.tizen.web.DisableWizardsActivity"\r
-            pattern="org\.eclipse\.wst\.jsdt\.ui/org\.eclipse\.wst\.jsdt\.ui\.wizards\.JavaProjectWizard">\r
-        </activityPatternBinding>\r
-        <activityPatternBinding\r
-            activityId="org.tizen.web.DisableWizardsActivity"\r
-            pattern="org\.eclipse\.wst\.jsdt\.ui/org\.eclipse\.wst\.jsdt\.ui\.NewJSWizard">\r
-        </activityPatternBinding>\r
-        <activityPatternBinding\r
-            activityId="org.tizen.web.DisableWizardsActivity"\r
             pattern="org\.eclipse\.jst\.jsp\.ui/org\.eclipse\.jst\.jsp\.ui\.internal\.wizard.*">\r
         </activityPatternBinding>\r
         <activityPatternBinding\r
             activityId="org.tizen.web.DisableWizardsActivity"\r
-            pattern="org\.eclipse\.wst\.html\.ui/org\.eclipse\.wst\.html\.ui\.internal\.wizard\.NewHTMLWizard">\r
-        </activityPatternBinding>\r
-        <activityPatternBinding\r
-            activityId="org.tizen.web.DisableWizardsActivity"\r
-            pattern="org\.eclipse\.wst\.css\.ui/org\.eclipse\.wst\.css\.ui\.internal\.wizard\.NewCSSWizard">\r
-        </activityPatternBinding>\r
-        <activityPatternBinding\r
-            activityId="org.tizen.web.DisableWizardsActivity"\r
             pattern="org\.eclipse\.emf\.codegen\.ui/org\.eclipse\.emf\.codegen\.ui\.ConvertToJETProjectWizard">\r
         </activityPatternBinding>\r
         <activityPatternBinding\r
             activityId="org.tizen.web.DisableWizardsActivity"\r
             pattern="org\.eclipse\.wst\.dtd\.ui/org\.eclipse\.wst\.dtd\.ui\.internal\.wizard\.NewDTDWizard">\r
         </activityPatternBinding>\r
-        <activityPatternBinding\r
+        <!-- JSON File Wizard -->\r
+        <!-- activityPatternBinding\r
             activityId="org.tizen.web.DisableWizardsActivity"\r
             pattern="json\.editor\.plugin/Json\.newFileWizard">\r
-        </activityPatternBinding>\r
+        </activityPatternBinding-->\r
         <activityPatternBinding\r
             activityId="org.tizen.web.DisableWizardsActivity"\r
             pattern="org\.eclipse\.wst\.xml\.ui/org\.eclipse\.wst\.xml\.ui\.internal\.wizards\.NewXMLWizard">\r
         point="org.eclipse.ui.activities">\r
         <!-- PopupMenus Enabled when tizen Web IDE perspective -->\r
         <activity\r
-            description="PopupMenus"\r
+            description="%activity.description.3"\r
             id="org.tizen.web.PopupMenusActivity"\r
-            name="PopupMenus">\r
+            name="%activity.name.6">\r
             <enabledWhen>\r
+                <and>\r
                 <with\r
                     variable="activeWorkbenchWindow.activePerspective">\r
                     <and>\r
                         <equals\r
-                            value="org.tizen.web.ui.perspective.WACwidget">\r
+                            value="org.tizen.web.ui.perspective.WebWidget">\r
                         </equals>\r
                     </and>\r
                 </with>\r
+                <with variable="selection">\r
+                    <iterate ifEmpty="false">\r
+                        <test property="org.eclipse.core.resources.projectNature"\r
+                            value="org.tizen.web.project.builder.WebNature" />\r
+                    </iterate>\r
+                </with>\r
+                </and>\r
             </enabledWhen>\r
         </activity>\r
         <activityPatternBinding\r
              pattern="org.tizen.web.localization/org.tizen.web.localization.menus.popup.localizationMenu">\r
        </activityPatternBinding>\r
     </extension>\r
+    <extension\r
+          point="org.eclipse.ui.importWizards">\r
+       <category\r
+             id="org.tizen.nativeapp.importCategory"\r
+             name="%name">\r
+       </category>\r
+    </extension>\r
+    <extension\r
+          point="org.eclipse.ui.exportWizards">\r
+       <category\r
+             id="org.tizen.nativeapp.exportCategory"\r
+             name="%name">\r
+       </category>\r
+    </extension>\r
+    <extension\r
+          point="org.eclipse.ui.propertyPages">\r
+       <page\r
+             class="org.tizen.common.ui.page.properties.TizenProperties"\r
+             id="org.tizen.common.properties.tizen"\r
+             name="%page.name">\r
+          <enabledWhen>\r
+             <adapt\r
+                   type="org.eclipse.core.resources.IResource">\r
+                <test\r
+                      property="org.eclipse.core.resources.IProject">\r
+                </test>\r
+             </adapt>\r
+          </enabledWhen>\r
+       </page>\r
+       <page\r
+            category="org.tizen.common.properties.tizen"\r
+            class="org.tizen.common.rds.ui.preference.RdsPreferencePage"\r
+            id="org.tizen.common.properties.rds"\r
+            name="%RDS.name">\r
+          <enabledWhen>\r
+             <adapt\r
+                   type="org.eclipse.core.resources.IResource">\r
+                <test\r
+                      property="org.eclipse.core.resources.IProject">\r
+                </test>\r
+             </adapt>\r
+          </enabledWhen>\r
+      </page>\r
+    </extension>\r
     <!-- activities end -->\r
 </plugin>
diff --git a/org.tizen.common/schema/org.tizen.common.crashreporter.exsd b/org.tizen.common/schema/org.tizen.common.crashreporter.exsd
new file mode 100644 (file)
index 0000000..8243206
--- /dev/null
@@ -0,0 +1,110 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.tizen.common" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appinfo>
+         <meta.schema plugin="org.tizen.common" id="org.tizen.common.crashreporter" name="%crashreporter"/>
+      </appinfo>
+      <documentation>
+         The crashreporter point provides how to register cs reporter service listener.
+
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appinfo>
+            <meta.element />
+         </appinfo>
+      </annotation>
+      <complexType>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="client">
+      <complexType>
+         <attribute name="class" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java" basedOn=":org.tizen.sdblib.ICrashReportServiceListener"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="since"/>
+      </appinfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="examples"/>
+      </appinfo>
+      <documentation>
+         &lt;extension
+        id=&quot;org.tizen.nativecpp.csviewer.crashreporter&quot;
+            name=&quot;crashreporter&quot;
+            point=&quot;org.tizen.common.crashreporter&quot;&gt;
+        &lt;client
+            class=&quot;org.tizen.nativecpp.csviewer.CrashReportServiceListener&quot;&gt;
+        &lt;/client&gt;
+&lt;/extension&gt;
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="apiinfo"/>
+      </appinfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="implementation"/>
+      </appinfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>
diff --git a/org.tizen.common/schema/org.tizen.common.prompter.exsd b/org.tizen.common/schema/org.tizen.common.prompter.exsd
new file mode 100644 (file)
index 0000000..cb67108
--- /dev/null
@@ -0,0 +1,109 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.tizen.common" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appinfo>
+         <meta.schema plugin="org.tizen.common" id="org.tizen.common.prompter" name="Prompter"/>
+      </appinfo>
+      <documentation>
+         [Enter description of this extension point.]
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appinfo>
+            <meta.element />
+         </appinfo>
+      </annotation>
+      <complexType>
+         <choice minOccurs="1" maxOccurs="unbounded">
+            <element ref="prompter"/>
+         </choice>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="prompter">
+      <complexType>
+         <attribute name="scope" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java" basedOn=":org.tizen.common.core.command.Prompter"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="since"/>
+      </appinfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="examples"/>
+      </appinfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="apiinfo"/>
+      </appinfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="implementation"/>
+      </appinfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>
diff --git a/org.tizen.common/src/org/tizen/common/Adaptable.java b/org.tizen.common/src/org/tizen/common/Adaptable.java
new file mode 100755 (executable)
index 0000000..3339849
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common;
+
+/**
+ * <p>
+ * Adaptable.
+ * 
+ * Class for adapter pattern
+ *
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public interface
+Adaptable
+{
+       /**
+        * Adapt to new type interface or class
+        * 
+        * @param <T> new type
+        * @param clazz new type class
+        * 
+        * @return object to adapt to
+        */
+       <T> T adapt( Class<T> clazz );
+}
diff --git a/org.tizen.common/src/org/tizen/common/AdaptableWithArgument.java b/org.tizen.common/src/org/tizen/common/AdaptableWithArgument.java
new file mode 100755 (executable)
index 0000000..ca18c95
--- /dev/null
@@ -0,0 +1,53 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common;\r
+\r
+/**\r
+ * <p>\r
+ * AdaptableWithArgument.\r
+ * \r
+ * Class for adapter pattern\r
+ *\r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public interface\r
+AdaptableWithArgument\r
+{\r
+    /**\r
+     * Adapt to new type interface or class with <code>arg</code>\r
+     * \r
+     * @param <T> adapter type\r
+     * @param <A> argument type\r
+     * \r
+     * @param clazz new type class\r
+     * @param arg argument for adapter\r
+     * \r
+     * @return object to adapt to\r
+     */\r
+    <T, A> T adapt( Class<T> clazz, A arg );\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/AppIdGenerator.java b/org.tizen.common/src/org/tizen/common/AppIdGenerator.java
new file mode 100755 (executable)
index 0000000..95d5406
--- /dev/null
@@ -0,0 +1,167 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common;
+
+import java.math.BigInteger;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.security.SecureRandom;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.KeyGenerator;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.SecretKeySpec;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Appid generator.
+ * It is consist of 0-9, a-z, A-Z
+ */
+public class AppIdGenerator implements Factory<String> {
+    final Logger logger = LoggerFactory.getLogger( AppIdGenerator.class );
+
+    /**
+     * Singline instance
+     */
+    protected static AppIdGenerator instance = new AppIdGenerator();
+
+    /**
+     * get AppIdGenerator factory instance.
+     *
+     * @return AppIdGenerator
+     */
+    public static AppIdGenerator getInstance() {
+        return instance;
+    }
+
+    /**
+     * Generate an AppID of length 10.
+     *
+     * @return String AppID
+     */
+    @Override
+    public String create() {
+        try {
+            return generate();
+        } catch (Exception e) {
+            logger.error( "Exception occurred:", e );
+            return "";
+        }
+    }
+
+    final char[] PSEUDO_CHARS = { '0', '1', '2', '3', '4', '5', '6', '7',
+            '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',
+            'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
+            'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
+            'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
+            'y', 'z' };
+
+    final BigInteger PSEUDO_CHAR_SIZE = new BigInteger("62");
+
+    // Reserved AppID (or prefix)
+    static final String RESERVED_APPID [] = {
+                                            "TIZEN",
+                                            "PRIVT",
+                                            "WIDGT"
+                                            };
+    private String convertBytesToAlphaNumeric(byte in[], int size) {
+        BigInteger randomBigInt = new BigInteger(in).abs();
+        StringBuffer out = new StringBuffer(size + 1);
+
+        for (int i = 0; i < size; ++i) {
+            BigInteger[] dividedAndremainder = randomBigInt.divideAndRemainder(PSEUDO_CHAR_SIZE);
+            randomBigInt = dividedAndremainder[0];
+            out.append(PSEUDO_CHARS[dividedAndremainder[1].intValue()]);
+        }
+
+        String ret = new String(out);
+        return ret;
+    }
+
+    private byte[] generateRandomBytes(int size)
+    throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException
+    {
+        SecureRandom random = new SecureRandom();
+        KeyGenerator keyGen = KeyGenerator.getInstance("AES");
+        keyGen.init(128);
+
+        byte[] bytes = new byte[size];
+        random.nextBytes(bytes);
+
+        SecretKey secretkey = keyGen.generateKey();
+        byte[] key = secretkey.getEncoded();
+        SecretKeySpec secretkeySpec = new SecretKeySpec(key, "AES");
+
+        Cipher cipher = Cipher.getInstance("AES");
+        cipher.init(Cipher.ENCRYPT_MODE, secretkeySpec);
+
+        return cipher.doFinal(bytes);
+    }
+
+    private boolean check( String appId ) {
+        for ( final String prefix : RESERVED_APPID )
+        {
+            if ( appId.startsWith( prefix ) )
+            {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Generate an id of length n.
+     *
+     * @param size id length
+     * @return id
+     */
+    public String generate(int size) throws Exception {
+        String appId = "";
+        do {
+            appId = convertBytesToAlphaNumeric(generateRandomBytes(size), size);
+        } while (!check(appId));
+
+        return appId;
+    }
+
+    /**
+     * Generate an id of length 10.
+     *
+     * @return id
+     */
+    public String generate() throws Exception {
+        return generate(10);
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/Cabinet.java b/org.tizen.common/src/org/tizen/common/Cabinet.java
new file mode 100755 (executable)
index 0000000..482cea4
--- /dev/null
@@ -0,0 +1,55 @@
+/*\r
+ *  Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common;\r
+\r
+/**\r
+ * <p>\r
+ * Cabinet.\r
+ * \r
+ * Class for data container\r
+ *\r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public interface\r
+Cabinet<T>\r
+extends Runnable\r
+{\r
+    /**\r
+     * Return containing data\r
+     * \r
+     * @return data\r
+     */\r
+    T getData();\r
+    \r
+    /**\r
+     * Store data\r
+     * \r
+     * @param data data to store\r
+     */\r
+    void setData( T data );\r
+\r
+}\r
old mode 100644 (file)
new mode 100755 (executable)
index b337172..2ad69fb
@@ -3,10 +3,10 @@
 *
 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
 *
-* Contact: 
+* Contact:
 * Changhyun Lee <changhyun1.lee@samsung.com>
 * Kangho Kim <kh5325.kim@samsung.com>
-* 
+*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 */
 package org.tizen.common;
 
-import java.io.File;
-
+import org.apache.log4j.spi.RepositorySelector;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.RegistryFactory;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.osgi.framework.BundleContext;
-import org.tizen.common.preferences.TizenBasePreferencePage;
-import org.tizen.common.properties.InstallPathConfig;
+import org.tizen.common.core.application.InstallPathConfig;
+import org.tizen.common.core.command.EclipseExecutor;
+import org.tizen.common.core.command.Executor;
+import org.tizen.common.core.command.Prompter;
+import org.tizen.common.core.command.prompter.EclipsePrompter;
+import org.tizen.common.core.command.prompter.SWTPrompter;
+import org.tizen.common.rds.ui.preference.RdsPreferencePage;
+import org.tizen.common.ui.page.preference.TizenBasePreferencePage;
+import org.tizen.common.util.DialogUtil;
 import org.tizen.common.util.HostUtil;
 import org.tizen.common.util.OSChecker;
-
+import org.tizen.common.util.log.Logger;
+import org.tizen.sdblib.CrashReportService;
+import org.tizen.sdblib.ICrashReportServiceListener;
 import org.tizen.sdblib.SmartDevelopmentBridge;
 
 /**
@@ -45,36 +57,72 @@ public class CommonPlugin extends AbstractUIPlugin {
 
     // The plug-in ID
     public static final String PLUGIN_ID = "org.tizen.common"; //$NON-NLS-1$
-    private final static String SDKSUFFIX = File.separatorChar+".TizenSDK"+File.separatorChar+"tizensdkpath";
     // The shared instance
     private static CommonPlugin plugin;
-
+    
     /**
-     * The constructor
+     * {@link Prompter} using swt dialog
      */
-    public CommonPlugin() {
-               SmartDevelopmentBridge.init();
-               String sdbPath = InstallPathConfig.getSDKPath() + File.separator + "SDK" + File.separator +"sdb" + File.separator + "sdb";
-               SmartDevelopmentBridge.createBridge(sdbPath, true);
-    }
+    protected EclipsePrompter prompter = null;
+    
+    /**
+     * {@link Executor} with {@link SWTPrompter}
+     */
+    protected Executor executor = null;
+    
+    protected RepositorySelector selector = null;
 
     /*
      * (non-Javadoc)
      * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
      */
+    @Override
     public void start(BundleContext context) throws Exception {
-        super.start(context);
+        super.start( context );
         plugin = this;
+        initializeExecutor();
+
+        String sdbPath = InstallPathConfig.getSDBPath();
+        if (!HostUtil.exists(sdbPath)) {
+            DialogUtil.openMessageDialog("There is no " + sdbPath + ".");
+        }
+        else {
+            try {
+                SmartDevelopmentBridge.init();
+                SmartDevelopmentBridge.createBridge(sdbPath, true);
+            } catch (Throwable t) {
+                Logger.error("Problem occurred while initializing sdb", t.getMessage(), t);
+                DialogUtil.openErrorDialog("Failed to start sdb");
+            }
+        }
+
+        if (OSChecker.isWindows()) {
+            String dllPath = InstallPathConfig.getSdbWinUsbApiPath();
+            if (!HostUtil.exists(dllPath))
+            {
+                DialogUtil.openMessageDialog("There is no " + dllPath + ".\n" +
+                        "It's not mandatory but you may have problem in using sdb through USB.");
+            }
+        }
+        addCSCreateListener();
     }
 
     /*
      * (non-Javadoc)
      * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
      */
+    @Override
     public void stop(BundleContext context) throws Exception {
+        finalizeExecutor();
         plugin = null;
         super.stop(context);
     }
+    
+
+    public static void setDefault( CommonPlugin plugin )
+    {
+        CommonPlugin.plugin = plugin;
+    }
 
     /**
      * Returns the shared instance
@@ -84,39 +132,85 @@ public class CommonPlugin extends AbstractUIPlugin {
     public static CommonPlugin getDefault() {
         return plugin;
     }
-    
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeDefaultPreferences(org.eclipse.jface.preference.IPreferenceStore)
+     */
     @Override
+    protected void initializeDefaultPreferences( final IPreferenceStore store ) {
+        if (InstallPathConfig.getSDKPath() != null)
+        {
+            store.setDefault(TizenBasePreferencePage.KEY_SDKLOCATION, InstallPathConfig.getSDKPath());
+        }
+        store.setDefault(TizenBasePreferencePage.KEY_SDKUPDATE, TizenBasePreferencePage.VALUE_SDKUPDATE_DEFAULT);
+        
+        // RDS settings
+        store.setDefault(RdsPreferencePage.RDS_OPTION_ID, RdsPreferencePage.RDS_MODE_DEFAULT);
+    }
 
-       protected void initializeDefaultPreferences(IPreferenceStore store) {
-       if (loadSdkPath() != null)
-               store.setDefault(TizenBasePreferencePage.KEY_SDKLOCATION,loadSdkPath());
-       store.setDefault(TizenBasePreferencePage.KEY_SDKUPDATE,TizenBasePreferencePage.VALUE_SDKUPDATE_DEFAULT);
-
-       }
-
-       
-       /**
-        * get sdk path 
-        */
-       private String loadSdkPath() {
-               String sdkConfig;
-               String sdkPath = null;;
-               if (OSChecker.isWindows()) 
-                       sdkConfig = System.getenv("localappdata") + File.separatorChar + SDKSUFFIX;                             
-               else
-                       sdkConfig= System.getProperty("user.home") + File.separatorChar + SDKSUFFIX;    
-
-               if (HostUtil.exists(sdkConfig)) {
-                       String contents = HostUtil.getContents(sdkConfig);
-                       if (contents != null) {
-                               String[] fileContent = contents.split("=");
-                               if (fileContent.length == 2) {
-                                       if (HostUtil.exists(fileContent[1])) 
-                                               sdkPath = fileContent[1];
-                               }
-                       }
-               }
-               return sdkPath;
-       }
+    /**
+     * Set {@link Executor} in eclipse plugin environment
+     * 
+     * @param executor {@link Executor}
+     */
+    public void setExecutor( final Executor executor )
+    {
+        this.executor = executor;
+    }
+    
+    /**
+     * Return {@link Executor} in eclipse plugin environment
+     * @return
+     */
+    public Executor getExecutor()
+    {
+        return this.executor;
+    }
+    
+    /**
+     * Return {@link Prompter} in eclipse plugin environment
+     * 
+     * @return {@link Prompter}
+     */
+    public Prompter getPrompter()
+    {
+        return this.prompter;
+    }
 
+    protected void initializeExecutor()
+    {
+        this.prompter = new EclipsePrompter( new SWTPrompter() );
+        
+        this.executor = new EclipseExecutor( prompter );
+    }
+
+    protected void finalizeExecutor()
+    {
+        
+    }
+
+    private void addCSCreateListener() {
+        final String EXT_ID = "org.tizen.common.crashreporter";
+        final String ATTR_SCOPE = "client";
+        final String ATTR_CLASS = "class";
+
+        IExtensionRegistry x = RegistryFactory.getRegistry();
+        IConfigurationElement[] ces = x.getConfigurationElementsFor(EXT_ID);
+
+        for ( IConfigurationElement ce : ces ) {
+            if (ATTR_SCOPE.equals(ce.getName())) {
+                String className = ce.getAttribute(ATTR_CLASS);
+                if (className != null) {
+                    try {
+                        Object obj = ce.createExecutableExtension(ATTR_CLASS);
+                        if (obj instanceof ICrashReportServiceListener) {
+                            CrashReportService.addCrashReportServiceListener((ICrashReportServiceListener)obj);
+                        }
+                    } catch (CoreException e) {
+                        Logger.warning("Error occurred while adding cs create listener" , e);
+                    }
+                }
+            }
+        }
+    }
 }
diff --git a/org.tizen.common/src/org/tizen/common/Factory.java b/org.tizen.common/src/org/tizen/common/Factory.java
new file mode 100644 (file)
index 0000000..b5dcc57
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Hyeongseok Heo <hyeongseok.heo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* Gyeongseok Seo <gyeongseok.seo@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common;
+
+/**
+ * Factory Interface that are using when create new object by Factory pattern
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * @author Gyeongseok Seo <gyeongseok.seo@samsung.com>
+ */
+public interface Factory<T>
+{
+    /**
+     * create object
+     * 
+     * @return created <code>T</code> object
+     */
+    T create();
+}
diff --git a/org.tizen.common/src/org/tizen/common/FactoryWithArgument.java b/org.tizen.common/src/org/tizen/common/FactoryWithArgument.java
new file mode 100644 (file)
index 0000000..864e92f
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Hyeongseok Heo <hyeongseok.heo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* Gyeongseok Seo <gyeongseok.seo@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common;
+
+/**
+ * Factory Interface that are using when create new object with argument by Factory pattern
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * @author Gyeongseok Seo <gyeongseok.seo@samsung.com>
+ */
+public interface FactoryWithArgument<T, A> {
+    /**
+     * create object
+     * 
+     * @param arg argument of an object to be created
+     * @return created <code>T</code> object
+     */
+    T create( A arg );
+}
diff --git a/org.tizen.common/src/org/tizen/common/IApplicationConfiguration.java b/org.tizen.common/src/org/tizen/common/IApplicationConfiguration.java
new file mode 100755 (executable)
index 0000000..ff1e3f7
--- /dev/null
@@ -0,0 +1,77 @@
+/*\r
+ * Common\r
+ * \r
+ * Copyright (C) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Jihoon Song <jihoon80.song@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * \r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ * \r
+ */\r
+package org.tizen.common;\r
+\r
+/**\r
+ * IApplicationConfiguration Interface that is used when getting project's build configurations.\r
+ *\r
+ * @author Kangho Kim{@literal <kh5325.kim@samsung.com>} (S-Core)\r
+ * @author Yoonki Park <yoonki.park@samsung.com>\r
+ */\r
+public interface IApplicationConfiguration {\r
+    /**\r
+     * Returns a native's default build configuration.\r
+     * \r
+     * Return <code>null</code> if no values.\r
+     * \r
+     * @return default build configuration\r
+     */\r
+    String getDefaultConfiguration();\r
+\r
+    /**\r
+     * Returns a native's binary name.\r
+     * \r
+     * Return <code>null</code> if no values.\r
+     * \r
+     * @return a binary name\r
+     */\r
+    String getBinaryName();\r
+\r
+    /**\r
+     * Create a appid.\r
+     * \r
+     * Return <code>null</code> if no values.\r
+     * \r
+     * @return a new appid\r
+     */\r
+    String generateAppId();\r
+\r
+    /**\r
+     * Return the appid from a manifest.xml.\r
+     * \r
+     * Return <code>null</code> if no values.\r
+     * \r
+     * @return a appid\r
+     */\r
+    String getAppId();\r
+\r
+    /**\r
+     * Return a project type which is supported by Tizen.\r
+     * \r
+     * @return a project type\r
+     */\r
+    TizenProjectType getTizenProjectType();\r
+}
\ No newline at end of file
diff --git a/org.tizen.common/src/org/tizen/common/Surrogate.java b/org.tizen.common/src/org/tizen/common/Surrogate.java
new file mode 100644 (file)
index 0000000..c752d78
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Hyeongseok Heo <hyeongseok.heo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* Gyeongseok Seo <gyeongseok.seo@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common;
+
+/**
+ * Surrogate Interface that are using when dependency object is injected by surrogate pattern
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * @author Gyeongseok Seo <gyeongseok.seo@samsung.com>
+ */
+public interface Surrogate<T> {
+    /**
+     * pass adapted object
+     * 
+     * @return adapted <code>T</code> object
+     */
+    T getAdapter();
+}
diff --git a/org.tizen.common/src/org/tizen/common/SurrogateWithArgument.java b/org.tizen.common/src/org/tizen/common/SurrogateWithArgument.java
new file mode 100644 (file)
index 0000000..d6b704d
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common;
+
+/**
+ * Surrogate Interface that are using when dependency object is injected by surrogate pattern
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public interface SurrogateWithArgument<T, A>
+{
+    /**
+     * pass adapted object using argument
+     * 
+     * @param arg argument of an object to be created
+     * 
+     * @return adapted <code>T</code> object
+     */
+    T getAdapter( A arg );
+}
diff --git a/org.tizen.common/src/org/tizen/common/TizenHelpContextIds.java b/org.tizen.common/src/org/tizen/common/TizenHelpContextIds.java
new file mode 100644 (file)
index 0000000..38ce5c7
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact:
+* Changhyun Lee <changhyun1.lee@samsung.com>
+* Kangho Kim <kh5325.kim@samsung.com>
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common;
+
+public class TizenHelpContextIds
+{
+    private static final String HELP_COMMON = "org.tizen.ide.common.";
+    public static final String HELP_COMMON_CONNECTION_EXPLORER_CONTEXT = HELP_COMMON + "connection_explorer_context";
+    public static final String HELP_COMMON_LOG_CONTEXT = HELP_COMMON + "log_context";
+
+    private static final String HELP_NATIVE = "org.tizen.ide.native.";
+    public static final String HELP_NATIVE_CODECOVERAGE_CONTEXT = HELP_NATIVE + "codecoverage_context";
+    public static final String HELP_NATIVE_UNITTEST_CONTEXT = HELP_NATIVE + "unittest_context";
+    public static final String HELP_NATIVE_MANIFEST_CONTEXT = HELP_NATIVE + "manifest_context";
+    public static final String HELP_NATIVE_PROJECT_WIZARD_CONTEXT = HELP_NATIVE + "project_wizard_context";
+
+    private static final String HELP_WEB = "org.tizen.ide.web.";
+    public static final String HELP_WEB_WIDGET_CONFIGURATION_EDITOR_CONTEXT = HELP_WEB + "widget_configuration_editor_context";
+    public static final String HELP_WEB_HTML_EDITOR_CONTEXT = HELP_WEB + "html_editor_context";
+    public static final String HELP_WEB_JAVASCRIPT_EDITOR_CONTEXT = HELP_WEB + "javascript_editor_context";
+    public static final String HELP_WEB_CSS_EDITOR_CONTEXT = HELP_WEB + "css_editor_context";
+    public static final String HELP_WEB_HTML_PREVIEW_CONTEXT = HELP_WEB + "html_preview_context";
+    public static final String HELP_WEB_CSS_PREVIEW_CONTEXT = HELP_WEB + "css_preview_context";
+    public static final String HELP_WEB_PREFERENCES_CONTEXT = HELP_WEB + "preferences_context";
+    public static final String HELP_WEB_SIMULATOR_PREFERENCES_CONTEXT = HELP_WEB + "simulator_preferences_context";
+    public static final String HELP_WEB_NEW_PROJECT_WIZARD_CONTEXT = HELP_WEB + "new_project_wizard_context";
+    public static final String HELP_WEB_USER_TEMPLATE_CONTEXT = HELP_WEB + "user_template_context";
+    
+}
diff --git a/org.tizen.common/src/org/tizen/common/TizenPlatformConstants.java b/org.tizen.common/src/org/tizen/common/TizenPlatformConstants.java
new file mode 100644 (file)
index 0000000..1959269
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact:
+* Kangho Kim <kh5325.kim@samsung.com>
+* Hyunsik Noh <hyunsik.noh@samsung.com>
+* Yoonki Park <yoonki.park@samsung.com>
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common;
+
+import org.tizen.common.util.OSChecker;
+
+/**
+ * All constant definitions related Tizen Platform such as Emulator or Device.
+ * @author Kangho Kim {@literal <kh5325.kim@samsung.com>} (S-Core)
+ */
+public class TizenPlatformConstants {
+    // Definitions for common
+    public static final String LOCALHOST = "127.0.0.1";
+    public static final String ENVIRONMENT_SETTING_CMD = "export ";
+    public static final String CMD_RESULT_CHECK  = "; echo $?;";
+    public static final String CMD_RESULT_PREFIX  = "cmd_ret:";
+    public static final String CMD_SUFFIX  = "; echo "+CMD_RESULT_PREFIX+"$?;";
+    public static final String CMD_SUCCESS  = CMD_RESULT_PREFIX+"0";
+    public static final String CMD_FAILURE  = CMD_RESULT_PREFIX+"1";
+    
+    public static final int OS  = OSChecker.LINUX;
+
+    // Definitions for building
+
+    // Definitions for packaging
+    public static final String PACKAGENAME_PREFIX = "org.tizen";
+    public static final String DEBIAN_INSTALL_PATH = "opt/*";
+    public static final String PKGTYPE_TPK = "TPK";
+    public static final String PKGTYPE_RPM = "RPM";
+    public static final String PKGTYPE_DEB = "DEB";
+
+    // Definitions for debugging
+    public static final String PUBICL_PLATFORM_CORE_PATH = "/opt/bs/core";
+    public static final String PRIVATE_PLATFORM_CORE_PATH = "/opt/share/hidden_storage/SLP_debug";
+    public static final String GDBSERVER_CMD;
+    public static final String GDBSERVER_PLATFORM_CMD;
+    public static final String ATTACH_OPTION = " --attach ";
+    public static final String HOST_GDBSERVER_PATH = "/usr/bin/gdbserver";
+
+    // Definitions for installing
+    public static final String APP_INSTALL_PATH;
+    public static final String APP_ICON_INSTALL_PATH;
+    public static final String TEMPORARY_PKG_PATH;
+    public static final String PKG_TOOL = "pkgcmd";
+    public static final String PKG_TOOL_LIST_COMMAND = PKG_TOOL + " -l  | grep %s";
+    public static final String PKG_TOOL_REMOVE_COMMAND = PKG_TOOL + " -q -u -t %s -n %s";
+    public static final String PKG_TOOL_INSTALL_COMMAND = PKG_TOOL + " -q -i -t %s -p %s";
+    public static final String PKG_TOOL_RUNNING_CHECK_COMMAND = PKG_TOOL + " -C -t %s -n %s";
+    public static final String PKG_TOOL_TERMINATE_COMMAND = PKG_TOOL + " -k -t %s -n %s";
+    public static final String PKG_TOOL_INSTALL_PATH_COMMAND = PKG_TOOL + " -a";
+
+    // Definitions for launching
+    public static final String LAUNCH_CMD = "launch_app %s";
+    public static final String LAUNCH_CMD_SUCCESS = "... successfully launched";
+    public static final String LAUNCH_CMD_FAILURE = "... launch failed";
+    public static final String ELM_SCALE_GETTER = TizenPlatformConstants.TOOLS_TARGET_PATH + "/elm_scale_getter/get_elm_scale ";//FIXME : have to be removed
+
+    // Definitions for ondemand install
+    public static final String CONTROL_EXTENSION = ".control";
+    public static final String TOOLS_TARGET_PATH;
+
+    // Definitions for others
+    public static final String CODE_COVERAGE_BUILD_OPTION = "-fprofile-arcs -ftest-coverage";
+    public static final String CODE_COVERAGE_LAUNCH_OPTION = " __AUL_SDK__ CODE_COVERAGE";
+    public static final String PROCESS_GET_PROCESS_ID_COMMAND = "ps -ef | grep '%s' | grep -v grep | awk '{print $2}'";
+    public static final String PROCESS_SIGKILL_COMMAND = "kill -9 %s";
+    public static final String PKG_TOOL_RUNNUNG_CHECK_COMMAND_RUNNING= "is Running";
+    public static final String PKG_TOOL_INSTALL_PATH_COMMAND_RESULT = "Tizen Application Installation Path:";
+
+    // Constants have a potential for change
+    static {
+        TOOLS_TARGET_PATH = "/home/developer/sdk_tools";
+        GDBSERVER_CMD = TizenPlatformConstants.TOOLS_TARGET_PATH + "/gdbserver/gdbserver";
+        GDBSERVER_PLATFORM_CMD = TizenPlatformConstants.TOOLS_TARGET_PATH + "/gdbserver-platform/gdbserver";
+        APP_INSTALL_PATH = "/opt/apps";
+        APP_ICON_INSTALL_PATH = "shared/res";
+        TEMPORARY_PKG_PATH = "/opt/apps/PKGS/";
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/TizenProjectType.java b/org.tizen.common/src/org/tizen/common/TizenProjectType.java
new file mode 100644 (file)
index 0000000..126151b
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+* TizenProjectType.java
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact:
+* Kangho Kim <kh5225.kim@samsung.com>
+* Gun Kim <gune.kim@samsung.com>
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common;
+
+/**
+ * Represents that TIZEN supports the given project types.
+ */
+public enum TizenProjectType {
+    TIZEN_C_UI_APPLICATION,
+    TIZEN_C_SERVICE_APPLICATION,
+    TIZEN_C_SHAREDLIBRARY,
+    TIZEN_C_STATICLIBRARY,
+    TIZEN_CPP_UI_APPLICATION,
+    TIZEN_CPP_SERVICE_APPLICATION,
+    TIZEN_CPP_SHAREDLIBRARY,
+    TIZEN_CPP_STATICLIBRARY,
+    TIZEN_PLATFORM_PROJECT;
+}
diff --git a/org.tizen.common/src/org/tizen/common/classloader/AbstractClassSource.java b/org.tizen.common/src/org/tizen/common/classloader/AbstractClassSource.java
new file mode 100755 (executable)
index 0000000..53ea4bf
--- /dev/null
@@ -0,0 +1,55 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.classloader;\r
+\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+import java.net.URL;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+\r
+abstract public class\r
+AbstractClassSource\r
+implements ClassSource\r
+{\r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+\r
+    @Override\r
+    public\r
+    InputStream\r
+    getResourceAsStream(\r
+        final String path\r
+    )\r
+    throws IOException\r
+    {\r
+        logger.trace( "Path :{}", path );\r
+        final URL url = getResource( path );\r
+        logger.trace( "URL :{}", url );\r
+        \r
+        return url.openStream();\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/classloader/ClassSource.java b/org.tizen.common/src/org/tizen/common/classloader/ClassSource.java
new file mode 100755 (executable)
index 0000000..32dd8f6
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.classloader;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+/**
+ * <p>
+ * ClassSource.
+ * 
+ * Provide resource in class path
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public interface
+ClassSource
+{
+       /**
+        * Provide {@link URL} of resource having <code>path</code> besed on classpath 
+        * 
+        * @param path relative path based on classpath
+        * 
+        * @return {@link URL}
+        * 
+        * @throws IOException If resource can't be accessible
+        */
+       URL getResource( String path ) throws IOException;
+       
+       
+    /**
+     * Provide {@link InputStream} of resource having <code>path</code> besed on classpath 
+     * 
+     * @param path relative path based on classpath
+     * 
+     * @return {@link InputStream}
+     * 
+     * @throws IOException If resource can't be accessible
+     */
+       InputStream getResourceAsStream( String path ) throws IOException;
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/classloader/CompositeClassSource.java b/org.tizen.common/src/org/tizen/common/classloader/CompositeClassSource.java
new file mode 100755 (executable)
index 0000000..5e7d63f
--- /dev/null
@@ -0,0 +1,101 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.classloader;\r
+\r
+import java.io.IOException;\r
+import java.net.URL;\r
+import java.util.ArrayList;\r
+import java.util.Arrays;\r
+import java.util.Collection;\r
+\r
+public class\r
+CompositeClassSource\r
+extends AbstractClassSource\r
+implements ClassSource\r
+{\r
+    \r
+    protected final ArrayList<ClassSource> sources = new ArrayList<ClassSource>();\r
+\r
+    public\r
+    CompositeClassSource(\r
+        final ClassSource... sources\r
+    )\r
+    {\r
+        this.sources.addAll( Arrays.asList( sources ) );\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.classloader.ClassSource#getResource(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    URL\r
+    getResource(\r
+        final String path\r
+    )\r
+    throws IOException\r
+    {\r
+        for ( final ClassSource source : this.sources )\r
+        {\r
+            final URL url = source.getResource( path );\r
+            \r
+            if ( null != url )\r
+            {\r
+                return url;\r
+            }\r
+        }\r
+        return null;\r
+    }\r
+\r
+    public\r
+    Collection<URL>\r
+    getResources(\r
+        final String path\r
+    )\r
+    throws IOException\r
+    {\r
+        \r
+        final ArrayList<URL> ret = new ArrayList<URL>();\r
+\r
+        for ( final ClassSource source : this.sources )\r
+        {\r
+            if ( source instanceof CompositeClassSource )\r
+            {\r
+                ret.addAll( ((CompositeClassSource) source).getResources( path ) );\r
+            }\r
+            else\r
+            {\r
+                final URL url = source.getResource( path );\r
+                if ( null == url )\r
+                {\r
+                    continue;\r
+                }\r
+                ret.add( url );\r
+            }\r
+        }\r
+        \r
+        return ret;\r
+    }\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/classloader/CustomClassLoader.java b/org.tizen.common/src/org/tizen/common/classloader/CustomClassLoader.java
new file mode 100755 (executable)
index 0000000..44eaa66
--- /dev/null
@@ -0,0 +1,147 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.classloader;\r
+\r
+import static org.tizen.common.util.IOUtil.getBytes;\r
+import static org.tizen.common.util.IOUtil.tryClose;\r
+\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+import java.net.URL;\r
+import java.security.SecureClassLoader;\r
+import java.util.Collections;\r
+import java.util.Enumeration;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+\r
+public class\r
+CustomClassLoader\r
+extends SecureClassLoader\r
+{\r
+    protected Logger logger = LoggerFactory.getLogger( getClass() );\r
+    \r
+    protected final ClassLoader parent;\r
+    \r
+    protected final CompositeClassSource source;\r
+    \r
+    public\r
+    CustomClassLoader(\r
+        final ClassSource... sources\r
+    )\r
+    {\r
+        this( null, sources );\r
+    }\r
+    \r
+    public\r
+    CustomClassLoader(\r
+        final ClassLoader parent,\r
+        final ClassSource... sources\r
+    )\r
+    {\r
+        this.parent = parent;\r
+        this.source = new CompositeClassSource( sources );\r
+    }\r
+    \r
+    @Override\r
+    protected\r
+    Class<?>\r
+    findClass(\r
+        final String name\r
+    )\r
+    throws ClassNotFoundException\r
+    {\r
+        final String path = name.replace( '.', '/' ) + ".class";\r
+        final URL url = findResource( path );\r
+        \r
+        if ( null == url )\r
+        {\r
+            return super.findClass( name );\r
+        }\r
+        \r
+        InputStream in = null;\r
+        try\r
+        {\r
+            in = url.openStream();\r
+            final byte[] bytes = getBytes( in );\r
+            return defineClass( name, bytes, 0, bytes.length );\r
+            \r
+        }\r
+        catch ( final IOException e )\r
+        {\r
+            throw new ClassNotFoundException( "Class can't be loaded", e );\r
+        }\r
+        finally\r
+        {\r
+            tryClose( in );\r
+        }\r
+        \r
+    }\r
+\r
+    @Override\r
+    public\r
+    URL\r
+    getResource(\r
+        final String name\r
+    )\r
+    {\r
+        logger.trace( "Resource Name :{}", name );\r
+        \r
+        URL url = findResource( name );\r
+        if ( null == url )\r
+        {\r
+            if ( null != parent )\r
+            {\r
+                url = parent.getResource( name );\r
+            }\r
+        }\r
+        return url;\r
+    }\r
+    \r
+    @Override\r
+    public Enumeration<URL> getResources(String name) throws IOException\r
+    {\r
+        return Collections.enumeration( source.getResources( name ) );\r
+    }\r
+\r
+    @Override\r
+    protected\r
+    URL\r
+    findResource(\r
+        final String name\r
+    )\r
+    {\r
+        logger.trace( "Resource Name :{}", name );\r
+        try\r
+        {\r
+            return source.getResource( name );\r
+        }\r
+        catch (IOException e)\r
+        {\r
+            return null;\r
+        }\r
+    }\r
+    \r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/classloader/DirectoryClassSource.java b/org.tizen.common/src/org/tizen/common/classloader/DirectoryClassSource.java
new file mode 100755 (executable)
index 0000000..d24f73a
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.classloader;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+/**
+ * <p>
+ * DirectoryClassSource.
+ * 
+ * Directory base {@link ClassSource}
+ * 
+ * Provide *.class file as {@link InputStream}
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+DirectoryClassSource
+extends AbstractClassSource
+implements ClassSource
+{
+       /**
+        * Root directory
+        */
+       protected final File root;
+
+       /**
+        * Constructor with base directory path
+        * 
+        * @param root directory path
+        */
+       public
+       DirectoryClassSource(
+               final String root
+       )
+       {
+               this.root = new File( root );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.ClassSource#getResource(java.lang.String)
+        */
+       @Override
+       public
+       URL
+       getResource(
+               final String path
+       )
+       throws IOException
+       {
+               final File file = new File( root, path );
+
+               if ( file.exists() && file.canRead() )
+               {
+                   return file.toURI().toURL();
+               }
+               return null;
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/classloader/JarClassSource.java b/org.tizen.common/src/org/tizen/common/classloader/JarClassSource.java
new file mode 100755 (executable)
index 0000000..8135ffd
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.classloader;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+
+import org.tizen.common.util.Assert;
+
+/**
+ * <p>
+ * JarClassSource.
+ * 
+ * Read jar file and provide class {@link InputStream}
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+JarClassSource
+extends AbstractClassSource
+implements ClassSource
+{
+
+       /**
+        * Jar file path
+        */
+       protected final String url;
+       
+       /**
+        * Constructor with jar file path
+        * 
+        * @param url jar path
+        */
+       public
+       JarClassSource(
+               String url
+       )
+       {
+           logger.info( "URL :{}", url );
+           Assert.notNull( url );
+               this.url = url;
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.ClassSource#getResource(java.lang.String)
+        */
+       @Override
+       public
+       URL
+       getResource(
+               final String path
+       )
+       throws IOException
+       {
+           
+           logger.trace( "Path :{}", path );
+           final URL u = new URL( "jar", "", url + "!/" + path );
+           
+           logger.info( "Provide url :{}", u );
+           return u;
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/config/ExpressionParser.java b/org.tizen.common/src/org/tizen/common/config/ExpressionParser.java
new file mode 100755 (executable)
index 0000000..9595dcb
--- /dev/null
@@ -0,0 +1,169 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.config;\r
+\r
+import java.io.IOException;\r
+import java.io.StringReader;\r
+import java.io.StringWriter;\r
+import java.util.HashMap;\r
+\r
+/**\r
+ * ExpressionParser.\r
+ * \r
+ * Object to parse preference declaration expression\r
+ * \r
+ * Variable notation is like ${blahblah}\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ */\r
+public class\r
+ExpressionParser\r
+{\r
+    /**\r
+     * Parser status in parsing\r
+     */\r
+    protected static enum Status{ ST_EXP, ST_ESCAPE, ST_VAR };\r
+    \r
+    /**\r
+     * Variable start token\r
+     */\r
+    protected static final char CH_VAR = '$';\r
+    /**\r
+     * Variable open token\r
+     */\r
+    protected static final char CH_VAR_OPEN = '{';\r
+    /**\r
+     * Variable close token\r
+     */\r
+    protected static final char CH_VAR_CLOSE = '}';\r
+    /**\r
+     * Escaper character\r
+     */\r
+    protected static final char CH_ESCAPE = '^';\r
+\r
+    /**\r
+     * Parse <code>exp</code> and return its value\r
+     * \r
+     * @param exp Config definition to parse\r
+     * \r
+     * @return Config value to be parsed\r
+     */\r
+    protected static\r
+    String\r
+    parse(\r
+        final String exp\r
+    )\r
+    {\r
+        Status status = Status.ST_EXP;\r
+        if ( null == exp )\r
+        {\r
+            return null;\r
+        }\r
+        \r
+        final StringReader reader = new StringReader( exp );\r
+        final StringWriter writer = new StringWriter();\r
+        int ch = 0;\r
+        \r
+        StringWriter variableWriter = new StringWriter();\r
+        try\r
+        {\r
+            final HashMap<String, String> var2val = new HashMap<String, String>();\r
+            while ( 0 <= ( ch = reader.read() ) )\r
+            {\r
+                switch ( status ) { \r
+                case ST_EXP:\r
+                    if ( CH_VAR == ch )\r
+                    {\r
+                        ch = reader.read();\r
+                        if ( CH_VAR_OPEN == ch )\r
+                        {\r
+                            status = Status.ST_VAR;\r
+                            variableWriter = new StringWriter();\r
+                            break;\r
+                        }\r
+                        else\r
+                        {\r
+                            writer.write( CH_VAR );\r
+                        }\r
+                    }\r
+                    else if ( CH_ESCAPE == ch )\r
+                    {\r
+                        status = Status.ST_ESCAPE;\r
+                        break;\r
+                    }\r
+                    \r
+                case ST_ESCAPE:\r
+                    writer.write( (char) ch );\r
+                    status = Status.ST_EXP;\r
+                    break;\r
+                    \r
+                case ST_VAR:\r
+                    if ( CH_VAR_CLOSE == ch )\r
+                    {\r
+                        final String variable = variableWriter.toString();\r
+                        final String cached = var2val.get( variable );\r
+                        final String subVal =\r
+                            ( null == cached )?Preference.getValue( variable, null ):cached;\r
+                            \r
+                        if ( null == subVal )\r
+                        {\r
+                            writer.write( CH_VAR );\r
+                            writer.write( CH_VAR_OPEN );\r
+                            writer.write( variable );\r
+                            writer.write( CH_VAR_CLOSE );\r
+                        }\r
+                        else\r
+                        {\r
+                            var2val.put( variable, subVal );\r
+                            writer.write( subVal );\r
+                        }\r
+                        status = Status.ST_EXP;\r
+                        break;\r
+                    }\r
+                    variableWriter.write( (char) ch );\r
+                    break;\r
+                default:\r
+                    break;\r
+                }\r
+            }\r
+            \r
+            if ( Status.ST_VAR == status )\r
+            {\r
+                writer.write( CH_VAR );\r
+                writer.write( CH_VAR_OPEN );\r
+                writer.write( variableWriter.toString() );\r
+            }\r
+        }\r
+        catch ( final IOException e )\r
+        {\r
+            throw new IllegalStateException( "StringReader#read throw IOException", e );\r
+        }\r
+        \r
+        \r
+        return writer.toString();\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/config/Loader.java b/org.tizen.common/src/org/tizen/common/config/Loader.java
new file mode 100755 (executable)
index 0000000..3c9db57
--- /dev/null
@@ -0,0 +1,49 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.config;\r
+\r
+import java.io.IOException;\r
+\r
+/**\r
+ * Loader.\r
+ * \r
+ * Object to load preference from media resource\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ */\r
+public interface\r
+Loader\r
+{\r
+    /**\r
+     * Load and register preference with namespace <code>ns</code>\r
+     * \r
+     * @param ns Namespace name\r
+     * \r
+     * @throws IOException If preference can't be loaded\r
+     */\r
+    void load( final String ns ) throws IOException;\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/config/Preference.java b/org.tizen.common/src/org/tizen/common/config/Preference.java
new file mode 100755 (executable)
index 0000000..dfd6873
--- /dev/null
@@ -0,0 +1,256 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.config;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Collection;\r
+import java.util.Collections;\r
+import java.util.HashMap;\r
+import java.util.HashSet;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.tizen.common.util.ParsingUtil;\r
+\r
+/**\r
+ * Preference.\r
+ * \r
+ * Object to manage preferences\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ */\r
+public class\r
+Preference\r
+{\r
+    protected static final Logger logger = LoggerFactory.getLogger( Preference.class );\r
+    \r
+    protected static final ArrayList<PreferenceProvider> providers = new ArrayList<PreferenceProvider>();\r
+    \r
+    protected static final HashMap<String, PreferenceProvider> name2provider = new HashMap<String, PreferenceProvider>();\r
+\r
+    protected Preference() {}\r
+\r
+    public static void clear()\r
+    {\r
+        providers.clear();\r
+        name2provider.clear();\r
+    }\r
+\r
+\r
+    /**\r
+     * Check <code>name</code> is valid\r
+     * \r
+     * Key must contain only alphabet, unicode, '_', and '.'\r
+     * \r
+     * @param name string to check\r
+     * \r
+     * @return Flag if <code>name</code> is valid\r
+     */\r
+    protected static\r
+    final\r
+    boolean\r
+    checkName(\r
+        final String name\r
+    )\r
+    {\r
+        final char[] chars = name.toCharArray();\r
+        for ( int i=0, n=chars.length ; i<n ; ++i ) {\r
+            if ( Character.isJavaIdentifierPart( chars[i] ) )\r
+            {\r
+                continue;\r
+            }\r
+            if ( '.' == chars[i] )\r
+            {\r
+                continue;\r
+            }\r
+            return false;\r
+        }\r
+        return true;\r
+    }\r
+\r
+    /**\r
+     * Register prefernece( key-value pair ) in namespace <code>name</code>\r
+     * \r
+     * Ignore if invalid preference\r
+     * \r
+     * @param name namespace name\r
+     * @param key prefernece key\r
+     * @param exp prefernece expression\r
+     */\r
+    public static\r
+    void\r
+    register(\r
+        final String name,\r
+        final PreferenceProvider provider\r
+    )\r
+    {\r
+        // check namespace\r
+        if ( null != name && !checkName( name ) )\r
+        {\r
+            return ;\r
+        }\r
+        \r
+\r
+        PreferenceProvider old = name2provider.put( name, provider );\r
+        if ( null != old )\r
+        {\r
+            providers.set( providers.indexOf( old ), provider );\r
+        }\r
+        else\r
+        {\r
+            providers.add( 0, provider );\r
+        }\r
+    }\r
+\r
+    /**\r
+     * Return preference expression\r
+     * \r
+     * @param name namespace name\r
+     * @param key preference key\r
+     * \r
+     * @return preference expression\r
+     */\r
+    public static\r
+    String\r
+    get(\r
+        final String key\r
+    )\r
+    {\r
+        logger.info( "Key :{}", key );\r
+        for ( final PreferenceProvider provider : providers )\r
+        {\r
+            final String exp = provider.get( key );\r
+            logger.debug( "Provider :{}, Value :{}", provider, exp );\r
+            if ( null == exp )\r
+            {\r
+                continue;\r
+            }\r
+            \r
+            return exp;\r
+        }\r
+        \r
+        return null;\r
+    }\r
+\r
+    /* List */\r
+    /**\r
+     * Return preference keys in namespace <code>name</code>\r
+     * \r
+     * @param name namespace name\r
+     * \r
+     * @return preference keys\r
+     */\r
+    public static \r
+    Collection<String>\r
+    list(\r
+        final String name\r
+    )\r
+    {\r
+        final HashSet<String> keys = new HashSet<String>();\r
+        for ( final PreferenceProvider provider : providers )\r
+        {\r
+            keys.addAll( provider.keys() );\r
+        }\r
+        return Collections.unmodifiableCollection( keys );\r
+\r
+    }\r
+    /* Value */\r
+    /**\r
+     * Return <b>value</b> for <code>key</code>\r
+     * \r
+     * @param key preference key\r
+     * @param defaultValue default value if value doesn't exist\r
+     * \r
+     * @return calculated value\r
+     */\r
+    public static \r
+    String\r
+    getValue(\r
+        final String key,\r
+        final String defaultValue\r
+    )\r
+    {\r
+        // get definition\r
+        final String exp = get( key );\r
+        if ( null == exp )\r
+        {\r
+            // return default value if definition doesn't exist\r
+            if ( null == defaultValue )\r
+            {\r
+                return null;\r
+            }\r
+            return ExpressionParser.parse( defaultValue );\r
+        }\r
+        return ExpressionParser.parse( exp );\r
+    }\r
+\r
+\r
+    /**\r
+     * Return <b>value</b> for <code>key</code> as <code>int</code>\r
+     * \r
+     * @param key preference key\r
+     * @param defaultValue default value if value doesn't exist\r
+     * \r
+     * @return calculated value\r
+     */\r
+    public static\r
+    int\r
+    getInteger(\r
+        final String key,\r
+        final int defaultValue\r
+    )\r
+    {\r
+        // get value\r
+        final String value = getValue( key, null );\r
+\r
+        // convert to integer\r
+        return ParsingUtil.parseInt( value, defaultValue );\r
+    }\r
+\r
+    /**\r
+     * Return <b>value</b> for <code>key</code> as <code>boolean</code>\r
+     * \r
+     * @param key preference key\r
+     * @param defaultValue default value if value doesn't exist\r
+     * \r
+     * @return calculated value\r
+     */\r
+    public static\r
+    boolean\r
+    getBoolean(\r
+        final String key,\r
+        final boolean defaultValue\r
+    )\r
+    {\r
+        // get value\r
+        final String value = getValue( key, null );\r
+\r
+        // convert to boolean\r
+        return ParsingUtil.parseBoolean( value, defaultValue );\r
+\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/config/PreferenceProvider.java b/org.tizen.common/src/org/tizen/common/config/PreferenceProvider.java
new file mode 100755 (executable)
index 0000000..fcf7488
--- /dev/null
@@ -0,0 +1,63 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.config;\r
+\r
+import java.util.Collection;\r
+\r
+/**\r
+ * PreferenceProvider.\r
+ * \r
+ * class to provide preference info\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ */\r
+public interface\r
+PreferenceProvider\r
+{\r
+    /**\r
+     * return preference key {@link Collection}\r
+     * \r
+     * @return preference keys\r
+     */\r
+    Collection<String> keys();\r
+    \r
+    /**\r
+     * return preference value for <code>key</code>\r
+     * \r
+     * @param key preference key\r
+     * \r
+     * @return preference value\r
+     */\r
+    String get( String key );\r
+    \r
+    /**\r
+     * configure preference\r
+     * \r
+     * @param key preference key\r
+     * @param value preference value\r
+     */\r
+    void set( String key, String value );\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/config/loader/AbstractLoader.java b/org.tizen.common/src/org/tizen/common/config/loader/AbstractLoader.java
new file mode 100755 (executable)
index 0000000..fbfbc71
--- /dev/null
@@ -0,0 +1,70 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.config.loader;\r
+\r
+import org.tizen.common.config.Loader;\r
+import org.tizen.common.util.Assert;\r
+\r
+/**\r
+ * AbstractLoader.\r
+ * \r
+ * Abstract class to load preference\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+abstract public class\r
+AbstractLoader\r
+implements Loader\r
+{\r
+    /**\r
+     * {@link Source} for preference\r
+     */\r
+    protected final Source src;\r
+    \r
+    /**\r
+     * Constructor with preference source\r
+     * \r
+     * @param src {@link Source} for preference\r
+     */\r
+    public\r
+    AbstractLoader(\r
+        final Source src\r
+    )\r
+    {\r
+        this.src = src;\r
+        Assert.notNull( src );\r
+    }\r
+    \r
+    /**\r
+     * @return {@link Source} to load preference \r
+     */\r
+    protected\r
+    Source\r
+    getSource()\r
+    {\r
+        return src;\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/config/loader/ResourceSource.java b/org.tizen.common/src/org/tizen/common/config/loader/ResourceSource.java
new file mode 100755 (executable)
index 0000000..2a25c62
--- /dev/null
@@ -0,0 +1,81 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.config.loader;\r
+\r
+import java.io.IOException;\r
+import java.net.URL;\r
+import java.util.Collections;\r
+import java.util.Enumeration;\r
+import java.util.Iterator;\r
+\r
+import org.apache.commons.collections.iterators.EnumerationIterator;\r
+\r
+/**\r
+ * ResourceSource.\r
+ * \r
+ * {@link Source} to provide resource from classpath \r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class\r
+ResourceSource\r
+implements Source\r
+{\r
+    \r
+    protected final String resourceName;\r
+    \r
+    /**\r
+     * Constructor with resource name\r
+     * \r
+     * @param resourceName name of resource\r
+     */\r
+    public\r
+    ResourceSource(\r
+        final String resourceName\r
+    )\r
+    {\r
+        this.resourceName = resourceName;\r
+    }\r
+    \r
+    /* (non-Javadoc)\r
+     * @see java.lang.Iterable#iterator()\r
+     */\r
+    @SuppressWarnings("unchecked")\r
+    public\r
+    Iterator<URL>\r
+    iterator()\r
+    {\r
+        try {\r
+            final ClassLoader cl = Thread.currentThread().getContextClassLoader();\r
+            final Enumeration<URL> urls = cl.getResources( resourceName );\r
+            return new EnumerationIterator( urls );\r
+        } catch ( final IOException e ) {\r
+            e.printStackTrace();\r
+        }\r
+        \r
+        return Collections.<URL>emptySet().iterator();\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/config/loader/Source.java b/org.tizen.common/src/org/tizen/common/config/loader/Source.java
new file mode 100755 (executable)
index 0000000..8a0b03c
--- /dev/null
@@ -0,0 +1,42 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.config.loader;\r
+\r
+import java.net.URL;\r
+\r
+/**\r
+ * Source.\r
+ * \r
+ * Object to provide {@link URL}s of resource\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see Iterable\r
+ */\r
+public interface\r
+Source\r
+extends Iterable<URL>\r
+{\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/config/loader/URLSource.java b/org.tizen.common/src/org/tizen/common/config/loader/URLSource.java
new file mode 100755 (executable)
index 0000000..36a4883
--- /dev/null
@@ -0,0 +1,71 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.config.loader;\r
+\r
+import java.net.URL;\r
+import java.util.Iterator;\r
+\r
+/**\r
+ * URLSource.\r
+ * \r
+ * Object to provide {@link URL}s of resource using {@link URL}\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see Source\r
+ */\r
+public class\r
+URLSource\r
+implements Source\r
+{\r
+    /**\r
+     * {@link URL} for resource\r
+     */\r
+    protected final URL url;\r
+    \r
+    /**\r
+     * Constructor with url\r
+     * \r
+     * @param url {@link URL} for resource\r
+     */\r
+    public\r
+    URLSource(\r
+        final URL url\r
+    )\r
+    {\r
+        this.url = url;\r
+    }\r
+    \r
+    /* (non-Javadoc)\r
+     * @see java.lang.Iterable#iterator()\r
+     */\r
+    public\r
+    Iterator<URL>\r
+    iterator()\r
+    {\r
+        return null;\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/config/provider/EnvironmentProvider.java b/org.tizen.common/src/org/tizen/common/config/provider/EnvironmentProvider.java
new file mode 100755 (executable)
index 0000000..bc0acca
--- /dev/null
@@ -0,0 +1,89 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.config.provider;\r
+\r
+import java.util.Collection;\r
+import java.util.Collections;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.tizen.common.config.PreferenceProvider;\r
+\r
+/**\r
+ * EnvironmentProvider.\r
+ * \r
+ * Provide from OS environment variable\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see PreferenceProvider\r
+ */\r
+public class\r
+EnvironmentProvider\r
+implements PreferenceProvider\r
+{\r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.config.PreferenceProvider#keys()\r
+     */\r
+    @Override\r
+    public\r
+    Collection<String>\r
+    keys()\r
+    {\r
+        return Collections.unmodifiableCollection( System.getenv().keySet() );\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.config.PreferenceProvider#get(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    String\r
+    get(\r
+        final String key\r
+    )\r
+    {\r
+        final String value = System.getenv( key );\r
+        logger.info( "Key :{}, Value :{}", key, value );\r
+        return value;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.config.PreferenceProvider#set(java.lang.String, java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    void\r
+    set(\r
+        final String key,\r
+        final String value\r
+    )\r
+    {\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/config/provider/PropertiesProvider.java b/org.tizen.common/src/org/tizen/common/config/provider/PropertiesProvider.java
new file mode 100755 (executable)
index 0000000..9738ad0
--- /dev/null
@@ -0,0 +1,120 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.config.provider;\r
+\r
+import java.util.Collection;\r
+import java.util.Collections;\r
+import java.util.HashMap;\r
+import java.util.Map;\r
+import java.util.Properties;\r
+\r
+import org.tizen.common.config.PreferenceProvider;\r
+\r
+/**\r
+ * Preference.\r
+ * \r
+ * Provide from {@link Map}\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see PreferenceProvider\r
+ */\r
+public class\r
+PropertiesProvider\r
+implements PreferenceProvider\r
+{\r
+    /**\r
+     * preference\r
+     */\r
+    protected final Map<String, String> props;\r
+    \r
+    /**\r
+     * default constructor\r
+     */\r
+    public\r
+    PropertiesProvider()\r
+    {\r
+        this( new HashMap<String, String>() );\r
+    }\r
+\r
+    /**\r
+     * Constructor with {@link Properties}\r
+     * \r
+     * @param props {@link Properties} to clone from\r
+     */\r
+    @SuppressWarnings("unchecked")\r
+    public\r
+    PropertiesProvider(\r
+        final Properties props\r
+    )\r
+    {\r
+        this( (Map<String, String>) (Object) props );\r
+    }\r
+\r
+    /**\r
+     * Constructor with {@link Map}\r
+     * \r
+     * @param props {@link Map} to clone from\r
+     */\r
+    public\r
+    PropertiesProvider(\r
+        final Map<String, String> props\r
+    )\r
+    {\r
+        this.props = props;\r
+    }\r
+    \r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.config.PreferenceProvider#keys()\r
+     */\r
+    @SuppressWarnings("unchecked")\r
+    @Override\r
+    public Collection<String> keys()\r
+    {\r
+        final Collection<?> ret = props.keySet();\r
+        \r
+        return Collections.unmodifiableCollection( (Collection<String>) ret );\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.config.PreferenceProvider#get(java.lang.String)\r
+     */\r
+    @Override\r
+    public String get( final String key )\r
+    {\r
+        return this.props.get( key );\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.config.PreferenceProvider#set(java.lang.String, java.lang.String)\r
+     */\r
+    @Override\r
+    public void set(String key, String value)\r
+    {\r
+        this.props.put( key, value );\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/config/provider/SystemPropertiesProvider.java b/org.tizen.common/src/org/tizen/common/config/provider/SystemPropertiesProvider.java
new file mode 100755 (executable)
index 0000000..6b64e84
--- /dev/null
@@ -0,0 +1,86 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact:\r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.config.provider;\r
+\r
+import java.util.Collection;\r
+import java.util.Collections;\r
+\r
+import org.tizen.common.config.PreferenceProvider;\r
+\r
+/**\r
+ * Preference.\r
+ * \r
+ * Provide from jvm system properties\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see PreferenceProvider\r
+ * @see System#getProperties()\r
+ */\r
+public class\r
+SystemPropertiesProvider\r
+implements PreferenceProvider\r
+{\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.config.PreferenceProvider#keys()\r
+     */\r
+    @SuppressWarnings("unchecked")\r
+    @Override\r
+    public Collection<String> keys()\r
+    {\r
+        Collection<?> ret = System.getProperties().keySet();\r
+        \r
+        return Collections.unmodifiableCollection( (Collection<String>) ret );\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.config.PreferenceProvider#get(java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    String\r
+    get(\r
+        final String key\r
+    )\r
+    {\r
+        return System.getProperty( key );\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.config.PreferenceProvider#set(java.lang.String, java.lang.String)\r
+     */\r
+    @Override\r
+    public\r
+    void\r
+    set(\r
+        final String key,\r
+        final String value\r
+    )\r
+    {\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/core/application/InstallPathConfig.java b/org.tizen.common/src/org/tizen/common/core/application/InstallPathConfig.java
new file mode 100755 (executable)
index 0000000..e661b44
--- /dev/null
@@ -0,0 +1,216 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact:
+* Kangho Kim <kh5325.kim@samsung.com>
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.core.application;
+
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+import org.tizen.common.util.DialogUtil;
+import org.tizen.common.util.HostUtil;
+import org.tizen.common.util.OSChecker;
+
+
+
+final public class InstallPathConfig {
+
+    private static String defaultHomePath;
+    private static String sdkInstallPath;
+
+    private static final String DIR_PLATFORMS = "platforms";
+    private static final String DIR_PLATFORMS_VER = "tizen2.0";
+    private static final String DIR_SAMPLES = "samples";
+    private static final String DIR_SNIPPETS = "snippets";
+    private static final String DIR_ON_DEMAND = "on-demand";
+    private static final String DIR_EMULATOR = "emulator";
+    private static final String DIR_INSTALLER = "install-manager";
+    private static final String DIR_TOOLS = "tools";
+    private static final String DIR_LIBRARY = "library";
+    private static final String DIR_SDK_DATA = "tizen-sdk-data";
+
+    private final static String SDKSUFFIX = DIR_SDK_DATA + File.separatorChar + "tizensdkpath";
+
+    // Registry Key
+    private static final String REGISTRY_PATH_OF_SHELL_FOLDER = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";
+    // public static final String REGISTRY_APP_DATA_OF_SHELL_FOLDER = "AppData";
+    private static final String REGISTRY_LOCAL_APP_DATA_OF_SHELL_FOLDER = "\"Local AppData\"";
+    // Value Column
+    private static final String REG_SZ = "REG_SZ";
+
+    static {
+        // FIXME : don't need the following lines if using environment variable
+        if (OSChecker.isWindows()) {
+            defaultHomePath = getRegistryValue(REGISTRY_PATH_OF_SHELL_FOLDER,REGISTRY_LOCAL_APP_DATA_OF_SHELL_FOLDER) ;
+        } else if (OSChecker.isLinux() == true || OSChecker.isUnix() == true || OSChecker.isMAC() == true) {
+            defaultHomePath = System.getProperty("user.home");
+        } else {
+            DialogUtil.openMessageDialog(System.getProperty("os.name") + " is not supported currently.");
+            System.exit(0);
+        }
+
+        loadSdkPath(defaultHomePath + File.separatorChar + SDKSUFFIX);
+    }
+
+    /**
+     * @deprecated Use {@link #getSDKPath()} instead.
+     */
+    @Deprecated
+    public static String getIDEPath() {
+        // FIXME : can't help but putting the code due to the Web IDE path , It has to be removed soon.
+        return System.getProperty("user.dir");
+    }
+
+    public static String getSDKPath() {
+        return sdkInstallPath;
+    }
+
+    //This is temporary code to get platform version path(only for one).
+    //TODO: Should change to return string array type for various platform version paths.
+    public static String getPlatformVersionPath()
+    {
+        String path = null;
+        String platformPath = getSDKPath() + File.separator + DIR_PLATFORMS;
+        File platforms = new File(platformPath);
+        if(platforms.isDirectory())
+        {
+            // platforms.listFiles[0] can cause undetermined result like platforms/tmp.ini/sample
+            path = platformPath + File.separator + DIR_PLATFORMS_VER;
+        }
+        return path;
+    }
+
+    //TODO: Should change to get string array type for various platform version paths.
+    public static String getSamplesPath()
+    {
+        return getPlatformVersionPath() + File.separator + DIR_SAMPLES;
+    }
+
+    //TODO: Should change to get string array type for various platform version paths.
+    public static String getSnippetsPath()
+    {
+        return getPlatformVersionPath() + File.separator + DIR_SNIPPETS;
+    }
+
+    //TODO: Should change to get string array type for various platform version paths.
+    public static String getOnDemandPath()
+    {
+        return getPlatformVersionPath() + File.separator + DIR_ON_DEMAND;
+    }
+
+    public static String getLibraryPath() {
+        return getSDKPath() + File.separator + DIR_LIBRARY;
+    }
+
+    private static String getToolsPath() {
+        return getSDKPath() + File.separator + DIR_TOOLS;
+    }
+
+    public static String getSDBPath() {
+        String toolsPath = getToolsPath();
+        if (OSChecker.isWindows())
+        {
+            return toolsPath + File.separator + "sdb.exe";
+        }
+        else
+        {
+            return toolsPath + File.separator + "sdb";
+        }
+    }
+
+    public static String getSdbWinUsbApiPath() {
+        return getToolsPath() + File.separator + "SdbWinUsbApi.dll";
+    }
+
+    public static String getInstallManagerPath() {
+        return getSDKPath() + File.separator + DIR_INSTALLER;
+    }
+
+    public static String getEmulatorPath() {
+        return getToolsPath() + File.separator + DIR_EMULATOR;
+    }
+
+    public static String getUserHomePath() {
+        return defaultHomePath;
+    }
+
+    public static String getUserDataPath() {
+        return getUserHomePath() + File.separator + DIR_SDK_DATA;
+    }
+
+    private static void loadSdkPath(String sdkPath) {
+        boolean status = true;
+        if (HostUtil.exists(sdkPath)) {
+            String[] fileContent = HostUtil.getContents(sdkPath).split("=");
+            if (HostUtil.exists(fileContent[1]))
+            {
+                sdkInstallPath = fileContent[1];
+            }
+            else {
+                status = false;
+            }
+        } else {
+            status = false;
+        }
+
+        if (!status) {
+            DialogUtil.openMessageDialog("Tizen SDK is not installed properly.");
+            System.exit(0);
+        }
+    }
+    private static String getRegistryValue(String node, String key) {
+        if (!OSChecker.isWindows())
+        {
+            return null;
+        }
+
+        BufferedReader br = null;
+        String value = "";
+
+        String query = "reg query " + "\"" + node + "\" /v " + key;
+        try {
+            Process process = Runtime.getRuntime().exec(query);
+            String encoding = System.getProperty("sun.jnu.encoding");
+            br = new BufferedReader(new InputStreamReader(process.getInputStream(), encoding));
+
+            String line = null;
+            while ((line = br.readLine()) != null) {
+                int index = line.indexOf(REG_SZ);
+                if (index >= 0) {
+                    value = line.substring(index + REG_SZ.length()).trim();
+                }
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            tryClose( br );
+        }
+
+        return value;
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.common/src/org/tizen/common/core/application/Messages.java b/org.tizen.common/src/org/tizen/common/core/application/Messages.java
new file mode 100644 (file)
index 0000000..3051313
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.application;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS
+{
+       private static final String BUNDLE_NAME = Messages.class.getName(); //$NON-NLS-1$
+       public static String DIALOG_TITLE;
+       public static String ASK_FOR_UPDATE;
+       
+    public static String FileExistDialogTitle;
+    public static String FileExistMsg;
+    
+       static {
+               // initialize resource bundle
+               NLS.initializeMessages( BUNDLE_NAME, Messages.class );
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/application/Messages.properties b/org.tizen.common/src/org/tizen/common/core/application/Messages.properties
new file mode 100644 (file)
index 0000000..d3158eb
--- /dev/null
@@ -0,0 +1,5 @@
+DIALOG_TITLE = Tizen SDK
+ASK_FOR_UPDATE = Tizen SDK updates are available. Do you want to install them now?
+
+FileExistDialogTitle=Existing resource
+FileExistMsg="{0}" already exists. Do you want to overwrite it?
diff --git a/org.tizen.common/src/org/tizen/common/core/application/StatusLineMessageManager.java b/org.tizen.common/src/org/tizen/common/core/application/StatusLineMessageManager.java
new file mode 100755 (executable)
index 0000000..95f54d8
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.application;
+
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.ui.IViewPart;
+import org.tizen.common.util.Assert;
+
+public class StatusLineMessageManager
+{
+       
+       protected final IStatusLineManager manager;
+
+       /**
+        * Contructor with {@link IViewPart}
+        * 
+        * @param part {@link IViewPart} to provide {@link IStatusLineManager}
+        */
+       public StatusLineMessageManager( final IViewPart part )
+       {
+               this( part.getViewSite().getActionBars().getStatusLineManager() );
+       }
+
+       /**
+        * Constructor with {@link IStatusLineManager}
+        * 
+        * @param manager {@link IStatusLineManager} to manage status bar
+        */
+       public StatusLineMessageManager(
+               final IStatusLineManager manager
+       )
+       {
+           Assert.notNull( manager );
+               this.manager = manager;
+       }
+
+       /**
+        * Add error message at status bar
+        * 
+        * @param message message to print out
+        */
+       public void setErrorMessage( final String message )
+       {
+               manager.setErrorMessage( message );
+       }
+
+       /**
+        * Add message at status bar
+        * 
+        * @param message message to print out
+        */
+       public void setMessage( final String message )
+       {
+               manager.setMessage( message );
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/application/UpdateManager.java b/org.tizen.common/src/org/tizen/common/core/application/UpdateManager.java
new file mode 100755 (executable)
index 0000000..0af22d4
--- /dev/null
@@ -0,0 +1,152 @@
+/**
+*  UpdateManager
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Taeyoung Son <taeyoung2.son@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.application;
+
+import static org.tizen.common.util.SWTUtil.syncExec;
+
+import java.io.File;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.swt.SWT;
+import org.eclipse.ui.IStartup;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.common.CommonPlugin;
+import org.tizen.common.ui.page.preference.TizenBasePreferencePage;
+import org.tizen.common.util.HostUtil;
+import org.tizen.common.util.OSChecker;
+import org.tizen.common.util.SWTUtil;
+
+
+public class UpdateManager implements IStartup {
+       private static final String EXECUTE_INSTALLER_COMMAND = "java -jar InstallManager.jar";
+       private static final String EXECUTE_INSTALLER_COMMAND_FOR_WINDOWS = "InstManager.exe"; 
+       private static final String UPDATE_LIST_CHECK_COMMAND = "%s -checkPackageUpdate";
+       private static final String RESULT_VALUE_OF_UPDATABLE = "updatable";
+       
+       final IWorkbench workbench = PlatformUI.getWorkbench();
+       
+       @Override
+       public void earlyStartup() {
+               // Check installable package exist.
+               final IPreferenceStore prefStore =
+                       CommonPlugin.getDefault().getPreferenceStore();
+                               
+               if ( !prefStore.getBoolean( TizenBasePreferencePage.KEY_SDKUPDATE ) )
+               {       // User don't want to update at startup
+                       return ;
+               }
+               if ( !isExistUpdatablePackage() )
+               {       // Check updatable version
+                       return ;
+               }
+               if( !askExecuteInstallerDlg() )
+               {       // User don't want to update at this time
+                       return ;
+               }
+               
+               executeInstallManger();
+               syncExec( new Runnable() {
+                   public void run() {
+                       if (!workbench.getDisplay().isDisposed())
+                       {
+                           workbench.close();
+                       }
+                   }
+               });
+       }
+       
+       private boolean isExistUpdatablePackage()
+       {
+               String result = HostUtil.returnExecute( getUpdateCheckCmd(), InstallPathConfig.getInstallManagerPath() );
+               return ( RESULT_VALUE_OF_UPDATABLE.equals( result ) );
+       }
+       
+       private boolean askExecuteInstallerDlg() {
+               int ret = checkUpdate();
+               return ( ret == IDialogConstants.YES_ID );
+       }
+       
+       private void executeInstallManger() {
+               HostUtil.batchExecute(getInstallerExeCmd(), null, new File(InstallPathConfig.getInstallManagerPath()));
+       }
+       
+       public int checkUpdate() {
+               final int[] result = new int[1]; // using array since you can't change a final int
+
+               Runnable query = new Runnable() {
+                       public void run() {
+                               int resultId[] = {
+                                               IDialogConstants.YES_ID,
+                                               IDialogConstants.NO_ID };
+
+                               String labels[] = new String[] {
+                                               IDialogConstants.YES_LABEL,
+                                               IDialogConstants.NO_LABEL };
+                               
+                               MessageDialog dialog = new MessageDialog(
+                                               PlatformUI.getWorkbench().getDisplay().getActiveShell(),
+                                               Messages.DIALOG_TITLE,
+                                               null,
+                                               Messages.ASK_FOR_UPDATE,
+                                               MessageDialog.QUESTION,
+                                               labels, 0);
+                               dialog.open();
+                               if (dialog.getReturnCode() == SWT.DEFAULT) {
+                                       // A window close returns SWT.DEFAULT - mapped to a cancel
+                                       result[0] = IDialogConstants.NO_ID;
+                               } else {
+                                       result[0] = resultId[dialog.getReturnCode()];
+                               }
+                       }
+               };
+
+
+               SWTUtil.syncExec( query );
+               return result[0];
+       }
+       
+       private String getInstallerExeCmd() {
+               String exeInstaller = null;
+               
+               if(OSChecker.isWindows())
+               {
+                       exeInstaller = EXECUTE_INSTALLER_COMMAND_FOR_WINDOWS;
+               }
+               else
+               {
+                       exeInstaller = EXECUTE_INSTALLER_COMMAND;
+               }
+                       
+               return exeInstaller;
+       }
+       
+       private String getUpdateCheckCmd() {
+               return String.format(UPDATE_LIST_CHECK_COMMAND, EXECUTE_INSTALLER_COMMAND);
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/AbstractCommand.java b/org.tizen.common/src/org/tizen/common/core/command/AbstractCommand.java
new file mode 100644 (file)
index 0000000..a083ddc
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <p>
+ * AbstractCommand.
+ * 
+ * Abstract class for {@link Command}
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+abstract public class
+AbstractCommand<T>
+implements Command<T> {
+       
+       /**
+        * Logger for this instance ( it will be used by sub-class )
+        */
+       protected Logger logger = LoggerFactory.getLogger( getClass() );
+       
+       /**
+        * Name of the cancel operation)
+        */
+       public static final String COMMAND_CANCEL = "cancel";
+       
+       /**
+        * Result after execution of command
+        */
+       protected T result;
+       
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Command#execute(org.tizen.common.core.command.Executor, org.tizen.common.core.command.ExecutionContext)
+        */
+       @Override
+       abstract public
+       void
+       run(
+               final Executor executor,
+               final ExecutionContext context
+       )
+       throws Exception;
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Command#undo(org.tizen.common.core.command.Executor, org.tizen.common.core.command.ExecutionContext)
+        */
+       @Override
+       public void undo(
+               final Executor executor,
+               final ExecutionContext context
+       )
+       throws Exception
+       {
+               throw new UnsupportedOperationException();
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Command#getResult()
+        */
+       @Override
+       public
+       T
+       getResult()
+       {
+               return this.result;
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/Command.java b/org.tizen.common/src/org/tizen/common/core/command/Command.java
new file mode 100644 (file)
index 0000000..c1b3f19
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command;
+
+/**
+ * <p>
+ * Command.
+ * 
+ * Behavior unit for functionality independing on environment( file system, ui, ... )
+ * </p>
+ * 
+ * @param <T> Execution result type
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public interface
+Command<T>
+{
+       /**
+        * Execute unit functionality
+        * 
+        * @param executor execution subject
+        * @param context execution context
+        * 
+        * @throws Exception If Exception occur in execution
+        */
+       void run( Executor executor, ExecutionContext context ) throws Exception;
+       
+       /**
+        * Execute undoing for execution if possible
+        * 
+        * @param executor execution subject
+        * @param context execution context
+        * 
+        * @throws Exception If Exception occur in undo
+        */
+       void undo( Executor executor, ExecutionContext context ) throws Exception;
+       
+       /**
+        * Return execution result
+        * 
+        * @return Execution result
+        */
+       T getResult();
+       
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/CommandCancelException.java b/org.tizen.common/src/org/tizen/common/core/command/CommandCancelException.java
new file mode 100644 (file)
index 0000000..c4e2b57
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Ho Namkoong <ho.namkoong@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.core.command;
+
+/**
+ * <p>
+ * CommandCancelException.
+ * 
+ * This exception is thrown when run method of command is canceled by user operation.
+ * </p>
+ * 
+ * @param <T> Execution result type
+ * 
+ * @author Ho Namkoong{@literal <ho.namkoong@samsung.com>} (S-Core)
+ * @See Command
+ */
+
+public class CommandCancelException extends RuntimeException {
+    
+    private static final long serialVersionUID = 1L;
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/CompositeCommand.java b/org.tizen.common/src/org/tizen/common/core/command/CompositeCommand.java
new file mode 100644 (file)
index 0000000..4fdfba5
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+/**
+ * <p>
+ * CompositeCommand.
+ * 
+ * Command to execute multiple {@link Command}s
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+CompositeCommand
+extends AbstractCommand<Object>
+{
+       
+       /**
+        * {@link Command}s to execute
+        */
+       @SuppressWarnings("rawtypes")
+       protected final ArrayList<Command> commands = new ArrayList<Command>();
+       
+       /**
+        * Constructor with {@link Command}s
+        * 
+        * @param commands {@link Command}s to execute 
+        * 
+        * @see #addCommand(Command...)
+        */
+       public
+       CompositeCommand(
+               final Command<?>... commands
+       )
+       {
+               addCommand( commands );
+       } 
+       
+       /**
+        * Add {@link Command} to {@link Command}s to execute 
+        * 
+        * @param commands
+        * 
+        * @see #commands
+        */
+       public
+       void
+       addCommand(
+               final Command<?>... commands
+       )
+       {
+               if ( null != commands )
+               {
+                       this.commands.addAll( Arrays.asList( commands ) );
+               }
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Command#execute(org.tizen.common.core.command.Executor, org.tizen.common.core.command.ExecutionContext)
+        */
+       @Override
+       public
+       void
+       run(
+               final Executor executor,
+               final ExecutionContext context
+       )
+       throws Exception
+       {
+               for ( final Command<Object> command : this.commands )
+               {
+                       command.run( executor, context );
+               }
+               
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/EclipseExecutor.java b/org.tizen.common/src/org/tizen/common/core/command/EclipseExecutor.java
new file mode 100755 (executable)
index 0000000..77b857f
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command;
+
+import org.tizen.common.Factory;
+import org.tizen.common.core.command.policy.PolicyRegistry;
+import org.tizen.common.file.EclipseFileHandler;
+import org.tizen.common.file.FileHandler;
+
+public class
+EclipseExecutor
+extends Executor
+{
+       /**
+        * Contructor with prompter
+        * 
+        * @param prompter {@link Prompter}
+        */
+       public
+       EclipseExecutor(
+               final Prompter prompter
+       )
+       {
+               super(
+                       new Factory<ExecutionContext>() {
+                               
+                               /**
+                                * {@link FileHandler} for Command Line Interface
+                                */
+                               protected FileHandler fileHandler = new EclipseFileHandler();
+                               
+                               
+                               /**
+                                * <p>
+                                * {@link PolicyRegistry} for Command Line Interface
+                                * </p>
+                                */
+                               protected Factory<PolicyRegistry> factory = new PolicyRegistryFactory();
+                               
+                               /**
+                                * Create and return {@link PolicyRegistry}
+                                * 
+                                * @return {@link PolicyRegistry} to be created
+                                */
+                               protected
+                               PolicyRegistry
+                               getRegistry()
+                               {
+                                       return factory.create();
+                               }
+                               
+                               /* (non-Javadoc)
+                                * @see org.tizen.common.core.command.ExecutionContextFactory#create()
+                                */
+                               @Override
+                               public
+                               ExecutionContext
+                               create()
+                               {
+                                       return new ExecutionContext(
+                                   getRegistry(),
+                                   prompter,
+                                   fileHandler
+                                               );
+                               }
+                               
+                       }
+               );
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/ExecutionContext.java b/org.tizen.common/src/org/tizen/common/core/command/ExecutionContext.java
new file mode 100755 (executable)
index 0000000..96efcd6
--- /dev/null
@@ -0,0 +1,201 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command;
+
+import java.util.HashMap;
+
+import org.tizen.common.config.Preference;
+import org.tizen.common.core.command.policy.PolicyRegistry;
+import org.tizen.common.file.FileHandler;
+
+/**
+ * <p>
+ * ExecutionContext.
+ * 
+ * Context in execution of commands
+ * 
+ * Container for objects in execution envitonment
+ * 
+ * It is injected by executor
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see Executor
+ */
+public class
+ExecutionContext
+{
+    protected static final ThreadLocal<ExecutionContext> context = new ThreadLocal<ExecutionContext>();
+    
+    public static ExecutionContext getCurrentContext()
+    {
+        return context.get();
+    }
+    
+    public static void clear()
+    {
+        context.remove();
+    }
+    
+       /**
+        * Registry for {@link Policy}
+        */
+       protected final PolicyRegistry registry;
+       
+       /**
+        * {@link Prompter} for user interaction
+        */
+       protected final Prompter prompter;
+       
+       /**
+        * {@link FileHandler} for file system
+        */
+       protected final FileHandler fileHandler;
+       
+       
+       /**
+        * User argument
+        */
+       protected HashMap<String, Object> args = new HashMap<String, Object>();
+       
+       
+       /**
+        * Constructor with {@link PolicyRegistry}, {@link Prompter} and {@link FileHandler}
+        * 
+        * @param registry {@link PolicyRegistry} to use
+        * @param prompter {@link Prompter} to use
+        * @param fileHandler {@link FileHandler} to use
+        */
+       public
+       ExecutionContext(
+               final PolicyRegistry registry,
+               final Prompter prompter,
+               final FileHandler fileHandler
+       )
+       {
+               this.registry= registry;
+               this.prompter = prompter;
+               this.fileHandler = fileHandler;
+               
+               context.set( this );
+       }
+       
+       
+       /**
+        * Return {@link PolicyRegistry} to be using
+        * 
+        * @return {@link PolicyRegistry}
+        */
+       public
+       PolicyRegistry
+       getPolicyRegistry()
+       {
+               return this.registry;
+       }
+       
+       /**
+        * Return {@link Policy} for <code>name</code>
+        * 
+        * @param name policy name
+        * 
+        * @return {@link Policy} matching by <code>name<code>
+        * 
+        * @see PolicyRegistry#getPolicy(String);
+        */
+       public
+       Policy
+       getPolicy(
+               final String name
+       )
+       {
+               return this.registry.getPolicy( name );
+       }
+       
+       /**
+        * Return {@link Prompter} to be using
+        * 
+        * @return {@link Prompter} 
+        */
+       public
+       Prompter
+       getPrompter()
+       {
+               return this.prompter;
+       }
+       
+       /**
+        * Return {@link FileHandler} to be using
+        * 
+        * @return {@link FileHandler}
+        */
+       public
+       FileHandler
+       getFileHandler()
+       {
+               return this.fileHandler;
+       }
+       
+       
+       /**
+        * <p>
+        * return context preference value.
+        * 
+        * return global preference value if not exist.
+        * </p>
+        * @param key preference key
+        * 
+        * @return preference value
+        * 
+        * @see Preference
+        */
+       public
+       Object
+       getValue( final String key )
+       {
+           Object val = args.get( key );
+           if ( null != val )
+           {
+               return val;
+           }
+           
+           return Preference.getValue( key, null );
+           
+       }
+
+       /**
+        * <p>
+        * set context preference
+        * </p>
+        * @param key prefernece key
+        * @param value preference value
+        */
+       public
+       void
+       setValue( final String key, final Object value )
+       {
+           args.put( key, value );
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/Executor.java b/org.tizen.common/src/org/tizen/common/core/command/Executor.java
new file mode 100644 (file)
index 0000000..6cd4e29
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command;
+
+import static org.tizen.common.core.command.Policy.EXCEPTION_UNHANDLED;
+
+import java.lang.Thread.UncaughtExceptionHandler;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.Factory;
+
+
+/**
+ * <p>
+ * Executor.
+ * 
+ * Execute command in specific environment
+ * 
+ * Environment is specified by {@link #contextFactory}
+ * 
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+Executor
+{
+       /**
+        * Logger for this instance
+        */
+       protected Logger logger = LoggerFactory.getLogger( getClass() );
+       
+       /**
+        * Factory for {@link ExecutionContext}
+        */
+       protected Factory<ExecutionContext> contextFactory;
+       
+       /**
+        * Cabinet for {@link ExecutionContext}
+        * 
+        * Context is sustain in execution and destroy after exection
+        * 
+        * @see #contextFactory
+        */
+       protected ThreadLocal<ExecutionContext> contexts = new ThreadLocal<ExecutionContext>()
+       {
+               /* (non-Javadoc)
+                * @see java.lang.ThreadLocal#initialValue()
+                */
+               @Override
+               protected
+               ExecutionContext
+               initialValue()
+               {
+                       if ( null == contextFactory )
+                       {
+                               return null;
+                       }
+                       return contextFactory.create();
+               };
+       };
+       
+       /**
+        * Default constructor
+        */
+       public
+       Executor()
+       {
+       }
+       
+       /**
+        * Constructor with context factory
+        * 
+        * @param factory context factory to use
+        * 
+        * @see #setContextFactory(Factory)
+        */
+       public
+       Executor(
+               final Factory<ExecutionContext> factory
+       )
+       {
+               setContextFactory( factory );
+       }
+       
+       /**
+        * Return context factory
+        * 
+        * @return context factory in use
+        */
+       public
+       Factory<ExecutionContext>
+       getContextFactory()
+       {
+               return this.contextFactory;
+       }
+       
+       /**
+        * Set context factory
+        * 
+        * @param factory context factory to use
+        */
+       public
+       void
+       setContextFactory(
+               final Factory<ExecutionContext> factory
+       )
+       {
+               logger.info( "ExecutionContextFactory :{}", factory );
+               this.contextFactory = factory;
+       }
+       
+       /**
+        * Execute <code>commands</code>
+        * 
+        * @param commands {@link Command}s
+        */
+       public
+       void
+       execute(
+               final Command<?>... commands
+       )
+       {
+        logger.trace( "Commands :{}", commands );
+        contexts.remove();
+        
+        execute( contexts.get(), commands );
+           
+       }
+       public
+       void
+       execute(
+               final ExecutionContext context,
+               final Command<?>... commands
+               )
+       {
+
+               try {
+                       for ( final Command<?> command : commands )
+                       {
+                               command.run( this, context );
+                       }
+               } catch ( final Exception e ) {
+                       final Policy policy = context.getPolicy( EXCEPTION_UNHANDLED );
+                       if ( null == policy )
+                       {       // No policy
+                               logger.error( "Error occured", e );
+                               return ;
+                       }
+                       
+                       final UncaughtExceptionHandler handler = policy.adapt( UncaughtExceptionHandler.class );
+                       if ( null == handler )
+                       {
+                               throw new IllegalStateException( e );
+                       }
+                       handler.uncaughtException( Thread.currentThread(), e );
+               }
+               finally
+               {
+               contexts.remove();
+               }
+       }
+       
+       /**
+        * Execute <code>command</code> in <code>context</code>
+        * 
+        * @param command {@link Command} to run
+        * @param context {@link ExecutionContext} to run in
+        */
+       public void
+       run(
+               final Command<?> command,
+               final ExecutionContext context
+       )
+       throws Exception
+       {
+               command.run( this, context );
+       }
+       
+       /**
+        * Return {@link ExecutionContext} in context
+        * 
+        * @return {@link ExecutionContext}
+        */
+       public ExecutionContext
+       getContext()
+       {
+               return contexts.get();
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/InputValidator.java b/org.tizen.common/src/org/tizen/common/core/command/InputValidator.java
new file mode 100755 (executable)
index 0000000..a5eb1b7
--- /dev/null
@@ -0,0 +1,31 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.core.command;\r
+\r
+public interface\r
+InputValidator\r
+{\r
+    String check( Object value );\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/core/command/Policy.java b/org.tizen.common/src/org/tizen/common/core/command/Policy.java
new file mode 100644 (file)
index 0000000..479d2f3
--- /dev/null
@@ -0,0 +1,154 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command;
+
+import org.tizen.common.Adaptable;
+
+
+/**
+ * <p>
+ * Policy.
+ * 
+ * Adapter to other class when specific situation
+ * 
+ * Situation specification is defined by naming rule
+ * 
+ * Situation is define hierachically and is like tree structure
+ * 
+ * Situation name has qualified name separating dot( '.' ).
+ * 
+ * Each name fragment means node name in tree and qualified name stands for unique path.
+ * 
+ * If there is no matching policy in registry, it provide policy having least distance.
+ * 
+ * <ul>
+ *     <li>nonexist
+ *     <ul>
+ *             <li>file
+ *             <ul>
+ *                     <li>in</li>
+ *             </ul>
+ *             </li>
+ *             <li>dir
+ *             <ul>
+ *                     <li>in
+ *                     <ul>
+ *                             <li>project</li>
+ *                     </ul>
+ *                     </li>
+ *             </ul>
+ *             </li>
+ *     </ul>
+ *     </li>
+ *     <li>exist
+ *     <ul>
+ *             <li>file
+ *             <ul>
+ *                     <li>out
+ *                     <ul>
+ *                             <li>wgt</li>
+ *                     </ul>
+ *                     </li>
+ *             </ul>
+ *     </ul>
+ *     </li>
+ *     <li>exception
+ *     <ul>
+ *             <li>unhandled</li>
+ *             <li>file
+ *             <ul>
+ *                     <li>out
+ *                     <ul>
+ *                             <li>wgt</li>
+ *                     </ul>
+ *                     </li>
+ *             </ul>
+ *             </li>
+ *     </ul>
+ *     </li>
+ * </ul>
+ * 
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public interface
+Policy
+extends Adaptable
+{
+       /**
+        * When input file doesn't exist
+        */
+       String NONEXIST_IN_FILE = "nonexist.file.in";
+       
+       /**
+        * When input sign profile
+        */
+       String NONEXIST_IN_FILE_SIGN_PROFILE = "nonexist.file.in.signprofile";
+       
+       /**
+        * When input directory doesn't exist
+        */
+       String NONEXIST_IN_DIRECTORY = "nonexist.dir.in";
+       
+       /**
+        * When input project directory doesn't exist
+        */
+       String NONEXIST_IN_PROJECT = "nonexist.dir.in.project";
+       
+       /**
+        * When output file already exists
+        */
+       String EXIST_OUT_FILE = "exist.file.out";
+       /**
+        * When output widget file already exists
+        */
+       String EXIST_OUT_WGT = "exist.file.out.wgt";
+       
+       /**
+        * When target file is already exist.
+        */
+       String EXIST_FILE_WHEN_COPY = "exist.file.when.copy";
+       
+       /**
+        * When unexpected exception occured
+        */
+       String EXCEPTION_UNHANDLED = "exception.unhandled";
+       /**
+        * When exception occured in handling output widget file
+        */
+       String EXCEPTION_OUT_WGT = "exception.file.out.wgt";
+       
+       String PRINTOUT_RESULT_SIGNING = "printout.result.signing";
+       
+       /**
+        * Return policy name
+        * 
+        * policy name is unique indentifier
+        * 
+        * @return policy name
+        */
+       String getName();
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/PolicyRegistryFactory.java b/org.tizen.common/src/org/tizen/common/core/command/PolicyRegistryFactory.java
new file mode 100644 (file)
index 0000000..d055af0
--- /dev/null
@@ -0,0 +1,240 @@
+/*
+ * Web IDE - Command Line Interface
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command;
+
+import static org.tizen.common.core.command.Policy.EXIST_OUT_FILE;
+import static org.tizen.common.core.command.Policy.NONEXIST_IN_FILE;
+import static org.tizen.common.core.command.Policy.EXIST_FILE_WHEN_COPY;
+import static org.tizen.common.core.command.Policy.EXCEPTION_UNHANDLED;
+import java.io.File;
+import org.tizen.common.Factory;
+import org.tizen.common.core.command.policy.AbstractPolicy;
+import org.tizen.common.core.command.policy.FilePolicy;
+import org.tizen.common.core.command.policy.MessagePolicy;
+import org.tizen.common.core.command.policy.OptionPolicy;
+import org.tizen.common.core.command.policy.PolicyRegistry;
+import org.tizen.common.core.command.policy.UncaughtExceptionHandlingPolicy;
+import org.tizen.common.core.command.prompter.RunableOption;
+import org.tizen.common.file.StandardFileHandler;
+
+/**
+ * <p>
+ * PolicyRegistryFactory.
+ * 
+ * {@link Factory} to provide {@link PolicyRegistry} in eclipse ide
+ * 
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+PolicyRegistryFactory
+implements Factory<PolicyRegistry>
+{
+       /**
+        * <p>
+        * CLIPolicy.
+        * 
+        * {@link Policy} when command line interface
+        * </p>
+        * 
+        * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+        * 
+        * @see PolicyRegistry, {@link Policy}
+        */
+       class EclipsePolicy 
+       extends AbstractPolicy
+       {
+               /**
+                * <p>
+                * Constructor with <code>name</code>
+                * </p>
+                * 
+                * @param name policy name
+                */
+               public EclipsePolicy( final String name )
+               {
+                       super( name );
+               }
+
+               /* (non-Javadoc)
+                * @see org.tizen.common.Adaptable#adapt(java.lang.Class)
+                */
+               @Override
+               @SuppressWarnings("unchecked")
+               public <T>
+               T
+               adapt(
+                       final Class<T> clazz
+               )
+               {
+                       if ( clazz.isAssignableFrom( FilePolicy.class ) )
+                       {
+                               return (T) FilePolicy.STOP_PROCESS;
+                       }
+                       else if ( clazz.isAssignableFrom( MessagePolicy.class) )
+                       {
+                               return (T) MessagePolicy.PROMPTER;
+                       }
+                       else if ( clazz.isAssignableFrom(UncaughtExceptionHandlingPolicy.class))
+                       {
+                               return (T) UncaughtExceptionHandlingPolicy.INSTANCE;
+                       }
+                       return null;
+               }
+
+       }
+       /* (non-Javadoc)
+        * @see org.tizen.common.Factory#create()
+        */
+       @Override
+       public
+       PolicyRegistry
+       create()
+       {
+               final PolicyRegistry registry = new PolicyRegistry();
+               
+               registry.register( new EclipsePolicy( EXIST_FILE_WHEN_COPY ) {
+                       @SuppressWarnings("unchecked")
+                       @Override
+                       public <T> T adapt(Class<T> clazz) {
+                               if(clazz.isAssignableFrom(OptionPolicy.class)) {
+                                       
+                                       RunableOption overwrite = new RunableOption("overwrite") {
+                                       
+                                       private StandardFileHandler handler = new StandardFileHandler();
+                                       
+                                       @Override
+                                       public void runWithArgument(Object... args) throws Exception {
+                                               if(args.length != 2) {
+                                                       throw new IllegalArgumentException("argument length is wrong");
+                                               }
+                                               
+                                               if(!(args[0] instanceof File && args[1] instanceof File)) {
+                                                       throw new IllegalArgumentException("argument type is wrong");
+                                               }
+                                               
+                                               File sourceFile = ((File)args[0]);
+                                               File targetFile = ((File)args[1]);
+                                               
+                                               handler.copyFile(sourceFile.getPath(), targetFile.getPath());
+                                       }
+                                       
+                                       @Override
+                                       public boolean isDefault() {
+                                               return false;
+                                       }
+                               };
+                               
+                               RunableOption ignore = new RunableOption("ignore") {
+                                       
+                                       @Override
+                                       public boolean isDefault() {
+                                               return true;
+                                       }
+                                       
+                                       @Override
+                                       protected void runWithArgument(Object... args) throws Exception{
+                                       }
+                               };
+                               
+                               RunableOption overwriteAll = new RunableOption("overwriteAll") {
+                                       
+                                       private StandardFileHandler handler = new StandardFileHandler();
+                                       
+                                       @Override
+                                       public boolean isDefault() {
+                                               return false;
+                                       }
+                                       
+                                       @Override
+                                       protected void runWithArgument(Object... args) throws Exception {
+                                               super.setAllFlag(true);
+                                               
+                                               if(args.length != 2) {
+                                                       throw new IllegalArgumentException("argument length is wrong");
+                                               }
+                                               
+                                               if(!(args[0] instanceof File && args[1] instanceof File)) {
+                                                       throw new IllegalArgumentException("argument type is wrong");
+                                               }
+                                               
+                                               File sourceFile = ((File)args[0]);
+                                               File targetFile = ((File)args[1]);
+                                               
+                                               handler.copyFile(sourceFile.getPath(), targetFile.getPath());
+                                       }
+                               };
+                               
+                               RunableOption ignoreAll = new RunableOption("ignoreAll") {
+                                       
+                                       @Override
+                                       public boolean isDefault() {
+                                               return false;
+                                       }
+                                       
+                                       @Override
+                                       protected void runWithArgument(Object... args) throws Exception{
+                                               super.setAllFlag(true);
+                                       }
+                               };
+                               
+                               RunableOption cancel = new RunableOption("cancel") {
+                                       
+                                       @Override
+                                       public boolean isDefault() {
+                                               return false;
+                                       }
+                                       
+                                       @Override
+                                       protected void runWithArgument(Object... args) throws Exception{
+                                       }
+                               };
+                                       
+                                       return (T)(new OptionPolicy(overwrite, ignore, overwriteAll, ignoreAll, cancel));
+                               }
+                               return super.adapt(clazz);
+                       }
+               });
+               
+               registry.register(new EclipsePolicy(EXCEPTION_UNHANDLED) {
+                       
+                       @SuppressWarnings("unchecked")
+                       @Override
+                       public <T> T adapt(Class<T> clazz) {
+                               if ( clazz.isAssignableFrom(UncaughtExceptionHandlingPolicy.class))
+                               {
+                                       return (T) UncaughtExceptionHandlingPolicy.INSTANCE;
+                               }
+                               return null;
+                       }
+               });
+               registry.register( new EclipsePolicy(EXIST_OUT_FILE));
+               registry.register( new EclipsePolicy( NONEXIST_IN_FILE ) );
+               
+               return registry;
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/Prompter.java b/org.tizen.common/src/org/tizen/common/core/command/Prompter.java
new file mode 100755 (executable)
index 0000000..a67c909
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.tizen.common.core.command.prompter.Option;
+
+/**
+ * <p>
+ * Prompter.
+ * 
+ * Handle user interaction
+ * <ul>
+ *     <li>user input</li>
+ *     <li>message output</li>
+ * <ul>
+ * 
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public interface
+Prompter
+{
+    
+       /**
+        * <p>
+        * Input user selection.
+        * 
+        * The selection must be in <code>options</code>
+        * </p>
+        * 
+        * @param question selection message
+        * @param options options to choice
+        * 
+        * @return user selection
+        */
+       Option interact( final String question, final Option... options );
+
+       /**
+        * <p>
+        * Input user input as password
+        * 
+        * Password must be secured
+        * </p>
+        * 
+        * @param message message for user password
+        * 
+        * @return user input as password
+        */
+       Object password( String message );
+
+       /**<p>
+        * Print out error message
+        * </p>
+        * 
+        * @param message error message
+        */
+       void error( final String message );
+
+       /**
+        * Print out information message to notify
+        * 
+        * @param message notification message
+        */
+       void notify( final String message );
+
+       /**
+        * User cancle work in process
+        */
+       void cancel();
+       
+       
+       /**
+        * Batch process for user interaction with option
+        * 
+        * @param userFields user interaction specifications
+        * @param options options for prompter
+        */
+       void batch( Collection<UserField> userFields, Map<String, Object> options );
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/PrompterConstants.java b/org.tizen.common/src/org/tizen/common/core/command/PrompterConstants.java
new file mode 100755 (executable)
index 0000000..f485af7
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.core.command;\r
+\r
+public class PrompterConstants\r
+{\r
+    public static final String SUPPORT_CONSOLE = "console";\r
+    \r
+    public static final String SUPPORT_IDE = "eclipse";\r
+    \r
+    public static final String OPTION_TITLE = "title";\r
+    \r
+    public static final String OPTION_DIALOG_RETURN_CODE = "returnCode";\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/core/command/UntrackedException.java b/org.tizen.common/src/org/tizen/common/core/command/UntrackedException.java
new file mode 100755 (executable)
index 0000000..a8390fc
--- /dev/null
@@ -0,0 +1,41 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.core.command;\r
+\r
+public class UntrackedException\r
+extends RuntimeException\r
+{\r
+\r
+    /**\r
+     * \r
+     */\r
+    private static final long serialVersionUID = 2958587918624984128L;\r
+    \r
+    public UntrackedException( final String message, final Throwable cause )\r
+    {\r
+        super( message, cause );\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/core/command/UserField.java b/org.tizen.common/src/org/tizen/common/core/command/UserField.java
new file mode 100755 (executable)
index 0000000..1f5c46a
--- /dev/null
@@ -0,0 +1,149 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.core.command;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Arrays;\r
+import java.util.Collection;\r
+\r
+/**\r
+ * <p>\r
+ * UserField.\r
+ * \r
+ * User input sepecification\r
+ * \r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public class UserField\r
+{\r
+    protected final String id;\r
+    \r
+    protected final String message;\r
+    \r
+    \r
+    /**\r
+     * <ul>\r
+     * <li>String - text, normal input</li>\r
+     * <li>char[] - password, secured input</li>\r
+     * <li>String[] - ComboBox</li>\r
+     * <li>File - File selector</li>\r
+     * <li>boolean - checkbox, selection input</li>\r
+     * </ul>\r
+     */\r
+    protected final Class<?> type;\r
+    \r
+    protected boolean bModify = true;\r
+    \r
+    protected Object value;\r
+    \r
+    protected InputValidator validator;\r
+    \r
+    protected Collection<UserField> children;\r
+    \r
+    protected Collection<Object> supports;\r
+    \r
+    public UserField(\r
+        final String id,\r
+        final String message,\r
+        final Class<?> type\r
+    )\r
+    {\r
+        this.id = id;\r
+        this.message = message;\r
+        this.type = type;\r
+    }\r
+    \r
+    \r
+    public String getId()\r
+    {\r
+        return this.id;\r
+    }\r
+    \r
+    public String getMessage()\r
+    {\r
+        return this.message;\r
+    }\r
+    \r
+    public Class<?> getType()\r
+    {\r
+        return this.type;\r
+    }\r
+    \r
+    public boolean canModify()\r
+    {\r
+        return bModify;\r
+    }\r
+    \r
+    public void setModify( boolean bModify )\r
+    {\r
+        this.bModify = bModify;\r
+    }\r
+    \r
+    public Object getValue()\r
+    {\r
+        return this.value;\r
+    }\r
+    \r
+    public void setValue( final Object value )\r
+    {\r
+        this.value = value;\r
+    }\r
+    \r
+    public InputValidator getValidator() {\r
+        return this.validator;\r
+    }\r
+    \r
+    public void setValidator( final InputValidator validator )\r
+    {\r
+        this.validator = validator;\r
+    }\r
+    \r
+    public Collection<UserField> getChildren()\r
+    {\r
+        return this.children;\r
+    }\r
+    \r
+    public void addChild( final UserField... children )\r
+    {\r
+        if ( null  == this.children )\r
+        {\r
+            this.children = new ArrayList<UserField>();\r
+        }\r
+        this.children.addAll( Arrays.asList( children ) );\r
+    }\r
\r
+    public Collection<Object> getSupports()\r
+    {\r
+        return this.supports;\r
+    }\r
+    \r
+    public void addSupport( final Object support )\r
+    {\r
+        this.supports.add( support );\r
+    }\r
+    \r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/core/command/file/DirectoryCopyHandlingCommand.java b/org.tizen.common/src/org/tizen/common/core/command/file/DirectoryCopyHandlingCommand.java
new file mode 100755 (executable)
index 0000000..53c9f1b
--- /dev/null
@@ -0,0 +1,144 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Ho Namkoong <ho.namkoong@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.file;
+
+import java.io.File;
+import java.util.List;
+import java.util.Stack;
+
+import org.tizen.common.core.command.AbstractCommand;
+import org.tizen.common.core.command.CommandCancelException;
+import org.tizen.common.core.command.ExecutionContext;
+import org.tizen.common.core.command.Executor;
+import org.tizen.common.core.command.Policy;
+import org.tizen.common.core.command.policy.OptionPolicy;
+import org.tizen.common.core.command.prompter.Option;
+import org.tizen.common.core.command.prompter.RunableOption;
+import org.tizen.common.file.StandardFileHandler;
+import org.tizen.common.util.log.Logger;
+
+/**
+ * <p>
+ * DirectoryCopyHandlingCommand.
+ * This class is used for copying source directory to the target directory.
+ * {@link FileHandlingCommand}
+ * </p>
+ * 
+ * @author Ho Namkoong{@literal <ho.namkoong@samsung.com>} (S-Core)
+ */
+
+public class DirectoryCopyHandlingCommand extends FileHandlingCommand<Boolean> {
+    
+    /**
+     * List of target path
+     */
+    protected List<String> targetPathList;
+    
+    /**
+     * List of source path
+     */
+    protected List<String> sourcePathList;
+    
+    public DirectoryCopyHandlingCommand(List<String> sourcePathList, List<String> targetPathList) throws IllegalArgumentException{
+        if(sourcePathList.size() != targetPathList.size()) {
+            throw new IllegalArgumentException("Lenghs of sourcePathList and target paths are not same");
+        }
+        this.sourcePathList = sourcePathList;
+        this.targetPathList = targetPathList;
+    }
+    
+    
+    @Override
+    public void run(Executor executor, ExecutionContext context)
+            throws Exception {
+        StandardFileHandler handler = new StandardFileHandler();
+        Policy policy = context.getPolicy(Policy.EXIST_FILE_WHEN_COPY);
+        OptionPolicy optionPolicy = policy.adapt( OptionPolicy.class );
+        Option[] options = optionPolicy.getOptions();
+        
+        for(Option option: options) {
+            if(!(option instanceof RunableOption)) {
+                throw new IllegalArgumentException("Option " + option.getName() + " is not RunnableOption");
+            }
+        }
+        
+        for(int i =0; i< sourcePathList.size(); i++) {
+            String sourcePath = sourcePathList.get(i);
+            String targetPath = targetPathList.get(i);
+            
+            final Stack<File> sourceStack = new Stack<File>();
+            final Stack<File> targetStack = new Stack<File>();
+            sourceStack.push( new File(sourcePath ) );
+            targetStack.push( new File( targetPath ) );
+            
+            while ( !sourceStack.isEmpty() )
+            {
+                final File sourceFile = sourceStack.pop();
+                final File targetFile = targetStack.pop();
+                
+                if ( sourceFile.isDirectory() )
+                {
+                    handler.makeDirectory(targetFile.getPath());
+                    for ( final File sourceChild : sourceFile.listFiles() )
+                    {
+                        sourceStack.push( sourceChild );
+                        targetStack.push( new File( targetFile, sourceChild.getName() ) );
+                    }
+                }
+                else if(sourceFile.isFile()) {
+                    if(targetFile.exists()) {
+                        boolean selectionDone = false;
+                        RunableOption resultOption = null;
+                        
+                        for (Option option : options) {
+                            if(((RunableOption)option).isAllFlag()) {
+                                resultOption = (RunableOption)option;
+                                selectionDone = true;
+                                break;
+                            }
+                        }
+                        
+                        if(!selectionDone) {
+                            resultOption = (RunableOption)context.getPrompter().interact(targetFile.getCanonicalPath() + " already exist", options);
+                        }
+                        if(AbstractCommand.COMMAND_CANCEL.equals(resultOption.getName())) {
+                            throw new CommandCancelException();
+                        }
+                        
+                        resultOption.setArgument(sourceFile, targetFile);
+                        resultOption.run();
+                    }
+                    else {
+                        targetFile.createNewFile();
+                        handler.copyFile(sourceFile.getPath(), targetFile.getPath());
+                    }
+                }
+                else {
+                    Logger.error(sourceFile + " is not file or directory");
+                }
+            }
+        }
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/file/FileHandlingCommand.java b/org.tizen.common/src/org/tizen/common/core/command/file/FileHandlingCommand.java
new file mode 100755 (executable)
index 0000000..378d83f
--- /dev/null
@@ -0,0 +1,190 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.file;
+
+import org.tizen.common.FactoryWithArgument;
+import org.tizen.common.core.command.AbstractCommand;
+import org.tizen.common.core.command.Command;
+import org.tizen.common.core.command.ExecutionContext;
+import org.tizen.common.core.command.Executor;
+import org.tizen.common.file.Filter;
+import org.tizen.common.file.SimpleFileFilter;
+import org.tizen.common.file.filter.WildCardFilterFactory;
+import org.tizen.common.util.Assert;
+
+/**
+ * FileHandlingCommand.
+ * 
+ * Abstract class for file handling {@link Command}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+FileHandlingCommand<T>
+extends AbstractCommand<T>
+{
+       /**
+        * Factory to create file name pattern filter
+        */
+       protected FactoryWithArgument<Filter, String> filterFactory = new WildCardFilterFactory();
+       
+       /**
+        * File name filter
+        */
+       protected SimpleFileFilter filter = new SimpleFileFilter( true );
+       
+       /**
+        * Handling main path
+        */
+       protected String path;
+       
+       /**
+        * Set filter factory
+        * 
+        * @param factory {@link FactoryWithArgument<Filter, String>}
+        * 
+        * @see WildCardFilterFactory
+        */
+       public
+       void
+       setFilterFactory(
+               final FactoryWithArgument<Filter, String> factory
+       )
+       {
+               this.filterFactory = factory;
+               logger.debug( "Configured filter factory :{}", factory );
+       }
+       
+       /**
+        * Set filter
+        * @param filter {@link SimpleFileFilter}
+        */
+       public
+       void
+       setFilter( SimpleFileFilter filter )
+       {
+           Assert.notNull( filter );
+               this.filter = filter;
+               logger.debug( "Configured filter :{}", filter );
+       }
+       
+       /**
+        * Set including file name patterns
+        * 
+        * @param includes including file name patterns
+        */
+       public
+       void
+       setIncludes(
+               final String[] includes
+       )
+       {
+               filter.clearIncludes();
+               if ( null != includes )
+               {
+                       for ( final String include : includes )
+                       {
+                               filter.addIncludes( filterFactory.create( include ) );
+                       }
+               }
+       }
+       
+       /**
+        * Set excluding file name patterns
+        * 
+        * @param excludes excluding file name patterns
+        */
+       public
+       void
+       setExcludes(
+               final String[] excludes
+       )
+       {
+               filter.clearExcludes();
+               if ( null != excludes )
+               {
+                       for ( final String exclude : excludes )
+                       {
+                               filter.addExcludes( filterFactory.create( exclude ) );
+                       }
+               }
+       }
+
+       /**
+        * Return main working path
+        * 
+        * @return {@link #path}
+        */
+       public
+       String
+       getPath()
+       {
+               return this.path;
+       }
+       
+       /**
+        * Set main working path
+        * 
+        * @param path main working path
+        */
+       public
+       void
+       setPath(
+               final String path
+       )
+       {
+               this.path = path;
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.AbstractCommand#execute(org.tizen.common.core.command.Executor, org.tizen.common.core.command.ExecutionContext)
+        */
+       @Override
+       public
+       void
+       run(
+               final Executor executor,
+               final ExecutionContext context
+       )
+       throws Exception
+       {
+               throw new UnsupportedOperationException();
+               
+       }
+       
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.AbstractCommand#undo(org.tizen.common.core.command.Executor, org.tizen.common.core.command.ExecutionContext)
+        */
+       @Override
+       public
+       void
+       undo(
+               final Executor executor,
+               final ExecutionContext context
+       )
+       throws Exception {
+               throw new UnsupportedOperationException();
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/file/WriteFileCommand.java b/org.tizen.common/src/org/tizen/common/core/command/file/WriteFileCommand.java
new file mode 100644 (file)
index 0000000..b8a1f62
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.file;
+
+import java.io.ByteArrayInputStream;
+
+import org.tizen.common.core.command.ExecutionContext;
+import org.tizen.common.core.command.Executor;
+import org.tizen.common.util.ObjectUtil;
+
+public class
+WriteFileCommand
+extends FileHandlingCommand<Boolean>
+{
+       protected final byte[] contents;
+       
+       public WriteFileCommand( final String path, final byte[] contents )
+       {
+               setPath( path );
+               this.contents = contents; 
+       }
+       
+       @Override
+       public
+       void
+       run(
+               final Executor executor,
+               final ExecutionContext context
+       )
+       throws Exception
+       {
+           final byte[] safeBytes = ObjectUtil.nvl( contents, new byte[0] );
+           
+           logger.trace( "Trying write {} in {} bytes", path, safeBytes.length );
+           
+           context.getFileHandler().write(
+               path,
+               new ByteArrayInputStream( safeBytes )
+           );
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/policy/AbstractMessagePolicy.java b/org.tizen.common/src/org/tizen/common/core/command/policy/AbstractMessagePolicy.java
new file mode 100644 (file)
index 0000000..1c1ca76
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.policy;
+
+import static org.tizen.common.util.StringUtil.NULL_STRING;
+
+import java.text.MessageFormat;
+
+/**
+ * AbstractMessagePolicy.
+ * 
+ * Abstract class for {@link MessagePolicy}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+abstract public class
+AbstractMessagePolicy
+implements MessagePolicy
+{
+
+       /**
+        * Provide common formatting rule
+        * 
+        * @param format message format
+        * @param args message arguments
+        * 
+        * @return formatted message
+        */
+       protected
+       String
+       format(
+               final String format,
+               final Object... args
+       )
+       {
+               if ( null == format )
+               {
+                       return NULL_STRING;
+               }
+               return MessageFormat.format( format, args );
+               
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/policy/AbstractPolicy.java b/org.tizen.common/src/org/tizen/common/core/command/policy/AbstractPolicy.java
new file mode 100644 (file)
index 0000000..25b12a5
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.policy;
+
+import org.tizen.common.core.command.Policy;
+
+/**
+ * AbstractPolicy.
+ * 
+ * Abstract class for {@link Policy}
+ * 
+ * All policy must have name and can't change it
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+abstract public class
+AbstractPolicy
+implements Policy
+{
+       
+       /**
+        * Policy name
+        */
+       protected final String name;
+       
+       /**
+        * Constructor with policy name
+        * 
+        * @param name poclicy name
+        * 
+        * @see Policy
+        */
+       public
+       AbstractPolicy(
+               final String name
+       )
+       {
+               this.name = name;
+       }
+       
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Policy#getName()
+        */
+       @Override
+       public
+       String
+       getName()
+       {
+               return this.name;
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/policy/FilePolicy.java b/org.tizen.common/src/org/tizen/common/core/command/policy/FilePolicy.java
new file mode 100644 (file)
index 0000000..d70487f
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.policy;
+
+
+/**
+ * FilePolicy.
+ * 
+ * File handling policy
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public enum
+FilePolicy
+{
+       /**
+        * <p>
+        * Stop process.
+        * 
+        * Throw exception
+        * </p>
+        */
+       STOP_PROCESS,
+       
+       /**
+        * <p>
+        * Skip process.
+        * 
+        * Don't throw exception
+        * </p>
+        */
+       SKIP,
+       
+       /**
+        * <p>
+        * overwwrite when already exist
+        * </p>
+        */
+       OVERWRITE,
+       
+       /**
+        * <p>
+        * Make directory when directory doesn't exist
+        * </p>
+        */
+       MAKE_DIR,
+       
+       /**
+        * <p>
+        * Make file when file doesn't exist
+        * </p>
+        */
+       MAKE_FILE
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/policy/MessagePolicy.java b/org.tizen.common/src/org/tizen/common/core/command/policy/MessagePolicy.java
new file mode 100644 (file)
index 0000000..379c601
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.policy;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.command.Prompter;
+
+/**
+ * FilePolicy.
+ * 
+ * File handling policy
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public interface
+MessagePolicy
+{
+       /**
+        * Print out message
+        * 
+        * @param prompter {@link Prompter}
+        * @param format message format
+        * @param args message arguments
+        */
+       void
+       print(
+               final Prompter prompter,
+               final String format,
+               final Object... args
+       );
+       
+       /**
+        * Print out error message
+        * @param prompter {@link Prompter}
+        * @param format message format
+        * @param args message arguments
+        */
+       void
+       error(
+               final Prompter prompter,
+               final String format,
+               final Object... args
+       );
+       
+       /**
+        * {@link MessagePolicy} to print out using logger
+        * 
+        * FIXME caller fqcn is constants
+        */
+       MessagePolicy LOGGING = new AbstractMessagePolicy()
+       {
+               /**
+                * Logger to use for message printing
+                */
+               protected final Logger logger =
+                       LoggerFactory.getLogger( getClass() );
+
+               /* (non-Javadoc)
+                * @see org.tizen.common.core.command.policy.MessagePolicy#print(org.tizen.common.core.command.Prompter, java.lang.String, java.lang.Object[])
+                */
+               @Override
+               public
+               void
+               print(
+                       final Prompter prompter,
+                       final String format,
+                       final Object... args
+               )
+               {
+                       logger.debug( format( format, args ) );
+               }
+
+               /* (non-Javadoc)
+                * @see org.tizen.common.core.command.policy.MessagePolicy#error(org.tizen.common.core.command.Prompter, java.lang.String, java.lang.Object[])
+                */
+               @Override
+               public void error(
+                       final Prompter prompter,
+                       final String format,
+                       final Object... args
+               )
+               {
+                       logger.error( format( format, args ) );
+               }
+       };
+       
+       /**
+        * {@link MessagePolicy} to print out using {@link Prompter}
+        */
+       MessagePolicy PROMPTER = new AbstractMessagePolicy()
+       {
+               
+               /* (non-Javadoc)
+                * @see org.tizen.common.core.command.policy.MessagePolicy#print(org.tizen.common.core.command.Prompter, java.lang.String, java.lang.Object[])
+                */
+               @Override
+               public
+               void
+               print(
+                       final Prompter prompter,
+                       final String format,
+                       final Object... args
+               )
+               {
+                       prompter.notify( format( format, args ) );
+               }
+
+               /* (non-Javadoc)
+                * @see org.tizen.common.core.command.policy.MessagePolicy#error(org.tizen.common.core.command.Prompter, java.lang.String, java.lang.Object[])
+                */
+               @Override
+               public void error(
+                       final Prompter prompter,
+                       final String format,
+                       final Object... args
+               )
+               {
+                       prompter.error( format( format, args ) );
+                       
+               }
+       };
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/policy/OptionPolicy.java b/org.tizen.common/src/org/tizen/common/core/command/policy/OptionPolicy.java
new file mode 100644 (file)
index 0000000..df6e482
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Ho Namkoong <ho.namkoong@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.core.command.policy;
+
+import org.tizen.common.core.command.prompter.Option;
+
+/**
+ * OptionPolicy
+ * This policy returns options which are needed for Prompt#interact(final String question, final Option... options).
+ * @See Command, Prompter
+ * @author Changhyun Lee {@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+
+public class OptionPolicy  {
+    
+    protected Option[] options;
+    
+    /**
+     * <p>
+     * Constructor with <code>options</code>
+     * </p>
+     * 
+     * @param options options which this policy will return.
+     */
+    public OptionPolicy(Option... options) {
+        this.options = options;
+    }
+    
+    /**
+     * Returns options this policy has.
+     * 
+     * @return return options.
+     */
+    public Option[] getOptions() {
+        return options;
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/policy/PolicyRegistry.java b/org.tizen.common/src/org/tizen/common/core/command/policy/PolicyRegistry.java
new file mode 100644 (file)
index 0000000..0308d6a
--- /dev/null
@@ -0,0 +1,294 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.policy;
+
+import java.util.HashMap;
+
+import org.tizen.common.core.command.Policy;
+import org.tizen.common.util.StringUtil;
+
+
+/**
+ * <p>
+ * PolicyRegistry.
+ * 
+ * Registry for {@link Policy}
+ * 
+ * {@link Policy} is stored in tree-like structure
+ * 
+ * A node has {@link Policy} or doesn't
+ * 
+ * A node has multiple child nodes
+ * 
+ * Policy's location is made a decision by its name
+ * 
+ * name is composed of subname and separator( "<b>.</b>" )
+ * 
+ * example for name is following
+ * <ul>
+ * <li>invalid.input.format.file</li>
+ * <li>nonexist.input.file</li>
+ * <li>exist.output.file</li>
+ * </ul>
+ * </p>
+ * @author bylee
+ *
+ */
+public class PolicyRegistry
+{
+       /**
+        * Node.
+        * 
+        * Node for tree structure
+        * 
+        * @author bylee
+        *
+        */
+       class Node
+       {
+               
+               /**
+                * {@link Policy} stored in node
+                */
+               protected Policy policy;
+               
+               /**
+                * Default constructor
+                */
+               public Node()
+               {
+               }
+               
+               /**
+                * Constructor with {@link Policy}
+                * 
+                * @param policy {@link Policy} to store
+                */
+               public Node(
+                       final Policy policy
+               )
+               {
+                       this.policy = policy;
+               }
+               
+               protected final HashMap<String, Node> name2child =
+                       new HashMap<String, PolicyRegistry.Node>();
+               
+               /**
+                * Rerturn {@link Policy} to be stored
+                * 
+                * @return policy to be stored
+                */
+               public Policy getPolicy()
+               {
+                       return this.policy;
+               }
+               
+               /**
+                * Set policy
+                *
+                * @param policy {@link Policy} to store
+                */
+               public void setPolicy(
+                       final Policy policy
+               )
+               {
+                       this.policy = policy;
+               }
+               
+               
+               /**
+                * Get child node with <code>name</code> in this node
+                * 
+                * @param name node's name
+                * 
+                * @return child node with <code>name</code>
+                */
+               public Node getChild(
+                       final String name
+               )
+               {
+                       return name2child.get( name );
+               }
+               
+               /**
+                * Add <code>node</code> with <code>name</code> as child
+                * 
+                * @param name node name
+                * @param node node to add
+                */
+               public void addChild( final String name, Node node )
+               {
+                       name2child.put( name, node );
+               }
+       }
+       
+       /**
+        * No-operation policy. Missing object pattern
+        */
+       protected Policy noOp = new AbstractPolicy( "" )
+       {
+               /* (non-Javadoc)
+                * @see org.tizen.common.Adaptable#adapt(java.lang.Class)
+                */
+               @Override
+               public <T> T adapt( final Class<T> clazz )
+               {
+                       return null;
+               }
+       };
+       
+       /**
+        * Root node( in tree structure)
+        */
+       protected Node root = new Node();
+       
+       /**
+        * Constructor with {@link Policy}s
+        * 
+        * @param policies {@link Policy}s to add
+        * 
+        * @see #register(Policy)
+        */
+       public
+       PolicyRegistry(
+               final Policy... policies
+       )
+       {
+               if ( null == policies )
+               {
+                       return ;
+               }
+               
+               register( policies );
+       }
+       
+       /**
+        * Add <code>policies</code> to registry
+        * 
+        * @param policies {@link Policy}s to add
+        */
+       public void
+       register(
+               final Policy... policies
+       )
+       {
+               for ( final Policy policy : policies )
+               {
+                       final String name = policy.getName();
+                       
+                       final Node node = createNode( name );
+                       
+                       if ( null != node.getPolicy() )
+                       {
+                               throw new IllegalArgumentException( "Policy is duplicated" );
+                       }
+                       
+                       node.setPolicy( policy );
+               }
+               
+       }
+       
+       /**
+        * Create node with <code>path</code> in tree
+        * 
+        * @param path node path from root in tree
+        * 
+        * @return {@link Node} to be specified with <code>path</code>
+        */
+       public Node createNode( final String path )
+       {
+               final String[] fragments = StringUtil.split( path, "." );
+               
+               Node iter = root;
+               
+               for ( int i = 0, n = fragments.length ; i < n ; ++i )
+               {
+                       Node child = iter.getChild( fragments[i] );
+                       if ( null == child )
+                       {
+                               child = new Node();
+                               iter.addChild( fragments[i], child );
+                       }
+                       
+                       iter = child;
+               }
+               
+               return iter;
+       }
+       
+       /**
+        * Return {@link Policy} from tree with <code>path</code>
+        * 
+        * Return ancestor node's policy unless matching exactly
+        * 
+        * @param path
+        * 
+        * @return {@link Policy}
+        */
+       public Policy
+       getPolicy( final String path )
+       {
+               if ( StringUtil.isEmpty( path ) )
+               {
+                       return noOp;
+               }
+               final String[] fragments = StringUtil.split( path, "." );
+               
+               Node iter = root;
+               
+               Policy policy = null;
+               
+               for ( int i = 0, n = fragments.length ; i < n ; ++i )
+               {
+                       if ( null != iter.getPolicy() )
+                       {
+                               policy = iter.getPolicy();
+                       }
+                       
+                       Node child = iter.getChild( fragments[i] );
+                       if ( null == child )
+                       {
+                               return policy;
+                       }
+                       iter = child;
+               }
+               
+               if ( null == iter.getPolicy() )
+               {
+                       return policy;
+               }
+               return iter.getPolicy();
+       }
+       
+       /* (non-Javadoc)
+        * @see java.lang.Object#toString()
+        */
+       @Override
+       public String toString()
+       {
+           return getClass().getSimpleName() + "@" + Integer.toHexString( hashCode() ).substring( 0, 4 );
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/policy/SimplePolicy.java b/org.tizen.common/src/org/tizen/common/core/command/policy/SimplePolicy.java
new file mode 100644 (file)
index 0000000..d0f7638
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.policy;
+
+import org.tizen.common.core.command.Policy;
+
+public class SimplePolicy
+implements Policy {
+
+    protected String name;
+    
+    public SimplePolicy( final String name )
+    {
+        this.name = name;
+    }
+    @Override
+    public <T> T adapt(Class<T> clazz) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/policy/UncaughtExceptionHandlingPolicy.java b/org.tizen.common/src/org/tizen/common/core/command/policy/UncaughtExceptionHandlingPolicy.java
new file mode 100644 (file)
index 0000000..f16f9c7
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Ho Namkoong <ho.namkoong@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.policy;
+
+import java.lang.Thread.UncaughtExceptionHandler;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.tizen.common.core.command.CommandCancelException;
+import org.tizen.common.util.log.Logger;
+
+/**
+ * UncaughtExceptionHandlingPolicy.
+ * 
+ * Exception handling policy
+ * Singleton class implemented using enum
+ * 
+ * @author Ho Namkoong{@literal <ho.namkoong@samsung.com>} (S-Core)
+ */
+public enum UncaughtExceptionHandlingPolicy
+        implements
+            UncaughtExceptionHandler {
+    
+    /**
+     * singleton instance.
+     */
+    INSTANCE();
+
+    /**
+     * map which stores handler (value) according to the throwable class name (name).
+     */
+    private final Map<String, UncaughtExceptionHandler> repository = new HashMap<String, UncaughtExceptionHandler>();
+    
+    /**
+     * get handler from repository, and handle exception.
+     * If appropriate repository is not found, 
+     * it searches for handler which handles superclass of target exception.
+     * 
+     * @param t current thread
+     * @param e exception which should be handled
+     * @since 1.5
+     */
+    @Override
+    public void uncaughtException(Thread t, Throwable e) {
+        
+        UncaughtExceptionHandler handler = null;
+        Class<? extends Object> throwableClass = e.getClass();
+        
+        do {
+            handler = repository.get(throwableClass.getCanonicalName());
+            if(handler != null) {
+                handler.uncaughtException(t, e);
+                return;
+            }
+            
+            throwableClass = throwableClass.getSuperclass();
+        } while (!throwableClass.getCanonicalName().equals(Object.class.getCanonicalName()));
+        
+        throw new IllegalStateException(e);
+    }
+    
+    private UncaughtExceptionHandlingPolicy() {
+        installUncaughtExceptionHandlers();
+    }
+    
+    private void installUncaughtExceptionHandlers() {
+        
+        //Install OperationCancelException Handler
+        this.putHandler(CommandCancelException.class.getCanonicalName(), new UncaughtExceptionHandler() {
+            @Override
+            public void uncaughtException(Thread t, Throwable e) {
+                if(e instanceof CommandCancelException) {
+                    throw (CommandCancelException)e;
+                }
+                else {
+                    throw new IllegalStateException();
+                }
+            }
+        });
+    }
+
+    private void putHandler(String throwableName, UncaughtExceptionHandler handler) {
+        if(repository.containsKey(throwableName)) {
+            if(!repository.get(throwableName).equals(handler)) {
+                Logger.error("Handlers are duplicate assigned with one key: " + throwableName);
+            }
+            return;
+        }
+        repository.put(throwableName, handler);
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/prompter/AbstractOption.java b/org.tizen.common/src/org/tizen/common/core/command/prompter/AbstractOption.java
new file mode 100755 (executable)
index 0000000..3d945f0
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.prompter;
+
+import static org.tizen.common.util.StringUtil.isEmpty;
+import static org.tizen.common.util.StringUtil.trim;
+
+import org.tizen.common.util.ObjectUtil;
+
+/**
+ * <p>
+ * AbstractOption.
+ * 
+ * Abstract(common) class for option
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+AbstractOption
+implements Option
+{
+       /**
+        * <p>
+        * Option name
+        * 
+        * It is printed out
+        * </p>
+        */
+       protected final String name;
+
+       /**
+        * Flag if user input is handled as abbreviation
+        */
+       protected final boolean bPermitAbbreviation;
+
+       /**
+        * Flag if this option is default( choice when user doesn't select option )
+        */
+       protected final boolean bDefault;
+
+       /**
+        * Constructor with choice name, default flag and abbreviation flag
+        * 
+        * @param name choice name
+        * @param bDefault default flag
+        * @param bPermitAbbreviation abbreviation flag
+        */
+       public
+       AbstractOption(
+               final String name,
+               final boolean bDefault,
+               final boolean bPermitAbbreviation
+       )
+       {
+               this.name = trim( name );
+
+               this.bDefault = bDefault;
+
+               this.bPermitAbbreviation = bPermitAbbreviation;
+       }
+
+       /**
+        * Return option name
+        * 
+        * @return option name
+        */
+       public String getName()
+       {
+               return this.name;
+       }
+
+       /**
+        * Return whether this choice is default {@link AbstractOption}
+        * 
+        * @return boolean value if this choice is default
+        */
+       public boolean isDefault()
+       {
+               return this.bDefault;
+       }
+
+       /**
+        * Return whether user input, <code>value</code> is match option
+        * 
+        * @param value user input
+        * 
+        * @return boolean value If matching
+        */
+       public
+       boolean
+       isMatch(
+               final String value
+       )
+       {
+               if ( name.equalsIgnoreCase( trim( value ) ) )
+               {
+                       return true;
+               }
+
+               if ( isEmpty( value ) )
+               {
+                       return false;
+               }
+               if ( bPermitAbbreviation )
+               {
+                       return name.substring( 0, 1 ).equalsIgnoreCase( value.substring( 0, 1 ) );
+               }
+
+               return false;
+
+       }
+
+       /* (non-Javadoc)
+        * @see java.lang.Object#hashCode()
+        */
+       @Override
+       public
+       int
+       hashCode()
+       {
+               return name.hashCode();
+       }
+
+       /* (non-Javadoc)
+        * @see java.lang.Object#equals(java.lang.Object)
+        */
+       @Override
+       public
+       boolean
+       equals(
+               final Object obj
+       )
+       {
+               if ( !( obj instanceof AbstractOption ) )
+               {
+                       return false;
+               }
+               final AbstractOption other = (AbstractOption) obj;
+               return ObjectUtil.equals( this.name, other.name );
+       }
+
+       /* (non-Javadoc)
+        * @see java.lang.Object#toString()
+        */
+       @Override
+       public
+       String
+       toString()
+       {
+               if ( isDefault() )
+               {
+                       return "[" + name + "]";
+               }
+               return name;
+       }
+
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/prompter/AbstractPrompter.java b/org.tizen.common/src/org/tizen/common/core/command/prompter/AbstractPrompter.java
new file mode 100755 (executable)
index 0000000..cbbb499
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.prompter;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.command.Prompter;
+import org.tizen.common.util.Assert;
+
+/**
+ * AbstractPrompter.
+ * 
+ * Abstract class for sub class for {@link Prompter}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+AbstractPrompter
+{
+       
+       /**
+        * Logger for this instance
+        */
+       protected final Logger logger = LoggerFactory.getLogger( getClass() );
+
+       protected
+       void
+       checkOptions(
+           final ChoiceOption[] options
+       )
+       {
+           Assert.notNull( options );
+               
+               final HashSet<Option> reducedOptions = new LinkedHashSet<Option>();
+               Option defaultOption = null;
+               final ArrayList<String> optionNames = new ArrayList<String>();
+               for ( final Option option : options )
+               {
+                       if ( reducedOptions.contains( option ) )
+                       {
+                               throw new IllegalArgumentException(
+                                       "Question can't have duplicated choice(s) :" + option 
+                               );
+                       }
+                       optionNames.add( option.getName() );
+                       reducedOptions.add( option );
+                       if ( option.isDefault() )
+                       {
+                               if ( null != defaultOption )
+                               {
+                                       throw new IllegalArgumentException(
+                                               "Question must have only one default choice"
+                                       );
+                               }
+                                       
+                               defaultOption = option;
+                       }
+               }
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/prompter/ChoiceOption.java b/org.tizen.common/src/org/tizen/common/core/command/prompter/ChoiceOption.java
new file mode 100644 (file)
index 0000000..267941b
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.prompter;
+
+import static org.tizen.common.util.StringUtil.hasText;
+
+import org.tizen.common.util.Assert;
+
+/**
+ * <p>
+ * Option.
+ * 
+ * Option to choice
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+ChoiceOption
+extends AbstractOption
+{
+       /**
+        * Constructor with choice name
+        * 
+        * @param name choice name
+        * 
+        * #see {@link #Option(String, boolean)}
+        */
+       public
+       ChoiceOption(
+               final String name
+       )
+       {
+               this( name, false );
+       }
+       
+       /**
+        * Constructor with choice name and default flag
+        * 
+        * @param name choice name
+        * @param bDefault default flag
+        * 
+        * @see #Option(String, boolean, boolean)
+        */
+       public
+       ChoiceOption(
+               final String name,
+               final boolean bDefault
+       )
+       {
+               this( name, bDefault, true );
+       }
+
+       /**
+        * Constructor with choice name, default flag and abbreviation flag
+        * 
+        * @param name choice name
+        * @param bDefault default flag
+        * @param bPermitAbbreviation abbreviation flag
+        */
+       public
+       ChoiceOption(
+               final String name,
+               final boolean bDefault,
+               final boolean bPermitAbbreviation
+       )
+       {
+               super( name, bDefault, bPermitAbbreviation );
+               Assert.isTrue( hasText( name ) );
+       }
+       
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/prompter/EclipsePrompter.java b/org.tizen.common/src/org/tizen/common/core/command/prompter/EclipsePrompter.java
new file mode 100755 (executable)
index 0000000..0427b3d
--- /dev/null
@@ -0,0 +1,219 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.prompter;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.command.Prompter;
+import org.tizen.common.core.command.UserField;
+import org.tizen.common.util.ObjectUtil;
+import org.tizen.common.util.StringUtil;
+
+/**
+ * <p>
+ * EclipsePrompter.
+ * 
+ * Context aware prompter using extension
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+EclipsePrompter
+implements Prompter
+{
+       protected static final String EP_ID = "org.tizen.common.prompter";
+       
+       protected static final String ATTR_SCOPE = "scope";
+       
+       protected static final String ATTR_CLASS = "class";
+                       
+       protected final Logger logger = LoggerFactory.getLogger( getClass() );
+       
+       /**
+        * Default prompter
+        */
+       protected final Prompter defaultPrompter;
+       
+       protected final HashMap<String, Prompter> name2prompter;
+
+       /**
+        * Constructor with default prompter
+        * 
+        * @param defaultPrompter {@link Prompter}
+        */
+       public EclipsePrompter(
+               final Prompter defaultPrompter
+       )
+       {
+               this.defaultPrompter = defaultPrompter;
+               this.name2prompter = new HashMap<String, Prompter>();
+       }
+       
+       protected Prompter
+       getPrompter()
+       {
+               final StackTraceElement[] stacks = Thread.currentThread().getStackTrace();
+               
+               final IExtensionRegistry registry = Platform.getExtensionRegistry();
+               final IExtensionPoint ep = registry.getExtensionPoint( EP_ID );
+               final IExtension[] exts = ep.getExtensions();
+               
+               for ( final StackTraceElement stack : stacks )
+               {
+                       final String className = stack.getClassName();
+                       
+                       for ( final IExtension ext : exts )
+                       {
+                               final IConfigurationElement[] configs = ext.getConfigurationElements();
+                               for  ( IConfigurationElement config : configs )
+                               {
+                                       final String scope = config.getAttribute( ATTR_SCOPE );
+                                       if ( StringUtil.isEmpty( scope ) ) 
+                                       {
+                                               continue;
+                                       }
+
+                                       if ( !ObjectUtil.equals( className, scope ) )
+                                       {
+                                               continue;
+                                       }
+
+                                       try {
+                                               return (Prompter) config.createExecutableExtension( ATTR_CLASS );
+                                       } catch ( CoreException e )
+                                       {
+                                               logger.error( "Can't create prompter :" + config.getAttribute( ATTR_CLASS ) );
+                                               return defaultPrompter;
+                                       }
+                               }
+                       }
+               }
+               
+               return defaultPrompter;
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#interact(java.lang.String, org.tizen.common.core.command.prompter.Option[])
+        */
+       @Override
+       public Option interact(
+               final String question,
+               final Option... options
+       )
+       {
+               final Prompter prompter = getPrompter();
+               return prompter.interact(question, options);
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#password(java.lang.String)
+        */
+       @Override
+       public
+       Object password(
+               final String message
+       )
+       {
+               final Prompter prompter = getPrompter();
+               return prompter.password(message);
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#error(java.lang.String)
+        */
+       @Override
+       public
+       void
+       error(
+               final String message
+       )
+       {
+               final Prompter prompter = getPrompter();
+               prompter.error(message);
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#notify(java.lang.String)
+        */
+       @Override
+       public
+       void
+       notify(
+               final String message
+       )
+       {
+               final Prompter prompter = getPrompter();
+               prompter.notify(message);
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#cancel()
+        */
+       @Override
+       public
+       void
+       cancel()
+       {
+               final Prompter prompter = getPrompter();
+               prompter.cancel();
+       }
+
+
+       /* (non-Javadoc)
+        * @see java.lang.Object#toString()
+        */
+       @Override
+       public String toString()
+       {
+           return getClass().getSimpleName() + "@" + Integer.toHexString( hashCode() ).substring( 0, 4 );
+       }
+
+    /* (non-Javadoc)
+     * @see org.tizen.common.core.command.Prompter#batch(java.util.Collection)
+     */
+    @Override
+    public
+    void
+    batch(
+        final Collection<UserField> userFields,
+        final Map<String, Object> options
+    )
+    {
+        final Prompter prompter = getPrompter();
+        prompter.batch( userFields, options );
+    }
+       
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/prompter/GenericOption.java b/org.tizen.common/src/org/tizen/common/core/command/prompter/GenericOption.java
new file mode 100644 (file)
index 0000000..003b35b
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.prompter;
+
+import static org.tizen.common.util.StringUtil.hasText;
+
+import org.tizen.common.util.Assert;
+
+/**
+ * <p>
+ * GenericOption.
+ * 
+ * {@link ChoiceOption} for general input
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+GenericOption
+extends AbstractOption
+{
+       
+       /**
+        * User input
+        */
+       protected String answer;
+
+       /**
+        * Default constructor
+        */
+       public
+       GenericOption()
+       {
+               super( "", false, false );
+       }
+
+       /**
+        * Constructor with choice name
+        * 
+        * @param name choice name
+        * 
+        * #see {@link #Option(String, boolean)}
+        */
+       public
+       GenericOption(final String name)
+       {
+           super( name, false, false );
+           this.answer = name;
+       }
+
+       /**
+        * Constructor with choice name and default flag
+        * 
+        * @param name choice name
+        * @param bDefault default flag
+        * 
+        * @see #Option(String, boolean, boolean)
+        */
+       public
+       GenericOption (
+               final String name,
+               final boolean bDefault
+               )
+       {
+           super( name, bDefault, false );
+           this.answer = name;
+       }
+
+       /**
+        * Constructor with choice name, default flag and abbreviation flag
+        * 
+        * @param name choice name
+        * @param bDefault default flag
+        * @param bPermitAbbreviation abbreviation flag
+        */
+       public
+       GenericOption (
+               final String name,
+               final boolean bDefault,
+               final boolean bPermitAbbreviation
+               )
+       {
+           super( name, bDefault, bPermitAbbreviation );
+           Assert.isTrue( hasText( name ) );
+           this.answer = name;
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.prompter.AbstractOption#isMatch(java.lang.String)
+        */
+       @Override
+       public
+       boolean
+       isMatch(
+               final String value
+       )
+       {
+               this.answer = value;
+               return true;
+       }
+
+       /**
+        * Return user input
+        * 
+        * @return user input
+        */
+       public String
+       getAnswer()
+       {
+               return this.answer;
+       }
+
+       /* (non-Javadoc)
+        * @see java.lang.Object#toString()
+        */
+       @Override
+       public
+       String
+       toString()
+       {
+           if ( isDefault() )
+           {
+               return "[" + this.answer + "]";
+           }
+           return this.answer;
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/prompter/NopPrompter.java b/org.tizen.common/src/org/tizen/common/core/command/prompter/NopPrompter.java
new file mode 100755 (executable)
index 0000000..25c3c3f
--- /dev/null
@@ -0,0 +1,147 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.prompter;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.tizen.common.core.command.Prompter;
+import org.tizen.common.core.command.UserField;
+
+/**
+ * <p>
+ * NopPrompter.
+ * 
+ * No-Operation Prompter doesn't interact with human
+ * 
+ * It is used for batch process or test
+ * 
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+NopPrompter
+extends AbstractPrompter
+implements Prompter
+{
+       
+       protected char[] password;
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#interact(java.lang.String, int, org.tizen.common.core.command.prompter.Option[])
+        */
+       public
+       Option
+       interact(
+               final String question,
+               final Option... options
+       )
+       {
+               for ( Option option : options )
+               {
+                       if ( option.isDefault() )
+                       {
+                               return option;
+                       }
+               }
+               throw new IllegalArgumentException();
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#notify(java.lang.String, java.lang.Object[])
+        */
+       @Override
+       public
+       void
+       notify(
+               final String message
+       )
+       {
+               logger.info( "Notification >>> {}", message );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#cancel()
+        */
+       @Override
+       public void cancel()
+       {
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#password(java.lang.String)
+        */
+       @Override
+       public
+       Object password(
+               final String message
+       )
+       {
+               return password;
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#error(java.lang.String, java.lang.Object[])
+        */
+       @Override
+       public
+       void
+       error(
+               final String message
+       )
+       {
+               logger.error( "Error >>> {}", message );
+       }
+       
+       /**
+        * Set password
+        * 
+        * @param password password to be provided automatically
+        */
+       public
+       void
+       setPassword(
+               final char[] password
+       )
+       {
+               this.password = password;
+       }
+
+    /* (non-Javadoc)
+     * @see org.tizen.common.core.command.Prompter#batch(java.util.Collection)
+     */
+    @Override
+    public
+    void
+    batch(
+        final Collection<UserField> userFields,
+        final Map<String, Object> options
+    )
+    {
+        // TODO implement
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/prompter/Option.java b/org.tizen.common/src/org/tizen/common/core/command/prompter/Option.java
new file mode 100644 (file)
index 0000000..f68d4c7
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.prompter;
+
+public interface Option
+{
+       String getName();
+
+       boolean isDefault();
+
+       boolean isMatch( final String value );
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/prompter/RunableOption.java b/org.tizen.common/src/org/tizen/common/core/command/prompter/RunableOption.java
new file mode 100644 (file)
index 0000000..dc78fe7
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Ho Namkoong <ho.namkoong@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.core.command.prompter;
+
+public abstract class RunableOption implements Option{
+    
+    /**
+     * Arguments which will be used in run.
+     */
+    private Object[] args;
+    
+    /**
+     * if true, remaning selection is following this option
+     * For example, if you select ignore all or overwrite all when deuplicate files are found, then this flag becomes true.
+     */
+    private boolean allFlag = false;
+    
+    /**
+     * name of this option
+     */
+    private String name;
+    
+    /**
+     * Constructor with name
+     * 
+     * @param name name of this operation
+     */
+    public RunableOption(String name) {
+        this.name = name;
+        this.args = null;
+    }
+    
+    /**
+     * Constructor with name and arguments
+     * 
+     * @param name name of this operation
+     * @param args arguments of this operation
+     */
+    public RunableOption(String name, Object... args) {
+        this.name = name;
+        this.args = args;
+    }
+    
+    /**
+     * Set arguments
+     * 
+     * @param args arguments of this operation
+     */
+    public void setArgument(Object... args) {
+        this.args = args;
+    }
+    
+    /**
+     * Set all flag
+     * 
+     * @param allFlag all flag of this operation
+     */
+    protected void setAllFlag(boolean allFlag) {
+        this.allFlag = allFlag;
+    }
+
+    /**
+     * return all flag
+     * 
+     * @return return true if all flag is true, else return false
+     */
+    public boolean isAllFlag() {
+        return allFlag;
+    }
+    
+    /**
+     * return name
+     * 
+     * @return return name of this operation
+     */
+    @Override
+    public String getName() {
+        return name;
+    }
+    
+    /**
+     * Check if name of this operation and value are matched.
+     * 
+     * @arg value value which is compared with name of this operation
+     * @return return true if matched, else return false.
+     */
+    @Override
+    public boolean isMatch(String value) {
+        if(this.getName().equals(value)) {
+            return true;
+        }
+        return false;
+    }
+
+    protected abstract void runWithArgument(Object... args) throws Exception;
+    
+    public void run() throws Exception {
+        this.runWithArgument(args);
+    }
+    
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/prompter/SWTPrompter.java b/org.tizen.common/src/org/tizen/common/core/command/prompter/SWTPrompter.java
new file mode 100755 (executable)
index 0000000..c11348b
--- /dev/null
@@ -0,0 +1,280 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.prompter;
+
+import static org.tizen.common.util.SWTUtil.asyncExec;
+import static org.tizen.common.util.SWTUtil.exec;
+import static org.tizen.common.util.SWTUtil.getActiveShell;
+import static org.tizen.common.util.SWTUtil.syncExec;
+import static org.tizen.common.util.StringUtil.trim;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.window.Window;
+import org.tizen.common.core.command.Prompter;
+import org.tizen.common.core.command.PrompterConstants;
+import org.tizen.common.core.command.UserField;
+import org.tizen.common.ui.dialog.DynamicDialog;
+import org.tizen.common.ui.dialog.PasswordInputDialog;
+import org.tizen.common.util.NotificationType;
+import org.tizen.common.util.NotifierDialog;
+import org.tizen.common.util.SWTRunner;
+
+/**
+ * <p>
+ * SWTPrompter.
+ * 
+ * {@link Prompter} in SWT environment
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+SWTPrompter
+extends AbstractPrompter
+implements Prompter
+{
+       
+       /**
+        * Create dialog for user interaction
+        * 
+        * @param question message for dialog
+        * @param optionNames option names for dialog
+        * @param defaultOptionIndex initial selection for option
+        * 
+        * @return {@link Dialog} for user selection
+        */
+       protected
+       Dialog
+       createDialog(
+               final String question,
+               final String[] optionNames,
+               final int defaultOptionIndex
+       )
+       {
+               return new MessageDialog(
+                       getActiveShell(),
+                       "Question",
+                       null,
+                       question,
+                       MessageDialog.QUESTION,
+                       optionNames,
+                       defaultOptionIndex
+               )
+               {
+                       protected void buttonPressed( int buttonId )
+                       {
+                               setReturnCode( buttonId );
+                               close();
+                       }
+               };
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#interact(java.lang.String, org.tizen.common.core.command.prompter.Option[])
+        */
+       @Override
+       public
+       Option
+       interact(
+               final String question,
+               final Option... options
+       )
+       {
+               final HashSet<Option> reducedOptions = new LinkedHashSet<Option>();
+               Option defaultOption = null;
+               final ArrayList<String> optionNames = new ArrayList<String>();
+               for ( final Option option : options )
+               {
+                       if ( reducedOptions.contains( option ) )
+                       {
+                               throw new IllegalArgumentException(
+                                       "Question can't have duplicated choice(s) :" + option
+                               );
+                       }
+                       optionNames.add( option.getName() );
+                       reducedOptions.add( option );
+                       if ( option.isDefault() )
+                       {
+                               if ( null != defaultOption )
+                               {
+                                       throw new IllegalArgumentException(
+                                               "Question must have only one default choice"
+                                       );
+                               }
+                                       
+                               defaultOption = option;
+                       }
+               }
+               final int defaultIndex = optionNames.indexOf( defaultOption.getName() );
+               
+               return exec( new SWTRunner<Option>()
+        {
+                   /* (non-Javadoc)
+                    * @see org.tizen.common.util.SWTRunner#process()
+                    */
+                   public Option process() {
+                       final Dialog dialog = createDialog( question, optionNames.toArray( new String[0] ), defaultIndex );
+                       dialog.open();
+                       return options[dialog.getReturnCode()];
+                   }
+               } );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#notify(java.lang.String, java.lang.Object[])
+        */
+       @Override
+       public void
+       notify(
+               final String message
+       )
+       {
+               asyncExec( new Runnable() {
+                       
+                       /* (non-Javadoc)
+                        * @see java.lang.Runnable#run()
+                        */
+                       @Override
+                       public void run() {
+                               NotifierDialog.notify( "Notify", message, NotificationType.INFO );
+                       }
+               } );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#cancel()
+        */
+       @Override
+       public void cancel() {
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#password(java.lang.String)
+        */
+       @Override
+       public
+       Object password(
+               final String message
+       )
+       {
+               return exec( new SWTRunner<char[]>()
+        {
+                       /* (non-Javadoc)
+                        * @see java.lang.Runnable#run()
+                        */
+                       @Override
+                       public char[] process()
+                       {
+                           final PasswordInputDialog dialog =
+                               new PasswordInputDialog( "Password Input Dialog", message );
+                           
+                               dialog.open();
+                               
+                               if ( IDialogConstants.OK_ID != dialog.getReturnCode() )
+                               {
+                                   return null;
+                               }
+                               
+                               return trim( dialog.getValue() ).toCharArray();
+                       }
+               } );
+               
+               
+               
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.Prompter#error(java.lang.String, java.lang.Object[])
+        */
+       @Override
+       public
+       void
+       error(
+               final String message
+       )
+       {
+               syncExec( new Runnable() {
+                       
+                       /* (non-Javadoc)
+                        * @see java.lang.Runnable#run()
+                        */
+                       @Override
+                       public void run() {
+                               MessageDialog.openError( getActiveShell(), "Error", message );
+                       }
+               } );
+                       
+       }
+
+    /* (non-Javadoc)
+     * @see org.tizen.common.core.command.Prompter#batch(java.util.Collection)
+     */
+    @Override
+    public
+    void
+    batch(
+        final Collection<UserField> userFields,
+        final Map<String, Object> options
+    )
+    {
+        final AtomicInteger returnCode = new AtomicInteger();
+        
+        syncExec( new Runnable() {
+            @Override
+            public void run() {
+                DynamicDialog dynamicDialog = new DynamicDialog( userFields );
+                
+                // set title from options
+                if ( options != null && options.containsKey( PrompterConstants.OPTION_TITLE ) ) {
+                    Object object = options.get( PrompterConstants.OPTION_TITLE );
+                    if ( object instanceof String ) {
+                        dynamicDialog.setTitle( (String) object );
+                    }
+                }
+                
+                returnCode.set( dynamicDialog.open() );
+                
+                if (options != null) {
+                    options.put( PrompterConstants.OPTION_DIALOG_RETURN_CODE, new Integer( returnCode.get() ) );
+                }
+            }
+        } );
+        
+        if ( returnCode.get() == Window.CANCEL ) {
+            throw new OperationCanceledException("Cancel interaction.");
+        }
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/sdb/DevicesSdbCommand.java b/org.tizen.common/src/org/tizen/common/core/command/sdb/DevicesSdbCommand.java
new file mode 100644 (file)
index 0000000..e86d38d
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import org.tizen.common.core.command.ExecutionContext;
+import org.tizen.common.core.command.Executor;
+import org.tizen.common.util.Assert;
+import org.tizen.sdblib.IDevice;
+
+public class DevicesSdbCommand
+extends SdbHandlingCommand
+{
+    protected SmartDevelopmentBridgeManager createBridge()
+    {
+        return new SmartDevelopmentBridgeManager();
+    }
+
+    @Override
+    public void run( final Executor executor, ExecutionContext context)
+    {
+        SmartDevelopmentBridgeManager bridge = createBridge();
+        Assert.notNull( bridge );
+
+        IDevice devices[] = bridge.getDevices();
+        String result = new String();
+        for ( IDevice device : devices )
+        {
+            result += device.toString() + System.getProperty("line.separator");
+        }
+        setResult( result );
+
+        context.getPrompter().notify( getResult() );
+    }
+
+    @Override
+    public void undo(final Executor executor, ExecutionContext context) throws Exception
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/sdb/DlogSdbCommand.java b/org.tizen.common/src/org/tizen/common/core/command/sdb/DlogSdbCommand.java
new file mode 100644 (file)
index 0000000..f4bfb88
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import org.tizen.common.core.command.ExecutionContext;
+import org.tizen.common.core.command.Executor;
+
+public class DlogSdbCommand
+extends ShellSdbCommand
+{
+    protected String DLOG_COMMAND = "dlogutil";
+
+    public void setFilter(String filter) {
+        this.DLOG_COMMAND = "dlogutil "+filter;
+    }
+
+    @Override
+    public void run(Executor executor, ExecutionContext context)
+            throws Exception {
+        setCommand( this.DLOG_COMMAND );
+        super.run( executor, context );
+    }
+
+    @Override
+    public void undo(Executor executor, ExecutionContext context)
+            throws Exception {
+        // TODO Auto-generated method stub
+        
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/sdb/ForwardSdbCommand.java b/org.tizen.common/src/org/tizen/common/core/command/sdb/ForwardSdbCommand.java
new file mode 100644 (file)
index 0000000..08ff6ee
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import org.tizen.common.core.command.ExecutionContext;
+import org.tizen.common.core.command.Executor;
+import org.tizen.common.util.Assert;
+import org.tizen.sdblib.IDevice;
+
+public class ForwardSdbCommand
+extends SdbDevicesHandlingCommand
+{
+    private int localPort;
+    private int remotePort;
+
+    public ForwardSdbCommand(int localPort, int remotePort) {
+        this.localPort = localPort;
+        this.remotePort = remotePort;
+    }
+
+    @Override
+    public void run(final Executor executor, ExecutionContext context) throws InterruptedException {
+        IDevice device = getDevice();
+        Assert.notNull( device );
+
+        try {
+            device.createForward( localPort, remotePort );
+        }  catch (Exception e) {
+            // TODO Message fix need
+            context.getPrompter().notify( "Forward socket connections error." );
+        }
+    }
+
+    @Override
+    public void undo(Executor executor, ExecutionContext context)
+            throws Exception {
+        IDevice device = getDevice();
+        Assert.notNull( device );
+
+        try {
+            device.removeForward( localPort, remotePort );
+        }  catch (Exception e) {
+            // TODO Message fix need
+            context.getPrompter().notify( "Remove forward socket connections error." );
+        }
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/sdb/PullSdbCommand.java b/org.tizen.common/src/org/tizen/common/core/command/sdb/PullSdbCommand.java
new file mode 100755 (executable)
index 0000000..9f9c65d
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import java.io.IOException;
+
+import org.tizen.common.core.command.ExecutionContext;
+import org.tizen.common.core.command.Executor;
+import org.tizen.common.util.Assert;
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.SdbCommandRejectedException;
+import org.tizen.sdblib.SyncService;
+import org.tizen.sdblib.SyncService.ISyncProgressMonitor;
+import org.tizen.sdblib.SyncService.SyncResult;
+import org.tizen.sdblib.TimeoutException;
+
+public class PullSdbCommand
+extends SdbDevicesHandlingCommand
+{
+    protected String remotePath;
+    protected String localPath;
+
+    public PullSdbCommand(String remotePath, String localPath)
+    {
+        this.remotePath = remotePath;
+        this.localPath = localPath;
+    }
+
+    protected SyncService getSyncService() throws TimeoutException, SdbCommandRejectedException, IOException
+    {
+        return device.getSyncService();
+    }
+
+    protected ISyncProgressMonitor getProgressMonitor() {
+        return SyncService.getNullProgressMonitor();
+    }
+
+    @Override
+    public void run(final Executor executor, ExecutionContext context)
+    throws Exception
+    {
+        IDevice device = getDevice();
+        Assert.notNull( device );
+
+        SyncService service = getSyncService();
+        SyncResult syncSuccess = 
+        service.pullFile( remotePath, localPath, getProgressMonitor() );
+        if ( syncSuccess.getCode() != SyncService.RESULT_OK ) {
+            // TODO Message fix need
+            context.getPrompter().notify( "Error: Failed to Transfer." );
+        }
+    }
+
+    @Override
+    public void undo(final Executor executor, ExecutionContext context) throws Exception {
+        // TODO Auto-generated method stub
+        
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/sdb/PushSdbCommand.java b/org.tizen.common/src/org/tizen/common/core/command/sdb/PushSdbCommand.java
new file mode 100755 (executable)
index 0000000..f5cfc8b
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import java.io.IOException;
+
+import org.tizen.common.core.command.ExecutionContext;
+import org.tizen.common.core.command.Executor;
+import org.tizen.common.util.Assert;
+import org.tizen.common.util.FilenameUtil;
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.SdbCommandRejectedException;
+import org.tizen.sdblib.SyncService;
+import org.tizen.sdblib.SyncService.ISyncProgressMonitor;
+import org.tizen.sdblib.SyncService.SyncResult;
+import org.tizen.sdblib.TimeoutException;
+
+public class PushSdbCommand
+extends SdbDevicesHandlingCommand
+{
+    protected String localPath;
+    protected String remotePath;
+
+    public PushSdbCommand(String localPath, String remotePath)
+    {
+        this.localPath = localPath;
+        this.remotePath = remotePath;
+    }
+
+    protected SyncService getSyncService() throws TimeoutException, SdbCommandRejectedException, IOException
+    {
+        return device.getSyncService();
+    }
+
+    protected ISyncProgressMonitor getProgressMonitor() {
+        return SyncService.getNullProgressMonitor();
+    }
+
+    @Override
+    public void run(final Executor executor, ExecutionContext context)
+    throws Exception
+    {
+        IDevice device = getDevice();
+        Assert.notNull( device );
+
+        SyncService service = getSyncService();
+        SyncResult syncSuccess = 
+        service.pushFile( localPath, remotePath, getProgressMonitor() );
+        String name = FilenameUtil.getFilename( localPath );
+        if ( syncSuccess.getCode() != SyncService.RESULT_OK ) {
+            setResult( "Failed" );
+            context.getPrompter().notify( "'" + name + "' file transfer failed." );
+            return ;
+        }
+        setResult( "Success" );
+        context.getPrompter().notify( "'" + name + "' file transfer successful." );
+    }
+
+    @Override
+    public void undo(final Executor executor, ExecutionContext context) throws Exception {
+        // TODO Auto-generated method stub
+        
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/sdb/SdbDevicesHandlingCommand.java b/org.tizen.common/src/org/tizen/common/core/command/sdb/SdbDevicesHandlingCommand.java
new file mode 100644 (file)
index 0000000..95230fc
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import org.tizen.sdblib.IDevice;
+
+public abstract class
+SdbDevicesHandlingCommand
+extends SdbHandlingCommand
+{
+    protected IDevice device;
+
+    public void setDevice(IDevice device)
+    {
+        this.device = device;
+    }
+
+    public IDevice getDevice()
+    {
+        return this.device;
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/sdb/SdbHandlingCommand.java b/org.tizen.common/src/org/tizen/common/core/command/sdb/SdbHandlingCommand.java
new file mode 100644 (file)
index 0000000..6c98a72
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import org.tizen.common.core.command.Command;
+
+public abstract class
+SdbHandlingCommand
+implements Command<String>
+{
+    protected StringBuffer result;
+
+    public void clearResult() {
+        if ( this.result == null ) {
+            this.result = new StringBuffer();
+        } else {
+            this.result.delete( 0, result.capacity() );
+            this.result.setLength( 0 );
+        }
+    }
+
+    public String getResult()
+    {
+        if ( this.result == null ) {
+            return null;
+        }
+        return this.result.toString();
+    }
+
+    public void setResult(String result)
+    {
+        if ( this.result == null ) {
+            this.result = new StringBuffer();
+        }
+        this.result.append( result );
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/sdb/ShellSdbCommand.java b/org.tizen.common/src/org/tizen/common/core/command/sdb/ShellSdbCommand.java
new file mode 100644 (file)
index 0000000..647ef49
--- /dev/null
@@ -0,0 +1,184 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import org.tizen.common.core.command.ExecutionContext;
+import org.tizen.common.core.command.Executor;
+import org.tizen.common.util.Assert;
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.MultiLineReceiver;
+
+/**
+ * <p>
+ * ShellSdbCommand.
+ * 
+ * Command to run shell in target
+ * </p>
+ * 
+ * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class ShellSdbCommand
+extends SdbDevicesHandlingCommand
+{
+    /**
+     * print option, It's using children class
+     */
+    protected boolean printOption = true;
+
+    /**
+     * get print option
+     * 
+     * @return true print, false not print
+     */
+    public boolean isPrintOption() {
+        return printOption;
+    }
+
+    /**
+     * set print option
+     * 
+     * @param printOption
+     */
+    public void setPrintOption(boolean printOption) {
+        this.printOption = printOption;
+    }
+
+    /**
+     * command is performed on the select device
+     */
+    private String command;
+
+    /**
+     * Default timeout value
+     */
+    private static int DEFAULT_TIME = 90;
+
+    /**
+     * Wait for shell command completion
+     */
+    private int time;
+
+    /**
+     * Get wait for shell command completion time
+     * 
+     * @return time value
+     */
+    public int getTime() {
+        return time;
+    }
+
+    /**
+     * Set wait for shell command completion time
+     * 
+     * @param time value
+     */
+    public void setTime(int time) {
+        this.time = time <= 0 ? DEFAULT_TIME : time;
+    }
+
+    /**
+     * Constructor, default command is empty so if using this constructor then must call setCommand
+     */
+    public ShellSdbCommand() {
+        this.time = DEFAULT_TIME;
+    }
+
+    /**
+     * Constructor with command, command is running in target device.
+     * 
+     * @param command
+     */
+    public ShellSdbCommand(String command) {
+        this.command = command;
+        this.time = DEFAULT_TIME;
+    }
+
+    /**
+     * Get command, command is running in target device
+     * 
+     * @return command
+     */
+    public String getCommand() {
+        return command;
+    }
+
+    /**
+     * Set command, command is running in target device
+     * 
+     * @param command
+     */
+    public void setCommand(String command) {
+        this.command = command;
+    }
+
+    /**
+     * Create MultiLineReceiver, MultiLineReceiver's processNewLines method save command running result
+     * 
+     * @return MultiLineReceiver
+     */
+    public MultiLineReceiver createMultiLineReceiver() {
+        return new MultiLineReceiver() {
+            @Override
+            public void processNewLines(String[] lines) {
+                for( String content: lines ) {
+                    setResult( content+System.getProperty( "line.separator" ) );
+                }
+            }
+        };
+    }
+
+    /**
+     * Run command on selected device, using SDB's device.excuteShellCommand method.
+     * if don't setting the timeout value then timeout value is set the default value.
+     */
+    @Override
+    public void run(Executor executor, ExecutionContext context)
+            throws Exception {
+        IDevice device = getDevice();
+        Assert.notNull( device );
+        Assert.notNull( command );
+
+        clearResult();
+        try {
+            device.executeShellCommand( command, createMultiLineReceiver(), getTime()*1000 );
+        } catch ( Exception e ) {
+            if ( isPrintOption() ) {
+                String msg = "Operation failed.";
+                context.getPrompter().notify( msg );
+            }
+            throw e;
+        }
+    }
+
+    @Override
+    public void undo(Executor executor, ExecutionContext context)
+            throws Exception {
+        // TODO Auto-generated method stub
+        
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/sdb/SmartDevelopmentBridgeManager.java b/org.tizen.common/src/org/tizen/common/core/command/sdb/SmartDevelopmentBridgeManager.java
new file mode 100755 (executable)
index 0000000..2709e20
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.SmartDevelopmentBridge;
+
+/**
+ * <p>
+ * SmartDevelopmentBridgeManager.
+ * 
+ * class for delegate SmartDevelopmentBridge.
+ * 
+ * </p>
+ * 
+ * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class SmartDevelopmentBridgeManager
+{
+    private SmartDevelopmentBridge impl = SmartDevelopmentBridge.getBridge();
+
+    public boolean equals(Object obj) {
+        return impl.equals(obj);
+    }
+
+    public int getConnectionAttemptCount() {
+        return impl.getConnectionAttemptCount();
+    }
+
+    public IDevice[] getDevices() {
+        return impl.getDevices();
+    }
+
+    public int getRestartAttemptCount() {
+        return impl.getRestartAttemptCount();
+    }
+
+    public String getSdbOsLocation() {
+        return impl.getSdbOsLocation();
+    }
+
+    public boolean hasInitialDeviceList() {
+        return impl.hasInitialDeviceList();
+    }
+
+    public int hashCode() {
+        return impl.hashCode();
+    }
+
+    public boolean isConnected() {
+        return impl.isConnected();
+    }
+
+    public boolean restart() {
+        return impl.restart();
+    }
+
+    public String toString() {
+        return impl.toString();
+    }
+
+    public void disconnectBridge() {
+        SmartDevelopmentBridge.disconnectBridge();
+    }
+
+    public void terminate() {
+        SmartDevelopmentBridge.terminate();
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/core/command/zip/JarCommand.java b/org.tizen.common/src/org/tizen/common/core/command/zip/JarCommand.java
new file mode 100755 (executable)
index 0000000..add09d4
--- /dev/null
@@ -0,0 +1,95 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.core.command.zip;\r
+\r
+import java.io.IOException;\r
+import java.io.OutputStream;\r
+import java.util.jar.JarEntry;\r
+import java.util.jar.JarOutputStream;\r
+import java.util.zip.ZipOutputStream;\r
+\r
+/**\r
+ * <p>\r
+ * JarCommand.\r
+ * \r
+ * Command to make jar archive\r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see ZipCommand\r
+ */\r
+public class\r
+JarCommand\r
+extends ZipCommand\r
+{\r
+    /**\r
+     * Constructor with base dir and target file name\r
+     * \r
+     * @param baseDir base directory path\r
+     * @param target target file name\r
+     */\r
+    public\r
+    JarCommand(\r
+        final String baseDir, \r
+        final String target\r
+    )\r
+    {\r
+        super( baseDir, target );\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.core.command.zip.ZipCommand#createZipOutputStream(java.io.OutputStream)\r
+     */\r
+    @Override\r
+    protected\r
+    ZipOutputStream\r
+    createZipOutputStream(\r
+        final OutputStream out\r
+    )\r
+    throws IOException\r
+    {\r
+        JarOutputStream zipOut = new JarOutputStream( out );\r
+        zipOut.setMethod( ZipOutputStream.DEFLATED );\r
+        zipOut.setLevel( 9 );\r
+        \r
+        return zipOut;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.core.command.zip.ZipCommand#createEntry(java.lang.String)\r
+     */\r
+    @Override\r
+    protected\r
+    JarEntry\r
+    createEntry(\r
+        final String name\r
+    )\r
+    {\r
+        return new JarEntry( name );\r
+    }\r
+\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/core/command/zip/ZipCommand.java b/org.tizen.common/src/org/tizen/common/core/command/zip/ZipCommand.java
new file mode 100755 (executable)
index 0000000..754abce
--- /dev/null
@@ -0,0 +1,300 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.zip;
+
+import static org.tizen.common.core.command.Policy.EXIST_OUT_WGT;
+import static org.tizen.common.core.command.Policy.NONEXIST_IN_DIRECTORY;
+import static org.tizen.common.util.FilenameUtil.getRelativePath;
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.text.MessageFormat;
+import java.util.Collection;
+import java.util.Comparator;
+import java.util.TreeSet;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipOutputStream;
+
+import org.tizen.common.core.command.ExecutionContext;
+import org.tizen.common.core.command.Executor;
+import org.tizen.common.core.command.Policy;
+import org.tizen.common.core.command.file.FileHandlingCommand;
+import org.tizen.common.core.command.policy.FilePolicy;
+import org.tizen.common.core.command.policy.MessagePolicy;
+import org.tizen.common.file.FileHandler;
+import org.tizen.common.file.FileHandler.Attribute;
+import org.tizen.common.file.FileHandler.Type;
+import org.tizen.common.util.Assert;
+import org.tizen.common.util.FilenameUtil;
+import org.tizen.common.util.IOUtil;
+
+/**
+ * <p>
+ * ZipCommand.
+ * 
+ * Command to make zip archive
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+ZipCommand
+extends FileHandlingCommand<Object>
+{
+       /**
+        * Directory to zip
+        */
+       protected final String baseDir;
+       
+       /**
+        * Constructor with base dir and target file name
+        * 
+        * @param baseDir base directory path
+        * @param target target file name
+        */
+       public
+       ZipCommand(
+               final String baseDir,
+               final String target
+       )
+       {
+               this.baseDir = baseDir;
+               setPath( target );
+       }
+       
+       /* (non-Javadoc)
+        * @see org.tizen.common.core.command.file.FileHandlingCommand#execute(org.tizen.common.core.command.Executor, org.tizen.common.core.command.ExecutionContext)
+        */
+       @Override
+       public
+       void
+       run(
+               final Executor executor,
+               final ExecutionContext context
+       )
+       throws IOException
+       {
+               final FileHandler handler = context.getFileHandler();
+               Assert.notNull( handler );
+               
+               if ( !handler.is( baseDir, Attribute.EXISTS ) )
+               {
+                       final Policy policy = context.getPolicy( NONEXIST_IN_DIRECTORY );
+                       
+                       final MessagePolicy messagePolicy = policy.adapt( MessagePolicy.class );
+                       
+                       messagePolicy.print( context.getPrompter(), "{0} doesn't exist.", baseDir );
+                       return ;
+               }
+               
+               if ( handler.is( path, Attribute.EXISTS ) )
+               {
+                       final Policy policy = context.getPolicy( EXIST_OUT_WGT );
+                       
+                       final MessagePolicy messagePolicy = policy.adapt( MessagePolicy.class );
+                       messagePolicy.print( context.getPrompter(), "Widget already exist." );
+                       
+                       final FilePolicy filePolicy = policy.adapt( FilePolicy.class );
+                       
+                       if ( FilePolicy.OVERWRITE.equals( filePolicy ) )
+                       {
+                           logger.debug( "No operation" );
+                               // No op
+                       }
+                       else
+                       {       // It is default to stop process
+                               return ;
+                       }
+                       
+               }
+               
+               final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+               
+               final ZipOutputStream zipOut = createZipOutputStream( byteOut );
+        
+               try
+               {
+                   addEntry( zipOut, handler, baseDir );
+               }
+               finally
+               {
+                   tryClose( zipOut );
+               }
+               
+        try {
+            handler.write( path, new ByteArrayInputStream( byteOut.toByteArray() ) );
+            context.getPrompter().notify( MessageFormat.format( "Widget( {0} ) is created successfully.", path ) );
+        }
+        catch ( IOException e )
+        {
+            throw new IllegalStateException( e );
+            // TODO Handle
+        }
+               
+       }
+       
+       /**
+        * Add file entry with <code>filePath</code> into <code>zipOut</code>
+        * 
+        * @param zipOut {@link ZipOutputStream} to add entry
+        * @param handler {@link FileHandler} to use to read contents
+        * @param filePath file paht
+        */
+       protected
+       void
+       addEntry(
+           final ZipOutputStream zipOut,
+           final FileHandler handler,
+           final String filePath
+       )
+       {
+           try
+           {
+               final Object type = handler.get( filePath, Attribute.TYPE );
+
+               logger.trace( "File path :{}", filePath );
+               
+               if (
+                   !FilenameUtil.equals( filePath, baseDir ) &&
+                   !filter.accept( baseDir, getRelativePath( baseDir, filePath ) )
+               )
+               {
+                   logger.debug( "Ignore {}", filePath );
+                   return ;
+               }
+               logger.trace( "file [{}]'s type :{}", filePath, type );
+               if ( Type.DIRECTORY.equals( type ) )
+               {
+                   Collection<String> children = handler.list( filePath );
+                final TreeSet<String> safe = new TreeSet<String>( new Comparator<String>()
+                {
+                    @Override
+                    public
+                    int
+                    compare(
+                        final String o1, 
+                        final String o2
+                    )
+                    {
+                        if ( o1.equals( o2 ) )
+                        {
+                            return 0;
+                        }
+                        if ( o1.equals( "META-INF" ) )
+                        {
+                            return -1;
+                        }
+                        else if ( o2.equals( "META-INF" ) )
+                        {
+                            return 1;
+                        }
+                        
+                        return o1.compareTo( o2 );
+                    }
+                } );
+                
+                safe.addAll( children );
+                children = safe;
+                logger.debug( "Files :{}", children );
+
+                   if ( !FilenameUtil.equals( baseDir, filePath ) )
+                   {
+                       final String relative = getRelativePath( baseDir, filePath );
+                       logger.trace( "Relative path :{}", relative );
+
+                       final ZipEntry entry = createEntry( relative + "/" );
+                       zipOut.putNextEntry( entry );
+                       zipOut.closeEntry();
+                   }
+
+                
+                   for ( final String child : children )
+                   {
+                       addEntry( zipOut, handler, child );
+                   }
+
+               }
+               else if ( Type.FILE.equals( type ) )
+               {
+                   final String relative = getRelativePath( baseDir, filePath );
+                   logger.trace( "Relative path :{}", relative );
+
+                   final ZipEntry entry = createEntry( relative );
+                   zipOut.putNextEntry( entry );
+                   IOUtil.redirect( handler.read( filePath ), zipOut );
+                   zipOut.closeEntry();
+                   logger.debug( "Zip {}", relative );
+               }
+           }
+           catch( IOException e )
+           {
+               throw new IllegalStateException( e );
+               // TODO Handle
+           }
+       }
+
+    /**
+     * Create {@link ZipOutputStream} to delegate <code>out</code>
+     * 
+     * @param out {@link OutputStream} to delegate 
+     * 
+     * @return {@link ZipOutputStream} to be created
+     * 
+     * @throws IOException if {@link ZipOutputStream} can't be created 
+     */
+    protected
+    ZipOutputStream
+    createZipOutputStream(
+        final OutputStream out
+    )
+    throws IOException
+    {
+        final ZipOutputStream zipOut = new ZipOutputStream( out );
+        zipOut.setMethod( ZipOutputStream.DEFLATED );
+        zipOut.setLevel( 9 );
+        
+        return zipOut;
+    }
+    
+    /**
+     * Create {@link ZipEntry} with <code>name</code>
+     * 
+     * @param name entry name
+     * 
+     * @return {@link ZipEntry}
+     */
+    protected
+    ZipEntry
+    createEntry(
+        final String name
+    )
+    {
+        return new ZipEntry( name );
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/daemon/AbstractServer.java b/org.tizen.common/src/org/tizen/common/daemon/AbstractServer.java
new file mode 100755 (executable)
index 0000000..4ac93dc
--- /dev/null
@@ -0,0 +1,335 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.daemon;\r
+\r
+import java.util.concurrent.locks.Lock;\r
+import java.util.concurrent.locks.ReentrantLock;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+\r
+/**\r
+ * <p>\r
+ * AbstractServer\r
+ * \r
+ * abstract common class for {@link Server}\r
+ * </p>\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ *\r
+ */\r
+abstract public class\r
+AbstractServer\r
+implements Server, Runnable\r
+{\r
+    /**\r
+     * logger for this object\r
+     */\r
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );\r
+    \r
+    /**\r
+     * {@link Thread} to use in this server\r
+     */\r
+    protected Thread thread = null;\r
+    \r
+    /**\r
+     * lock for #state\r
+     */\r
+    protected Lock lock = new ReentrantLock();\r
+    \r
+    /**\r
+     * server state\r
+     * @see ServerState\r
+     */\r
+    protected ServerState state = ServerState.Terminated;\r
+    \r
+    /**\r
+     * Server name to use thread name\r
+     */\r
+    protected final String name;\r
+    \r
+    /**\r
+     * default constructor\r
+     */\r
+    public AbstractServer()\r
+    {\r
+        this( null );\r
+    }\r
+    \r
+    /**\r
+     * constructor with name\r
+     * \r
+     * @param name server name\r
+     */\r
+    public\r
+    AbstractServer(\r
+        final String name\r
+    )\r
+    {\r
+        this.name = name;\r
+    }\r
+    \r
+    /**\r
+     * return server name\r
+     * @return server name\r
+     * \r
+     * @see #name\r
+     */\r
+    public\r
+    String\r
+    getName()\r
+    {\r
+        return name;\r
+    }\r
+    \r
+    /**\r
+     * return server status\r
+     * @return server status\r
+     * \r
+     * @see #state\r
+     * @see ServerState\r
+     */\r
+    public\r
+    ServerState\r
+    getStatus()\r
+    {\r
+        lock.lock();\r
+        try\r
+        {\r
+            return this.state;\r
+        }\r
+        finally\r
+        {\r
+            lock.unlock();\r
+        }\r
+    }\r
+    \r
+    /**\r
+     * Change server state\r
+     * \r
+     * @param state server state\r
+     * \r
+     * @see #state\r
+     * @see ServerState\r
+     */\r
+    protected\r
+    void\r
+    setStatus(\r
+        final ServerState state\r
+    )\r
+    {\r
+        lock.lock();\r
+        try\r
+        {\r
+            this.state = state;\r
+        }\r
+        finally\r
+        {\r
+            lock.unlock();\r
+            synchronized ( this )\r
+            {\r
+                notifyAll();\r
+            }\r
+        }\r
+    }\r
+    \r
+    /**\r
+     * check server state is one of <code>states</code>\r
+     * \r
+     * @param states state candidates to check\r
+     * \r
+     * @return boolean value if server state is one of <code>states</code>\r
+     */\r
+    public\r
+    boolean\r
+    isState(\r
+        final ServerState... states\r
+    )\r
+    {\r
+        lock.lock();\r
+        try\r
+        {\r
+            for ( final ServerState state : states )\r
+            {\r
+                if ( this.state.equals( state ) )\r
+                {\r
+                    return true;\r
+                }\r
+            }\r
+            return false;\r
+        }\r
+        finally\r
+        {\r
+            lock.unlock();\r
+        }\r
+    }\r
+    \r
+    /**\r
+     * wait until server state become one of <code>states</code>\r
+     *  \r
+     * @param states server states\r
+     */\r
+    public\r
+    void\r
+    waitState(\r
+        final ServerState... states\r
+    )\r
+    {\r
+        while ( !isState( states ) ) {\r
+            try\r
+            {\r
+                synchronized ( this )\r
+                {\r
+                    wait();\r
+                }\r
+            } catch ( final InterruptedException e )\r
+            {\r
+            }\r
+        }\r
+    }\r
+    \r
+    \r
+\r
+    /* (non-Javadoc)\r
+     * @see java.lang.Runnable#run()\r
+     */\r
+    @Override\r
+    public\r
+    void\r
+    run()\r
+    {\r
+        if ( isState( ServerState.Halting ) )\r
+        {\r
+            setStatus( ServerState.Terminated );\r
+            return ;\r
+        }\r
+        try\r
+        {\r
+            initialize();\r
+            \r
+            lock.lock();\r
+            try\r
+            {\r
+                if ( isState( ServerState.Halting ) )\r
+                {\r
+                    return ;\r
+                }\r
+                setStatus( ServerState.Running );\r
+            }\r
+            finally\r
+            {\r
+                lock.unlock();\r
+            }\r
+            while ( !isState( ServerState.Halting ) )\r
+            {\r
+                process();\r
+            }\r
+        }\r
+        catch ( Exception e )\r
+        {\r
+            logger.error( "Error occurred:", e );\r
+        }\r
+        finally\r
+        {\r
+            terminate();\r
+            setStatus( ServerState.Terminated );\r
+        }\r
+        \r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.daemon.Server#boot()\r
+     */\r
+    @Override\r
+    public void boot() throws Exception\r
+    {\r
+        lock.lock();\r
+        try\r
+        {\r
+            if ( !isState( ServerState.Terminated ) )\r
+            {\r
+                throw new IllegalStateException();\r
+            }\r
+            \r
+            final String name = getName();\r
+            if ( null == name )\r
+            {\r
+                thread = new Thread( this );\r
+            }\r
+            else \r
+            {\r
+                thread = new Thread( this, name );\r
+            }\r
+            thread.start();\r
+            setStatus( ServerState.Initializing );\r
+        }\r
+        finally\r
+        {\r
+            lock.unlock();\r
+        }\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.daemon.Server#down()\r
+     */\r
+    @Override\r
+    public\r
+    void\r
+    down()\r
+    throws Exception\r
+    {\r
+        lock.lock();\r
+        try\r
+        {\r
+            if ( isState( ServerState.Terminated, ServerState.Halting ) ) {\r
+                throw new IllegalStateException();\r
+            }\r
+            setStatus( ServerState.Halting );\r
+        }\r
+        finally\r
+        {\r
+            lock.unlock();\r
+        }\r
+        \r
+    }\r
+\r
+    /**\r
+     * Server initialization process\r
+     * \r
+     * @throws Exception If exception is occurred\r
+     */\r
+    abstract protected void initialize() throws Exception;\r
+    \r
+    /**\r
+     * Unit process of main job\r
+     * \r
+     * @throws Exception If exception is occurred\r
+     */\r
+    abstract protected void process() throws Exception;\r
+    \r
+    /**\r
+     * Server clean-up process\r
+     */\r
+    abstract protected void terminate();\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/daemon/Server.java b/org.tizen.common/src/org/tizen/common/daemon/Server.java
new file mode 100755 (executable)
index 0000000..7987ebf
--- /dev/null
@@ -0,0 +1,53 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.daemon;\r
+\r
+/**\r
+ * <p>\r
+ * Server\r
+ * \r
+ * Interface to daemon( thread )\r
+ *\r
+ * </p>\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ */\r
+public interface\r
+Server\r
+{\r
+    /**\r
+     * boot daemon up\r
+     * \r
+     * @throws Exception If process is failed\r
+     */\r
+    void boot() throws Exception;\r
+    \r
+    /**\r
+     * shut daemon down\r
+     * @throws Exception If process is failed\r
+     */\r
+    void down() throws Exception;\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/daemon/ServerState.java b/org.tizen.common/src/org/tizen/common/daemon/ServerState.java
new file mode 100755 (executable)
index 0000000..949f00d
--- /dev/null
@@ -0,0 +1,63 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.daemon;\r
+\r
+/**\r
+ * <p>\r
+ * ServerState\r
+ * \r
+ * State of {@link Server}\r
+ * <ul>\r
+ * <li>{@link #Terminated}</li>\r
+ * <li>{@link #Initializing}</li>\r
+ * <li>{@link #Running}</li>\r
+ * <li>{@link #Halting}</li>\r
+ * </p>\r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ *\r
+ */\r
+public enum ServerState\r
+{\r
+    /**\r
+     * Stopped state\r
+     */\r
+    Terminated,\r
+    \r
+    /**\r
+     * State to request boot\r
+     */\r
+    Initializing,\r
+    \r
+    /**\r
+     * State to run\r
+     */\r
+    Running,\r
+    \r
+    /**\r
+     * State to request down\r
+     */\r
+    Halting\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/file/AbstractFileHandler.java b/org.tizen.common/src/org/tizen/common/file/AbstractFileHandler.java
new file mode 100644 (file)
index 0000000..c25d7cf
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.file;
+
+import java.io.IOException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <p>
+ * AbstractFileHandler.
+ *
+ * Abstract class for {@link FileHandler}
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+abstract public class
+AbstractFileHandler
+implements FileHandler
+{
+       protected final Logger logger = LoggerFactory.getLogger( getClass() );
+       
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#is(java.lang.String, org.tizen.common.file.FileHandler.Attribute)
+        */
+       @Override
+       public boolean is(
+               final String path,
+               final Attribute name
+       )
+       throws IOException
+       {
+               final Object obj = get( path, name );
+               if ( obj instanceof Boolean )
+               {
+                       return (Boolean) obj;
+               }
+               return false;
+       }
+
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/file/ClasspathFileHandler.java b/org.tizen.common/src/org/tizen/common/file/ClasspathFileHandler.java
new file mode 100755 (executable)
index 0000000..4c116cc
--- /dev/null
@@ -0,0 +1,125 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.file;\r
+\r
+import java.io.IOException;\r
+import java.io.InputStream;\r
+import java.util.Collection;\r
+\r
+public class\r
+ClasspathFileHandler\r
+extends AbstractFileHandler\r
+{\r
+    protected String cwd;\r
+\r
+    @Override\r
+    public String getCurrentWorkingDirectory()\r
+    {\r
+        return cwd;\r
+    }\r
+\r
+    @Override\r
+    public void setCurrentWorkingDirectory(String cwd)\r
+    {\r
+        this.cwd = cwd;\r
+    }\r
+\r
+    @Override\r
+    public void makeDirectory(String path) throws IOException\r
+    {\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+    @Override\r
+    public void moveDirectory(String source, String target) throws IOException\r
+    {\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+    @Override\r
+    public void copyDirectory(String source, String target) throws IOException\r
+    {\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+    @Override\r
+    public void removeDirectory(String path) throws IOException\r
+    {\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+    @Override\r
+    public Collection<String> list(String path) throws IOException\r
+    {\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+    @Override\r
+    public void write(String path, InputStream out) throws IOException\r
+    {\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+    @Override\r
+    public InputStream read(String path) throws IOException\r
+    {\r
+        // TODO Auto-generated method stub\r
+        return null;\r
+    }\r
+\r
+    @Override\r
+    public void moveFile(String source, String target) throws IOException\r
+    {\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+    @Override\r
+    public void copyFile(String source, String target) throws IOException\r
+    {\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+    @Override\r
+    public void removeFile(String path) throws IOException\r
+    {\r
+        throw new UnsupportedOperationException();\r
+    }\r
+\r
+    @Override\r
+    public Object get(String path, Attribute name) throws IOException\r
+    {\r
+        // TODO Auto-generated method stub\r
+        return null;\r
+    }\r
+\r
+    @Override\r
+    public void set(String path, Attribute name, Object value)\r
+    throws IOException\r
+    {\r
+        // TODO Auto-generated method stub\r
+        \r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/file/EclipseFileHandler.java b/org.tizen.common/src/org/tizen/common/file/EclipseFileHandler.java
new file mode 100755 (executable)
index 0000000..49c876b
--- /dev/null
@@ -0,0 +1,456 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.file;
+
+import static org.tizen.common.util.CollectionUtil.concatenate;
+import static org.tizen.common.util.CollectionUtil.removeLast;
+import static org.tizen.common.util.FilenameUtil.getCanonicalForm;
+import static org.tizen.common.util.FilenameUtil.getRelativePath;
+import static org.tizen.common.util.FilenameUtil.isAncestor;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.Queue;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.tizen.common.util.FilenameUtil;
+import org.tizen.common.util.ObjectUtil;
+
+/**
+ * <p>
+ * EclipseFileHandler.
+ * 
+ * {@link FileHandler} for eclipse plugin
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+EclipseFileHandler
+extends StandardFileHandler
+{
+
+       /**
+        * @return
+        */
+       protected
+       IWorkspaceRoot
+       getWorkspace()
+       {
+               return ResourcesPlugin.getWorkspace().getRoot();
+       }
+       
+       protected IResource getResource( final String path ) throws IOException
+       {
+               final String root = getWorkspace().getLocation().toPortableString();
+               logger.trace( "Path :{}, Root :{}", path, root );
+               
+               final File fileChecker = new File( path );
+               String relativePath = path;
+               if ( isAncestor( root, path ) )
+               {
+                       relativePath = getRelativePath( root, path );
+               }
+               else if ( fileChecker.isAbsolute() )
+               {
+                       return null;
+               }
+
+               final Queue<String> fragments =
+                       new LinkedList<String>( Arrays.asList( FilenameUtil.getCanonicalFragments( relativePath ) ) );
+               
+               final String projectName =  fragments.remove();
+               if ( ".metadata".equals( projectName ) )
+               {
+                       return null;
+               }
+               final IProject project = getWorkspace().getProject( projectName );
+               if ( fragments.isEmpty() )
+               {
+                       return project;
+               }
+               
+               final String fileName = removeLast( fragments );
+               
+               IContainer parent = project;
+               if ( !fragments.isEmpty() )
+               {
+                       parent = project.getFolder( concatenate( fragments, "/" ) );
+               }
+               
+               try {
+                       final IResource[] children = parent.members();
+                       for ( final IResource chlid : children )
+                       {
+                               if ( ObjectUtil.equals( fileName, chlid.getName() ) )
+                               {
+                                       return chlid;
+                               }
+                       }
+                       fragments.add( fileName );
+                       final String relativeFile = concatenate( fragments, "/" );
+                       return project.getFile( relativeFile );
+               } catch (
+                       CoreException e
+               )
+               {
+                       logger.warn( "Exception :{}", e );
+               }
+               return null;
+       }
+       
+       protected IContainer getFolder( final String path )
+       {
+               final String root = getWorkspace().getLocation().toPortableString();
+               logger.trace( "Path :{}, Root :{}", path, root );
+               final File fileChecker = new File( path );
+               String relativePath = path;
+               if ( isAncestor( root, path ) )
+               {
+                       relativePath = getRelativePath( root, path );
+               }
+               else if ( fileChecker.isAbsolute() )
+               {
+                       return null;
+               }
+
+               final Queue<String> fragments =
+                       new LinkedList<String>( Arrays.asList( FilenameUtil.getCanonicalFragments( relativePath ) ) );
+
+               final String projectName = fragments.remove();
+               if ( ".metadata".equals( projectName ) )
+               {
+                       return null;
+               }
+               final IProject project = getWorkspace().getProject( projectName );
+               if ( fragments.isEmpty() )
+               {
+                       return project;
+               }
+               
+               final String fileName = removeLast( fragments );
+               
+               IContainer parent = project;
+               if ( !fragments.isEmpty() )
+               {
+                       parent = project.getFolder( concatenate( fragments, "/" ) );
+               }
+               
+               try {
+                       final IResource[] children = parent.members();
+                       for ( final IResource chlid : children )
+                       {
+                               if ( ObjectUtil.equals( fileName, chlid.getName() ) )
+                               {
+                                       return (IContainer) chlid;
+                               }
+                       }
+                       fragments.add( fileName );
+                       final String relativeFile = concatenate( fragments, "/" );
+                       return project.getFolder( relativeFile );
+               } catch (
+                       CoreException e
+               )
+               {
+                       logger.warn( "Exception :{}", e );
+               }
+               return null;
+
+       }
+       
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#getCurrentWorkingDirectory()
+        */
+       @Override
+       public
+       String
+       getCurrentWorkingDirectory()
+       {
+               return getWorkspace().getLocation().toPortableString();
+       }
+       
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#setCurrentWorkingDirectory(java.lang.String)
+        */
+       @Override
+       public
+       void
+       setCurrentWorkingDirectory(
+               final String cwd
+       )
+       {
+               throw new UnsupportedOperationException();
+
+       }
+
+       @Override
+       public
+       void
+       makeDirectory(
+               final String path
+       )
+       throws IOException
+       {
+               final File file = new File( path );
+               if ( file.isAbsolute() )
+               {
+                       super.makeDirectory( path );
+                       final Path p = new Path( path );
+                       try {
+                               getWorkspace().getFileForLocation( p ).refreshLocal( -1, new NullProgressMonitor() );
+                       } catch ( final CoreException e )
+                       {
+                               throw new IOException( e );
+                       }
+               }
+               
+       }
+
+       @Override
+       public
+       void
+       moveDirectory(
+               final String source,
+               final String target
+       )
+       throws IOException
+       {
+               throw new UnsupportedOperationException();
+       }
+
+       @Override
+       public void copyDirectory(String source, String target) throws IOException {
+               throw new UnsupportedOperationException();
+       }
+
+       @Override
+       public void removeDirectory(String path) throws IOException {
+               throw new UnsupportedOperationException();
+       }
+
+       @Override
+       public
+       Collection<String>
+       list(
+               final String path
+       )
+       throws IOException
+       {
+
+               final IContainer folder = getFolder( path );
+               if ( null == folder )
+               {
+                       return super.list( path );
+               }
+               try {
+                       final IResource[] children = folder.members();
+                       final ArrayList<String> ret = new ArrayList<String>();
+                       
+                       for ( final IResource child : children )
+                       {
+                               
+                               String childPath = getCanonicalForm( child.getLocation().toPortableString() );
+                               
+                               if ( child instanceof IContainer )
+                               {
+                                       childPath = childPath + "/";
+                               }
+                               
+                               if ( childPath.startsWith( "/" ) )
+                               {
+                                       ret.add( childPath.substring( 1 ) );
+                               }
+                               else
+                               {
+                                       ret.add( childPath );
+                               }
+                       }
+                       
+                       logger.trace( "Children :{}", ret );
+                       return ret;
+               }
+               catch (
+                               final CoreException e
+                               )
+               {
+                       throw new IOException( e );
+               }
+       }
+
+       @Override
+       public void write(String path, InputStream out) throws IOException {
+               logger.trace( "Path :{}", path );
+               final IResource file = getResource( path );
+               
+               // Bugfix : In case of location without workspace, NPE occur.
+               if ( file == null ) {
+                   super.write( path, out );
+                   return;
+               }
+               
+               final IFile f = (IFile) file.getAdapter( IFile.class );
+               
+               try {
+                       if ( f.exists() )
+                       {
+                               f.setContents( out, false, false, new NullProgressMonitor() );
+                       }
+                       else
+                       {
+                               f.create( out, false, new NullProgressMonitor() );
+                       }
+               }
+               catch ( final CoreException e )
+               {
+                       throw new IOException( e );
+               }
+       }
+
+       @Override
+       public InputStream read(
+               final String path
+       )
+       throws IOException
+       {
+               final Path p = new Path( path );
+               final IFile eFile = getWorkspace().getFileForLocation( p );
+               if ( null == eFile )
+               {
+                       return super.read( path );
+               }
+               try
+               {
+                       return eFile.getContents();
+               }
+               catch ( final CoreException e )
+               {
+                       throw new IOException( e );
+               }
+       }
+
+       @Override
+       public void moveFile(String source, String target) throws IOException {
+               throw new UnsupportedOperationException();
+       }
+
+       @Override
+       public void copyFile(String source, String target) throws IOException {
+               throw new UnsupportedOperationException();
+       }
+
+       @Override
+       public void removeFile(String path) throws IOException {
+               throw new UnsupportedOperationException();
+       }
+
+       @Override
+       public Object get(String path, Attribute name) throws IOException {
+               logger.trace( "Path :{}, Attribute :{}", path, name );
+               
+               final IResource file = getResource( path );
+               if ( null == file )
+               {
+                       return super.get( path, name );
+               }
+
+               if ( Attribute.TYPE.equals( name ) )
+               {
+                       if ( file instanceof IContainer )
+                       {
+                               return Type.DIRECTORY;
+                       }
+                       else if ( file instanceof IFile )
+                       {
+                               return Type.FILE;
+                       }
+               }
+               else if ( Attribute.EXISTS.equals( name ) )
+               {
+                       return file.exists();
+
+               }
+               else if ( Attribute.PATH.equals( name ) )
+               {
+                       return file.getLocation().toPortableString();
+               }
+               else if ( Attribute.URI.equals( name ) || Attribute.URL.equals( name ) )
+               {
+                       return file.getLocationURI().toURL().toString();
+               }
+               else if ( Attribute.MODIFIED.equals( name ) )
+               {
+                       return file.getLocalTimeStamp();
+               }
+               else if ( Attribute.HIDDEN.equals( name ) )
+               {
+                       return file.isHidden();
+               }
+               else if ( Attribute.READABLE.equals( name ) )
+               {
+                       return file.isAccessible();
+               }
+               else if ( Attribute.WRITABLE.equals( name ) )
+               {
+                       return file.isAccessible();
+               }
+               throw new IOException( path + "'s Unknown attribute :" + name );
+       }
+
+       @Override
+       public void set(String path, Attribute name, Object value)
+       throws IOException {
+               if ( Attribute.QUALIFIED.equals( name ) )
+               {
+//                     signatureFile.setPersistentProperty(SignatureUtility.stateQualifiedName, "false"); //$NON-NLS-1$
+                       return ;
+               }
+
+               throw new UnsupportedOperationException();
+       }
+       
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString()
+    {
+        return getClass().getSimpleName() + "@" + Integer.toHexString( hashCode() ).substring( 0, 4 );
+    }
+       
+}
diff --git a/org.tizen.common/src/org/tizen/common/file/FileHandler.java b/org.tizen.common/src/org/tizen/common/file/FileHandler.java
new file mode 100755 (executable)
index 0000000..8b3594f
--- /dev/null
@@ -0,0 +1,237 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.file;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collection;
+
+/**
+ * <p>
+ * FileHandler.
+ * 
+ * Class to handle file system as abstract api
+ *
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public interface
+FileHandler
+{
+       /**
+        * <p>
+        * Attribute.
+        * 
+        * File attribute
+        * </p>
+        * 
+        * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+        */
+       enum Attribute
+       {
+               CWD,            // Current Working Directory
+               PATH,           // Abstract canonical path
+               NAME,           // file name
+               TYPE,           // Type( FILE / DIRECTORY / UNKNOWN )
+               EXISTS,         // true / false
+               READABLE,       // true / false
+               WRITABLE,       // true / false
+               HIDDEN,         // true / false
+               READONLY,       // true / false
+               MODIFIED,       // long
+               SIZE,       // long
+               URI,                    // String
+               URL,                    // String
+               QUALIFIED,
+               CUSTOM
+       }
+
+       /**
+        * <p>
+        * Type.
+        * 
+        * Value of {@link Attribute#TYPE}
+        * </p>
+        * 
+        * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+        */
+       enum Type
+       {
+               FILE,
+               DIRECTORY,
+               UNKNOWN
+       }
+
+       /**
+        * Return cwd, abbreviating current working directory
+        * 
+        * @return current working directory
+        */
+       String getCurrentWorkingDirectory();
+
+       /**
+        * Change current working directory to <code>cwd</code>
+        * 
+        * @param cwd new current working directory
+        */
+       void setCurrentWorkingDirectory( final String cwd );
+
+       /* Directory */
+       /**
+        * Make new directory with <code>path</code>
+        * 
+        * @param path path to directory
+        * 
+        * @throws IOException If exception occured in making a directory
+        */
+       void makeDirectory( String path ) throws IOException;
+
+       /**
+        * Move <code>source</code> directory to <code>target</code>
+        * 
+        * @param source directory path to move
+        * @param target path to move to
+        * 
+        * @throws IOException If exception occured in moving a directory
+        */
+       void moveDirectory( String source, String target ) throws IOException;
+
+       /**
+        * Copy <code>source</code> directory to <code>target</code>
+        * 
+        * @param source directory path to copy
+        * @param target path to copy to
+        * 
+        * @throws IOException If exception occured in copying a directory
+        */
+       void copyDirectory( String source, String target ) throws IOException;
+
+       /**
+        * Delete <code>path</code> directory
+        * 
+        * @param path directory path to delete
+        *  
+        * @throws IOException If exception occured in deleting a directory
+        */
+       void removeDirectory( String path ) throws IOException;
+
+       /**
+        * List child directory and file in <code>path</code>
+        * 
+        * @param path directory path
+        * @return child directory and file's path
+        * 
+        * @throws IOException If exception occured in list child in directory
+        */
+       Collection<String> list( String path ) throws IOException;
+
+       /* File */
+       /**
+        * Save file in <code>path</code> using <code>out</code>
+        * 
+        * @param path file path to write
+        * @param out {@link InputStream} to provide contents
+        * 
+        * @throws IOException If exception occured in saving
+        */
+       void write( String path, InputStream out ) throws IOException;
+
+       /**
+        * Return {@link InputStream} to provice file contents
+        * 
+        * @param path file path to read
+        * @return
+        * @throws IOException
+        */
+       InputStream read( String path ) throws IOException;
+
+       /**
+        * Move <code>source</code> file to <code>target</code>
+        * 
+        * @param source file path to move
+        * @param target path to move to
+        * 
+        * @throws IOException If exception occured in moving a file
+        */
+       void moveFile( String source, String target ) throws IOException;
+
+       /**
+        * Copy <code>source</code> file to <code>target</code>
+        * 
+        * @param source file path to copy
+        * @param target path to copy to
+        * 
+        * @throws IOException If exception occured in copying a file
+        */
+       void copyFile( String source, String target ) throws IOException;
+
+       /**
+        * Delete file in <code>path</code>
+        * 
+        * @param path file path
+        * 
+        * @throws IOException If exception occured in deletion
+        */
+       void removeFile( String path ) throws IOException;
+
+       /**
+        * Return <code>path</code>'s attribute value having <code>name</code> as attribute name
+        * 
+        * @param path file path
+        * @param name attribute name
+        * 
+        * @return attribute value
+        * 
+        * @throws IOException If exception occured in reading attribute
+        */
+       Object get( final String path, Attribute name ) throws IOException;
+
+       /**
+        * Check if <code>path</code> file's attribute <code>name</code> is <code>true</code>
+        * 
+        * @param path file path to check
+        * @param name attribute name
+        * 
+        * @return boolean value if thread is <code>name</code> attribute
+        * 
+        * @throws IOException If exception occured in reading attribute
+        */
+       boolean is( final String path, Attribute name ) throws IOException;
+
+       /**
+        * Set <code>path</code> file's attribute <code>name</code> as <code>value</code>
+        * 
+        * @param path file path
+        * @param name attribute anme
+        * @param value attribute value
+        * 
+        * @throws IOException If exception occured in change file attribute
+        * 
+        * @see {@link Attribute}
+        */
+       void set( final String path, Attribute name, Object value ) throws IOException;
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/file/Filter.java b/org.tizen.common/src/org/tizen/common/file/Filter.java
new file mode 100644 (file)
index 0000000..17af932
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.file;
+
+/**
+ * <p>
+ * Filter.
+ * 
+ * Object to check if path is valid
+ *
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public interface Filter
+{
+       /**
+        * Check and return if <code>path</code> is valid when current working directory is <code>cwd</code>
+        * 
+        * @param cwd current working directory
+        * @param path file path
+        * 
+        * @return boolean value of validation
+        */
+       boolean accept( final String cwd, final String path );
+}
diff --git a/org.tizen.common/src/org/tizen/common/file/PatternFilter.java b/org.tizen.common/src/org/tizen/common/file/PatternFilter.java
new file mode 100755 (executable)
index 0000000..4995915
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.file;
+
+import org.tizen.common.util.Assert;
+
+/**
+ * <p>
+ * PatternFilter.
+ * 
+ * {@link Filter} using pattern
+ *
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+PatternFilter
+{
+       /**
+        * Pattern string
+        */
+       protected String pattern = "*";
+
+       /**
+        * Return pattern
+        * 
+        * @return pattern
+        * 
+        * {@link #pattern}
+        */
+       public
+       String
+       getPattern()
+       {
+               return this.pattern;
+       }
+
+       /**
+        * Set pattern
+        * 
+        * @param pattern pattern to set
+        */
+       public
+       void
+       setPattern(
+               final String pattern
+       )
+       {
+           Assert.notNull( pattern );
+               this.pattern = pattern;
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/file/SimpleFileFilter.java b/org.tizen.common/src/org/tizen/common/file/SimpleFileFilter.java
new file mode 100755 (executable)
index 0000000..4a62960
--- /dev/null
@@ -0,0 +1,218 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.file;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.util.CollectionUtil;
+
+/**
+ * <p>
+ * SimpleFileFilter.
+ * 
+ * File filter using including filter and excluding filter
+ *
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+SimpleFileFilter
+implements Filter
+{
+       /**
+        * Logger for this instance
+        */
+       protected final Logger logger = LoggerFactory.getLogger( getClass() );
+
+       /**
+        * Including filters
+        */
+       protected List<Filter> includes = new ArrayList<Filter>();
+
+       /**
+        * Excluding filters
+        */
+       protected List<Filter> excludes = new ArrayList<Filter>();
+       
+       protected boolean bDefault = false;
+       
+       public SimpleFileFilter() 
+       {
+           this( false );
+       }
+       
+       public SimpleFileFilter( final boolean bDefault )
+       {
+           this.bDefault = bDefault;
+       }
+       
+       public void setDefault( final boolean bDefault )
+       {
+           this.bDefault = bDefault;
+       }
+
+       // Hiding collection
+       /**
+        * Clear including filters
+        */
+       public
+       void
+       clearIncludes()
+       {
+               includes.clear();
+       }
+
+       /**
+        * Set <code>filters</code> including filters
+        * 
+        * @param filters {@link Filter}s to set
+        */
+       public
+       void
+       setIncludes(
+               final Filter... filters
+       )
+       {
+               clearIncludes();
+               addIncludes( filters );
+       }
+
+       /**
+        * Add <code>filters</code> to including filters
+        * 
+        * @param filters {@link Filter}s to add
+        */
+       public
+       void
+       addIncludes(
+               final Filter... filters
+       )
+       {
+               for( final Filter filter : filters )
+               {
+                       includes.add( filter );
+               }
+               logger.debug( "Include filters[{}] added", CollectionUtil.toString( filters ) );
+       }
+
+       /**
+        * Clear excluding filters
+        */
+       public
+       void
+       clearExcludes()
+       {
+               excludes.clear();
+       }
+
+       /**
+        * Set {@link Filter}s as excluding filters
+        * @param filters
+        */
+       public
+       void
+       setExcludes(
+               final Filter... filters
+       )
+       {
+               clearExcludes();
+               addExcludes( filters );
+       }
+
+       /**
+        * Add <code>filters</code> to excluding filters
+        * 
+        * @param filters {@link Filter}s to add
+        */
+       public
+       void
+       addExcludes(
+               final Filter... filters
+       )
+       {
+               for( final Filter filter : filters )
+               {
+                       excludes.add( filter );
+               }
+               logger.debug( "Excludes filters[{}] added", CollectionUtil.toString( filters ) );
+       }
+
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.Filter#accept(java.lang.String, java.lang.String)
+        */
+       @Override
+       public
+       boolean
+       accept(
+               final String cwd,
+               final String path
+       )
+       {
+               logger.trace( "Current working directory :{}, Path :{}", cwd, path );
+               if ( excludes.isEmpty() && includes.isEmpty() )
+               {
+                   return bDefault;
+               }
+        logger.trace( "Including filters :{}", includes );
+        for ( final Filter filter : includes )
+        {
+            if ( filter.accept( cwd, path ) )
+            {
+                logger.debug( "Accept because of {}", filter );
+                return true;
+            }
+        }
+               if ( excludes.isEmpty() )
+               {
+               return false;
+               }
+        logger.trace( "Excluding filters :{}", excludes );
+        for ( final Filter filter : excludes )
+        {
+            if ( filter.accept( cwd, path ) )
+            {
+                logger.debug( "Deny because of {}", filter );
+                return false;
+            }
+        }
+               if ( includes.isEmpty() )
+               {
+               return true;
+               }
+               return bDefault;
+       }
+       
+       @Override
+       public String toString()
+       {
+           return getClass().getSimpleName() + "[" + includes.size() + "/" + excludes.size() + "]";
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/file/StandardFileHandler.java b/org.tizen.common/src/org/tizen/common/file/StandardFileHandler.java
new file mode 100755 (executable)
index 0000000..21cea80
--- /dev/null
@@ -0,0 +1,437 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.file;
+
+import static org.tizen.common.util.FilenameUtil.getCanonicalForm;
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.tizen.common.util.IOUtil;
+
+/**
+ * <p>
+ * StandardFileHandler.
+ * 
+ * {@link FileHandler} to use java.io package api like {@link File}, {@link FileInputStream} and {@link FileOutputStream}
+ *
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+StandardFileHandler
+extends AbstractFileHandler
+{
+    protected String cwd;
+    
+    public
+    StandardFileHandler()
+    {
+        try
+        {
+            cwd = new File( "." ).getCanonicalPath();
+        } catch (IOException e)
+        {
+            throw new IllegalStateException( e );
+        }
+    }
+    
+    protected
+    File
+    getFile(
+        final String path
+    )
+    {
+        File dummy = new File( path );
+        if ( dummy.isAbsolute() )
+        {
+            logger.debug( "{} is absolute path", path );
+            return dummy;
+        }
+        final File ret = new File( cwd, path );
+        logger.debug( "File {} for {}", ret, path );
+        
+        return ret;
+    }
+    
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#getCurrentWorkingDirectory()
+        */
+       @Override
+       public
+       String
+       getCurrentWorkingDirectory()
+       {
+           return this.cwd;
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#setCurrentWorkingDirectory(java.lang.String)
+        */
+       @Override
+       public
+       void
+       setCurrentWorkingDirectory(String cwd) {
+               this.cwd = cwd;
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#makeDirectory(java.lang.String)
+        */
+       @Override
+       public
+       void
+       makeDirectory(
+               final String path
+       )
+       throws IOException
+       {
+               getFile( path ).mkdirs();
+
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#moveDirectory(java.lang.String, java.lang.String)
+        */
+       @Override
+       public
+       void
+       moveDirectory(
+               final String source,
+               final String target
+       )
+       throws IOException
+       {
+               final File file = getFile( source );
+               if ( !file.isDirectory() )
+               {
+                       throw new IOException();
+               }
+               file.renameTo( getFile( target ) );
+
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#copyDirectory(java.lang.String, java.lang.String)
+        */
+       @Override
+       public
+       void
+       copyDirectory(
+               final String source,
+               final String target
+       )
+       throws IOException
+       {
+               throw new UnsupportedOperationException();
+//             final Stack<File> sourceStack = new Stack<File>();
+//             final Stack<File> targetStack = new Stack<File>();
+//             sourceStack.push( new File(source ) );
+//             targetStack.push( new File( target ) );
+//
+//             while ( !sourceStack.isEmpty() )
+//             {
+//                     final File sourceFile = sourceStack.pop();
+//                     final File targetFile = targetStack.pop();
+//
+//                     if ( sourceFile.isDirectory() )
+//                     {
+//                             targetFile.mkdir();
+//                             for ( final File sourceChild : sourceFile.listFiles() )
+//                             {
+//                                     sourceStack.push( sourceChild );
+//                                     targetStack.push( new File( targetFile, sourceChild.getName() ) );
+//                             }
+//                     }
+//                     else if ( sourceFile.isFile())
+//                     {
+//                             final FileInputStream fileIn = new FileInputStream( sourceFile );
+//                             final FileOutputStream fileOut = new FileOutputStream( targetFile );
+//
+//                             IOUtil.redirect( fileIn, fileOut );
+//                             tryClose( fileOut, fileIn );
+//                     }
+//                     else {
+//                             Logger.error(sourceFile + " is not file or directory");
+//                     }
+//             }
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#removeDirectory(java.lang.String)
+        */
+       @Override
+       public
+       void
+       removeDirectory(
+               final String path
+       )
+       throws IOException
+       {
+               if ( !Type.DIRECTORY.equals( get( path, Attribute.TYPE ) ) )
+               {
+                       throw new IOException();
+               }
+
+               for ( final String childPath : list( path ) )
+               {
+                       Object type = get( childPath, Attribute.TYPE );
+                       if ( Type.DIRECTORY.equals( type ) )
+                       {
+                               removeDirectory( childPath );
+                       }
+                       else if ( Type.FILE.equals( type ) )
+                       {
+                               removeFile( childPath );
+                       }
+               }
+
+               getFile( path ).delete();
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#list(java.lang.String)
+        */
+       @Override
+       public
+       Collection<String>
+       list(
+               final String path
+       )
+       throws IOException
+       {
+               final File file = getFile( path );
+               final File[] children = file.listFiles();
+               final ArrayList<String> ret = new ArrayList<String>();
+               for ( final File child : children )
+               {
+                       ret.add( getCanonicalForm( child.getAbsolutePath() ) );
+               }
+
+               return ret;
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#write(java.lang.String, java.io.InputStream)
+        */
+       @Override
+       public
+       void
+       write(
+               final String path,
+               final InputStream in
+       )
+       throws IOException
+       {
+           File file = getFile( path );
+        File parentFile = file.getParentFile();
+        if ( !parentFile.exists() ) {
+            parentFile.mkdirs();
+        }
+           
+           logger.trace( "Path :{}", path );
+               final FileOutputStream fileOut = new FileOutputStream( file );
+               
+               try
+               {
+                       IOUtil.redirect( in, fileOut );
+               }
+               finally
+               {
+                       tryClose( fileOut );
+               }
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#read(java.lang.String)
+        */
+       @Override
+       public
+       InputStream
+       read(
+               final String path
+       )
+       throws IOException
+       {
+               return new FileInputStream( getFile( path ) );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#moveFile(java.lang.String, java.lang.String)
+        */
+       @Override
+       public
+       void
+       moveFile(
+               final String source,
+               final String target
+       )
+       throws IOException
+       {
+               final File file = getFile( source );
+               if ( !file.isFile() ) 
+               {
+                       throw new IOException();
+               }
+               file.renameTo( getFile( target ) );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#copyFile(java.lang.String, java.lang.String)
+        */
+       @Override
+       public
+       void
+       copyFile(
+               final String source,
+               final String target
+       )
+       throws IOException
+       {
+               final File file = getFile( source );
+               if ( !file.isFile() ) 
+               {
+                       throw new IOException();
+               }
+               
+               final FileInputStream sourceIn = new FileInputStream( getFile( source ) );
+               final FileOutputStream targetOut = new FileOutputStream( getFile( target ) );
+               try
+               {
+                       IOUtil.redirect( sourceIn, targetOut );
+               }
+               finally
+               {
+                       tryClose( targetOut, sourceIn );
+               }
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#removeFile(java.lang.String)
+        */
+       @Override
+       public
+       void
+       removeFile(
+               final String path
+       )
+       throws IOException
+       {
+               final File file = getFile( path );
+               if ( !file.isFile() ) 
+               {
+                       throw new IOException();
+               }
+
+               file.delete();
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#get(java.lang.String, org.tizen.common.file.FileHandler.Attribute)
+        */
+       @Override
+       public
+       Object
+       get(
+               final String path,
+               final Attribute name
+       )
+       throws IOException
+       {
+               logger.trace( "Path :{}, Attribute :{}", path, name );
+               
+               final File file = getFile( path );
+
+               if ( Attribute.TYPE.equals( name ) )
+               {
+                       if ( file.isDirectory() )
+                       {
+                               return Type.DIRECTORY;
+                       }
+                       else if ( file.isFile() )
+                       {
+                               return Type.FILE;
+                       }
+               }
+               else if ( Attribute.EXISTS.equals( name ) )
+               {
+                       return file.exists();
+
+               }
+               else if ( Attribute.PATH.equals( name ) )
+               {
+                       return file.getCanonicalFile().getCanonicalPath();
+               }
+               else if ( Attribute.URI.equals( name ) || Attribute.URL.equals( name ) )
+               {
+                       return file.toURI().toURL().toString();
+               }
+               else if ( Attribute.MODIFIED.equals( name ) )
+               {
+                       return file.lastModified();
+               }
+               else if ( Attribute.HIDDEN.equals( name ) )
+               {
+                       return file.isHidden();
+               }
+               else if ( Attribute.READABLE.equals( name ) )
+               {
+                       return file.canRead();
+               }
+               else if ( Attribute.WRITABLE.equals( name ) )
+               {
+                       return file.canWrite();
+               }
+               else if ( Attribute.NAME.equals( name ) )
+               {
+                   return file.getName();
+               }
+               throw new IOException( path + "'s Unknown attribute :" + name );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#set(java.lang.String, org.tizen.common.file.FileHandler.Attribute, java.lang.Object)
+        */
+       @Override
+       public void
+       set(
+               final String path,
+               final Attribute name,
+               final Object value
+       )
+       throws IOException
+       {
+       }
+
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/file/VirtualFileHandler.java b/org.tizen.common/src/org/tizen/common/file/VirtualFileHandler.java
new file mode 100755 (executable)
index 0000000..aed4ea7
--- /dev/null
@@ -0,0 +1,812 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.file;
+
+import static org.tizen.common.util.ArrayUtil.size;
+import static org.tizen.common.util.FilenameUtil.addTailingPath;
+import static org.tizen.common.util.FilenameUtil.getCanonicalForm;
+import static org.tizen.common.util.FilenameUtil.getCanonicalFragments;
+import static org.tizen.common.util.FilenameUtil.getFilename;
+import static org.tizen.common.util.FilenameUtil.removeTailingPath;
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.util.IOUtil;
+import org.tizen.common.util.StringUtil;
+
+/**
+ * <p>
+ * VirtualFileHandler.
+ * 
+ * {@link FileHandler} to handling in memory
+ *
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+VirtualFileHandler
+extends AbstractFileHandler
+{
+
+       /**
+        * <p>
+        * File.
+        * 
+        * File contents container
+        *
+        * </p>
+        * 
+        * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+        */
+       private class
+       File
+       implements Cloneable
+       {
+               /**
+                * File name
+                */
+               String name;
+               
+               /**
+                * File contents
+                */
+               byte[] contents;
+               
+               /**
+                * File attributes
+                */
+               HashMap<Attribute, Object> attr = new HashMap<Attribute, Object>();
+
+               /**
+                * Default constructor
+                */
+               public File()
+               {
+               }
+
+               /**
+                * Constructor with name and contents
+                * 
+                * @param name file name
+                * @param contents file contents
+                */
+               public
+               File(
+                       final String name,
+                       final byte[] contents
+               )
+               {
+                       this.name = name;
+                       this.contents = contents;
+               }
+
+               /**
+                * Return file name
+                * 
+                * @return file name
+                */
+               public
+               String
+               getName()
+               {
+                       return this.name;
+               }
+
+               /**
+                * Return file contents
+                * 
+                * @return file contents
+                */
+               public
+               byte[] getContents()
+               {
+                       return this.contents;
+               }
+
+               /**
+                * Set <code>contents</code> as file contents
+                * 
+                * @param contents new file contents
+                */
+               public
+               void
+               setContents(
+                       final byte[] contents
+               )
+               {
+                       this.contents = contents;
+               }
+
+               /**
+                * Set file attribute value whose name is <code>name</code> as <code>value</code>
+                * 
+                * @param name attribute name
+                * @param value attribute value
+                */
+               public
+               void
+               setAttribute(
+                       final Attribute name,
+                       final Object value
+               )
+               {
+                       attr.put( name, value );
+               }
+               /**
+                * Return file attribute value whose name is <code>name</code>
+                * 
+                * @param name attribute name
+                * 
+                * @return attribute value
+                */
+               public
+               Object
+               getAttribute(
+                       final Attribute name
+               )
+               {
+                       return attr.get( name );
+               }
+
+               /* (non-Javadoc)
+                * @see java.lang.Object#clone()
+                */
+               @Override
+               public
+               Object
+               clone()
+               {
+                       final File file = new File();
+                       file.name = this.name;
+                       file.contents = this.contents;
+                       return file;
+               }
+
+       }
+
+       /**
+        * <p>
+        * Directory.
+        * 
+        * Directory in memory
+        *
+        * </p>
+        * 
+        * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+        */
+       class Directory
+       extends File
+       implements Cloneable
+       {
+               /**
+                * Child files & directories
+                */
+               protected final HashMap<String, File> name2file = new HashMap<String, File>();
+
+               /**
+                * Default constructor
+                */
+               public Directory()
+               {
+               }
+
+               /**
+                * Constructor with directory name
+                * 
+                * @param name directory name
+                */
+               public
+               Directory(
+                       final String name
+               )
+               {
+                       super( name, null );
+               }
+
+               /**
+                * Return child file whose name is <code>name</code>
+                * 
+                * @param name file name
+                * 
+                * @return {@link File}
+                */
+               public
+               File
+               get(
+                       final String name
+               )
+               {
+                       return name2file.get( name );
+               }
+
+               /**
+                * Delete child file whose name is <code>name</code>
+                * 
+                * @param name file name
+                * 
+                * @return file to be deleted
+                */
+               public
+               File
+               remove(
+                       final String name
+               )
+               {
+                       return name2file.remove( name );
+               }
+
+               /**
+                * Add new file whose name is <code>contents<code> and whose contents is <code>contents</code>
+                * 
+                * @param name file name
+                * @param contents file contents
+                */
+               public
+               void
+               add(
+                       final String name,
+                       final byte[] contents
+               )
+               {
+                       name2file.put( name, new File( name, contents ) );
+               }
+
+               /**
+                * Add directory whose name is <code>name</code>
+                * 
+                * @param name directory name
+                */
+               public
+               void
+               add(
+                       final String name
+               )
+               {
+                       name2file.put( name, new Directory( name ) );
+               }
+
+               /**
+                * Add <code>file</code>
+                * 
+                * @param file file or directory to add
+                */
+               public
+               void
+               add(
+                       final File file
+               )
+               {
+                       name2file.put( file.getName(), file );
+               }
+
+               /* (non-Javadoc)
+                * @see org.tizen.common.file.VirtualFileHandler.File#clone()
+                */
+               @Override
+               public
+               Object
+               clone()
+               {
+                       final Directory dir = new Directory();
+                       dir.contents = this.contents;
+                       dir.name = this.name;
+                       for ( final String name : name2file.keySet() )
+                       {
+                               name2file.put( name, (File) name2file.get( name ).clone() );
+                       }
+
+                       return dir;
+               }
+
+               /* (non-Javadoc)
+                * @see java.lang.Object#toString()
+                */
+               @Override
+               public
+               String
+               toString()
+               {
+                       return name2file.keySet().toString();
+               }
+       }
+
+       /**
+        * Prefix abstract path
+        */
+       protected static final String ROOT_PREFIX = "/";
+
+       /**
+        * Logger for this instance
+        */
+       protected final Logger logger = LoggerFactory.getLogger( getClass() );
+
+       /**
+        * Root directory
+        */
+       protected final Directory root = new Directory();
+
+       /**
+        * Current working directory
+        */
+       protected String cwd = "/";
+
+       /**
+        * Return {@link File} matching with <code>path</code>
+        * 
+        * @param path file path
+        * @return {@link File} matching with <code>path</code>
+        * 
+        * @throws IOException If file is not accessible
+        */
+       protected
+       File
+       getFile(
+               final String path
+       )
+       {
+               logger.trace( "Path :{}", path );
+               
+               if ( null == path )
+               {
+                   return null;
+               }
+
+               final String[] fragments = getCanonicalFragments( path );
+
+               File iter = root;
+               for ( int i = 0, n = fragments.length ; i < n ; ++i )
+               {
+                       Directory dir = (Directory) iter;
+                       iter = dir.get( fragments[i] );
+                       if ( null == iter )
+                       {
+                               logger.debug( "fragment :{}", fragments[i] );
+                               logger.debug( "in-processing directory :{}", dir );
+                               
+                               return null;
+                       }
+               }
+
+               return iter;
+       }
+
+       /**
+        * Return parent directory of file matching with <code>path</code>
+        * @param path file path
+        * 
+        * @return parent directory
+        * 
+        * @throws IOException If file or directory is not accessible
+        */
+       public
+       Directory
+       getParent(
+               final String path
+       )
+       throws IOException
+       {
+               final File parent = getFile( removeTailingPath( path, 1 ) );
+               if ( !( parent instanceof Directory ) )
+               {
+                       throw new IOException();
+               }
+
+               return (Directory) parent;
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#makeDirectory(java.lang.String)
+        */
+       @Override
+       public
+       void
+       makeDirectory(
+               final String path
+       )
+       throws IOException
+       {
+               final Directory parent = getParent( path );
+               final String dirName = getFilename( path );
+               if ( parent.name2file.containsKey( dirName ) )
+               {
+                   throw new IOException();
+               }
+               parent.add( dirName );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#moveDirectory(java.lang.String, java.lang.String)
+        */
+       @Override
+       public
+       void
+       moveDirectory(
+               final String source,
+               final String target
+       )
+       throws IOException
+       {
+               final String filename = getFilename( source );
+
+               final Directory parent = getParent( source );
+               final File file = parent.get( filename );
+               if ( !( file instanceof Directory ) )
+               {
+                       throw new IOException();
+               }
+               final Directory newParent = (Directory) getFile( target );
+               newParent.add( newParent.remove( filename ) );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#copyDirectory(java.lang.String, java.lang.String)
+        */
+       @Override
+       public
+       void
+       copyDirectory(
+               final String source,
+               final String target
+       )
+       throws IOException
+       {
+               final Directory dir = (Directory) getFile( source );
+               final Directory targetDir = (Directory) getFile( target );
+
+               targetDir.add( (File) dir.clone() );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#removeDirectory(java.lang.String)
+        */
+       @Override
+       public
+       void
+       removeDirectory(
+               final String path
+       )
+       throws IOException
+       {
+               final Directory dir = getParent( path );
+               final String name = getFilename( path );
+               dir.remove( name );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#list(java.lang.String)
+        */
+       @Override
+       public
+       Collection<String>
+       list(
+               final String path
+       )
+       throws IOException
+       {
+               final Directory dir = (Directory) getFile( path );
+               final Collection<String> childNames = dir.name2file.keySet();
+               logger.trace( "Directory[{}]'s child :{}", path, childNames );
+
+               final ArrayList<String> fullNames = new ArrayList<String>();
+
+               for ( final String name : dir.name2file.keySet() )
+               {
+                       fullNames.add( addTailingPath( path, name )  );
+               }
+
+               logger.debug( "Fullnames :\n{}", fullNames );
+               return fullNames;
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#write(java.lang.String, java.io.InputStream)
+        */
+       @Override
+       public
+       void
+       write(
+               final String path,
+               final InputStream in
+       )
+       throws IOException
+       {
+               final Directory parent = getParent( path );
+               if ( !(parent instanceof Directory ) )
+               {
+                       throw new IOException();
+               }
+
+               final String filename = getFilename( path );
+               logger.debug( "Filename :{}", filename );
+
+               File file = parent.get( filename );
+
+               if ( file instanceof Directory )
+               {
+                       throw new IOException();
+               }
+               if ( null == file )
+               {
+                       file = new File( getFilename( path ), null );
+               }
+               getParent( path ).add( file );
+
+               final byte[] contents = IOUtil.getBytes( in );
+
+               if ( logger.isTraceEnabled() )
+               {
+                       int nSize = size( contents );
+                       logger.trace(
+                               "Save file[{}] :{} byte(s)\n{}",
+                               new Object[] {
+                                       path,
+                                       nSize,
+                                       StringUtil.text2hexa( contents, 0, Math.min( 64, size( contents ) ) ) + ( (64 < size( contents ) )?"...":"" )
+                               }
+                       );
+               }
+
+               file.setContents( contents );
+       }
+
+       /**
+        * write <code>contents</code> to file with <code>path</code>
+        * 
+        * @param path file path
+        * @param contents file contents
+        * 
+        * @throws IOException If file can't be writable
+        * 
+        * @see {@link #write(String, InputStream)}
+        */
+       public
+       void
+       write(
+               final String path,
+               final String contents
+       )
+       throws IOException
+       {
+               logger.trace( "Save file :{}\n{}", path, contents );
+               final InputStream in = new ByteArrayInputStream( (null==contents)?(new byte[0]):contents.getBytes() );
+               try
+               {
+                       write( path, in );
+               }
+               finally
+               {
+                       tryClose( in );
+               }
+
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#read(java.lang.String)
+        */
+       @Override
+       public
+       InputStream
+       read(
+               final String path
+       )
+       throws IOException
+       {
+           logger.trace( "Read {}", path );
+               final File file = getFile( path );
+               if ( file instanceof Directory )
+               {
+                       throw new IOException();
+               }
+
+               return new ByteArrayInputStream( file.contents );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#moveFile(java.lang.String, java.lang.String)
+        */
+       @Override
+       public
+       void
+       moveFile(
+               final String source,
+               final String target
+       )
+       throws IOException
+       {
+               final Directory directory = getParent( source );
+               final String fileName = getFilename( source );
+               final File file = directory.remove( fileName );
+               if ( null == file )
+               {
+                       throw new IOException();
+               }
+               
+               final Directory targetDirectory = (Directory) getFile( target );
+               targetDirectory.add( file );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#copyFile(java.lang.String, java.lang.String)
+        */
+       @Override
+       public
+       void
+       copyFile(
+               final String source,
+               final String target
+       )
+       throws IOException
+       {
+               final Directory directory = getParent( source );
+               final String fileName = getFilename( source );
+               final File file = directory.get( fileName );
+               if ( null == file )
+               {
+                       throw new IOException();
+               }
+               
+               final Directory targetDirectory = (Directory) getFile( target );
+               targetDirectory.add( (File) file.clone() );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#removeFile(java.lang.String)
+        */
+       @Override
+       public
+       void
+       removeFile(
+               final String path
+       )
+       throws IOException
+       {
+               final File file = getFile( path );
+               if ( file instanceof Directory )
+               {
+                       throw new IOException();
+               }
+               
+               final Directory directory = getParent( path );
+               final String fileName = getFilename( path );
+               directory.remove( fileName );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#get(java.lang.String, org.tizen.common.file.FileHandler.Attribute)
+        */
+       @Override
+       public
+       Object
+       get(
+               final String path,
+               final Attribute name
+       )
+       throws IOException
+       {
+           logger.trace( "Path :{}, Name :{}", path, name );
+               File file = getFile( path );
+               if ( Attribute.TYPE.equals( name ) )
+               {
+                       if ( file instanceof Directory )
+                       {
+                               return Type.DIRECTORY;
+                       }
+                       else if ( file instanceof File )
+                       {
+                               return Type.FILE;
+                       }
+               }
+               else if ( Attribute.EXISTS.equals( name ) )
+               {
+                       return ( null != file );
+
+               }
+               else if ( Attribute.SIZE.equals( name ) )
+               {
+                   if ( null == file || null == file.getContents() )
+                   {
+                       return (long) 0;
+                   }
+                   return (long) file.getContents().length;
+               }
+               else if ( Attribute.PATH.equals( name ) )
+               {
+                       if ( path.startsWith( ROOT_PREFIX ) )
+                       {
+                           return getCanonicalForm( path );
+                       }
+
+                       return getCanonicalForm ( addTailingPath( cwd, path ) );
+               }
+               else if ( Attribute.NAME.equals( name ) )
+               {
+                   return getFilename( path );
+               }
+               else if ( Attribute.URI.equals( name ) || Attribute.URL.equals( name ) )
+               {
+                       return "vf://" + path;
+               }
+               else
+               {
+                       file.getAttribute( name );
+                       return false;
+               }
+               throw new IOException( path + "'s Unknown attribute :" + name );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#set(java.lang.String, org.tizen.common.file.FileHandler.Attribute, java.lang.Object)
+        */
+       @Override
+       public
+       void
+       set(
+               final String path,
+               final Attribute name,
+               final Object value
+       )
+       throws IOException
+       {
+               final File file = getFile( path );
+               if ( null != file )
+               {
+                       file.setAttribute( name, value );
+               }
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#getCurrentWorkingDirectory()
+        */
+       @Override
+       public
+       String
+       getCurrentWorkingDirectory() {
+               return this.cwd;
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.FileHandler#setCurrentWorkingDirectory(java.lang.String)
+        */
+       @Override
+       public
+       void
+       setCurrentWorkingDirectory(
+               final String cwd
+       )
+       {
+               this.cwd = cwd;
+               logger.info( "CWD changed :{}", this.cwd );
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/file/filter/WildCardFilter.java b/org.tizen.common/src/org/tizen/common/file/filter/WildCardFilter.java
new file mode 100755 (executable)
index 0000000..b6c1e73
--- /dev/null
@@ -0,0 +1,96 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.file.filter;
+
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.filefilter.WildcardFileFilter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.file.Filter;
+import org.tizen.common.file.PatternFilter;
+
+/**
+ * WildCardFilter
+ * 
+ * Filter using wildcard( ?, * )
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+WildCardFilter
+extends PatternFilter
+implements Filter
+{
+       /**
+        * Logger for this instance
+        */
+       protected final Logger logger = LoggerFactory.getLogger( getClass() );
+       
+       /**
+        * Default constructor
+        */
+       public WildCardFilter()
+       {
+       }
+       
+       /**
+        * Constructor with pattern
+        * 
+        * @param pattern pattern to apply
+        */
+       public WildCardFilter( final String pattern )
+       {
+               setPattern( pattern );
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.file.Filter#accept(java.lang.String, java.lang.String)
+        */
+       @Override
+       public
+       boolean
+       accept(
+               final String cwd,
+               final String path
+       )
+       {
+               logger.trace( "Current working directory :{}, Path :{}", cwd, path );
+               
+               final String name = path;
+               logger.trace( "Name :{}", name );
+               return FilenameUtils.wildcardMatch( name, getPattern() );
+       }
+
+       /* (non-Javadoc)
+        * @see java.lang.Object#toString()
+        */
+       @Override
+       public
+       String
+       toString()
+       {
+               return WildcardFileFilter.class.getName() + "[" + getPattern() + "]";
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/file/filter/WildCardFilterFactory.java b/org.tizen.common/src/org/tizen/common/file/filter/WildCardFilterFactory.java
new file mode 100644 (file)
index 0000000..2cafcbf
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.file.filter;
+
+import org.tizen.common.FactoryWithArgument;
+import org.tizen.common.file.Filter;
+
+/**
+ * <p>
+ * WildCardFilterFactory.
+ *
+ * Factory to create {@link WildCardFilter} for pattern
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+WildCardFilterFactory
+implements FactoryWithArgument<Filter, String>
+{
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.FactoryWithArgument#create(java.lang.Object)
+        */
+       @Override
+       public
+       Filter
+       create(
+               final String arg
+       )
+       {
+               final WildCardFilter filter = new WildCardFilter();
+               filter.setPattern( arg );
+               return filter;
+       }
+
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/rds/DeltaResourceInfo.java b/org.tizen.common/src/org/tizen/common/rds/DeltaResourceInfo.java
new file mode 100644 (file)
index 0000000..7cbdffd
--- /dev/null
@@ -0,0 +1,119 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Gun Kim <gune.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.rds;
+
+/**
+ * Information of delta.
+ * @author Gun Kim<gune.kim@samsung.com>
+ *
+ */
+public class DeltaResourceInfo {
+    /**
+     * Type constant which identifies modified status resources.
+     */
+    public final static String TYPE_MODIFY = "modify";
+    /**
+     * Type constant which identifies deleted status resources.
+     */
+    public final static String TYPE_DELETE = "delete";
+    /**
+     * Type constant which identifies installed status resources.
+     */
+    public final static String TYPE_INSTALL = "install";
+    private String name;
+    private String type;
+    private String fullPath;
+    private String remotePath;
+    
+    public DeltaResourceInfo(String name, String fullPath, String type) {
+        this.name = name;
+        this.fullPath = fullPath;
+        this.remotePath = null;
+        this.type = type;
+    }
+    
+    public DeltaResourceInfo(String name, String fullPath, String remotePath, String type) {
+        this.name = name;
+        this.fullPath = fullPath;
+        this.remotePath = remotePath;
+        this.type = type;
+    }
+    public DeltaResourceInfo(String fullPath, String remotePath) {
+        this.fullPath = fullPath;
+        this.remotePath = remotePath;
+    }
+    public DeltaResourceInfo(String fullPath) {
+        this.fullPath = fullPath;
+        this.remotePath = fullPath;
+    }
+    
+    /**
+     * Returns name of resource.
+     *
+     * @return String
+     */
+    public String getName() {
+        return name;
+    }
+    /**
+     * Returns status of resource.
+     *
+     * @return String
+     */
+    public String getType() {
+        return type;
+    }
+    /**
+     * Returns absolute path of resource.
+     *
+     * @return String
+     */
+    public String getFullPath() {
+        return fullPath;
+    }
+    /**
+     *  Sets the path which is installed on target.
+     *
+     * @param path installed on target
+     * @return String
+     */
+    public void setRemotePath(String path) {
+        this.remotePath = path;
+    }
+    /**
+     *  Returns the path which is installed on target.
+     *
+     * @return String
+     */
+    public String getRemotePath() {
+        return remotePath;
+    }
+    
+    @Override
+    public String toString() {
+        return name;
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/rds/RdsDeltaDetector.java b/org.tizen.common/src/org/tizen/common/rds/RdsDeltaDetector.java
new file mode 100755 (executable)
index 0000000..7546d14
--- /dev/null
@@ -0,0 +1,242 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Gun Kim <gune.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.rds;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.internal.dtree.AbstractDataTreeNode;
+import org.eclipse.core.internal.dtree.DataDeltaNode;
+import org.eclipse.core.internal.dtree.DataTreeNode;
+import org.eclipse.core.internal.dtree.DeletedNode;
+import org.eclipse.core.internal.dtree.DeltaDataTree;
+import org.eclipse.core.internal.dtree.NoDataDeltaNode;
+import org.eclipse.core.internal.events.ResourceComparator;
+import org.eclipse.core.internal.localstore.SafeFileInputStream;
+import org.eclipse.core.internal.localstore.SafeFileOutputStream;
+import org.eclipse.core.internal.resources.Workspace;
+import org.eclipse.core.internal.watson.ElementTree;
+import org.eclipse.core.internal.watson.ElementTreeReader;
+import org.eclipse.core.internal.watson.ElementTreeWriter;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.tizen.common.util.IOUtil;
+import org.tizen.common.util.log.Logger;
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.SyncService;
+
+/**
+ * Delta Detector for Rapid Development Support.
+ * 
+ * @author Gun Kim<gune.kim@samsung.com>
+ */
+@SuppressWarnings("restriction")
+public class RdsDeltaDetector {
+    ElementTree oldTree;
+    IDevice device;
+    IProject project;
+    String remotePath;
+    String strResInfoFile = "";
+    public final static String STR_TREE_FILE = ".sdk_delta.info";
+    public final static String STR_TREE_DIRECTORY = "/info/";
+    private static final int TREE_BUFFER_SIZE = 1024 * 64;//64KB buffer
+    List<String> deltaFilterDataList;
+    
+    public RdsDeltaDetector( IDevice device, IProject project, String remotePath ) {
+        this.device = device;
+        this.project = project;
+        this.remotePath = remotePath;
+    }
+    
+    /**
+     * Reads the <code>STR_TREE_FILE</code>, and sets the <code>oldTree</code>.
+     */
+    public void readOldTree() {
+        downloadOldTree();
+        Workspace workspace = ((Workspace)project.getWorkspace());
+        ElementTreeReader treeReader = new ElementTreeReader(workspace.getSaveManager());
+        
+        String strLocalFile = project.getLocation().toString() + "/" + STR_TREE_FILE;
+        
+        DataInputStream input = null;
+        try {
+            input = new DataInputStream(new SafeFileInputStream(strLocalFile, strLocalFile + ".temp", TREE_BUFFER_SIZE));
+            oldTree = treeReader.readTree(input);
+        } catch (IOException e) {
+            Logger.log(e);
+        } finally {
+            IOUtil.tryClose(input);
+        }
+    }
+    
+    /**
+     * Returns whether <code>oldTree</code> is null.
+     * Returns <code>false</code> if <code>oldTree</code> is null.
+     * 
+     * @return boolean
+     */
+    public boolean hasOldTree() {
+        if ( oldTree == null ) {
+            return false;
+        }
+        return true;
+    }
+    
+    /**
+     * Downloads the <code>STR_TREE_FILE</code> which is installed on target.
+     * And returns the file path.
+     * 
+     * @return String
+     */
+    private String downloadOldTree( ) {
+        String strLocalFile = null;
+        
+        if ( remotePath == null ) {
+            return null;
+        }
+        
+        String deltaFileOnRemote = remotePath + STR_TREE_DIRECTORY + STR_TREE_FILE;
+        strLocalFile = project.getLocation().toString() + "/" + STR_TREE_FILE;
+        try {
+            device.getSyncService().pullFile(deltaFileOnRemote, strLocalFile, true, SyncService.getNullProgressMonitor());
+        } catch (Exception e) {
+            return null;
+        }
+        
+        return strLocalFile;
+    }
+    
+    /**
+     * Returns the delta between <code>oldTree</code> and <code>tree</code>.
+     * If the <code>tree</code> is null, <code>tree</code> is <code>IWorkspace.getElementTree()</code>.
+     * 
+     * @param current tree.
+     * @param The path of the new subtree in this tree.
+     * @return List
+     */
+    public List<DeltaResourceInfo> getDelta(ElementTree tree, IPath subTreePath) {
+        String projectPath = "";
+        if ( oldTree == null) {
+            return null;
+        }
+        if ( subTreePath == null ) {
+            subTreePath = project.getFullPath();
+            projectPath = project.getLocation().toString();
+        }
+        else {
+            projectPath = subTreePath.toString();
+        }
+        
+        if ( tree == null) {
+            tree = ((Workspace)project.getWorkspace()).getElementTree().getSubtree(subTreePath);
+        }
+        else {
+            tree = tree.getSubtree(subTreePath);
+        }
+        
+        DeltaDataTree currentDelta = oldTree.getDataTree().forwardDeltaWith(tree.getDataTree(), ResourceComparator.getBuildComparator());
+        return getDelta(new ArrayList<DeltaResourceInfo>(), currentDelta.findNodeAt(subTreePath), projectPath);
+    }
+    
+    /**
+     * Returns List assembled with the given deltaNode and strPath.
+     * 
+     * @param current tree.
+     * @param the delta tree.
+     * @param prefix name of elements.
+     * @return List
+     */
+    public List<DeltaResourceInfo> getDelta(List<DeltaResourceInfo> deltaInfoList, AbstractDataTreeNode deltaNode, String strPath) {
+        if ( deltaNode == null ) {
+            return deltaInfoList;
+        }
+        for( AbstractDataTreeNode node : deltaNode.getChildren() ) {
+            if ( node instanceof DeletedNode) {
+                deltaInfoList.add(new DeltaResourceInfo(node.getName(), strPath + "/" + node.getName(), DeltaResourceInfo.TYPE_DELETE));
+                continue;
+            }
+            else if ( node instanceof DataDeltaNode ) {
+                if ( node.getChildren().length == 0 ) {
+                    deltaInfoList.add(new DeltaResourceInfo(node.getName(), strPath + "/" + node.getName(), DeltaResourceInfo.TYPE_MODIFY));
+                    continue;
+                }
+                else {
+                    getDelta(deltaInfoList, node, strPath + "/" + node.getName());
+                }
+            }
+            else if ( node instanceof DataTreeNode ) {
+                if ( node.getChildren().length == 0 ) {
+                    deltaInfoList.add(new DeltaResourceInfo(node.getName(), strPath + "/" + node.getName(), DeltaResourceInfo.TYPE_MODIFY));
+                    continue;
+                }
+                else {
+                    getDelta(deltaInfoList, node, strPath + "/" + node.getName());
+                }
+            }
+            else if ( node instanceof NoDataDeltaNode) {
+                getDelta(deltaInfoList, node, strPath + "/" + node.getName());
+            }
+        }
+        
+        return deltaInfoList;
+    }
+    
+    /**
+     * Makes the <code>STR_TREE_FILE</code> file.
+     * 
+     * @param The tree to be saved.
+     * @param The path of the new subtree in this tree.
+     * @return String
+     */
+    public String makeDeltaFile(ElementTree tree, IPath subTreePath) {
+        Workspace workspace = ((Workspace)project.getWorkspace());
+        if ( tree == null) {
+            tree = workspace.getElementTree().getSubtree(project.getFullPath());
+        }
+        if ( subTreePath == null ) {
+            subTreePath = project.getFullPath();
+        }
+        
+        ElementTreeWriter treeWriter = new ElementTreeWriter(workspace.getSaveManager());
+        
+        String strLocalFile = project.getLocation().toString() + "/" + STR_TREE_FILE;
+        
+        DataOutputStream output = null;
+        try {
+            output = new DataOutputStream(new SafeFileOutputStream(strLocalFile, strLocalFile + ".temp"));
+            
+            treeWriter.writeTree(tree, subTreePath, ElementTreeWriter.D_INFINITE, output);
+        } catch ( final IOException e ) {
+            return "";
+        } finally {
+            IOUtil.tryClose(output);
+        }
+        return strLocalFile;
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/rds/RdsDeployer.java b/org.tizen.common/src/org/tizen/common/rds/RdsDeployer.java
new file mode 100644 (file)
index 0000000..ad015ff
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Gun Kim <gune.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.rds;
+
+import java.io.Closeable;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.osgi.util.NLS;
+import org.tizen.common.CommonPlugin;
+import org.tizen.common.TizenPlatformConstants;
+import org.tizen.common.ui.view.console.ConsoleManager;
+import org.tizen.common.util.ISdbCommandHelper;
+import org.tizen.common.util.log.Logger;
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.SyncService;
+import org.tizen.sdblib.SyncService.SyncResult;
+
+/**
+ * This class deploys delta resource of project to target.
+ * 
+ * @author Gun Kim<gune.kim@samsung.com>
+ */
+public abstract class RdsDeployer implements Closeable{
+    protected IProgressMonitor monitor;
+    protected ConsoleManager console;
+    protected String pkgType;
+    protected String strAppInstallPath;
+    protected IProject project;
+    protected IDevice device;
+    protected RdsDeltaDetector deltaDetector;
+    protected ISdbCommandHelper tizenCommand;
+    protected List<DeltaResourceInfo> interestList = new ArrayList<DeltaResourceInfo>();
+    private SyncService syncService;
+    private final static String[] needAppOwnerArray = new String[] {"/data", "/shared/data", "/shared/trusted", "/setting"};
+
+    /**
+     * Prints progress information.
+     *
+     * @param message 
+     */
+    protected abstract void printInfo( String message );
+    /**
+     * Gets package name excluded path which is installed on target
+     * 
+     * @return String
+     */
+    protected abstract String getAppInstallPath();
+    /**
+     * Deploys using RDS.
+     * 
+     * @return boolean
+     */
+    public abstract boolean deploy() throws CoreException;
+    
+    public RdsDeployer( IProject project, IDevice device, ISdbCommandHelper tizenCommand, ConsoleManager console, String pkgType, IProgressMonitor monitor) {
+        this.project = project;
+        this.device = device;
+        this.tizenCommand = tizenCommand;
+        this.monitor = monitor;
+        this.console = console;
+        this.pkgType = pkgType;
+        this.strAppInstallPath = getAppInstallPath();
+        deltaDetector = new RdsDeltaDetector(device, project, strAppInstallPath);
+        
+    }
+    
+    public void setInterestList( List<DeltaResourceInfo> list) {
+        interestList = list;
+    }
+
+    protected void partialInstall( List<DeltaResourceInfo> deltaInfoList ) throws CoreException {
+        boolean isNeededInstall = false;
+        String strProjectPath = project.getLocation().toString();
+        String strRemotePath = null;
+        String command = null;
+        boolean isInteresting = false;
+        
+        for ( DeltaResourceInfo node : deltaInfoList ) {
+            isInteresting = false;
+            for ( DeltaResourceInfo interest : interestList ) {
+                if ( node.getFullPath().startsWith(strProjectPath + interest.getFullPath()) ) {
+                    isInteresting = true;
+                    if ( interest.getRemotePath() == null ) {
+                        strRemotePath = strAppInstallPath + node.getFullPath().replaceFirst(strProjectPath, "");
+                    }
+                    else {
+                        strRemotePath = strAppInstallPath + node.getFullPath().replaceFirst(strProjectPath + interest.getFullPath(), interest.getRemotePath());
+                    }
+                    
+                    if ( DeltaResourceInfo.TYPE_INSTALL.equals(interest.getType()) ) {
+                        isNeededInstall = true;
+                    }
+                    break;
+                }
+            }
+            if ( !isInteresting ) {
+                continue;
+            }
+            if ( DeltaResourceInfo.TYPE_MODIFY.equals(node.getType()) ) {
+                try {
+                    command = RdsDeployer.makeRdsLog(NLS.bind(RdsMessages.RDS_PUSH_LOG, node.getFullPath(), strRemotePath));
+                    if ( new File(node.getFullPath()).isDirectory() ) {
+                        tizenCommand.runCommand( "mkdir -p -m 755 \"" + strRemotePath + "\""+ TizenPlatformConstants.CMD_SUFFIX , true, TizenPlatformConstants.CMD_SUCCESS);
+                    }
+                    else {
+                        SyncResult result = getSyncService().pushFile(node.getFullPath(), strRemotePath, SyncService.getNullProgressMonitor());
+                        if ( result.getCode() != SyncService.RESULT_OK ) {
+                            throw new IOException(command);
+                        }
+                    }
+                    printInfo( command );
+                    
+                    // TODO: It should be replaced to 'pkg_cmd'
+                    for ( String needAppOwnerPath : needAppOwnerArray) {
+                        String needAppOwnerFullPath = strAppInstallPath + needAppOwnerPath;
+                        if ( strRemotePath.startsWith( needAppOwnerFullPath ) ) {
+                            tizenCommand.runCommand( "chown -R app:app \"" + needAppOwnerFullPath + "\"" + TizenPlatformConstants.CMD_SUFFIX , true, TizenPlatformConstants.CMD_SUCCESS);
+                            break;
+                        }
+                    }
+                } catch (Exception e) {
+                    newCoreException(RdsDeployer.makeRdsLog(RdsMessages.RDS_PUSH_ERROR), e);
+                }
+            }
+            else if ( DeltaResourceInfo.TYPE_DELETE.equals(node.getType()) ) {
+                try {
+                    command = "rm -rf " + addQuotes(strRemotePath) + TizenPlatformConstants.CMD_SUFFIX;
+                    tizenCommand.runCommand(command, true, null);
+                } catch (Exception e) {
+                    newCoreException(RdsDeployer.makeRdsLog(RdsMessages.RDS_DELETE_ERROR), e);
+                }
+            }
+        }
+        
+        if ( isNeededInstall ) {
+            postInstall();
+        }
+    }
+
+    protected List<DeltaResourceInfo> getDelta() {
+        return deltaDetector.getDelta(null, null);
+    }
+    
+    protected void postInstall() throws CoreException {
+        String installCommand = String.format(TizenPlatformConstants.PKG_TOOL_INSTALL_COMMAND, pkgType.toLowerCase(), strAppInstallPath) + TizenPlatformConstants.CMD_SUFFIX;
+
+        try {
+            tizenCommand.runCommand(installCommand, true, TizenPlatformConstants.CMD_SUCCESS);
+        } catch (Exception e) {
+            newCoreException(RdsDeployer.makeRdsLog(RdsMessages.CANNOT_INSTALL), e);
+        }
+    }
+    
+    protected boolean hasOldResourceInfo() {
+        deltaDetector.readOldTree();
+        if ( !deltaDetector.hasOldTree() ) {
+            return false;
+        }
+        return true;
+    }
+    
+    public void pushResInfoFile() {
+        String appInstallPath = getAppInstallPath();
+
+        String strResInfoFile = deltaDetector.makeDeltaFile(null,null);
+        String strRemotePath = appInstallPath + RdsDeltaDetector.STR_TREE_DIRECTORY + RdsDeltaDetector.STR_TREE_FILE;
+        
+        try {
+            getSyncService().pushFile(strResInfoFile, strRemotePath, SyncService.getNullProgressMonitor());
+        } catch (Exception e) {
+            Logger.error(RdsDeployer.makeRdsLog(RdsMessages.RDS_RES_INFO_PUSH_ERROR), e);
+        }
+    }
+    
+    private String addQuotes(String orig) {
+        return "\"" + orig + "\"";
+    }
+    
+    public static String makeRdsLog( String log ) {
+        return RdsMessages.RDS_MODE_PREFIX + " " + log;
+    }
+    
+    /**
+     * Creates a new exception.
+     *
+     * @param message a human-readable message, localized to the
+     *    current locale
+     * @param exception a low-level exception, or <code>null</code> if not
+     *    applicable
+     */
+    public void newCoreException(String message, Throwable exception) throws CoreException {
+        Status status = new Status(Status.ERROR, CommonPlugin.PLUGIN_ID, message, exception);
+        throw new CoreException(status);
+    }
+    
+    protected SyncService getSyncService() throws Exception {
+        if ( syncService == null ) {
+            syncService = device.getSyncService();
+        }
+
+        return syncService;
+    }
+    
+    @Override
+    public void close() throws IOException {
+        if ( syncService != null ) {
+            syncService.close();
+        }
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/rds/RdsMessages.java b/org.tizen.common/src/org/tizen/common/rds/RdsMessages.java
new file mode 100644 (file)
index 0000000..95f7ee6
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Gun Kim <gune.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.rds;
+
+import org.eclipse.osgi.util.NLS;
+
+public class RdsMessages {
+    static {
+        NLS.initializeMessages(RdsMessages.class.getName(), RdsMessages.class);
+    }
+    
+    public static String RDS_PUSH_LOG;
+    public static String RDS_PUSH_ERROR;
+    public static String RDS_DELETE_ERROR;
+    public static String CANNOT_INSTALL;
+    public static String RDS_RES_INFO_PUSH_ERROR;
+    public static String CANNOT_FIND_RDS_INFO;
+    public static String CANNOT_FIND_DELTA;
+    public static String RDS_MODE_DISABLE;
+    public static String RDS_MODE_ENABLE;
+    public static String RDS_MODE_CONSOLE_TITLE;
+    public static String RDS_MODE_PREFIX;
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/rds/RdsMessages.properties b/org.tizen.common/src/org/tizen/common/rds/RdsMessages.properties
new file mode 100644 (file)
index 0000000..b24b7a2
--- /dev/null
@@ -0,0 +1,11 @@
+RDS_PUSH_LOG=Pushing file "{0}" to "{1}" in target.
+RDS_PUSH_ERROR=Failed to push file(s).
+RDS_DELETE_ERROR=Failed to delete file in target.
+CANNOT_INSTALL = Cannot install application.
+RDS_RES_INFO_PUSH_ERROR=Failed to upload resource information for RDS.
+CANNOT_FIND_RDS_INFO=Cannot find information of the latest launch.
+CANNOT_FIND_DELTA=Cannot find information of delta.
+RDS_MODE_DISABLE=RDS mode is disabled.
+RDS_MODE_ENABLE=RDS mode is enabled.
+RDS_MODE_CONSOLE_TITLE=, RDS Mode
+RDS_MODE_PREFIX=[RDS]
\ No newline at end of file
diff --git a/org.tizen.common/src/org/tizen/common/rds/ui/preference/DialogField.java b/org.tizen.common/src/org/tizen/common/rds/ui/preference/DialogField.java
new file mode 100644 (file)
index 0000000..9c3555d
--- /dev/null
@@ -0,0 +1,241 @@
+
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.tizen.common.rds.ui.preference;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+
+import org.eclipse.core.runtime.Assert;
+
+
+/**
+ * Base class of all dialog fields.
+ * Dialog fields manage controls together with the model, independed
+ * from the creation time of the widgets.
+ * - support for automated layouting.
+ * - enable / disable, set focus a concept of the base class.
+ *
+ * DialogField have a label.
+ */
+public class DialogField {
+
+    private Label fLabel;
+    protected String fLabelText;
+
+    private IDialogFieldListener fDialogFieldListener;
+
+    private boolean fEnabled;
+
+    public DialogField() {
+        fEnabled= true;
+        fLabel= null;
+        fLabelText= ""; //$NON-NLS-1$
+    }
+
+    /**
+     * Sets the label of the dialog field.
+     */
+    public void setLabelText(String labeltext) {
+        fLabelText= labeltext;
+        if (isOkToUse(fLabel)) {
+            fLabel.setText(labeltext);
+        }
+    }
+
+    // ------ change listener
+
+    /**
+     * Defines the listener for this dialog field.
+     */
+    public final void setDialogFieldListener(IDialogFieldListener listener) {
+        fDialogFieldListener= listener;
+    }
+
+    /**
+     * Programatical invocation of a dialog field change.
+     */
+    public void dialogFieldChanged() {
+        if (fDialogFieldListener != null) {
+            fDialogFieldListener.dialogFieldChanged(this);
+        }
+    }
+
+    // ------- focus management
+
+    /**
+     * Tries to set the focus to the dialog field.
+     * Returns <code>true</code> if the dialog field can take focus.
+     *  To be reimplemented by dialog field implementors.
+     */
+    public boolean setFocus() {
+        return false;
+    }
+
+    /**
+     * Posts <code>setFocus</code> to the display event queue.
+     */
+    public void postSetFocusOnDialogField(Display display) {
+        if (display != null) {
+            display.asyncExec(
+                new Runnable() {
+                    public void run() {
+                        setFocus();
+                    }
+                }
+            );
+        }
+    }
+
+    // ------- layout helpers
+
+    /**
+     * Creates all controls of the dialog field and fills it to a composite.
+     * The composite is assumed to have <code>MGridLayout</code> as
+     * layout.
+     * The dialog field will adjust its controls' spans to the number of columns given.
+     *  To be reimplemented by dialog field implementors.
+     */
+    public Control[] doFillIntoGrid(Composite parent, int nColumns) {
+        assertEnoughColumns(nColumns);
+
+        Label label= getLabelControl(parent);
+        label.setLayoutData(gridDataForLabel(nColumns));
+
+        return new Control[] { label };
+    }
+
+    /**
+     * Returns the number of columns of the dialog field.
+     *  To be reimplemented by dialog field implementors.
+     */
+    public int getNumberOfControls() {
+        return 1;
+    }
+
+    protected static GridData gridDataForLabel(int span) {
+        GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+        gd.horizontalSpan= span;
+        return gd;
+    }
+
+    // ------- ui creation
+
+    /**
+     * Creates or returns the created label widget.
+     * @param parent The parent composite or <code>null</code> if the widget has
+     * already been created.
+     */
+    public Label getLabelControl(Composite parent) {
+        if (fLabel == null) {
+            assertCompositeNotNull(parent);
+
+            fLabel= new Label(parent, SWT.LEFT | SWT.WRAP);
+            fLabel.setFont(parent.getFont());
+            fLabel.setEnabled(fEnabled);
+            if (fLabelText != null && !"".equals(fLabelText)) { //$NON-NLS-1$
+                fLabel.setText(fLabelText);
+            } else {
+                // XXX: to avoid a 16 pixel wide empty label - revisit
+                fLabel.setText("."); //$NON-NLS-1$
+                fLabel.setVisible(false);
+            }
+        }
+        return fLabel;
+    }
+
+    /**
+     * Creates a spacer control.
+     * @param parent The parent composite
+     */
+    public static Control createEmptySpace(Composite parent) {
+        return createEmptySpace(parent, 1);
+    }
+
+    /**
+     * Creates a spacer control with the given span.
+     * The composite is assumed to have <code>MGridLayout</code> as
+     * layout.
+     * @param parent The parent composite
+     */
+    public static Control createEmptySpace(Composite parent, int span) {
+        Label label= new Label(parent, SWT.LEFT);
+        GridData gd= new GridData();
+        gd.horizontalAlignment= GridData.BEGINNING;
+        gd.grabExcessHorizontalSpace= false;
+        gd.horizontalSpan= span;
+        gd.horizontalIndent= 0;
+        gd.widthHint= 0;
+        gd.heightHint= 0;
+        label.setLayoutData(gd);
+        return label;
+    }
+
+    /**
+     * Tests is the control is not <code>null</code> and not disposed.
+    */
+    protected final boolean isOkToUse(Control control) {
+        return (control != null) && (Display.getCurrent() != null) && !control.isDisposed();
+    }
+
+    // --------- enable / disable management
+
+    /**
+     * Sets the enable state of the dialog field.
+     */
+    public final void setEnabled(boolean enabled) {
+        if (enabled != fEnabled) {
+            fEnabled= enabled;
+            updateEnableState();
+        }
+    }
+
+    /**
+     * Called when the enable state changed.
+     * To be extended by dialog field implementors.
+     */
+    protected void updateEnableState() {
+        if (fLabel != null) {
+            fLabel.setEnabled(fEnabled);
+        }
+    }
+
+    /**
+     * Brings the UI in sync with the model. Only needed when model was changed
+     * in different thread whil UI was lready created.
+     */
+    public void refresh() {
+        updateEnableState();
+    }
+
+    /**
+     * Gets the enable state of the dialog field.
+     */
+    public final boolean isEnabled() {
+        return fEnabled;
+    }
+
+    protected final void assertCompositeNotNull(Composite comp) {
+        Assert.isNotNull(comp, "uncreated control requested with composite null"); //$NON-NLS-1$
+    }
+
+    protected final void assertEnoughColumns(int nColumns) {
+        Assert.isTrue(nColumns >= getNumberOfControls(), "given number of columns is too small"); //$NON-NLS-1$
+    }
+
+
+
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/rds/ui/preference/IDialogFieldListener.java b/org.tizen.common/src/org/tizen/common/rds/ui/preference/IDialogFieldListener.java
new file mode 100644 (file)
index 0000000..8f0c302
--- /dev/null
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.tizen.common.rds.ui.preference;
+
+/**
+ * Change listener used by <code>DialogField</code>
+ */
+public interface IDialogFieldListener {
+
+    /**
+     * The dialog field has changed.
+     *
+     * @param field the dialog field that changed
+     */
+    void dialogFieldChanged(DialogField field);
+
+}
+
diff --git a/org.tizen.common/src/org/tizen/common/rds/ui/preference/LayoutUtil.java b/org.tizen.common/src/org/tizen/common/rds/ui/preference/LayoutUtil.java
new file mode 100644 (file)
index 0000000..f8afc7b
--- /dev/null
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Guven Demir <guven.internet+eclipse@gmail.com> - [package explorer] Alternative package name shortening: abbreviation - https://bugs.eclipse.org/bugs/show_bug.cgi?id=299514
+ *******************************************************************************/
+package org.tizen.common.rds.ui.preference;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+
+public class LayoutUtil {
+
+    /**
+     * Calculates the number of columns needed by field editors
+     */
+    public static int getNumberOfColumns(DialogField[] editors) {
+        int nCulumns= 0;
+        for (int i= 0; i < editors.length; i++) {
+            nCulumns= Math.max(editors[i].getNumberOfControls(), nCulumns);
+        }
+        return nCulumns;
+    }
+
+    /**
+     * Creates a composite and fills in the given editors.
+     * @param labelOnTop Defines if the label of all fields should be on top of the fields
+     */
+    public static void doDefaultLayout(Composite parent, DialogField[] editors, boolean labelOnTop) {
+        doDefaultLayout(parent, editors, labelOnTop, 0, 0);
+    }
+
+    /**
+     * Creates a composite and fills in the given editors.
+     * @param labelOnTop Defines if the label of all fields should be on top of the fields
+     * @param marginWidth The margin width to be used by the composite
+     * @param marginHeight The margin height to be used by the composite
+     */
+    public static void doDefaultLayout(Composite parent, DialogField[] editors, boolean labelOnTop, int marginWidth, int marginHeight) {
+        int nCulumns= getNumberOfColumns(editors);
+        Control[][] controls= new Control[editors.length][];
+        for (int i= 0; i < editors.length; i++) {
+            controls[i]= editors[i].doFillIntoGrid(parent, nCulumns);
+        }
+        if (labelOnTop) {
+            nCulumns--;
+            modifyLabelSpans(controls, nCulumns);
+        }
+        GridLayout layout= null;
+        if (parent.getLayout() instanceof GridLayout) {
+            layout= (GridLayout) parent.getLayout();
+        } else {
+            layout= new GridLayout();
+        }
+        if (marginWidth != SWT.DEFAULT) {
+            layout.marginWidth= marginWidth;
+        }
+        if (marginHeight != SWT.DEFAULT) {
+            layout.marginHeight= marginHeight;
+        }
+        layout.numColumns= nCulumns;
+        parent.setLayout(layout);
+    }
+
+    private static void modifyLabelSpans(Control[][] controls, int nCulumns) {
+        for (int i= 0; i < controls.length; i++) {
+            setHorizontalSpan(controls[i][0], nCulumns);
+        }
+    }
+
+    /**
+     * Sets the span of a control. Assumes that GridData is used.
+     */
+    public static void setHorizontalSpan(Control control, int span) {
+        Object ld= control.getLayoutData();
+        if (ld instanceof GridData) {
+            ((GridData)ld).horizontalSpan= span;
+        } else if (span != 1) {
+            GridData gd= new GridData();
+            gd.horizontalSpan= span;
+            control.setLayoutData(gd);
+        }
+    }
+
+    /**
+     * Sets the width hint of a control. Assumes that GridData is used.
+     */
+    public static void setWidthHint(Control control, int widthHint) {
+        Object ld= control.getLayoutData();
+        if (ld instanceof GridData) {
+            ((GridData)ld).widthHint= widthHint;
+        }
+    }
+
+    /**
+     * Sets the heightHint hint of a control. Assumes that GridData is used.
+     */
+    public static void setHeightHint(Control control, int heightHint) {
+        Object ld= control.getLayoutData();
+        if (ld instanceof GridData) {
+            ((GridData)ld).heightHint= heightHint;
+        }
+    }
+
+    /**
+     * Sets the horizontal indent of a control. Assumes that GridData is used.
+     */
+    public static void setHorizontalIndent(Control control, int horizontalIndent) {
+        Object ld= control.getLayoutData();
+        if (ld instanceof GridData) {
+            ((GridData)ld).horizontalIndent= horizontalIndent;
+        }
+    }
+
+    /**
+     * Sets the horizontal grabbing of a control to true. Assumes that GridData is used.
+     */
+    public static void setHorizontalGrabbing(Control control) {
+        Object ld= control.getLayoutData();
+        if (ld instanceof GridData) {
+            ((GridData)ld).grabExcessHorizontalSpace= true;
+        }
+    }
+
+    /**
+     * Sets the vertical grabbing of a control to true. Assumes that GridData is used.
+     * @since 3.6
+     */
+    public static void setVerticalGrabbing(Control control) {
+        Object ld= control.getLayoutData();
+        if (ld instanceof GridData) {
+            GridData gd= ((GridData)ld);
+            gd.grabExcessVerticalSpace= true;
+            gd.verticalAlignment= SWT.FILL;
+        }
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/rds/ui/preference/ProjectSelectionDialog.java b/org.tizen.common/src/org/tizen/common/rds/ui/preference/ProjectSelectionDialog.java
new file mode 100644 (file)
index 0000000..2553e15
--- /dev/null
@@ -0,0 +1,194 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.tizen.common.rds.ui.preference;
+
+import java.util.ArrayList;
+import java.util.Set;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+import org.eclipse.core.runtime.IStatus;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.jface.viewers.ViewerSorter;
+
+import org.eclipse.ui.dialogs.SelectionStatusDialog;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.tizen.common.CommonPlugin;
+
+//import org.eclipse.jdt.core.IJavaModel;
+//import org.eclipse.jdt.core.IJavaProject;
+//import org.eclipse.jdt.core.JavaCore;
+//
+//import org.eclipse.jdt.ui.JavaElementComparator;
+//import org.eclipse.jdt.ui.JavaElementLabelProvider;
+//import org.eclipse.jdt.ui.StandardJavaElementContentProvider;
+//
+//import org.eclipse.jdt.internal.ui.JavaPlugin;
+//import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
+
+public class ProjectSelectionDialog extends SelectionStatusDialog {
+
+    // the visual selection widget group
+    private TableViewer fTableViewer;
+    private Set<IProject> fProjectsWithSpecifics;
+
+    // sizing constants
+    private final static int SIZING_SELECTION_WIDGET_HEIGHT= 250;
+    private final static int SIZING_SELECTION_WIDGET_WIDTH= 300;
+
+    private final static String DIALOG_SETTINGS_SHOW_ALL= "ProjectSelectionDialog.show_all"; //$NON-NLS-1$
+
+    private ViewerFilter fFilter;
+
+    public ProjectSelectionDialog(Shell parentShell, Set<IProject> projectsWithSpecifics) {
+        super(parentShell);
+        setTitle("Project Specific Configuration");
+        setMessage("&Select the project to configure:");
+        fProjectsWithSpecifics= projectsWithSpecifics;
+
+        fFilter= new ViewerFilter() {
+            @Override
+            public boolean select(Viewer viewer, Object parentElement, Object element) {
+                return fProjectsWithSpecifics.contains(element);
+            }
+        };
+    }
+
+
+    /* (non-Javadoc)
+     * Method declared on Dialog.
+     */
+    @Override
+    protected Control createDialogArea(Composite parent) {
+        // page group
+        Composite composite= (Composite) super.createDialogArea(parent);
+
+        Font font= parent.getFont();
+        composite.setFont(font);
+
+        createMessageArea(composite);
+
+        fTableViewer= new TableViewer(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+        fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+            public void selectionChanged(SelectionChangedEvent event) {
+                doSelectionChanged(((IStructuredSelection) event.getSelection()).toArray());
+            }
+        });
+        fTableViewer.addDoubleClickListener(new IDoubleClickListener() {
+            public void doubleClick(DoubleClickEvent event) {
+                okPressed();
+            }
+        });
+        GridData data= new GridData(SWT.FILL, SWT.FILL, true, true);
+        data.heightHint= SIZING_SELECTION_WIDGET_HEIGHT;
+        data.widthHint= SIZING_SELECTION_WIDGET_WIDTH;
+        fTableViewer.getTable().setLayoutData(data);
+
+        fTableViewer.setLabelProvider(WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider());
+        fTableViewer.setContentProvider(getContentProvider());
+//        fTableViewer.setComparator(new JavaElementComparator());
+        fTableViewer.getControl().setFont(font);
+        fTableViewer.setSorter(new ViewerSorter());
+
+        Button checkbox= new Button(composite, SWT.CHECK);
+        checkbox.setText("Show only &projects with project specific settings");
+        checkbox.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, true, false));
+        checkbox.addSelectionListener(new SelectionListener() {
+            public void widgetSelected(SelectionEvent e) {
+                updateFilter(((Button) e.widget).getSelection());
+            }
+            public void widgetDefaultSelected(SelectionEvent e) {
+                updateFilter(((Button) e.widget).getSelection());
+            }
+        });
+        IDialogSettings dialogSettings= CommonPlugin.getDefault().getDialogSettings();
+        boolean doFilter= !dialogSettings.getBoolean(DIALOG_SETTINGS_SHOW_ALL) && !fProjectsWithSpecifics.isEmpty();
+        checkbox.setSelection(doFilter);
+        updateFilter(doFilter);
+
+        fTableViewer.setInput(ResourcesPlugin.getWorkspace());
+
+        doSelectionChanged(new Object[0]);
+        Dialog.applyDialogFont(composite);
+        return composite;
+    }
+
+    protected void updateFilter(boolean selected) {
+        if (selected) {
+            fTableViewer.addFilter(fFilter);
+        } else {
+            fTableViewer.removeFilter(fFilter);
+        }
+        CommonPlugin.getDefault().getDialogSettings().put(DIALOG_SETTINGS_SHOW_ALL, !selected);
+    }
+
+    private void doSelectionChanged(Object[] objects) {
+        if (objects.length != 1) {
+            updateStatus(new StatusInfo(IStatus.ERROR, "")); //$NON-NLS-1$
+            setSelectionResult(null);
+        } else {
+            updateStatus(new StatusInfo());
+            setSelectionResult(objects);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.dialogs.SelectionStatusDialog#computeResult()
+     */
+    @Override
+    protected void computeResult() {
+    }
+    
+    protected IStructuredContentProvider getContentProvider() {
+        return new WorkbenchContentProvider() {
+            public Object[] getChildren(Object element) {
+                if (!(element instanceof IWorkspace)) {
+                    return new Object[0];
+                }
+                IProject[] projects = ((IWorkspace) element).getRoot().getProjects();
+                ArrayList<IProject> projectList = new ArrayList<IProject>();
+                // get array size
+                for ( IProject project : projects ) {
+                    if( !project.isOpen() ){
+                        continue;
+                    }
+                    projectList.add(project);
+                }
+
+                return projectList.toArray();
+            }
+        };
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/rds/ui/preference/PropertyAndPreferencePage.java b/org.tizen.common/src/org/tizen/common/rds/ui/preference/PropertyAndPreferencePage.java
new file mode 100755 (executable)
index 0000000..aa6efd4
--- /dev/null
@@ -0,0 +1,337 @@
+
+/*******************************************************************************
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.tizen.common.rds.ui.preference;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.ControlEnableState;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.eclipse.ui.IWorkbenchPropertyPage;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+/**
+ * Base for project property and preference pages
+ */
+public abstract class PropertyAndPreferencePage extends PreferencePage implements IWorkbenchPreferencePage, IWorkbenchPropertyPage {
+
+    private Control fConfigurationBlockControl;
+    private ControlEnableState fBlockEnableState;
+    private Link fChangeWorkspaceSettings;
+    private SelectionButtonDialogField fUseProjectSettings;
+    private IStatus fBlockStatus;
+    private Composite fParentComposite;
+
+    private IProject fProject; // project or null
+    private Map<String, Object> fData; // page data
+
+    public static final String DATA_NO_LINK= "PropertyAndPreferencePage.nolink"; //$NON-NLS-1$
+
+    public PropertyAndPreferencePage() {
+        fBlockStatus= new StatusInfo();
+        fBlockEnableState= null;
+        fProject= null;
+        fData= null;
+    }
+
+    protected abstract Control createPreferenceContent(Composite composite);
+    protected abstract boolean hasProjectSpecificOptions(IProject project);
+
+    protected abstract String getPreferencePageID();
+    protected abstract String getPropertyPageID();
+
+    protected boolean supportsProjectSpecificOptions() {
+        return getPropertyPageID() != null;
+    }
+
+    protected boolean offerLink() {
+        return fData == null || !Boolean.TRUE.equals(fData.get(DATA_NO_LINK));
+    }
+
+    @Override
+    protected Label createDescriptionLabel(Composite parent) {
+        fParentComposite= parent;
+        if (isProjectPreferencePage()) {
+            Composite composite= new Composite(parent, SWT.NONE);
+            composite.setFont(parent.getFont());
+            GridLayout layout= new GridLayout();
+            layout.marginHeight= 0;
+            layout.marginWidth= 0;
+            layout.numColumns= 2;
+            composite.setLayout(layout);
+            composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+
+            IDialogFieldListener listener= new IDialogFieldListener() {
+                public void dialogFieldChanged(DialogField field) {
+                    boolean enabled= ((SelectionButtonDialogField) field).isSelected();
+                    enableProjectSpecificSettings(enabled);
+
+                    if (enabled && getData() != null) {
+                        applyData(getData());
+                    }
+                }
+            };
+
+            fUseProjectSettings= new SelectionButtonDialogField(SWT.CHECK);
+            fUseProjectSettings.setDialogFieldListener(listener);
+            fUseProjectSettings.setLabelText("Enable Pr&oject specific settings.");
+            fUseProjectSettings.doFillIntoGrid(composite, 1);
+            LayoutUtil.setHorizontalGrabbing(fUseProjectSettings.getSelectionButton(null));
+
+            if (offerLink()) {
+                fChangeWorkspaceSettings= createLink(composite, "Configure Workspace Settings...");
+                fChangeWorkspaceSettings.setLayoutData(new GridData(SWT.END, SWT.CENTER, false, false));
+            } else {
+                LayoutUtil.setHorizontalSpan(fUseProjectSettings.getSelectionButton(null), 2);
+            }
+
+            Label horizontalLine= new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
+            horizontalLine.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, false, 2, 1));
+            horizontalLine.setFont(composite.getFont());
+        } else if (supportsProjectSpecificOptions() && offerLink()) {
+            fChangeWorkspaceSettings= createLink(parent, "Configure Project Specific Settings...");
+            fChangeWorkspaceSettings.setLayoutData(new GridData(SWT.END, SWT.CENTER, true, false));
+        }
+
+        return super.createDescriptionLabel(parent);
+    }
+
+    /*
+     * @see org.eclipse.jface.preference.IPreferencePage#createContents(Composite)
+     */
+    @Override
+    protected Control createContents(Composite parent) {
+        Composite composite= new Composite(parent, SWT.NONE);
+        GridLayout layout= new GridLayout();
+        layout.marginHeight= 0;
+        layout.marginWidth= 0;
+        composite.setLayout(layout);
+        composite.setFont(parent.getFont());
+
+        GridData data= new GridData(GridData.FILL, GridData.FILL, true, true);
+
+        fConfigurationBlockControl= createPreferenceContent(composite);
+        fConfigurationBlockControl.setLayoutData(data);
+
+        if (isProjectPreferencePage()) {
+            boolean useProjectSettings= hasProjectSpecificOptions(getProject());
+            enableProjectSpecificSettings(useProjectSettings);
+        }
+
+        Dialog.applyDialogFont(composite);
+        return composite;
+    }
+
+    private Link createLink(Composite composite, String text) {
+        Link link= new Link(composite, SWT.NONE);
+        link.setFont(composite.getFont());
+        link.setText("<A>" + text + "</A>");  //$NON-NLS-1$//$NON-NLS-2$
+        link.addSelectionListener(new SelectionListener() {
+            public void widgetSelected(SelectionEvent e) {
+                doLinkActivated((Link) e.widget);
+            }
+
+            public void widgetDefaultSelected(SelectionEvent e) {
+                doLinkActivated((Link) e.widget);
+            }
+        });
+        return link;
+    }
+
+    protected boolean useProjectSettings() {
+        return isProjectPreferencePage() && fUseProjectSettings != null && fUseProjectSettings.isSelected();
+    }
+
+    protected boolean isProjectPreferencePage() {
+        return fProject != null;
+    }
+
+    protected IProject getProject() {
+        return fProject;
+    }
+
+    /**
+     * Handle link activation.
+     *
+     * @param link the link
+     */
+    final void doLinkActivated(Link link) {
+        Map<String, Object> data= getData();
+        if (data == null)
+            data= new HashMap<String, Object>();
+        data.put(DATA_NO_LINK, Boolean.TRUE);
+
+        if (isProjectPreferencePage()) {
+            openWorkspacePreferences(data);
+        } else {
+            HashSet<IProject> projectsWithSpecifics= new HashSet<IProject>();
+            IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
+            for (int i= 0; i < projects.length; i++) {
+                IProject curr= projects[i];
+                if (hasProjectSpecificOptions(curr.getProject())) {
+                    projectsWithSpecifics.add(curr);
+                }
+            }
+            ProjectSelectionDialog dialog= new ProjectSelectionDialog(getShell(), projectsWithSpecifics);
+            if (dialog.open() == Window.OK) {
+                IProject res= (IProject) dialog.getFirstResult();
+                openProjectProperties(res.getProject(), data);
+            }
+        }
+    }
+
+    protected final void openWorkspacePreferences(Object data) {
+        String id= getPreferencePageID();
+        PreferencesUtil.createPreferenceDialogOn(getShell(), id, new String[] { id }, data).open();
+    }
+
+    protected final void openProjectProperties(IProject project, Object data) {
+        String id= getPropertyPageID();
+        if (id != null) {
+            PreferencesUtil.createPropertyDialogOn(getShell(), project, id, new String[] { id }, data).open();
+        }
+    }
+
+
+    protected void enableProjectSpecificSettings(boolean useProjectSpecificSettings) {
+        fUseProjectSettings.setSelection(useProjectSpecificSettings);
+        enablePreferenceContent(useProjectSpecificSettings);
+        updateLinkVisibility();
+        doStatusChanged();
+    }
+
+    private void updateLinkVisibility() {
+        if (fChangeWorkspaceSettings == null || fChangeWorkspaceSettings.isDisposed()) {
+            return;
+        }
+
+        if (isProjectPreferencePage()) {
+            fChangeWorkspaceSettings.setEnabled(!useProjectSettings());
+        }
+    }
+
+    protected void setPreferenceContentStatus(IStatus status) {
+        fBlockStatus= status;
+        doStatusChanged();
+    }
+
+    protected IStatus getPreferenceContentStatus() {
+        return fBlockStatus;
+    }
+
+    protected void doStatusChanged() {
+        if (!isProjectPreferencePage() || useProjectSettings()) {
+            updateStatus(fBlockStatus);
+        } else {
+            updateStatus(new StatusInfo());
+        }
+    }
+
+    protected void enablePreferenceContent(boolean enable) {
+        if (enable) {
+            if (fBlockEnableState != null) {
+                fBlockEnableState.restore();
+                fBlockEnableState= null;
+            }
+        } else {
+            if (fBlockEnableState == null) {
+                fBlockEnableState= ControlEnableState.disable(fConfigurationBlockControl);
+            }
+        }
+    }
+
+    /*
+     * @see org.eclipse.jface.preference.IPreferencePage#performDefaults()
+     */
+    @Override
+    protected void performDefaults() {
+        if (useProjectSettings()) {
+            enableProjectSpecificSettings(false);
+        }
+        super.performDefaults();
+    }
+
+    private void updateStatus(IStatus status) {
+        setValid(!status.matches(IStatus.ERROR));
+        StatusUtil.applyToStatusLine(this, status);
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IWorkbenchPropertyPage#getElement()
+     */
+    public IAdaptable getElement() {
+        return fProject;
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IWorkbenchPropertyPage#setElement(org.eclipse.core.runtime.IAdaptable)
+     */
+    public void setElement(IAdaptable element) {
+        /**
+         * Fixed : support resource's detail kind (file, project, folder)
+         * @author Gyeongseok Seo {@literal <gyeongseok.seo@samsung.com>} (S-Core)
+         */
+        if ( element instanceof IResource ) {
+            if ( element instanceof IProject ) {
+                fProject= (IProject) element.getAdapter( IResource.class );
+            } else if ( element instanceof IFile ) {
+                IFile file = (IFile) element.getAdapter( IFile.class );
+                fProject = file.getProject();
+            } else if ( element instanceof IFolder ) {
+                IFolder folder = (IFolder) element.getAdapter( IFolder.class );
+                fProject = folder.getProject();
+            }
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.preference.PreferencePage#applyData(java.lang.Object)
+     */
+    @SuppressWarnings("unchecked")
+    @Override
+    public void applyData(Object data) {
+        if (data instanceof Map) {
+            fData= (Map<String, Object>) data;
+        }
+        if (fChangeWorkspaceSettings != null) {
+            if (!offerLink()) {
+                fChangeWorkspaceSettings.dispose();
+                fParentComposite.layout(true, true);
+            }
+        }
+    }
+
+    protected Map<String, Object> getData() {
+        return fData;
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/rds/ui/preference/RdsPreferencePage.java b/org.tizen.common/src/org/tizen/common/rds/ui/preference/RdsPreferencePage.java
new file mode 100644 (file)
index 0000000..34d1272
--- /dev/null
@@ -0,0 +1,251 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Gun Kim <gune.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.rds.ui.preference;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.tizen.common.CommonPlugin;
+import org.tizen.common.ui.page.preference.Messages;
+import org.tizen.common.util.log.Logger;
+
+
+/**
+ * The page to configure the Rapid Development Support options.
+ * 
+ * @author Gun Kim<gune.kim@samsung.com>
+ */
+public class RdsPreferencePage extends PropertyAndPreferencePage implements IWorkbenchPreferencePage {
+    public static final String RDS_OPTION_ID = "org.tizen.common.option.rds";
+    public static final String RDS_PREFERENCE_PAGE_ID = "org.tizen.common.preferences.rds";
+    public static final String RDS_PROPERTIES_PAGE_ID = "org.tizen.common.properties.rds";
+    public static final QualifiedName RDS_PROPERTIES_SPECIFIC_OPTION_NAME = new QualifiedName(RDS_PROPERTIES_PAGE_ID, RDS_PREFERENCE_PAGE_ID);
+    public static final QualifiedName RDS_PROPERTIES_RDS_OPTION_NAME = new QualifiedName(RDS_PROPERTIES_PAGE_ID, RDS_OPTION_ID);
+    public static final String OPTION_ENABLE = "true";
+    public static final String OPTION_DISABLE = "false";
+    public static final boolean RDS_MODE_DEFAULT = true;
+    
+    private IPreferenceStore prefStore;
+    Button btnRdsCheck;
+    
+    public RdsPreferencePage() {
+        super();
+        prefStore = CommonPlugin.getDefault().getPreferenceStore();
+    }
+
+    @Override
+    public void init(IWorkbench workbench) {
+    }
+    
+    @Override
+    protected Control createPreferenceContent(Composite composite) {
+        createRdsCheck(composite);
+        return composite;
+    }
+    
+    private void createRdsCheck( Composite parent ) {
+        Composite rdsComposite = new Composite(parent, SWT.NONE);
+        
+        GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
+        gridData.horizontalSpan = 1;
+        GridLayout gridLayout = new GridLayout();
+        gridLayout.numColumns = 1;
+        gridLayout.marginHeight = 5;
+        gridLayout.marginWidth = 5;
+        rdsComposite.setLayoutData(gridData);
+        rdsComposite.setLayout(gridLayout);
+        
+        btnRdsCheck = new Button(rdsComposite, SWT.CHECK);
+        btnRdsCheck.setText(Messages.RDS_MODE_PREFERENCE);
+        btnRdsCheck.setSelection( getRdsOption() );
+        createNoteComposite(JFaceResources.getDialogFont(), rdsComposite, "Note:", Messages.RDS_NOTE);
+    }
+
+    @Override
+    protected boolean hasProjectSpecificOptions(IProject project) {
+        boolean isSpecificOption = false;
+        String specificOption = "";
+
+        
+        try {
+            specificOption = project.getPersistentProperty(RDS_PROPERTIES_SPECIFIC_OPTION_NAME);
+        } catch (CoreException e) {
+            isSpecificOption = false;
+        }
+        
+        if ( OPTION_ENABLE.equals(specificOption) ) {
+            isSpecificOption = true;
+        }
+        else {
+            isSpecificOption = false;
+        }
+        
+        return isSpecificOption;
+    }
+
+    @Override
+    protected String getPreferencePageID() {
+        return RDS_PREFERENCE_PAGE_ID;
+    }
+
+    @Override
+    protected String getPropertyPageID() {
+        return RDS_PROPERTIES_PAGE_ID;
+    }
+    
+    @Override
+    public void performApply() {
+        if ( isProjectPreferencePage() ) {
+            IProject project = getProject();
+            try {
+                if ( useProjectSettings() ) {
+                    project.setPersistentProperty(RDS_PROPERTIES_SPECIFIC_OPTION_NAME, OPTION_ENABLE);
+                }
+                else {
+                    project.setPersistentProperty(RDS_PROPERTIES_SPECIFIC_OPTION_NAME, OPTION_DISABLE);
+                }
+                if ( btnRdsCheck.getSelection() ) {
+                    project.setPersistentProperty(RDS_PROPERTIES_RDS_OPTION_NAME, OPTION_ENABLE);
+                }
+                else {
+                    project.setPersistentProperty(RDS_PROPERTIES_RDS_OPTION_NAME, OPTION_DISABLE);
+                }
+            } catch (CoreException e) {
+                Logger.error(Messages.RDS_OPTION_SAVE_FAIL, e);
+            }
+        }
+        else {
+            prefStore.setValue(RDS_OPTION_ID, btnRdsCheck.getSelection());
+        }
+    }
+    
+    public boolean getRdsOption() {
+        boolean isRdsOption = false;
+        IProject project = getProject();
+        if ( isProjectPreferencePage() ) {
+            String rdsOption = null;
+            try {
+                rdsOption = project.getPersistentProperty(RDS_PROPERTIES_RDS_OPTION_NAME);
+            } catch (CoreException e) {
+                isRdsOption = false;
+            }
+
+            if ( OPTION_ENABLE.equals(rdsOption) ) {
+                isRdsOption = true;
+            }
+            else {
+                isRdsOption = false;
+            }
+        }
+        else {
+            isRdsOption = prefStore.getBoolean(RDS_OPTION_ID);
+        }
+        
+        return isRdsOption;
+    }
+
+    @Override
+    public void performDefaults() {
+        btnRdsCheck.setSelection(prefStore.getDefaultBoolean(RDS_OPTION_ID));
+        super.performDefaults();
+    }
+
+    @Override
+    public boolean performOk() {
+        performApply();
+        return super.performOk();
+    }
+
+    public static boolean isRdsMode( IProject project ) {
+        String projectSpecificOption = "";
+        String rdsOption = OPTION_DISABLE;
+
+        // TODO: ad-hoc code. If the project referencing other projects, RDS is disabled.
+        try {
+            IProject[] refPrjs = project.getReferencedProjects();
+            if (refPrjs.length != 0 ) {
+                return false;
+            }
+        } catch (CoreException e) {
+            Logger.error("Failed to read the referenced project list.", e);
+        }
+
+        
+        try {
+            projectSpecificOption = project.getPersistentProperty(RDS_PROPERTIES_SPECIFIC_OPTION_NAME);
+        } catch (CoreException e) {
+            Logger.error("Failed to read project specific option.", e);
+        }
+        if ( OPTION_ENABLE.equals(projectSpecificOption)) {
+            try {
+                rdsOption = project.getPersistentProperty(RDS_PROPERTIES_RDS_OPTION_NAME);
+            } catch (CoreException e) {
+                Logger.error("Failed to read RDS option.", e);
+            }
+            
+            return OPTION_ENABLE.equals(rdsOption);
+        }
+        else {
+            IPreferenceStore prefStore = CommonPlugin.getDefault().getPreferenceStore();
+            return prefStore.getBoolean(RDS_OPTION_ID);
+        }
+    }
+
+    // TODO : refactoring this method, this method is temporary, hybrid-app RDS support in webapp
+    public static boolean isWebRdsMode( IProject project ) {
+        String projectSpecificOption = "";
+        String rdsOption = OPTION_DISABLE;
+
+        try {
+            projectSpecificOption = project.getPersistentProperty(RDS_PROPERTIES_SPECIFIC_OPTION_NAME);
+        } catch (CoreException e) {
+            Logger.error("Failed to read project specific option.", e);
+        }
+        if ( OPTION_ENABLE.equals(projectSpecificOption)) {
+            try {
+                rdsOption = project.getPersistentProperty(RDS_PROPERTIES_RDS_OPTION_NAME);
+            } catch (CoreException e) {
+                Logger.error("Failed to read RDS option.", e);
+            }
+            
+            return OPTION_ENABLE.equals(rdsOption);
+        }
+        else {
+            IPreferenceStore prefStore = CommonPlugin.getDefault().getPreferenceStore();
+            return prefStore.getBoolean(RDS_OPTION_ID);
+        }
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/rds/ui/preference/SelectionButtonDialogField.java b/org.tizen.common/src/org/tizen/common/rds/ui/preference/SelectionButtonDialogField.java
new file mode 100644 (file)
index 0000000..dfb73d4
--- /dev/null
@@ -0,0 +1,215 @@
+
+/*******************************************************************************
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.tizen.common.rds.ui.preference;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.common.util.SWTUtil;
+
+/**
+ * Dialog Field containing a single button such as a radio or checkbox button.
+ */
+public class SelectionButtonDialogField extends DialogField {
+
+    private Button fButton;
+    private boolean fIsSelected;
+    private DialogField[] fAttachedDialogFields;
+    private int fButtonStyle;
+
+    /**
+     * Creates a selection button.
+     * Allowed button styles: SWT.RADIO, SWT.CHECK, SWT.TOGGLE, SWT.PUSH
+     */
+    public SelectionButtonDialogField(int buttonStyle) {
+        super();
+        fIsSelected= false;
+        fAttachedDialogFields= null;
+        fButtonStyle= buttonStyle;
+    }
+
+    /**
+     * Attaches a field to the selection state of the selection button.
+     * The attached field will be disabled if the selection button is not selected.
+     */
+    public void attachDialogField(DialogField dialogField) {
+        attachDialogFields(new DialogField[] { dialogField });
+    }
+
+    /**
+     * Attaches fields to the selection state of the selection button.
+     * The attached fields will be disabled if the selection button is not selected.
+     */
+    public void attachDialogFields(DialogField[] dialogFields) {
+        fAttachedDialogFields= dialogFields;
+        for (int i= 0; i < dialogFields.length; i++) {
+            dialogFields[i].setEnabled(fIsSelected);
+        }
+    }
+
+    /**
+     * Returns <code>true</code> is  teh gived field is attached to the selection button.
+     */
+    public boolean isAttached(DialogField editor) {
+        if (fAttachedDialogFields != null) {
+            for (int i=0; i < fAttachedDialogFields.length; i++) {
+                if (fAttachedDialogFields[i] == editor) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+    // ------- layout helpers
+
+    /*
+     * @see DialogField#doFillIntoGrid
+     */
+    @Override
+    public Control[] doFillIntoGrid(Composite parent, int nColumns) {
+        assertEnoughColumns(nColumns);
+
+        Button button= getSelectionButton(parent);
+        GridData gd= new GridData();
+        gd.horizontalSpan= nColumns;
+        gd.horizontalAlignment= GridData.FILL;
+        if (fButtonStyle == SWT.PUSH) {
+            gd.widthHint = SWTUtil.getButtonWidthHint(button);
+        }
+
+        button.setLayoutData(gd);
+
+        return new Control[] { button };
+    }
+
+    /*
+     * @see DialogField#getNumberOfControls
+     */
+    @Override
+    public int getNumberOfControls() {
+        return 1;
+    }
+
+    // ------- ui creation
+
+    /**
+     * Returns the selection button widget. When called the first time, the widget will be created.
+     * @param group The parent composite when called the first time, or <code>null</code>
+     * after.
+     */
+    public Button getSelectionButton(Composite group) {
+        if (fButton == null) {
+            assertCompositeNotNull(group);
+
+            fButton= new Button(group, fButtonStyle);
+            fButton.setFont(group.getFont());
+            fButton.setText(fLabelText);
+            fButton.setEnabled(isEnabled());
+            fButton.setSelection(fIsSelected);
+            fButton.addSelectionListener(new SelectionListener() {
+                public void widgetDefaultSelected(SelectionEvent e) {
+                    doWidgetSelected(e);
+                }
+                public void widgetSelected(SelectionEvent e) {
+                    doWidgetSelected(e);
+                }
+            });
+        }
+        return fButton;
+    }
+
+    private void doWidgetSelected(SelectionEvent e) {
+        if (isOkToUse(fButton)) {
+            changeValue(fButton.getSelection());
+        }
+    }
+
+    private void changeValue(boolean newState) {
+        if (fIsSelected != newState) {
+            fIsSelected= newState;
+            if (fAttachedDialogFields != null) {
+                boolean focusSet= false;
+                for (int i= 0; i < fAttachedDialogFields.length; i++) {
+                    fAttachedDialogFields[i].setEnabled(fIsSelected);
+                    if (fIsSelected && !focusSet) {
+                        focusSet= fAttachedDialogFields[i].setFocus();
+                    }
+                }
+            }
+            dialogFieldChanged();
+        } else if (fButtonStyle == SWT.PUSH) {
+            dialogFieldChanged();
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField#setLabelText(java.lang.String)
+     */
+    @Override
+    public void setLabelText(String labeltext) {
+        fLabelText= labeltext;
+        if (isOkToUse(fButton)) {
+            fButton.setText(labeltext);
+        }
+    }
+
+
+    // ------ model access
+
+    /**
+     * Returns the selection state of the button.
+     */
+    public boolean isSelected() {
+        return fIsSelected;
+    }
+
+    /**
+     * Sets the selection state of the button.
+     */
+    public void setSelection(boolean selected) {
+        changeValue(selected);
+        if (isOkToUse(fButton)) {
+            fButton.setSelection(selected);
+        }
+    }
+
+    // ------ enable / disable management
+
+    /*
+     * @see DialogField#updateEnableState
+     */
+    @Override
+    protected void updateEnableState() {
+        super.updateEnableState();
+        if (isOkToUse(fButton)) {
+            fButton.setEnabled(isEnabled());
+        }
+    }
+
+    /*(non-Javadoc)
+     * @see org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField#refresh()
+     */
+    @Override
+    public void refresh() {
+        super.refresh();
+        if (isOkToUse(fButton)) {
+            fButton.setSelection(fIsSelected);
+        }
+    }
+
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/rds/ui/preference/StatusInfo.java b/org.tizen.common/src/org/tizen/common/rds/ui/preference/StatusInfo.java
new file mode 100644 (file)
index 0000000..46696bf
--- /dev/null
@@ -0,0 +1,199 @@
+
+/*******************************************************************************
+ * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.tizen.common.rds.ui.preference;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IStatus;
+import org.tizen.common.CommonPlugin;
+
+
+/**
+ * A settable IStatus.
+ * Can be an error, warning, info or ok. For error, info and warning states,
+ * a message describes the problem.
+ */
+public class StatusInfo implements IStatus {
+
+    public static final IStatus OK_STATUS= new StatusInfo();
+
+    private String fStatusMessage;
+    private int fSeverity;
+
+    /**
+     * Creates a status set to OK (no message)
+     */
+    public StatusInfo() {
+        this(OK, null);
+    }
+
+    /**
+     * Creates a status .
+     * @param severity The status severity: ERROR, WARNING, INFO and OK.
+     * @param message The message of the status. Applies only for ERROR,
+     * WARNING and INFO.
+     */
+    public StatusInfo(int severity, String message) {
+        fStatusMessage= message;
+        fSeverity= severity;
+    }
+
+    /**
+     *  Returns if the status' severity is OK.
+     */
+    public boolean isOK() {
+        return fSeverity == IStatus.OK;
+    }
+
+    /**
+     *  Returns if the status' severity is WARNING.
+     */
+    public boolean isWarning() {
+        return fSeverity == IStatus.WARNING;
+    }
+
+    /**
+     *  Returns if the status' severity is INFO.
+     */
+    public boolean isInfo() {
+        return fSeverity == IStatus.INFO;
+    }
+
+    /**
+     *  Returns if the status' severity is ERROR.
+     */
+    public boolean isError() {
+        return fSeverity == IStatus.ERROR;
+    }
+
+    /**
+     * @see IStatus#getMessage
+     */
+    public String getMessage() {
+        return fStatusMessage;
+    }
+
+    /**
+     * Sets the status to ERROR.
+     * @param errorMessage The error message (can be empty, but not null)
+     */
+    public void setError(String errorMessage) {
+        Assert.isNotNull(errorMessage);
+        fStatusMessage= errorMessage;
+        fSeverity= IStatus.ERROR;
+    }
+
+    /**
+     * Sets the status to WARNING.
+     * @param warningMessage The warning message (can be empty, but not null)
+     */
+    public void setWarning(String warningMessage) {
+        Assert.isNotNull(warningMessage);
+        fStatusMessage= warningMessage;
+        fSeverity= IStatus.WARNING;
+    }
+
+    /**
+     * Sets the status to INFO.
+     * @param infoMessage The info message (can be empty, but not null)
+     */
+    public void setInfo(String infoMessage) {
+        Assert.isNotNull(infoMessage);
+        fStatusMessage= infoMessage;
+        fSeverity= IStatus.INFO;
+    }
+
+    /**
+     * Sets the status to OK.
+     */
+    public void setOK() {
+        fStatusMessage= null;
+        fSeverity= IStatus.OK;
+    }
+
+    /*
+     * @see IStatus#matches(int)
+     */
+    public boolean matches(int severityMask) {
+        return (fSeverity & severityMask) != 0;
+    }
+
+    /**
+     * Returns always <code>false</code>.
+     * @see IStatus#isMultiStatus()
+     */
+    public boolean isMultiStatus() {
+        return false;
+    }
+
+    /*
+     * @see IStatus#getSeverity()
+     */
+    public int getSeverity() {
+        return fSeverity;
+    }
+
+    /*
+     * @see IStatus#getPlugin()
+     */
+    public String getPlugin() {
+        return CommonPlugin.PLUGIN_ID;
+    }
+
+    /**
+     * Returns always <code>null</code>.
+     * @see IStatus#getException()
+     */
+    public Throwable getException() {
+        return null;
+    }
+
+    /**
+     * Returns always the error severity.
+     * @see IStatus#getCode()
+     */
+    public int getCode() {
+        return fSeverity;
+    }
+
+    /**
+     * Returns always an empty array.
+     * @see IStatus#getChildren()
+     */
+    public IStatus[] getChildren() {
+        return new IStatus[0];
+    }
+
+    /**
+     * Returns a string representation of the status, suitable
+     * for debugging purposes only.
+     */
+    @Override
+    public String toString() {
+        StringBuffer buf = new StringBuffer();
+        buf.append("StatusInfo "); //$NON-NLS-1$
+        if (fSeverity == OK) {
+            buf.append("OK"); //$NON-NLS-1$
+        } else if (fSeverity == ERROR) {
+            buf.append("ERROR"); //$NON-NLS-1$
+        } else if (fSeverity == WARNING) {
+            buf.append("WARNING"); //$NON-NLS-1$
+        } else if (fSeverity == INFO) {
+            buf.append("INFO"); //$NON-NLS-1$
+        } else {
+            buf.append("severity="); //$NON-NLS-1$
+            buf.append(fSeverity);
+        }
+        buf.append(": "); //$NON-NLS-1$
+        buf.append(fStatusMessage);
+        return buf.toString();
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/rds/ui/preference/StatusUtil.java b/org.tizen.common/src/org/tizen/common/rds/ui/preference/StatusUtil.java
new file mode 100644 (file)
index 0000000..fd25e07
--- /dev/null
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.tizen.common.rds.ui.preference;
+
+import org.eclipse.core.runtime.IStatus;
+
+import org.eclipse.jface.dialogs.DialogPage;
+import org.eclipse.jface.dialogs.IMessageProvider;
+
+/**
+ * A utility class to work with IStatus.
+ */
+public class StatusUtil {
+
+    /**
+     * Compares two instances of <code>IStatus</code>. The more severe is returned:
+     * An error is more severe than a warning, and a warning is more severe
+     * than ok. If the two stati have the same severity, the second is returned.
+     * @param s1 first status
+     * @param s2 second status
+     * @return the more severe status
+     */
+    public static IStatus getMoreSevere(IStatus s1, IStatus s2) {
+        if (s1.getSeverity() > s2.getSeverity()) {
+            return s1;
+        } else {
+            return s2;
+        }
+    }
+
+    /**
+     * Finds the most severe status from a array of stati.
+     * An error is more severe than a warning, and a warning is more severe
+     * than ok.
+     * @param status an array of stati
+     * @return the most severe status
+     */
+    public static IStatus getMostSevere(IStatus[] status) {
+        IStatus max= null;
+        for (int i= 0; i < status.length; i++) {
+            IStatus curr= status[i];
+            if (curr.matches(IStatus.ERROR)) {
+                return curr;
+            }
+            if (max == null || curr.getSeverity() > max.getSeverity()) {
+                max= curr;
+            }
+        }
+        return max;
+    }
+
+    /**
+     * Applies the status to the status line of a dialog page.
+     * @param page the dialog page
+     * @param status the status to apply
+     */
+    public static void applyToStatusLine(DialogPage page, IStatus status) {
+        String message= status.getMessage();
+        if (message != null && message.length() == 0) {
+            message= null;
+        }
+        switch (status.getSeverity()) {
+            case IStatus.OK:
+                page.setMessage(message, IMessageProvider.NONE);
+                page.setErrorMessage(null);
+                break;
+            case IStatus.WARNING:
+                page.setMessage(message, IMessageProvider.WARNING);
+                page.setErrorMessage(null);
+                break;
+            case IStatus.INFO:
+                page.setMessage(message, IMessageProvider.INFORMATION);
+                page.setErrorMessage(null);
+                break;
+            default:
+                page.setMessage(null);
+                page.setErrorMessage(message);
+                break;
+        }
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/CommonColor.java b/org.tizen.common/src/org/tizen/common/ui/CommonColor.java
new file mode 100644 (file)
index 0000000..702d377
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Web IDE - launch
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Gyeongseok Seo <gyeongseok.seo@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ */
+
+package org.tizen.common.ui;
+
+import org.eclipse.swt.graphics.Color;
+import org.tizen.common.util.cache.ColorCache;
+
+/**
+ *  Predefined Common SWT Color
+ * 
+ * @author Gyeongseok Seo <gyeongseok.seo@samsung.com>
+ *
+ */
+public class CommonColor {
+       public static final Color BLACK = ColorCache.getBlack();
+       public static final Color RED = ColorCache.getColor( 255, 0, 0 );
+       public static final Color ORANGE_RED = ColorCache.getColor( 255, 69, 0 );
+       public static final Color ROYAL_BLUE = ColorCache.getColor( 65, 105, 225 );
+       public static final Color YELLOW = ColorCache.getColor( 255, 255, 0 );
+       public static final Color LIGHT_YELLOW = ColorCache.getColor( 255, 255, 224 );
+       public static final Color YELLOW_GREEN = ColorCache.getColor( 153, 204, 50 );
+       public static final Color DARK_GOLDENROD = ColorCache.getColor( 184, 134, 11 );
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/TableToolTipListener.java b/org.tizen.common/src/org/tizen/common/ui/TableToolTipListener.java
new file mode 100644 (file)
index 0000000..e49672a
--- /dev/null
@@ -0,0 +1,133 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Ho Namkoong <ho.namkoong@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.ui;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableItem;
+import org.tizen.common.util.SWTUtil;
+
+/**
+ * TableToolTipListener
+ * 
+ * Add tool tip to the table
+ * 
+ * @author Ho Namkoong{@literal <ho.namkoong@samsung.com>} (S-Core)
+ */
+public abstract class TableToolTipListener implements Listener{
+
+    private Shell tip = null;
+    private Label label = null;
+    private Table table = null;
+
+    /**
+     * Gets tooltip text from tableitem.
+     * 
+     * @param item table item from which tooltip text is extracted.
+     * @return tooltip text
+     */
+    protected abstract String getLabelText(TableItem item);
+    
+    /**
+     * Constructor with target table
+     * 
+     * @param table will be added listener.
+     */
+    
+    public void setTable(Table table) {
+        this.table = table;
+    }
+    
+    @Override
+    public void handleEvent(Event event) {
+        int eventType = event.type;
+        
+        if(SWT.MouseMove == eventType || SWT.MouseWheel == eventType || SWT.Dispose == eventType) {
+            if(tip != null) {
+                tip.dispose();
+                tip = null;
+                label = null;
+                return;
+            }
+        }
+        if(SWT.MouseHover == eventType) {
+            TableItem item = this.table.getItem(new Point(event.x, event.y));
+            if(item != null) {
+                if(tip != null && !tip.isDisposed()) {
+                    tip.dispose();
+                }
+                tip = new Shell(SWTUtil.getActiveShell(), SWT.ON_TOP | SWT.TOOL);
+                tip.setLayout(new FillLayout());
+                
+                label = new Label(tip, SWT.None);
+                label.setText(this.getLabelText(item));
+                label.setData(item);
+                
+                label.addListener(SWT.MouseExit, labelListener);
+                label.addListener(SWT.MouseDown, labelListener);
+                label.addListener(SWT.MouseWheel, labelListener);
+                
+                Point size = tip.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+                Rectangle rect = item.getBounds(0);
+                Point pt = this.table.toDisplay(rect.x, rect.y);
+                tip.setBounds(pt.x, pt.y, size.x, size.y);
+                tip.setVisible(true);
+            }
+        }
+    }
+    
+    final private Listener labelListener = new Listener() {
+        
+        @Override
+        public void handleEvent(Event event) {
+            Label label = (Label)event.widget;
+            Shell shell = label.getShell();
+            
+            int eventType = event.type;
+            if(SWT.MouseDown == eventType) {
+                if(table != null) {
+                    Event e = new Event();
+                    e.item = (TableItem) label.getData();
+                    
+                    table.setSelection((TableItem)e.item);
+                    table.notifyListeners(SWT.Selection, e);
+                }
+                return;
+            }
+            if(SWT.MouseExit == eventType || SWT.MouseWheel == eventType) {
+                shell.dispose();
+                return;
+            }
+        }
+    };
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/dialog/ClosableTray.java b/org.tizen.common/src/org/tizen/common/ui/dialog/ClosableTray.java
new file mode 100644 (file)
index 0000000..34d96d0
--- /dev/null
@@ -0,0 +1,173 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.ui.dialog;
+
+import org.eclipse.jface.action.ContributionItem;
+import org.eclipse.jface.action.ToolBarManager;
+import org.eclipse.jface.dialogs.DialogTray;
+import org.eclipse.jface.dialogs.TrayDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.PaletteData;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.tizen.common.util.SWTUtil;
+
+
+/**
+ * a extended DialogTray class that user can be closing
+ * 
+ * @author Jihoon Song {@literal <jihoon80.song@samsung.com>} (S-Core)
+ */
+public abstract class ClosableTray extends DialogTray {
+       private Image closeNormal;
+       private Image closeHover;
+       private Shell shell;
+
+       private void createImages() {
+               Display display = SWTUtil.getDisplay();
+               int[] shape = new int[] {
+                               3, 3, 5, 3, 7, 5, 8, 5, 10, 3, 12, 3, 12, 5, 10, 7, 10, 8, 12, 10,
+                               12, 12, 10, 12, 8, 10, 7, 10, 5, 12, 3, 12, 3, 10, 5, 8, 5, 7, 3, 5
+               };
+
+               // create image data
+               Color border = display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW);
+               Color background = display.getSystemColor(SWT.COLOR_LIST_BACKGROUND);
+               Color backgroundHot = new Color(display, new RGB(252, 160, 160));
+               Color transparent = display.getSystemColor(SWT.COLOR_MAGENTA);
+
+               PaletteData palette = new PaletteData(new RGB[] {
+                               transparent.getRGB(), border.getRGB(), background.getRGB(), backgroundHot.getRGB()
+               });
+               ImageData data = new ImageData(16, 16, 8, palette);
+               data.transparentPixel = 0;
+
+               // create close image
+               closeNormal = new Image(display, data);
+               closeNormal.setBackground(transparent);
+               GC gc = new GC(closeNormal);
+               gc.setBackground(background);
+               gc.fillPolygon(shape);
+               gc.setForeground(border);
+               gc.drawPolygon(shape);
+               gc.dispose();
+
+               // create hovered close image
+               closeHover = new Image(display, data);
+               closeHover.setBackground(transparent);
+               gc = new GC(closeHover);
+               gc.setBackground(backgroundHot);
+               gc.fillPolygon(shape);
+               gc.setForeground(border);
+               gc.drawPolygon(shape);
+               gc.dispose();
+
+               backgroundHot.dispose();
+       }
+
+       @Override
+       protected Control createContents(Composite parent) {
+               shell = parent.getShell();
+
+               // appearence composite
+               Composite container = new Composite(parent, SWT.NONE);
+               GridLayout layout = new GridLayout();
+               layout.marginWidth = layout.marginHeight = 0;
+               layout.verticalSpacing = 0;
+               container.setLayout(layout);
+               container.addListener(SWT.Dispose, new Listener() {
+                       @Override
+                       public void handleEvent(Event event) {
+                               dispose();
+                       }
+               });
+
+               // top toolbar composite
+               ToolBarManager tbm = new ToolBarManager(SWT.FLAT);
+               tbm.createControl(container);
+               GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
+               gd.grabExcessHorizontalSpace = true;
+               tbm.getControl().setLayoutData(gd);
+
+               // horizontal separator
+               Label separator = new Label(container, SWT.SEPARATOR | SWT.HORIZONTAL);
+               gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
+               gd.heightHint = 1;
+               separator.setLayoutData(gd);
+
+               // create external composite
+               createExternalControl(container);
+
+               // create close button image
+               createImages();
+
+               // add close button
+               tbm.add(new ContributionItem() {
+                       @Override
+                       public void fill(ToolBar parent, int index) {
+                               final ToolItem item = new ToolItem(parent, SWT.PUSH);
+                               item.setImage(closeNormal);
+                               item.setHotImage(closeHover);
+                               item.addListener(SWT.Selection, new Listener() {
+                                       @Override
+                                       public void handleEvent(Event event) {
+                                               TrayDialog dialog = (TrayDialog) shell.getData();
+                                               dialog.closeTray();
+                                               shell.setFocus();
+                                       }
+                               });
+                       }
+               });
+               tbm.update(true);
+
+               return container;
+       }
+
+       public abstract void createExternalControl(Composite parent);
+
+       protected void dispose() {
+               if (closeNormal != null) {
+                       closeNormal.dispose();
+               }
+               if (closeHover != null) {
+                       closeHover.dispose();
+               }
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/dialog/DynamicDialog.java b/org.tizen.common/src/org/tizen/common/ui/dialog/DynamicDialog.java
new file mode 100644 (file)
index 0000000..87af2d0
--- /dev/null
@@ -0,0 +1,656 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Jihoon Song <jihoon80.song@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.ui.dialog;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Layout;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.command.InputValidator;
+import org.tizen.common.core.command.PrompterConstants;
+import org.tizen.common.core.command.UserField;
+import org.tizen.common.util.Assert;
+import org.tizen.common.util.CollectionUtil;
+import org.tizen.common.util.SWTUtil;
+import org.tizen.common.util.StringUtil;
+
+
+/**
+ * Dialog for creating control dynamically using UserField models.
+ * Types of "String, char[], boolean" are currently supported.
+ * 
+ * @author JIhoon Song {@literal<jihoon80.song@samsung.com>}
+ */
+public class DynamicDialog extends Dialog {
+
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );
+    
+    protected String title = "Dynamic Dialog"; // default. If you want to change, use setter.
+    protected int width = 500; // default. This is fixed currently. 
+    
+    protected Text errorMessageText;
+    protected String errorMessage; 
+    
+    // inputted fields
+    protected Collection<UserField> fields;
+    
+    // ID based controls for searching
+    protected Map<String, Control> controlMap = new HashMap<String, Control>();
+    
+    
+    /////////////////////////////////////////////////////////////////
+    // Constructor
+    
+    /**
+     * Default constructor for dynamic generation
+     * @param parent parent shell
+     * @param userFields {@link UserField}
+     */
+    public DynamicDialog(Shell parent, Collection<UserField> fields) {
+        super( parent );
+        Assert.notNull( fields );
+        
+        this.fields = fields;
+    }
+    
+    public DynamicDialog(IShellProvider parentShell, Collection<UserField> fields) {
+        super( parentShell );
+        Assert.notNull( fields );
+        
+        this.fields = fields;
+    }
+    
+    /**
+     * Constructor for dynamic generation using current active shell
+     * @param userFields {@link UserField}
+     */
+    public DynamicDialog(Collection<UserField> fields) {
+        this( SWTUtil.getActiveShell(), fields );
+    }
+    
+    
+    /////////////////////////////////////////////////////////////////
+    // Dialog logic
+    
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    @Override
+    protected void configureShell(Shell newShell) {
+        super.configureShell(newShell);
+        
+        newShell.setText( getTitle() );
+    }
+
+    @Override
+    protected int getShellStyle() {
+        return super.getShellStyle() | SWT.APPLICATION_MODAL;
+    }
+
+    @Override
+    protected Point getInitialSize() {
+        Point initialSize = super.getInitialSize();
+        
+        initialSize.x = this.width;
+        
+        return initialSize;
+    }
+
+    protected void setErrorMessage(String errorMessage) {
+        this.errorMessage = errorMessage;
+        
+        if ( this.errorMessageText != null && !this.errorMessageText.isDisposed()) {
+            this.errorMessageText.setText( StringUtil.nvl( errorMessage ) ); //$NON-NLS-1$
+            
+            boolean hasError = StringUtil.hasLength( errorMessage );
+            this.errorMessageText.setEnabled( hasError );
+            this.errorMessageText.setVisible( hasError );
+            this.errorMessageText.getParent().update();
+            
+            Control button = getButton( IDialogConstants.OK_ID );
+            if (button != null) {
+                button.setEnabled( !hasError );
+            }
+        }
+    }
+    
+    protected Text createErrorMessageText(Composite parent) {
+        errorMessageText = new Text( parent, SWT.READ_ONLY | SWT.WRAP );
+        errorMessageText.setLayoutData( new GridData( GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL ) );
+        errorMessageText.setBackground( errorMessageText.getDisplay().getSystemColor( SWT.COLOR_WIDGET_BACKGROUND ) );
+        
+        setErrorMessage(errorMessage);
+        
+        return errorMessageText;
+    }
+    
+    private String validateInput(UserField userField) {
+        // validate this
+        InputValidator validator = userField.getValidator();
+        if ( validator != null ) {
+            Control control = this.controlMap.get( userField.getId() );
+            if ( control instanceof Text && control.isEnabled()) {
+                String text = ((Text) control).getText();
+                String errorMsg = validator.check( text );
+                if ( StringUtil.hasText( errorMsg ) ) {
+                    return errorMsg;
+                }
+            }
+        }
+        
+        // validate childs
+        Collection<UserField> children = userField.getChildren();
+        if ( children != null ) {
+            for ( UserField child : children ) {
+                String errorMsg = validateInput( child );
+                if ( StringUtil.hasText( errorMsg ) ) {
+                    return errorMsg;
+                }
+            }
+        }
+        
+        return StringUtil.EMPTY_STRING;
+    }
+    
+    protected void validateInput() {
+        String errorMessage = null;
+        
+        // validate
+        for ( UserField userField : this.fields ) {
+            errorMessage = validateInput( userField );
+            if ( StringUtil.hasText( errorMessage ) ) {
+                break;
+            }
+        }
+        
+        setErrorMessage( errorMessage );
+    }
+    
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite)
+     */
+    @Override
+    protected Control createContents(Composite parent) {
+        // create super dialog control
+        Composite superContents = (Composite) super.createContents( parent );
+        
+        Composite dialogArea = (Composite) this.getDialogArea();
+        
+        this.createErrorMessageText( dialogArea );
+        
+        boolean firstControl = true;
+        for ( UserField field : this.fields ) {
+            // create dynamic dialog control
+            Control control = createDynamicControl( dialogArea, field );
+            
+            // set focus to first control
+            if ( firstControl && control != null ) {
+                firstControl = false;
+                control.setFocus();
+                if ( control instanceof Text ) {
+                    ((Text) control).selectAll();
+                }
+            }
+            
+            // initialize child's status
+            if ( control instanceof Button ) {
+                enableChildControls( field.getId(), getBoolean( field.getValue() ) );
+            }
+        }
+        
+        return superContents;
+    }
+    
+    /**
+     * Dynamically create control with field information
+     * @param parent control
+     * @return created control
+     */
+    protected Control createDynamicControl(Composite parent, final UserField field) {
+        Control control = null;
+        
+        // filtering unsupported field
+        if ( !isSupportField( field ) ) {
+            return null;
+        }
+        
+        // create control
+        Class<?> type = field.getType();
+        if ( String.class.equals( type ) ) {
+            control = createStringTypeControl( parent, field );
+        } else if ( char[].class.equals( type ) || Character[].class.equals( type ) ) {
+            control = createCharacterTypeControl( parent, field );
+        } else if ( boolean.class.equals( type ) || Boolean.class.equals( type ) ) {
+            control = createBooleanTypeControl( parent, field );
+        } else {
+            throw new IllegalArgumentException( "Unsupported user field type." );
+        }
+        
+        // create child controls
+        Collection<UserField> children = field.getChildren();
+        if ( children != null ) {
+            Composite composite = createComposite( parent, new GridLayout(), new GridData( GridData.FILL_BOTH ) );
+            
+            for ( UserField childField : children ) {
+                createDynamicControl( composite, childField );
+            }
+        }
+        
+        // return created control
+        return control;
+    }
+    
+    /**
+     * If support list is nothing or the "eclipse" exist, allow control creation.
+     * @param field {@link UserField} with support list
+     * @return If can support, return true. otherwise, return false
+     */
+    protected boolean isSupportField(final UserField field) {
+        Collection<Object> supports = field.getSupports();
+        if ( null != supports && !supports.contains( PrompterConstants.SUPPORT_IDE ) ) {
+            logger.warn( "{} is not supported in {}", field, this );
+            return false;
+        }
+        
+        return true;
+    }
+    
+    
+    /////////////////////////////////////////////////////////////////
+    // style getter
+    
+    /**
+     * If you want, override this.
+     * @return Composite's default style
+     */
+    public int getCompositeStyle() {
+        return SWT.NONE;
+    }
+    
+    /**
+     * If you want, override this.
+     * @return Text's default style
+     */
+    public int getTextStyle() {
+        return SWT.SINGLE | SWT.BORDER;
+    }
+    
+    
+    /**
+     * If you want, override this.
+     * @return Text's default style for password
+     */
+    public int getPasswordTextStyle() {
+        return getTextStyle() | SWT.PASSWORD;
+    }
+    
+    
+    /**
+     * If you want, override this.
+     * @return Label's default style
+     */
+    public int getLabelStyle() {
+        return SWT.WRAP;
+    }
+    
+    
+    /**
+     * If you want, override this.
+     * @return Button's default style for Check
+     */
+    public int getCheckButtonStyle() {
+        return SWT.CHECK | SWT.CENTER;
+    }
+    
+    
+    /////////////////////////////////////////////////////////////////
+    // create controls for type
+    
+    protected Text createStringTypeControl(Composite parent, final UserField field) {
+        Composite composite = createComposite( parent, new GridLayout( 2, false ), new GridData( GridData.FILL_BOTH ) );
+        
+        createLabel( composite, new GridData( GridData.HORIZONTAL_ALIGN_END ), field.getMessage(), field.canModify() );
+        final Text text = createText( composite, new GridData( GridData.FILL_BOTH ), field.getValue(), field.canModify(), field.getValidator() );
+        final ModifyListener modifyListener = new ModifyListener() {
+            @Override
+            public void modifyText(ModifyEvent e) {
+                Text modifiedText = ((Text) e.widget);
+                field.setValue( modifiedText.getText() ); // synchronize model
+            }
+        };
+        text.addModifyListener( modifyListener );
+        text.addDisposeListener( new DisposeListener() {
+            @Override
+            public void widgetDisposed(DisposeEvent e) {
+                text.removeModifyListener( modifyListener );
+                text.removeDisposeListener( this );
+            }
+        } );
+        
+        this.controlMap.put( field.getId(), text );
+        
+        return text;
+    }
+    
+    protected Text createCharacterTypeControl(Composite parent, final UserField field) {
+        Composite composite = createComposite( parent, new GridLayout( 2, false ), new GridData( GridData.FILL_BOTH ) );
+        
+        createLabel( composite, new GridData( GridData.HORIZONTAL_ALIGN_END ), field.getMessage(), field.canModify() );
+        final Text text = createPasswordText( composite, new GridData( GridData.FILL_BOTH ), field.getValue(), field.canModify(), field.getValidator() );
+        
+        final ModifyListener modifyListener = new ModifyListener() {
+            @Override
+            public void modifyText(ModifyEvent e) {
+                Text modifiedText = ((Text) e.widget);
+                field.setValue( modifiedText.getText().toCharArray() ); // synchronize model
+            }
+        };
+        text.addModifyListener( modifyListener );
+        text.addDisposeListener( new DisposeListener() {
+            @Override
+            public void widgetDisposed(DisposeEvent e) {
+                text.removeModifyListener( modifyListener );
+                text.removeDisposeListener( this );
+            }
+        } );
+        
+        this.controlMap.put( field.getId(), text );
+        
+        return text;
+    }
+    
+    protected Button createBooleanTypeControl(Composite parent, final UserField field) {
+        final Button button = createCheckButton( parent, new GridData( GridData.CENTER ), field.getId(), field.getMessage(), field.getValue(), field.canModify() );
+        final SelectionAdapter selectionAdapter = new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                Button modifiedButton = ((Button) e.widget);
+                field.setValue( modifiedButton.getSelection() ); // synchronize model
+            }
+        };
+        button.addSelectionListener( selectionAdapter );
+        button.addDisposeListener( new DisposeListener() {
+            @Override
+            public void widgetDisposed(DisposeEvent e) {
+                button.removeSelectionListener( selectionAdapter );
+                button.removeDisposeListener( this );
+            }
+        } );
+        
+        this.controlMap.put( field.getId(), button );
+        
+        return button;
+    }
+    
+    
+    /////////////////////////////////////////////////////////////////
+    // control creation utility
+    
+    private Composite createComposite(Composite parent, Layout layout, Object layoutData) {
+        Composite composite = new Composite( parent, getCompositeStyle() ) {
+            @Override
+            public void setEnabled(boolean enabled) {
+                super.setEnabled(enabled);
+                
+                for ( Control children : getChildren() ) {
+                    if ( controlMap.containsValue( children ) ) {
+                        String controlId = getKeyByValue( controlMap, children );
+                        UserField userField = getModel( fields, controlId );
+                        
+                        if ( !userField.canModify() ) {
+                            continue;
+                        }
+                    }
+                    children.setEnabled( enabled );
+                }
+            }
+        };
+        composite.setLayout( layout );
+        composite.setLayoutData( layoutData );
+        
+        return composite;
+    }
+    
+    private Label createLabel(Composite parent, Object layoutData, String msg, boolean enabled) {
+        Label label = new Label( parent, getLabelStyle() );
+        label.setLayoutData( layoutData );
+        label.setText( msg );
+        label.setEnabled( enabled );
+        
+        return label;
+    }
+    
+    private Text createText(Composite parent, Object layoutData, Object defaultText, boolean enabled, final InputValidator validator) {
+        final Text text = new Text( parent, getTextStyle() );
+        text.setLayoutData( layoutData );
+        
+        final ModifyListener textModifyListener = new ModifyListener() {
+            @Override
+            public void modifyText(ModifyEvent e) {
+                validateInput();
+            }
+        };
+        text.addModifyListener( textModifyListener );
+        text.addDisposeListener( new DisposeListener() {
+            @Override
+            public void widgetDisposed(DisposeEvent e) {
+                text.removeModifyListener( textModifyListener );
+                text.removeDisposeListener( this );
+            }
+        } );
+        
+        if ( defaultText instanceof String ) {
+            text.setText( (String) defaultText );
+        } else {
+            text.setText( StringUtil.EMPTY_STRING );
+        }
+        text.setEnabled( enabled );
+        
+        return text;
+    }
+    
+    private Text createPasswordText(Composite parent, Object layoutData, Object defaultText, boolean enabled, final InputValidator validator) {
+        final Text text = new Text( parent, getPasswordTextStyle() );
+        text.setLayoutData( layoutData );
+        
+        final ModifyListener textModifyListener = new ModifyListener() {
+            @Override
+            public void modifyText(ModifyEvent e) {
+                validateInput();
+            }
+        };
+        text.addModifyListener( textModifyListener );
+        text.addDisposeListener( new DisposeListener() {
+            @Override
+            public void widgetDisposed(DisposeEvent e) {
+                text.removeModifyListener( textModifyListener );
+                text.removeDisposeListener( this );
+            }
+        } );
+        
+        if ( defaultText instanceof char[] ) {
+            text.setText( new String( (char[]) defaultText ) );
+        } else if ( defaultText instanceof Character[] ) {
+            text.setText( ((Character[]) defaultText).toString() );
+        } else {
+            text.setText( StringUtil.EMPTY_STRING );
+        }
+        
+        text.setEnabled( enabled );
+        
+        return text;
+    }
+    
+    private Button createCheckButton(Composite parent, Object layoutData, final String id, String msg, Object value, boolean enabled) {
+        final Button button = new Button( parent, getCheckButtonStyle() );
+        button.setLayoutData( layoutData );
+        
+        final SelectionAdapter selectionAdapter = new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                enableChildControls( id, ((Button) e.widget).getSelection() );
+            }
+        };
+        button.addSelectionListener( selectionAdapter );
+        button.addDisposeListener( new DisposeListener() {
+            @Override
+            public void widgetDisposed(DisposeEvent e) {
+                button.removeSelectionListener( selectionAdapter );
+                button.removeDisposeListener( this );
+            }
+        } );
+        
+        button.setText( msg );
+        button.setEnabled( enabled );
+        
+        button.setSelection( getBoolean( value ) );
+        
+        return button;
+    }
+    
+    
+    /////////////////////////////////////////////////////////////////
+    // model utility
+    
+    /**
+     * Get key by value in the map
+     * @param map
+     * @param value
+     * @return
+     */
+    private <T, E> T getKeyByValue(Map<T, E> map, E value) {
+        Assert.notNull( map );
+        Assert.notNull( value );
+        
+        for ( Entry<T, E> entry : map.entrySet() ) {
+            if ( value.equals( entry.getValue() ) ) {
+                return entry.getKey();
+            }
+        }
+        
+        return null;
+    }
+    
+    /**
+     * Get boolean by object value
+     * @param obj
+     * @return If obj is null, return true. if obj is not boolean type, return false. otherwise, return parsed boolean value.
+     */
+    private boolean getBoolean(Object obj) {
+        return ( obj == null ) ? true : Boolean.parseBoolean( String.valueOf( obj ) );
+    }
+    
+    private void enableChildControls(final String id, boolean enabled) {
+        Collection<UserField> childIds = null;
+        for ( UserField field : this.fields ) {
+            childIds = getChildModelById( field, id );
+            if ( !CollectionUtil.isEmpty( childIds ) ) {
+                break;
+            }
+        }
+        
+        if ( !CollectionUtil.isEmpty( childIds ) ) {
+            for ( UserField childId : childIds ) {
+                if ( !childId.canModify() && enabled == true ) {
+                    continue;
+                }
+                
+                Control control = this.controlMap.get( childId.getId() );
+                if ( ! ( control instanceof Composite) ) {
+                    control = control.getParent();
+                }
+                control.setEnabled( enabled );
+            }
+        }
+    }
+    
+    private UserField getModel(Collection<UserField> fields, String id) {
+        for ( UserField field : fields ) {
+            if ( field.getId().equals( id ) ) {
+                return field;
+            }
+            
+            if ( !CollectionUtil.isEmpty( field.getChildren() ) ) {
+                UserField result = getModel( field.getChildren(), id);
+                if ( result != null ) {
+                    return result;
+                }
+            }
+        }
+        
+        return null;
+    }
+    
+    private Collection<UserField> getChildModelById(final UserField field, final String id) {
+        Assert.notNull( id );
+        
+        Collection<UserField> children = field.getChildren();
+        if ( CollectionUtil.isEmpty( field.getChildren() )) {
+            return null;
+        }
+        
+        if ( id.equals( field.getId() ) ) {
+            return children;
+        }
+        
+        for ( UserField child : children ) {
+            Collection<UserField> childResult = getChildModelById( child, child.getId() );
+            if ( !CollectionUtil.isEmpty( childResult ) ) {
+                return childResult;
+            }
+        }
+        
+        return null;
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/dialog/PasswordInputDialog.java b/org.tizen.common/src/org/tizen/common/ui/dialog/PasswordInputDialog.java
new file mode 100644 (file)
index 0000000..0229496
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.ui.dialog;
+
+import static org.tizen.common.util.SWTUtil.getActiveShell;
+import static org.tizen.common.util.StringUtil.EMPTY_STRING;
+
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * <p>
+ * PasswordInputDialog.
+ * 
+ * Dialog for password input
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+PasswordInputDialog
+extends InputDialog
+{
+       /**
+        * Constructor with title, message
+        * 
+        * @param dialogTitle title of dialog
+        * @param dialogMessage message of dialog
+        * 
+        * @see #PasswordInputDialog(Shell, String, String)
+        */
+
+       public
+       PasswordInputDialog(
+               final String dialogTitle,
+               final String dialogMessage
+       )
+       {
+               this( getActiveShell(), dialogTitle, dialogMessage );
+       }
+
+       /**
+        * Constructor with shell, title, message
+        * 
+        * @param parentShell parent of dialog shell
+        * @param dialogTitle title of dialog
+        * @param dialogMessage message of dialog
+        * 
+        * @see #PasswordInputDialog(Shell, String, String, IInputValidator)
+        */
+       public
+       PasswordInputDialog(
+               final Shell parentShell,
+               final String dialogTitle,
+               final String dialogMessage
+       )
+       {
+               this( parentShell, dialogTitle, dialogMessage, null );
+       }
+
+       /**
+        * Constructor with shell, title, message and input validator
+        * 
+        * @param parentShell parent of dialog shell
+        * @param dialogTitle title of dialog
+        * @param dialogMessage message of dialog
+        * @param validator validator for input
+        */
+       public
+       PasswordInputDialog(
+               final Shell parentShell,
+               final String dialogTitle,
+               final String dialogMessage,
+               final IInputValidator validator
+       )
+       {
+               super( parentShell, dialogTitle, dialogMessage, EMPTY_STRING, validator );
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.dialogs.InputDialog#getInputTextStyle()
+        */
+       @Override
+       protected
+       int
+       getInputTextStyle()
+       {
+               return SWT.SINGLE | SWT.BORDER | SWT.PASSWORD;
+       }
+}
\ No newline at end of file
diff --git a/org.tizen.common/src/org/tizen/common/ui/page/preference/Messages.java b/org.tizen.common/src/org/tizen/common/ui/page/preference/Messages.java
new file mode 100644 (file)
index 0000000..ec48dd8
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.page.preference;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages {
+
+    private static final String BUNDLE_NAME = Messages.class.getName();//$NON-NLS-1$
+
+    public static String DESCRIPTION;
+    
+    public static String GROUP1;
+    public static String GROUP2;
+    
+    public static String LABEL_LOCATION;
+    public static String LABEL_UPDATE;
+    
+    public static String PROPERTIES_PAGE_BODY;
+    public static String RDS_NOTE;
+    public static String RDS_OPTION_SAVE_FAIL;
+    public static String RDS_MODE_PREFERENCE;
+    
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages( BUNDLE_NAME, Messages.class );
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/page/preference/Messages.properties b/org.tizen.common/src/org/tizen/common/ui/page/preference/Messages.properties
new file mode 100644 (file)
index 0000000..8197247
--- /dev/null
@@ -0,0 +1,9 @@
+DESCRIPTION=General settings
+GROUP1=SDK path
+LABEL_LOCATION=Location:
+GROUP2=SDK update
+LABEL_UPDATE=Automatically find new updates at start-up and notify me
+PROPERTIES_PAGE_BODY=Expand the tree to edit preferences for a specific feature.
+RDS_NOTE=Currently, this option is not supported for multi-app project.
+RDS_OPTION_SAVE_FAIL=Failed to save options.
+RDS_MODE_PREFERENCE=Enable rapid development mode
\ No newline at end of file
diff --git a/org.tizen.common/src/org/tizen/common/ui/page/preference/PreferenceMessages.java b/org.tizen.common/src/org/tizen/common/ui/page/preference/PreferenceMessages.java
new file mode 100644 (file)
index 0000000..0672b59
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.page.preference;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class PreferenceMessages {
+
+       private static final String BUNDLE_NAME = "org.tizen.common.preferences.PreferenceMessages";//$NON-NLS-1$
+
+       private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+
+       private PreferenceMessages() {
+       }
+
+       public static String getString( String key ) {
+               try {
+                       return RESOURCE_BUNDLE.getString( key );
+               }
+               catch( MissingResourceException e ) {
+                       return '!' + key + '!';
+               }
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/page/preference/PreferenceMessages.properties b/org.tizen.common/src/org/tizen/common/ui/page/preference/PreferenceMessages.properties
new file mode 100644 (file)
index 0000000..af75455
--- /dev/null
@@ -0,0 +1,5 @@
+TizenPreferencePage.0=General settings
+TizenPreferencePage.1=SDK path
+TizenPreferencePage.2=Location:
+TizenPreferencePage.3=SDK update
+TizenPreferencePage.4=Automatically find new updates at start-up and notify me
\ No newline at end of file
diff --git a/org.tizen.common/src/org/tizen/common/ui/page/preference/TizenBasePreferencePage.java b/org.tizen.common/src/org/tizen/common/ui/page/preference/TizenBasePreferencePage.java
new file mode 100644 (file)
index 0000000..0c1292a
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Kangho Kim <kh5325.kim@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.ui.page.preference;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.DirectoryFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.tizen.common.CommonPlugin;
+import org.tizen.common.util.SWTUtil;
+
+public class TizenBasePreferencePage extends FieldEditorPreferencePage implements
+        IWorkbenchPreferencePage
+{
+
+    public final static String TIZENSDK_PATH = CommonPlugin.PLUGIN_ID
+            + ".TizenSDKBasePreferencePage"; //$NON-NLS-1$
+
+    public static final String KEY_SDKLOCATION = "sdkpath"; //$NON-NLS-1$
+    public static final String KEY_SDKUPDATE = "sdkupdate"; //$NON-NLS-1$
+    public static final String VALUE_SDKLOCATION_DEFAULT = null;;
+    public static final boolean VALUE_SDKUPDATE_DEFAULT = false;
+
+    public TizenBasePreferencePage()
+    {
+        // super(GRID);
+        setPreferenceStore(CommonPlugin.getDefault().getPreferenceStore());
+        // getPreferenceStore().addPropertyChangeListener(
+        // getPropertyChangeListener() );
+        setDescription(Messages.DESCRIPTION);
+    }
+
+    @Override
+    public void init(IWorkbench workbench)
+    {
+        // TODO Auto-generated method stub
+    }
+
+    @Override
+    protected void createFieldEditors()
+    {
+        Composite composite = getFieldEditorParent();
+
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 1;
+        layout.marginHeight = 0;
+        layout.marginWidth = 0;
+        composite.setLayout(layout);
+        GridData data = new GridData(GridData.FILL_BOTH);
+        data.verticalAlignment = GridData.FILL;
+        data.horizontalAlignment = GridData.FILL;
+        composite.setLayoutData(data);
+        SWTUtil.createSpacer(composite, 1);
+        createPathSettingPreferences(composite);
+        SWTUtil.createSpacer(composite, 1);
+        createUpdateSettingPreferences(composite);
+        SWTUtil.createSpacer(composite, 1);
+    }
+
+    private void createPathSettingPreferences(Composite parent)
+    {
+        Composite comp = SWTUtil.createGroup(parent, Messages.GROUP1, 1);
+        Composite formatComposite = SWTUtil.createCompositeEx(comp, 1, GridData.FILL_HORIZONTAL);
+        DirectoryFieldEditor mDirectoryField = new DirectoryFieldEditor(KEY_SDKLOCATION,
+                Messages.LABEL_LOCATION, formatComposite);
+        addField(mDirectoryField);
+    }
+
+    private void createUpdateSettingPreferences(Composite parent)
+    {
+        Composite comp = SWTUtil.createGroup(parent, Messages.GROUP2, 1);
+        Composite formatComposite = SWTUtil.createCompositeEx(comp, 1, GridData.FILL_HORIZONTAL);
+        BooleanFieldEditor startupCheckEditor = new BooleanFieldEditor(KEY_SDKUPDATE,
+                Messages.LABEL_UPDATE, formatComposite);
+        addField(startupCheckEditor);
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/page/properties/TizenProperties.java b/org.tizen.common/src/org/tizen/common/ui/page/properties/TizenProperties.java
new file mode 100644 (file)
index 0000000..9d6eb4e
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Gun Kim <gune.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.page.properties;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbenchPropertyPage;
+import org.eclipse.ui.dialogs.PropertyPage;
+import org.tizen.common.ui.page.preference.Messages;
+
+/**
+ * The page to configure for options of Tizen SDK.
+ * 
+ * @author Gun Kim<gune.kim@samsung.com>
+ */
+public class TizenProperties extends PropertyPage implements
+        IWorkbenchPropertyPage {
+
+    public TizenProperties() {
+        String description = Messages.PROPERTIES_PAGE_BODY;
+        setDescription( description );
+    }
+
+    @Override
+    protected Control createContents(Composite parent) {
+        noDefaultAndApplyButton();
+        return null;
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/page/wizard/TrayWizardPage.java b/org.tizen.common/src/org/tizen/common/ui/page/wizard/TrayWizardPage.java
new file mode 100644 (file)
index 0000000..9d346fc
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.ui.page.wizard;
+
+import org.eclipse.jface.dialogs.DialogTray;
+import org.eclipse.jface.dialogs.TrayDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.common.ui.dialog.ClosableTray;
+
+
+/**
+ * a extended WizardPage class using ClosableTray class
+ * 
+ * @author Jihoon Song {@literal <jihoon80.song@samsung.com>} (S-Core)
+ */
+public abstract class TrayWizardPage extends WizardPage {
+    
+    protected TrayWizardPage(String pageName) {
+        super(pageName);
+    }
+    
+    protected TrayWizardPage(String pageName, String title, ImageDescriptor titleImage) {
+        super(pageName, title, titleImage);
+    }
+    
+    /**
+     * a extended WizardPage class using ClosableTray class
+     * 
+     * @param parent a composite control which will be the parent of the new instance (cannot be null)
+     * @param buttonText the new text of Button control
+     * @param tray the ClosableTray to show in dialog
+     * @return <b>Control</b> - return created Button control
+     */
+    protected Control createTrayButtonControl(Composite parent, String buttonText, final ClosableTray tray) {
+        Composite child = new Composite(parent, SWT.NONE);
+        child.setLayout(new GridLayout());
+        child.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
+        
+        Button expandButton = new Button(child, SWT.NONE);
+        expandButton.setText(buttonText);
+        expandButton.addSelectionListener(new SelectionListener() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                openClosableTray(tray);
+            }
+            
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        });
+        
+        return expandButton;
+    }
+    
+    /**
+     * open a tray using ClosableTray class. If another tray was opened, open new tray after close the opened tray automatically
+     * 
+     * @param tray the ClosableTray to show in dialog
+     * @return <b>Control</b> - return created Button control
+     */
+    protected void openClosableTray(ClosableTray tray) {
+        IWizardContainer wc = getContainer();
+        if (wc instanceof TrayDialog) {
+            TrayDialog wd = (TrayDialog) wc;
+            
+            // alreay opened
+            DialogTray currentTray = wd.getTray();
+            if (! (currentTray instanceof ClosableTray)) {
+                if (currentTray != null) {
+                    wd.closeTray();
+                }
+                wd.openTray(tray);
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/org.tizen.common/src/org/tizen/common/ui/view/console/AnsicodeAdapter.java b/org.tizen.common/src/org/tizen/common/ui/view/console/AnsicodeAdapter.java
new file mode 100755 (executable)
index 0000000..f303ce0
--- /dev/null
@@ -0,0 +1,211 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Yoonki Park <yoonki.park@samsung.com>
+* Kangho Kim <kh5325.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.view.console;
+
+import static org.tizen.common.util.SWTUtil.getDisplay;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.swt.graphics.Color;
+import org.tizen.common.util.MapUtil;
+
+public class AnsicodeAdapter {
+       public static final char ESCAPE = '\033'; // ANSI Escape Character that starts commands
+       
+       public static final Color BLACK = new Color(getDisplay(), 0, 0, 0);                             //Display.getCurrent().getSystemColor(SWT.COLOR_BLACK);
+       public static final Color RED = new Color(getDisplay(), 255, 0, 0);                             //Display.getCurrent().getSystemColor(SWT.COLOR_RED);
+       public static final Color GREEN = new Color(getDisplay(), 0, 255, 0);                   //Display.getCurrent().getSystemColor(SWT.COLOR_GREEN);
+       public static final Color YELLOW = new Color(getDisplay(), 255, 255, 0);                //Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW);
+       public static final Color BLUE = new Color(getDisplay(), 0,0,255);                              //Display.getCurrent().getSystemColor(SWT.COLOR_BLUE);
+       public static final Color MAGENTA = new Color(getDisplay(), 255, 0, 255);       //Display.getCurrent().getSystemColor(SWT.COLOR_MAGENTA);
+       public static final Color CYAN = new Color(getDisplay(), 0,255, 255);                   //Display.getCurrent().getSystemColor(SWT.COLOR_CYAN);
+       public static final Color WHITE = new Color(getDisplay(), 255, 255, 255);       //Display.getCurrent().getSystemColor(SWT.COLOR_WHITE);
+       
+       public static final Color INTENSE_BLACK = new Color(getDisplay(), 0, 0, 0);     //Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY);
+       public static final Color INTENSE_RED = new Color(getDisplay(), 139, 0, 0);     //Display.getCurrent().getSystemColor(SWT.COLOR_DARK_RED);
+       public static final Color INTENSE_GREEN = new Color(getDisplay(), 0, 100, 0);//Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN);
+       public static final Color INTENSE_YELLOW = new Color(getDisplay(), 250,250,210);//Display.getCurrent().getSystemColor(SWT.COLOR_DARK_YELLOW);
+       public static final Color INTENSE_BLUE = new Color(getDisplay(), 0,0,139);//Display.getCurrent().getSystemColor(SWT.COLOR_DARK_BLUE);
+       public static final Color INTENSE_MAGENTA = new Color(getDisplay(), 139,0,139);//Display.getCurrent().getSystemColor(SWT.COLOR_DARK_MAGENTA);
+       public static final Color INTENSE_CYAN = new Color(getDisplay(), 0, 139, 139);//Display.getCurrent().getSystemColor(SWT.COLOR_DARK_CYAN);
+       public static final Color INTENSE_WHITE = new Color(getDisplay(), 245, 245, 245);//Display.getCurrent().getSystemColor(SWT.COLOR_WHITE);
+
+    public static final Map<Integer, Color[]> CODE2COLOR = Collections.unmodifiableMap( MapUtil.<Integer, Color[]>asMap( new Object[][] {
+        new Object[] { 30, new Color[] { INTENSE_BLACK, BLACK } },
+        new Object[] { 31, new Color[] { INTENSE_RED, RED } },
+        new Object[] { 32, new Color[] { INTENSE_GREEN, GREEN } },
+        new Object[] { 33, new Color[] { INTENSE_YELLOW, YELLOW } },
+        new Object[] { 34, new Color[] { INTENSE_BLUE, BLUE } },
+        new Object[] { 35, new Color[] { INTENSE_MAGENTA, MAGENTA } },
+        new Object[] { 36, new Color[] { INTENSE_CYAN, CYAN } },
+        new Object[] { 37, new Color[] { INTENSE_WHITE, WHITE } },
+        new Object[] { 40, new Color[] { INTENSE_BLACK, BLACK } },
+        new Object[] { 41, new Color[] { INTENSE_RED, RED } },
+        new Object[] { 42, new Color[] { INTENSE_GREEN, GREEN } },
+        new Object[] { 43, new Color[] { INTENSE_YELLOW, YELLOW } },
+        new Object[] { 44, new Color[] { INTENSE_BLUE, BLUE } },
+        new Object[] { 45, new Color[] { INTENSE_MAGENTA, MAGENTA } },
+        new Object[] { 46, new Color[] { INTENSE_CYAN, CYAN } },
+        new Object[] { 47, new Color[] { INTENSE_WHITE, WHITE } },
+    } ) );
+
+       private static int[] commands = {'m','n'}; //SGR , DSR 
+       
+       private static List<TextStyle> parseAnsiString(String ansiString) {
+               char command = 0;
+               List<TextStyle> styles = new ArrayList<TextStyle>();
+               int arrayIndex = 0;
+               StringBuilder sb = new StringBuilder();
+               
+               for (int i=0; i<ansiString.length(); i++) {                     
+               if (ansiString.charAt(i) == ESCAPE) {
+                       int min = ansiString.length() ;
+                       int startCommand = 0;
+                       
+                       for (int j=0 ; j<commands.length ; j++) {
+                               startCommand = ansiString.indexOf(commands[j], i);
+                               if (min > startCommand && startCommand > -1) {
+                                       min = startCommand;
+                               }
+                       }
+                               command=ansiString.charAt(min);
+                       startCommand=min;
+                       
+                       if ( startCommand < ansiString.length()) {
+                               
+                               String colorCodes = ansiString.substring(i+2,startCommand); 
+                               String codes[] = colorCodes.split(";");
+                               Color[] colors = getColorAttribute(codes);
+                               int styleStart = startCommand+1;
+                               int styleEnd = 0;
+                               int endEscape = ansiString.indexOf(ESCAPE,styleStart);
+                               if (endEscape < 0 ) {
+                                       styleEnd = ansiString.length();
+                                       i = ansiString.length();
+                               } else {
+                                       int endCommand = ansiString.indexOf(command,endEscape); 
+                                       if (endCommand < 0 ) {
+                                               styleEnd = ansiString.length();
+                                               i = ansiString.length();
+                                       } else {
+                                               styleEnd = endEscape;
+                                               i = endCommand;
+                                       }       
+                               }
+                               String styleString = null;
+                               styleString = ansiString.substring(styleStart, styleEnd);
+                               
+                               TextStyle styleTs = new TextStyle(colors[0],colors[1],styleString);         
+
+                               if (sb.length() > 0) {
+                                       TextStyle defaultTs = new TextStyle(BLACK,WHITE, sb.toString());                                
+                                       styles.add(arrayIndex++,defaultTs);
+                                       sb.setLength(0);
+                               }
+                               styles.add(arrayIndex++,styleTs);                                       
+
+                   }                   
+               }else { //nothing found! 
+                       
+                       sb.append(ansiString.charAt(i));
+               }               
+       }
+               if (sb.length() > 0) {
+                       TextStyle defaultTs = new TextStyle(BLACK,WHITE, sb.toString());                                
+                       styles.add(arrayIndex,defaultTs);
+               }
+               return styles;
+       }
+       private static Color[] getColorAttribute(String codes[]) {
+               boolean brighter = false;
+               Color[] color = {BLACK,WHITE}; //foreground&background
+       
+        for (int j = 0; j < codes.length; j++) {
+               
+            if (codes[j].length() > 0 && codes[j].matches("[\\d]*")) {
+                int code = Integer.parseInt(codes[j]);
+                if (code == 0)
+                {
+                    brighter = false;
+                }
+                else if (code == 1)
+                {
+                    brighter = true;
+                }
+                else if (code >= 30 && code <= 39) {
+                    if (code == 39)
+                    {
+                       color[0] = BLACK; //default foreground color
+                    }
+                    else if (code >= 30 && code <= 37) {
+                       color[0] = getColorFromANSICode(code, brighter);
+                        brighter = false;
+                    }
+                } else if (code >= 40 && code <= 49) {
+                    if (code == 49)
+                    {
+                       color[1] = WHITE; //default background color
+                    }
+                    else if (code >= 40 && code <= 47)
+                    {
+                       color[1] = getColorFromANSICode(code, brighter);
+                    }
+                }
+            }
+        }
+        return color;
+       }
+       
+           
+
+       private static Color getColorFromANSICode(int code, boolean brighter) {
+           final Color[] colorSet = CODE2COLOR.get( code );
+           if ( null == colorSet )
+           {
+               return null;
+           }
+           return colorSet[brighter?0:1];
+    }
+       public static String getStripAnsiString(String newLineStr) {
+               List<TextStyle> styles = parseAnsiString(newLineStr);           
+               if (styles != null) {
+                       StringBuilder sb = new StringBuilder();
+                       for (int i=0 ; i<styles.size(); i++) {
+                               sb.append(styles.get(i).getStripString());
+                       }
+                       return sb.toString();
+               }else {
+                       return newLineStr;
+               }
+       }
+       public static List<TextStyle> getStringStyles(String newLineStr) {
+               List<TextStyle> styles = parseAnsiString(newLineStr);
+               return styles;
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/view/console/ConsoleManager.java b/org.tizen.common/src/org/tizen/common/ui/view/console/ConsoleManager.java
new file mode 100755 (executable)
index 0000000..125be79
--- /dev/null
@@ -0,0 +1,316 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Yoonki Park <yoonki.park@samsung.com>
+* Kangho Kim <kh5325.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.view.console;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.console.IConsoleManager;
+import org.eclipse.ui.console.IConsoleView;
+import org.eclipse.ui.console.MessageConsole;
+import org.eclipse.ui.console.MessageConsoleStream;
+
+/**
+ * ConsoleManager.
+ * @author YoonKi Park {@literal <yoonki.park@samsung.com>} (S-Core)
+ * @author GyeongSeok Seo {@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ */
+public class ConsoleManager
+implements IConsolePrinter
+{
+    private IConsoleManager consoleManager;
+    private String consoleName;
+    private boolean consoleFocus;
+    private MessageConsole console;
+    private Display display = Display.getDefault();
+    private MessageConsoleStream colorConsoleStream;
+    
+    /**
+     * Constructs a new console manager.
+     * 
+     * @param consoleName - the key title
+     * @param focus - true if focus on console, false if not
+     */
+    public ConsoleManager(String consoleName, boolean focus) {
+        this.consoleName = consoleName;
+        this.consoleFocus = focus;
+        this.consoleManager = ConsolePlugin.getDefault().getConsoleManager();
+        this.console = getMessageConsole();
+    }
+
+    /**
+     * Change Console Name.
+     *
+     * @deprecated This method has been deprecated by {@link #changeConsoleName(String)}
+     */
+    @Deprecated
+    public void changeConsolName(String newName) throws NoSuchFieldException, IllegalAccessException {
+        changeConsoleName(newName);
+    }
+
+    /**
+     * Change Console Name.
+     *
+     * @param newName - console Title. It shown console's tab bar.
+     * @author Gyeongseok.seo@samsung.com
+     */
+    public void changeConsoleName(String newName) throws NoSuchFieldException, IllegalAccessException {
+        this.consoleName = newName;
+        Runnable runnable = new Runnable() {
+            public void run() {
+                Class<?> cls = null;
+                Method method = null;
+                try
+                {
+                    cls = Class.forName("org.eclipse.ui.console.AbstractConsole");
+                    method = cls.getDeclaredMethod("setName", String.class);
+                    method.setAccessible(true);
+                    method.invoke(getConsole(), consoleName);
+                }
+                catch (SecurityException e)
+                {
+                    ConsolePlugin.log(e);
+                }
+                catch (IllegalArgumentException e)
+                {
+                    ConsolePlugin.log(e);
+                }
+                catch (ClassNotFoundException e)
+                {
+                    ConsolePlugin.log(e);
+                }
+                catch (NoSuchMethodException e)
+                {
+                    ConsolePlugin.log(e);
+                }
+                catch (IllegalAccessException e)
+                {
+                    ConsolePlugin.log(e);
+                }
+                catch (InvocationTargetException e)
+                {
+                    ConsolePlugin.log(e);
+                }
+            }
+        };
+        Display.getDefault().syncExec(runnable);
+    }
+
+    private MessageConsole getMessageConsole(){
+        boolean found = false;
+
+        IConsole[] consoles = consoleManager.getConsoles();
+        for (int i = 0; i < consoles.length; i++) {
+            if (this.consoleName.equals(consoles[i].getName())) {
+                console = (MessageConsole) consoles[i];
+                consoleManager.removeConsoles(new IConsole[] { console });
+                //found = true;
+                break;
+            }
+        }
+        if (!found) {
+            console = new MessageConsole(this.consoleName, null);
+            consoleManager.addConsoles(new IConsole[] { console });
+        }
+        
+        if(this.consoleFocus)
+        {
+            showConsoleView();
+        }
+        
+        return console;
+    }
+    public IConsole getConsole() {
+        return console;
+    }
+    
+    public void showConsoleView() {
+        consoleManager.showConsoleView(console);
+    }
+    /**
+     * Remove a MessageConsole instance specified key title from list, if it is present
+     * 
+     * @param sessionId - a key title
+     */
+    public void removeConsole(){
+        MessageConsole console = null;
+        
+        IConsole[] consoles = consoleManager.getConsoles();
+        for (int i = 0; i < consoles.length; i++) {
+            if (this.consoleName.equals(consoles[i].getName())) {
+                console = (MessageConsole) consoles[i];
+                consoleManager.removeConsoles(new IConsole[] { console });
+                break;
+            }
+        }
+     }
+    
+    /**
+     * Get the output stream of the MessageConsole
+     * @Deprecated
+     * @param isError - character's color is black if true or the color is red if false
+     *  
+     * @return the MessageConsoleStream connected to MessageConsole
+     */
+    @Deprecated
+    public MessageConsoleStream getMessageConsoleStream(boolean isError) {
+        final MessageConsoleStream output = this.console.newMessageStream();
+        output.setActivateOnWrite(false);
+        
+        final int colorId;
+        if (!isError) {
+            colorId = SWT.COLOR_BLACK;
+        } else {
+            colorId = SWT.COLOR_RED;
+        }
+        
+        // we must set the color in the UI thread
+        Runnable runnable = new Runnable() {
+            public void run() {
+                Color color = Display.getCurrent().getSystemColor(colorId);
+                output.setColor(color);
+            }
+        };
+        Display.getDefault().syncExec(runnable);
+        
+        return output;
+    }
+    /**
+     * Get the output stream of the MessageConsole
+     * 
+     * @return the MessageConsoleStream connected to MessageConsole
+     */
+    public MessageConsoleStream getMessageConsoleStream() {
+        return this.console.newMessageStream();
+    }
+
+    public void println(String line) {
+        MessageConsoleStream output = this.console.newMessageStream();
+        output.println(line);
+        try {
+            output.close();
+        } catch (IOException e) {
+             ConsolePlugin.log(e);
+        }
+    }
+
+    public void printProcessStreams(Process process) {
+        clear();
+        // waitAndRead while process is running
+        ConsoleProcessClosure closure = new ConsoleProcessClosure(process, this);
+        closure.runBlocking(); // a blocking cal
+    }
+
+    private void setStringStyle(int fontStyle, Color color) {
+        // font setting
+        colorConsoleStream.setFontStyle(fontStyle);
+
+        // color setting
+        colorConsoleStream.setColor(color);
+    }
+
+    public void print(String line ,int fontStyle, Color color) {
+        colorConsoleStream = console.newMessageStream();
+        display.syncExec(new ConsoleSettingThread(fontStyle, color));
+        
+        colorConsoleStream.print(line);
+        try {
+            colorConsoleStream.close();
+        } catch (IOException e) {
+             ConsolePlugin.log(e);
+        }
+    }
+
+    public void println(String line ,int fontStyle, Color color) {
+        colorConsoleStream = console.newMessageStream();
+        display.syncExec(new ConsoleSettingThread(fontStyle, color));
+
+        colorConsoleStream.println(line);
+        try {
+            colorConsoleStream.close();
+        } catch (IOException e) {
+             ConsolePlugin.log(e);
+        }
+    }
+
+    public void clear()
+    {
+        Runnable runnable = new Runnable() {
+            public void run() {
+                IDocument document = console.getDocument();
+                if (document != null) {
+                    document.set("");
+                }
+            }
+        };
+        Display.getDefault().syncExec(runnable);
+    }
+
+    public void show()  {
+        Runnable runnable = new Runnable() {
+            public void run() {
+                IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+                String id = IConsoleConstants.ID_CONSOLE_VIEW;
+                IConsoleView view = null;
+                try {
+                    view = (IConsoleView) page.showView(id);
+                    view.display(getConsole());
+                } catch (PartInitException e) {
+                     ConsolePlugin.log(e);
+                }
+            }
+        };
+        Display.getDefault().syncExec(runnable);
+    }
+
+    // setting thread.
+    class ConsoleSettingThread extends Thread {
+        // console text setting value
+        private int fontStyle;
+        private Color color;
+        
+        ConsoleSettingThread(int fontStyle, Color color) {
+            this.fontStyle = fontStyle;
+            this.color = color;
+        }
+
+        public void run() {
+            setStringStyle(this.fontStyle, this.color);
+        }
+    }
+}
+
diff --git a/org.tizen.common/src/org/tizen/common/ui/view/console/ConsoleManager2.java b/org.tizen.common/src/org/tizen/common/ui/view/console/ConsoleManager2.java
new file mode 100755 (executable)
index 0000000..e3289a1
--- /dev/null
@@ -0,0 +1,410 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Yoonki Park <yoonki.park@samsung.com>
+* Kangho Kim <kh5325.kim@samsung.com>
+* BonYong Lee<bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.view.console;
+
+import static org.tizen.common.util.SWTUtil.asyncExec;
+import static org.tizen.common.util.SWTUtil.getActivePage;
+import static org.tizen.common.util.SWTUtil.syncExec;
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.console.ConsolePlugin;
+import org.eclipse.ui.console.IConsole;
+import org.eclipse.ui.console.IConsoleConstants;
+import org.eclipse.ui.console.IConsoleManager;
+import org.eclipse.ui.console.IConsoleView;
+import org.eclipse.ui.console.MessageConsoleStream;
+import org.tizen.common.util.Assert;
+
+/**
+ * ConsoleManager2.
+ * 
+ * {@link MessageConsole}'s delegater
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+ConsoleManager2
+implements IConsolePrinter, IHyperlinkManager
+{
+       
+       /**
+        * MessageConsole to be delegated
+        */
+       protected final MessageConsoleSpy console;
+       
+       /**
+        * Link manager
+        */
+       protected final HyperlinkManager hyperlinkManager;
+       
+       /**
+        * console's name
+        * 
+        * @see {@link IConsole#setName(String)}
+        */
+       private String consoleName;
+       
+       /**
+        * document model's virtual length
+        */
+       protected int documentLength = 0;
+       
+       /**
+        * Constructs a new console manager.
+        * 
+        * @param consoleName - the key title 
+        * @param focus - true if focus on console, false if not
+        */
+       public
+       ConsoleManager2(
+               final String consoleName,
+               final boolean focus
+       )
+       {
+               this.consoleName = consoleName;
+               this.console = createMessageConsole();
+               this.hyperlinkManager = new HyperlinkManager( console );
+               this.console.getDocument().addDocumentListener( hyperlinkManager );
+               
+               if ( focus )
+               {
+                       getConsoleManager().showConsoleView(console);
+               }
+               
+               setName( consoleName );
+       }
+       
+       /**
+        * return {@link IConsoleManager} from {@link ConsolePlugin}
+        * 
+        * @return {@link IConsoleManager}
+        * 
+        * @see ConsolePlugin#getConsoleManager()
+        */
+       protected IConsoleManager getConsoleManager()
+       {
+               return ConsolePlugin.getDefault().getConsoleManager();
+       }
+       
+       /**
+        * return <code>IConsole</code>s to be attached to {@link IConsoleManager}
+        * 
+        * @return <code>IConsole</code>s
+        * 
+        * @see #getConsoleManager()
+        * @see IConsoleManager#getConsoles()
+        */
+       protected IConsole[] getConsoles()
+       {
+               return getConsoleManager().getConsoles();
+       }
+       
+
+       /**
+        * Change Console Name.
+        *
+        * @param newName - console Title. It shown console's tab bar. 
+        * @author Gyeongseok.seo@samsung.com
+        */
+       public void
+       setName(
+               final String newName
+       )
+       {
+           Assert.notNull( newName );
+               this.consoleName = newName;
+               asyncExec( new Runnable()
+               {
+                       public void run()
+                       {
+                               if ( null == console )
+                               {
+                                       return ;
+                               }
+                               console.setName(newName);
+                       }
+               } );
+       }
+       
+       /**
+        * Create message console
+        * 
+        * @return Message console for emulator
+        */
+       synchronized protected MessageConsoleSpy createMessageConsole()
+       {
+               // Delete Old Console from console view
+               final IConsole[] consoles = getConsoles();
+               for ( int i = 0, n = consoles.length ; i < n ; ++i )
+               {
+                       if ( !this.consoleName.equals(consoles[i].getName() ) )
+                       {
+                               continue;
+                       }
+                       getConsoleManager().removeConsoles( new IConsole[] { console } );
+               }
+               final MessageConsoleSpy console = new MessageConsoleSpy( this.consoleName );
+               getConsoleManager().addConsoles( new IConsole[] { console } );
+               
+               return console;
+       }
+       
+       /**
+        * return {@link IConsole}
+        * 
+        * @return {@link IConsole} to be managed
+        */
+       protected IConsole getConsole() {
+               return this.console;
+       }
+       
+       /**
+        * print <code>line</code> out to {@link IConsole} with line separator
+        * 
+        * @param line text to print
+        */
+       synchronized public void println(String line) {
+               final MessageConsoleStream output = createConsoleStream();
+               
+               try
+               {
+                       output.println( line );
+                       documentLength += ( line.length() + 1 );
+                       
+               } finally
+               {
+                       tryClose( output );
+               }
+       }
+       
+       /**
+        * Print out using {@link Process}
+        * @param process
+        */
+       public void printProcessStreams( final Process process) {
+               
+               clear();
+               // waitAndRead while process is running
+               ConsoleProcessClosure closure = new ConsoleProcessClosure(process, this);
+               
+               closure.runBlocking(); // a blocking cal
+       }
+       
+       
+       /**
+        * Return configured <code>MessageConsoleStream</code> 
+        * 
+        * with <code>fontStyle</code> and <code>color</code>
+        * 
+        * @param fontStyle SWT font style like {@link SWT#BOLD}, {@link SWT#ITALIC}, and etc.
+        * @param color color of message to be printed
+        * 
+        * @return configured <code>MessageConsoleStream</code>
+        * 
+        * @see #configureConsole(MessageConsoleStream, int, Color)
+        */
+       protected
+       MessageConsoleStream
+       getConsoleStream(
+               final int fontStyle,
+               final Color color
+       )
+       {
+               final MessageConsoleStream stream = createConsoleStream();
+               
+               configureConsole( stream, fontStyle, color );
+               
+               return stream;
+       }
+       
+       
+       /**
+        * Factory method for <code>MessageConsoleStream</code>
+        * 
+        * @return <code>MessageConsoleStream</code> to be created
+        * 
+        * @see MessageConsole#newMessageStream()
+        */
+       protected
+       MessageConsoleStream
+       createConsoleStream()
+       {
+               final MessageConsoleStream stream = console.newMessageStream();
+               
+               return stream;
+       }
+       
+       /**
+        * Configure <code>stream</code> with <code>fontStyle</code> and <code>color</code>
+        * 
+        * @param stream <code>MessageConsoleStream</code> to configure
+        * @param fontStyle SWT font style
+        * @param color
+        * 
+        * @see SWT#NORMAL
+        * @see SWT#BOLD
+        * @see SWT#ITALIC
+        */
+       protected void
+       configureConsole(
+               final MessageConsoleStream stream,
+               final int fontStyle,
+               final Color color
+       )
+       {
+               syncExec( new Runnable()
+               {
+                       public void run()
+                       {
+                       // font setting
+                               stream.setFontStyle( fontStyle );
+
+                       // color setting
+                               stream.setColor( color );
+                       }
+               } );
+       }
+
+       /**
+        * print out <code>message</code> with <code>fontStyle</code> and <code>color</code>
+        * 
+        * @param message message to print out
+        * @param fontStyle SWT font style
+        * @param color color of message
+        */
+       synchronized public
+       void
+       print(
+               final String message,
+               final int fontStyle,
+               final Color color
+       )
+       {
+               final MessageConsoleStream stream = getConsoleStream( fontStyle, color );
+               try
+               {
+                       stream.print(message);
+                       documentLength += (message.length() );
+               }
+               finally
+               {
+                       tryClose( stream );
+               }
+       }
+
+       /**
+        * print out with line separator
+        * 
+        * @param message message to print out
+        * @param fontStyle font style
+        * @param color color
+        * 
+        * @see #print(String, int, Color)
+        */
+       public
+       void
+       println(
+               final String message,
+               final int fontStyle,
+               final Color color
+       )
+       {
+               print( message + "\n", fontStyle, color );
+       }
+       
+       /**
+        * clear message console
+        */
+       synchronized public
+       void
+       clear()
+       {
+               syncExec(
+                       new Runnable() {
+                               public void run() {
+                                       IDocument document = console.getDocument();
+                                       if ( null == document )
+                                       {
+                                               return ;
+                                       }
+                                       document.set("");
+                               }
+                       }
+               );
+               documentLength = 0;
+       }
+       
+       /**
+        * Activate console
+        */
+       public
+       void
+       show()
+       {
+               syncExec(
+                       new Runnable() {
+                               public void run() {
+                                       final IWorkbenchPage page = getActivePage();
+                                       if ( null == page )
+                                       {
+                                               // How to handle no active page( no view page )
+                                               throw new IllegalStateException();
+                                       }
+                                       try {
+                                               IConsoleView view = (IConsoleView) page.showView( IConsoleConstants.ID_CONSOLE_VIEW );
+                                               view.display(getConsole());
+                                       } catch (
+                                               final PartInitException e
+                                       )
+                                       {
+                                                ConsolePlugin.log(e);
+                                       }
+                               }
+                       }
+               );      
+       }
+       
+       /* (non-Javadoc)
+        * @see org.tizen.common.console.IHyperlinkerManager#addLinker(org.tizen.common.console.LinkInfo)
+        */
+       @Override
+       public
+       void
+       addLinker(
+               final LinkInfo link
+       )
+       {
+               hyperlinkManager.addLinker( link );
+       }
+
+}
+
diff --git a/org.tizen.common/src/org/tizen/common/ui/view/console/ConsoleProcessClosure.java b/org.tizen.common/src/org/tizen/common/ui/view/console/ConsoleProcessClosure.java
new file mode 100644 (file)
index 0000000..c373aa5
--- /dev/null
@@ -0,0 +1,244 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Changhyun Lee <changhyun1.lee@samsung.com>
+* Kangho Kim <kh5325.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.view.console;
+
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import java.io.BufferedReader;
+import java.io.Closeable;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+
+
+/**
+ * Bundled state of a launched process including the threads linking the process
+ * in/output to console documents.
+ */
+public class ConsoleProcessClosure {
+
+       /**
+        * Thread which continuously reads from a input stream and pushes the read
+        * data to an output stream which is immediately flushed afterwards.
+        */
+       protected static class ReaderThread
+       extends Thread
+       implements Closeable {
+
+               private InputStream fInputStream;
+               private IConsolePrinter fConsole;
+               private boolean fFinished = false;
+               private String lineSeparator;
+               /*
+                * outputStream can be null
+                */
+               public ReaderThread(ThreadGroup group, String name, InputStream in, IConsolePrinter out) {
+                       super(group, name);
+                       fConsole = out;
+                       fInputStream = in;
+                       setDaemon(true);
+                       lineSeparator = System.getProperty("line.separator"); //$NON-NLS-1$
+               }
+
+               @Override
+               public void run() {
+                       try {
+                               try {
+                                       BufferedReader reader = new BufferedReader(new InputStreamReader(fInputStream));
+                                       String line;
+                                       while ((line = reader.readLine()) != null) {
+                                               List<TextStyle> ts = AnsicodeAdapter.getStringStyles(line);
+                                               
+                                               if (ts != null) {
+                                                       for (int i=0 ; i< ts.size() ; i++) {
+                                                               fConsole.print(ts.get(i).getStripString(),SWT.NORMAL,ts.get(i).getForeground());
+                                                       }
+                                               } else {
+                                                       fConsole.print(line,SWT.NORMAL,AnsicodeAdapter.BLACK);
+                                               }
+                                               fConsole.print(lineSeparator,SWT.NORMAL,AnsicodeAdapter.BLACK);
+                                       }
+                               } catch (IOException x) {
+                                       x.printStackTrace();
+                               } finally {
+                                       tryClose( fInputStream );
+                               }
+                       } finally {
+                               complete();
+                       }
+               }
+               
+               public synchronized boolean finished() {
+                       return fFinished;
+               }
+
+               public synchronized void waitFor() {
+                       while (!fFinished) {
+                               try {
+                                       wait();
+                               } catch (InterruptedException e) {
+                               }
+                       }
+               }
+
+               public synchronized void complete() {
+                       fFinished = true;
+                       notify();
+               }
+
+               public void close() {
+                       //TODO : fix me!
+                       /*try {
+                               fOutputStream.close();
+                       } catch (IOException e) {
+                               // ignore
+                       }*/
+               }
+       }
+
+       protected static int fCounter = 0;
+
+       protected Process fProcess;
+       protected IConsolePrinter fConsole;
+
+       protected ReaderThread fOutputReader;
+       protected ReaderThread fErrorReader;
+
+       /**
+        * Creates a process closure and connects the launched process with a
+        * console document.
+        * 
+        * @param outputStream
+        *            prcess stdout is written to this stream. Can be
+        *            <code>null</code>, if not interested in reading the output
+        * @param errorStream
+        *            prcess stderr is written to this stream. Can be
+        *            <code>null</code>, if not interested in reading the output
+        */
+       public ConsoleProcessClosure(Process process, IConsolePrinter console) {
+               fProcess = process;
+               fConsole = console;
+       }
+
+       /**
+        * Live links the launched process with the configured in/out streams using
+        * reader threads.
+        */
+       public void runNonBlocking() {
+               ThreadGroup group = new ThreadGroup("SRuncher" + fCounter++); //$NON-NLS-1$
+
+               InputStream stdin = fProcess.getInputStream();
+               InputStream stderr = fProcess.getErrorStream();
+
+               fOutputReader = new ReaderThread(group, "OutputReader", stdin, fConsole); //$NON-NLS-1$
+               fErrorReader = new ReaderThread(group, "ErrorReader", stderr, fConsole); //$NON-NLS-1$
+
+               fOutputReader.start();
+               fErrorReader.start();
+       }
+
+       public void runBlocking() {
+               runNonBlocking();
+
+               boolean finished = false;
+               while (!finished) {
+                       try {
+                               fProcess.waitFor();
+                       } catch (InterruptedException e) {
+                               //System.err.println("Closure exception " +e);
+                       }
+                       try {
+                               fProcess.exitValue();
+                               finished = true;
+                       } catch (IllegalThreadStateException e) {
+                               e.printStackTrace();
+                       }
+               }
+
+               // @@@FIXME: Windows 2000 is screwed; double-check using output threads
+               if (!fOutputReader.finished()) {
+                       fOutputReader.waitFor();
+               }
+
+               if (!fErrorReader.finished()) {
+                       fErrorReader.waitFor();
+               }
+
+               tryClose( fOutputReader, fErrorReader );
+               // it seems that thread termination and stream closing is working
+               // without
+               // any help
+               fProcess = null;
+               fOutputReader = null;
+               fErrorReader = null;
+       }
+
+       public boolean isAlive() {
+               if (fProcess != null) {
+                       if (fOutputReader.isAlive() || fErrorReader.isAlive()) {
+                               return true;
+                       }
+                       fProcess = null;
+                       tryClose( fOutputReader, fErrorReader );
+               }
+               return false;
+       }
+
+       /**
+        * The same functionality as "isAlive()"
+        * but does not affect out streams,
+        * because they can be shared among processes
+        */
+       public boolean isRunning() {
+               if (fProcess != null) {
+                       if (fOutputReader.isAlive() || fErrorReader.isAlive()) {
+                               return true;
+                       }
+                       fProcess = null;
+               }
+               return false;
+       }
+       /**
+        * Forces the termination the launched process
+        */
+       public void terminate() {
+               if (fProcess != null) {
+                       fProcess.destroy();
+                       fProcess = null;
+               }
+               if (!fOutputReader.finished()) {
+                       fOutputReader.waitFor();
+               }
+               if (!fErrorReader.finished()) {
+                       fErrorReader.waitFor();
+               }
+               tryClose( fOutputReader, fErrorReader );
+       }
+}
+
diff --git a/org.tizen.common/src/org/tizen/common/ui/view/console/HyperlinkManager.java b/org.tizen.common/src/org/tizen/common/ui/view/console/HyperlinkManager.java
new file mode 100644 (file)
index 0000000..be32de9
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.view.console;
+
+import java.util.Iterator;
+import java.util.TreeSet;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.DocumentEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentListener;
+import org.eclipse.ui.console.TextConsole;
+
+/**
+ * HyperlinkManager.
+ * 
+ * Manage hyperlink. 
+ * 
+ * process deferedly because {@link TextConsole} is asynchronous.
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+HyperlinkManager
+implements IHyperlinkManager, IDocumentListener
+{
+       /**
+        * {@link TextConsole} to connect link
+        */
+       protected TextConsole console;
+
+       /**
+        * unconnected links
+        */
+       protected final TreeSet<LinkInfo> dangledLinks = new TreeSet<LinkInfo>();
+       
+       /**
+        * Constructor with {@link TextConsole} to connect link
+        * 
+        * @param console {@link TextConsole} to connect link
+        */
+       public
+       HyperlinkManager(
+               final TextConsole console
+       )
+       {
+               this.console = console;
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
+        */
+       @Override
+       public
+       void
+       documentAboutToBeChanged(
+               final DocumentEvent event
+       )
+       {
+               // Not implement
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
+        */
+       @Override
+       public
+       void
+       documentChanged(
+               final DocumentEvent event
+       )
+       {
+               final IDocument doc = event.getDocument();
+               final int docLen = doc.getLength();
+               
+               for ( final Iterator<LinkInfo> iter = dangledLinks.iterator() ; iter.hasNext() ; )
+               {
+                       final LinkInfo info = iter.next();
+                       
+                       if (  docLen < info.getEnd() )
+                       {
+                               return ;
+                       }
+                       
+                       try
+                       {
+                               this.console.addHyperlink( info.getLink(), info.getStart(), info.getLength() );
+                               iter.remove();
+                       } catch ( final BadLocationException e )
+                       {
+                               e.printStackTrace();
+                       }
+               }
+       }
+
+       /* (non-Javadoc)
+        * @see org.tizen.common.console.IHyperlinkerManager#addLinker(org.tizen.common.console.LinkInfo)
+        */
+       @Override
+       public
+       void
+       addLinker(
+               final LinkInfo link
+       )
+       {
+               dangledLinks.add( link );
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/view/console/IConsolePrinter.java b/org.tizen.common/src/org/tizen/common/ui/view/console/IConsolePrinter.java
new file mode 100644 (file)
index 0000000..efa154a
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.view.console;
+
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * IConsolePrinter.
+ * 
+ * {@link IConsoleManager}'s adaptation interface
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public interface IConsolePrinter
+{
+       /**
+        * print line out to {@link IConsole}
+        * 
+        * @param msg message to print out
+        * @param fontStyle font style flag
+        * @param color foreground color of <code>msg</code> to print out 
+        */
+       void print( String msg, int fontStyle, Color color );
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/view/console/IHyperlinkManager.java b/org.tizen.common/src/org/tizen/common/ui/view/console/IHyperlinkManager.java
new file mode 100644 (file)
index 0000000..68d995e
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.view.console;
+
+
+/**
+ * IHyperlinkerManager.
+ * 
+ * Manage hyperlinks in asynchronous stream
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public interface
+IHyperlinkManager
+{
+       /**
+        * add <code>link</code> to IConsole
+        * 
+        * @param link hyper link's info
+        * 
+        * @see LinkInfo
+        */
+       void addLinker( LinkInfo link );
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/view/console/LinkInfo.java b/org.tizen.common/src/org/tizen/common/ui/view/console/LinkInfo.java
new file mode 100644 (file)
index 0000000..9eb0bbc
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.view.console;
+
+import org.eclipse.ui.console.IHyperlink;
+
+/**
+ * LinkInfo.
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+LinkInfo
+implements Comparable<LinkInfo>
+{
+       /**
+        * Link's start offset
+        */
+       protected final int offset;
+       
+       /**
+        * Link's textual length
+        */
+       protected final int length;
+       
+       /**
+        * <code>IHyperlink</code> to connect
+        */
+       protected final IHyperlink link;
+       
+       /**
+        * Constructor with link's offset, length and hyperlink
+        * 
+        * @param offset link's start offset
+        * @param length link's length
+        * @param link hyperlink
+        */
+       public LinkInfo(
+               final int offset,
+               final int length,
+               final IHyperlink link
+       )
+       {
+               this.offset = offset;
+               this.length = length;
+               this.link = link;
+               if ( length < 0 )
+               {
+                       throw new IllegalArgumentException( "Link's length is negative :" + this );
+               }
+       }
+       
+       /**
+        * Return link's start position in text
+        * 
+        * @return link's start position
+        * 
+        * @see #getEnd()
+        * @see #getLength()
+        */
+       public
+       int
+       getStart()
+       {
+               return this.offset;
+       }
+       
+       /**
+        * Return link's end position in text
+        * 
+        * @return link's end position
+        * 
+        * @see #getStart()
+        * @see #getEnd()
+        */
+       public
+       int
+       getEnd()
+       {
+               return getStart() + getLength();
+       }
+       
+       /**
+        * Return link's length
+        * 
+        * @return link's length
+        * 
+        * @see #getStart();
+        * @see #getEnd();
+        */
+       public
+       int
+       getLength()
+       {
+               return this.length;
+       }
+       
+       /**
+        * return hyper link
+        * @return {@link IHyperlink}
+        */
+       public
+       IHyperlink
+       getLink()
+       {
+               return this.link;
+       }
+
+       /* (non-Javadoc)
+        * @see java.lang.Comparable#compareTo(java.lang.Object)
+        */
+       @Override
+       public
+       int
+       compareTo(LinkInfo o)
+       {
+               return getLength() - o.getLength();
+       }
+
+       /* (non-Javadoc)
+        * @see java.lang.Object#toString()
+        */
+       @Override
+       public
+       String
+       toString()
+       {
+               return "Link(" + getStart() + ":" + getEnd() + ")-" + link;
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/view/console/MessageConsoleSpy.java b/org.tizen.common/src/org/tizen/common/ui/view/console/MessageConsoleSpy.java
new file mode 100644 (file)
index 0000000..1a1a7df
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.view.console;
+
+import org.eclipse.ui.console.MessageConsole;
+
+public class
+MessageConsoleSpy
+extends MessageConsole
+{
+
+       /**
+        * Constructor with console name
+        * 
+        * @param name console's key title
+        */
+       public MessageConsoleSpy( final String name )
+       {
+               super( name, null );
+       }
+       
+       /**
+        * make {@link AbstractConsole#setName(String)} accessible
+        * 
+        * @see org.eclipse.ui.console.AbstractConsole#setName(java.lang.String)
+        */
+       public void setName( final String name )
+       {
+               super.setName( name );
+       }
+       
+       
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/view/console/TextStyle.java b/org.tizen.common/src/org/tizen/common/ui/view/console/TextStyle.java
new file mode 100644 (file)
index 0000000..000c1b0
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Changhyun Lee <changhyun1.lee@samsung.com>
+* Kangho Kim <kh5325.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.view.console;
+
+import org.eclipse.swt.graphics.Color;
+
+public class TextStyle  {
+    private Color foreground;
+       private Color background;
+       private String stripString;
+       
+       TextStyle(Color foreground,Color background,String stripString) {
+        this.foreground = foreground;
+        this.background = background;
+        this.stripString = stripString;
+    }
+
+       public Color getForeground() {
+               return foreground;
+       }
+
+       public Color getBackground() {
+               return background;
+       }
+
+       public String getStripString() {
+               return stripString;
+       }
+   
+}
diff --git a/org.tizen.common/src/org/tizen/common/ui/widget/PictureLabel.java b/org.tizen.common/src/org/tizen/common/ui/widget/PictureLabel.java
new file mode 100755 (executable)
index 0000000..a5cf09b
--- /dev/null
@@ -0,0 +1,227 @@
+/*\r
+*  Common\r
+*\r
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: \r
+* Kangho Kim <kh5325.kim@samsung.com>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+* Contributors:\r
+* - S-Core Co., Ltd\r
+*\r
+*/\r
+\r
+package org.tizen.common.ui.widget;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.SWT;\r
+import org.eclipse.swt.events.DisposeEvent;\r
+import org.eclipse.swt.events.DisposeListener;\r
+import org.eclipse.swt.events.MouseAdapter;\r
+import org.eclipse.swt.events.MouseEvent;\r
+import org.eclipse.swt.events.MouseTrackAdapter;\r
+import org.eclipse.swt.events.PaintEvent;\r
+import org.eclipse.swt.events.PaintListener;\r
+import org.eclipse.swt.graphics.GC;\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.graphics.Point;\r
+import org.eclipse.swt.graphics.Rectangle;\r
+import org.eclipse.swt.widgets.Canvas;\r
+import org.eclipse.swt.widgets.Composite;\r
+\r
+/**\r
+ * Reference to http://www.eclipse.org/articles/Article-Writing%20Your%20Own%20Widget/Writing%20Your%20Own%20Widget.htm\r
+ * \r
+ * @author Jihoon Song {@literal <jihoon80.song@samsung.com>} (S-Core)\r
+ */\r
+public class PictureLabel extends Canvas {\r
+       private Image image;\r
+       private String text;\r
+       private boolean selected;\r
+       private List<ImageClickedListener> imageClickedListeners = new ArrayList<ImageClickedListener>();\r
+\r
+       public PictureLabel(Composite parent, int style) {\r
+               super(parent, style);\r
+\r
+               // default background color\r
+               setBackground(getDisplay().getSystemColor(SWT.COLOR_WHITE));\r
+\r
+               // add listener\r
+               addDisposeListener(new DisposeListener() {\r
+                       public void widgetDisposed(DisposeEvent e) {}\r
+               });\r
+               addPaintListener(new PaintListener() {\r
+                       public void paintControl(PaintEvent e) {\r
+                               PictureLabel.this.paintControl(e);\r
+                       }\r
+               });\r
+               addMouseListener(new MouseAdapter() {\r
+                       public void mouseDown(MouseEvent event) {\r
+                               if (event.button == java.awt.event.MouseEvent.BUTTON1) {\r
+                                       PictureLabel.this.mouseDown(event);\r
+                               }\r
+                       }\r
+               });\r
+               addMouseTrackListener(new MouseTrackAdapter() {\r
+                       public void mouseEnter(MouseEvent event) {\r
+                               PictureLabel.this.mouseEnter(event);\r
+                       }\r
+                       public void mouseExit(MouseEvent event) {\r
+                               PictureLabel.this.mouseExit(event);\r
+                       }\r
+               });\r
+\r
+               setSelection(false);\r
+       }\r
+\r
+       public void mouseDown(MouseEvent event) {\r
+               ImageClickedEvent e = new ImageClickedEvent(this, event.x, event.y);\r
+               setSelection(!selected);\r
+               for (ImageClickedListener listener : imageClickedListeners) {\r
+                       listener.imageClicked(e);\r
+               }\r
+       }\r
+\r
+       protected void mouseEnter(MouseEvent event) {\r
+               setBackground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\r
+       }\r
+\r
+       protected void mouseExit(MouseEvent event) {\r
+               setBackground(getDisplay().getSystemColor(selected ? SWT.COLOR_GRAY : SWT.COLOR_WHITE));\r
+       }\r
+\r
+       public void setSelection(boolean selected) {\r
+               this.selected = selected;\r
+               setBackground(getDisplay().getSystemColor(selected ? SWT.COLOR_GRAY : SWT.COLOR_WHITE));\r
+       }\r
+\r
+       public void addImageClickedListener(ImageClickedListener listener) {\r
+               imageClickedListeners.add(listener);\r
+       }\r
+\r
+       public void removeImageClickedListener(ImageClickedListener listener) {\r
+               imageClickedListeners.remove(listener);\r
+       }\r
+\r
+       void paintControl(PaintEvent e) {\r
+               GC gc = e.gc;\r
+               int x = 1;\r
+               int y = 1;\r
+               int clientAreaWidth = getClientArea().width;\r
+               int textWidth = gc.stringExtent(text).x;\r
+               int imageWidth = image.getBounds().width;\r
+               int imageHeght = image.getBounds().height;\r
+               int maxWidth = Math.max(Math.max(imageWidth, imageWidth), clientAreaWidth);\r
+\r
+               if ((image != null) & (text != null)) {\r
+                       x = 1 + (maxWidth - imageWidth) / 2;\r
+                       gc.drawImage(image, x, y);\r
+                       y = y + imageHeght + 5;\r
+                       x = 1 + (maxWidth - textWidth) / 2;\r
+                       gc.drawText(text, x, y);\r
+               } else if (image != null) {\r
+                       x = 1 + (maxWidth - imageWidth) / 2;\r
+                       gc.drawImage(image, x, 1);\r
+               } else if (text != null) {\r
+                       x = 1 + (maxWidth - textWidth) / 2;\r
+                       gc.drawText(text, x, 1);\r
+               }\r
+               gc.dispose();\r
+       }\r
+\r
+       public Image getImage() {\r
+               return image;\r
+       }\r
+\r
+       public void setImage(Image image) {\r
+               this.image = image;\r
+               redraw();\r
+       }\r
+\r
+       public String getText() {\r
+               return text;\r
+       }\r
+\r
+       public void setText(String text) {\r
+               this.text = text;\r
+               redraw();\r
+       }\r
+\r
+       public Point computeSize(int wHint, int hHint, boolean changed) {\r
+               int width = 0;\r
+               int height = 0;\r
+               if (image != null && text != null) {\r
+                       GC gc = new GC(this);\r
+                       int textWidth = gc.stringExtent(text).x;\r
+                       int textHeight = gc.stringExtent(text).y;\r
+                       int imageWidth = image.getBounds().width;\r
+                       int imageHeight = image.getBounds().height;\r
+                       gc.dispose();\r
+                       if (imageWidth >= textWidth)\r
+                       {\r
+                               width = imageWidth + 2;\r
+                       }\r
+                       else\r
+                       {\r
+                               width = textWidth + 2;\r
+                       }\r
+                       height = textHeight + imageHeight + 7;\r
+               } else if (image != null) {\r
+                       Rectangle bounds = image.getBounds();\r
+                       width = bounds.width + 2;\r
+                       height = bounds.height + 2;\r
+               } else if (text != null) {\r
+                       GC gc = new GC(this);\r
+                       Point extent = gc.stringExtent(text);\r
+                       gc.dispose();\r
+                       width = extent.x + 2;\r
+                       height = extent.y + 2;\r
+               }\r
+               if (wHint != -1)\r
+               {\r
+                       width = wHint;\r
+               }\r
+               if (hHint != -1)\r
+               {\r
+                       height = hHint;\r
+               }\r
+\r
+               return new Point(width + 2, height + 2);\r
+       }\r
+\r
+       public boolean isSelected() {\r
+               return selected;\r
+       }\r
+}\r
+\r
+class ImageClickedEvent extends java.util.EventObject {\r
+       \r
+       private static final long serialVersionUID = 2923125560667763769L;\r
+       \r
+       public int x, y;\r
+\r
+       public ImageClickedEvent(Object source, int x, int y) {\r
+               super(source);\r
+\r
+               this.x = x;\r
+               this.y = y;\r
+       }\r
+}\r
+\r
+interface ImageClickedListener extends java.util.EventListener {\r
+       public void imageClicked(ImageClickedEvent event);\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/util/ArrayUtil.java b/org.tizen.common/src/org/tizen/common/util/ArrayUtil.java
new file mode 100755 (executable)
index 0000000..c259b33
--- /dev/null
@@ -0,0 +1,1121 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.ConcurrentModificationException;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+/**
+ * ArrayUtil.
+ * 
+ * Helper related to array
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class ArrayUtil
+{
+       /**
+        * Empty {@link Object} array
+        */
+       public static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
+       
+
+       /**
+        * <p>
+        * check <code>collection</code> has no element.
+        * 
+        * use without null check.
+        * 
+        * Old style
+        * 
+        * <pre>
+        * Object[] array = null;
+        * ...
+        * if ( null != array && 0 < array.length ) {
+        *  ...
+        * }
+        * </pre>
+        * 
+        * Usage :
+        * <p>
+        * 
+        * <pre>
+        * Object[] array = null;
+        * ...
+        * if ( !ArrayUtil.isEmpty( array ) ) {
+        *      ...
+        * }
+        * </pre>
+        * 
+        * or "import static" style if you use JDK6
+        * 
+        * </pre>
+        * import static org.tizen.common.util.CollectionUtil.isEmpty;
+        * ...
+        *  
+        * Object[] array = null;
+        * ...
+        * if ( !isEmpty( array ) ) {
+        *      ...
+        * }
+        * </pre>
+        * 
+        * @param array {@link Collection} to check
+        * 
+        * @return value if collection is empty
+        */
+       public static <T>
+       boolean
+       isEmpty(
+               final T[] array
+       )
+       {
+               if ( null == array )
+               {
+                       return true;
+               }
+               
+               return (0 == array.length);
+       }
+       
+       /**
+        * <p>
+        * Return first element in <code>array</code><br>
+        * 
+        * Return <code>null</code> if <code>array</code> is null or empty
+        * </p>
+        * 
+        * @param <T> type of element in <code>array</code>
+        * @param array object array to check
+        * 
+        * @return first elemtn in <code>array</code>
+        */
+       public static <T>
+       T
+       pickupFirst( T[] array )
+       {
+               if ( isEmpty( array ) )
+               {
+                       return null;
+               }
+               
+               return array[0];
+       }
+
+       /**
+        * <p>
+        * Return last element in <code>array</code><br>
+        * 
+        * Return <code>null</code> if <code>array</code> is null or empty
+        * </p>
+        * 
+        * @param <T> type of element in <code>array</code>
+        * @param array object array to check
+        * 
+        * @return last elemtn in <code>array</code>
+        */
+       public static <T>
+       T
+       pickupLast( T[] array )
+       {
+               if ( isEmpty( array ) )
+               {
+                       return null;
+               }
+               
+               return array[array.length - 1];
+       }
+       
+       /**
+        * Create array with <code>length</code>
+        * 
+        * @param <T> type of element in array to create
+        * @param type {@link Class}
+        * @param length array size
+        * 
+        * @return created array
+        */
+       @SuppressWarnings("unchecked")
+       public static <T>
+       T[] newArray( Class<? extends T> type, int length)
+       {
+               return (T[]) Array.newInstance( type, length);
+       }
+
+       /**
+        * {@link Iterator} for array
+        *
+        * @param <K> element type in array
+        */
+       public static class
+       ArrayIterator<K>
+       implements Iterator<K>
+       {
+               /**
+                * cloned array
+                */
+               protected final K[] objs;
+
+               /**
+                * original array
+                */
+               protected final K[] origin;
+
+               /**
+                * current element index
+                */
+               protected int index = 0;
+               
+               /**
+                * Constructor with array
+                * 
+                * @param objs array to iterate
+                */
+               public
+               ArrayIterator(
+                       final K[] objs
+               )
+               {
+                       this.origin = objs;
+                       
+                       this.objs = ( null == origin )?null:origin.clone();
+               }
+
+               /* (non-Javadoc)
+                * @see java.util.Iterator#hasNext()
+                */
+               @Override
+               public
+               boolean
+               hasNext()
+               {
+                       if ( null == this.objs )
+                       {
+                               return false;
+                       }
+                       return ( index < this.objs.length );
+               }
+
+               /* (non-Javadoc)
+                * @see java.util.Iterator#next()
+                */
+               @Override
+               public
+               K
+               next()
+               {
+                       if ( null == this.objs )
+                       {
+                               throw new NoSuchElementException();
+                       }
+                       if ( this.objs.length <= index  )
+                       {
+                               throw new NoSuchElementException();
+                       }
+                       
+                       if ( objs[index] != origin[index] ) {
+                               throw new ConcurrentModificationException();
+                       }
+                       return this.objs[index++];
+               }
+
+               /* (non-Javadoc)
+                * @see java.util.Iterator#remove()
+                */
+               @Override
+               public
+               void
+               remove()
+               {
+                       throw new UnsupportedOperationException();
+               }
+
+       }
+       
+       /**
+        * Create and return {@link Iterator} for <code>array</code>
+        * 
+        * @param <T> iteraing element's type
+        * @param array array to iterate
+        * 
+        * @return {@link Iterator} for <code>array</code>
+        */
+       public static <T> Iterator<T> iterator( final T[] array )
+       {
+               return new ArrayIterator<T>( array );
+       }
+       
+       /**
+        * <p>
+        * run <code>runner</code> iterateing element of <code>array</code>.
+        * 
+        * use without null-check for <code>array</code>
+        * 
+        * delegate error handling to <code>array</code>
+        * </p>
+        * 
+        * <pre>
+        * 
+        * ArrayUtil.iterate(
+        *      Arrays.asList( "hello", "Hello", "World", null, "Test" ),
+        *      new IteratingRunner<String>() {
+        *              public void run( String arg ) {
+        *                      ...
+        *              }
+        *      }
+        * );
+        * 
+        * </pre>
+        * 
+        * @param <T> type of element in <code>array</code>
+        * @param array array containing element
+        * @param runner {@link Runnable} to execute
+        * 
+        * @throws InvocationTargetException when <code>runner</code>'s {@link Runnable#run()} throws exception 
+        * 
+        * @see {@link #iterate(Object[], IteratingRunner, boolean)}
+        * @see FilterIterator
+        */
+       public static <T>
+       void
+       iterate(
+               final T[] array,
+               final IteratingRunner<T> runner
+       )
+       {
+               try
+               {
+                       iterate( array, runner, true );
+               } catch ( final InvocationTargetException e)
+               {
+                       // Be never reached
+                       throw new IllegalStateException( e );
+               }
+       }
+       
+       /**
+        * <p>
+        * run <code>runner</code> iterateing element of <code>array</code>.
+        * 
+        * use without null-check for <code>array</code>
+        * 
+        * delegate error handling to <code>runner</code>
+        * 
+        * </p>
+        * <pre>
+        * 
+        * ArrayUtil.iterate(
+        *      Arrays.asList( "hello", "Hello", "World", null, "Test" ),
+        *      new IteratingRunner<String>() {
+        *              public void run( String arg ) {
+        *                      ...
+        *              }
+        *      },
+        *      true
+        * );
+        * 
+        * </pre>
+        * 
+        * @param <T> type of element in <code>array</code>
+        * @param array array containing element
+        * @param runner {@link Runnable} to execute
+        * @param bForceProcess flag to iterate continuously when exception occurs
+        * 
+        * @throws InvocationTargetException when <code>runner</code>'s {@link Runnable#run()} throws exception 
+        * 
+        * @see FilterIterator
+        */
+       public static <T>
+       void
+       iterate(
+               final T[] array,
+               final IteratingRunner<T> runner,
+               final boolean bForceProcess
+       )
+       throws InvocationTargetException
+       {
+               if ( null == runner )
+               {
+                       return ;
+               }
+               
+               for ( final T arg : safe( array ) )
+               {
+                       if ( null == arg && !bForceProcess )
+                       {
+                               continue ;
+                       }
+                       try
+                       {
+                               runner.run( arg );
+                       } catch ( Throwable e )
+                       {
+                               if ( !bForceProcess )
+                               {
+                                       throw new InvocationTargetException( e );
+                               }
+                       }
+               }
+       }
+       
+       /**
+        * <p>
+        * Fiter <code>array</code> and return filtered array
+        * 
+        * Ignore exception in filtering logic
+        * </p>
+        * 
+        * @param <T> type of element in <code>array</code>
+        * @param array array to filter
+        * @param runner object to determine if filter
+        */
+       public static <T>
+       T[]
+       filter(
+               final T[] array,
+               final IteratingAcceptor<T> runner
+       )
+       {
+               try
+               {
+                       return filter( array, runner, true );
+               } catch ( final InvocationTargetException e )
+               {
+                       // Be never reached
+                       throw new IllegalStateException( e );
+               }
+       }
+       /**
+        * <p>
+        * Fiter <code>array</code> and return filtered array
+        * 
+        * determined if stop or keep going using <code>bForceProcess</code> in case of exception.
+        * </p>
+        * 
+        * @param <T> type of element in <code>array</code>
+        * @param array array to filter
+        * @param runner object to determine if filter
+        * @param bForceProcess flag to keep going when exception occurs
+        * 
+        * @throws InvocationTargetException when <code>runner</code>'s {@link IteratingAcceptor#accept(Object)} throws exception 
+        */
+       @SuppressWarnings("unchecked")
+       public static <T>
+       T[]
+       filter(
+               final T[] array,
+               final IteratingAcceptor<T> runner,
+               final boolean bForceProcess
+       ) throws InvocationTargetException
+       {
+               final ArrayList<T> list = new ArrayList<T>();
+               
+               for ( final T arg : safe( array ) )
+               {
+                       if ( null == arg && !bForceProcess )
+                       {
+                               continue ;
+                       }
+                       try
+                       {
+                               if ( runner.accept( arg ) )
+                               {
+                                       list.add( arg );
+                               }
+                       } catch ( Throwable e )
+                       {
+                               if ( !bForceProcess )
+                               {
+                                       throw new InvocationTargetException( e );
+                               }
+                       }
+
+               }
+               
+               return (T[]) list.toArray( newArray( array.getClass().getComponentType(), list.size() ) );
+       }
+
+       
+       /**
+        * Convert <code>source</code> to {@link Object[]}
+        * 
+        * throw {@link IllegalArgumentException} if source is not array type
+        * 
+        * @param source object to convert 
+        * 
+        * @return object to converted
+        */
+       public static
+       Object[]
+       toObjectArray(
+               final Object source
+       )
+       {
+               if ( source instanceof Object[] )
+               {
+                       return ( Object[] )source; 
+               }
+
+               if ( null == source )
+               {
+                       return EMPTY_OBJECT_ARRAY; 
+               }
+               
+               if ( !source.getClass().isArray() )
+               {
+                       throw new IllegalArgumentException( "source must be an array");
+               }
+
+               final int length = Array.getLength( source );
+               if ( 0 == length )
+               {
+                       return EMPTY_OBJECT_ARRAY; 
+               }
+               
+               Class<?> wrapperType = null;
+               for ( int i = 0 ; null == wrapperType && i < length ; ++i )
+               {
+                       Object obj = Array.get( source, 0 );
+                       if ( null == obj )
+                       {
+                               continue;
+                       }
+                       wrapperType = obj.getClass();
+               }
+               if ( null == wrapperType )
+               {
+                       return (Object[]) source;
+               }
+               
+               final Object[] newArray =
+                       (Object[]) Array.newInstance( wrapperType, length );
+               for( int i=0 ; i<length ; ++i )
+               {
+                       newArray[i] = Array.get( source, i );
+               }
+               
+               return newArray;
+       }
+       
+       /**
+        * Return size if object is array or {@link Collection}
+        * 
+        * Return <code>0</code> in case of the other type
+        * 
+        * @param obj object to check
+        * 
+        * @return size
+        */
+       public static
+       int
+       size(
+               final Object obj
+       )
+       {
+               if ( obj instanceof Object[] )
+               {
+                       return size( ( Object[] ) obj );
+               }
+               else if ( obj instanceof boolean[] )
+               {
+                       return size( ( boolean[] ) obj );
+               }
+               else if ( obj instanceof byte[] )
+               {
+                       return size( ( byte[] )obj );
+               }
+               else if ( obj instanceof char[] )
+               {
+                       return size( ( char[] ) obj );
+               }
+               else if ( obj instanceof short[] )
+               {
+                       return size( ( short[] )obj );
+               }
+               else if ( obj instanceof int[] )
+               {
+                       return size( (int[] ) obj );
+               }
+               else if ( obj instanceof long[] )
+               {
+                       return size( ( long[] ) obj );
+               }
+               else if ( obj instanceof float[] )
+               {
+                       return size( (float[] ) obj );
+               }
+               else if ( obj instanceof double[] )
+               {
+                       return size( ( double[] ) obj );
+               }
+               else if ( obj instanceof Collection )
+               {
+                       return CollectionUtil.size( (Collection<?>) obj );
+               }
+               return 0;
+       
+       }
+
+       /**
+        * Return <code>objs</code>'s length
+        * 
+        * Return 0 if <code>objs</code> is null.
+        * 
+        * @param objs boolean array object
+        * 
+        * @return size of array
+        */
+       public static
+       int
+       size(
+               final boolean[] objs
+       ) {
+               if ( null == objs )
+               {
+                       return 0;
+               }
+               return objs.length;
+       }
+       
+       /**
+        * Return <code>objs</code>'s length
+        * 
+        * Return 0 if <code>objs</code> is null.
+        * 
+        * @param objs byte array object
+        * 
+        * @return size of array
+        */
+       public static
+       int
+       size(
+               final byte[] objs
+       ) {
+               if ( null == objs )
+               {
+                       return 0;
+               }
+               return objs.length;
+       }
+       
+       
+       /**
+        * Return <code>objs</code>'s length
+        * 
+        * Return 0 if <code>objs</code> is null.
+        * 
+        * @param objs char array object
+        * 
+        * @return size of array
+        */
+       public static
+       int
+       size(
+               final char[] objs
+       ) {
+               if ( null == objs )
+               {
+                       return 0;
+               }
+               return objs.length;
+       }
+       
+       /**
+        * Return <code>objs</code>'s length
+        * 
+        * Return 0 if <code>objs</code> is null.
+        * 
+        * @param objs short array object
+        * 
+        * @return size of array
+        */
+       public static
+       int
+       size(
+               final short[] objs
+       ) {
+               if ( null == objs )
+               {
+                       return 0;
+               }
+               return objs.length;
+       }
+       
+       /**
+        * Return <code>objs</code>'s length
+        * 
+        * Return 0 if <code>objs</code> is null.
+        * 
+        * @param objs int array object
+        * 
+        * @return size of array
+        */
+       public static
+       int
+       size(
+               final int[] objs
+       ) {
+               if ( null == objs )
+               {
+                       return 0;
+               }
+               return objs.length;
+       }
+       
+       /**
+        * Return <code>objs</code>'s length
+        * 
+        * Return 0 if <code>objs</code> is null.
+        * 
+        * @param objs long array object
+        * 
+        * @return size of array
+        */
+       public static
+       int
+       size(
+               final long[] objs
+       ) {
+               if ( null == objs )
+               {
+                       return 0;
+               }
+               return objs.length;
+       }
+       
+       /**
+        * Return <code>objs</code>'s length
+        * 
+        * Return 0 if <code>objs</code> is null.
+        * 
+        * @param objs float array object
+        * 
+        * @return size of array
+        */
+       public static
+       int
+       size(
+               final float[] objs
+       ) {
+               if ( null == objs )
+               {
+                       return 0;
+               }
+               return objs.length;
+       }
+       
+       /**
+        * Return <code>objs</code>'s length
+        * 
+        * Return 0 if <code>objs</code> is null.
+        * 
+        * @param objs double array object
+        * 
+        * @return size of array
+        */
+       public static
+       int
+       size(
+               final double[] objs
+       ) {
+               if ( null == objs )
+               {
+                       return 0;
+               }
+               return objs.length;
+       }
+       
+       /**
+        * Return <code>objs</code>'s length
+        * 
+        * Return 0 if <code>objs</code> is null.
+        * 
+        * @param <T> type of array
+        * @param objs T type array object
+        * 
+        * @return size of array
+        */
+       public static <T>
+       int
+       size(
+               final T[] objs
+       ) {
+               if ( null == objs )
+               {
+                       return 0;
+               }
+               return objs.length;
+       }
+
+       /**
+        * add <code>obj</code> to <code>array</code>
+        * 
+        * Return array having only <code>obj</code> if <code>array</code> is <code>null</code>
+        * 
+        * @param array array to add element
+        * @param obj new element to add
+        * 
+        * @return added array
+        */
+       @SuppressWarnings("unchecked")
+       public static <T> T[]
+       add(
+               final T[] array,
+               final T obj
+       )
+       {
+               Class<?> compType = Object.class;
+               if ( null != array )
+               {
+                       compType = array.getClass().getComponentType();
+               }
+               else if ( null != obj )
+               {
+                       compType = obj.getClass();
+               }
+
+               final int newArrLength = size( array ) + 1;
+               final T[] newArr = 
+                       (T[]) Array.newInstance( compType, newArrLength );
+               
+               if ( null != array )
+               {
+                       System.arraycopy( array, 0, newArr, 0, array.length );
+               }
+               newArr[newArrLength - 1] = obj;
+               return newArr;
+       }
+       
+       /**
+        * remove elements whose index is between <code>startIndex</code> and <code>endIndex</code>
+        * 
+        * and return applied array
+        * 
+        * @param <T> type of array element
+        * @param array array to remove elements
+        * @param startIndex start index of range to remove
+        * @param endIndex end index of range to remove
+        * 
+        * @return change applied new array
+        * 
+        * @throws ArrayIndexOutOfBoundsException 
+        *              if <code>startIndex</code> or <code>endIndex</code> is not in range of array
+        * @throws IllegalArgumentException
+        *              if <code>startIndex</code> is greater than <code>endIndex</code>
+        */
+       @SuppressWarnings("unchecked")
+       public static <T> T[]
+       remove(
+               final Object[] array,
+               final int start,
+               final int end
+       )
+       {
+           Assert.notNull( array );
+               Assert.isTrue(
+                       start <= end,
+                       "start indnex(" + start + ") is greater than end index(" + end + ")"
+               );
+               
+               int startIndex = Math.max( 0, start );
+               int endIndex = Math.min( array.length, end );
+               if ( endIndex <= startIndex )
+               {
+                       return (T[]) array;
+               }
+               
+               final Class<?> compType = array.getClass().getComponentType();
+               
+               final int removeSize = endIndex - startIndex;
+
+               final int newArrLength = size( array ) - removeSize;
+               
+               final Object[] newArr = 
+                       (Object[]) Array.newInstance( compType, newArrLength );
+               
+               System.arraycopy( array, 0, newArr, 0, startIndex );
+               System.arraycopy( array, endIndex, newArr, startIndex, array.length-endIndex );
+               
+               return (T[]) newArr;
+       }
+
+       /**
+        * remove elements whose index is <code>index</code>
+        * 
+        * and return applied array
+        *
+        * @param <T> type of array element
+        * @param array array to remove elements
+        * @param index index to remove
+        * 
+        * @return change applied new array
+        * 
+        * @throws ArrayIndexOutOfBoundsException 
+        *              if <code>index</code> is not in range of array
+        */
+       public static <T> T[]
+       remove(
+               final Object[] array,
+               final int index
+       )
+       {
+               return remove( array, index, index + 1);
+       }
+
+       /**
+        * Check if <code>array</code> contains <code>element</code>
+        * 
+        * @param array array to check
+        * @param element object to check
+        * 
+        * @return <code>true</code> if <code>collection</code> contain <code>element</code>
+        */
+       public static <K, V>
+       boolean
+       contains(
+               final K[] array,
+               final V element
+       )
+       {
+               if ( null == array )
+               {
+                       return false;
+               }
+               
+               for ( final Object candidate : array )
+               {
+                       if ( ObjectUtil.equals( candidate, element ) )
+                       {
+                               return true; 
+                       }
+               }
+               return false;
+       }
+       
+       /**
+        * Return <code>index</code> th element in <code>collection</code>
+        * 
+        * Return <code>null</code> if <code>index</code> is out of range
+        * 
+        * @param <K> array type
+        * @param array array object to access
+        * @param index array index
+        * @return <code>index</code> th element in array
+        */
+       public static <K>
+       K
+       get(
+               final K[] array,
+               final int index
+       )
+       {
+               if ( null == array )
+               {
+                       return null;
+               }
+               if ( index < 0 )
+               {
+                       return null;
+               }
+               if ( array.length <= index )
+               {
+                       return null;
+               }
+               
+               return array[index];
+       }
+
+       /**
+        * Convert <code>array</code> to {@link Boolean[]}
+        * 
+        * @param array array to convert
+        * 
+        * @return converted array
+        */
+       public static Boolean[] convertToWrapper( final boolean[] array )
+       {
+               final int nArray = size( array );
+               final Boolean[] ret = new Boolean[nArray];
+               
+               for ( int i = 0 ; i < nArray ; ++i )
+               {
+                       ret[i] = array[i];
+               }
+               
+               return ret;
+       }
+
+       /**
+        * Convert <code>array</code> to {@link Byte[]}
+        * 
+        * @param array array to convert
+        * 
+        * @return converted array
+        */
+       public static Byte[] convertToWrapper( final byte[] array )
+       {
+               final int nArray = size( array );
+               final Byte[] ret = new Byte[nArray];
+               
+               for ( int i = 0 ; i < nArray ; ++i )
+               {
+                       ret[i] = array[i];
+               }
+               
+               return ret;
+       }
+       
+       /**
+        * Convert <code>array</code> to {@link Character[]}
+        * 
+        * @param array array to convert
+        * 
+        * @return converted array
+        */
+       public static Character[] convertToWrapper( final char[] array )
+       {
+               final int nArray = size( array );
+               final Character[] ret = new Character[nArray];
+               
+               for ( int i = 0 ; i < nArray ; ++i )
+               {
+                       ret[i] = array[i];
+               }
+               
+               return ret;
+       }
+       
+       
+       /**
+        * Convert <code>array</code> to {@link Short[]}
+        * 
+        * @param array array to convert
+        * 
+        * @return converted array
+        */
+       public static Short[] convertToWrapper( final short[] array )
+       {
+               final int nArray = size( array );
+               final Short[] ret = new Short[nArray];
+               
+               for ( int i = 0 ; i < nArray ; ++i )
+               {
+                       ret[i] = array[i];
+               }
+               
+               return ret;
+       }
+       
+       /**
+        * Convert <code>array</code> to {@link Integer[]}
+        * 
+        * @param array array to convert
+        * 
+        * @return converted array
+        */
+       public static Integer[] convertToWrapper( final int[] array )
+       {
+               final int nArray = size( array );
+               final Integer[] ret = new Integer[nArray];
+               
+               for ( int i = 0 ; i < nArray ; ++i )
+               {
+                       ret[i] = array[i];
+               }
+               
+               return ret;
+       }
+
+       /**
+        * Convert <code>array</code> to {@link Long[]}
+        * 
+        * @param array array to convert
+        * 
+        * @return converted array
+        */
+       public static Long[] convertToWrapper( final long[] array )
+       {
+               final int nArray = size( array );
+               final Long[] ret = new Long[nArray];
+               
+               for ( int i = 0 ; i < nArray ; ++i )
+               {
+                       ret[i] = array[i];
+               }
+               
+               return ret;
+       }
+
+       /**
+        * Convert <code>array</code> to {@link Float[]}
+        * 
+        * @param array array to convert
+        * 
+        * @return converted array
+        */
+       public static Float[] convertToWrapper( final float[] array )
+       {
+               final int nArray = size( array );
+               final Float[] ret = new Float[nArray];
+               
+               for ( int i = 0 ; i < nArray ; ++i )
+               {
+                       ret[i] = array[i];
+               }
+               
+               return ret;
+       }
+
+       /**
+        * Convert <code>array</code> to {@link Double[]}
+        * 
+        * @param array array to convert
+        * 
+        * @return converted array
+        */
+       public static Double[] convertToWrapper( final double[] array )
+       {
+               final int nArray = size( array );
+               final Double[] ret = new Double[nArray];
+               
+               for ( int i = 0 ; i < nArray ; ++i )
+               {
+                       ret[i] = array[i];
+               }
+               
+               return ret;
+       }
+
+       @SuppressWarnings("unchecked")
+    public static <T> T[] safe( T[] unsafe )
+       {
+           return (T[]) ObjectUtil.nvl( unsafe, EMPTY_OBJECT_ARRAY );
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/Assert.java b/org.tizen.common/src/org/tizen/common/util/Assert.java
new file mode 100755 (executable)
index 0000000..b9c4a0a
--- /dev/null
@@ -0,0 +1,837 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import java.text.MessageFormat;
+import java.util.Collection;
+import java.util.Map;
+
+/**
+ * Assert
+ * 
+ * Helper for assertion
+ * 
+ * Assert following
+ * <ul>
+ * <li>boolean expression</li>
+ * <li>null object</li>
+ * <li>object equality</li>
+ * <li>string</li>
+ * <li>Collection</li>
+ * <li>Map</li>
+ * <li>object type</li>
+ * </ul>
+ */
+public class 
+Assert
+{
+       protected Assert() { }
+
+       /**
+        * Encapsulated method in case of failure in assertion
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message.
+        * 
+        * @param msg exception's message to throw
+        */
+       public static
+       void
+       fail(
+               final Object msg
+       )
+       {
+               if ( msg instanceof String )
+               {
+                       throw new IllegalArgumentException( (String) msg );
+               } else if ( null != msg )
+               {
+                       throw new IllegalArgumentException( msg.toString() );
+               }
+       }
+
+       /**
+        * Assert that <code>exp</code> is <code>true</code>
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message 
+        * 
+        * if <code>exp</code> is <code>false</code>
+        * 
+        * @param exp boolean value to check
+        * @param msg exception's message to throw
+        * 
+        * @see #fail(Object)
+        */
+       public static
+       void
+       isTrue(
+               final boolean exp,
+               final String msg
+       )
+       {
+               if ( exp )
+               {
+                       return ;
+               }
+               fail( msg );
+       }
+       
+       /**
+        * Assert that <code>exp</code> is <code>false</code>
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message 
+        * 
+        * if <code>exp</code> is <code>true</code>
+        * 
+        * @param exp boolean value to check
+        * @param msg exception's message to throw
+        * 
+        * @see #fail(Object)
+        */
+       public static
+       void
+       isFalse(
+               final boolean exp,
+               final String msg
+       )
+       {
+               if ( !exp )
+               {
+                       return ;
+               }
+               fail( msg );
+       }
+       
+       /**
+        * Assert that <code>exp</code> is <code>true</code>
+        * 
+        * Throw {@link IllegalArgumentException} with "Expression must be true" message 
+        * 
+        * if <code>exp</code> is <code>false</code>
+        * 
+        * @param exp boolean value to check
+        * 
+        * @see #isTrue(boolean, String)
+        */
+       public static void 
+       isTrue(
+               final boolean exp
+       )
+       {
+               isTrue( exp, "Expression must be true" );
+       }
+       
+       /**
+        * Assert that <code>exp</code> is <code>false</code>
+        * 
+        * Throw {@link IllegalArgumentException} with "Expression must be false" message 
+        * 
+        * if <code>exp</code> is <code>true</code>
+        * 
+        * @param exp boolean value to check
+        * 
+        * @see #isFalse(boolean, String)
+        */
+       public static 
+       void 
+       isFalse(
+               final boolean exp
+       )
+       {
+               isFalse( exp, "Expression must be false" );
+       }
+       
+       /**
+        * Assert that <code>obj</code> is <code>null</code>
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message 
+        * 
+        * if <code>obj</code> is not <code>null</code>
+        * 
+        * @param obj object to check
+        * @param msg exception's message to throw
+        * 
+        * @see #isTrue(boolean, String)
+        */
+       public static
+       void
+       isNull(
+               final Object obj,
+               final String msg
+       )
+       {
+               isTrue( null == obj, msg );
+       }
+
+       /**
+        * Assert that <code>obj</code> is <code>null</code>
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message 
+        * 
+        * if <code>obj</code> is <code>null</code>
+        * 
+        * @param obj object to check
+        * @param msg exception's message to throw
+        * 
+        * @see #isFalse(boolean, String)
+        */
+       public static
+       void
+       notNull(
+               final Object obj,
+               final String msg
+       )
+       {
+               isFalse( null == obj, msg );
+       }
+       
+       /**
+        * Assert that <code>obj</code> is <code>null</code>
+        * 
+        * Throw {@link IllegalArgumentException} with "Object must be null" message 
+        * 
+        * if <code>obj</code> is not <code>null</code>
+        * 
+        * @param obj object to check
+        * 
+        * @see #isNull(Object, String)
+        */
+       public static
+       void
+       isNull(
+               final Object obj
+       )
+       {
+               isNull( obj, "Object must be null" );
+       }
+       
+       /**
+        * Assert that <code>obj</code> is not <code>null</code>
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message 
+        * 
+        * if <code>obj</code> is <code>null</code>
+        * 
+        * @param obj object to check
+        * 
+        * @see #notNull(Object, Object)
+        */
+       public static 
+       void 
+       notNull(
+               final Object obj
+       )
+       {
+               notNull( obj, "Object must NOT be null" );
+       }
+       
+       
+       /**
+        * Assert that two objects( <code>obj1</code> and <code>obj2</code> ) is equal.
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message 
+        * 
+        * if two objects is not equal
+        * 
+        * @param obj1 first object to compare
+        * @param obj2 second object to compare
+        * @param msg exception's message to throw
+        * 
+        * @see #fail(Object)
+        */
+       public static
+       void
+       isEqual(
+               final Object obj1,
+               final Object obj2,
+               final String message
+       )
+       {
+               if ( ObjectUtil.equals( obj1, obj2 ) )
+               {
+                       return ;
+               }
+               
+               fail( message );
+       }
+       
+       
+       /**
+        * Assert that two objects( <code>obj1</code> and <code>obj2</code> ) is equal.
+        * 
+        * Throw {@link IllegalArgumentException} with "Objects are not equal" message 
+        * 
+        * if two objects is not equal
+        * 
+        * @param obj1 first object to compare
+        * @param obj2 second object to compare
+        * 
+        * @see #isEqual(Object, Object, String)
+        */
+       public static
+       void
+       isEqual(
+               final Object obj1,
+               final Object obj2
+       )
+       {
+               isEqual( obj1, obj2, "Objects are not equal" );
+       }
+       
+       /**
+        * Assert that <code>text</code> has any readible character
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message
+        * 
+        * if <code>text</code> is <code>null</code> or empty string.
+        *  
+        * @param text string to check
+        * @param msg exception's message to throw
+        * 
+        * @see #fail(Object)
+        */
+       public static
+       void
+       hasLength(
+               final String text,
+               final String msg
+       )
+       {
+               if( StringUtil.hasLength( text ) )
+               {
+                       return ; 
+               }
+               fail( msg ); 
+       }
+       /**
+        * Assert that <code>text</code> has any readible character
+        * 
+        * Throw {@link IllegalArgumentException} with "String argument must have length; it must not be null or empty" message
+        * 
+        * if <code>text</code> is <code>null</code> or empty string.
+        *  
+        * @param text string to check
+        * 
+        * @see #hasLength(String, String)
+        */
+       public static
+       void
+       hasLength(
+               final String text
+       )
+       {
+               hasLength( text, "String argument must have length; it must not be null or empty" );
+       }
+
+
+       /**
+        * Assert that <code>text</code> has any readible character
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message
+        * 
+        * if <code>text</code> is <code>null</code>, empty string or string containing only unvisible character
+        *  
+        * @param text string to check
+        * @param msg exception's message to throw
+        * 
+        * @see #fail(Object)
+        */
+       public static
+       void
+       hasText(
+               final String text,
+               final String message
+       )
+       {
+               if ( StringUtil.hasText( text ) )
+               {
+                       return ; 
+               }
+               fail( message ); 
+       }
+
+       /**
+        * Assert that <code>text</code> has any readible character
+        * 
+        * Throw {@link IllegalArgumentException} with "String argument must have text; it must not be null, empty, or blank" message
+        * 
+        * if <code>text</code> is <code>null</code>, empty string or string containing only unvisible character
+        *  
+        * @param text string to check
+        * 
+        * @see #hasText(String, String)
+        */
+       public static
+       void
+       hasText(
+               final String text
+       )
+       {
+               hasText( text, "String argument must have text; it must not be null, empty, or blank" );
+       }
+
+       /**
+        * Assert that <code>textToSearch</code> does not have <code>substring</code> in part.
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message
+        * 
+        * if assertion is failure.
+        * 
+        * Assertion is successful if <code>textToSearch</code> or <code>substring</code> is <code>null</code>.
+        * 
+        * @param textToSearch search target string
+        * @param substring keyword to search
+        * @param msg exception's message to throw
+        * 
+        * @see String#contains(CharSequence)
+        */
+       public static
+       void
+       doesNotContain(
+               final String textToSearch,
+               final String substring,
+               final String msg
+       )
+       {
+               if ( !StringUtil.hasLength( textToSearch ) )
+               { 
+                       return ;
+               }
+               
+               if ( !StringUtil.hasLength( substring ) )
+               {
+                       return ;
+               }
+               
+               if ( !textToSearch.contains( substring ) )
+               {
+                       return ;
+               }
+               fail( msg );
+       }
+
+       /**
+        * Assert that <code>textToSearch</code> does not have <code>substring</code> in part.
+        * 
+        * Throw {@link IllegalArgumentException} with "String argument must not contain the substring [<code>substring</code>]" message
+        * 
+        * if assertion is failure.
+        * 
+        * Assertion is successful if <code>textToSearch</code> or <code>substring</code> is <code>null</code>.
+        * 
+        * @param textToSearch search target string
+        * @param substring keyword to search
+        * 
+        * @see #doesNotContain(String, String, String)
+        */
+       public static
+       void
+       doesNotContain(
+               final String textToSearch,
+               final String substring
+       )
+       {
+               doesNotContain(
+                       textToSearch,
+                       substring,
+                       "String argument must not contain the substring [" + substring + "]"
+               );
+       }
+       
+       /**
+        * Assert that <code>textToSearch</code> has <code>substring</code> in part.
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message
+        * 
+        * if assertion is failure.
+        * 
+        * Assertion is successful if <code>textToSearch</code> or <code>substring</code> is <code>null</code>.
+        * 
+        * @param textToSearch search target string
+        * @param substring keyword to search
+        * @param msg exception's message to throw
+        * 
+        * @see String#contains(CharSequence)
+        */
+       public static
+       void
+       contains(
+               final String textToSearch,
+               final String substring,
+               final String msg
+       )
+       {
+               if ( !StringUtil.hasLength( textToSearch ) )
+               {
+                       return ;
+               }
+               if ( !StringUtil.hasLength( substring ) ) 
+               {
+                       return ;
+               }
+               if ( textToSearch.contains( substring ) ) 
+               {
+                       return ;
+               }
+               fail( msg );
+       }
+
+       /**
+        * Assert that <code>textToSearch</code> does not have <code>substring</code> in part.
+        * 
+        * Throw {@link IllegalArgumentException} with "String argument must contain the substring [<code>substring</code>]" message
+        * 
+        * if assertion is failure.
+        * 
+        * Assertion is successful if <code>textToSearch</code> or <code>substring</code> is <code>null</code>.
+        * 
+        * @param textToSearch search target string
+        * @param substring keyword to search
+        * 
+        * @see #doesContain(String, String, String)
+        */
+       public static
+       void
+       contains(
+               final String textToSearch,
+               final String substring
+       )
+       {
+               contains(
+                       textToSearch,
+                       substring,
+                       "String argument must contain the substring [" + substring + "]"
+               );
+       }
+
+       /**
+        * Assert that <code>array</code> has a element at least.
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message
+        * 
+        * if <code>array</code> is null or empty array.
+        * 
+        * @param <T> type of array elemtent
+        * @param array array object to check
+        * @param msg exception's message to throw
+        * 
+        * @see ArrayUtil#isEmpty( Object[] )
+        */
+       public static <T>
+       void
+       notEmpty(
+               final T[] array,
+               final String message
+       )
+       {
+               if( ArrayUtil.isEmpty( array ) )
+               {
+                       fail( message );
+               }
+       }
+
+       /**
+        * Assert that <code>array</code> has a element at least.
+        * 
+        * Throw {@link IllegalArgumentException} with "Array must not be empty: it must contain at least 1 element" message
+        * 
+        * if <code>array</code> is null or empty array.
+        * 
+        * @param <T> type of array elemtent
+        * @param array array object to check
+        * @param msg exception's message to throw
+        * 
+        * @see #notEmpty( Object[] )
+        */
+       public static
+       void
+       notEmpty(
+               final Object[] array
+       )
+       {
+               notEmpty( array, "Array must not be empty: it must contain at least 1 element" );
+       }
+
+       /**
+        * Assert that there is no <code>null</code> in array elements
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message
+        * 
+        * if <code>array</code> has null element.
+        * 
+        * @param array array to check
+        * @param msg exception's message to throw
+        * 
+        * @see #fail(Object)
+        */
+       public static
+       void
+       noNullElements(
+               final Object[] array,
+               final String msg
+       )
+       {
+               
+               for ( int i=0, n=ArrayUtil.size( array ) ; i<n ; ++i )
+               {
+                       if ( null != array[i] )
+                       {
+                           continue;
+                       }
+                       
+                       fail( msg ); 
+               }
+       }
+
+       /**
+        * Assert that there is no <code>null</code> in array elements
+        * 
+        * Throw {@link IllegalArgumentException} with "Array must not contain any null elements" message
+        * 
+        * if <code>array</code> has null element.
+        * 
+        * @param array array to check
+        * 
+        * @see #noNullElements(Object[], String)
+        */
+       public static
+       void
+       noNullElements(
+               final Object[] array
+       ) {
+               noNullElements( array, "Array must not contain any null elements" );
+       }
+
+       
+       /**
+        * Assert that <code>collection</code>is not empty
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message
+        * 
+        * if <code>collection</code> has no element
+        * 
+        * @param collection {@link Collection} to check
+        * @param msg exception's message to throw
+        * 
+        * @see CollectionUtil#isEmpty( Collection )
+        * @see #fail(Object)
+        */
+       public static
+       void
+       notEmpty(
+               final Collection<?> collection,
+               final String msg
+       )
+       {
+               if( !CollectionUtil.isEmpty( collection ) )
+               {
+                       return ; 
+               }
+               fail( msg ); 
+       }
+
+       /**
+        * Assert that <code>collection</code>is not empty
+        * 
+        * Throw {@link IllegalArgumentException} with "Collection must not be empty: it must contain at least 1 element" message
+        * 
+        * if <code>collection</code> has no element
+        * 
+        * @param collection {@link Collection} to check
+        * 
+        * @see #notEmpty(Collection, String)
+        */
+       public static
+       void
+       notEmpty(
+               final Collection<?> collection
+       )
+       {
+               notEmpty( collection, "Collection must not be empty: it must contain at least 1 element" );
+       }
+       
+       /**
+        * Assert that <code>map</code>is not empty
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message
+        * 
+        * if <code>map</code> has no element
+        * 
+        * @param map {@link Map} to check
+        * @param msg exception's message to throw
+        * 
+        * @see MapUtil#isEmpty( Map )
+        * @see #fail(Object)
+        */
+       public static
+       void
+       notEmpty(
+               final Map<?, ?> map,
+               final String msg
+       )
+       {
+               if ( !MapUtil.isEmpty( map ) )
+               {
+                       return ; 
+               }
+               fail( msg ); 
+       }
+
+       /**
+        * Assert that <code>map</code>is not empty
+        * 
+        * Throw {@link IllegalArgumentException} with "Map must not be empty; it must contain at least one entry" message
+        * 
+        * if <code>map</code> has no element
+        * 
+        * @param map {@link Map} to check
+        * 
+        * @see #notEmpty(Map, String)
+        */
+       public static
+       void
+       notEmpty(
+               final Map<?, ?> map
+       )
+       {
+               notEmpty( map, "Map must not be empty; it must contain at least one entry" );
+       }
+
+       /**
+        * Assert that <code>obj</code> is instance of <code>type</code>
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message
+        * 
+        * if <code>obj</code> is <code>null</code> or not instance of <code>type</code>
+        * 
+        * @param type {@link Class} to check
+        * @param obj instance object to check
+        * @param msg exception's message to throw
+        * 
+        * @see Class#isInstance(Object)
+        * @see #fail(Object)
+        */
+       public static
+       void
+       isInstanceOf(
+               final Class<?> type,
+               final Object obj,
+               final String msg
+       )
+       {
+               notNull( type, "Type to check against must not be null" );
+               if( type.isInstance( obj ) )
+               {
+                       return ; 
+               }
+               
+               fail( MessageFormat.format(
+                       "{0}, Object of class [{1}] must be aan instance of {2}",
+                       msg,
+                       (( null == obj ) ?"null":obj.getClass().getName()),
+                       type
+               ) );
+       }
+
+       /**
+        * Assert that <code>obj</code> is instance of <code>type</code>
+        * 
+        * Throw {@link IllegalArgumentException}
+        * 
+        * if <code>obj</code> is <code>null</code> or not instance of <code>type</code>
+        * 
+        * @param type {@link Class} to check
+        * @param obj instance object to check
+        * 
+        * @see #isInstanceOf(Class, Object, String)
+        */
+       public static
+       void
+       isInstanceOf(
+               final Class<?> type,
+               final Object obj
+       )
+       {
+               isInstanceOf( type, obj, "" );
+       }
+
+       /**
+        * Assert that <code>superType</code> is assignable type from <code>subType</code> instance
+        * 
+        * Throw {@link IllegalArgumentException} with <code>msg</code> message
+        * 
+        * if <code>superType</code> or <code>subType</code> is <code>null</code> or if assertion is failure
+        * 
+        * @param superType super type candidate
+        * @param subType subtype candidate
+        * @param msg exception's message to throw
+        * 
+        * @see Class#isAssignableFrom(Class)
+        * @see #fail(Object)
+        */
+       public static
+       void
+       isAssignable(
+               final Class<?> superType,
+               final Class<?> subType,
+               final String msg
+       )
+       {
+               notNull( superType, "Type to check against must not be null" );
+               notNull( subType, "Type to assign must not be null" );
+               if( superType.isAssignableFrom( subType ) )
+               {
+                       return ;
+               }
+               fail( MessageFormat.format(
+                       "{0}, {1} is not assignable to {2}",
+                       msg,
+                       subType,
+                       superType
+               ) );
+       }
+
+       /**
+        * Assert that <code>superType</code> is assignable type from <code>subType</code> instance
+        * 
+        * Throw {@link IllegalArgumentException}
+        * 
+        * if <code>superType</code> or <code>subType</code> is <code>null</code> or if assertion is failure
+        * 
+        * @param superType super type candidate
+        * @param subType subtype candidate
+        * 
+        * @see #isAssignable(Class, Class, String)
+        */
+       public static
+       void
+       isAssignable(
+               final Class<?> superType,
+               final Class<?> subType
+       )
+       {
+               isAssignable( superType, subType, "" );
+       }
+
+}
index 87c3704..96111da 100644 (file)
@@ -25,6 +25,8 @@
 
 package org.tizen.common.util;
 
+import static org.tizen.common.util.SWTUtil.asyncExec;
+
 import java.io.File;
 
 import org.eclipse.swt.SWT;
@@ -52,8 +54,7 @@ public class BrowserWrapper {
     }
 
     public void setInput(final File f) {
-        browser.getDisplay().asyncExec(new Runnable() {
-            @Override
+        asyncExec(new Runnable() {
             public void run() {
                 if (!browser.isDisposed()) {
                     browser.setUrl(f.getAbsolutePath());
diff --git a/org.tizen.common/src/org/tizen/common/util/CipherUtil.java b/org.tizen.common/src/org/tizen/common/util/CipherUtil.java
new file mode 100755 (executable)
index 0000000..f15be02
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Ho Namkoong <ho.namkoong@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util;
+
+import java.security.InvalidKeyException;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.SecretKey;
+import javax.crypto.SecretKeyFactory;
+import javax.crypto.spec.DESedeKeySpec;
+
+import org.tizen.common.util.log.Logger;
+
+import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
+
+/**
+ * CipherUtil 
+ * 
+ * This is a util class for encrypting and decrypting plain texts. 
+ *  
+ * @author Ho Namkoong{@literal <ho.namkoong@samsung.com>} (S-Core)
+ */
+public class CipherUtil {
+
+    private static final String password = "KYANINYLhijklmnopqrstuvwx";
+    private static SecretKey SECRETE_KEY;
+    private static Cipher DES_CIPHER;
+    private static final String ALGORITHM = "DESede";
+    
+    static {
+        try {
+            byte key[] = password.getBytes();
+            DESedeKeySpec desKeySpec = new DESedeKeySpec(key);
+            SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(ALGORITHM);
+            SECRETE_KEY = keyFactory.generateSecret(desKeySpec);
+            
+            DES_CIPHER = Cipher.getInstance(ALGORITHM + "/ECB/PKCS5Padding");
+        } catch (Throwable t) {
+            Logger.error("Exception occurred while creating secret key", t);
+        }
+    }
+    
+    private static byte[] decryptByDES(byte[] bytes)
+    throws InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
+        DES_CIPHER.init(Cipher.DECRYPT_MODE, SECRETE_KEY);
+        
+        return DES_CIPHER.doFinal(bytes);
+    }
+    
+    private static byte[] encryptByDES(String s)
+    throws InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
+        DES_CIPHER.init(Cipher.ENCRYPT_MODE, SECRETE_KEY);
+        
+        return DES_CIPHER.doFinal(s.getBytes());
+    }
+    
+    /**
+     * Decrypt cipher message 
+     *
+     * @param s cipher message which will be decrypted.
+     * @return decrypted plain text.
+     * @author Ho Namkoong {@literal <ho.namkoong@samsung.com>} (S-Core)
+     * @throws BadPaddingException 
+     * @throws IllegalBlockSizeException 
+     * @throws InvalidKeyException 
+     */
+    public static String getDecryptedString(String s)
+    throws InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
+        return new String(decryptByDES(Base64.decode(s)));
+    }
+    
+    /**
+     * Encrypt plain text 
+     *
+     * @param s plain text which will be encrypted.
+     * @return encrypted cipher text.
+     * @author Ho Namkoong {@literal <ho.namkoong@samsung.com>} (S-Core)
+     * @throws BadPaddingException 
+     * @throws IllegalBlockSizeException 
+     * @throws InvalidKeyException 
+     */
+    public static String getEncryptedString(String s)
+    throws InvalidKeyException, IllegalBlockSizeException, BadPaddingException {
+        return new String(Base64.encode(encryptByDES(s)));
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/CollectionMap.java b/org.tizen.common/src/org/tizen/common/util/CollectionMap.java
new file mode 100755 (executable)
index 0000000..a3ff716
--- /dev/null
@@ -0,0 +1,253 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+
+/**
+ * CollectionUtil.
+ * 
+ * Helper related to collection( Set, List, etc )
+ * 
+ * Characters for both {@link Collection} and {@link Map}
+ * 
+ * You can add and remove not only key-value pair but also a set of key-value
+ * 
+ * Replace key-value set to <code>null</code> if no values
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @param <K> key type
+ * @param <V> value type
+ */
+public class
+CollectionMap<K, V>
+{
+
+       /**
+        * Map to manage key-values
+        */
+       protected final Map<K, Collection<V>> map;
+       
+       /**
+        * Default constructor
+        */
+       public
+       CollectionMap() {
+           this( new LinkedHashMap<K, Collection<V>>() );
+       }
+       
+       /**
+        * Constructor with map
+        * 
+        * @param map key-value container
+        */
+       public
+       CollectionMap(
+           final Map<K, Collection<V>> map
+       )
+       {
+           this.map = map;
+       }
+
+
+       /**
+        * Create values container
+        * 
+        * Determine a method for management of values
+        * 
+        * Modify this method if you want to change value container
+        * 
+        * @return value containing {@link Collection}
+        */
+       protected
+       Collection<V>
+       createValues()
+       {
+               return new ArrayList<V>();
+       }
+
+       /**
+        * Add key-value pair
+        * 
+        * @param key key to add 
+        * @param value value to add
+        */
+       public
+       void
+       put(
+               final K key,
+               final V value
+       )
+       {
+               Collection<V> values = map.get( key );
+               if ( null == values )
+               {
+                       values = createValues();
+                       map.put( key, values );
+               }
+
+               values.add( value );
+       }
+
+       /**
+        * Return keys
+        * 
+        * @return {@link Collection} for key
+        * 
+        * @see java.util.Map#keySet()
+        */
+       public
+       Collection<K>
+       keySet() {
+               return map.keySet();
+       }
+
+       /**
+        * Return values for <code>key</code>
+        * 
+        * Return <code>null</code> if no values
+        *
+        * @param key key for values
+        * 
+        * @return key related values
+        */
+       public
+       Collection<V>
+       get(
+               final K key
+       )
+       {
+               return map.get( key );
+       }
+
+       /**
+        * Replace a set of key-values
+        * 
+        * @param key key for key-valeus
+        * @param values values for key-values
+        * 
+        * @return old values for <code>key</code>
+        */
+       public
+       Collection<V>
+       set(
+               final K key,
+               final Collection<V> values
+       )
+       {
+               return map.put( key, values );
+       }
+
+       /**
+        * Remove a set of key-values
+        * 
+        * @param key key for key-values
+        * 
+        * @return values to be removed
+        */
+       public
+       Collection<V>
+       remove(
+               final K key
+       )
+       {
+               return map.remove( key );
+       }
+
+       /**
+        * Remove key-value pair from a set and return values after change
+        *
+        * Return <code>null</code> if no values
+        * 
+        * @param key key for key-value
+        * @param value value for key-value
+        * 
+        * @return values after change
+        */
+       public
+       Collection<V>
+       remove(
+               final K key,
+               final V value
+       )
+       {
+               final Collection<V> values = map.get( key );
+               values.remove( value );
+
+               if ( values.isEmpty() )
+               {
+                       map.remove( key );
+                       return null;
+               }
+
+               return values;
+       }
+
+       /**
+        * Remove all sets
+        */
+       public
+       void
+       clear()
+       {
+               map.clear();
+       }
+
+       /* (non-Javadoc)
+        * @see java.lang.Object#toString()
+        */
+       @Override
+       public
+       String
+       toString()
+       {
+               final StringBuilder buffer = new StringBuilder();
+
+               buffer.append( "CollectionMap[" );
+
+               boolean bInit = false;
+
+               for ( final K key : map.keySet() )
+               {
+                       if ( bInit )
+                       {
+                               buffer.append( ", " );
+                       }
+                       bInit = true;
+                       buffer.append( key );
+                       buffer.append( '=' );
+                       buffer.append( map.get( key ) ); 
+               }
+
+               buffer.append( "]" );
+
+               return buffer.toString();
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/CollectionUtil.java b/org.tizen.common/src/org/tizen/common/util/CollectionUtil.java
new file mode 100644 (file)
index 0000000..c8b980a
--- /dev/null
@@ -0,0 +1,1566 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.tizen.common.util.StringUtil.EMPTY_STRING;
+import static org.tizen.common.util.StringUtil.NULL_STRING;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.SortedSet;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.tizen.common.util.ArrayUtil.ArrayIterator;
+
+/**
+ * CollectionUtil.
+ * 
+ * Helper related to collection( Set, List, etc )
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class CollectionUtil
+{
+    
+    /**
+     * Empty bytes
+     */
+    protected static final byte[] EMPTY_BYTE_ARRAY = new byte[0];
+    protected static final byte[] EMPTY_BYTES = EMPTY_BYTE_ARRAY;
+    
+    private static final String ARRAY_START = "{";
+    
+    private static final String ARRAY_END = "}";
+    
+    private static final String EMPTY_ARRAY = ARRAY_START + ARRAY_END;
+    
+    private static final String ARRAY_ELEMENT_SEPARATOR = ", ";
+
+    private static final Set<Class<?>> APPROXIMABLE_COLLECTION_TYPES = 
+        Collections.unmodifiableSet( new HashSet<Class<?>>( Arrays.asList( new Class<?>[] {
+            Collection.class,
+            Set.class, HashSet.class, SortedSet.class, LinkedHashSet.class, TreeSet.class,
+            List.class, LinkedList.class, ArrayList.class
+        } ) ) );
+
+    private static final Set<Class<?>> APPROXIMABLE_MAP_TYPES = 
+        Collections.unmodifiableSet( new HashSet<Class<?>>( Arrays.asList( new Class<?>[] {
+            Map.class, SortedMap.class, HashMap.class, LinkedHashMap.class, TreeMap.class
+        } ) ) );
+    
+
+
+    /* Object */
+    /**
+     * Empty Collection
+     */
+    public static final Collection<Object> EMPTY_COLLECTION = 
+        Collections.unmodifiableCollection( new ArrayList<Object>() );
+
+    /**
+     * protected constructor
+     */
+    protected CollectionUtil() {}
+
+    /**
+     * <p>
+     * check <code>collection</code> has no element.
+     * 
+     * use without null check.
+     * 
+     * Old style
+     * 
+     * <code>
+     * List list = null;
+     * ...
+     * if ( null != list && !list.isEmpty() ) {
+     *  ...
+     * }
+     * </code>
+     * 
+     * Usage :
+     * <p>
+     * 
+     * <code>
+     * List list = null;
+     * ...
+     * if ( !CollectionUtil.isEmpty( list ) ) {
+     *  ...
+     * }
+     * </code>
+     * 
+     * or "import static" style if you use JDK6
+     * 
+     * </code>
+     * import static org.tizen.common.util.CollectionUtil.isEmpty;
+     *  
+     * ...
+     * List list = null;
+     * ...
+     * if ( !isEmpty( list ) ) {
+     *  ...
+     * }
+     * </code>
+     * 
+     * @param collection {@link Collection} to check
+     * 
+     * @return value if collection is empty
+     */
+    public static
+    boolean
+    isEmpty(
+        final Collection<?> collection
+    )
+    {
+        if ( null == collection )
+        {
+            return true;
+        }
+        
+        return collection.isEmpty();
+    }
+    
+    /**
+     * <p>
+     * Return <code>collection</code>'s size.
+     * 
+     * use without null check.
+     * 
+     * Return <code>0</code> if <code>collection</code> is <code>null</code>
+     * 
+     * <p>
+     * 
+     * Old style
+     * <code>
+     * if ( null != list ) {
+     *  for ( int i = 0, n = list.size() ; i < n ; ++i ) {
+     *      ...
+     *  }
+     * }
+     * </code>
+     * 
+     * 
+     * <code>
+     * for ( int i = 0, n = CollectionUtil.size( list ) ; i < n ; ++i ) {
+     *  ...
+     * }
+     *  
+     * </code>
+     * or "import static" style if you use JDK6
+     * 
+     * </code>
+     * import static org.tizen.common.util.CollectionUtil.isEmpty;
+     * ...
+     *  
+     * for ( int i = 0, n = size( list ) ; i < n ; ++i ) {
+     *  ...
+     * }
+     *  
+     * </code>
+     * 
+     * @param collection {@link Collection} to check
+     * 
+     * @return size of <code>collection</code>
+     * 
+     * @see Collection#size()
+     */
+    public static
+    int
+    size(
+        final Collection<?> collection
+    )
+    {
+        if ( null == collection )
+        {
+            return 0;
+        }
+        
+        return collection.size();
+    }
+
+    /**
+     * <p>
+     * run <code>runner</code> iterateing element of <code>collection</code>.
+     * 
+     * use without null-check for <code>collection</code>
+     * 
+     * delegate error handling to <code>runner</code>
+     * </p>
+     * 
+     * <code>
+     * 
+     * CollectionUtil.iterate(
+     *  new ArrayList<String>( Arrays.asList( "hello", "Hello", "World", null, "Test" ) ),
+     *  new IteratingRunner<String>() {
+     *      public void run( String arg ) {
+     *          ...
+     *      }
+     *  }
+     * );
+     * 
+     * </code>
+     * 
+     * @param <T> type of element in <code>collection</code>
+     * @param collection {@link Collection} containing element
+     * @param runner {@link Runnable} to execute
+     * 
+     * @throws InvocationTargetException when <code>runner</code>'s {@link Runnable#run()} throws exception 
+     * 
+     * @see {@link #iterate(Collection, IteratingRunner, boolean)}
+     * @see FilterIterator
+     */
+    public static <T>
+    void
+    iterate(
+        final Collection<? extends T> collection,
+        final IteratingRunner<T> runner
+    )
+    throws InvocationTargetException
+    {
+        iterate( collection, runner, false );
+    }
+    
+    /**
+     * <p>
+     * run <code>runner</code> iterateing element of <code>collection</code>.
+     * 
+     * use without null-check for <code>collection</code>
+     * 
+     * delegate error handling to <code>runner</code>
+     * 
+     * </p>
+     * <code>
+     * 
+     * CollectionUtil.iterate(
+     *  new ArrayList<String>( Arrays.asList( "hello", "Hello", "World", null, "Test" ) ),
+     *  new IteratingRunner<String>() {
+     *      public void run( String arg ) {
+     *          ...
+     *      }
+     *  },
+     *  true
+     * );
+     * 
+     * </code>
+     * 
+     * @param <T> type of element in <code>collection</code>
+     * @param collection {@link Collection} containing element
+     * @param runner {@link Runnable} to execute
+     * @param bForceProcess flag to iterate continuously when exception occurs
+     * 
+     * @throws InvocationTargetException when <code>runner</code>'s {@link Runnable#run()} throws exception 
+     * 
+     * @see FilterIterator
+     */
+    public static <T>
+    void
+    iterate(
+        final Collection<? extends T> collection,
+        final IteratingRunner<T> runner,
+        final boolean bForceProcess
+    )
+    throws InvocationTargetException
+    {
+        if ( null == runner )
+        {
+            return ;
+        }
+        if ( isEmpty( collection ) )
+        {
+            return ;
+        }
+        
+        for ( final T arg : collection )
+        {
+            if ( null == arg && !bForceProcess )
+            {
+                continue ;
+            }
+            try
+            {
+                runner.run( arg );
+            } catch ( Throwable e )
+            {
+                if ( !bForceProcess )
+                {
+                    throw new InvocationTargetException( e );
+                }
+            }
+        }
+    }
+    
+    /**
+     * <p>
+     * fiter <code>collection</code> to <code>result</code> using <code>runner</code>
+     * 
+     * determined if stop or keep going using <code>bForceProcess</code> in case of exception.
+     * </p>
+     * 
+     * @param <T> type of element in <code>collection</code>
+     * @param collection {@link Collection} to filter
+     * @param results collection to save result
+     * @param runner object to determine if filter
+     * @param bForceProcess flag to keep going when exception occurs
+     * 
+     * @throws InvocationTargetException when <code>runner</code>'s {@link Runnable#run()} throws exception 
+     */
+    public static <T>
+    void
+    filter(
+        final Collection<? extends T> collection,
+        final Collection<T> results,
+        final IteratingAcceptor<T> runner,
+        final boolean bForceProcess
+    ) throws InvocationTargetException
+    {
+        if ( null == results )
+        {
+            return ;
+        }
+        if ( isEmpty( collection ) )
+        {
+            return ;
+        }
+        
+        for ( final T arg : collection )
+        {
+            if ( null == arg && !bForceProcess )
+            {
+                continue ;
+            }
+            try
+            {
+                if ( runner.accept( arg ) )
+                {
+                    results.add( arg );
+                }
+            } catch ( Throwable e )
+            {
+                if ( !bForceProcess )
+                {
+                    throw new InvocationTargetException( e );
+                }
+            }
+
+        }
+    }
+    
+    /**
+     * <p>
+     * Return first element in <code>collection</code><br>
+     * 
+     * Return <code>null</code> if <code>collection</code> is null or empty
+     * </p>
+     * @param <T> type of element in <code>collection</code>
+     * @param collection {@link Collection} to check
+     * 
+     * @return first elemtn in <code>collection</code>
+     */
+    public static <T>
+    T
+    pickupFirst( final Collection<T> collection )
+    {
+        if ( isEmpty( collection ) )
+        {
+            return null;
+        }
+        
+        final Iterator<T> iter = collection.iterator();
+        return (iter.hasNext())?(iter.next()):null;
+    }
+
+    /**
+     * <p>
+     * Extract and return first element in <code>collection</code><br>
+     * 
+     * Return <code>null</code> if <code>collection</code> is null or empty
+     * </p>
+     * @param <T> type of element in <code>collection</code>
+     * @param collection {@link Collection} to check
+     * 
+     * @return first elemtn in <code>collection</code>
+     */
+    public static <T>
+    T
+    removeFirst( final Collection<T> collection )
+    {
+        if ( isEmpty( collection ) )
+        {
+            return null;
+        }
+        
+        final Iterator<T> iter = collection.iterator();
+        if ( iter.hasNext() )
+        {
+            T ret = iter.next();
+            iter.remove();
+            return ret;
+        }
+        return null;
+    }
+
+
+    /**
+     * <p>
+     * Return last element in <code>collection</code><br>
+     * 
+     * Return <code>null</code> if <code>collection</code> is null or empty
+     * 
+     * Don't use this in case of big data or looping algorithm
+     * </p>
+     * @param <T> type of element in <code>collection</code>
+     * @param collection {@link Collection} to check
+     * 
+     * @return last elemtn in <code>collection</code>
+     */
+    public static <T>
+    T
+    pickupLast( final Collection<T> collection )
+    {
+        if ( isEmpty( collection ) )
+        {
+            return null;
+        }
+        
+        final Iterator<T> iter = collection.iterator();
+        
+        T temp = null;
+        while ( iter.hasNext() )
+        {
+            temp = iter.next();
+        }
+        return temp;
+    }
+    
+    /**
+     * <p>
+     * Extract and return last element in <code>collection</code><br>
+     * 
+     * Return <code>null</code> if <code>collection</code> is null or empty
+     * 
+     * Don't use this in case of big data or looping algorithm
+     * </p>
+     * @param <T> type of element in <code>collection</code>
+     * @param collection {@link Collection} to check
+     * 
+     * @return last elemtn in <code>collection</code>
+     */
+    public static <T>
+    T
+    removeLast( final Collection<T> collection )
+    {
+        if ( isEmpty( collection ) )
+        {
+            return null;
+        }
+        
+        final Iterator<T> iter = collection.iterator();
+        
+        T temp = null;
+        while ( iter.hasNext() )
+        {
+            temp = iter.next();
+        }
+        iter.remove();
+        return temp;
+    }
+
+    /**
+     * Convert {@link Enumeration} to {@link Iterator} using decoration pattern 
+     * 
+     * @param <K> element type to be handled by enumertaion
+     */
+    static class
+    EnumerationAdapter<K>
+    implements Iterator<K>
+    {
+        protected final Enumeration<K> enumeration;
+        /**
+         * Constructor with {@link Enumeration}
+         * 
+         * @param enumeration {@link Enumeration} to convert 
+         */
+        public
+        EnumerationAdapter(
+            final Enumeration<K> enumeration
+        )
+        {
+            Assert.notNull( enumeration );
+            this.enumeration = enumeration;
+        }
+
+        /* (non-Javadoc)
+         * @see java.util.Iterator#hasNext()
+         */
+        @Override
+        public
+        boolean
+        hasNext()
+        {
+            return enumeration.hasMoreElements();
+        }
+
+        /* (non-Javadoc)
+         * @see java.util.Iterator#next()
+         */
+        @Override
+        public
+        K
+        next()
+        {
+            return enumeration.nextElement();
+        }
+
+        /* (non-Javadoc)
+         * @see java.util.Iterator#remove()
+         */
+        @Override
+        public
+        void
+        remove()
+        {
+            throw new UnsupportedOperationException();
+        }
+    }
+    
+    /**
+     * 
+     * Return Iterator to be converted from <code>enumeration</code>
+     * 
+     * @param <E> element type interating <code>enumeration</code>
+     * @param enumeration {@link Enumeration} object to be converted
+     * 
+     * @return converted {@link Iterator}
+     */
+    public
+    static <E>
+    Iterator<E>
+    iterator(
+        final Enumeration<E> enumeration
+    ) {
+        return new EnumerationAdapter<E>( enumeration );
+    }
+
+    
+    /**
+     * Convert array object to {@link List}
+     * 
+     * @param source array candidate object
+     * 
+     * @return converted {@link List}
+     */
+    public static
+    List<?>
+    asList(
+        final Object source
+    )
+    {
+        return Arrays.asList( ArrayUtil.toObjectArray( source ) );
+    }
+
+    /**
+     * 
+     * Add array object to <code>collection</code>
+     * 
+     * @param array array candidate object to be added
+     * @param collection {@link Collection} to add
+     * 
+     * @see ArrayUtil#toObjectArray(Object)
+     */
+    public static
+    void
+    mergeArrayIntoCollection(
+        final Object array,
+        final Collection<Object> collection
+    )
+    {
+        Assert.notNull( collection );
+        final Object[] arr = ArrayUtil.toObjectArray( array );
+        for ( int i=0, n=arr.length ; i<n ; ++i )
+        {
+            collection.add( arr[i] );
+        }
+    }
+
+    /**
+     * Check if <code>iterator</code> meet <code>element</code> in iteration
+     * 
+     * @param iterator iterating object
+     * @param element object to check
+     * 
+     * @return <code>true</code> if <code>iterator</code> meet <code>element</code>
+     */
+    public static
+    boolean
+    contains(
+        final Iterator<Object> iterator,
+        final Object element
+    )
+    {
+        if ( null == iterator )
+        {
+            return false;
+        }
+        
+        while ( iterator.hasNext() )
+        {
+            final Object candidate = iterator.next();
+            if ( ObjectUtil.equals( candidate, element ) ) 
+            {
+                return true; 
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Check if <code>enumeration</code> meet <code>element</code> in iteration
+     * 
+     * @param enumeration iterating object
+     * @param element object to check
+     * 
+     * @return <code>true</code> if <code>enumeration</code> meet <code>element</code>
+     */
+    public static
+    boolean
+    contains(
+        final Enumeration<Object> enumeration,
+        final Object element
+    )
+    {
+        if ( null == enumeration )
+        {
+            return false;
+        }
+        while( enumeration.hasMoreElements() )
+        {
+            final Object candidate = enumeration.nextElement();
+            if ( ObjectUtil.equals( candidate, element ) )
+            {
+                return true; 
+            }
+        }
+        return false;
+    }
+
+
+    
+    /**
+     * Check if <code>collection</code> contains <code>element</code>
+     * 
+     * @param collection {@link Collection} to check
+     * @param element object to check
+     * 
+     * @return <code>true</code> if <code>collection</code> contain <code>element</code>
+     */
+    public static
+    boolean
+    contains(
+        final Collection<Object> collection,
+        final Object element
+    )
+    {
+        if ( null == collection )
+        {
+            return false;
+        }
+        for ( final Object candidate : collection )
+        {
+            if ( ObjectUtil.equals( candidate, element ) )
+            {
+                return true; 
+            }
+        }
+        return false;
+    }
+    
+    /**
+     * Check and return if <code>source</code> contain any element of <code>candidates</code>
+     * 
+     * @param source {@link Collection} to check
+     * @param candidates {@link Collection} whose element is expected in <code>source</code>
+     * 
+     * @return <code>true</code> if <code>source</code> contain any elemnt of <code>candidates</code>
+     */
+    public static
+    boolean
+    containsAny(
+        final Collection<?> source,
+        final Collection<?> candidates
+    )
+    {
+        if ( isEmpty( source ) || isEmpty( candidates) )
+        {
+            return false; 
+        }
+
+        for ( final Object candidate : candidates )
+        {
+            if ( source.contains( candidate ) )
+            {
+                return true; 
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Check <code>collectionType</code> is approximable collection type
+     * 
+     * @param collectionType type to check
+     * 
+     * @return <code>true</code> if <code>collectionType</code> is in {@link #APPROXIMABLE_COLLECTION_TYPES} 
+     * 
+     * @see #APPROXIMABLE_COLLECTION_TYPES
+     */
+    public static
+    boolean
+    isApproximableCollectionType(
+        final Class<?> collectionType
+    )
+    {
+        return APPROXIMABLE_COLLECTION_TYPES.contains( collectionType );
+    }
+    
+    /**
+     * Check <code>mapType</code> is approximable map type
+     * 
+     * @param mapType type to check
+     * 
+     * @return <code>true</code> if <code>mapType</code> is in {@link #APPROXIMABLE_MAP_TYPES} 
+     * 
+     * @see #APPROXIMABLE_MAP_TYPES
+     */
+    public static
+    boolean
+    isApproximableMapType(
+        final Class<?> mapType
+    )
+    {
+        return APPROXIMABLE_MAP_TYPES.contains( mapType );
+    }
+    
+    /**
+     * Create <code>collection</code> matched approximable collection
+     * 
+     * @param <K> containing type
+     * @param collection {@link Collection} to convert
+     * @param initialCapacity initial size of created collection
+     * 
+     * @return created approximable collection
+     */
+    public static <K>
+    Collection<K>
+    createApproximableCollection(
+        final Collection<K> collection,
+        final int initialCapacity
+    )
+    {
+        if ( collection instanceof LinkedList<?> )
+        {
+            return new LinkedList<K>();
+        }
+        else if ( collection instanceof List<?> )
+        {
+            return new ArrayList<K>( initialCapacity);
+        }
+        else if ( collection instanceof SortedSet<?> )
+        {
+            return new TreeSet<K>( ( (SortedSet<K>)collection).comparator() );
+        }
+        else
+        {
+            return new LinkedHashSet<K>( initialCapacity);
+        }
+    }
+    
+    /**
+     * @param <K> Map's Key type
+     * @param <V> Map's Value type
+     * @param map Map argument
+     * @param initialCapacity initial argument for Map which will be created
+     * 
+     * @return created ApproximableMap
+     */
+    public static <K, V>
+    Map<K, V>
+    createApproximableMap(
+        final Map<K, V> map,
+        final int initialCapacity
+    )
+    {
+        if ( map instanceof SortedMap<?, ?> )
+        {
+            return new TreeMap<K, V>( ( (SortedMap<K, V>) map).comparator() );
+        }
+        else
+        {
+            return new LinkedHashMap<K, V>( initialCapacity );
+        }
+    }
+    
+    /* print */
+    
+    /**
+     * Converts <code>obj</code> object to String.
+     * 
+     * @param obj object to convert
+     * 
+     * @return converted String
+     */
+    public static
+    String
+    toString(
+        final Object obj
+    )
+    {
+        if ( null == obj )
+        {
+            return NULL_STRING;
+        }
+
+        if ( obj instanceof String )
+        {
+            return (String) obj;
+        }
+        else if ( obj.getClass().isArray() )
+        {
+            int length = Array.getLength( obj );
+            
+            if ( 0 == length )
+            {
+                return EMPTY_ARRAY; 
+            }
+            
+            final StringBuilder buffer= new StringBuilder();
+            
+            buffer.append( ARRAY_START);
+            for ( int i=0 ; i<length ; ++i )
+            {
+                if ( 0 != i ) {
+                    buffer.append( ARRAY_ELEMENT_SEPARATOR );
+                }
+                
+                buffer.append( toString( Array.get( obj, i ) ) );
+            }
+            buffer.append( ARRAY_END );
+            return buffer.toString();
+        }
+        return ObjectUtil.nvl( obj.toString(), EMPTY_STRING );
+    }
+
+    /**
+     * Returns a String from <code>array</code> Object[] with String separator.
+     * 
+     * @param array Object[] to combine
+     * @param separator the delimiter which is used when Object[] combined
+     * 
+     * @return combined String
+     */
+    public static <E>
+    String
+    concatenate(
+        final E[] array,
+        final String separator
+    )
+    {
+        return concatenate( (null==array)?null:new ArrayIterator<E>( array ), separator ); 
+    }
+        
+    /**
+     * Returns a String from col {@link Collection} with String separator.  
+     * 
+     * @param col {@link Collection} object to combine
+     * @param separator the delimiter which is used when {@link Collection} object combined
+     * 
+     * @return combined String
+     */
+    public static <E>
+    String
+    concatenate(
+        final Collection<E> col,
+        final String separator
+    )
+    {
+        return concatenate( (null==col)?(null):col.iterator(), separator ); 
+    }
+    
+    /**
+     * Returns a String from {@link Iterator} with String separator.
+     * 
+     * @param iter {@link Iterator} to combine objects
+     * @param separator the delimiter which is used when {@link Iterator} combined
+     * 
+     * @return combined String
+     */
+    public static <E>
+    String
+    concatenate(
+        Iterator<E> iter,
+        final String separator
+    )
+    {
+        if ( null == iter )
+        {
+            return NULL_STRING;
+        }
+        
+        if ( !iter.hasNext() )
+        {
+            return EMPTY_ARRAY; 
+        }
+        
+        final StringBuilder buffer= new StringBuilder();
+        boolean bInit = false;
+        
+        while ( iter.hasNext() )
+        {
+            Object obj = iter.next();
+            if ( bInit )
+            {
+                buffer.append( separator );
+            }
+            bInit = true;
+            
+            buffer.append( toString( obj ) );
+        }
+        return buffer.toString();
+    }
+    
+    /* Hash */
+    private static final int MULTIPLIER= 31;
+
+    private static final int INITIAL_HASH = 7;
+    
+    /**
+     * Creates hash value about object.
+     * <br>
+     * In case of array, get hash value using object's hash value in the array.
+     * 
+     * @param obj object to get hash value
+     * 
+     * @return hash value
+     */
+    public static
+    int
+    hashCode(
+        final Object obj
+    )
+    {
+        if ( null == obj )
+        {
+            return 0;
+        }
+        if ( obj.getClass().isArray() )
+        {
+            if ( obj instanceof Object[] )
+            {
+                return hashCode( (Object[] )obj );
+            }
+            else if ( obj instanceof boolean[] )
+            {
+                return hashCode( (boolean[] )obj );
+            }
+            else if ( obj instanceof byte[] )
+            {
+                return hashCode( (byte[] )obj);
+            }
+            else if ( obj instanceof char[] )
+            {
+                return hashCode( (char[] )obj);
+            }
+            else if ( obj instanceof double[] )
+            {
+                return hashCode( (double[] )obj);
+            }
+            else if ( obj instanceof float[] )
+            {
+                return hashCode( (float[] )obj);
+            }
+            else if ( obj instanceof int[] )
+            {
+                return hashCode( (int[] )obj);
+            }
+            else if ( obj instanceof long[] )
+            {
+                return hashCode( (long[] )obj);
+            }
+            else if ( obj instanceof short[] )
+            {
+                return hashCode( (short[] )obj);
+            }
+        }
+        
+        return obj.hashCode();
+    }
+
+    /**
+     * Returns hash value about <code>array</code> Object[].
+     * 
+     * @param array Object[] to get hash value
+     * 
+     * @return hash value
+     */
+    public static
+    int
+    hashCode(
+        final Object[] array
+    )
+    {
+        if ( null == array )
+        {
+            return 0;
+        }
+        
+        int hash = INITIAL_HASH;
+        for( int i=0, arraySize=array.length ; i<arraySize ; ++i )
+        {
+            hash = MULTIPLIER * hash + hashCode( array[i] );
+        }
+
+        return hash;
+    }
+
+    /**
+     * Returns hash value about <code>array</code> boolean[].
+     * 
+     * @param array boolean[] to get hash value
+     * 
+     * @return hash value
+     */
+    public static
+    int
+    hashCode(
+        final boolean[] array
+    )
+    {
+        if ( null == array )
+        {
+            return 0;
+        }
+        
+        int hash = INITIAL_HASH;
+        for( int i=0, arraySize=array.length ; i<arraySize ; ++i )
+        {
+            hash = MULTIPLIER * hash + hashCode( array[i] );
+        }
+
+        return hash;
+    }
+
+    /**
+     * Returns hash value about <code>array</code> int[].  
+     * 
+     * @param array int[] to get hash value
+     * 
+     * @return hash value
+     */
+    public static int
+    hashCode(
+        final byte[] array
+    )
+    {
+        if ( null == array )
+        {
+            return 0;
+        }
+        
+        int hash = INITIAL_HASH;
+        for( int i=0, arraySize=array.length ; i<arraySize ; ++i )
+        {
+            hash = MULTIPLIER * hash + array[i];
+        }
+
+        return hash;
+    }
+
+    /**
+     * Returns hash value about <code>array</code> char[].
+     * 
+     * @param array char[] to get hash value
+     * 
+     * @return hash value
+     */
+    public static
+    int
+    hashCode(
+        final char[] array
+    )
+    {
+        if ( null == array )
+        {
+            return 0;
+        }
+        
+        int hash = INITIAL_HASH;
+        for( int i=0, arraySize=array.length ; i<arraySize ; ++i )
+        {
+            hash = MULTIPLIER * hash + hashCode( array[i] );
+        }
+
+        return hash;
+    }
+
+    /**
+     * Returns hash value about <code>array</code> double[].
+     * 
+     * @param array double[] to get hash value
+     * 
+     * @return hash value
+     */
+    public static
+    int 
+    hashCode(
+        final double[] array
+    )
+    {
+        if ( null == array )
+        {
+            return 0;
+        }
+        
+        int hash = INITIAL_HASH;
+        for( int i=0, arraySize=array.length ; i<arraySize ; ++i )
+        {
+            hash = MULTIPLIER * hash + hashCode( array[i] );
+        }
+
+        return hash;
+    }
+
+    /**
+     * Returns hash value about <code>array</code> float[].
+     * 
+     * @param array float[] to get hash value
+     * 
+     * @return hash value
+     */
+    public static
+    int
+    hashCode(
+        final float[] array
+    )
+    {
+        if ( null == array )
+        {
+            return 0;
+        }
+        
+        int hash = INITIAL_HASH;
+        for( int i=0, arraySize=array.length ; i<arraySize ; ++i )
+        {
+            hash = MULTIPLIER * hash + hashCode( array[i] );
+        }
+
+        return hash;
+    }
+
+    /**
+     * Returns hash value about <code>array</code> int[].
+     * 
+     * @param array int[] to get hash value
+     * 
+     * @return hash value
+     */
+    public static
+    int
+    hashCode(
+        final int[] array
+    )
+    {
+        if ( null == array )
+        {
+            return 0;
+        }
+        
+        int hash = INITIAL_HASH;
+        for( int i=0, arraySize=array.length ; i<arraySize ; ++i )
+        {
+            hash = MULTIPLIER * hash + hashCode( array[i] );
+        }
+
+        return hash;
+    }
+
+    /**
+     * Returns hash value about <code>array</code> long[].
+     * 
+     * @param array long[] to get hash value 
+     * 
+     * @return hash value
+     */
+    public static
+    int
+    hashCode(
+        final long[] array
+    )
+    {
+        if ( null == array )
+        {
+            return 0;
+        }
+        
+        int hash = INITIAL_HASH;
+        for( int i=0, arraySize=array.length ; i<arraySize ; ++i )
+        {
+            hash = MULTIPLIER * hash + hashCode( array[i] );
+        }
+
+        return hash;
+    }
+
+    /**
+     * Returns hash value about <code>array</code> short[].
+     * 
+     * @param array short[] to get hash value
+     * 
+     * @return hash value
+     */
+    public static
+    int
+    hashCode(
+        final short[] array
+    )
+    {
+        if ( null == array )
+        {
+            return 0;
+        }
+        
+        int hash = INITIAL_HASH;
+        for( int i=0, arraySize=array.length ; i<arraySize ; ++i )
+        {
+            hash = MULTIPLIER * hash + hashCode( array[i] );
+        }
+
+        return hash;
+    }
+
+    /**
+     * Returns hash value about <code>bool</code> boolean.
+     * 
+     * @param bool boolean type parameter to get hash value
+     * 
+     * @return hash value
+     */
+    public static
+    int
+    hashCode(
+        final boolean bool
+    )
+    {
+        return bool ? 1231 : 1237;
+    }
+
+    /**
+     * Return hash value about <code>dbl</code> double.
+     * 
+     * @param dbl double type parameter to get hash value
+     * 
+     * @return hash value
+     */
+    public static
+    int
+    hashCode(
+        final double dbl
+    )
+    {
+        long bits = Double.doubleToLongBits( dbl );
+        return hashCode( bits );
+    }
+
+    /**
+     * Returns hash value about <code>flt</code> float.
+     * 
+     * @param flt float type parameter to get hash value
+     * 
+     * @return hash value
+     */
+    public static
+    int
+    hashCode(
+        float flt
+    )
+    {
+        return Float.floatToIntBits( flt );
+    }
+
+
+    /**
+     * Returns hash value about <code>lng</code> long.
+     * 
+     * @param lng long type parameter to get hash value
+     * 
+     * @return hash value
+     */
+    public static
+    int
+    hashCode(
+        final long lng
+    )
+    {
+        return (int) ( lng ^ ( lng >>> 32 ) );
+    }
+    
+    /* Equals */
+    /**
+     * Returns whether it is same object type or not by comparing each column's type of {@link Collection} object.
+     * 
+     * @param <K> object type about {@link Collection}
+     * @param cols {@link Collection} objects
+     * 
+     * @return true if each column's type of the {@link Collection} object is same
+     */
+    @SuppressWarnings("unchecked")
+    public static <K>
+    boolean
+    equals(
+        final Collection<? extends K>... cols
+    )
+    {
+        
+        // flag if collection is null
+        boolean bInit = false;
+        int size = 0;
+        for ( final Collection<? extends K> col : cols )
+        {
+            if ( !bInit )
+            {
+                if ( null == col )
+                {
+                    size = -1;
+                }
+                else
+                {
+                    size = col.size();
+                }
+                bInit = true;
+            }
+            if ( size < 0 )
+            {
+                if ( null != col )
+                {
+                    return false;
+                }
+            }
+            else if ( null == col || col.size() != size )
+            {
+                return false;
+            }
+        }
+        if ( size < 0 )
+        {
+            return true;
+        }
+
+        final Iterator<? extends K>[] iters = new Iterator[cols.length];
+        for ( int i = 0, n = iters.length ; i<n ; ++i )
+        {
+            iters[i] = cols[i].iterator();
+        }
+        
+        while ( iters[0].hasNext() )
+        {
+            final K obj = iters[0].next();
+            for ( int i = 1, n = iters.length ; i<n ; ++i )
+            {
+                final K other = iters[i].next();
+                
+                if ( !ObjectUtil.equals( obj, other ) )
+                {
+                    return false;
+                }
+            }
+        }
+        
+        return true;
+    }
+    
+    /**
+     * Returns whether it is same object type or not by comparing each column's type of Object[].
+     * 
+     * @param objsVar target objects
+     * 
+     * @return true if each column's type of the Object[] is same
+     * 
+     */
+    public static
+    boolean
+    equals(
+        final Object[]... objsVar
+    )
+    {
+        // flag if collection is null
+        boolean bInit = false;
+        int size = 0;
+        for ( final Object[] objs : objsVar )
+        {
+            if ( !bInit )
+            {
+                if ( null == objs )
+                {
+                    size = -1;
+                }
+                else
+                {
+                    size = objs.length;
+                }
+                bInit = true;
+            }
+            if ( size < 0 )
+            {
+                if ( null != objs )
+                {
+                    return false;
+                }
+            }
+            else if ( null == objs || objs.length != size )
+            {
+                return false;
+            }
+        }
+        if ( size < 0 )
+        {
+            return true;
+        }
+
+        
+        for ( int i=1, n=objsVar.length ; i<n ; ++i )
+        {
+            for ( int j=0 ; j<size ; ++j )
+            {
+                if ( !ObjectUtil.equals( objsVar[0][j], objsVar[i][j] ) )
+                {
+                    return false;
+                }
+            }
+        }
+        return true;
+
+    }
+    
+    /**
+     * <p>
+     * Swaps <code><I>i</I></code>th object's location with <code><I>j</I></code>th object in <code>objs</code> Object[].
+     * </p>
+     * @param objs target
+     * @param i location of object to be swapped
+     * @param j location of object to be swapped
+     */
+    public static
+    void
+    swap(
+        final Object[] objs,
+        final int i,
+        final int j
+    )
+    {
+        Object temp = objs[i];
+        objs[i] = objs[j];
+        objs[j] = temp;
+    }
+    
+    /**
+     * 
+     * Check that target class is available class to be inserted in the collection.
+     * If return is positive, target class is available.
+     * If return is negative, target class is not available.
+     * If return is zero, we cannot judge that target class is available or not.
+     * For example, if collection size is zero, or every element in the collection is null, we cannot judge it.
+     * Although collection is defined for Object, all of its elements are String, it returns negative,
+     * because we cannot know generic type exactly in runtime.  
+     * 
+     * @param collection
+     * @param targetClass
+     * @return
+     * @author ho.namkoong{@literal <ho.namkoong@samsung.com>}
+     */
+    public static 
+    int 
+    isAvailableGenericTypeForCollection(
+        final Collection<?> collection,
+        final Class<?> targetClass
+    ) 
+    {
+        if(collection.size() < 1) {
+            return 0;
+        }
+        boolean foundNotNull = false;
+        for(Object o: collection) {
+            if(o != null) {
+                foundNotNull = true;
+                if(o.getClass().isAssignableFrom(targetClass)) {
+                    return 1;
+                }
+            }
+        }
+        if(foundNotNull) {
+            return -1;
+        }
+        return 0;
+    }
+    
+    /**
+     * 
+     * Resolve set as list.
+     * Result list has same order of iterator of set. 
+     * 
+     * @param set set to be resolved as a list.
+     * @return list which contains all the elements in the set.
+     * @author ho.namkoong{@literal <ho.namkoong@samsung.com>}
+     */
+    public static <E>
+    List<E> 
+    resolveSetAsList(
+        final Set<E> set
+    ) 
+    {
+        Iterator<E> itr = set.iterator();
+        ArrayList<E> result = new ArrayList<E>();
+        
+        while(itr.hasNext()) {
+             E obj = itr.next();
+             result.add(obj);
+        }
+        
+        return result;
+    }
+}
index c0cb6f5..8e7ddb6 100644 (file)
@@ -75,8 +75,10 @@ public class ControlFileConfig {
        
        public boolean store(){
                File folder = new File(this.path).getParentFile();
-               if(folder==null||!folder.exists())
+               if( !folder.exists() )
+               {
                        folder.mkdirs();
+               }
                
                this.isExist = PropertyUtil.storeProperties(path, props);
                return this.isExist;
index 3335ba1..26c6a35 100644 (file)
@@ -26,7 +26,6 @@
 package org.tizen.common.util;
 
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.swt.widgets.Shell;
 
@@ -48,7 +47,7 @@ public abstract class DialogUtil {
     }
 
     public static void openMessageDialog(final Shell shell, final String title, final String message) {
-        Display.getDefault().syncExec(new Runnable() {
+       SWTUtil.syncExec(new Runnable() {
             public void run() {
                 MessageBox dialog = new MessageBox(shell, SWT.OK | SWT.ICON_INFORMATION);
                 dialog.setText(title);
@@ -60,7 +59,7 @@ public abstract class DialogUtil {
 
     public static void openProxyDialog(final String text, String message) {
         final String msg = message;
-        Display.getDefault().syncExec(new Runnable() {
+        SWTUtil.syncExec(new Runnable() {
             public void run() {
                 MessageBox dialog = new MessageBox(new Shell(), SWT.ERROR | SWT.ICON_INFORMATION);
                 dialog.setText(text);
@@ -83,7 +82,7 @@ public abstract class DialogUtil {
     }
 
     public static void openErrorDialog(final Shell shell, final String title, final String message) {
-        Display.getDefault().syncExec(new Runnable() {
+       SWTUtil.syncExec(new Runnable() {
             public void run() {
                 MessageBox dialog = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
                 dialog.setText(title);
@@ -104,16 +103,21 @@ public abstract class DialogUtil {
     protected static int retValue = 0;
     private final static Object lockQuestion = new Object(); 
     public static int openQuestionDialog(String message) {
-        synchronized (lockQuestion) {
+        return openQuestionDialog( new Shell(), "Question", message );
+    }
+    
+    public static int openQuestionDialog(final Shell shell, final String title, final String message) {
+        synchronized ( lockQuestion ) {
             final String msg = message;
-            Display.getDefault().syncExec(new Runnable() {
+            SWTUtil.syncExec( new Runnable() {
                 public void run() {
-                    MessageBox dialog = new MessageBox(new Shell(), SWT.YES | SWT.NO | SWT.ICON_QUESTION);
-                    dialog.setMessage(msg);
+                    MessageBox dialog = new MessageBox( shell, SWT.YES | SWT.NO | SWT.ICON_QUESTION );
+                    dialog.setText( title );
+                    dialog.setMessage( msg );
                     retValue = dialog.open();
                 }
-            });
-
+            } );
+            
             return retValue;
         }
     }
diff --git a/org.tizen.common/src/org/tizen/common/util/EFSUtil.java b/org.tizen.common/src/org/tizen/common/util/EFSUtil.java
new file mode 100755 (executable)
index 0000000..47d33ea
--- /dev/null
@@ -0,0 +1,303 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Jihoon Song <jihoon80.song@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util;
+
+import java.net.URI;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.IFileSystem;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.internal.ide.dialogs.IDEResourceInfoUtils;
+import org.eclipse.ui.internal.ide.dialogs.IFileStoreFilter;
+import org.tizen.common.Surrogate;
+import org.tizen.common.core.application.Messages;
+
+/**
+ * EFSUtil.
+ * 
+ * Helper related to Eclipse File System
+ * 
+ * @author Jihoon Song{@literal <jihoon80.song@samsung.com>} (S-Core)
+ */
+public class EFSUtil {
+    
+    public enum DialogChoicer {
+        YesToAll,
+        NoToAll,
+        Yes,
+        No,
+        Cancel;
+        
+        /**
+         * Get DialogChoicer's all value
+         * 
+         * @return String array with DialogChoicer's values
+         */
+        public static String[] toStringArray() {
+            DialogChoicer[] choicers = DialogChoicer.values();
+            String[] values = new String[choicers.length];
+            for (DialogChoicer choicer : choicers) {
+                values[choicer.ordinal()] = choicer.name();
+            }
+            return values;
+        }
+        
+        public static DialogChoicer valueFromOrdinal(int ordinal) {
+            for (DialogChoicer choicer : values()) {
+                if (choicer.ordinal() == ordinal) {
+                    return choicer;
+                }
+            }
+            return DialogChoicer.Cancel;
+        }
+    }
+    
+    private static Surrogate<IFileSystem> fileSystemSurrogate = new Surrogate<IFileSystem>() {
+        @Override
+        public IFileSystem getAdapter() {
+            return EFS.getLocalFileSystem();
+        }
+    };
+    
+    private static final String defaultTask = ""; //$NON-NLS-1$
+    private static final int defaultTicks = 100; // TODO : will add automatically calculate method
+    
+    private static final IFileStoreFilter defaultFilter = new IFileStoreFilter() {
+        @Override
+        public boolean accept(IFileStore store) {
+            return true;
+        }
+    };
+    
+    
+    // Constructor
+    private EFSUtil() {}
+    
+    public static void setFileSystemSurrogate(Surrogate<IFileSystem> surrogate) {
+        EFSUtil.fileSystemSurrogate = surrogate;
+    }
+    
+    /**
+     * Get IFileSystem based on Surrogate<IFileSystem> for this class
+     * 
+     * @return IFileStoreFilter
+     */
+    protected static IFileSystem getFileSystem() {
+        return fileSystemSurrogate.getAdapter();
+    }
+    
+    /**
+     * Get a default IFileStoreFilter that always returns true
+     * 
+     * @return IFileStoreFilter 
+     */
+    public static IFileStoreFilter getDefaultFileStoreFilter() {
+        return defaultFilter;
+    }
+    
+    /**
+     * Detect whether resource exist.
+     * 
+     * @param fileURI
+     */
+    public static boolean isExistResource(URI fileURI) {
+        IFileStore fileStore = getFileSystem().getStore(fileURI);
+        return isExistResource(fileStore);
+    }
+    
+    /**
+     * Detect whether resource exist.
+     * 
+     * @param fileStore
+     */
+    public static boolean isExistResource(IFileStore fileStore) {
+        return (fileStore != null) ? fileStore.fetchInfo().exists() : false;
+    }
+    
+    /**
+     * Detect whether resource exist. if exist this, open dialog
+     * 
+     * @param parentShell dialog's parent shell
+     * @param title dialog title
+     * @param msg dialog message
+     * @param previousChoice previous DialogChoicer value
+     * @param fileStore
+     * @return in case of previousChoice is Yes or No, return user choice status. any else return previous status
+     */
+    public static DialogChoicer isExistResourceWithDialog(Shell parentShell,
+            String title, String msg, DialogChoicer previousChoice, IFileStore fileStore) {
+        
+        Assert.notNull(parentShell);
+        Assert.notNull(msg);
+        Assert.notNull(previousChoice);
+        Assert.notNull(fileStore);
+        
+        switch (previousChoice) {
+        case Yes :
+        case No :
+            break;
+        case YesToAll :
+        case NoToAll :
+        case Cancel :
+        default :
+            return previousChoice;
+        }
+        
+        if (isExistResource( fileStore )) {
+            MessageDialog msgDialog = new MessageDialog(parentShell,
+                    title, null, msg, MessageDialog.NONE, DialogChoicer.toStringArray(),
+                    DialogChoicer.Cancel.ordinal());
+            
+            int msgResult = msgDialog.open();
+            
+            return DialogChoicer.valueFromOrdinal(msgResult);
+        }
+        
+        return DialogChoicer.Yes;
+    }
+    
+    /**
+     * Copy file or directory using Eclipse File System
+     * 
+     * @param source the source URI of the copy. If null, NullPointerException occur.
+     * @param destination the destination URI of the copy. If null, NullPointerException occur.
+     * @param options bit-wise or of option flag constants ({@link EFS#OVERWRITE} or {@link EFS#SHALLOW}).
+     * @param monitor a progress monitor, or <code>null</code> if progress reporting and cancellation are not desired
+     * 
+     * @author Jihoon Song {@literal <jihoon80.song@samsung.com>} (S-Core)
+     */
+    public static void copy(URI source, URI destination, int options,
+            IProgressMonitor monitor) throws CoreException {
+        Assert.notNull(source);
+        Assert.notNull(destination);
+        
+        monitor = ObjectUtil.nvl(monitor, new NullProgressMonitor());
+        
+        try {
+            monitor.beginTask(defaultTask, defaultTicks);
+            
+            getFileSystem().getStore(source).copy(getFileSystem().getStore( destination ), options, monitor);
+        } finally {
+            monitor.done();
+        }
+    }
+    
+    /**
+     * Copy file or directory using EFS with IFileStoreFilter.
+     * If file already exist, open selectable message dialog.
+     * If the user selected Cancel, OperationCanceledException occur
+     * 
+     * @param source the source URI of the copy. If null, NullPointerException occur.
+     * @param destination the destination URI of the copy. If null, NullPointerException occur.
+     * @param fileFilter the child file filter in source, if <code>null</code>, the default file filter is used
+     * @param monitor a progress monitor, or <code>null</code> if progress reporting and cancellation are not desired
+     * @throws CoreException
+     */
+    public static DialogChoicer copyWithFilter(URI source, URI destination, IFileStoreFilter fileFilter,
+            IProgressMonitor monitor) throws CoreException {
+        return copyWithFilter(source, destination, fileFilter, DialogChoicer.Yes, monitor);
+    }
+    
+    /**
+     * Copy file or directory using EFS with IFileStoreFilter.
+     * If file already exist, open selectable message dialog.
+     * If the user selected Cancel, OperationCanceledException occur
+     * 
+     * @param source the source URI of the copy. If null, NullPointerException occur.
+     * @param destination the destination URI of the copy. If null, NullPointerException occur.
+     * @param fileFilter the child file filter in source, if <code>null</code>, the default file filter is used
+     * @param previousChoice apply user configuration. if YesToAll or NoToAll, don't ask your choice.
+     * @param monitor a progress monitor, or <code>null</code> if progress reporting and cancellation are not desired
+     * @throws CoreException
+     */
+    public static DialogChoicer copyWithFilter(URI source, URI destination, IFileStoreFilter fileFilter,
+            DialogChoicer previousChoice, IProgressMonitor monitor) throws CoreException {
+        Assert.notNull(source);
+        Assert.notNull(destination);
+        
+        monitor = ObjectUtil.nvl(monitor, new NullProgressMonitor());
+        
+        try {
+            monitor.beginTask(defaultTask, defaultTicks);
+            
+            // fileFilter must be not null, because IDEResourceInfoUtils don't check null.
+            if (fileFilter == null) {
+                fileFilter = getDefaultFileStoreFilter();
+            }
+                
+            return internalCopyWithFilter(getFileSystem().getStore( source ),
+                    getFileSystem().getStore( destination ),
+                    fileFilter, previousChoice, monitor);
+        } finally {
+            monitor.done();
+        }
+    }
+    
+    private static DialogChoicer internalCopyWithFilter(IFileStore source, IFileStore destination,
+            IFileStoreFilter fileFilter, DialogChoicer previousChoice, IProgressMonitor monitor)
+            throws CoreException {
+        Assert.notNull(source);
+        Assert.notNull(destination);
+        
+        previousChoice = isExistResourceWithDialog(
+                ViewUtil.getWorkbenchWindow().getShell(), Messages.FileExistDialogTitle,
+                Messages.bind( Messages.FileExistMsg, destination.getName() ),
+                previousChoice, destination);
+        
+        switch (previousChoice) {
+        case YesToAll :
+        case Yes :
+            source.copy(destination, EFS.OVERWRITE | EFS.SHALLOW, monitor);
+            break;
+        case Cancel :
+            throw new OperationCanceledException();
+        case NoToAll :
+        case No :
+            break;
+        default:
+            break;
+        }
+        monitor.worked(1);
+        
+        // traverse child resources
+        if (source.fetchInfo().isDirectory()) {
+            IFileStore[] childStores = IDEResourceInfoUtils.listFileStores(source, fileFilter, null);
+            for (IFileStore childStore : childStores) {
+                previousChoice = internalCopyWithFilter(childStore,
+                        destination.getChild( childStore.getName() ),
+                        fileFilter, previousChoice, monitor);
+            }
+        }
+        
+        return previousChoice;
+    }
+}
old mode 100644 (file)
new mode 100755 (executable)
index d778247..9e49fd4
 /*
-*  Common
-*
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-*
-* Contact: 
-* Kangho Kim <kh5325.kim@samsung.com>
-* 
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-* Contributors:
-* - S-Core Co., Ltd
-*
-*/
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Kangho Kim <kh5325.kim@samsung.com>
+ 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
 package org.tizen.common.util;
 
+import static org.tizen.common.util.IOUtil.redirect;
+import static org.tizen.common.util.IOUtil.tryClose;
+
 import java.io.BufferedInputStream;
 import java.io.BufferedOutputStream;
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
-import java.net.URI;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileSystem;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Stack;
 
+import org.tizen.common.util.log.Logger;
 
 /**
  * @author Changhyun Lee {@literal <changhyun1.lee@samsung.com>} (S-Core)
  */
 public class FileUtil {
-    public static final String UTF_8 = "UTF-8"; //$NON-NLS-1$
-
     private static final int BUFFER_SIZE = 8192;
 
     /**
+     * Create directory.
+     * @param dir
+     * @return If directory couldn't be created, return false. Otherwise, return true.
+     */
+    public static boolean createDirectory(File dir) {
+        return dir.mkdirs();
+    }
+
+    /**
+     * Create directory.
+     * @param fullPath
+     * @return If directory couldn't be created, return false. Otherwise, return true.
+     */
+    public static boolean createDirectory(String fullPath) {
+        return createDirectory(new File(fullPath));
+    }
+
+    /**
+     * Create directory.
+     * @param dirName
+     * @param destDir If destDir is not set(null), then use user's current directory.
+     * @return If directory couldn't be created, return false. Otherwise, return true.
+     */
+    public static boolean createDirectory(String dirName, String destDir) {
+        Assert.notNull( dirName );
+
+        if (destDir == null)
+        {
+            destDir = System.getProperty("user.dir");
+        }
+
+        String fullPath = FilenameUtil.addTailingPath(destDir, dirName);
+
+        return createDirectory(new File(fullPath));
+    }
+
+    /**
+     * Create text file.
+     * 
+     * @param file
+     * @param text Input file's context.
+     * @param encoding If encoding is not set(null), then use system's default encoding.
+     * 
+     * @return If file create fail, return false. Otherwise, return true.
+     * 
+     * @throws IOException If creating file's directory does not exist, it throws IOException
+     */
+    public static boolean createTextFile(File file, String text, String encoding) throws IOException {
+        if (!file.createNewFile())
+        {
+            return false;
+        }
+
+        return writeTextFile(file, text, encoding);
+    }
+
+    /**
+     * Create text file.
+     * 
+     * @param fullPath
+     * @param text Input file's context.
+     * @param encoding If encoding is not set(null), then use system's default encoding.
+     * 
+     * @return If file create fail, return false. Otherwise, return true.
+     * 
+     * @throws IOException If creating file's directory does not exist, it throws IOException
+     */
+    public static boolean createTextFile(String fullPath, String text, String encoding) throws IOException {
+        return createTextFile(new File(fullPath), text, encoding);
+    }
+
+    /**
+     * Create text file.
+     * 
+     * @param fileName
+     * @param text Input file's context.
+     * @param destDir If destDir is not set(null), then use user's current directory.
+     * @param encoding If encoding is not set(null), then use system's default encoding.
+     * 
+     * @return If file create fail, return false. Otherwise, return true.
+     * 
+     * @throws IOException If creating file's directory does not exist, it throws IOException
+     */
+    public static boolean createTextFile(String fileName, String text, String destDir, String encoding) throws IOException {
+        Assert.notNull( fileName );
+
+        if (destDir == null)
+        {
+            destDir = System.getProperty("user.dir");
+        }
+
+        String fullPath = FilenameUtil.addTailingPath(destDir, fileName);
+
+        return createTextFile(fullPath, text, encoding);
+    }
+
+    /**
      * write text into given file
+     *
+     * @param file
+     * @param text Input context
+     * @param encoding If encoding is not set(null), then use system's default encoding.
+     *
+     * @return If file write success, return true.
+     *
+     * @throws IOException If don't write file, it throws IOException
      */
-    public static void writeTextFile(File file, String text, String encoding) throws IOException {
-        BufferedWriter out = null;
-    
+    public static boolean writeTextFile(File file, String text, String encoding) throws IOException {
         if (encoding == null) { // if encoding is not set then use default encoding
             encoding = System.getProperty("file.encoding");
         }
-    
+
+        File parent = file.getAbsoluteFile().getParentFile();
+        if (!parent.exists()) {
+            if (!parent.mkdirs()) {
+                throw new IOException("File write error. Cannot create directory - " + parent.getAbsolutePath());
+            }
+        }
+
+        BufferedWriter out = null;
         try {
             out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), encoding), BUFFER_SIZE);
             out.write(text.toCharArray(), 0, text.length());
             out.flush();
         } finally {
-            if (out != null) {
-                out.close();
-            }
+            tryClose( out );
         }
+
+        return true;
     }
 
     /**
-     *  read text from given file 
+     *  Read text from given file.
+     *
+     * @param file
+     * @param encoding
+     *
+     * @return content from file
+     *
+     * @throws IOException
      */
     public static String readTextFile(File file, String encoding) throws IOException {
+        return readTextStream(new FileInputStream(file), encoding);
+    }
+
+    /**
+     *  Read text from given inputStream.
+     *
+     * @param input
+     * @param encoding
+     *
+     * @return content from input
+     *
+     * @throws IOException
+     *
+     */
+    public static String readTextStream(InputStream input, String encoding) throws IOException {
         StringBuilder text = new StringBuilder();
-        char[] buffer = new char[BUFFER_SIZE];
         BufferedReader in = null;
 
         if (encoding == null) { // if encoding is not set then use default encoding
@@ -86,15 +221,10 @@ public class FileUtil {
         }
 
         try {
-            in = new BufferedReader(new InputStreamReader(new FileInputStream(file), encoding), BUFFER_SIZE);
-            int nRead = 0;
-            while ((nRead = in.read(buffer, 0, buffer.length)) > 0) {
-                text.append(buffer, 0, nRead);
-            }
+            in = new BufferedReader(new InputStreamReader(input, encoding), BUFFER_SIZE);
+            redirect( in, text );
         } finally {
-            if (in != null) {
-                in.close();
-            }    
+            tryClose( in );
         }
 
         return text.toString();
@@ -126,7 +256,7 @@ public class FileUtil {
         }
 
         int k = fullName.lastIndexOf(".");
-        
+
         return (k != -1) ? fullName.substring(0, k) : fullName;
     }
 
@@ -157,21 +287,6 @@ public class FileUtil {
     }
 
     /**
-     * copy file or directory using Eclipse File System
-     * 
-     * @param source The source URI of the copy.
-     * @param destination The destination URI of the copy.
-     * @param options bit-wise or of option flag constants ({@link EFS#OVERWRITE} or {@link EFS#SHALLOW}).
-     * @param monitor a progress monitor, or <code>null</code> if progress reporting and cancellation are not desired
-     * 
-     * @author Jihoon Song {@literal <jihoon80.song@samsung.com>} (S-Core)
-     */
-    public static void copyUsingEFS(URI source, URI destination, int options, IProgressMonitor monitor) throws CoreException {
-        IFileSystem fileSystem = EFS.getLocalFileSystem();
-        fileSystem.getStore(source).copy(fileSystem.getStore(destination), options, monitor);
-    }
-
-    /**
      * redirect input stream to output stream
      */
     public static void redirectStream(InputStream is, OutputStream os) throws IOException {
@@ -184,4 +299,420 @@ public class FileUtil {
         }
         bout.flush();
     }
+
+    /**
+     * Copy source file to destination file.
+     * If intermediate directories of destination file don't exists, it creates them.
+     * If destination file already exists, it tries to overwrite it.
+     *
+     * @param from source file path
+     * @param to destination file path
+     */
+    public static void copyTo(String from, String to) throws IOException {
+        copyTo(from, to, false);
+    }
+
+    /**
+     * Copy source file to destination file.
+     * If intermediate directories of destination file don't exists, it creates them.
+     * If destination file already exists, it tries to overwrite it.
+     *
+     * @param from source file path
+     * @param to destination file path
+     * @param append to destination file flag
+     */
+    public static void copyTo(String from, String to, boolean append) throws IOException {
+        File fromFile = new File(from);
+        File toFile = new File(to);
+
+        copyTo(fromFile, toFile, append);
+    }
+    
+    /**
+     * Copy source file to destination file.
+     * If intermediate directories of destination file don't exists, it creates them.
+     * If destination file already exists, it tries to overwrite it.
+     * 
+     * @param fromFile source file
+     * @param toFile destination file.
+     * @param append to destination file flag
+     * @throws IOException
+     */
+    public static void copyTo(File fromFile, File toFile, boolean append) throws IOException {
+        
+        File parent = toFile.getParentFile();
+        if (!parent.exists()) {
+            if (!parent.mkdirs()) {
+                throw new IOException("File copy error. Cannot create directory - " + parent.getAbsolutePath());
+            }
+        }
+
+        // makes sure it is not the same file
+        if ( FilenameUtil.equals( fromFile, toFile ) )
+        {
+            throw new IOException("Unable to write file " + fromFile + " on itself.");
+        }
+
+        BufferedInputStream in = null;
+        BufferedOutputStream out = null;
+
+        try {
+            in = new BufferedInputStream(new FileInputStream(fromFile), BUFFER_SIZE);
+            out = new BufferedOutputStream(new FileOutputStream(toFile, append), BUFFER_SIZE);
+
+            IOUtil.redirect( in, out );
+        } finally {
+            tryClose( in, out );
+        }
+    }
+
+    /**
+     * Copy all the files in the source directory to the destination directory.
+     * If destination directory does not exist, it is created.
+     * If destination file already exists , it tries to overwrite it.
+     *
+     * @param from source directory path
+     * @param to destination directory path
+     * @throws IOException
+     */
+    public static void copyRecursively(String from, String to) throws IOException {
+        copyRecursively(from, to, true);
+    }
+
+    /**
+     * Copy all the files in the source directory to the destination directory.
+     * If destination directory does not exist, it is created.
+     * If destination file already exists , it determines overwriting by overwrite parameter.
+     * @param from source directory path
+     * @param to destination directory path
+     * @param overwrite if true, it overwrites. Else, skip copying.
+     * @throws IOException
+     */
+    public static void copyRecursively(String from, String to, boolean overwrite) throws IOException {
+        copyRecursively(from, to, overwrite, new File [0]);
+    }
+    
+    /**
+     * Copy all the files in the source directory to the destination directory except files in filters parameter.
+     * If destination directory does not exist, it is created.
+     * If destination file already exists , it determines overwriting by overwrite parameter.
+     * @param from
+     * @param to
+     * @param overwrite
+     * @param filter
+     * @throws IOException
+     */
+    public static void copyRecursively(String from, String to, boolean overwrite, File... filters) throws IOException {
+        File fromDir = new File(from);
+        File toDir = new File(to);
+        if (fromDir.exists() == false) {
+            Logger.error("Directory " + fromDir.getCanonicalPath() + " does not exist.");
+            return;
+        }
+        checkDirectory(fromDir, toDir);
+        copyRecursivelyWithoutDirChecking(fromDir, toDir, overwrite, filters);
+    }
+    
+    private static void checkDirectory(File fromDir, File toDir) throws IOException {
+        if (toDir.exists() == false) {
+            toDir.mkdirs();
+        } else if(toDir.isFile() == true) {
+            throw new IOException("destination directory " + toDir.toString() + " is a file.");
+        }
+
+        if (fromDir.exists() == false) {
+            throw new IOException("source directory " + fromDir.toString() + " does not exist.");
+        }
+
+        if (fromDir.isFile() == true) {
+            throw new IOException("source directory " + fromDir.toString() + " is a file.");
+        }
+    }
+
+    private static void copyRecursivelyWithoutDirChecking(File fromDir, File toDir, boolean overwrite, File... filters) throws IOException {
+        HashSet<String> filterSet = new HashSet<String>();
+        
+        if(filters != null) {
+            for(File filter: filters) {
+                filterSet.add(filter.getCanonicalPath());
+            }
+        }
+        
+        Stack<File> fromFileStack = new Stack<File>();
+        Stack<File> toFileStack = new Stack<File>();
+        
+        fromFileStack.add(fromDir);
+        toFileStack.add(toDir);
+        
+        while(!fromFileStack.isEmpty()) {
+            File fromFile = fromFileStack.pop();
+            File toFile = toFileStack.pop();
+            
+            if(fromFile.isDirectory()) {
+                toFile.mkdirs();
+                
+                File[] newFromFiles = fromFile.listFiles();
+                for(File newFromFile: newFromFiles) {
+                    fromFileStack.push(newFromFile);
+                    toFileStack.push(new File(toFile, newFromFile.getName()));
+                }
+            }
+            else if(fromFile.isFile()) {
+                if(!toFile.exists() || !toFile.isFile() || overwrite) {
+                    if(filterSet.size() == 0 || !filterSet.contains(fromFile.getCanonicalPath())) {
+                        copyTo(fromFile, toFile, false);
+                    }
+                }
+            }
+        }
+    }
+
+    /**
+     * Compares the two files "file1" and "file2".
+     */
+    public static boolean equals(File file1, File file2) throws IOException {
+        if ( file1 == null || file2 == null) {
+            return false;
+        }
+        String strFile1 = file1.getCanonicalPath();
+        String strFile2 = file2.getCanonicalPath();
+
+        if ( strFile1 == null || strFile2 == null ) {
+            return false;
+        }
+
+        return strFile1.equals(strFile2);
+    }
+    
+    /**
+     * Tests whether parent path exist. If has the abstract parent pathname and does not exist, make automatically.
+     * 
+     * @param file target file or directory
+     * @return If does not have the abstract parent pathname, return false. otherwise, return true.
+     */
+    public static boolean checkParentDirectory(File file) {
+        Assert.notNull( file );
+        
+        File parent = file.getParentFile();
+        if ( parent == null ) {
+            return false;
+        }
+        
+        if ( !parent.exists() ) {
+            parent.mkdirs();
+        }
+        
+        return true;
+    }
+    
+    /**
+     * Tests whether parent path exist. If has the abstract parent pathname and does not exist, make automatically.
+     * 
+     * @param filename target file or directory name
+     * @return If does not have the abstract parent pathname, return false. otherwise, return true.
+     */
+    public static boolean checkParentDirectory(String filename) {
+        Assert.notNull( filename );
+        
+        return checkParentDirectory( new File( filename ) );
+    }
+
+    /**
+     * Return file list matched by pattern from rootPath
+     * 
+     * @param rootPath root path to retrieve , it should be directory.
+     * @param pattern 
+     * @param recursive
+     * @return matched file list
+     * @throws FileNotFoundException 
+     */
+    public static List<File> findFiles(File rootPath,
+            String pattern, boolean recursive) throws FileNotFoundException {
+        Assert.notNull(rootPath);
+        validateDirectory(rootPath);
+        
+        List<File> result = getFileListing( rootPath , pattern , recursive);
+        if ( result != null ) {
+            Collections.sort( result );
+        }
+
+        return result;
+        
+    }
+    
+    private static List<File> getFileListing(File rootPath , String pattern, boolean recursive) throws FileNotFoundException {
+        List<File> result = new ArrayList<File>();
+        
+        File[] filesAndDirs = rootPath.listFiles();
+        if ( null == filesAndDirs ) {
+            return result;
+        }
+        
+        for (File file : filesAndDirs) {
+            String name = file.getName();
+            
+            if ( name.matches(pattern) && file.isFile() ) {
+                result.add( file ); // add if file
+            } else if(recursive){ // must be a directory
+                List<File> deeperList = getFileListing( file , pattern , recursive); // recursive call!
+                if ( null != deeperList ) {
+                    result.addAll( deeperList );
+                } 
+            }
+        }
+        
+        return result;
+    }
+    
+    
+    /**
+     * Directory is valid if it exists, does not represent a file, and can be
+     * read.
+     */
+    private static void validateDirectory(File aDirectory)
+            throws FileNotFoundException {
+        Assert.notNull( aDirectory, "Directory should not be null." );
+        if (!aDirectory.exists()) {
+            throw new FileNotFoundException("Directory does not exist: "
+                    + aDirectory);
+        }
+        Assert.isTrue( aDirectory.isDirectory(), "Is not a directory: " + aDirectory );
+        Assert.isTrue( aDirectory.canRead(), "Directory cannot be read: " + aDirectory );
+    }
+    
+    /**
+     * This method takes a URL as parameter to read the contents, and to add
+     * into a string buffer.
+     * 
+     * @param source
+     *            URL to read the contents.
+     * @return string, contents of a file specified in the URL source path.
+     * @throws IOException
+     */
+    public static String readFromFile(URL source) throws IOException {
+        char[] chars = new char[4092];
+        InputStreamReader contentsReader = null;
+        StringBuffer buffer = new StringBuffer();
+        if (!new java.io.File(source.getFile()).exists()) {
+            throw new FileNotFoundException();
+        } else {
+            contentsReader = new InputStreamReader(source.openStream());
+            int c;
+            do {
+                c = contentsReader.read(chars);
+                if (c == -1)
+                {
+                    break;
+                }
+                buffer.append(chars, 0, c);
+            } while (c != -1);
+            contentsReader.close();
+        }
+        return buffer.toString();
+    }
+    
+    /**
+     * Append path.
+     * @param originalPath original path
+     * @param appendPath path which will be appended to original path.
+     * @return appended path 
+     */
+    public static String appendPath(String originalPath, String appendPath) {
+        if(OSChecker.isWindows()) {
+            return appendPath(originalPath, appendPath, true);
+        }
+        return appendPath(originalPath, appendPath, false);
+    }
+    
+    /**
+     * return appended path with given OS type..
+     * @param originalPath original path
+     * @param appendPath path which will be appended to original path.
+     * @param iwWindow if you want to get Windows path, true. Else, false.
+     * @return appended path 
+     */
+    public static String appendPath(String originalPath, String appendPath, boolean isWindows) {
+        originalPath = originalPath.trim();
+        appendPath = appendPath.trim();
+        
+        char separatorChar = isWindows ? '\\' : '/';
+        char targetChar = isWindows ? '/' : '\\';
+        
+        if(isWindows) {
+            originalPath = originalPath.replace(targetChar, separatorChar);
+            appendPath = appendPath.replace(targetChar, separatorChar);
+        }
+        else {
+            originalPath = originalPath.replace(targetChar, separatorChar);
+            appendPath = appendPath.replace(targetChar, separatorChar);
+        }
+        
+        return trimLastPath(originalPath, separatorChar).concat(trimFirstPath(appendPath, separatorChar));
+    }
+    
+    /**
+     * Convert path to given OS path.
+     * 
+     * @param input path which will be converted.
+     * @param isWindows If windows, true. Else, false. 
+     * @return converted path.
+     */
+    public static String convertToOSPath(String input, boolean isWindows) {
+        return appendPath(input, StringUtil.EMPTY_STRING, isWindows);
+    }
+    
+    /**
+     * Convert path to current OS path.
+     * 
+     * @param input path which will be converted.
+     * @return converted path.
+     */
+    public static String convertToOSPath(String input) {
+        if(OSChecker.isWindows()) {
+            return convertToOSPath(input, true);
+        }
+        else {
+            return convertToOSPath(input, false);
+        }
+    }
+    
+    private static String trimLastPath(String originalPath, char targetChar) {
+        if(StringUtil.isEmpty(originalPath)) {
+            return StringUtil.EMPTY_STRING;
+        }
+        
+        char lastChar = originalPath.charAt(originalPath.length() - 1);
+        if(lastChar == targetChar) {
+            return originalPath.substring(0, originalPath.length() - 1);
+        }
+        return originalPath;
+    }
+    
+    private static String trimFirstPath(String originalPath, char targetChar) {
+        if(StringUtil.isEmpty(originalPath)) {
+            return StringUtil.EMPTY_STRING;
+        }
+        
+        char firstChar = originalPath.charAt(0);
+        if(firstChar != targetChar) {
+            return ("" + targetChar).concat(originalPath);
+        }
+        return originalPath;
+    }
+
+    /**
+     * check the file exist in path
+     * 
+     * @param path - file path
+     * @return if exist true, not exist false
+     * 
+     * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+     */
+    public static boolean isExist( String path ) {
+        if ( StringUtil.isEmpty( path ) ) {
+            return false;
+        }
+        File file = new File( path );
+        return file.exists();
+    }
 }
diff --git a/org.tizen.common/src/org/tizen/common/util/FilenameUtil.java b/org.tizen.common/src/org/tizen/common/util/FilenameUtil.java
new file mode 100755 (executable)
index 0000000..ebaeef5
--- /dev/null
@@ -0,0 +1,536 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.tizen.common.util.ArrayUtil.size;
+import static org.tizen.common.util.StringUtil.trimLeadingCharacter;
+import static org.tizen.common.util.StringUtil.trimTrailingCharacter;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Stack;
+import java.util.regex.Pattern;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * FilenameUtil.
+ * 
+ * Helper related to file name
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class FilenameUtil
+{
+       /**
+        * character using separator
+        */
+       public static final char SEPARATOR_DIRECTORY = '/';
+       /**
+        * result of {@link #isVaildName(String)} and {@link #isVaildName(String, int)
+        */
+       public static final int IS_VALID_NAME = 0;
+       public static final int HAS_INVALID_CHARACTER = 1;
+       public static final int HAS_NO_NAME = 2;
+       public static final int IS_NULL = 3;
+       
+       protected static final Logger logger = LoggerFactory.getLogger( FilenameUtil.class );
+       
+       /**
+        * Separate path to directory name fragements
+        * 
+        * @param path file path
+        * 
+        * @return canonical path's fragements
+        */
+       public static
+       String[]
+       getCanonicalFragments( final String path )
+       {
+               final String safe = path.replace( File.separatorChar, SEPARATOR_DIRECTORY);
+               final ArrayList<String> ret = new ArrayList<String>();
+               for ( final String fragment : safe.split( "" + SEPARATOR_DIRECTORY ) )
+               {
+                       if ( StringUtil.isEmpty( fragment ) )
+                       {
+                               continue;
+                       }
+                       
+                       ret.add( fragment );
+               }
+               return ret.toArray( new String[0] );
+       }
+
+       /**
+        * return tailing path in <code>path</code> from <code>start</code>
+        * 
+        * @param path file path
+        * @param start the number of path fragment
+        * 
+        * @return result file path fragments
+        */
+       public static
+       String
+       getTailingPath(
+               final String path,
+               final int start
+       )
+       {
+               final String[] fragments = getCanonicalFragments( path );
+               
+               final StringBuilder buffer = new StringBuilder();
+               
+               for ( int i = Math.max( 0, size( fragments ) - start ), n = size( fragments ) ; i < n ; ++i )
+               {
+                       buffer.append( fragments[i] );
+                       if ( i < size( fragments ) - 1 )
+                       {
+                               buffer.append( SEPARATOR_DIRECTORY );
+                       }
+               }
+               
+               return buffer.toString();
+       }
+
+       /**
+        * remove <code>numberOfPath</code> path fragments from <code>path</code>
+        * @param path file path
+        * @param numberOfPath the number of path fragment to remove
+        * 
+        * @return result file path
+        */
+       public static
+       String
+       removeTailingPath(
+               final String path,
+               final int numberOfPath
+       )
+       {
+           logger.trace( "Path :{}, Index :{}", path, numberOfPath );
+               final String[] fragments = getCanonicalFragments( path );
+               
+               final StringBuilder buffer = new StringBuilder();
+               
+               for ( int i = 0, n = Math.max( 0, size( fragments ) - numberOfPath ) ; i < n ; ++i )
+               {
+                       buffer.append( SEPARATOR_DIRECTORY );
+                       buffer.append( fragments[i] );
+               }
+               
+               final String ret = buffer.toString();
+               if ( 0 < ret.length() )
+               {
+                   return buffer.toString().substring( path.startsWith( "/" )||path.startsWith( File.separator )?0:1 );
+               }
+               
+               return "";
+       }
+       
+       /**
+        * concatenate <code>path</code> and <code>pathToAdd</code>
+        * 
+        * @param path parent path
+        * @param pathToAdd path fragment to add
+        * 
+        * @return result file path
+        */
+       public static
+       String
+       addTailingPath(
+               final String path,
+               final String pathToAdd
+       )
+       {
+               // TODO Verify canonical form
+               return trimTrailingCharacter( path, SEPARATOR_DIRECTORY ) + SEPARATOR_DIRECTORY + trimLeadingCharacter( pathToAdd, SEPARATOR_DIRECTORY );
+       }
+       
+       /**
+        * return value if <code>root</code> contains <code>filePath</code> as descendant
+        * 
+        * @param root file path
+        * @param filePath file path
+        * 
+        * @return boolean value to check
+        */
+       public static
+       boolean
+       isAncestor( final String root, final String filePath )
+       {
+               final String[] rootFragments = FilenameUtil.getCanonicalFragments( root );
+               final String[] fileFragments = FilenameUtil.getCanonicalFragments( filePath );
+               
+               if ( fileFragments.length < rootFragments.length )
+               {
+                       return false;
+               }
+               
+               for ( int i = 0, n = rootFragments.length ; i < n ; ++i )
+               {
+                       if ( !ObjectUtil.equals( rootFragments[i], fileFragments[i] ) )
+                       {
+                               return false;
+                       }
+               }
+               
+
+               return true;
+       }
+       
+       /**
+        * return relative path of <code>filePath</code> based <code>root</code>
+        * 
+        * @param root base path
+        * @param filePath file path
+        * 
+        * @return relative path
+        */
+       public static
+       String
+       getRelativePath(
+               final String root,
+               final String filePath
+       )
+       {
+               final String[] rootFragments = FilenameUtil.getCanonicalFragments( root );
+               final String[] fileFragments = FilenameUtil.getCanonicalFragments( filePath );
+               
+               Assert.isTrue(
+                       rootFragments.length < fileFragments.length,
+                       "root must be ancestor[" + root + "] of path[" + filePath + "]"
+               );
+               
+               for ( int i = 0, n = rootFragments.length ; i < n ; ++i )
+               {
+            Assert.isTrue( ObjectUtil.equals( rootFragments[i], fileFragments[i] ), i + "th [" + rootFragments[i] + "] != [" + fileFragments[i] + "]" );
+               }
+               
+               final StringBuilder buffer = new StringBuilder();
+               
+               for ( int i = rootFragments.length, n = fileFragments.length ; i < n ; ++i )
+               {
+                       if ( rootFragments.length < i )
+                       {
+                               buffer.append( SEPARATOR_DIRECTORY );
+                       }
+                       buffer.append( fileFragments[i] );
+               }
+               
+               return buffer.toString();
+       }
+
+       
+       /**
+        * Create canonical form for file path
+        * 
+        * @param file {@link File} with file path
+        * 
+        * @return canonical path
+        * 
+        * @throws IOException If file's path is illegal
+        */
+       public static
+       String
+       getCanonicalPath(
+               final File file
+       )
+       throws IOException
+       {
+               final String osCanonicalPath = file.getCanonicalPath();
+               
+               return getCanonicalForm( osCanonicalPath );
+               
+       }
+
+       /**
+        * Create canonical form for file path
+        * 
+        * @param file path
+        * 
+        * @return canonical path, <code>null</code> if wrong path
+        * 
+        * @throws IOException If file's path is illegal
+        * 
+        * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+        */
+       public static
+       String
+       getCanonicalPath(
+               final String path
+       )
+       throws IOException
+       {
+               if ( !FileUtil.isExist( path ) ) {
+                       return null;
+               }
+               File file = new File( path );
+               
+               return getCanonicalPath( file );
+               
+       }
+
+       /**
+        * Convert path to canonical form
+        * 
+        * @param path file path
+        * 
+        * @return canonical path
+        */
+       public static
+       String
+       getCanonicalForm(
+               final String path
+       )
+       {
+           logger.trace( "Path :{}", path );
+               final String[] fragments = getCanonicalFragments( path.replace( File.separatorChar, SEPARATOR_DIRECTORY ) );
+               
+               final Stack<String> stack = new Stack<String>();
+               
+               for ( int i = 0, n = size( fragments ) ; i<n ; ++i )
+               {
+                   final String fragment = fragments[i];
+                   logger.trace( "Path :{}", fragment );
+                   if ( ".".equals( fragment ) )
+                   {
+                       continue;
+                   }
+                   else if ( "..".equals( fragment ) )
+                   {
+                       stack.pop();
+                   }
+                   else
+                   {
+                       stack.push( fragment );
+                   }
+               }
+               
+               if ( stack.isEmpty() )
+               {
+                   return "" + SEPARATOR_DIRECTORY;
+               }
+               final StringBuilder buffer = new StringBuilder();
+               
+               for ( final String f : stack )
+               {
+                   buffer.append( "/" );
+                   buffer.append( f );
+               }
+               
+               return buffer.toString();
+       }
+       
+       public static String getFilename( final String path )
+       {
+               return getTailingPath( path, 1 );
+       }
+       
+    /**
+     * Returns an escaped name of the file name for linux.
+     * 
+     * \ " $ => \\ \" \$
+     * 
+     * @param fileName
+     */
+    public static String getEscapedName(String fileName)
+    {
+        Pattern sEscapePattern = Pattern.compile("([\\\\\"$])");
+        return sEscapePattern.matcher(fileName).replaceAll("\\\\$1");
+    }
+
+    /**
+     * Return validation check of filename
+     * 
+     * Windows does not allow \ / : * ? " <> | for file name
+     * 
+     * Linux does not allow / for file name
+     * 
+     * @param fileName file name to check
+     * 
+     * @param os os type from OSChecker
+     * 
+     * @return validation check result
+     */
+    public static int isVaildName(String fileName, int os)
+    {
+        int result = IS_VALID_NAME;
+        if(fileName == null)
+        {
+            result = IS_NULL;
+        }
+        else if(fileName.trim().length() == 0)
+        {
+            result = HAS_NO_NAME;
+        }
+        else
+        {
+            Pattern invalidPattern;
+
+            switch(os)
+            {
+                case OSChecker.WINDOWS:
+                    invalidPattern = Pattern.compile("([\\\\/:*?\"<>|])");
+                    break;
+                case OSChecker.LINUX:
+                default:
+                    invalidPattern = Pattern.compile("([/])");
+            }
+
+            if(invalidPattern.matcher(fileName).find())
+            {
+                result = HAS_INVALID_CHARACTER;
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Return validation check of filename for host os
+     * 
+     * @param fileName file name to check
+     * 
+     * @return validation check result
+     */
+    public static boolean isVaildName(String fileName)
+    {
+        return isVaildName(fileName, OSChecker.getOSID()) == IS_VALID_NAME ? true : false;
+    }
+
+    /**
+     * Return invalid filename characters
+     * 
+     * @param os os type from OSChecker
+     * 
+     * @return validation check result
+     */
+    public static String getInvalidCharacters(int os)
+    {
+        switch(os)
+        {
+            case OSChecker.WINDOWS:
+                return "\\\\/:*?\"<>|";
+            case OSChecker.LINUX:
+                return "/";
+            default:
+                return "/";
+        }
+    }
+
+    /**
+     * Return invalid filename characters for host os
+     * 
+     * @return validation check result
+     */
+    public static String getInvalidCharacters()
+    {
+        return getInvalidCharacters(OSChecker.getOSID());
+    }
+
+    public static String addDoubleQuote(String str)
+    {
+        return "\""+ str + "\"";
+    }
+
+       /**
+        * Extract file name without extension from full name
+        * 
+        * @param nameWithExt file name with extension
+        * 
+        * @return file name
+        */
+       public static String getName( final String nameWithExt )
+       {
+           Assert.notNull( nameWithExt );
+               
+               final int index = nameWithExt.lastIndexOf( '.' );
+               
+               if ( index < 0 )
+               {
+                       return nameWithExt;
+               }
+               
+               return nameWithExt.substring( 0, index );
+       }
+       
+       /**
+        * Extract file extension from full name
+        * 
+        * @param nameWithExt file name with extension
+        * 
+        * @return file extension
+        */
+       public static String getExtension( final String nameWithExt )
+       {
+           Assert.notNull( nameWithExt );
+               
+               final int index = nameWithExt.lastIndexOf( '.' );
+               
+               if ( index < 0 )
+               {
+                       return "";
+               }
+               
+               return nameWithExt.substring( index + 1 );
+       }
+       
+       /**
+        * Compare two file path with canonical
+        * 
+        * @param file1 file1 to compare
+        * @param file2 file2 to compare
+        * 
+        * @return <code>true</code> if <code>file1</code> and <code>file2</code> have equal path
+        */
+       public static boolean equals( final File file1, final File file2 )
+       {
+               try
+               {
+                       return ObjectUtil.equals(
+                               getCanonicalPath( file1 ),
+                               getCanonicalPath( file2 )
+                       );
+               } catch ( final IOException e )
+               {
+                       throw new IllegalArgumentException( e );
+               }
+       }
+       
+       
+       /**
+        * Compare <code>path1</code> and <code>path2</code> and return equality
+        * 
+        * @param path1 file path1
+        * @param path2 file path2
+        * 
+        * @return equality
+        */
+       public static boolean equals( final String path1, final String path2 )
+       {
+               return ObjectUtil.equals( path1, path2 );
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/FilterIterator.java b/org.tizen.common/src/org/tizen/common/util/FilterIterator.java
new file mode 100644 (file)
index 0000000..1002235
--- /dev/null
@@ -0,0 +1,158 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+/**
+ * FilterIterator.
+ *
+ * {@link Iterator} using filter method
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @param <E>
+ */
+public class 
+FilterIterator<E>
+implements Iterator<E>
+{
+       /**
+        * Unfiltered iterator
+        */
+       protected final Iterator<? extends E> impl;
+       
+       /**
+        * Acceptable element
+        */
+       protected E acceptableElement;
+       
+       /**
+        * Constructor with array instance of type E
+        * 
+        * @param array array to iterate
+        */
+       public
+       FilterIterator(
+               final E[] array
+       )
+       {
+               this( Arrays.asList( array ) );
+       }
+       
+       /**
+        * Constructor with collection containing E object
+        * 
+        * @param collection collection to iterate
+        */
+       public
+       FilterIterator(
+               final Collection<? extends E> collection
+       )
+       {
+               this.impl = ( null == collection )?null:collection.iterator();
+       }
+
+       /* (non-Javadoc)
+        * @see java.util.Iterator#hasNext()
+        */
+       @Override
+       public
+       boolean
+       hasNext()
+       {
+               if ( null == this.impl )
+               {
+                       return false;
+               }
+               
+               while ( this.impl.hasNext() )
+               {
+                       final E element = this.impl.next();
+                       if ( isAcceptable( element ) )
+                       {
+                               this.acceptableElement = element;
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+       /* (non-Javadoc)
+        * @see java.util.Iterator#next()
+        */
+       @Override
+       public
+       E
+       next()
+       {
+               if ( null == this.impl )
+               {
+                       throw new NoSuchElementException();
+               }
+               
+               return this.acceptableElement;
+       }
+
+       /* (non-Javadoc)
+        * @see java.util.Iterator#remove()
+        */
+       @Override
+       public
+       void
+       remove()
+       {
+               if ( null == this.impl )
+               {
+                       throw new NoSuchElementException();
+               }
+               this.impl.remove();
+       }
+       
+       /**
+        * Determine <code>element</code> is acceptable( not filtering )
+        * 
+        * @param element object to check
+        * 
+        * @return boolean value if <code>element is acceptable
+        */
+       protected
+       boolean
+       isAcceptable(
+               final E element
+       )
+       {
+               if ( null == element )
+               {
+                       return false;
+               }
+               
+               return true;
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/FreeMarkerUtil.java b/org.tizen.common/src/org/tizen/common/util/FreeMarkerUtil.java
new file mode 100644 (file)
index 0000000..b43d60f
--- /dev/null
@@ -0,0 +1,180 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Jihoon Song <jihoon80.song@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Locale;
+import java.util.Map;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+import freemarker.template.Configuration;
+import freemarker.template.DefaultObjectWrapper;
+import freemarker.template.Template;
+import freemarker.template.TemplateException;
+
+/**
+ * FreeMarkerUtil.
+ * 
+ * Helper related to FreeMarker
+ * 
+ * @author Jihoon Song{@literal <jihoon80.song@samsung.com>} (S-Core)
+ */
+public class FreeMarkerUtil {
+    
+    private final static String DEFAULT_ENCODING = "8859_1";
+    
+    // Constructor
+    private FreeMarkerUtil() {}
+    
+    /**
+     * Get default initialized template configuration.
+     * 
+     * @return Configuration
+     */
+    public static Configuration getDefaultConfiguration() {
+        // initialize FreeMarker engine
+        Configuration cfg = new Configuration();
+        cfg.setEncoding(Locale.getDefault(), DEFAULT_ENCODING); //$NON-NLS-1$
+        cfg.setObjectWrapper(new DefaultObjectWrapper());
+        
+        return cfg;
+    }
+    
+    /**
+     * Get initialized template configuration.
+     * 
+     * @param activator be used for Plug-in based relative path. If this value is null, throws NullPointerException.
+     * @param relativeParentPath relative template's parent path in Plug-in Bundle.
+     * @return Configuration
+     * @throws URISyntaxException
+     * @throws IOException
+     */
+    public static Configuration getConfiguration(AbstractUIPlugin activator, String relativeParentPath)
+            throws URISyntaxException, IOException {
+        Assert.notNull(activator);
+        Assert.notNull(relativeParentPath);
+        
+        Configuration cfg = getDefaultConfiguration();
+        
+        // set template location in plug-in
+        URL templateFolderURL = activator.getBundle().getEntry(relativeParentPath);
+        if (templateFolderURL == null) {
+            throw new FileNotFoundException();
+        }
+        
+        URI templateFolderURI = FileLocator.toFileURL(templateFolderURL).toURI();
+        File templateFolder = new File(templateFolderURI);
+        
+        cfg.setDirectoryForTemplateLoading(templateFolder);
+        
+        return cfg;
+    }
+    
+    /**
+     * Generate document using freemarker template.
+     * 
+     * @param root template data model
+     * @param cfg template configuration instance
+     * @param templateFile template file
+     * @param destination output file name
+     * @throws IOException
+     * @throws TemplateException
+     */
+    public static void generateDocument(Map<String, Object> root, Configuration cfg, String templateFile, String destination)
+            throws IOException, TemplateException {
+        generateDocument(root, cfg, templateFile, new File( destination ));
+    }
+    
+    /**
+     * Generate document using freemarker template.
+     * 
+     * @param root template data model
+     * @param cfg template configuration instance
+     * @param templateFile template file
+     * @param destinationFile will be used for internal stream like FileOutputStream.
+     * @throws IOException
+     * @throws TemplateException
+     */
+    public static void generateDocument(Map<String, Object> root, Configuration cfg, String templateFile, File destinationFile)
+            throws IOException, TemplateException {
+        generateDocument(root, cfg, templateFile, new FileOutputStream( destinationFile ));
+    }
+    
+    /**
+     * Generate document using freemarker template.
+     * 
+     * @param root template data model
+     * @param cfg template configuration instance
+     * @param templateFile template file
+     * @param outputStream will be used for internal writer like BufferedWriter and OutputStreamWriter.
+     * @throws IOException
+     * @throws TemplateException
+     */
+    public static void generateDocument(Map<String, Object> root, Configuration cfg, String templateFile, OutputStream outputStream)
+            throws IOException, TemplateException {
+        generateDocument(root, cfg, templateFile, new BufferedWriter( new OutputStreamWriter( outputStream ) ));
+    }
+    
+    /**
+     * Generate document using freemarker template.
+     * 
+     * @param root template data model
+     * @param cfg template configuration instance
+     * @param templateFile template file
+     * @param writer output writer
+     * @throws IOException
+     * @throws TemplateException
+     */
+    public static void generateDocument(Map<String, Object> root, Configuration cfg, String templateFile, Writer writer)
+            throws IOException, TemplateException {
+        Assert.notNull(root);
+        Assert.notNull(cfg);
+        Assert.notNull(templateFile);
+        Assert.notNull(writer);
+        
+        Template template = cfg.getTemplate(templateFile);
+        
+        // generate document
+        try {
+            template.process(root, writer);
+            IOUtil.tryFlush(writer);
+        } finally {
+            IOUtil.tryClose(writer);
+        }
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/HelpBrowser.java b/org.tizen.common/src/org/tizen/common/util/HelpBrowser.java
new file mode 100644 (file)
index 0000000..58db9e3
--- /dev/null
@@ -0,0 +1,120 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Ho Namkoong <ho.namkoong@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.browser.LocationEvent;
+import org.eclipse.swt.browser.LocationListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.help.IWorkbenchHelpSystem;
+import org.tizen.common.CommonPlugin;
+
+public class HelpBrowser {
+    
+    private static final String HELP_PAGE_PREFIX = "help:/";
+    private static final String BACK_ICON = "icons/back.gif";
+    private static final String FORWARD_ICON = "icons/forward.gif";
+    
+    private Browser browser;
+
+    public Browser getBrowser() {
+        return browser;
+    }
+
+    public HelpBrowser(Composite parent, int style) {
+        this(parent, style, false);
+    }
+    
+    public HelpBrowser(Composite parent, int style, boolean hasToolbar) {
+        if(hasToolbar == true) {
+            generateToolBar(parent);
+        }
+        this.browser = new Browser(parent, style);
+        GridData gd = new GridData(GridData.FILL_BOTH);
+        this.browser.setLayoutData(gd);
+        enableHelpPage();
+    }
+
+    private void generateToolBar(Composite parent) {
+        ToolBar toolbar = new ToolBar(parent, SWT.None);
+        
+        ToolItem backButton = new ToolItem(toolbar, SWT.PUSH);
+        Image backIcon = ImageUtil.getImage(CommonPlugin.PLUGIN_ID, BACK_ICON);
+        backButton.setImage(backIcon);
+        
+        ToolItem forwardButton = new ToolItem(toolbar, SWT.PUSH);
+        Image forwardIcon = ImageUtil.getImage(CommonPlugin.PLUGIN_ID, FORWARD_ICON);
+        forwardButton.setImage(forwardIcon);
+        
+        forwardButton.addSelectionListener(new SelectionListener() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                browser.forward();
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        });
+        
+        backButton.addSelectionListener(new SelectionListener() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                browser.back();
+            }
+
+            @Override
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+        });
+    }
+
+    private void enableHelpPage() {
+        this.getBrowser().addLocationListener(new LocationListener() {
+            @Override
+            public void changing(LocationEvent event) {
+                String url = event.location;
+                if(url.startsWith(HELP_PAGE_PREFIX)) {
+                    Browser browser = ((Browser)event.widget);
+                    String tempUrl = url.substring(HELP_PAGE_PREFIX.length(), url.length());
+                    IWorkbenchHelpSystem helpSystem = PlatformUI.getWorkbench().getHelpSystem();
+                    browser.setUrl(helpSystem.resolve(tempUrl, false).toString());
+                }
+            }
+            @Override
+            public void changed(LocationEvent event) {
+            }
+        });
+    }
+}
old mode 100644 (file)
new mode 100755 (executable)
index 4e2330f..f9308bd
 */
 package org.tizen.common.util;
 
+import static org.tizen.common.util.IOUtil.redirect;
+import static org.tizen.common.util.IOUtil.tryClose;
+import static org.tizen.common.util.StringUtil.isEmpty;
+import static org.tizen.common.util.StringUtil.trim;
+
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStreamReader;
-import java.net.InetAddress;
 import java.nio.channels.FileChannel;
 
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.ui.view.console.ConsoleManager;
 
 public abstract class HostUtil{
-       
-//     public static final String USER = System.getenv("USER");
-//     public static final String USER_HOME = System.getenv("HOME");
-       public static final String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
-       public static final String FILE_SEPARATOR = System.getProperty("file.separator"); //$NON-NLS-1$
-       
-       private static final String PROC_PATH = "/proc"; //$NON-NLS-1$
-       private static final String SHELL_COMMAND_LINUX= "/bin/sh"; //$NON-NLS-1$
-       private static final String SHELL_COMMAND_WINDOW= "cmd"; //$NON-NLS-1$
-       
-       public static boolean hasProcFile(String pid) {
-               if(pid==null||pid.equals("")) //$NON-NLS-1$
-                       return false;
+    
+    protected static Logger logger = LoggerFactory.getLogger( HostUtil.class );
+    
+    public static final String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$
+    public static final String FILE_SEPARATOR = System.getProperty("file.separator"); //$NON-NLS-1$
+    
+    private static final String SHELL_COMMAND_LINUX= "/bin/sh"; //$NON-NLS-1$
+    private static final String SHELL_COMMAND_WINDOW= "cmd"; //$NON-NLS-1$
+    
+    public static String getContents(String filePath) {
+        FileReader input = null;
+        StringBuilder contents = new StringBuilder();
+        
+        try {
+            input = new FileReader(filePath);
+            redirect( input, contents );
+            return trim( contents.toString() );
+        } catch( final IOException e) {
+            logger.warn( "Exception occurred: ", e );
+            return null;
+        }finally{
+            tryClose( input, contents );
+        }
+    }
+
+    public static boolean exists(String path) {
+        if( isEmpty( path ) )
+        {
+            return false;
+        }
+
+        File file = new File( path );
+
+        return file.exists();
+    }
+
+    public static boolean execute(String command){
+        
+        if(command == null) {
+            return false;
+        }
+        Process proc = null;
+        Runtime runtime = Runtime.getRuntime();
+        
+        String[] fullCommand = getCommand(command);
+        
+        int i = 0;
+        try {
+            proc= runtime.exec(fullCommand);
+            i = proc.waitFor();
+        } catch (IOException e) {
+            logger.warn( "Exception occurred: ", e );
+            return false;
+        }
+        catch (InterruptedException e)
+        {
+            logger.warn( "Exception occurred: ", e );
+        } finally{
+            logger.info( "HostUtil execute - exit value : {}", i );
+            if(proc!=null)    
+            {
+                proc.destroy();
+            }
+        }
+        
+        return i==0;
+    }
+    
+    public static boolean batchExecute(String command)    
+    {
+        if(command == null) {
+            return false;
+        }
+        String[] fullCommand = getCommand(command);
+
+        Runtime run = Runtime.getRuntime();
+        Process p = null;
+
+        int i = 0;
+        try{
+            p = run.exec(fullCommand);
+            i = p.waitFor();
+            StreamGobbler gb1 = new StreamGobbler(p.getInputStream());
+            StreamGobbler gb2 = new StreamGobbler(p.getErrorStream());
+            gb1.start();
+            gb2.start();
+        }catch(IOException e){
+            logger.warn( "Exception occurred: ", e );
+            return false;
+        } catch (InterruptedException e)
+        {
+            logger.warn( "Exception occurred: ", e );
+            return false;
+        } 
+        return i == 0;
+    }
+
+    /**
+     * Don't need for emultor install registration.
+     * using java.lang.Runtime.exec(String[] cmdarray, String[] envp, File dir) 
+     * @param command  - array containing the command to call and its arguments.
+     * @param envp - array of strings, each element of which has environment variable settings in format name=value.
+     * @param dir - Emultor path.
+     * @return success true, failed false.
+     */
+    public static boolean batchExecute(String command, String[] envp, File dir)    
+    {
+        String[] fullCommand = getCommand(command);
+
+        Runtime run = Runtime.getRuntime();
+        Process p = null;
+
+        StreamGobbler gb1 = null;
+        StreamGobbler gb2 = null;
+        try{
+            p = run.exec(fullCommand, envp, dir);
+            gb1 = new StreamGobbler(p.getInputStream());
+            gb2 = new StreamGobbler(p.getErrorStream());
+            gb1.start();
+            gb2.start();
+        }catch(IOException e){
+            logger.warn( "Exception occurred: ", e );
+            return false;
+        }finally{
+            logger.debug( "Output Stream :{}", gb1.getResult() );
+            logger.debug( "Error Stream :{}", gb2.getResult() );
+        } 
+        return true;
+    }
+
+    public static String returnExecute(String command, String workingDir) {
+        return returnExecute(command, workingDir, false);        
+    }
+    
+    public static String returnExecute(String command, String workingDir, boolean withError) {
+
+        if(command == null) {
+            return null;
+        }
+        BufferedReader input = null;
+        StringBuilder contents = new StringBuilder();
+        String line = null;
+
+        Process proc = null;
+
+        String[] fullCommand = getCommand(command);
 
-               String pidFile = PROC_PATH+Path.SEPARATOR+pid;
-               return exists(pidFile);
-       }
-       public static boolean isMenuReady(String pid) {
-               if(pid==null||pid.equals("")) //$NON-NLS-1$
-                       return false;
+        try {
+            ProcessBuilder pb = new ProcessBuilder();
+            pb.redirectErrorStream(withError);            
+            pb.command(fullCommand);
+            if(workingDir != null) {
+                pb.directory(new File(workingDir));
+            }
+            proc = pb.start();
+            input = new BufferedReader(new InputStreamReader(proc.getInputStream()));
+            while((line=input.readLine())!=null){
+                contents.append(line);
+                contents.append(LINE_SEPARATOR);
+            }
+        } catch (IOException e) {
+            logger.warn( "Exception occurred: ", e );
+            return null;
+        } finally{
+            tryClose( input );
+            if(proc!=null)    
+            {
+                proc.destroy();
+            }
+        }
+        
+        return contents.toString().trim();
+        
+    }
+    
+    /**
+     * Show output messages while executes the command on console view
+     * @param command - Command to execute.
+     * @param viewName - View name showing messages while executes the command.
+     * 
+     * @throws IOException 
+     * @throws InterruptedException 
+     */
+    public static void executeWithConsole(String command, String viewName) throws IOException, InterruptedException
+    {
+        BufferedReader input = null;
 
-               String pidFile = PROC_PATH+Path.SEPARATOR+pid;
-               return exists(pidFile);
-       }
+        String line = null;
+        
+        Process proc = null;
+        
+        String[] fullCommand = getCommand(command);
+        
+        ConsoleManager cm = new ConsoleManager( viewName, true );
+        cm.clear();
+        
+        try {
+            ProcessBuilder pb = new ProcessBuilder();
+            pb.redirectErrorStream(true);
+            pb.command(fullCommand);
+            proc = pb.start();
+            input = new BufferedReader(new InputStreamReader(proc.getInputStream()));
+            while((line=input.readLine())!=null){
+                cm.println(line);
+            }
+            proc.waitFor();
+            // abnormal termination
+            if (proc.exitValue() != 0)
+            {
+                throw new IllegalStateException("Failed to execute command: " + command);
+            }
+        } finally {
+            tryClose( input );
+            if(proc!=null)
+            {
+                proc.destroy();
+            }
+        }
+    }
+    
+    public static String returnExecute(String command){
+        
+        return returnExecute(command, null);
+    }
 
-       
-       public static String getContents(String filePath) {
-               BufferedReader input = null;
-               StringBuilder contents = new StringBuilder();
-               String line = null;
-               
-               try {
-                       input = new BufferedReader(new FileReader(filePath));
-                       while((line=input.readLine())!=null){
-                               contents.append(line);
-                               contents.append(LINE_SEPARATOR);
-                       }
-               }catch(Exception e) {
-//                     e.printStackTrace();
-                       return null;
-               }finally{
-                       if(input!=null)
-                               try {
-                                       input.close();
-                               } catch (IOException e) {
-                               }
-               }
-               
-               return contents.toString().trim();
-       }
-       
-       public static boolean isReachable(String ip) {
-               try {
-                       return InetAddress.getByName(ip).isReachable(100);
-               } catch (Exception e) {
-                       e.printStackTrace();
-               }
-               return false;
-       }
+    public static String[] getCommand(String command){
 
-       public static boolean exists(String path) {
-               if(path==null||path.equals("")) //$NON-NLS-1$
-                       return false;
-               
-               IPath ipath = new Path(path);
-               File file = ipath.toFile();
-                       
-               if(file!=null&&file.exists())
-                       return true;
-               else
-                       return false;
-       }
-       
-       public static boolean execute(String command){
-               Process proc = null;
-               Runtime runtime = Runtime.getRuntime();
-               
-               String[] fullCommand = getCommand(command);
-               
-               int i = 0;
-               try {
-                       proc= runtime.exec(fullCommand);
-                       i = proc.waitFor();
-               } catch (Exception e) {
-                       e.printStackTrace();
-                       return false;
-               } finally{
-                       System.out.println("HostUtil execute - exit value : " + i);
-                       if(proc!=null)  
-                               proc.destroy();
-               }
-               
-               return i==0;
-       }
-       
-       public static boolean batchExecute(String command)      
-       {
-               String[] fullCommand = getCommand(command);
+        if(OSChecker.isWindows()){
+            return new String[]{SHELL_COMMAND_WINDOW,"/c",command}; //$NON-NLS-1$
+        }else
+        {
+            return new String[]{SHELL_COMMAND_LINUX,"-c",command}; //$NON-NLS-1$
+        }
+    }
 
-               Runtime run = Runtime.getRuntime();
-                 Process p = null;
-                 
-                 try{
-                  p = run.exec(fullCommand);
-                  StreamGobbler gb1 = new StreamGobbler(p.getInputStream());
-                  StreamGobbler gb2 = new StreamGobbler(p.getErrorStream());
-                  gb1.start();
-                  gb2.start();
-                 }catch(Exception e){
-                         e.printStackTrace();
-                         return false;
-                 }finally{
-                 } 
-               return true;
-       }
+    /**
+     * @deprecated Use {@link FileUtil#createFile(File)}, 
+     * {@link FileUtil#createFile(String)}, 
+     * {@link FileUtil#createFile(String, String)} 
+     * or 
+     * {@link FileUtil#createTextFile(File, String, String)}, 
+     * {@link FileUtil#createTextFile(String, String, String)}, 
+     * {@link FileUtil#createTextFile(String, String, String, String)} 
+     * and 
+     * {@link FileUtil#createDirectory(File)}, 
+     * {@link FileUtil#createDirectory(String)}, 
+     * {@link FileUtil#createDirectory(String, String)} 
+     * instead.
+     */
+    @Deprecated
+    public static boolean createFile(String path, String contents) {
+        BufferedWriter output = null;
+        try {
+            File file = new File(path);
+            
+            File folder = file.getParentFile();
+            if(folder!=null)
+            {
+                folder.mkdirs();
+            }
+            
+            file.createNewFile();
+            
+            output = new BufferedWriter(new FileWriter(file));
+            output.write(contents);
+            return true;
+        } catch (IOException e) {
+            logger.warn( "Exception occurred: ", e );
+            return false;
+        }finally{
+            tryClose( output );
+        }
+    }
+    
+    
+    /**
+     * @deprecated Use {@link FileUtil#copyTo(String, String)} instead.
+     * 
+     * @throws IOException 
+    */
+    @Deprecated
+    public static boolean copyFile(String src, String des) throws IOException  {
+        boolean canExecute = false;
+        File srcFile=new File(src);
+        File desFile=null;
+        FileInputStream fis=null;
+        FileOutputStream fos=null;
+        FileChannel fcin=null;
+        FileChannel fcout=null;
 
-       /**
-        * Don't need for emultor install registration.
-        * using java.lang.Runtime.exec(String[] cmdarray, String[] envp, File dir) 
-        * @param command  - array containing the command to call and its arguments.
-        * @param envp - array of strings, each element of which has environment variable settings in format name=value.
-        * @param dir - Emultor path.
-        * @return success true, failed false.
-        */
-       public static boolean batchExecute(String command, String[] envp, File dir)     
-       {
-               String[] fullCommand = getCommand(command);
+        canExecute = srcFile.canExecute();
 
-               Runtime run = Runtime.getRuntime();
-                 Process p = null;
+        desFile= new File(des);
+        File paths = new File(desFile.getAbsolutePath().substring(0, desFile.getAbsolutePath().lastIndexOf("/"))); //$NON-NLS-1$
+        if (!paths.exists()) {
+            paths.mkdirs();
+        }
 
-                 StreamGobbler gb1 = null;
-                 StreamGobbler gb2 = null;
-                 try{
-                  p = run.exec(fullCommand, envp, dir);
-                  gb1 = new StreamGobbler(p.getInputStream());
-                  gb2 = new StreamGobbler(p.getErrorStream());
-                  gb1.start();
-                  gb2.start();
-                 }catch(Exception e){
-                         e.printStackTrace();
-                         return false;
-                 }finally{
-                         System.out.println(gb1.getResult());
-                         System.out.println(gb2.getResult());
-                 } 
-               return true;
-       }
+        try {
+            fis= new FileInputStream(srcFile);
+            fos= new FileOutputStream(desFile);
+            fcin= fis.getChannel();
+            fcout= fos.getChannel();
 
-       public static String returnExecute(String command, String workingDir) {
-               BufferedReader input = null;
-               StringBuilder contents = new StringBuilder();
-               String line = null;
-               
-               Process proc = null;
-               
-               String[] fullCommand = getCommand(command);
-               
-               try {
-                               ProcessBuilder pb = new ProcessBuilder();
-                               pb.command(fullCommand);
-                               if(workingDir != null) {
-                                       pb.directory(new File(workingDir));
-                               }
-                               proc = pb.start();
-                               input = new BufferedReader(new InputStreamReader(proc.getInputStream()));
-                               while((line=input.readLine())!=null){
-                                       contents.append(line);
-                                       contents.append(LINE_SEPARATOR);
-                               }
-               } catch (Exception e) {
-                       e.printStackTrace();
-                       return null;
-               } finally{
-                       if(proc!=null)  
-                               proc.destroy();
-                       if(input!=null)
-                               try {
-                                       input.close();
-                               } catch (IOException e) {
-                               }
-               }
-               
-               return contents.toString().trim();
-               
-       }
-       public static String returnExecute(String command){
-               
-               return returnExecute(command, null);
-       }
-       
-       public static String[] getCommand(String command){
-               if(isLinux()){
-                       return new String[]{SHELL_COMMAND_LINUX,"-c",command}; //$NON-NLS-1$
-               }else{
-                       return new String[]{SHELL_COMMAND_WINDOW,"/c",command}; //$NON-NLS-1$
-               }
-       }
-       
-       
-       public static boolean createFile(String path, String contents) {
-               BufferedWriter output = null;
-               try {
-                       File file = new File(path);
-                       
-                       File folder = file.getParentFile();
-                       if(folder!=null)
-                               folder.mkdirs();
-                       
-                       file.createNewFile();
-                       
-                       output = new BufferedWriter(new FileWriter(file));
-                       output.write(contents);
-                       return true;
-               } catch (Exception e) {
-                       e.printStackTrace();
-                       return false;
-               }finally{
-                       if(output!=null)
-                               try {
-                                       output.close();
-                               } catch (IOException e) {
-                               }
-               }
-       }
-       
-       public static boolean removeFile(String path) {
-               File file = new File(path);
-               if (!file.exists())
-                       return false;
-               return file.delete();
-       }
-       
-       public static boolean copyFile(String src, String des) throws Exception  {
-               boolean canExecute = false;
-               File srcFile=new File(src);
-               File desFile=null;
-               FileInputStream fis=null;
-               FileOutputStream fos=null;
-               FileChannel fcin=null;
-               FileChannel fcout=null;
-               
-               canExecute = srcFile.canExecute();
-               
-               desFile= new File(des);
-               File paths = new File(desFile.getAbsolutePath().substring(0, desFile.getAbsolutePath().lastIndexOf("/"))); //$NON-NLS-1$
-               if (!paths.exists()) {
-                       paths.mkdirs();
-               }
-               
-               try {
-                       fis= new FileInputStream(srcFile);
-                       fos= new FileOutputStream(desFile);
-                       fcin= fis.getChannel();
-                       fcout= fos.getChannel();
-               
-                       long size= fcin.size();
-                       fcin.transferTo(0, size, fcout);
-                       desFile.setExecutable(canExecute);
-               } catch (FileNotFoundException e) {
-                       e.printStackTrace();
-                       throw e;
-               } catch (IOException e) {
-                       e.printStackTrace();
-                       throw e;
-               }finally{
-                       try {
-                               fcout.close();
-                               fcin.close();
-                               fos.close();
-                               fis.close();
-                       } catch (IOException e) {
-                               e.printStackTrace();
-                               throw e;
-                       }
-               }
+            long size= fcin.size();
+            fcin.transferTo(0, size, fcout);
+            desFile.setExecutable(canExecute);
+        }finally{
+            tryClose( fcout, fcin, fos, fis );
+        }
 
-               return true;
-       }
-       
-       public static boolean isLinux(){
-               return Platform.getOS().equals(Platform.OS_LINUX);
-       }
+        return true;
+    }
+    
 }
 
 
old mode 100644 (file)
new mode 100755 (executable)
index 0dce620..211181d
 */
 package org.tizen.common.util;
 
+import java.io.ByteArrayOutputStream;
 import java.io.Closeable;
+import java.io.Flushable;
 import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.Writer;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * IOUtil
  * @author Hyeongseok Heo {@literal<hyeongseok.heo@samsung.com>}
+ * BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
  * @since Dec 9, 2011
  */
 public class IOUtil {
 
-       public static void close(Closeable closable) {
-               if( null != closable) {
-                       try {
-                               closable.close();
-                       } catch (IOException e) {
-                               // TODO Auto-generated catch block
+    private static final int BUFFER_SIZE = 8192;
+    
+    protected static final Logger logger = LoggerFactory.getLogger( IOUtil.class );
+
+       /**
+        * close closable objects.
+        * 
+        * @param closeables object to be able to close
+        */
+       public static void tryClose( final Object... closeables )
+       {
+               if ( null == closeables )
+               {
+                       return ;
+               }
+               
+               for ( Object obj : closeables )
+               {
+                       if ( null == obj )
+                       {
+                               continue;
+                       }
+                       try
+                       {
+                               if ( obj instanceof Closeable )
+                               {
+                                       ((Closeable) obj).close();
+                               }
+                               else if ( obj instanceof Socket )
+                               {
+                                       ((Socket) obj).close();
+                               }
+                               else if ( obj instanceof ServerSocket )
+                               {
+                                       ((ServerSocket) obj).close();
+                               }
+                       }
+                       catch ( final IOException e )
+                       {
+                               e.printStackTrace();
+                       }
+               }
+       }
+       
+       /**
+        * flush <code>Flushable</code>s
+        * 
+        * @param flushables <code>Flushable</code>s to flush
+        */
+       public static void tryFlush( final Flushable... flushables )
+       {
+               if ( null == flushables )
+               {
+                       return ;
+               }
+               
+               for ( Flushable closeable : flushables )
+               {
+                       if ( null == closeable )
+                       {
+                               continue;
+                       }
+                       try
+                       {
+                               closeable.flush();
+                       }
+                       catch ( final IOException e )
+                       {
                                e.printStackTrace();
                        }
                }
+               
+       }
+       
+       /**
+        * Redirect from <code>in</code> to <code>out</code>
+        * 
+        * @param in {@link InputStream}
+        * @param out {@link OutputStream}
+        * 
+        * @throws IOException occur exception when handling <code>in</code> or <code>out</code>
+        */
+       public static
+       void
+       redirect(
+               final InputStream in,
+               final OutputStream out
+       )
+       throws IOException
+       {
+               final byte[] buffer = new byte[BUFFER_SIZE];
+               
+               int nRead = 0;
+               int totalBytes = 0;
+               while ( 0 < ( nRead = in.read( buffer ) ) )
+               {
+                       out.write( buffer, 0, nRead );
+                       totalBytes += nRead;
+               }
+               
+               logger.trace( "{} byte(s) wrote", totalBytes );
+               
+               tryFlush( out );
+       }
+
+       /**
+        * Redirect from <code>reader</code> to <code>writer</code>
+        * 
+        * @param reader {@link Reader}
+        * @param writer {@link Writer}
+        * 
+        * @throws IOException occur exception when handling <code>reader</code> or <code>writer</code>
+        */
+       public static
+       void
+       redirect(
+               final Reader reader,
+               final Writer writer
+       )
+       throws IOException
+       {
+               final char[] buffer = new char[BUFFER_SIZE];
+               
+               int nRead = 0;
+               while ( 0 < ( nRead = reader.read( buffer ) ) )
+               {
+                       writer.write( buffer, 0, nRead );
+               }
+               tryFlush( writer );
+       }
+
+       /**
+        * Redirect from <code>reader</code> to <code>writer</code>
+        * 
+        * @param reader {@link Reader}
+        * @param writer {@link StringBuffer}
+        * 
+        * @throws IOException occur exception when handling <code>reader</code> or <code>writer</code>
+        */
+       public static
+       void
+       redirect(
+               final Reader reader,
+               final StringBuffer writer
+       )
+       throws IOException
+       {
+               final char[] buffer = new char[BUFFER_SIZE];
+               
+               int nRead = 0;
+               while ( 0 < ( nRead = reader.read( buffer ) ) )
+               {
+                       writer.append( buffer, 0, nRead );
+               }
+       }
+
+       /**
+        * Redirect from <code>reader</code> to <code>writer</code>
+        * 
+        * @param reader {@link Reader}
+        * @param writer {@link StringBuilder}
+        * 
+        * @throws IOException occur exception when handling <code>reader</code> or <code>writer</code>
+        */
+       public static
+       void
+       redirect(
+               final Reader reader,
+               final StringBuilder writer
+       )
+       throws IOException
+       {
+               if ( null == reader )
+               {
+                       return ;
+               }
+               final char[] buffer = new char[BUFFER_SIZE];
+               
+               int nRead = 0;
+               while ( 0 < ( nRead = reader.read( buffer ) ) )
+               {
+                       writer.append( buffer, 0, nRead );
+               }
+       }
+       
+       
+       /**
+        * Get and return byte array from {@link InputStream}
+        * 
+        * @param in input stream to read byte array
+        * 
+        * @return stored byte array
+        * 
+        * @throws IOException If can't read byte from <code>in</code>
+        * 
+        * @link {@link #getBytes(InputStream, boolean)}
+        */
+       public static
+       byte[] getBytes(
+               final InputStream in
+       )
+       throws IOException
+       {
+               return getBytes( in, false );
+       }
+
+       /**
+        * Get and return byte array from {@link InputStream}
+        * 
+        * @param in input stream to read byte array
+        * @param bClose optional flag if close <code>in</code> after processing 
+        * 
+        * @return stored byte array
+        * 
+        * @throws IOException If can't read byte from <code>in</code>
+        * 
+        * @link {@link #redirect(InputStream, OutputStream)}
+        */
+       public static
+       byte[] getBytes(
+               final InputStream in,
+               final boolean bClose
+       ) throws IOException
+       {
+               final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+
+               try
+               {
+                       redirect( in, byteOut );
+                       
+                       if ( bClose )
+                       {
+                               tryClose( in );
+                       }
+                       
+                       return byteOut.toByteArray();
+               }
+               finally
+               {
+                       tryClose( byteOut );
+               }
+               
+       }
+       
+       /**
+        * <p>
+        * Get and return string from {@link Reader}
+        * 
+        * return empty string( "" ) if <code>reader</code> is <code>null</code>
+        * </p>
+        * 
+        * @param reader reader to read string
+        * @return string to be accquired
+        * 
+        * @throws IOException If can't read string from {@link Reader}
+        * 
+        * @see #getString(Reader, boolean)
+        */
+       public static
+       String getString(
+               final Reader reader
+       )
+       throws IOException
+       {
+               return getString( reader, false );
+               
+       }
+       
+       /**
+        * <p>
+        * Get and return string from {@link Reader}
+        * 
+        * Return empty string( "" ) if <code>reader</code> is <code>null</code>
+        * </p>
+        * 
+        * @param reader reader to read string
+        * @param bClose optional flag if close <code>in</code> after processing 
+        * 
+        * @return string to be accquired
+        * 
+        * @throws IOException If can't read string from {@link Reader}
+        * 
+        * @see #redirect(Reader, StringBuilder)
+        */
+       public static
+       String
+       getString(
+               final Reader reader,
+               final boolean bClose
+       )
+       throws IOException
+       {
+               final StringBuilder writer = new StringBuilder();
+               try {
+                       redirect( reader, writer );
+                       
+                       if ( bClose )
+                       {
+                               tryClose( reader );
+                       }
+                       
+                       return writer.toString();
+               }
+               finally
+               {
+                       tryClose( writer );
+               }
+               
+       }
+
+       /**
+        * <p>
+        * Get and return string from {@link InputStream}
+        * 
+        * Return empty string ( "" ) if <code>in</code> is <code>null</code>
+        * 
+        * @param in {@link InputStream} to read
+        * 
+        * @return string to be accquired
+        * 
+        * @throws IOException If can't read anything from {@link InputStream}
+        * 
+        * @see #getString(Reader)
+        */
+       public static
+       String
+       getString(
+               final InputStream in
+       )
+       throws IOException
+       {
+               return getString( new InputStreamReader( in ) );
        }
+       
+       
+    /**
+     * <p>
+     * Get and return string from {@link InputStream}
+     * 
+     * Return empty string( "" ) if <code>in</code> is <code>null</code>
+     * </p>
+     * 
+     * @param in {@link InputStream} to read
+     * @param bClose optional flag if close <code>in</code> after processing 
+     * 
+     * @return string to be accquired
+     * 
+     * @throws IOException If can't read string from {@link InputStream}
+     * 
+     * @see #getString(InputStream, boolean)
+     */
+       public static
+       String
+       getString(
+           final InputStream in,
+           final boolean bClose
+       ) throws IOException
+       {
+           return getString( new InputStreamReader( in ), bClose );
+       }
+       
+       
+
 }
diff --git a/org.tizen.common/src/org/tizen/common/util/ISdbCommandHelper.java b/org.tizen.common/src/org/tizen/common/util/ISdbCommandHelper.java
new file mode 100755 (executable)
index 0000000..8d10b2f
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Gun Kim <gune.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util;
+
+/**
+ * Interface for execute a remote shell command.
+ */
+public interface ISdbCommandHelper {
+    /**
+     * Run the command on the Tizen device
+     * 
+     * @param command
+     * @param rCode
+     * @param expectedResult
+     * @throws Exception
+     */
+    void runCommand(String command, boolean rCode, String expectedResult) throws Exception;
+    /**
+     * get command's result all line array
+     * 
+     * @return all result line
+     */
+    String[] getResultLineStrings();
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/ImageUtil.java b/org.tizen.common/src/org/tizen/common/util/ImageUtil.java
new file mode 100644 (file)
index 0000000..49d85e2
--- /dev/null
@@ -0,0 +1,136 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import java.net.URL;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.osgi.framework.Bundle;
+import org.tizen.common.SurrogateWithArgument;
+
+
+public class ImageUtil {
+       public static class PlatformSurrogate {
+           public Bundle getBundle(String pluginID) {
+               return Platform.getBundle(pluginID);
+           }
+       }
+       
+       public static class PluginSurrogate {
+           public Bundle getBundle(Plugin plugin) {
+               return plugin.getBundle();
+           }
+       }
+
+    public static final String[] supportedImageExtension = {
+            "*.gif;*.png;*.jpeg;*.jpg;*.tiff;*.tif;*.ico;*.bmp;*.rle",  // all supported format in SWT //$NON-NLS-1$
+            "*.gif",  // Graphics Interchange Format, including animated GIFs //$NON-NLS-1$
+            "*.png",  // Portable Network Graphics //$NON-NLS-1$
+            "*.jpeg;*.jpg",  // Joint Photographic Experts Group //$NON-NLS-1$
+            "*.tiff;*.tif",  // Tagged Image File Format //$NON-NLS-1$
+            "*.ico",  // Widows Icon //$NON-NLS-1$
+            "*.bmp",  // Windows Bitmap //$NON-NLS-1$
+            "*.rle"   // Windows Bitmap with run-length encoding //$NON-NLS-1$
+    };
+       
+       /**
+        * load image descriptor from <code>bundle</code> with <code>filePath</code>
+        * 
+        * @param bundle {@link Bundle}
+        * @param filePath image file path
+        * 
+        * @return loaded {@link ImageDescriptor}
+        */
+       protected static
+       ImageDescriptor
+       getImageDescriptor(
+               final Bundle bundle,
+               final String filePath
+       )
+       {
+               final URL url = bundle.getEntry( filePath );
+               return ImageDescriptor.createFromURL( url );
+       }
+       
+       protected static SurrogateWithArgument<Bundle, String> platformSurrogate = new SurrogateWithArgument<Bundle, String>() {
+               public Bundle getAdapter( final String pluginId )
+               {
+                       return Platform.getBundle( pluginId );
+               }
+       };
+       protected static SurrogateWithArgument<Bundle, Plugin> pluginSurrogate = new SurrogateWithArgument<Bundle, Plugin>() {
+               public Bundle getAdapter(Plugin plugin) {
+                       return plugin.getBundle();
+               }
+       };
+       
+       // get ImageDescriptor from Plugin ID (ID -> ImageDescriptor)
+       public static ImageDescriptor getImageDescriptor(String pluginID, String filePath) {
+               return getImageDescriptor( platformSurrogate.getAdapter(pluginID), filePath );
+       }
+
+       // get ImageDescriptor from Activator Plugin (Activator -> ImageDescriptor)
+       public static ImageDescriptor getImageDescriptor(Plugin plugin, String filePath) {
+               return getImageDescriptor( pluginSurrogate.getAdapter(plugin), filePath );
+       }
+
+       // get Image from ImageDescriptor (ImageDescriptor -> Image)
+       public static Image getImage(ImageDescriptor descriptor) {
+               return (descriptor != null) ? descriptor.createImage() : null;
+       }
+
+       // get ImageData from ImageDescriptor (ImageDescriptor -> ImageData)
+       public static ImageData getImageData(ImageDescriptor descriptor) {
+               return (descriptor != null) ? descriptor.getImageData() : null;
+       }
+
+       // get Image from Activator Plugin (Activator -> ImageDescriptor -> Image)
+       public static Image getImage(Plugin plugin, String filePath) {
+               ImageDescriptor descriptor = getImageDescriptor(plugin, filePath);
+               return getImage(descriptor);
+       }
+
+       // get ImageData from Activator Plugin (Activator -> ImageDescriptor -> ImageData)
+       public static ImageData getImageData(Plugin plugin, String filePath) {
+               ImageDescriptor descriptor = getImageDescriptor(plugin, filePath);
+               return getImageData(descriptor);
+       }
+
+       // get Image from Plugin ID (ID -> ImageDescriptor -> Image)
+       public static Image getImage(String pluginID, String filePath) {
+               ImageDescriptor descriptor = getImageDescriptor(pluginID, filePath);
+               return getImage(descriptor);
+       }
+
+       // get Image from Plugin ID (ID -> ImageDescriptor -> ImageData)
+       public static ImageData getImageData(String pluginID, String filePath) {
+               ImageDescriptor descriptor = getImageDescriptor(pluginID, filePath);
+               return getImageData(descriptor);
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/IteratingAcceptor.java b/org.tizen.common/src/org/tizen/common/util/IteratingAcceptor.java
new file mode 100644 (file)
index 0000000..bb8c3d1
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import java.util.Collection;
+
+/**
+ * IteratingAcceptor.
+ * 
+ * Filter logic containing iterface for {@link Collection} or array
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @param <T> arguement type
+ */
+public interface IteratingAcceptor<T>
+{
+       /**
+        * Check that <code>arg</code> is filtered or passed
+        * 
+        * @param arg collection element
+        * 
+        * @return <code>true</code> if <code>arg</code> is element to pass
+        */
+       boolean accept( T arg );
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/IteratingAdapter.java b/org.tizen.common/src/org/tizen/common/util/IteratingAdapter.java
new file mode 100644 (file)
index 0000000..1fa591e
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util;
+
+import java.util.Iterator;
+
+public interface IteratingAdapter<T> {
+       public Iterator<T> adapt( T obj );
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/IteratingRunner.java b/org.tizen.common/src/org/tizen/common/util/IteratingRunner.java
new file mode 100755 (executable)
index 0000000..54f0324
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util;
+
+import java.util.Collection;
+
+/**
+ * IteratingRunner.
+ * 
+ * Runner with argument for iteration of {@link Collection} or array
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @param <T> arguement type
+ */
+public interface IteratingRunner<T>
+{
+       /**
+        * Run with collection element <code>arg</code>
+        * 
+        * @param arg collection element
+        */
+       void run( T arg );
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/IteratingUtil.java b/org.tizen.common/src/org/tizen/common/util/IteratingUtil.java
new file mode 100644 (file)
index 0000000..c693ab8
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util;
+
+import java.util.Iterator;
+
+public class IteratingUtil {
+       public static <T> void iterate( T obj, IteratingAdapter<T> adapter, IteratingRunner<T> runner )
+       {
+               if ( null == obj )
+               {
+                       return ;
+               }
+               
+               Iterator<T> iter = adapter.adapt( obj );
+               if ( null == iter )
+               {
+                       return ;
+               }
+               while ( iter.hasNext() )
+               {
+                       T child = iter.next();
+                       runner.run( child );
+                       iterate( child, adapter, runner );
+               }
+               
+       }
+
+}
index 68c3337..8eb96ae 100644 (file)
@@ -25,6 +25,7 @@
 package org.tizen.common.util;
 
 import java.io.IOException;
+import java.net.InetAddress;
 import java.net.ServerSocket;
 
 /**
@@ -38,45 +39,53 @@ import java.net.ServerSocket;
  *  <li> added getAvailableLocalPort method.
  *  </ul> 
  */
-public class LocalPortChecker {
-    public static boolean isPortAvailable(int port) {
-        if ((port < 0) && (port > 65535))
-            return false;
+public class LocalPortChecker
+{
+       
+       public static boolean isPortInRange( final int port )
+       {
+               return ( 0 <= port ) && ( port < 65536 );
+               
+       }
+    public static boolean isPortAvailable( final int port )
+    {
+        if ( !isPortInRange( port ) )
+        {
+               return false;
+        }
         
         ServerSocket socket = null;
-        try {
-            socket = new ServerSocket(port);
+        try
+        {
+            InetAddress localhost = InetAddress.getByName( "127.0.0.1" );
+            socket = new ServerSocket( port, 50, localhost );
             return true;
-        } catch (IOException e) {
-            return false;
-        } finally {
-            if (socket != null) {
-                try {
-                    socket.close();
-                } catch (IOException e) {
-                    // do nothing
-                }
-            }
-        }
-    }
-
-    public static int getAvailableLocalPort(int inc,int portBase) {
-       int port = portBase;
-        if (isPortAvailable(port)) {
-            return port;
         }
-
-        if ( (port+inc) > 65535) {
-            return -1;
+        catch ( final IOException e )
+        {
+            return false;
         }
-
-        while ((port < 65535) && !isPortAvailable(port)) {
-            port += inc;
+        finally
+        {
+               IOUtil.tryClose( socket );
         }
-
-        if (isPortAvailable(port))
-            return port;
-        else 
-            return -1;
+    }
+    
+    public static int
+    getAvailableLocalPort(
+       final int inc,
+       final int portBase
+    )
+    {
+       for ( int port = portBase ; true ; port += inc )
+       {
+               if ( !isPortInRange( port) )
+               {
+                       return -1;
+               }
+               if ( isPortAvailable( port ) ) {
+                       return port;
+               }
+       }
     }
 }
diff --git a/org.tizen.common/src/org/tizen/common/util/MapUtil.java b/org.tizen.common/src/org/tizen/common/util/MapUtil.java
new file mode 100755 (executable)
index 0000000..663b4dd
--- /dev/null
@@ -0,0 +1,216 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.tizen.common.util.StringUtil.NULL_STRING;
+
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * MapUtil.
+ * 
+ * Helper related to {@link Map}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class MapUtil
+{
+       /**
+        * protected constructor
+        */
+       protected MapUtil() {}
+       
+       /**
+        * Return <code>map</code>'s size
+        * 
+        * Return <code>0</code>, if <code>map</code> is <code>null</code>
+        * 
+        * @param map {@link Map} to count elements
+        * 
+        * @return the number of element in <code>map</code>
+        */
+       public static
+       int
+       length(
+               final Map<?, ?> map
+       )
+       {
+               if ( null == map )
+               {
+                       return 0;
+               }
+               return map.size();
+       }
+       
+
+       /**
+        * Check if <code>map</code> is empty
+        * 
+        * Return <code>true</code>, if <code>map</code> is <code>null</code> or has no element
+        * 
+        * @param map {@link Map} to check
+        * 
+        * @return if map is empty
+        */
+       public static
+       boolean
+       isEmpty(
+               final Map<?, ?> map
+       )
+       {
+               return ( 0 == length( map ) );
+       }
+       
+    /**
+     * Return {@link Map} for <code>keys</code> and <code>values</code>
+     * 
+     * add i th object of <code>values</code>  with i th object of <code>keys</code> as key
+     * 
+     * @param <K> key type
+     * @param <V> value type
+     * @param keys keys to add
+     * @param values values to add
+     * 
+     * @return {@link Map} containing <code>keys</code> - <code>values</code> pairs
+     */
+    public static <K, V>
+    Map<K, V>
+    asMap(
+       final K[] keys,
+       final V[] values
+    )
+    {
+       final HashMap<K, V> map = new HashMap<K, V>();
+       if ( null == keys || null == values )
+       {
+               return map;
+       }
+       
+       for ( int i=0, n=Math.min( keys.length, values.length ) ; i<n ; ++i )
+       {
+               map.put( keys[i], values[i] );
+       }
+       return map;
+    }
+    
+
+       /**
+        * Return {@link Map} for <code>objs</code>
+        * 
+        * <code>objs</code> is {@link Object[]} that each element is key-value pair.
+        * 
+        * @param <A> key type
+        * @param <B> value type
+        * @param objs key-value pairs to add
+        * 
+        * @return created {@link Map}
+        */
+       @SuppressWarnings("unchecked")
+       public static <A extends Object, B extends Object>
+       Map<A, B>
+       asMap(
+               final Object[][] objs
+       )
+       {
+       final HashMap<A, B> map = new HashMap<A, B>();
+       for ( int i=0, n=ArrayUtil.size( objs ) ; i<n ; ++i )
+       {
+               if ( 2 != objs[i].length )
+               {
+                       continue;
+               }
+               map.put( (A) objs[i][0], (B) objs[i][1] );
+       }
+       return map;
+    }
+       
+       /**
+        * Add {@link Properties}'s key-value pairs to <code>map</code>
+        * 
+        * @param props {@link Properties} to provide key-value pairs
+        * @param map {@link Map} to be added
+        */
+       public static
+       void
+       mergePropertiesIntoMap(
+               final Properties props,
+               final Map<Object, Object> map
+       )
+       {
+           Assert.notNull( map );
+               if ( null == props )
+               {
+                       return ;
+               }
+               
+               final Enumeration<?> en = props.propertyNames();
+               while (  en.hasMoreElements() )
+               {
+                       final String key = (String) en.nextElement();
+                       map.put( key, props.getProperty( key ) );
+               }
+       }
+       
+       /**
+        * Return string to present {@link Map} for human
+        * 
+        * @param map {@link Map} to print out
+        * 
+        * @return string of presentation
+        */
+       public static
+       String
+       toString(
+               final Map<?, ?> map
+       )
+       {
+               if ( null == map )
+               {
+                       return NULL_STRING;
+               }
+               
+               final StringBuilder buffer = new StringBuilder();
+               buffer.append( "{" );
+               
+               if ( !map.isEmpty() )
+               {
+                       buffer.append( "\n" );
+                       for ( final Object key : map.keySet() )
+                       {
+                               buffer.append( "\t" );
+                               buffer.append( key.toString() );
+                               buffer.append( "=" );
+                               buffer.append( map.get( key ) );
+                               buffer.append( "\n" );
+                       }
+               }
+               buffer.append( "}" );
+               return buffer.toString();
+       }
+
+}
index 37a6a90..ede8c87 100644 (file)
@@ -1,56 +1,59 @@
-/*\r
-*  Common\r
-*\r
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
-*\r
-* Contact: \r
-* Kangho Kim <kh5325.kim@samsung.com>\r
-* \r
-* Licensed under the Apache License, Version 2.0 (the "License");\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an "AS IS" BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*\r
-* Contributors:\r
-* - S-Core Co., Ltd\r
-*\r
-*/\r
-package org.tizen.common.util;\r
-\r
-import org.eclipse.swt.graphics.Image;\r
-import org.tizen.common.cache.ImageCache;\r
-\r
-\r
-public enum NotificationType {\r
-    ERROR(ImageCache.getImage("error.png")),\r
-    DELETE(ImageCache.getImage("delete.png")),\r
-    WARN(ImageCache.getImage("warn.png")),\r
-    SUCCESS(ImageCache.getImage("ok.png")),\r
-    INFO(ImageCache.getImage("info.png")),\r
-    LIBRARY(ImageCache.getImage("library.png")),\r
-    HINT(ImageCache.getImage("hint.png")),\r
-    PRINTED(ImageCache.getImage("printer.png")),\r
-    CONNECTION_TERMINATED(ImageCache.getImage("terminated.png")),\r
-    CONNECTION_FAILED(ImageCache.getImage("connecting.png")),\r
-    CONNECTED(ImageCache.getImage("connected.png")),\r
-    DISCONNECTED(ImageCache.getImage("disconnected.png")),\r
-    TRANSACTION_OK(ImageCache.getImage("ok.png")),\r
-    TRANSACTION_FAIL(ImageCache.getImage("error.png"));\r
-\r
-    private Image _image;\r
-\r
-    private NotificationType(Image img) {\r
-        _image = img;\r
-    }\r
-\r
-    public Image getImage() {\r
-        return _image;\r
-    }\r
-}\r
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import org.eclipse.swt.graphics.Image;
+import org.tizen.common.util.cache.ImageCache;
+
+
+public enum NotificationType {
+    ERROR(ImageCache.getImage("error.png")),
+    DELETE(ImageCache.getImage("delete.png")),
+    WARN(ImageCache.getImage("warn.png")),
+    SUCCESS(ImageCache.getImage("ok.png")),
+    INFO(ImageCache.getImage("info.png")),
+    LIBRARY(ImageCache.getImage("library.png")),
+    HINT(ImageCache.getImage("hint.png")),
+    PRINTED(ImageCache.getImage("printer.png")),
+    CONNECTION_TERMINATED(ImageCache.getImage("terminated.png")),
+    CONNECTION_FAILED(ImageCache.getImage("connecting.png")),
+    CONNECTED(ImageCache.getImage("connected.png")),
+    DISCONNECTED(ImageCache.getImage("disconnected.png")),
+    TRANSACTION_OK(ImageCache.getImage("ok.png")),
+    TRANSACTION_FAIL(ImageCache.getImage("error.png")),
+    XBUTTON_NORMAL(ImageCache.getImage("msg_close_normal.png")),
+    XBUTTON_HOVER(ImageCache.getImage("msg_close_hover.png")),
+    XBUTTON_PUSH(ImageCache.getImage("msg_close_push.png"));
+
+    private Image _image;
+
+    private NotificationType(Image img) {
+       _image = img;
+    }
+
+    public Image getImage() {
+       return _image;
+    }
+}
index f76858c..f42caca 100644 (file)
-/*\r
-*  Common\r
-*\r
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
-*\r
-* Contact: \r
-* Kangho Kim <kh5325.kim@samsung.com>\r
-* \r
-* Licensed under the Apache License, Version 2.0 (the "License");\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-*\r
-* http://www.apache.org/licenses/LICENSE-2.0\r
-*\r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an "AS IS" BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-*\r
-* Contributors:\r
-* - S-Core Co., Ltd\r
-*\r
-*/\r
-package org.tizen.common.util;\r
-\r
-import java.util.ArrayList;\r
-import java.util.Collections;\r
-import java.util.List;\r
-\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.custom.CLabel;\r
-import org.eclipse.swt.graphics.Color;\r
-import org.eclipse.swt.graphics.Font;\r
-import org.eclipse.swt.graphics.FontData;\r
-import org.eclipse.swt.graphics.GC;\r
-import org.eclipse.swt.graphics.Image;\r
-import org.eclipse.swt.graphics.Point;\r
-import org.eclipse.swt.graphics.Rectangle;\r
-import org.eclipse.swt.layout.FillLayout;\r
-import org.eclipse.swt.layout.GridData;\r
-import org.eclipse.swt.layout.GridLayout;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Display;\r
-import org.eclipse.swt.widgets.Event;\r
-import org.eclipse.swt.widgets.Label;\r
-import org.eclipse.swt.widgets.Listener;\r
-import org.eclipse.swt.widgets.Shell;\r
-import org.tizen.common.cache.ColorCache;\r
-import org.tizen.common.cache.FontCache;\r
-\r
-\r
-public class NotifierDialog {\r
-\r
-    // how long the the tray popup is displayed after fading in (in milliseconds)\r
-    private static final int   DISPLAY_TIME  = 4500;\r
-    // how long each tick is when fading in (in ms)\r
-    private static final int   FADE_TIMER    = 50;\r
-    // how long each tick is when fading out (in ms)\r
-    private static final int   FADE_IN_STEP  = 30;\r
-    // how many tick steps we use when fading out \r
-    private static final int   FADE_OUT_STEP = 8;\r
-\r
-    // how high the alpha value is when we have finished fading in \r
-    private static final int   FINAL_ALPHA   = 225;\r
-\r
-    // title foreground color\r
-    private static Color       _titleFgColor = ColorCache.getColor(40, 73, 97);\r
-    // text foreground color\r
-    private static Color       _fgColor      = _titleFgColor;\r
-\r
-    // shell gradient background color - top\r
-    private static Color       _bgFgGradient = ColorCache.getColor(226, 239, 249);\r
-    // shell gradient background color - bottom    \r
-    private static Color       _bgBgGradient = ColorCache.getColor(177, 211, 243);\r
-    // shell border color\r
-    private static Color       _borderColor  = ColorCache.getColor(40, 73, 97);\r
-\r
-    // contains list of all active popup shells\r
-    private static List<Shell> _activeShells = new ArrayList<Shell>();\r
-\r
-    // image used when drawing\r
-    private static Image       _oldImage;\r
-\r
-    private static Shell       _shell;\r
-\r
-    /**\r
-     * Creates and shows a notification dialog with a specific title, message and a\r
-     * \r
-     * @param title\r
-     * @param message\r
-     * @param type\r
-     */\r
-    public static void notify(String title, String message, NotificationType type) {\r
-        _shell = new Shell(Display.getDefault().getActiveShell(), SWT.NO_FOCUS | SWT.NO_TRIM);\r
-        _shell.setLayout(new FillLayout());\r
-        _shell.setForeground(_fgColor);\r
-        _shell.setBackgroundMode(SWT.INHERIT_DEFAULT);\r
-        _shell.addListener(SWT.Dispose, new Listener() {\r
-            @Override\r
-            public void handleEvent(Event event) {\r
-                _activeShells.remove(_shell);\r
-            }\r
-        });\r
-\r
-        final Composite inner = new Composite(_shell, SWT.NONE);\r
-\r
-        GridLayout gl = new GridLayout(2, false);\r
-        gl.marginLeft = 5;\r
-        gl.marginTop = 0;\r
-        gl.marginRight = 5;\r
-        gl.marginBottom = 5;\r
-\r
-        inner.setLayout(gl);\r
-        _shell.addListener(SWT.Resize, new Listener() {\r
-\r
-            @Override\r
-            public void handleEvent(Event e) {\r
-                try {\r
-                    // get the size of the drawing area\r
-                    Rectangle rect = _shell.getClientArea();\r
-                    // create a new image with that size\r
-                    Image newImage = new Image(Display.getDefault(), Math.max(1, rect.width), rect.height);\r
-                    // create a GC object we can use to draw with\r
-                    GC gc = new GC(newImage);\r
-\r
-                    // fill background\r
-                    gc.setForeground(_bgFgGradient);\r
-                    gc.setBackground(_bgBgGradient);\r
-                    gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height, true);\r
-\r
-                    // draw shell edge\r
-                    gc.setLineWidth(2);\r
-                    gc.setForeground(_borderColor);\r
-                    gc.drawRectangle(rect.x + 1, rect.y + 1, rect.width - 2, rect.height - 2);\r
-                    // remember to dipose the GC object!\r
-                    gc.dispose();\r
-\r
-                    // now set the background image on the shell\r
-                    _shell.setBackgroundImage(newImage);\r
-\r
-                    // remember/dispose old used iamge\r
-                    if (_oldImage != null) {\r
-                        _oldImage.dispose();\r
-                    }\r
-                    _oldImage = newImage;\r
-                } catch (Exception err) {\r
-                    err.printStackTrace();\r
-                }\r
-            }\r
-        });\r
-\r
-        GC gc = new GC(_shell);\r
-\r
-        String lines[] = message.split("\n");\r
-        Point longest = null;\r
-        int typicalHeight = gc.stringExtent("X").y;\r
-\r
-        for (String line : lines) {\r
-            Point extent = gc.stringExtent(line);\r
-            if (longest == null) {\r
-                longest = extent;\r
-                continue;\r
-            }\r
-\r
-            if (extent.x > longest.x) {\r
-                longest = extent;\r
-            }\r
-        }\r
-        gc.dispose();\r
-\r
-        int minHeight = typicalHeight * lines.length;\r
-\r
-        CLabel imgLabel = new CLabel(inner, SWT.NONE);\r
-        imgLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING));\r
-        imgLabel.setImage(type.getImage());\r
-\r
-        CLabel titleLabel = new CLabel(inner, SWT.NONE);\r
-        titleLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_CENTER));\r
-        titleLabel.setText(title);\r
-        titleLabel.setForeground(_titleFgColor);\r
-        Font f = titleLabel.getFont();\r
-        FontData fd = f.getFontData()[0];\r
-        fd.setStyle(SWT.BOLD);\r
-        fd.height = 11;\r
-        titleLabel.setFont(FontCache.getFont(fd));\r
-\r
-        Label text = new Label(inner, SWT.WRAP);\r
-        Font tf = text.getFont();\r
-        FontData tfd = tf.getFontData()[0];\r
-        tfd.setStyle(SWT.BOLD);\r
-        tfd.height = 8;\r
-        text.setFont(FontCache.getFont(tfd));\r
-        GridData gd = new GridData(GridData.FILL_BOTH);\r
-        gd.horizontalSpan = 2;\r
-        text.setLayoutData(gd);\r
-        text.setForeground(_fgColor);\r
-        text.setText(message);\r
-\r
-        minHeight = 100;\r
-\r
-        _shell.setSize(350, minHeight);\r
-\r
-        if (Display.getDefault().getActiveShell() == null || Display.getDefault().getActiveShell().getMonitor() == null) { return; }\r
-\r
-        Rectangle clientArea = Display.getDefault().getActiveShell().getMonitor().getClientArea();\r
-\r
-        int startX = clientArea.x + clientArea.width - 352;\r
-        int startY = clientArea.y + clientArea.height - 102;\r
-\r
-        // move other shells up\r
-        if (!_activeShells.isEmpty()) {\r
-            List<Shell> modifiable = new ArrayList<Shell>(_activeShells);\r
-            Collections.reverse(modifiable);\r
-            for (Shell shell : modifiable) {\r
-                Point curLoc = shell.getLocation();\r
-                shell.setLocation(curLoc.x, curLoc.y - 100);\r
-                if (curLoc.y - 100 < 0) {\r
-                    _activeShells.remove(shell);\r
-                    shell.dispose();\r
-                }\r
-            }\r
-        }\r
-\r
-        _shell.setLocation(startX, startY);\r
-        _shell.setAlpha(0);\r
-        _shell.setVisible(true);\r
-\r
-        _activeShells.add(_shell);\r
-\r
-        fadeIn(_shell);\r
-    }\r
-\r
-    private static void fadeIn(final Shell _shell) {\r
-        Runnable run = new Runnable() {\r
-\r
-            @Override\r
-            public void run() {\r
-                try {\r
-                    if (_shell == null || _shell.isDisposed()) { return; }\r
-\r
-                    int cur = _shell.getAlpha();\r
-                    cur += FADE_IN_STEP;\r
-\r
-                    if (cur > FINAL_ALPHA) {\r
-                        _shell.setAlpha(FINAL_ALPHA);\r
-                        startTimer(_shell);\r
-                        return;\r
-                    }\r
-\r
-                    _shell.setAlpha(cur);\r
-                    Display.getDefault().timerExec(FADE_TIMER, this);\r
-                } catch (Exception err) {\r
-                    err.printStackTrace();\r
-                }\r
-            }\r
-\r
-        };\r
-        Display.getDefault().timerExec(FADE_TIMER, run);\r
-    }\r
-\r
-    private static void startTimer(final Shell _shell) {\r
-        Runnable run = new Runnable() {\r
-\r
-            @Override\r
-            public void run() {\r
-                try {\r
-                    if (_shell == null || _shell.isDisposed()) { return; }\r
-\r
-                    fadeOut(_shell);\r
-                } catch (Exception err) {\r
-                    err.printStackTrace();\r
-                }\r
-            }\r
-\r
-        };\r
-        Display.getDefault().timerExec(DISPLAY_TIME, run);\r
-\r
-    }\r
-\r
-    private static void fadeOut(final Shell _shell) {\r
-        final Runnable run = new Runnable() {\r
-\r
-            @Override\r
-            public void run() {\r
-                try {\r
-                    if (_shell == null || _shell.isDisposed()) { return; }\r
-\r
-                    int cur = _shell.getAlpha();\r
-                    cur -= FADE_OUT_STEP;\r
-\r
-                    if (cur <= 0) {\r
-                        _shell.setAlpha(0);\r
-                        if (_oldImage != null) {\r
-                            _oldImage.dispose();\r
-                        }\r
-                        _shell.dispose();\r
-                        _activeShells.remove(_shell);\r
-                        return;\r
-                    }\r
-\r
-                    _shell.setAlpha(cur);\r
-\r
-                    Display.getDefault().timerExec(FADE_TIMER, this);\r
-\r
-                } catch (Exception err) {\r
-                    err.printStackTrace();\r
-                }\r
-            }\r
-\r
-        };\r
-        Display.getDefault().timerExec(FADE_TIMER, run);\r
-\r
-    }\r
-\r
-}\r
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Font;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
+import org.tizen.common.util.cache.ColorCache;
+import org.tizen.common.util.cache.FontCache;
+
+
+public class NotifierDialog {
+
+    // how long the the tray popup is displayed after fading in (in milliseconds)
+    private static final int   DISPLAY_TIME  = 4500;
+    // how long each tick is when fading in (in ms)
+    private static final int   FADE_TIMER    = 50;
+    // how long each tick is when fading out (in ms)
+    private static final int   FADE_IN_STEP  = 30;
+    // how many tick steps we use when fading out 
+    private static final int   FADE_OUT_STEP = 8;
+
+    // how high the alpha value is when we have finished fading in 
+    private static final int   FINAL_ALPHA   = 225;
+
+    // title foreground color
+    private static Color       _titleFgColor = ColorCache.getColor(40, 73, 97);
+    // text foreground color
+    private static Color       _fgColor      = _titleFgColor;
+
+    // shell gradient background color - top
+    private static Color       _bgFgGradient = ColorCache.getColor(226, 239, 249);
+    // shell gradient background color - bottom    
+    private static Color       _bgBgGradient = ColorCache.getColor(177, 211, 243);
+    // shell border color
+    private static Color       _borderColor  = ColorCache.getColor(40, 73, 97);
+
+    // contains list of all active popup shells
+    private static List<Shell> _activeShells = new ArrayList<Shell>();
+
+    // image used when drawing
+    private static Image       _oldImage;
+
+    private static Shell       _shell;
+
+    // label button listener
+    private static LabelButtonListener _listner = new LabelButtonListener();
+
+    // dialog start position
+    private static int startX = 0;
+    private static int startY = 0;
+
+    /**
+     * Creates and shows a notification dialog with a specific title, message and icon
+     *
+     * @param title
+     * @param message
+     * @param type
+     */
+    public static void notify(String title, String message, NotificationType type) {
+        notify(title, message, type, true);
+    }
+
+    /**
+     * Creates and shows a notification dialog with a specific title, message, icon and fade effect
+     *
+     * @param title
+     * @param message
+     * @param type
+     * @param fade
+     */
+    public static void notify(String title, String message, NotificationType type, boolean fade) {
+        Shell eclipseShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+        _shell = new Shell(eclipseShell, SWT.NO_FOCUS | SWT.NO_TRIM);
+        //_shell = new Shell(Display.getDefault().getActiveShell(), SWT.NO_FOCUS | SWT.NO_TRIM);
+        _shell.setLayout(new FillLayout());
+        _shell.setForeground(_fgColor);
+        _shell.setBackgroundMode(SWT.INHERIT_DEFAULT);
+        _shell.addListener(SWT.Dispose, new Listener() {
+            @Override
+            public void handleEvent(Event event) {
+                if( event.widget instanceof Shell ) {
+                    Shell shell = (Shell)event.widget;
+                    _activeShells.remove(shell);
+                }
+            }
+        });
+
+        final Composite inner = new Composite(_shell, SWT.NONE);
+
+        GridLayout gl = new GridLayout(3, false);
+        gl.marginLeft = 5;
+        gl.marginTop = 0;
+        gl.marginRight = 5;
+        gl.marginBottom = 5;
+
+        inner.setLayout(gl);
+        _shell.addListener(SWT.Resize, new Listener() {
+
+            @Override
+            public void handleEvent(Event e) {
+                try {
+                    // get the size of the drawing area
+                    Rectangle rect = _shell.getClientArea();
+                    // create a new image with that size
+                    Image newImage = new Image(SWTUtil.getDisplay(), Math.max(1, rect.width), rect.height);
+                    // create a GC object we can use to draw with
+                    GC gc = new GC(newImage);
+
+                    // fill background
+                    gc.setForeground(_bgFgGradient);
+                    gc.setBackground(_bgBgGradient);
+                    gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height, true);
+
+                    // draw shell edge
+                    gc.setLineWidth(2);
+                    gc.setForeground(_borderColor);
+                    gc.drawRectangle(rect.x + 1, rect.y + 1, rect.width - 2, rect.height - 2);
+                    // remember to dipose the GC object!
+                    gc.dispose();
+
+                    // now set the background image on the shell
+                    _shell.setBackgroundImage(newImage);
+
+                    // remember/dispose old used iamge
+                    if (_oldImage != null) {
+                        _oldImage.dispose();
+                    }
+                    _oldImage = newImage;
+                } catch (Exception err) {
+                    err.printStackTrace();
+                }
+            }
+        });
+
+        GC gc = new GC(_shell);
+
+        String lines[] = message.split("\n");
+        Point longest = null;
+        int typicalHeight = gc.stringExtent("X").y;
+
+        for (String line : lines) {
+            Point extent = gc.stringExtent(line);
+            if (longest == null) {
+                longest = extent;
+                continue;
+            }
+
+            if (extent.x > longest.x) {
+                longest = extent;
+            }
+        }
+        gc.dispose();
+
+        int minHeight = typicalHeight * lines.length;
+
+        CLabel imgLabel = new CLabel(inner, SWT.NONE);
+        imgLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_BEGINNING));
+        imgLabel.setImage(type.getImage());
+
+        CLabel titleLabel = new CLabel(inner, SWT.NONE);
+        titleLabel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_CENTER)); //GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_CENTER));
+        titleLabel.setText(title);
+        titleLabel.setForeground(_titleFgColor);
+        Font f = titleLabel.getFont();
+        FontData fd = f.getFontData()[0];
+        fd.setStyle(SWT.BOLD);
+        fd.height = 11;
+        titleLabel.setFont(FontCache.getFont(fd));
+
+        // added close button
+        Label button = new Label(inner, SWT.NONE);
+        button.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.HORIZONTAL_ALIGN_END));
+        button.setImage(NotificationType.XBUTTON_NORMAL.getImage());
+        addLabelButtonListner(button);
+
+        Label text = new Label(inner, SWT.WRAP);
+        Font tf = text.getFont();
+        FontData tfd = tf.getFontData()[0];
+        tfd.setStyle(SWT.BOLD);
+        tfd.height = 8;
+        text.setFont(FontCache.getFont(tfd));
+        GridData gd = new GridData(GridData.FILL_BOTH);
+        gd.horizontalSpan = 2;
+        text.setLayoutData(gd);
+        text.setForeground(_fgColor);
+        text.setText(message);
+
+        minHeight = 100;
+
+        _shell.setSize(350, minHeight);
+
+        //if (Display.getDefault().getActiveShell() == null || Display.getDefault().getActiveShell().getMonitor() == null) { return; }
+        if (eclipseShell == null || eclipseShell.getBounds() == null) { return; }
+
+        //Rectangle clientArea = Display.getDefault().getActiveShell().getMonitor().getClientArea();
+        Rectangle clientArea = eclipseShell.getBounds();
+
+        startX = clientArea.x + clientArea.width - 352;
+        startY = clientArea.y + clientArea.height - 102;
+
+        // move other shells up
+        if (!_activeShells.isEmpty()) {
+            List<Shell> modifiable = new ArrayList<Shell>(_activeShells);
+            Collections.reverse(modifiable);
+            for (Shell shell : modifiable) {
+                Point curLoc = shell.getLocation();
+                if (curLoc.y - 100 < 0 || curLoc.x != startX) {
+                    _activeShells.remove(shell);
+                    shell.dispose();
+                } else {
+                    shell.setLocation(curLoc.x, curLoc.y - 100);
+                }
+            }
+        }
+
+        // set notifierDialog position
+        _shell.setLocation(startX, startY);
+        _shell.setAlpha(0);
+        _shell.setVisible(true);
+
+        _activeShells.add(_shell);
+
+        fadeIn(_shell, fade);
+    }
+
+    private static void addLabelButtonListner (Label button) {
+        button.addListener(SWT.MouseDown, _listner);
+        button.addListener(SWT.MouseUp, _listner);
+        button.addListener(SWT.MouseEnter, _listner);
+        button.addListener(SWT.MouseExit, _listner);
+        button.addListener(SWT.MouseHover, _listner);
+    }
+
+    private static class LabelButtonListener implements Listener {
+        @Override
+        public void handleEvent(Event event) {
+            if ( event.widget instanceof Label ) {
+                Label bt = (Label)event.widget;
+                Shell shell = bt.getParent().getShell();
+                if ( SWT.MouseDown == event.type ) {
+                    bt.setImage(NotificationType.XBUTTON_PUSH.getImage());
+                } else if (SWT.MouseUp == event.type ) {
+                    bt.setImage(NotificationType.XBUTTON_NORMAL.getImage());
+                    if ( shell != null ) { 
+                        _activeShells.remove(shell);
+                        shell.dispose();
+
+                        if ( _activeShells.size() > 0 ) {
+                            List<Shell> modifiable = new ArrayList<Shell>(_activeShells);
+                            Collections.reverse(modifiable);
+                            int y = 0;
+                            for (Shell tempshell : modifiable) {
+                                tempshell.setLocation(tempshell.getLocation().x, startY-y);
+                                y+=100;
+                            }
+                        }
+                    }
+                } else if ( SWT.MouseHover == event.type ) {
+                    bt.setImage(NotificationType.XBUTTON_HOVER.getImage());
+                } else if ( SWT.MouseEnter == event.type ) {
+                    bt.setImage(NotificationType.XBUTTON_HOVER.getImage());
+                } else if ( SWT.MouseExit == event.type ) {
+                    bt.setImage(NotificationType.XBUTTON_NORMAL.getImage());
+                }
+            }
+        }
+    }
+
+    private static void fadeIn(final Shell _shell, final boolean fade) {
+        Runnable run = new Runnable() {
+
+            @Override
+            public void run() {
+                try {
+                    if (_shell == null || _shell.isDisposed()) { return; }
+
+                    int cur = _shell.getAlpha();
+                    cur += FADE_IN_STEP;
+
+                    if (cur > FINAL_ALPHA) {
+                        _shell.setAlpha(FINAL_ALPHA);
+                        if (fade) {
+                            startTimer(_shell);
+                        }
+                        return;
+                    }
+
+                    _shell.setAlpha(cur);
+                    SWTUtil.getDisplay().timerExec(FADE_TIMER, this);
+                } catch (Exception err) {
+                    err.printStackTrace();
+                }
+            }
+
+        };
+        SWTUtil.getDisplay().timerExec(FADE_TIMER, run);
+    }
+
+    private static void startTimer(final Shell _shell) {
+        Runnable run = new Runnable() {
+
+            @Override
+            public void run() {
+                try {
+                    if (_shell == null || _shell.isDisposed()) { return; }
+
+                    fadeOut(_shell);
+                } catch (Exception err) {
+                    err.printStackTrace();
+                }
+            }
+
+        };
+        SWTUtil.getDisplay().timerExec(DISPLAY_TIME, run);
+
+    }
+
+    private static void fadeOut(final Shell _shell) {
+        final Runnable run = new Runnable() {
+
+            @Override
+            public void run() {
+                try {
+                    if (_shell == null || _shell.isDisposed()) { return; }
+
+                    int cur = _shell.getAlpha();
+                    cur -= FADE_OUT_STEP;
+
+                    if (cur <= 0) {
+                        _shell.setAlpha(0);
+                        if (_oldImage != null) {
+                            _oldImage.dispose();
+                        }
+                        _shell.dispose();
+                        _activeShells.remove(_shell);
+                        return;
+                    }
+
+                    _shell.setAlpha(cur);
+
+                    SWTUtil.getDisplay().timerExec(FADE_TIMER, this);
+
+                } catch (Exception err) {
+                    err.printStackTrace();
+                }
+            }
+
+        };
+        SWTUtil.getDisplay().timerExec(FADE_TIMER, run);
+
+    }
+}
index 3331a46..9890ab0 100644 (file)
@@ -26,6 +26,7 @@ package org.tizen.common.util;
 
 /**
  * @author Changhyun Lee {@literal <changhyun1.lee@samsung.com>} (S-Core)
+ * @author Gyeongseok Seo {@literal <gyeongseok.seo@samsung.com>} (S-Core)
  *  <ul>
  *  <li> initial creation
  *  <li> thanks to Yoon Kyung Koo  
@@ -35,12 +36,14 @@ public class OSChecker {
     //
     // OS ID constants
     //
-    public final static int WINDOWS = 0x0001;
-    public final static int MAC = 0x0002;
-    public final static int LINUX = 0x0004;
-    public final static int UNIX = 0x0008;
-    public final static int AIX = 0x0010;
-    public final static int SOLARIS = 0x0020;
+    public final static int WINDOWS = 0x0100;
+    public final static int WINDOWSXP = 0x0101;
+    public final static int WINDOWS7 = 0x0102;
+    public final static int MAC = 0x0200;
+    public final static int LINUX = 0x0400;
+    public final static int UNIX = 0x0800;
+    public final static int AIX = 0x1000;
+    public final static int SOLARIS = 0x2000;
 
     //
     // Vendor constants
@@ -71,6 +74,11 @@ public class OSChecker {
 
         if (osName.indexOf("WINDOWS") >= 0) {
             osID |= OSChecker.WINDOWS;
+            if ( ObjectUtil.equals(osName, "WINDOWS XP") ) {
+                osID |= OSChecker.WINDOWSXP;
+            } else if ( ObjectUtil.equals(osName, "WINDOWS 7") ) {
+                osID |= OSChecker.WINDOWS7;
+            }
         } else if (osName.indexOf("MAC") >= 0) {
             osID |= OSChecker.MAC;
         } else if (osName.indexOf("LINUX") >= 0) {
@@ -108,6 +116,13 @@ public class OSChecker {
         return ((osID & OSChecker.WINDOWS) > 0);
     }
 
+    public static boolean isWindowsXP() {
+        return (osID == OSChecker.WINDOWSXP);
+    }
+    public static boolean isWindows7() {
+        return (osID == OSChecker.WINDOWS7);
+    }
+
     public static boolean isMAC() {
         return ((osID & OSChecker.MAC) > 0);
     }
@@ -157,4 +172,14 @@ public class OSChecker {
         return (vendorID == 0);
     }
 
+    /* querying arch */
+    public static boolean is64bit() {
+        boolean is64bit = false;
+        if ( OSChecker.isWindows() ) {
+            is64bit = (System.getenv("ProgramFiles(x86)") != null);
+        } else {
+            is64bit = (System.getProperty("os.arch").indexOf("64") != -1);
+        }
+        return is64bit;
+    }
 }
diff --git a/org.tizen.common/src/org/tizen/common/util/ObjectUtil.java b/org.tizen.common/src/org/tizen/common/util/ObjectUtil.java
new file mode 100644 (file)
index 0000000..3c0f2f8
--- /dev/null
@@ -0,0 +1,411 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.tizen.common.util.StringUtil.NULL_STRING;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.security.SecureRandom;
+import java.util.Arrays;
+import java.util.Collection;
+
+/**
+ * ObjectUtil.
+ * 
+ * Helper related to <code>Object</code> or generic logic
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class ObjectUtil {
+       
+       /**
+        * protected constructor
+        */
+       protected ObjectUtil() {}
+       
+    /**
+     * Returns first non-null element in args
+     * <br>
+     * Returns null if no non-null element
+     * 
+     * @param <T> arguments' type
+     * @param args arguments to check
+     * 
+     * @return non-null element in <code>args</code>
+     */
+       public static <T> T nvl( T... args )
+       {
+               if ( null == args )
+               {
+                       return null;
+               }
+               
+               for ( final T arg : args )
+               {
+                       if ( null != arg )
+                       {
+                               return arg;
+                       }
+               }
+               return null;
+       }
+
+       /**
+        * Hexadecimal IP
+        */
+       private static String hexServerIP = null;
+
+       /**
+        * Seed generator for GUID
+        */
+       private static final SecureRandom SEEDER = new SecureRandom();
+
+    /**
+     * Compares two objects.
+     * <br>
+     * {@link Object#equals(Object)} is used for equality but this needs null check.
+     * <br>
+     * two object are equal if both are <code>null</code>
+     * <br>
+     * <pre>
+     * if ( null == obj1 ) {
+     *  if ( obj1 == obj2 ) {
+     *      ...
+     *  }
+     * } else if ( obj1.equals( obj2 ) ) {
+     *      ...
+     * } 
+     * </pre>
+     * If you use this method 
+     * <pre>
+     * if ( ObjectUtils.equals( obj1, obj2 ) ) {
+     * ...
+     * }
+     * </pre>
+     * Recursively compre if object is {@link Collection} or array
+     * <br>
+     * 
+     * @param obj1 object1 to compare
+     * @param obj2 object2 to compare
+     * 
+     * @return <code>true</code> if two object are equal
+     */
+       @SuppressWarnings({
+                       "unchecked", "rawtypes"
+       })
+       public static
+       boolean
+       equals( 
+               final Object obj1,
+               final Object obj2
+       )
+       {
+               if ( obj1 == obj2 )
+               {
+                       return true;
+               }
+               if ( null == obj1 || null == obj2 )
+               {
+                       return false;
+               }
+
+               if ( !obj1.getClass().isArray() || !obj2.getClass().isArray() )
+               {
+                       return obj1.equals( obj2 );
+               }
+
+               // in case of array
+               if ( obj1 instanceof boolean[] && obj2 instanceof boolean[] )
+               {
+                       return Arrays.equals( ( boolean[] ) obj1, ( boolean[] ) obj2 );
+               }
+               else if ( obj1 instanceof byte[] && obj2 instanceof byte[] )
+               {
+                       return Arrays.equals( ( byte[] ) obj1, ( byte[] ) obj2 );
+               }
+               else if ( obj1 instanceof char[] && obj2 instanceof char[] )
+               {
+                       return Arrays.equals( ( char[] ) obj1, ( char[] ) obj2 );
+               }
+               else if ( obj1 instanceof double[] && obj2 instanceof double[] )
+               {
+                       return Arrays.equals( ( double[] ) obj1, ( double[] ) obj2 );
+               }
+               else if ( obj1 instanceof float[] && obj2 instanceof float[] )
+               {
+                       return Arrays.equals( ( float[] ) obj1, ( float[] ) obj2 );
+               }
+               else if ( obj1 instanceof int[] && obj2 instanceof int[] )
+               {
+                       return Arrays.equals( ( int[] ) obj1, ( int[] ) obj2 );
+               }
+               else if ( obj1 instanceof long[] && obj2 instanceof long[] )
+               {
+                       return Arrays.equals( ( long[] ) obj1, ( long[] ) obj2 );
+               }
+               else if ( obj1 instanceof short[] && obj2 instanceof short[] )
+               {
+                       return Arrays.equals( ( short[] ) obj1, ( short[] ) obj2 );
+               }
+               else if ( obj1 instanceof Collection && obj2 instanceof Collection )
+               {
+                       return CollectionUtil.equals( (Collection) obj1, (Collection) obj2 );
+               }
+               else if ( obj1 instanceof Object[] && obj2 instanceof Object[] )
+               {
+                       return CollectionUtil.equals( (Object[]) obj1, (Object[]) obj2 );
+               }
+               return false;
+       }
+
+       /**
+        * Convert byte[] to integer
+        * 
+        * @param bytes byte array to convert
+        * 
+        * @return converted integer
+        */
+       public static
+       int
+       getInt(
+               final byte bytes[]
+       )
+       {
+               int i= 0;
+               int j= 24;
+               for( int k=0 ; 0<=j ; ++k )
+               {
+                       int l = bytes[k] & 0xff;
+                       i += l << j;
+                       j -= 8;
+               }
+               return i;
+       }
+
+       /**
+        * Pad <code>str</code> to string with <code>length</code> length
+        * 
+        * Return <code>str</code> if string's length is greater than <code>length</code>
+        * 
+        * The padding character is '0'
+        * 
+        * @param str string to pad
+        * @param length length to pad
+        * 
+        * @return padded string
+        */
+       private static
+       String
+       padHex(
+               final String str,
+               final int length
+       )
+       {
+               final StringBuilder buffer = new StringBuilder();
+               for( int j=0, n=length-str.length() ; j<n ; ++j )
+               {
+                       buffer.append( '0' );
+               }
+               buffer.append( str );
+               return buffer.toString();
+       }
+
+       /**
+        * Convert <code>i</code> to hexadecimal with <code>j</code> length
+        * 
+        * @param i decimal to convert
+        * @param j hexadecimal's length
+        * 
+        * @return converted hexadecimal
+        */
+       public static
+       String
+       hexFormat(
+               final int i,
+               final int j
+       )
+       {
+               final String s = Integer.toHexString( i );
+               return padHex( s, j );
+       }
+
+
+       /**
+        * Create GUID with 32 bytes
+        * 
+        * GUID is used for system( programe ) not human
+        * 
+        * Structure
+        * +-----------------+--------------+----------------------+------------------+
+        * | Current Time(8) | Server IP(8) | Object Hash Value(8) | Random Number(8) |
+        * +-----------------+--------------+----------------------+------------------+
+        * 
+        * @param obj object to hash
+        * @return create guid
+        */
+       public static final
+       String
+       generateGUID(
+               final Object obj
+       )
+       {
+               final StringBuilder guid = new StringBuilder( 32 );
+
+               // time
+               long timeNow = System.currentTimeMillis();
+               int timeLow = (int) timeNow& 0xFFFFFFFF;
+               guid.append( hexFormat( timeLow, 8 ) );
+
+               // server IP
+               if ( null == hexServerIP )
+               {
+                       InetAddress localInetAddress = null;
+                       try
+                       {
+                               // get the inet address
+                               localInetAddress = InetAddress.getLocalHost();
+                       }
+                       catch( final UnknownHostException uhe )
+                       {
+                               try
+                               {
+                                       localInetAddress = InetAddress.getByName( "localhost" );
+                               }
+                               catch ( final UnknownHostException e )
+                               {
+                                       e.printStackTrace();
+                                       return null;
+                               }
+                       }
+
+                       byte serverIP[] = localInetAddress.getAddress();
+
+                       hexServerIP = hexFormat( getInt( serverIP ), 8 );
+               }
+               guid.append( hexServerIP );
+
+               // object hash
+               guid.append( hexFormat( System.identityHashCode( obj ), 8 ) );
+
+               // random number
+               int node= -1;
+               synchronized( SEEDER )
+               {
+                       node = SEEDER.nextInt();
+               }
+               guid.append( hexFormat( node, 8 ) );
+               return guid.toString();
+       }
+
+       /* Serialize / Deserialize */
+       /**
+        * Serialize object
+        * 
+        * @param obj object to serialize
+        * 
+        * @return serialized byte array
+        * 
+        * @throws IOException If serialization is fail
+        * 
+        * @see ObjectOutputStream#writeObject( Object )
+        */
+       public static
+       byte[]
+       serialize(
+               final Object obj
+       )
+       throws IOException
+       {
+               final ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+               final ObjectOutputStream objOut = new ObjectOutputStream( byteOut );
+               objOut.writeObject( obj );
+               return byteOut.toByteArray();
+       }
+
+       /**
+        * Deserialize byte array
+        * 
+        * @param bytes bytes to deserialize
+        * 
+        * @return Deserialized object
+        * 
+        * @throws IOException If deserialization is fail
+        * 
+        * @throws ClassNotFoundException If No class
+        * 
+        * @see ObjectInputStream#readObject()
+        */
+       public static
+       Object
+       deserialize(
+               final byte[] bytes
+       )
+       throws IOException, ClassNotFoundException
+       {
+               Assert.notNull( bytes, "bytes must not be null" );
+               final ByteArrayInputStream byteIn = new ByteArrayInputStream( bytes );
+               final ObjectInputStream objIn = new ObjectInputStream( byteIn );
+               return objIn.readObject();
+       }
+
+       /**
+        * Create and return object's simple name
+        * 
+        * Use 4 hash value instead of 8 hash value
+        * 
+        * @param obj object to convert
+        * 
+        * @return textual string for <code>obj</code>
+        */
+       public static
+       String
+       toString(
+               final Object obj
+       )
+       {
+               if ( null == obj )
+               {
+                       return NULL_STRING;
+               }
+               final StringBuilder builder = new StringBuilder();
+               builder.append( obj.getClass().getSimpleName() );
+               builder.append( '@' );
+               int hash = obj.hashCode();
+               
+               for ( int i = 8 ; i>=0 ; i-=8 )
+               {
+                       StringUtil.appendHexa( builder, 0xFF & ( hash >> i ) );
+               }
+               
+               
+               return builder.toString();
+       }
+}
old mode 100644 (file)
new mode 100755 (executable)
index c1123ea..85abf75
@@ -75,9 +75,13 @@ public class OpenBrowserUtil {
                                        IWorkbenchBrowserSupport browserSupport= PlatformUI.getWorkbench().getBrowserSupport();\r
                                        IWebBrowser browser;\r
                                        if (useExternalBrowser)\r
+                                       {\r
                                                browser= browserSupport.getExternalBrowser();\r
+                                       }\r
                                        else\r
+                                       {\r
                                                browser= browserSupport.createBrowser(null);\r
+                                       }\r
                                        browser.openURL(url);\r
                                } catch (PartInitException ex) {\r
                                    MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Error", "Opening url failed: " + ex.getMessage());\r
diff --git a/org.tizen.common/src/org/tizen/common/util/ParsingUtil.java b/org.tizen.common/src/org/tizen/common/util/ParsingUtil.java
new file mode 100755 (executable)
index 0000000..ac67961
--- /dev/null
@@ -0,0 +1,183 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+
+/**
+ * ParsingUtil.
+ * 
+ * Helper related to parsing of textual implication
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class ParsingUtil
+{
+       
+       /**
+        * semantic <code>true</code>
+        */
+       protected static final Collection<String> BOOLEAN_TRUE =
+               Collections.unmodifiableCollection( new HashSet<String>( Arrays.asList(
+                       "1", "yes", "y", "true", "t"
+               ) ) );
+       
+       /**
+        * sematic <code>false</code>
+        */
+       protected static final Collection<String> BOOLEAN_FALSE =
+               Collections.unmodifiableCollection( new HashSet<String>( Arrays.asList(
+                       "no, n", "false", "f", "0"
+               ) ) );
+       
+       /**
+        * parse text and convert to <code>boolean</code>
+        * 
+        * return <code>defaultValue</code> if can't parse or convert
+        * 
+        * @param value string to parse
+        * @param defaultValue default value when exception case
+        * 
+        * @return converted <code>boolean</code> value
+        */
+       public static
+       boolean
+       parseBoolean(
+               final String value,
+               final boolean defaultValue
+       )
+       {
+               if ( null == value )
+               {
+                       return defaultValue;
+               }
+               
+               final String safe = StringUtil.trim( value ).toLowerCase();
+               return ((defaultValue)?BOOLEAN_FALSE:BOOLEAN_TRUE).contains( safe ) ^ defaultValue;
+               
+       }
+       
+       /**
+        * parse text and convert to <code>int</code>
+        * 
+        * return <code>defaultValue</code> if can't parse or convert
+        * 
+        * @param value string to parse
+        * @param defaultValue default value when exception case
+        * 
+        * @return converted <code>int</code> value
+        */
+       public static
+       int parseInt(
+               final String value,
+               final int defaultValue
+       )
+       {
+               if ( null == value )
+               {
+                       return defaultValue;
+               }
+               
+               final String trimmed = StringUtil.trim( value );
+               try
+               {
+                       return Integer.decode( trimmed );
+               } catch ( final NumberFormatException e )
+               {
+                       return defaultValue;
+               }
+       }
+       
+       /**
+        * parse text and convert to <code>long</code>
+        * 
+        * return <code>defaultValue</code> if can't parse or convert
+        * 
+        * @param value string to parse
+        * @param defaultValue default value when exception case
+        * 
+        * @return converted <code>long</code> value
+        */
+       public static
+       long
+       parseLong(
+               final String value,
+               final long defaultValue
+       )
+       {
+               if ( null == value )
+               {
+                       return defaultValue;
+               }
+               
+               final String trimmed = StringUtil.trim( value );
+               try
+               {
+                       return Long.decode( trimmed );
+               } catch ( final NumberFormatException e )
+               {
+                       return defaultValue;
+               }
+               
+       }
+       
+       /**
+        * parse text and convert to <code>double</code>
+        * 
+        * return <code>defaultValue</code> if can't parse or convert
+        * 
+        * @param value string to parse
+        * @param defaultValue default value when exception case
+        * 
+        * @return converted <code>double</code> value
+        */
+       public static
+       double
+       parseDouble(
+               final String value,
+               final double defaultValue
+       )
+       {
+               if ( null == value )
+               {
+                       return defaultValue;
+               }
+               
+               final String trimmed = StringUtil.trim( value );
+               try
+               {
+                       return Double.valueOf( trimmed );
+               }
+               catch( final NumberFormatException e )
+               {
+                       return defaultValue;
+               }
+               
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/PluginUtil.java b/org.tizen.common/src/org/tizen/common/util/PluginUtil.java
new file mode 100644 (file)
index 0000000..b1bd640
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Ho Namkoong <ho.namkoong@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.tizen.common.Surrogate;
+
+/**
+ * PluginUtil 
+ * 
+ * This is a util class for handle extension points of the plugins. 
+ *  
+ * @author Ho Namkoong{@literal <ho.namkoong@samsung.com>} (S-Core)
+ */
+public class PluginUtil {
+    
+    protected static Surrogate<IExtensionRegistry> platformSurrogate = new Surrogate<IExtensionRegistry>() {
+        public IExtensionRegistry getAdapter()
+        {
+            return Platform.getExtensionRegistry();
+        }
+    };
+    
+    /**
+     * Return classes of specific extension point id.  
+     * @param extPointId  - extension point id.
+     * @return object array of classes of extPointId.
+     */
+    public static Object[] loadClasses(String extPointId) throws CoreException {
+        IExtensionRegistry registry = platformSurrogate.getAdapter();
+        IExtensionPoint ep = registry.getExtensionPoint(extPointId );
+        IExtension[] exts = ep.getExtensions();
+        List<Object> classList = new ArrayList<Object>();
+        
+        for ( IExtension ext : exts )
+        {
+            IConfigurationElement[] configs = ext.getConfigurationElements();
+            
+            for ( final IConfigurationElement config : configs )
+            {
+                Object cls = (Object) config.createExecutableExtension( "class" );
+                classList.add(cls);
+            }
+        }
+        
+        return classList.toArray();
+    }
+    
+    /**
+     * Return class of specific class id which extends specific extension point id.
+     * @param extPointId  - extension point id.
+     * @param classId  - class id.
+     * @return object class of specific class id which extends specific extension point id.
+     */
+    public static Object loadClass(String extPointId, String classId) throws CoreException {
+        IExtensionRegistry registry = platformSurrogate.getAdapter();
+        IExtensionPoint ep = registry.getExtensionPoint(extPointId );
+        IExtension[] exts = ep.getExtensions();
+        
+        for ( IExtension ext : exts )
+        {
+            IConfigurationElement[] configs = ext.getConfigurationElements();
+            
+            for ( final IConfigurationElement config : configs )
+            {
+                String id = config.getAttribute("id");
+                if(id != null && id.equals(classId)) {
+                    return (Object) config.createExecutableExtension( "class" );
+                }
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Return object of specific attribute which extends specific extension point id.
+     * @param extPointId  - extension point id.
+     * @param attribute  - attribute.
+     * @return object of specific attribute which extends specific extension point id.
+     */
+    public static Object[] getExtensionAttribute(String extPointId, String attribute) throws CoreException {
+        IExtensionRegistry registry = platformSurrogate.getAdapter();
+        IExtensionPoint ep = registry.getExtensionPoint(extPointId );
+        IExtension[] exts = ep.getExtensions();
+        List<String> values = new ArrayList<String>();
+
+        for ( IExtension ext : exts ) {
+            IConfigurationElement[] configs = ext.getConfigurationElements();
+            for ( final IConfigurationElement config : configs ) {
+                String value = config.getAttribute(attribute);
+                if (value != null && !value.isEmpty()) {
+                    values.add(value);
+                }
+            }
+        }
+
+        return values.toArray();
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/PreferenceLinkMessageDialog.java b/org.tizen.common/src/org/tizen/common/util/PreferenceLinkMessageDialog.java
new file mode 100644 (file)
index 0000000..ef98501
--- /dev/null
@@ -0,0 +1,406 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* Gyeongseok Seo <gyeongseok.seo@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+/**
+ * PreferenceLinkMessageDialog<br>
+ * 
+ * This class extends {@link MessageDialog}, so It has all MessageDialog's function.
+ * In Addition, Support of preference link operation.<br>
+ * This class's {@link #linkMessage} is important. if linkMessage is <code>null</code> then,
+ * this class's all dialog is same to MessageDialog. even if {@link #preferencePageId} is not null.
+ * 
+ * @author Gyeongseok Seo {@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ *
+ */
+public class PreferenceLinkMessageDialog extends MessageDialog {
+
+       /**
+        * Link Message. when dialog is open then this message is include link.<br>
+        * link is connected to preferencePage, using {@link #preferencePageId}
+        */
+       protected String linkMessage;
+
+       /**
+        * preferencePage's ID. if value is <code>null</code>, do nothing.<br>
+        */
+       protected String preferencePageId;
+
+       /**
+        * Create a message dialog. Note that the dialog will have no visual
+        * representation (no widgets) until it is told to open.
+        * <p>
+        * The labels of the buttons to appear in the button bar are supplied in
+        * this constructor as an array. The <code>open</code> method will return
+        * the index of the label in this array corresponding to the button that was
+        * pressed to close the dialog.
+        * </p>
+        * <p>
+        * <strong>Note:</strong> If the dialog was dismissed without pressing
+        * a button (ESC key, close box, etc.) then {@link SWT#DEFAULT} is returned.
+        * Note that the <code>open</code> method blocks.
+        * </p>
+        *
+        * @param parentShell
+        *            the parent shell
+        * @param dialogTitle
+        *            the dialog title, or <code>null</code> if none
+        * @param dialogTitleImage
+        *            the dialog title image, or <code>null</code> if none
+        * @param dialogMessage
+        *            the dialog message
+        * @param dialogImageType
+        *            one of the following values:
+        *            <ul>
+        *            <li><code>MessageDialog.NONE</code> for a dialog with no
+        *            image</li>
+        *            <li><code>MessageDialog.ERROR</code> for a dialog with an
+        *            error image</li>
+        *            <li><code>MessageDialog.INFORMATION</code> for a dialog
+        *            with an information image</li>
+        *            <li><code>MessageDialog.QUESTION </code> for a dialog with a
+        *            question image</li>
+        *            <li><code>MessageDialog.WARNING</code> for a dialog with a
+        *            warning image</li>
+        *            </ul>
+        * @param dialogButtonLabels
+        *            an array of labels for the buttons in the button bar
+        * @param defaultIndex
+        *            the index in the button label array of the default button
+        * @param linkMessage
+        *            the dialog's link message, or <code>null</code> if none
+        * @param preferencePageId
+        *            linkMessage's linked preferencePageId, not used if linkMessage is null or empty
+        */
+       public PreferenceLinkMessageDialog(Shell parentShell, String dialogTitle,
+                       Image dialogTitleImage, String dialogMessage, int dialogImageType,
+                       String[] dialogButtonLabels, int defaultIndex, String linkMessage, String preferencePageId) {
+               super(parentShell, dialogTitle, dialogTitleImage, dialogMessage,
+                               dialogImageType, dialogButtonLabels, defaultIndex);
+               this.linkMessage = linkMessage;
+               this.preferencePageId = preferencePageId;
+       }
+
+       /* (non-Javadoc)
+        * @see org.eclipse.jface.dialogs.IconAndMessageDialog#createMessageArea(org.eclipse.swt.widgets.Composite)
+        */
+       @Override
+       protected Control createMessageArea(Composite composite) {
+               // create composite
+               // create image
+               Image image = getImage();
+               if (image != null) {
+                       imageLabel = new Label(composite, SWT.NULL);
+                       image.setBackground(imageLabel.getBackground());
+                       imageLabel.setImage(image);
+                       addAccessibleListeners(imageLabel, image);
+                       GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.BEGINNING)
+                                       .applyTo(imageLabel);
+               }
+               // create message
+               if ( StringUtil.isEmpty( linkMessage ) ) {
+                       // link not included
+                       if ( !StringUtil.isEmpty( message ) ) {
+                               messageLabel = new Label(composite, getMessageLabelStyle());
+                               messageLabel.setText(message);
+                               GridDataFactory
+                                       .fillDefaults()
+                                       .align(SWT.FILL, SWT.BEGINNING)
+                                       .grab(true, false)
+                                       .hint(
+                                               convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH),
+                                               SWT.DEFAULT).applyTo(messageLabel);
+                       }
+               } else {
+                       // link included then create link
+                       String fullMessage = StringUtil.EMPTY_STRING;
+                       if ( !StringUtil.isEmpty( message ) ) {
+                               fullMessage = message;
+                       }
+                       fullMessage += " <a>"+linkMessage+"</a>";
+
+                       Link linkLabel = new Link( composite, getMessageLabelStyle() );
+                       linkLabel.setText( fullMessage );
+                       GridDataFactory
+                               .fillDefaults()
+                               .align(SWT.FILL, SWT.BEGINNING)
+                               .grab(true, false)
+                               .hint(
+                                       convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH),
+                                       SWT.DEFAULT).applyTo(linkLabel);
+                       linkLabel.addSelectionListener( new SelectionListener() {
+                               @Override
+                               public void widgetSelected(SelectionEvent e) {
+                                       String preferencePageId = getPreferencePageId();
+                                       if ( !StringUtil.isEmpty( preferencePageId ) ) {
+                                               PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn( getShell(), preferencePageId, new String[] { preferencePageId }, null );
+                                               dialog.open();
+                                       }
+                               }
+
+                               @Override
+                               public void widgetDefaultSelected(SelectionEvent e) {
+                               }
+                       });
+               }
+
+               return composite;
+       }
+
+       public static String[] getButtonLabels(int kind) {
+               String[] dialogButtonLabels;
+               switch (kind) {
+               case ERROR:
+               case INFORMATION:
+               case WARNING: {
+                       dialogButtonLabels = new String[] { IDialogConstants.OK_LABEL };
+                       break;
+               }
+               case CONFIRM: {
+                       dialogButtonLabels = new String[] { IDialogConstants.OK_LABEL,
+                                       IDialogConstants.CANCEL_LABEL };
+                       break;
+               }
+               case QUESTION: {
+                       dialogButtonLabels = new String[] { IDialogConstants.YES_LABEL,
+                                       IDialogConstants.NO_LABEL };
+                       break;
+               }
+               case QUESTION_WITH_CANCEL: {
+                       dialogButtonLabels = new String[] { IDialogConstants.YES_LABEL,
+                                       IDialogConstants.NO_LABEL,
+                                       IDialogConstants.CANCEL_LABEL };
+                       break;
+               }
+               default: {
+                       throw new IllegalArgumentException(
+                                       "Illegal value for kind in MessageDialog.open()"); //$NON-NLS-1$
+               }
+               }
+               return dialogButtonLabels;
+       }
+
+       /**
+        * Add an accessible listener to the label if it can be inferred from the
+        * image.
+        * 
+        * @param label
+        * @param image
+        */
+       private void addAccessibleListeners(Label label, final Image image) {
+               label.getAccessible().addAccessibleListener(new AccessibleAdapter() {
+                       public void getName(AccessibleEvent event) {
+                               final String accessibleMessage = getAccessibleMessageFor(image);
+                               if (accessibleMessage == null) {
+                                       return;
+                               }
+                               event.result = accessibleMessage;
+                       }
+               });
+       }
+
+       private String getAccessibleMessageFor(Image image) {
+               if (image.equals(getErrorImage())) {
+                       return JFaceResources.getString("error");//$NON-NLS-1$
+               }
+
+               if (image.equals(getWarningImage())) {
+                       return JFaceResources.getString("warning");//$NON-NLS-1$
+               }
+
+               if (image.equals(getInfoImage())) {
+                       return JFaceResources.getString("info");//$NON-NLS-1$
+               }
+
+               if (image.equals(getQuestionImage())) {
+                       return JFaceResources.getString("question"); //$NON-NLS-1$
+               }
+
+               return null;
+       }
+
+       /**
+        * get preferencePage id, it's setting constructor.<br>
+        * used link creation time.
+        * 
+        * @Method Name  : getPreferencePageId
+        * @return preferencePage id
+        */
+       protected String getPreferencePageId() {
+               return this.preferencePageId;
+       }
+
+       /**
+        * Convenience method to open a simple dialog as specified by the
+        * <code>kind</code> flag.
+        * 
+        * @param kind
+        *            the kind of dialog to open, one of {@link MessageDialog#ERROR},
+        *            {@link MessageDialog#INFORMATION}, {@link MessageDialog#QUESTION}, {@link MessageDialog#WARNING},
+        *            {@link MessageDialog#CONFIRM}, or {@link MessageDialog#QUESTION_WITH_CANCEL}.
+        * @param parent
+        *            the parent shell of the dialog, or <code>null</code> if none
+        * @param title
+        *            the dialog's title, or <code>null</code> if none
+        * @param message
+        *            the message
+        * @param style
+        *            {@link SWT#NONE} for a default dialog, or {@link SWT#SHEET} for
+        *            a dialog with sheet behavior
+        * @param linkMessage
+        *            the dialog's link message, or <code>null</code> if none
+        * @param preferencePageId
+        *            linkMessage's linked preferencePageId, not used if linkMessage is null or empty
+        * @return <code>true</code> if the user presses the OK or Yes button,
+        *         <code>false</code> otherwise
+        * @since 3.5
+        */
+       public static boolean open(int kind, Shell parent, String title,
+                       String message, int style, String linkMessage, String preferencePageId) {
+               PreferenceLinkMessageDialog dialog = new PreferenceLinkMessageDialog(parent, title, null, message,
+                               kind, getButtonLabels(kind), 0, linkMessage, preferencePageId);
+               style &= SWT.SHEET;
+               dialog.setShellStyle(dialog.getShellStyle() | style);
+               return dialog.open() == 0;
+       }
+
+       /**
+        * Convenience method to open a simple confirm (OK/Cancel) dialog.
+        * 
+        * @param parent
+        *            the parent shell of the dialog, or <code>null</code> if none
+        * @param title
+        *            the dialog's title, or <code>null</code> if none
+        * @param message
+        *            the message
+        * @param linkMessage
+        *            the dialog's link message, or <code>null</code> if none
+        * @param preferencePageId
+        *            linkMessage's linked preferencePageId, not used if linkMessage is null or empty
+        * @return <code>true</code> if the user presses the OK button,
+        *         <code>false</code> otherwise
+        */
+       public static boolean openConfirm(Shell parent, String title, String message,
+                       String linkMessage, String preferencePageId) {
+               return open(CONFIRM, parent, title, message, SWT.NONE, linkMessage, preferencePageId);
+       }
+
+       /**
+        * Convenience method to open a standard error dialog.
+        * 
+        * @param parent
+        *            the parent shell of the dialog, or <code>null</code> if none
+        * @param title
+        *            the dialog's title, or <code>null</code> if none
+        * @param message
+        *            the message
+        * @param linkMessage
+        *            the dialog's link message, or <code>null</code> if none
+        * @param preferencePageId
+        *            linkMessage's linked preferencePageId, not used if linkMessage is null or empty
+        */
+       public static void openError(Shell parent, String title, String message,
+                       String linkMessage, String preferencePageId) {
+               open(ERROR, parent, title, message, SWT.NONE, linkMessage, preferencePageId);
+       }
+
+       /**
+        * Convenience method to open a standard information dialog.
+        * 
+        * @param parent
+        *            the parent shell of the dialog, or <code>null</code> if none
+        * @param title
+        *            the dialog's title, or <code>null</code> if none
+        * @param message
+        *            the message
+        * @param linkMessage
+        *            the dialog's link message, or <code>null</code> if none
+        * @param preferencePageId
+        *            linkMessage's linked preferencePageId, not used if linkMessage is null or empty
+        */
+       public static void openInformation(Shell parent, String title, String message,
+                       String linkMessage, String preferencePageId) {
+               open(INFORMATION, parent, title, message, SWT.NONE, linkMessage, preferencePageId);
+       }
+
+       /**
+        * Convenience method to open a simple Yes/No question dialog.
+        * 
+        * @param parent
+        *            the parent shell of the dialog, or <code>null</code> if none
+        * @param title
+        *            the dialog's title, or <code>null</code> if none
+        * @param message
+        *            the message
+        * @param linkMessage
+        *            the dialog's link message, or <code>null</code> if none
+        * @param preferencePageId
+        *            linkMessage's linked preferencePageId, not used if linkMessage is null or empty
+        * @return <code>true</code> if the user presses the Yes button,
+        *         <code>false</code> otherwise
+        */
+       public static boolean openQuestion(Shell parent, String title, String message,
+                       String linkMessage, String preferencePageId) {
+               return open(QUESTION, parent, title, message, SWT.NONE, linkMessage, preferencePageId);
+       }
+
+       /**
+        * Convenience method to open a standard warning dialog.
+        * 
+        * @param parent
+        *            the parent shell of the dialog, or <code>null</code> if none
+        * @param title
+        *            the dialog's title, or <code>null</code> if none
+        * @param message
+        *            the message
+        * @param linkMessage
+        *            the dialog's link message, or <code>null</code> if none
+        * @param preferencePageId
+        *            linkMessage's linked preferencePageId, not used if linkMessage is null or empty
+        */
+       public static void openWarning(Shell parent, String title, String message,
+                       String linkMessage, String preferencePageId) {
+               open(WARNING, parent, title, message, SWT.NONE, linkMessage, preferencePageId);
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/ProjectUtil.java b/org.tizen.common/src/org/tizen/common/util/ProjectUtil.java
new file mode 100644 (file)
index 0000000..96f8e66
--- /dev/null
@@ -0,0 +1,213 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Jihoon Song <jihoon80.song@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util;
+
+import java.util.Map;
+
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.tizen.common.util.log.Logger;
+
+/**
+ * ProjectUtil.
+ * 
+ * Helper related to the Eclipse Project (.project)
+ * 
+ * @author Jihoon Song{@literal <jihoon80.song@samsung.com>} (S-Core)
+ */
+public class ProjectUtil {
+    
+    /**
+     * Null safety project description getter. If project is null, return null.
+     * @param project
+     * @return IProjectDescription
+     * @throws CoreException
+     */
+    public static IProjectDescription getDescription(IProject project) throws CoreException {
+        return (project != null) ? project.getDescription() : null;
+    }
+    
+    /**
+     * Null safety project build specification getter
+     * @param project
+     * @return ICommand[]
+     * @throws CoreException
+     */
+    public static ICommand[] getBuildSpec(IProject project) throws CoreException {
+        IProjectDescription description = getDescription( project );
+        return (description != null) ? description.getBuildSpec() : new ICommand[0];
+    }
+    
+    /**
+     * Build specification setter
+     * @param project
+     * @param commands
+     * @param monitor a progress monitor, or <code>null</code> if progress reporting is not desired
+     * @throws CoreException
+     */
+    public static void setBuildSpec(IProject project, ICommand[] commands, IProgressMonitor monitor)
+            throws CoreException {
+        IProjectDescription description = getDescription( project );
+        if ( description != null ) { // if project or project description is not null
+            description.setBuildSpec( commands );
+            project.setDescription( description, monitor );
+        }
+    }
+    
+    /**
+     * Null safety build command adder
+     * @param oldCommands
+     * @param newCommand
+     * @return ICommand[]
+     */
+    public static ICommand[] addCommand(ICommand[] oldCommands, ICommand newCommand) {
+        // if newCommand is Null
+        if ( newCommand == null ) {
+            if ( oldCommands == null ) { // if argument is Null both, return 0-based array
+                return new ICommand[0];
+            } else {
+                return oldCommands; 
+            }
+        }
+        
+        // create expanded commands
+        ICommand[] newCommands;
+        if ( oldCommands != null ) {
+            newCommands = new ICommand[ oldCommands.length + 1 ];
+            System.arraycopy( oldCommands, 0, newCommands, 0, oldCommands.length );
+        } else {
+            newCommands = new ICommand[ 1 ];
+        }
+        
+        // add new command to last index
+        newCommands[ newCommands.length - 1 ] = newCommand;
+        
+        return newCommands;
+    }
+    
+    /**
+     * Null safety build command finder. If not found, return null.
+     * @param commands
+     * @param builderID
+     * @return ICommand
+     */
+    public static ICommand findCommand(ICommand[] commands, String builderID) {
+        if ( commands != null ) {
+            for (ICommand command : commands) {
+                String builderName = command.getBuilderName();
+                if ( builderName != null && builderName.equals( builderID ) ){ 
+                    return command;
+                }
+            }
+        }
+        
+        return null;
+    }
+    
+    /**
+     * Null safety build command creater. If project or project description is null, return null.
+     * @param project
+     * @return ICommand
+     * @throws CoreException
+     */
+    public static ICommand newCommand(IProject project) throws CoreException {
+        IProjectDescription description = getDescription( project );
+        return (description != null) ? description.newCommand() : null;
+    }
+    
+    /**
+     * Specific build command adder with arguments. If builder ID already exist or is null, ignore this process.
+     * @param project
+     * @param builderID a builder name
+     * @param args a table of command arguments (keys and values must both be of type <code>String</code>), or <code>null</code>
+     * @param monitor a progress monitor, or <code>null</code> if progress reporting is not desired
+     */
+    public static void setBuildCommandWithArgument(IProject project, String builderID,
+            Map<String, String> args, IProgressMonitor monitor) {
+        if ( builderID == null ) { // If builder ID is null
+            return ;
+        }
+        
+        try {
+            ICommand[] commands = getBuildSpec( project );
+            
+            ICommand findedCommand = findCommand( commands, builderID );
+            if ( findedCommand != null ) { // If builder ID already exist
+                return;
+            }
+            
+            ICommand command = newCommand( project );
+            if ( command == null ) {
+                return;
+            }
+            
+            command.setBuilderName( builderID );
+            command.setArguments( args );
+            
+            ICommand[] newCommands = addCommand( commands, command );
+            setBuildSpec( project, newCommands, monitor );
+        } catch (CoreException e) {
+            Logger.log(e);
+        }
+    }
+    
+    /**
+     * Arguments getter in specific build command. If not found, return null.
+     * @param project
+     * @param builderID
+     * @return a table of command arguments (key type : <code>String</code> value type : <code>String</code>), or <code>null</code>
+     */
+    public static Map<String, String> getBuildCommandArgument(IProject project, String builderID) {
+        try {
+            ICommand[] commands = getBuildSpec( project );
+            ICommand command = findCommand( commands, builderID );
+            if ( command != null ) {
+                return command.getArguments();
+            }
+        } catch (CoreException e) {
+            Logger.log(e);
+        }
+        
+        return null;
+    }
+    
+    /**
+     * Check whether target project is located in default location or not.
+     * @param descriptionLocation .cproject location of target project.
+     * @return true if it is located in default location. False if not.
+     */
+    public static boolean isDefaultProjectLocation(IPath descriptionLocation) {
+        if(descriptionLocation.segmentCount() < 2) {
+            return false;
+        }
+        return descriptionLocation.removeLastSegments(2).toFile().equals(Platform.getLocation().toFile());
+    }
+}
old mode 100644 (file)
new mode 100755 (executable)
index 2f7ac97..ac3d016
@@ -24,6 +24,9 @@
 */
 package org.tizen.common.util;
 
+import static org.tizen.common.util.IOUtil.tryClose;
+import static org.tizen.common.util.StringUtil.isEmpty;
+
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
 import java.io.FileReader;
@@ -33,7 +36,11 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.util.Properties;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 public abstract class PropertyUtil {
+    protected static final Logger logger = LoggerFactory.getLogger( PropertyUtil.class );
        public static Properties loadProperties(String fileName) {
                Properties props = new Properties();
                BufferedReader reader = null;
@@ -41,22 +48,22 @@ public abstract class PropertyUtil {
                        reader = new BufferedReader(new FileReader(fileName));
                        String line = "";
                        while((line=reader.readLine()) != null) {
-                           if ("".equals(line.trim()))
+                           if ( isEmpty( line ) )
+                           {
                                continue;
+                           }
                                int index = line.indexOf("=");
                                String key =line.substring(0,index);
                                String value = line.substring(index+1);
                                props.setProperty(key, value);
                        }
                        //props.load(reader);
-               } catch (Exception e) {
-                       e.printStackTrace();
+               }
+               catch ( final IOException e )
+               {
+                   logger.info( "Exception Occurred:", e );
                } finally {
-                       if (reader != null)
-                               try {
-                                       reader.close();
-                               } catch (IOException e) {
-                               }
+                       tryClose( reader );
                }
                return props;
        }
@@ -65,14 +72,10 @@ public abstract class PropertyUtil {
                Properties props = new Properties();
                try {
                        props.load(inputStream);
-               } catch (Exception e) {
-                       e.printStackTrace();
+               } catch ( final IOException e ) {
+                   logger.info( "Ignore exception" );
                } finally {
-                       if (inputStream != null)
-                               try {
-                                       inputStream.close();
-                               } catch (IOException e) {
-                               }
+                       tryClose( inputStream );
                }
                return props;
        }
@@ -80,15 +83,11 @@ public abstract class PropertyUtil {
        public static boolean storeProperties(OutputStream outputStream, Properties props) {
                try {
                        props.store(outputStream, null);
-               } catch (Exception e) {
-                       e.printStackTrace();
+               } catch (IOException e) {
+                   logger.info( "Ignore exception" );
                        return false;
                } finally {
-                       if (outputStream != null)
-                               try {
-                                       outputStream.close();
-                               } catch (IOException e) {
-                               }
+                       tryClose( outputStream );
                }
                return true;
        }
@@ -96,18 +95,17 @@ public abstract class PropertyUtil {
        public static boolean storeProperties(String fileName, Properties props) {
                BufferedWriter writer = null;
                
-               try {
+               try
+               {
                        writer = new BufferedWriter(new FileWriter(fileName));
                        props.store(writer, null);
-               } catch (Exception e) {
-                       e.printStackTrace();
+               }
+               catch ( IOException e )
+               {
+            logger.info( "Ignore exception" );
                        return false;
                } finally {
-                       if (writer != null)
-                               try {
-                                       writer.close();
-                               } catch (IOException e) {
-                               }
+                       tryClose( writer );
                }
                return true;
        }
diff --git a/org.tizen.common/src/org/tizen/common/util/ReflectionUtil.java b/org.tizen.common/src/org/tizen/common/util/ReflectionUtil.java
new file mode 100755 (executable)
index 0000000..e4d911f
--- /dev/null
@@ -0,0 +1,64 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.util;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+\r
+public class\r
+ReflectionUtil\r
+{\r
+    protected static final Logger logger = LoggerFactory.getLogger( ReflectionUtil.class );\r
+    \r
+    public static\r
+    Object\r
+    tryNewInstance(\r
+        final String className\r
+    )\r
+    {\r
+        return tryNewInstance( className, Thread.currentThread().getContextClassLoader() );\r
+    }\r
+    public static\r
+    Object\r
+    tryNewInstance(\r
+        final String className,\r
+        final ClassLoader loader\r
+    )\r
+    {\r
+        try\r
+        {\r
+            final Class<?> clazz = loader.loadClass( className );\r
+            return clazz.newInstance();\r
+        }\r
+        catch ( Throwable e)\r
+        {\r
+            logger.info( "Exception occurred :", e );\r
+            return null;\r
+        }\r
+        \r
+    }\r
+    \r
+\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/util/SWTRunner.java b/org.tizen.common/src/org/tizen/common/util/SWTRunner.java
new file mode 100755 (executable)
index 0000000..287f580
--- /dev/null
@@ -0,0 +1,68 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.util;\r
+\r
+import org.tizen.common.Cabinet;\r
+\r
+abstract public class\r
+SWTRunner<T>\r
+implements Runnable, Cabinet<T>\r
+{\r
+    protected T data;\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.Cabinet#getData()\r
+     */\r
+    @Override\r
+    public\r
+    T\r
+    getData()\r
+    {\r
+        return data;\r
+    }\r
+\r
+    /* (non-Javadoc)\r
+     * @see org.tizen.common.Cabinet#setData(java.lang.Object)\r
+     */\r
+    @Override\r
+    public\r
+    void\r
+    setData(\r
+        final T data\r
+    )\r
+    {\r
+        this.data = data;\r
+    }\r
+\r
+    @Override\r
+    public void run()\r
+    {\r
+        setData( process() );\r
+    }\r
+    \r
+    abstract protected T process();\r
+    \r
+\r
+}\r
old mode 100644 (file)
new mode 100755 (executable)
index 21c7dc9..4e2f9bb
@@ -26,24 +26,221 @@ package org.tizen.common.util;
 
 import java.awt.Dimension;
 import java.awt.Toolkit;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Stack;
+import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.layout.PixelConverter;
+import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.PaintEvent;
+import org.eclipse.swt.events.PaintListener;
 import org.eclipse.swt.events.VerifyEvent;
 import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Resource;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.swt.widgets.Widget;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IFileEditorInput;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
+import org.tizen.common.Cabinet;
+import org.tizen.common.ui.TableToolTipListener;
 
 
+@SuppressWarnings("restriction")
 public class SWTUtil {
+       
+       private SWTUtil() {}
 
+       // 2012-04-25
+       @Deprecated
     public static final String HTML_EXTENSIONS[] = { "html", "htm", "shtml", "shtm", "xhtml"};
+       
+    protected static final Collection<?> HTML_EXTENSIONS2 =
+       Collections.unmodifiableCollection( new HashSet<Object>( Arrays.asList( HTML_EXTENSIONS ) ) );
+    
+    /**
+     * return {@link Display} in context
+     * 
+     * return new {@link Display} if no {@link Display} in context
+     * 
+     * @return SWT {@link Display} simply
+     * 
+     * @see Display#getCurrent()
+     * @see Display#getDefault();
+     */
+    public static Display getDisplay()
+    {
+       Display dp = Display.getCurrent();
+       if ( null != dp )
+       {
+               return dp;
+       }
+       
+       return Display.getDefault();
+    }
+    
+    /**
+     * <p>
+     * Return active {@link Shell} in context
+     * </p>
+     * @return active {@link Shell}
+     * 
+     * @see #getDisplay()
+     */
+    public static Shell getActiveShell()
+    {
+       final Display dp = getDisplay();
+       if ( null == dp )
+       {
+               return null;
+       }
+       
+       return dp.getActiveShell();
+    }
+    
+    /**
+     * execute {@link Cabinet#run()} and reeturn the result
+     *  
+     * @param runnable object to execute
+     * 
+     * @return result to execute
+     */
+    public static
+    <T>
+    T
+    exec(
+        final Cabinet<T> runnable
+    )
+    {
+        syncExec( (Runnable) runnable );
+        
+        return runnable.getData();
+    }
+    
+    /**
+     * execute {@link Runnable} in SWT thread synchronously
+     * 
+     * @param runnable object to execute
+     */
+    public static void syncExec( final Runnable runnable )
+    {
+       syncExec( getDisplay(), runnable );
+    }
+    
+    /**
+     * execute {@link Runnable} in SWT thread synchronously
+     *
+     * @param dp SWT <code>Display</code>
+     * @param runnable object to execute
+     */
+    public static void syncExec( final Display dp, final Runnable runnable )
+    {
+       dp.syncExec( runnable );
+    }
+    
+    /**
+     * execute {@link Runnable} in SWT thread asynchronously
+     * 
+     * @param runnable object to execute
+     */
+    public static void asyncExec( final Runnable runnable )
+    {
+       asyncExec( getDisplay(), runnable );
+    }
+    
+    /**
+     * execute {@link Runnable} in SWT thread asynchronously
+     * 
+     * @param dp SWT <code>Display</code>
+     * @param runnable object to execute
+     */
+    public static void asyncExec( final Display dp, final Runnable runnable )
+    {
+       dp.asyncExec( runnable );
+    }
+    
+    /**
+     * dispose {@link Widget}s
+     * 
+     * @param disposables {@link Widget}s to dispose
+     */
+    public static void tryDispose( final Widget... disposables )
+    {
+       if ( null == disposables )
+       {
+               return ;
+       }
+       
+       for ( final Widget disposable : disposables )
+       {
+               if ( null == disposable || disposable.isDisposed() )
+               {
+                       continue;
+               }
+               
+               disposable.dispose();
+       }
+    }
+
+    /**
+     * dispose {@link Resource}s
+     * 
+     * @param disposables {@link Resource}s to dispose
+     */
+    public static void tryDispose( final Resource... disposables )
+    {
+        if ( null == disposables )
+        {
+            return ;
+        }
+
+        for ( final Resource disposable : disposables )
+        {
+            if ( null == disposable || disposable.isDisposed() )
+            {
+                continue;
+            }
+
+            disposable.dispose();
+        }
+    }
 
     /**
      * Creates SWT <code>Text</code> for input limited digit.
@@ -75,6 +272,7 @@ public class SWTUtil {
 
     /**
      * Creates SWT <code>ScrolledComposite</code>.
+     * 
      * @param width the minimum width or 0 for default width (0 is screen width)
      * @param height the minimum height or 0 for default height (0 is screen height)
      * @return <code>ScrolledComposite</code>
@@ -98,6 +296,24 @@ public class SWTUtil {
 
         return sc;
     }
+    
+    /**
+     * Get current active page.
+     * 
+     * return null if no active page
+     * 
+     * @return active page
+     */
+    public static IWorkbenchPage getActivePage()
+    {
+        final IWorkbenchWindow window = ViewUtil.getWorkbenchWindow();
+        
+        if ( null == window )
+        {
+               return null;
+        }
+        return window.getActivePage();
+    }
 
     /**
      * Get current active editor.
@@ -106,21 +322,15 @@ public class SWTUtil {
      * @author Changhyun Lee {@literal <changhyun1.lee@samsung.com>} (S-Core)
      */
     public static IEditorPart getActiveEditor() {
-        IWorkbenchWindow window = ViewUtil.getWorkbenchWindow();
-        IWorkbenchPage page = window.getActivePage();
-
-        if(page == null){
+        final IWorkbenchPage page = getActivePage();
+        if(page == null )
+        {
             return null;
         }
 
-        IEditorPart editor = page.getActiveEditor();
-        if(editor == null){
-            return null;
-        }
-
-        return editor;
+        return page.getActiveEditor();
     }
-
+    
     /**
      * Get editor of file extension.
      *
@@ -170,17 +380,9 @@ public class SWTUtil {
      * @author Changhyun Lee {@literal <changhyun1.lee@samsung.com>} (S-Core)
      */
     public static boolean isHtmlFile(String fullName) {
-        String fileExt = FileUtil.getFileExtension(fullName);
-        if (fileExt == null) {
-            return false;
-        }
+        String fileExt = StringUtil.nvl( FileUtil.getFileExtension(fullName) );
 
-        for (String htmlExt : HTML_EXTENSIONS) {
-            if (htmlExt.equalsIgnoreCase(fileExt)) {
-                return true;
-            }
-        }
-        return false;
+        return HTML_EXTENSIONS2.contains( fileExt.toLowerCase() );
     }
 
     /**
@@ -200,4 +402,243 @@ public class SWTUtil {
         return page.getEditorReferences();
     }
 
-}
\ No newline at end of file
+    public static void refreshLocal() throws CoreException {
+        IEditorPart editor = SWTUtil.getActiveEditor();
+        if (editor != null && editor.getEditorInput() != null){
+            IFileEditorInput input = (IFileEditorInput) editor.getEditorInput().getAdapter(IFileEditorInput.class);
+            if (input == null) {
+                return;
+            }
+            input.getFile().getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+        }
+    }
+
+    public static String getProjectPath() {
+        IEditorPart editor = SWTUtil.getActiveEditor();
+        if (editor == null || editor.getEditorInput() == null){
+            return null;
+        }
+
+        IFileEditorInput input = (IFileEditorInput) editor.getEditorInput().getAdapter(IFileEditorInput.class);
+        if (input == null) {
+            return null;
+        }
+
+        String projectName = input.getFile().getProject().getName();
+
+        IWorkspaceRoot workspaceRoot = IDEWorkbenchPlugin.getPluginWorkspace().getRoot();
+        String projectPath = "";
+        try {
+            projectPath = workspaceRoot.getProject(projectName).getLocation().toOSString();
+        } catch (Exception e) {
+            projectPath = workspaceRoot.getLocation().toOSString();
+        }
+
+        return projectPath;
+    }
+    
+    public static void addTableToolTipListener(Table table, TableToolTipListener listener) {
+        listener.setTable(table);
+        table.addListener(SWT.MouseMove, listener);
+        table.addListener(SWT.MouseWheel, listener);
+        table.addListener(SWT.Dispose, listener);
+        table.addListener(SWT.MouseHover, listener);
+    }
+    
+    /**
+     * Expands tree and its sub treeitems.
+     *
+     * @param tree target tree to expand.
+     * @author Ho Namkoong {@literal <ho.namkoong@samsung.com>} (S-Core)
+     */
+    public static void expandTree(Tree tree) {
+        if(tree == null) {
+            return;
+        }
+        for(TreeItem treeitem: tree.getItems()) {
+            expandTreeItem(treeitem);
+        }
+    }
+
+    private static void expandTreeItem(TreeItem treeItem) {
+        Stack<TreeItem> treeStack = new Stack<TreeItem>();
+        treeStack.add(treeItem);
+        TreeItem selectedItem = null;
+        
+        do {
+            selectedItem = treeStack.pop();
+            selectedItem.setExpanded(true);
+            
+            if(selectedItem.getItems() != null && selectedItem.getItemCount() != 0) {
+                for (TreeItem childItem : selectedItem.getItems()) {
+                    treeStack.add(childItem);
+                }
+            }
+        } while (!treeStack.isEmpty());
+    }
+
+    /**
+     * set grid layout data of Control. 
+     * If values of  heightHint, widthHint, horizontalSpan, verticalSpan is -1, this method does not change value of them. 
+     *
+     * @param c target control to which grid layout data is set.
+     * @param heightHint height of the control
+     * @param widthHint width of the control
+     * @param horizontalSpan the number of column cells that control will take up.
+     * @param verticalSpan the number of row cells that control will take up.
+     * @param style style of the control
+     * @author Ho Namkoong {@literal <ho.namkoong@samsung.com>} (S-Core)
+     */
+    public static void setGridLayoutData(Control c, int heightHint, int widthHint, int horizontalSpan, int verticalSpan, int style) {
+        GridData gd = new GridData(style);
+        if(heightHint != -1) {
+            gd.heightHint = heightHint;
+        }
+        if(widthHint != -1) {
+            gd.widthHint = widthHint;
+        }
+        if(horizontalSpan != -1) {
+            gd.horizontalSpan = horizontalSpan;
+        }
+        if(verticalSpan != -1) {
+            gd.verticalSpan = verticalSpan;
+        }
+        c.setLayoutData(gd);
+    }
+    
+    /**
+     * Make error dialog which prints stack trace of the throwable 
+     *
+     * @param title title of the dialog
+     * @param msg message of the dialog
+     * @param t throwable diaog prints out 
+     * @param shell parent shell of this dialog
+     * @author Ho Namkoong {@literal <ho.namkoong@samsung.com>} (S-Core)
+     */
+    public static void errorDialogWithStackTrace(String title, String msg, Throwable t, String pluginId, Shell shell) {
+        
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        t.printStackTrace(pw);
+        
+        final String trace = sw.toString();
+        
+        List<Status> childStatuses = new ArrayList<Status>();
+        
+        for(String line: trace.split("\n")) {
+            childStatuses.add(new Status(IStatus.ERROR, pluginId, line));
+        }
+        
+        MultiStatus ms = new MultiStatus(pluginId, IStatus.ERROR, childStatuses.toArray(new Status[] {}), t.getLocalizedMessage(), t);
+        
+        ErrorDialog.openError(shell, "Error Dialog", msg, ms);
+    }
+    
+    public static Composite createCompositeEx(Composite parent, int numColumns, int layoutMode) {
+        Composite composite = new Composite(parent, SWT.NULL);
+        composite.setFont(parent.getFont());
+
+        composite.setLayout(new GridLayout(numColumns, false));
+        composite.setLayoutData(new GridData(layoutMode));
+        return composite;
+    }
+
+    public static Group createGroup(Composite parent, String label, int numColumns) {
+        Group group = new Group(parent, SWT.NONE);
+        group.setFont(parent.getFont());
+        group.setText(label);
+        GridLayout layout = new GridLayout();
+        layout.numColumns = numColumns;
+        group.setLayout(layout);
+        group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+        return group;
+    }
+
+    public static void createSpacer(Composite composite, int columnSpan) {
+        Label label = new Label(composite, SWT.NONE);
+        GridData gd = new GridData();
+        gd.horizontalSpan = columnSpan;
+        label.setLayoutData(gd);
+    }
+    
+    /**
+     * Returns a width hint for a button control.
+     * @param button the button
+     * @return the width hint
+     */
+    public static int getButtonWidthHint(Button button) {
+        button.setFont(JFaceResources.getDialogFont());
+        PixelConverter converter= new PixelConverter(button);
+        int widthHint= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
+        return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x);
+    }
+    
+    /**
+     * make background image of child control transient.
+     * Actually, it just copy parent image and paint it to the child background.
+     * Also, it works only when background of parent is image
+     * 
+     * @param parent parent composite
+     * @param child child control
+     */
+    public static void makeChildBackgroundTransient(final Composite parent) {
+        if(parent != null) {
+            final Object lock = new Object();
+            final AtomicBoolean finished = new AtomicBoolean(false);
+            parent.addPaintListener(new PaintListener() {
+                
+                class PairControl {
+                    
+                    PairControl(Composite parent, Control child) {
+                        this.parent = parent;
+                        this.child = child;
+                    }
+                    Composite parent;
+                    Control child;
+                }
+                
+                @Override
+                public void paintControl(PaintEvent e) {
+                    if(finished.get()) {
+                        return;
+                    }
+                    synchronized (lock) {
+                        finished.set(true);
+                        parent.removePaintListener(this);
+                        if(parent.getBackgroundImage() != null) {
+                            
+                            Stack<PairControl> childStack = new Stack<PairControl>();
+                            
+                            for(Control childControl: parent.getChildren()) {
+                                childStack.add(new PairControl(parent, childControl));
+                            }
+                            
+                            while(!childStack.isEmpty()) {
+                                PairControl pair = childStack.pop();
+                                Control childControl = pair.child;
+                                Composite parentComposite = pair.parent;
+                                Image parentImage = parentComposite.getBackgroundImage();
+                                Point childLoc = childControl.getLocation();
+                                
+                                if(childControl instanceof Composite) {
+                                    Composite childComposite = ((Composite)childControl);
+                                    for(Control grandChildControl: childComposite.getChildren()) {
+                                        childStack.push(new PairControl(childComposite, grandChildControl));
+                                    }
+                                }
+                                Point childSize = childControl.getSize();
+                                Image childImage = new Image(SWTUtil.getDisplay(), childSize.x, childSize.y);
+                                GC gc = new GC(parentImage);
+                                gc.copyArea(childImage, childLoc.x, childLoc.y);
+                                gc.dispose();
+                                childControl.setBackgroundImage(childImage);
+                            }
+                        }
+                    }
+                }
+            });
+        }
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/SdbCommandUtil.java b/org.tizen.common/src/org/tizen/common/util/SdbCommandUtil.java
new file mode 100644 (file)
index 0000000..4e25456
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Gun Kim <gune.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util;
+
+import java.io.File;
+
+import org.tizen.common.core.application.InstallPathConfig;
+import org.tizen.sdblib.IDevice;
+
+/**
+ * SdbCommandUtil.
+ * 
+ * sdb helper
+ * 
+ * @author Gun Kim{@literal <gune.kim@samsung.com>} (S-Core)
+ */
+public class SdbCommandUtil {
+    
+    /**
+     * push file to device
+     * 
+     * @param device
+     * 
+     * @param source source file path
+     *  
+     * @param dest destination file path
+     */
+    public static boolean filePush(IDevice device, String source, String dest){
+        final String command_format = InstallPathConfig.getSDBPath() + " -s %s push %s %s ";
+        if ( device == null ) {
+            return false;
+        }
+        
+        if ( !(new File(source).exists()) ) {
+            return false;
+        }
+        
+        String command = String.format(command_format, device.getSerialNumber(), source, dest);
+        if (OSChecker.isUnix() ) {
+            command += "1>/dev/null";
+        }
+        else if (OSChecker.isWindows() ) {
+            command += "1>NUL";
+        }
+        String command_result = HostUtil.returnExecute(command);
+        
+        if ( "".equals(command_result)) {
+            return true;
+        }
+        
+        return false;
+    }
+}
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
index deae677..da25324
@@ -24,6 +24,8 @@
 */
 package org.tizen.common.util;
 
+import static org.tizen.common.util.IOUtil.tryClose;
+
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
@@ -50,23 +52,26 @@ public class StreamGobbler extends Thread
        public void run()
        {
                StringBuffer buffer = new StringBuffer();
+               BufferedReader br = null;
                try {           
                        synchronized (synchronizer) {
-                               BufferedReader br = new BufferedReader(new InputStreamReader(is));
+                               br = new BufferedReader(new InputStreamReader(is));
                                String line;
                                while ( (line = br.readLine()) != null) {
                                        buffer.append(line);
                                        buffer.append("\n");
                                        
                                        if ( os != null )
+                                       {
                                                os.write( (line + "\n").getBytes());
+                                       }
                                }
-                               br.close();
                        }
                } catch (IOException ioe) {
                        ioe.printStackTrace();
                } finally {
                        result = buffer.toString();
+                       tryClose( br );
                }
        }
        public String getResult() {
old mode 100644 (file)
new mode 100755 (executable)
index c7ccee2..ffc409c
@@ -1,37 +1,41 @@
 /*
-*  Common
-*
-* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
-*
-* Contact: 
-* Kangho Kim <kh5325.kim@samsung.com>
-* 
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*
-* Contributors:
-* - S-Core Co., Ltd
-*
-*/
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Kangho Kim <kh5325.kim@samsung.com>
+ 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
 package org.tizen.common.util;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.Reader;
+import java.io.StringReader;
+import java.io.StringWriter;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.StringTokenizer;
 
+import org.tizen.common.util.log.Logger;
+
 /**
  * @author Changhyun Lee {@literal <changhyun1.lee@samsung.com>} (S-Core)
  *  <ul>
@@ -41,57 +45,170 @@ import java.util.StringTokenizer;
  *  @author gyeongseok.seo@samsung.com, S-Core Inc. 
  *  <ul>
  *  <li> added split method.
+ *  <li> added removeStart method.
  *  </ul> 
  */
-public class StringUtil {
-    public static String trimToNull(String s) {
-        return trimToNull(s, null);
-    }
+public class StringUtil
+{
+    /**
+     * Empty String
+     */
+    public static final String EMPTY_STRING = "";
 
-    public static String trimToNull(String s, String def) {
-        if (s == null) {
-            return def;
-        }
+    /**
+     * Textual string for <code>null</code>
+     */
+    public static final String NULL_STRING = "<<null>>";
 
-        String t = s.trim();
-        if (t.length() == 0) {
-            return def;
-        }
+    /**
+     * Textual string for empty byte array
+     */
+    public static final String EMPTY_BYTES_STRING = "<<EMPTY BYTES>>";
+
+    /**
+     * Line separator string
+     */
+    public static final String LINE_SEPARATOR = System.getProperty( "line.separator" );
+
+    /**
+     * TAB string
+     */
+    public static final String TAB = "\t";
+
+    /* Dump Format */
+    protected static char CONTROL_CHARS_SHOWER = '.';
+
+    /**
+     * Hexa decimal conversion map
+     */
+    protected static final char[] HEXA_CHARS = new char[] {
+        '0', '1', '2', '3', '4', '5', '6', '7',
+        '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
+    };
+    /**
+     * The number how many bytes is in int
+     */
+    protected static final int N_INT_BY_BYTE = 4;
+
+    /**
+     * The number how many characters is print out in a line
+     */
+    protected static final int WIDTH_PER_LINE = 16;
+
+    /**
+     * Character to express for control( Human can't control character and control character break log format )
+     */
+    protected static char TWO_BYTES_CHARS_SHOWER = '?';
+
+    /**
+     * Return meaningful value of <code>str</code>
+     * 
+     * Return <code>null</code> if <code>str</code> has no implication
+     * 
+     * @param str string to check
+     * 
+     * @return meaningful string
+     * 
+     * @see #trimToNull(String, String)
+     */
+    public static
+    String
+    trimToNull(
+        final String str
+    )
+    {
+        return trimToNull(str, null);
+    }
 
-        return t;
+    /**
+     * Return meaningful value of <code>str</code>
+     * 
+     * Return <code>def</code> if <code>str</code> has no implication
+     * 
+     * @param str string to check
+     * 
+     * @return meaningful string
+     * 
+     * @see #getMeaningful(String)
+     * @see #isEmpty(CharSequence)
+     */
+    public static String trimToNull(String str, String def) {
+        final String meaningful = getMeaningful( str );
+        return isEmpty( meaningful )?def:meaningful;
     }
 
-    public static InputStream stringToInputStream(String src) {
-        if (src == null) {
+    /**
+     * Convert <code>src</code> to {@link InputStream}
+     * 
+     * @param src string to convert
+     * 
+     * @return {@link InputStream} containing <code>src</code>
+     */
+    public static
+    InputStream
+    toInputStream(
+        final String src
+    )
+    {
+        if ( null == src )
+        {
             return null;
         }
-        return new ByteArrayInputStream(src.getBytes());
+        return new ByteArrayInputStream( src.getBytes() );
     }
 
-    public static String[] split(String s, String delim) {
-        List<String> list = new ArrayList<String>();
-        StringTokenizer st = new StringTokenizer(s, delim);
-        while (st.hasMoreTokens()) {
-            list.add(st.nextToken());
+    /**
+     * Split <code>str</code> with <code>delimiters</code>
+     * 
+     * @param str string to split
+     * @param delimiters delimiters to split with
+     * 
+     * @return strings to be split
+     */
+    public static
+    String[] split(
+        final String str,
+        final String delimiters
+    )
+    {
+        final List<String> list = new ArrayList<String>();
+        final StringTokenizer tokenizer = new StringTokenizer( str, delimiters );
+        while ( tokenizer.hasMoreTokens() )
+        {
+            list.add( tokenizer.nextToken() );
         }
 
         return (String[]) list.toArray(new String[0]);
     }
 
-    public static String getOnlyNumerics(String str) {
-        if (str == null) {
+    /**
+     * @param str
+     * @return
+     */
+    public static String getOnlyNumerics(
+        final String str
+    )
+    {
+        if ( null == str )
+        {
             return null;
         }
         
-        char c;
-        StringBuilder sb = new StringBuilder();
+        final StringBuilder sb = new StringBuilder();
         
-        for (int i = 0; i < str.length() ; i++) {
-            c = str.charAt(i);
-            if (Character.isDigit(c)) {
-                sb.append(c);
+        ArrayUtil.iterate(
+            ArrayUtil.convertToWrapper( str.toCharArray() ),
+            new IteratingRunner<Character>()
+            {
+                public void run( Character arg )
+                {
+                    if (Character.isDigit( arg )) {
+                        sb.append( arg );
+                    }
+                }
             }
-        }
+        );
+        
         return sb.toString();
     }
 
@@ -104,12 +221,14 @@ public class StringUtil {
         return sb.toString();
     }
     public static String asString(InputStream is) throws IOException{
-       StringBuffer out = new StringBuffer();
-       byte[] b = new byte[4096];
-       
-       for (int n; (n = is.read(b)) != -1;)
-               out.append(new String(b,0,n));
-       return out.toString();          
+        StringBuffer out = new StringBuffer();
+        byte[] b = new byte[4096];
+
+        for (int n; (n = is.read(b)) != -1;)
+        {
+            out.append(new String(b,0,n));
+        }
+        return out.toString();
     }
 
     public static String removeEnd(String str, String remove) {
@@ -122,7 +241,898 @@ public class StringUtil {
         return str;
     }
 
-    public static boolean isEmpty(CharSequence cs) {
-        return cs == null || cs.length() == 0;
+    /**
+     * remove string in target string
+     * if target is empty or remove word is empty then just return target string
+     * 
+     * @param str - target string
+     * @param remove - remove string
+     * @return removed target string
+     */
+    public static String removeStart(String str, String remove) {
+        if (isEmpty(str) || isEmpty(remove) ) {
+            return str;
+        }
+        if (str.startsWith(remove)){
+            return str.substring(remove.length());
+        }
+        return str;
+    }
+
+    /* Logging */
+    /**
+     * </p>
+     * Append hexa value for <code>ch</code> to <code>buffer</code>
+     *
+     * Hexa value must be two digit. Pad 0 if hexa value has 1 digit.
+     * </p>
+     *
+     * @param buffer {@link StringBuilder} to write
+     * @param ch decimal integer
+     */
+    public static
+    void
+    appendHexa(
+        final StringBuilder buffer,
+        final int ch
+    )
+    {
+        if ( ch < 16 )
+        {
+            // if 1 digit containing hexadecimal
+            buffer.append( '0' );
+            buffer.append( HEXA_CHARS[( 0x0f & ( ch ) )] );
+        }
+        else
+        {
+            // if 2 digit containing hexadecimal
+            buffer.append( HEXA_CHARS[( 0x0f & ( ch >> 4 ) )] );
+            buffer.append( HEXA_CHARS[( 0x0f & ( ch ) )] );
+        }
+    }
+
+    /**
+     * Add end seperation at logging line's end
+     *
+     * @param hexPart hex decimal part
+     * @param textPart text part
+     * @param ret all part
+     */
+    protected static
+    void
+    lineEnd(
+        final StringBuilder hexPart,
+        final StringBuilder textPart,
+        final StringBuilder ret
+    )
+    {
+        // append separator of area
+        hexPart.append( "     |" );
+
+        // append separator of termination
+        textPart.append( "|\n" );
+
+        // concatencate two area
+        ret.append( hexPart );
+        ret.append( textPart );
+
+        // clean each area
+        hexPart.delete( 0, hexPart.capacity() );
+        textPart.delete( 0, textPart.capacity() );
+    }
+
+    /**
+     * <p>
+     * Convert <code>data</code> in hexadecimal format for logging or readibility
+     *
+     * Output layout<br>
+     * <table>
+     * <tr><td>Address( or offset )</td><td>byte character</td><td>hexadecimal</td></tr>
+     * </table>
+     *
+     * Replace control character to '.'<br>
+     * </p>
+     *
+     * <code>
+     * Logger logger = ...
+     * byte[] dump = ...
+     * logger.debug( StringUtil.text2hexa( dump ) );
+     * </code>
+     *
+     * @param data byte array to convert
+     *
+     * @return converted textual string
+     *
+     * @see #text2hexa(byte[], int, int)
+     */
+    public static
+    String
+    text2hexa(
+        final byte[] data
+    )
+    {
+        if ( null == data )
+        {
+            return NULL_STRING;
+        }
+        return text2hexa( data, 0, data.length );
+    }
+
+    /**
+     * <p>
+     * Convert data from <code>offset</code> to <code>offset</code> + <code>length</code> in hexadecimal format.
+     *
+     * Output layout<br>
+     * <table>
+     * <tr><td>Address( or offset )</td><td>byte character</td><td>hexadecimal</td></tr>
+     * </table>
+     *
+     * Replace control character to '.'<br>
+     * </p>
+     *
+     * @param data byte array to convert
+     * @param offset start position to convert
+     * @param length length to convert
+     *
+     * @return converted textual string
+     */
+    public static
+    String
+    text2hexa(
+        final byte[] data,
+        final int offset,
+        final int length
+    )
+    {
+
+        if ( null == data )
+        {
+            return NULL_STRING;
+        }
+        if ( data.length <= 0 )
+        {
+            return EMPTY_BYTES_STRING;
+        }
+
+        final ByteArrayInputStream reader = new ByteArrayInputStream( data, offset, length );
+        final StringBuilder ret = new StringBuilder();
+        final StringBuilder hexPart = new StringBuilder();
+        final StringBuilder textPart = new StringBuilder();
+
+        int address = 0;
+        int ch = -1;
+        int printByte = 0;
+        int cnt = 0;
+
+        // fill white space( ' ' ) in address title
+        hexPart.append( "          " );
+
+        // make horizontal ruler
+        for ( int i = 0, n = WIDTH_PER_LINE / 4 ; i < n ; i++ )
+        {
+            hexPart.append( "+-------" );
+            textPart.append( "+---" );
+        }
+
+        lineEnd( hexPart, textPart, ret );
+
+        while ( 0 <= ( ch = reader.read() ) )
+        {
+            if ( 0 == cnt )
+            {
+                // calculate and print out start address
+                for ( int i = N_INT_BY_BYTE - 1 ; i >= 0 ; i-- )
+                {
+                    printByte = 0xFF & ( address >> ( 8 * i ) );
+                    appendHexa( hexPart, printByte );
+                }
+                hexPart.append( "  " );
+                address += WIDTH_PER_LINE;
+            }
+
+            appendHexa( hexPart, ch );
+            if ( ( ch & 0x80 ) != 0 || ch < 32 )
+            {    // if ch is control character
+                // print out replaced character
+                textPart.append( CONTROL_CHARS_SHOWER );
+            }
+            else
+            {
+                textPart.append( (char) ch );
+            }
+            cnt++;
+
+            if ( WIDTH_PER_LINE == cnt )
+            {
+                lineEnd( hexPart, textPart, ret );
+                cnt = 0;
+            }
+        } // END of while ( 0 <= (ch = reader.read() ) )
+
+        // fill white space( ' ' ) in remaining area
+        if ( 0 != cnt )
+        {
+            for ( ; cnt < WIDTH_PER_LINE ; ++cnt )
+            {
+                hexPart.append( "  " );
+                textPart.append( ' ' );
+            }
+            lineEnd( hexPart, textPart, ret );
+        }
+
+        return ret.toString();
+    }
+
+
+    /* Check & Verification */
+    /**
+     * Check that <code>str</code> is <code>null</code> or empty string textually
+     *
+     * @param str string to check
+     *
+     * @return <code>true</code> if <code>str</code> is null or empty string or string containing only white space
+     *
+     * @see StringUtil#hasText( CharSequence )
+     */
+    public static
+    boolean
+    isEmpty(
+        final CharSequence str
+    )
+    {
+        if ( null == str )
+        {
+            return true;
+        }
+
+        for ( int i=0, n=str.length() ; i<n ; ++i )
+        {
+            if ( Character.isWhitespace( str.charAt( i ) ) )
+            {
+                continue;
+            }
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Get length of string
+     *
+     * Return <code>0</code> if <code>str</code> is <code>null</code>
+     *
+     * @param str string whose length is checked
+     *
+     * @return length of <code>str</code>
+     */
+    public static
+    int
+    size(
+        final CharSequence str
+    )
+    {
+        if ( null == str )
+        {
+            return 0;
+        }
+        return str.length();
+    }
+
+    /**
+     * <p>
+     * Check that <code>str</code> contain any character
+     * </p>
+     * @param str string to check
+     *
+     * @return <code>true</code> if <code>str</code> is not <code>null</code> nor empty string
+     *
+     * @see #size(CharSequence)
+     */
+    public static
+    boolean
+    hasLength(
+        final CharSequence str
+    )
+    {
+        return 0 < size( str );
+    }
+
+    /**
+     * Check that <code>str</code> has textual character
+     *
+     * @param str string to check
+     *
+     * @return <code>true</code> if <code>str</code> has textual character
+     * 
+     * @see isEmpty( CharSequence )
+     */
+    public static
+    boolean
+    hasText(
+        final CharSequence str
+    )
+    {
+        return !isEmpty( str );
+    }
+
+    /* Conversion */
+    /**
+     * Check <code>strs</code> and return non-null string
+     *
+     * Return empty string if all of element in <code>strs</code>
+     *
+     * @param strs strings to check
+     *
+     * @return non-null in <code>strs</code>
+     *
+     * see #ObjectUtil{@link #nvl(String...)}
+     */
+    public static
+    String
+    nvl(
+        final String... strs
+    )
+    {
+        String val = ObjectUtil.nvl( strs );
+        if ( null == val )
+        {
+            return "";
+        }
+        return val;
+    }
+
+    /**
+     * Trim leading whitespaqce
+     *
+     * @param str string to trim
+     *
+     * @return trimmed string
+     */
+    public static
+    String
+    trimLeading(
+        final String str
+    )
+    {
+        if( !hasLength( str ) )
+        {
+            return str;
+        }
+
+        final char[] chs = str.toCharArray();
+        for ( int i=0, n=chs.length ; i<n ; ++i )
+        {
+            if ( !Character.isWhitespace( chs[i] ) )
+            {
+                return new String( chs, i, str.length() - i );
+            }
+        }
+        return EMPTY_STRING;
+    }
+
+    /**
+     * Trim trailing white space
+     *
+     * @param str string to trim
+     *
+     * @return trimmed string
+     */
+    public static
+    String
+    trimTrailing(
+        final String str
+    )
+    {
+        if( !hasLength( str ) )
+        {
+            return str;
+        }
+
+        final char[] chs = str.toCharArray();
+        for ( int i=chs.length-1, j=chs.length ; 0<j ; --i, --j )
+        {
+            if ( !Character.isWhitespace( chs[i] ) )
+            {
+                return new String( chs, 0, j );
+            }
+        }
+        return EMPTY_STRING;
+    }
+    /**
+     * Remove white spaces at leading and trailing part of <code>str</code>
+     *
+     * Return empty string if <code>str</code> is <code>null</code>
+     *
+     * @param str string to convert
+     *
+     * @return converted string
+     *
+     * @see StringUtil#trimLeading(String)
+     * @see StringUtil#trimTrailing(String)
+     */
+    public static
+    String
+    trim(
+        final String str
+    ) {
+        return trimTrailing( trimLeading( str ) );
+    }
+
+    /**
+     * Convert <code>str</code> to meaningful for search
+     *
+     * @param str string to convert
+     *
+     * @return converted string
+     */
+    public static
+    String
+    getMeaningful(
+        final String str
+    ) {
+        if ( null == str )
+        {
+            return EMPTY_STRING;
+        }
+        return trim( str ).toLowerCase();
+    }
+
+    /**
+     * Mask <code>str</code> with <code>maskingStr</code>
+     *
+     * Replace <code>str</code> to <code>maskingStr</code> with <code>str</code>'s length
+     *
+     * @param str string to mask
+     * @param maskingStr string to mask with
+     *
+     * @return masked string
+     */
+    public static
+    String
+    mask(
+        final String str,
+        final String maskingStr
+    ) {
+        if ( null == str )
+        {
+            return "null";
+        }
+
+        final StringBuilder buffer = new StringBuilder();
+        for ( int i=0, n=str.length() ; i<n ; ++i )
+        {
+            buffer.append( maskingStr );
+        }
+        return buffer.toString();
+    }
+
+    /* Analysis & Extract */
+    /**
+     * Extract <code>targetIndex</code> string from strings
+     *
+     * where <code>str</code> is splitted by <code>delimeter</code>
+     *
+     * @param str string with <code>delimeter</code>
+     * @param delimeter what split <code>str</code> with
+     * @param escaper escape character for <code>delimter</code>
+     * @param targetIndex index from fragments
+     *
+     * @return extracted string
+     */
+    public static
+    String
+    getParamater(
+        final String str,
+        final char delimeter,
+        final int escaper,
+        final int targetIndex
+    )
+    throws IOException
+    {
+        try
+        {
+            if ( null == str )
+            {
+                return null;
+            }
+            final StringReader reader = new StringReader( str );
+            StringWriter writer = null;
+            int ch = 0;
+            final int ST_NORMAL = 0;
+            final int ST_ESCAPE = 1;
+            int status = ST_NORMAL;
+            int index = 0;
+            if ( 0 == targetIndex )
+            {
+                writer = new StringWriter();
+            }
+            while ( 0 <= ( ch = reader.read() ) ) {
+                if ( ST_ESCAPE == status ) {
+                    status = ST_NORMAL;
+                } else {
+                    if ( escaper == ch ) {
+                        status = ST_ESCAPE;
+                        continue;
+                    } else if ( delimeter == ch ) {
+                        if ( index == targetIndex )
+                        {
+                            return writer.toString();
+                        }
+                        ++index;
+                        if ( index == targetIndex )
+                        {
+                            writer = new StringWriter();
+                        }
+                        continue;
+                    }
+                }
+                if ( null != writer )
+                {
+                    writer.write( (int) ch );
+                }
+            }
+            if ( index == targetIndex )
+            {
+                return writer.toString();
+            }
+            return null;
+        }
+        catch ( final IOException e )
+        {
+            // Never throw
+            throw new IllegalStateException( e );
+        }
+    }
+
+    /**
+     * Return substring starting <code>indexFromLast</code> from last
+     *
+     * @param str original string
+     * @param indexFromLast starting index from last
+     *
+     * @return substring
+     */
+    public static
+    String
+    lastSubstring(
+        final String str,
+        final int indexFromLast
+    )
+    {
+        if ( null == str )
+        {
+            return null;
+        }
+
+        final int length = str.length();
+
+        if ( length < indexFromLast )
+        {
+            return str;
+        }
+
+        return str.substring( length - indexFromLast );
+    }
+
+    /**
+     * Extract last fragment in strings split <code>str</code> with <code>separator</code>
+     *
+     * @param str origin string
+     * @param separator string for separation
+     *
+     * @return last fragment string
+     */
+    public static
+    String
+    getLastSegment(
+        final String str,
+        final String separator
+    )
+    {
+        if ( null == str )
+        {
+            return EMPTY_STRING;
+        }
+
+        final int index = str.lastIndexOf( separator );
+        if ( index < 0 )
+        {
+            return str;
+        }
+
+        return str.substring( index + separator.length() );
+    }
+
+    /**
+     * Extract last fragment in string and return remaining string with <code>separator</code>
+     *
+     * @param str origin string
+     * @param separator string for separation
+     *
+     * @return remaining string
+     */
+    public static
+    String
+    removeLastSegment(
+        final String str,
+        final String separator
+    )
+    {
+        if ( null == str )
+        {
+            return EMPTY_STRING;
+        }
+
+        final int index = str.lastIndexOf( separator );
+
+        if ( index < 0 )
+        {
+            return EMPTY_STRING;
+        }
+
+        return str.substring( 0, index );
+
+    }
+
+    /**
+     * Make <code>n</code> repeated <code>symbol</code> string
+     *
+     * @param symbol composing string
+     * @param n repeat count
+     *
+     * @return made string
+     */
+    public static
+    String
+    multiply(
+        final String symbol,
+        final int n
+    )
+    {
+        if ( null == symbol ) {
+            return EMPTY_STRING;
+        }
+
+        final StringBuilder buffer = new StringBuilder();
+        for ( int i=0 ; i<n ; ++i )
+        {
+            buffer.append( symbol );
+        }
+        return buffer.toString();
+    }
+
+    /**
+     * Check that <code>str</code> contain white spaces
+     *
+     * @param str string to check
+     * @return <code>true</code> if <code>str</code> contain white spaces
+     */
+    public static
+    boolean
+    containsWhitespace(
+        final CharSequence str
+    )
+    {
+        final int nChar = size( str );
+
+        for ( int i= 0; i< nChar; ++i )
+        {
+            if ( Character.isWhitespace( str.charAt( i ) ) )
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    /**
+     * Trim leading <code>leadingCharacter</code> from <code>str</code>
+     *
+     * @param str string to trim
+     * @param leadingCharacter character to trim with
+     *
+     * @return trimmed string
+     */
+    public static
+    String
+    trimLeadingCharacter(
+        final String str,
+        final char leadingCharacter
+    )
+    {
+        if( !hasLength( str ) )
+        {
+            return str;
+        }
+
+        final char[] chs = str.toCharArray();
+        for ( int i=0, n=chs.length ; i<n ; ++i )
+        {
+            if ( leadingCharacter != chs[i] )
+            {
+                return new String( chs, i, str.length() - i );
+            }
+        }
+        return EMPTY_STRING;
+    }
+
+    /**
+     * Trim trailing <code>trailingCharacter</code> from <code>str</code>
+     *
+     * @param str string to trim
+     * @param trailingCharacter character to trim with
+     *
+     * @return trimmed string
+     */
+    public static
+    String
+    trimTrailingCharacter(
+        final String str,
+        final char trailingCharacter
+    )
+    {
+        if( !hasLength( str ) )
+        {
+            return str;
+        }
+
+        final char[] chs = str.toCharArray();
+        for ( int i=chs.length-1, j=chs.length ; 0<j ; --i, --j )
+        {
+            if ( trailingCharacter != chs[i] )
+            {
+                return new String( chs, 0, j );
+            }
+        }
+        return EMPTY_STRING;
+    }
+
+    /**
+     * Trim <code>str</code> with <code>character</code>
+     *
+     * @param str string to trim
+     * @param character character to trim with
+     *
+     * @return trimmed string
+     */
+    public static
+    String
+    trimCharacter(
+        final String str,
+        final char character
+    )
+    {
+        return trimTrailingCharacter( trimLeadingCharacter( str, character ), character );
+    }
+
+    /**
+     * Extract word at <coode>index</code> column in <code>doc</code>
+     *
+     * @param doc full string
+     * @param index column index
+     *
+     * @return word at <code>index</code> column
+     */
+    public static
+    String
+    getWord(
+        final String doc,
+        final int index
+    )
+    {
+        final StringBuilder buffer = new StringBuilder();
+
+        int position = index;
+
+        if ( doc.length() < index )
+        {
+            return "";
+        }
+
+        for ( int i = position - 1 ; 0 <= i ; --i )
+        {
+
+            int ch = doc.charAt( i );
+
+            if ( Character.isWhitespace( ch ) )
+            {
+                break;
+            }
+            buffer.append( (char) ch );
+        }
+        buffer.reverse();
+
+        for ( int i = position , n = doc.length() ; i < n ; ++i )
+        {
+            int ch = doc.charAt( i );
+            if ( Character.isWhitespace( ch ) )
+            {
+                break;
+            }
+            buffer.append( (char) ch );
+        }
+
+        return buffer.toString();
+    }
+
+    /**
+     * Extract word in front of <coode>index</code> column in <code>doc</code>
+     *
+     * @param doc full string
+     * @param index column index
+     *
+     * @return word in front of <code>index</code> column
+     */
+    public static
+    String
+    getPreviousWord(
+        final String doc,
+        final int index
+    )
+    {
+        final StringBuilder buffer = new StringBuilder();
+
+        if ( index < 0 || doc.length() < index )
+        {
+            Logger.debug( "Index[{0}] is out of bound :[0:{1}]", index, doc.length() );
+            return "";
+        }
+
+        int ch = 0;
+        boolean bNeedWord = false;
+        if ( index < doc.length() )
+        {
+            ch = doc.charAt( index );
+            bNeedWord =  Character.isWhitespace( ch );
+        }
+        Logger.debug( "Character at index :'{0}'", (char ) ch );
+        for ( int i = index - 1 ; 0 <= i ; --i )
+        {
+            ch = doc.charAt( i );
+
+            if ( Character.isWhitespace( ch ) )
+            {
+                if ( bNeedWord )
+                {
+                    continue;
+                }
+                Logger.debug( "Meet space at column {0}", i );
+                break;
+            }
+            bNeedWord = false;
+            buffer.append( (char) ch );
+        }
+
+        return buffer.reverse().toString();
+    }
+
+    /**
+     * Enum to String array
+     *
+     * @param values enum values
+     *
+     * @return string array
+     */
+    public static <T extends Enum<T>> String[] enumNameToStringArray(T[] values) {
+        int i = 0;
+        String[] result = new String[values.length];
+        for (T value: values) {
+            result[i++] = value.name();
+        }
+        return result;
+    }
+
+    /**
+     * Returns <code>true</code> if the given str is set of integers. Or {@code false} otherwise.
+     * 
+     */
+    public static boolean isInteger(String str) {
+        try {
+            Integer.parseInt(str);
+            return true;
+        } catch (NumberFormatException e) {
+            return false;
+        }
     }
 }
diff --git a/org.tizen.common/src/org/tizen/common/util/ThreadUtil.java b/org.tizen.common/src/org/tizen/common/util/ThreadUtil.java
new file mode 100644 (file)
index 0000000..d51eed7
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+/**
+ * ThreadUtil.
+ * 
+ * Helper related to <code>Thread</code>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+ThreadUtil
+{
+       protected ThreadUtil() {}
+       
+       /**
+        * try to invoke {@link Thread#sleep(long)} in safe
+        * 
+        * handle <code>milliseconds</code> to zero( 0 ) if it is negative 
+        * 
+        * @param milliseconds time to sleep in milliseconds
+        * 
+        * @see Thread#sleep(long)
+        */
+       public static void trySleep( final long milliseconds )
+       {
+               if ( milliseconds <=0 )
+               {
+                       return ;
+               }
+               try {
+                       Thread.sleep( milliseconds );
+               } catch ( InterruptedException e ) {
+               }
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/ValidationUtil.java b/org.tizen.common/src/org/tizen/common/util/ValidationUtil.java
new file mode 100644 (file)
index 0000000..2f5583f
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Changhyun Lee <changhyun1.lee@samsung.com>
+ * Hyeongseok Heo <hyeongseok.heo@samsung.com>
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * Kangho Kim <kh5325.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.util;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * ValidationUtil.
+ *
+ * Verification Using a regular expression.
+ *
+ * @author Changhyun Lee {@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public class ValidationUtil {
+
+    /**
+     * Check for Email address. RFC 2822 (simplified)Matches a normal email address. Does not check the top-level domain.
+     *
+     * @param value email string
+     *
+     * @return if value is valied email
+     */
+    public static boolean checkForEmail(String value) {
+        String regex = "[A-Za-z0-9!#$%&\'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])??"; //$NON-NLS-1$
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(value);
+
+        return matcher.matches();
+    }
+
+    /**
+     * Check for URL string.
+     *
+     * @param value url string
+     *
+     * @return if value is valied url
+     */
+    public static boolean checkForURL(String value) {
+        String regex = "\\b(https?)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]"; //$NON-NLS-1$
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(value);
+
+        return matcher.matches();
+    }
+
+    /**
+     * Check for File extension.
+     *
+     * @param value file name
+     * @param extensions valied file extensions
+     *
+     * @return if value is valied file
+     */
+    public static boolean checkForFileExtension(String value, String[] extensions) {
+        if (StringUtil.isEmpty(value) || extensions == null) {
+            return false;
+        }
+
+        for (String ext : extensions) {
+            if (value.endsWith(ext)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Check for version. The version should be (x.y.z) formate where 0<=x<=35, 0<=y<=35, 0<=z<=1295.
+     * 
+     * @param version
+     * @return if version is valied
+     */
+    public static boolean checkForVersion(String version) {
+        if (version == null) {
+            return false;
+        }
+
+        String strVersion = version.trim();
+        if (strVersion.isEmpty() || !strVersion.matches("^\\d+\\.\\d+\\.\\d+$") || strVersion.equals("0.0.0")) {
+            return false;
+        }
+
+        String[] digits = strVersion.split("\\.");
+        if (Integer.parseInt(digits[0])>35) {
+            return false;
+        }
+        if (Integer.parseInt(digits[1])>35) {
+            return false;
+        }
+        if (Integer.parseInt(digits[2])>1295) {
+            return false;
+        }
+
+        return true;
+    }
+
+}
index 05a3ae5..1bb30fb 100644 (file)
@@ -25,7 +25,6 @@
 package org.tizen.common.util;
 
 import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.swt.widgets.Display;
 import org.eclipse.ui.IViewPart;
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPage;
@@ -41,9 +40,9 @@ public class ViewUtil {
         ViewRunnable runnable = new ViewRunnable(id);
 
         if (sync) {
-            Display.getDefault().syncExec(runnable);
+               SWTUtil.syncExec( runnable );
         } else {
-            Display.getDefault().asyncExec(runnable);
+               SWTUtil.asyncExec( runnable );
         }
     }
 
@@ -94,15 +93,17 @@ public class ViewUtil {
     }
 
     public static IWorkbenchWindow getWorkbenchWindow() {
-        IWorkbench workbench = PlatformUI.getWorkbench();
-        IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
-        if (window == null) {
-            if (workbench.getWorkbenchWindowCount() == 1) {
-                window = workbench.getWorkbenchWindows()[0];
-            }
+        final IWorkbench workbench = PlatformUI.getWorkbench();
+        final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+        if ( window != null )
+        {
+               return window;
         }
-
-        return window;
+        if ( workbench.getWorkbenchWindowCount() == 0 )
+        {
+               return null;
+        }
+        return workbench.getWorkbenchWindows()[0];
     }
 
-}
\ No newline at end of file
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/ZipUtil.java b/org.tizen.common/src/org/tizen/common/util/ZipUtil.java
new file mode 100644 (file)
index 0000000..4e0cc7c
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+/**
+ * <p>
+ * ZipUtil
+ * 
+ * Helper related to <code>zip</code>
+ * </p>
+ * 
+ * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ */
+public class ZipUtil {
+
+    /**
+     * get content string inside zip file
+     * 
+     * @param path - zip file path
+     * @param name - content filename inside zip file
+     * 
+     * @return content string, null if not found
+     * 
+     * @throws IOException
+     */
+    public static String getContent( String path, String name ) throws IOException {
+        if ( StringUtil.isEmpty( path ) || StringUtil.isEmpty( name ) ) {
+            return null;
+        }
+
+        String fullpath = FilenameUtil.getCanonicalPath( path );
+        if ( StringUtil.isEmpty( fullpath ) ) {
+            return null;
+        }
+
+        ZipFile zipfile = new ZipFile( fullpath );
+        ZipEntry entry = zipfile.getEntry( name );
+        if ( entry == null ) {
+            return null;
+        }
+
+        InputStream in = zipfile.getInputStream( entry );
+        return IOUtil.getString( in, true );
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/cache/ColorCache.java b/org.tizen.common/src/org/tizen/common/util/cache/ColorCache.java
new file mode 100644 (file)
index 0000000..3704dc5
--- /dev/null
@@ -0,0 +1,93 @@
+/*\r
+*  Common\r
+*\r
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: \r
+* Changhyun Lee <changhyun1.lee@samsung.com>\r
+* Kangho Kim <kh5325.kim@samsung.com>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+* Contributors:\r
+* - S-Core Co., Ltd\r
+*\r
+*/\r
+package org.tizen.common.util.cache;\r
+\r
+import java.util.HashMap;\r
+import java.util.Map;\r
+\r
+import org.eclipse.swt.graphics.Color;\r
+import org.eclipse.swt.graphics.RGB;\r
+import org.eclipse.swt.widgets.Widget;\r
+import org.tizen.common.util.SWTUtil;\r
+\r
+/**\r
+ * Class for caching colors\r
+ * \r
+ * @author Emil\r
+ *\r
+ */\r
+public final class ColorCache {\r
+\r
+    public static final RGB BLACK = new RGB(0, 0, 0);\r
+    public static final RGB WHITE = new RGB(255, 255, 255);\r
+\r
+    private static Map<RGB, Color> _colorTable = new HashMap<RGB, Color>();\r
+\r
+    private ColorCache() {\r
+    }\r
+\r
+    /**\r
+     * Disposes of all colors. DO ONLY CALL THIS WHEN YOU ARE SHUTTING DOWN YOUR\r
+     * APPLICATION!\r
+     */\r
+    synchronized public static void disposeColors() {\r
+       SWTUtil.tryDispose( _colorTable.values().toArray( new Widget[0]) );\r
+\r
+        _colorTable.clear();\r
+    }\r
+\r
+    public static Color getWhite() {\r
+        return getColorFromRGB(new RGB(255, 255, 255));\r
+    }\r
+\r
+    public static Color getBlack() {\r
+        return getColorFromRGB(new RGB(0, 0, 0));\r
+    }\r
+\r
+    synchronized public static Color getColorFromRGB(RGB rgb) {\r
+        Color color = _colorTable.get(rgb);\r
+\r
+        if (color == null) {\r
+            color = new Color( SWTUtil.getDisplay(), rgb);\r
+            _colorTable.put(rgb, color);\r
+        }\r
+\r
+        return color;\r
+    }\r
+\r
+    synchronized public static Color getColor(int r, int g, int b) {\r
+        RGB rgb = new RGB(r, g, b);\r
+        Color color = _colorTable.get(rgb);\r
+\r
+        if (color == null) {\r
+            color = new Color( SWTUtil.getDisplay(), rgb);\r
+            _colorTable.put(rgb, color);\r
+        }\r
+\r
+        return color;\r
+    }\r
+    \r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/util/cache/FontCache.java b/org.tizen.common/src/org/tizen/common/util/cache/FontCache.java
new file mode 100755 (executable)
index 0000000..ec303fd
--- /dev/null
@@ -0,0 +1,196 @@
+/*\r
+*  Common\r
+*\r
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: \r
+* Changhyun Lee <changhyun1.lee@samsung.com>\r
+* Kangho Kim <kh5325.kim@samsung.com>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+* Contributors:\r
+* - S-Core Co., Ltd\r
+*\r
+*/\r
+package org.tizen.common.util.cache;\r
+\r
+import static org.tizen.common.util.ArrayUtil.pickupFirst;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.eclipse.swt.graphics.Font;\r
+import org.eclipse.swt.graphics.FontData;\r
+import org.eclipse.swt.widgets.Widget;\r
+import org.tizen.common.util.SWTUtil;\r
+\r
+/**\r
+ * Caching class for fonts. Also deals with re-creating fonts should they have been disposed when the \r
+ * caller asks for a font.\r
+ * \r
+ * @author Emil\r
+ *\r
+ */\r
+public class FontCache {\r
+\r
+    private static List<OneFont> _existing = new ArrayList<OneFont>();\r
+\r
+    /**\r
+     * Disposes all fonts and clears out the cache. Never call this unless you are shutting down your \r
+     * code/client/etc.\r
+     */\r
+    synchronized public static void disposeAll() {\r
+       SWTUtil.tryDispose( _existing.toArray( new Widget[0] ) );\r
+\r
+        _existing.clear();\r
+    }\r
+\r
+    /**\r
+     * Gets a font from existing FontData\r
+     * \r
+     * @param fd FontData\r
+     * @return Font or null on error\r
+     */\r
+    synchronized public static Font getFont(FontData fd) {\r
+        if ( null == fd )\r
+        {\r
+            return null;\r
+        }\r
+        boolean disposed = false;\r
+        OneFont toRemove = null;\r
+        for (OneFont of : _existing) {\r
+            if (of.matches(fd)) {\r
+                if (of.getFont().isDisposed()) {\r
+                    disposed = true;\r
+                    toRemove = of;\r
+                    break;\r
+                }\r
+\r
+                return of.getFont(); \r
+            }\r
+        }\r
+        if (disposed) {\r
+            _existing.remove(toRemove);\r
+        }\r
+\r
+        OneFont of = new OneFont(fd);\r
+        _existing.add(of);\r
+        return of.getFont();\r
+    }\r
+\r
+    synchronized public static int getCount() {\r
+        return _existing.size();\r
+    }\r
+\r
+    /**\r
+     * Gets a font from an existing fonts data.\r
+     * \r
+     * @param font Font\r
+     * @return Font or null on error\r
+     */\r
+    public static Font getFont(Font font) {\r
+        if (font == null || font.isDisposed())\r
+        {\r
+            return null;\r
+        }\r
+\r
+        FontData fd = pickupFirst( font.getFontData() );\r
+        return getFont(fd);\r
+    }\r
+\r
+    /**\r
+     * Gets a font for a given font name and style.\r
+     * \r
+     * @param fontName Name of font\r
+     * @param height Height of font\r
+     * @param style Style of font\r
+     * @return Font or null on error\r
+     */\r
+    synchronized public static Font getFont(String fontName, int height, int style) {\r
+        if ( null == fontName )\r
+        {\r
+            return null;\r
+        }\r
+        boolean disposed = false;\r
+        OneFont toRemove = null;\r
+        for (OneFont of : _existing) {\r
+            if (of.getName().equals(fontName) && of.getHeight() == height && of.getStyle() == style) {\r
+                if (of.getFont().isDisposed()) {\r
+                    disposed = true;\r
+                    toRemove = of;\r
+                    break;\r
+                }\r
+                return of.getFont();\r
+            }\r
+        }\r
+        if (disposed) {\r
+            _existing.remove(toRemove);\r
+        }\r
+\r
+        OneFont of = new OneFont(fontName, height, style);\r
+        _existing.add(of);\r
+        return of.getFont();\r
+    }\r
+}\r
+\r
+class OneFont {\r
+\r
+    private String _name;\r
+    private int    _height;\r
+    private int    _style;\r
+    private Font   _font;\r
+\r
+    public OneFont(String name, int height, int style) {\r
+        _name = name;\r
+        _height = height;\r
+        _style = style;\r
+        _font = new Font( SWTUtil.getDisplay(), name, height, style);\r
+    }\r
+\r
+    public OneFont(FontData fd) {\r
+        _name = fd.getName();\r
+        _height = fd.getHeight();\r
+        _style = fd.getStyle();\r
+        _font = new Font( SWTUtil.getDisplay(), fd);\r
+    }\r
+\r
+    public String getName() {\r
+        return _name;\r
+    }\r
+\r
+    public int getHeight() {\r
+        return _height;\r
+    }\r
+\r
+    public int getStyle() {\r
+        return _style;\r
+    }\r
+\r
+    public void setFont(Font font) {\r
+        _font = font;\r
+    }\r
+\r
+    public Font getFont() {\r
+        return _font;\r
+    }\r
+\r
+    public boolean matches(FontData fd) {\r
+        return (fd.getName().equals(_name) && fd.getHeight() == _height && fd.getStyle() == _style);\r
+    }\r
+\r
+    @Override\r
+    public String toString() {\r
+        return "Font: " + _name + " " + _height + " " + _style;\r
+    }\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/util/cache/ImageCache.java b/org.tizen.common/src/org/tizen/common/util/cache/ImageCache.java
new file mode 100644 (file)
index 0000000..7789919
--- /dev/null
@@ -0,0 +1,108 @@
+/*\r
+ *  Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Changhyun Lee <changhyun1.lee@samsung.com>\r
+ * Kangho Kim <kh5325.kim@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.util.cache;\r
+\r
+import java.io.InputStream;\r
+import java.util.HashMap;\r
+\r
+import org.eclipse.swt.graphics.Image;\r
+import org.eclipse.swt.widgets.Widget;\r
+import org.tizen.common.util.IOUtil;\r
+import org.tizen.common.util.SWTUtil;\r
+\r
+/**\r
+ * Class for caching images\r
+ * \r
+ * @author Emil\r
+ */\r
+public class ImageCache {\r
+\r
+       // what path to get to the "icons" directory without actually including it\r
+       private static final String           ICON_ROOT_PATH = "icons/";\r
+\r
+       private final static HashMap<String, Image> _ImageMap = new HashMap<String, Image>();\r
+\r
+       /**\r
+        * Returns an image that is also cached if it has to be created and does not already exist in the cache.\r
+        * \r
+        * @param fileName Filename of image to fetch\r
+        * @return Image null if it could not be found\r
+        */\r
+       public static Image getImage(String fileName) {\r
+               fileName = ICON_ROOT_PATH + fileName;\r
+               Image image = _ImageMap.get(fileName);\r
+               if (image == null) {\r
+                       image = createImage(fileName);\r
+                       _ImageMap.put(fileName, image);\r
+               }\r
+               return image;\r
+       }\r
+\r
+       /**\r
+        * creates the image, and tries really hard to do so\r
+        * \r
+        * FIXME : substring is not exact expression to remove leading '/'\r
+        * \r
+        * @param fileName image file name\r
+        * \r
+        * @return loaded <code>Image</code>\r
+        */\r
+       synchronized private static Image createImage(String fileName) {\r
+               ClassLoader classLoader = ImageCache.class.getClassLoader();\r
+               InputStream is = classLoader.getResourceAsStream(fileName);\r
+               try\r
+               {\r
+                       if (is == null) {\r
+                               // the old way didn't have leading slash, so if we can't find the image stream,\r
+                               // let's see if the old way works.\r
+                               is = classLoader.getResourceAsStream(fileName.substring(1));\r
+                       }\r
+                       if (is == null) {\r
+                               is = classLoader.getResourceAsStream(fileName);\r
+                               if (is == null) {\r
+                                       is = classLoader.getResourceAsStream(fileName.substring(1));\r
+                                       if (is == null) { return null; }\r
+                               }\r
+                       }\r
+\r
+                       return new Image( SWTUtil.getDisplay(), is);\r
+               }\r
+               finally\r
+               {\r
+                       IOUtil.tryClose( is );\r
+               }\r
+       }\r
+\r
+       /**\r
+        * Disposes ALL images that have been cached.\r
+        */\r
+       synchronized public static void dispose() {\r
+\r
+               SWTUtil.tryDispose( _ImageMap.values().toArray( new Widget[0]) );\r
+               _ImageMap.clear();\r
+\r
+       }\r
+}\r
diff --git a/org.tizen.common/src/org/tizen/common/util/cache/NamedColorCache.java b/org.tizen.common/src/org/tizen/common/util/cache/NamedColorCache.java
new file mode 100755 (executable)
index 0000000..681654f
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util.cache;
+
+import static org.tizen.common.util.SWTUtil.tryDispose;
+
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.RGB;
+import org.tizen.common.util.Assert;
+import org.tizen.common.util.SWTUtil;
+
+public class NamedColorCache {
+       private String[] keys;
+       private Color[] colors;
+       
+       public NamedColorCache(String[] keys){
+               Assert.notEmpty( keys, "Argument must not be null" );
+               
+               this.keys = keys;
+               this.colors = new Color[keys.length];
+       }
+       
+       private int getIndex(String key){
+               int index = -1;
+               for(int i=0;i<keys.length;i++){
+                       if(key!=null&&key.equals(keys[i])){
+                               index = i;
+                               break;
+                       }
+               }
+               return index;
+       }
+       
+       public Color getColor(String key){
+               int index = getIndex(key);
+               if(index<0){
+                       return null;
+               }else{
+                       return colors[index];
+               }
+       }
+       
+       public void setColor(String key, RGB rgb){
+               int index = getIndex(key);
+               if(index<0)
+               {
+                       return;
+               }
+               
+               tryDispose( colors[index] );
+               colors[index] = new Color( SWTUtil.getDisplay(), rgb );
+       }
+       
+       public void dispose(){
+           tryDispose( colors );
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/io/Buffer.java b/org.tizen.common/src/org/tizen/common/util/io/Buffer.java
new file mode 100755 (executable)
index 0000000..ecbd4ba
--- /dev/null
@@ -0,0 +1,505 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util.io;
+
+import java.io.Closeable;
+import java.io.EOFException;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.channels.SocketChannel;
+import java.util.LinkedList;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <p>
+ * Buffer.
+ * 
+ * Buffer for high performance input / output
+ * 
+ * No synchronized and no retention
+ * 
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+Buffer
+implements Closeable
+{
+
+       /**
+        * Logger for this instance
+        */
+       protected Logger logger = LoggerFactory.getLogger( getClass() );
+
+       /**
+        * Pool for {@link ByteBuffer}
+        * @see BufferPool
+        */
+       protected BufferPool pool;
+
+       /**
+        * Used buffers
+        */
+       protected LinkedList<ByteBuffer> useds = new LinkedList<ByteBuffer>();
+
+       /**
+        * in-using read buffer
+        */
+       protected ByteBuffer readBuffer;
+
+       /**
+        * in-using write buffer
+        */
+       protected ByteBuffer writeBuffer;
+
+
+       /**
+        * in-using buffer
+        */
+       protected LinkedList<ByteBuffer> usings = new LinkedList<ByteBuffer>();
+
+       /**
+        * bytes to be read
+        */
+       protected int nReaded = 0;
+
+       /**
+        * total buffer size
+        */
+       protected int size = 0;
+
+       /**
+        * buffer index
+        */
+       protected int index;
+
+       /**
+        * Constructor with {@link BufferPool}
+        * 
+        * @param pool {@link BufferPool}
+        */
+       public
+       Buffer(
+               final BufferPool pool
+       )
+       {
+               this.pool = pool;
+       }
+
+       /**
+        * <p>
+        * Return contents' size in buffer
+        * </p>
+        * 
+        * @return contents' size
+        */
+       public
+       int
+       size()
+       {
+               return this.size;
+       }
+
+       /**
+        * <p>
+        * Return the number of buffer
+        * </p>
+        * @return the number of {@link ByteBuffer}
+        */
+       public
+       int
+       getBufferSize()
+       {
+               return useds.size() + usings.size() + ( ( null == readBuffer )?0:1 ) + ( ( null == writeBuffer )?0:1 );
+       }
+
+       /**
+        * Return in-using {@link ByteBuffer} for writing
+        * 
+        * @return in-using buffer
+        * 
+        * @throws IOException When new buffer can't be created
+        */
+       public
+       ByteBuffer
+       getBufferForWrite()
+       throws IOException
+       {
+               if ( null == writeBuffer )
+               {
+                       writeBuffer = pool.borrow();
+               }
+               else if ( writeBuffer.remaining() <= 0 )
+               {
+                       writeBuffer.flip();
+                       usings.addLast( writeBuffer );
+                       writeBuffer = pool.borrow();
+               }
+
+               return writeBuffer;
+       }
+
+       /**
+        * Return in-using {@link ByteBuffer} for reading
+        * 
+        * @return in-using buffer
+        * 
+        * @throws IOException reserved
+        */
+       public
+       ByteBuffer
+       getBufferForRead()
+       throws IOException
+       {
+               if ( null != readBuffer && 0 == readBuffer.remaining() )
+               {
+                       readBuffer.position( 0 );
+                       useds.add( readBuffer );
+                       readBuffer = null;
+               }
+
+               if ( null == readBuffer )
+               {
+                       if ( usings.isEmpty() )
+                       {
+                               if ( null != writeBuffer )
+                               {
+                                       readBuffer = writeBuffer;
+                                       readBuffer.flip();
+                                       writeBuffer = null;
+                               }
+                               else
+                               {
+                                       return null;
+                               }
+                       }
+                       else
+                       {
+                               readBuffer = usings.removeFirst();
+                       }
+               }
+
+               return readBuffer;
+       }
+
+       /**
+        * Read bytes from <code>channel</code>
+        * 
+        * @param channel {@link SocketChannel}
+        * 
+        * @return the number character to read
+        * 
+        * @throws IOException When buffer is NOT available
+        */
+       public
+       int
+       readFrom(
+               final SocketChannel channel
+       )
+       throws IOException
+       {
+               int sum = 0;
+               int nCnt = 0;
+               while ( true )
+               {
+                       final ByteBuffer buffer = getBufferForWrite();
+                       int nRead = channel.read( buffer );
+                       if ( nRead < 0 )
+                       {
+                               throw new EOFException();
+                       }
+                       else if ( 0 == nRead )
+                       {
+                               this.size += sum;
+                               if ( 0 < sum )
+                               {
+                                       logger.info( "{} bytes[{}] read from {}", new Object[] { sum, nCnt, channel } );
+                               }
+                               return sum;
+                       }
+                       sum += nRead;
+                       ++nCnt;
+               }
+       }
+
+
+       /**
+        * Write all contents to <code>channel</code>
+        * 
+        * @param channel {@link SocketChannel}
+        * 
+        * @return the number of bytes to write
+        * 
+        * @throws IOException When buffer is NOT available
+        */
+       public
+       int
+       writeTo(
+               final SocketChannel channel
+       ) throws IOException
+       {
+               int sum = 0;
+
+               while ( 0 < size )
+               {
+                       final ByteBuffer buffer = getBufferForRead();
+                       final int nWrite = channel.write( buffer );
+                       if ( 0 < nWrite )
+                       {
+                               this.size -= nWrite;
+                               sum += nWrite;
+                       }
+               }
+
+               nReaded += sum;
+
+               logger.info( "Send {} bytes to {}", sum, channel );
+
+               return sum;
+       }
+
+       /**
+        * Read and return a byte character from buffer
+        * 
+        * @return character to read
+        * 
+        * @throws IOException When buffer is NOT available
+        */
+       public
+       int
+       read()
+       throws IOException
+       {
+               final ByteBuffer buffer = getBufferForRead();
+               if ( null == buffer )
+               {
+                       return -1;
+               }
+
+               int ch = (int) ( 0xFF & buffer.get() );
+               --size;
+               ++nReaded;
+
+               return ch;
+       }
+
+       /**
+        * Read integer from buffer
+        * 
+        * @return integer to read
+        * 
+        * @throws IOException When buffer is NOT available
+        */
+       public
+       int
+       readInt() throws IOException
+       {
+               int i1 = read();
+               int i2 = read();
+               int i3 = read();
+               int i4 = read();
+
+               return ( (int) 0xFF & i1 ) << 24 | ( (int) 0xFF & i2 ) << 16 | ( (int) 0xFF & i3 ) << 8 | ( (int) 0xFF & i4 );
+       }
+
+       /**
+        * Write a byte character to buffer
+        * 
+        * @param value character to write
+        * 
+        * @throws IOException When buffer is NOT available
+        */
+       public
+       void
+       write( final int value ) throws IOException
+       {
+               final ByteBuffer buffer = getBufferForWrite();
+               buffer.put( (byte) value );
+               ++size;
+       }
+
+       /**
+        * Write <code>bytes</code> to buffer
+        * 
+        * @param bytes contents to write
+        * 
+        * @throws IOException When buffer is NOT available
+        */
+       public
+       void
+       write( final byte[] bytes ) throws IOException
+       {
+               for ( int i = 0, n = bytes.length ; i < n ; )
+               {
+                       final ByteBuffer buffer = getBufferForWrite();
+                       final int remaingSize = buffer.remaining();
+                       final int writeSize = Math.min( remaingSize, bytes.length - i );
+                       buffer.put( bytes, i, writeSize );
+                       i += writeSize;
+               }
+       }
+
+       /**
+        * Write integer to buffer
+        * 
+        * @param value integer to write
+        * 
+        * @throws IOException When buffer is NOT available
+        */
+       public
+       void
+       writeInt(
+               final int value
+       )
+       throws IOException
+       {
+               write( 0xFF & ( value >> 24 ) );
+               write( 0xFF & ( value >> 16 ) );
+               write( 0xFF & ( value >> 8 ) );
+               write( 0xFF & ( value ) );
+       }
+
+       /**
+        * Reset using resource( buffer, index, ...etc )
+        */
+       public
+       void
+       reset()
+       {
+               if ( null != readBuffer )
+               {
+                       readBuffer.position();
+                       useds.add( readBuffer );
+               }
+
+               useds.addAll( usings );
+
+               if ( null != writeBuffer )
+               {
+                       writeBuffer.flip();
+                       useds.add( writeBuffer );
+                       writeBuffer = null;
+               }
+
+               usings = useds;
+               useds = new LinkedList<ByteBuffer>();
+               size += nReaded;
+               nReaded = 0;
+       }
+
+       /**
+        * Pack unused resource
+        * 
+        * @throws IOException When {@link ByteBuffer} can't be release
+        */
+       synchronized public
+       void
+       pack() throws IOException
+       {
+               for ( final ByteBuffer buffer : useds )
+               {
+                       nReaded -= buffer.remaining();
+                       pool.release( buffer );
+               }
+
+               useds.clear();
+       }
+
+       /* (non-Javadoc)
+        * @see java.io.Closeable#close()
+        */
+       synchronized public
+       void
+       close()
+       throws IOException
+       {
+               if ( null != readBuffer )
+               {
+                       pool.release( readBuffer );
+                       readBuffer = null;
+               }
+               for ( final ByteBuffer buffer : usings )
+               {
+                       pool.release( buffer );
+               }
+               usings.clear();
+               if ( null != writeBuffer )
+               {
+                       pool.release( writeBuffer );
+                       writeBuffer = null;
+               }
+
+               for ( final ByteBuffer buffer : useds )
+               {
+                       pool.release( buffer );
+               }
+
+               useds.clear();
+       }
+       
+       /**
+        * Concatencate buffers
+        * 
+        * @param buffers {@link Buffer}s to concatenate
+        * 
+        * @return {@link Buffer} to be concatenate
+        */
+       public static
+       Buffer
+       concatenate(
+               final Buffer... buffers
+       )
+       {
+               final Buffer ret = new Buffer( null );
+               boolean bInit = false;
+               for ( final Buffer buffer : buffers )
+               {
+                       if ( bInit && ret.pool != buffer.pool )
+                       {
+                               throw new IllegalArgumentException( "Unmatching buffer pool" );
+                       }
+                       ret.pool = buffer.pool;
+                       bInit = true;
+
+                       buffer.reset();
+                       ret.usings.addAll( buffer.usings );
+                       ret.size += buffer.size;
+               }
+
+               return ret;
+       }
+
+       /* (non-Javadoc)
+        * @see java.lang.Object#toString()
+        */
+       public String toString()
+       {
+               return "Buffer[" + size + "]";
+       }
+}
+
diff --git a/org.tizen.common/src/org/tizen/common/util/io/BufferInputStream.java b/org.tizen.common/src/org/tizen/common/util/io/BufferInputStream.java
new file mode 100755 (executable)
index 0000000..3b2e315
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util.io;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.ByteBuffer;
+
+import org.tizen.common.util.Assert;
+
+/**
+ * <p>
+ * BufferInputStream.
+ * 
+ * {@link InputStream} to use {@link Buffer}
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see Buffer
+ */
+public class
+BufferInputStream
+extends InputStream
+{
+       /**
+        * buffer to store bytes
+        */
+       protected final Buffer buffer;
+
+       /**
+        * Constructor with buffer
+        * 
+        * @param buffer {@link ByteBuffer}
+        */
+       public
+       BufferInputStream(
+               final Buffer buffer
+       )
+       {
+           Assert.notNull( buffer );
+               this.buffer = buffer;
+       }
+
+       /* (non-Javadoc)
+        * @see java.io.InputStream#read()
+        */
+       @Override
+       public
+       int
+       read()
+       throws IOException
+       {
+               return buffer.read();
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/io/BufferOutputStream.java b/org.tizen.common/src/org/tizen/common/util/io/BufferOutputStream.java
new file mode 100755 (executable)
index 0000000..cf3c571
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util.io;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.tizen.common.util.Assert;
+
+/**
+ * <p>
+ * BufferOutputStream.
+ * 
+ * {@link OutputStream} to use {@link Buffer}
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see Buffer
+ */
+public class
+BufferOutputStream
+extends OutputStream
+{
+       /**
+        * buffer to store bytes
+        */
+       protected Buffer buffer;
+
+       /**
+        * Constructor with buffer
+        * 
+        * @param buffer {@link Buffer}
+        */
+       public
+       BufferOutputStream(
+               final Buffer buffer
+       )
+       {
+        Assert.notNull( buffer );
+               this.buffer = buffer;
+       }
+       
+       /**
+        * Return internal buffer
+        * 
+        * @return {@link Buffer}
+        */
+       public
+       Buffer
+       getBuffer()
+       {
+               return this.buffer;
+       }
+
+       /* (non-Javadoc)
+        * @see java.io.OutputStream#write(int)
+        */
+       @Override
+       public
+       void
+       write(
+               final int b
+       )
+       throws IOException
+       {
+               buffer.write( b );
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/io/BufferPool.java b/org.tizen.common/src/org/tizen/common/util/io/BufferPool.java
new file mode 100755 (executable)
index 0000000..ee6d938
--- /dev/null
@@ -0,0 +1,248 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util.io;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.LinkedList;
+
+import org.apache.commons.lang3.ObjectUtils;
+import org.apache.commons.pool.BasePoolableObjectFactory;
+import org.apache.commons.pool.ObjectPool;
+import org.apache.commons.pool.impl.GenericObjectPoolFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * <p>
+ * BufferPool.
+ * 
+ * Pool for {@link Buffer}
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ */
+public class
+BufferPool
+implements Closeable
+{
+
+       /**
+        * The default number of buffer fragments
+        */
+       protected static final int N_CREATION = 1024;
+
+       /**
+        * Buffer fragment's  default size
+        */
+       protected static final int BUFFER_SIZE = 256;
+
+       /**
+        * Logger for this instance
+        */
+       protected final Logger logger = LoggerFactory.getLogger( getClass() );
+
+       /**
+        * The number of buffer fragements to create
+        */
+       protected int nCreation = N_CREATION;
+
+       /**
+        * Buffer fragement's size
+        */
+       protected int bufferSize = BUFFER_SIZE;
+
+       /**
+        * Set the number of fragment
+        * 
+        * @param nCreation the number of fragment
+        */
+       public
+       void
+       setNumberOfFragments(
+               final int nCreation
+       )
+       {
+               this.nCreation = nCreation;
+       }
+
+       /**
+        * Set buffer fragment's size
+        * @param bufferSize buffer fargement's size
+        */
+       public
+       void
+       setSizeOfFragment(
+               final int bufferSize
+       )
+       {
+               this.bufferSize = bufferSize;
+       }
+
+       /**
+        * Pool for {@link ByteBuffer}
+        */
+       protected final ObjectPool<ByteBuffer> bufferPool =
+               new GenericObjectPoolFactory<ByteBuffer>( new BasePoolableObjectFactory<ByteBuffer>() {
+
+                       protected final LinkedList<ByteBuffer> buffers = new LinkedList<ByteBuffer>();
+
+                       /* (non-Javadoc)
+                        * @see org.apache.commons.pool.BasePoolableObjectFactory#makeObject()
+                        */
+                       @Override
+                       public
+                       ByteBuffer
+                       makeObject()
+                       throws Exception
+                       {
+                               logger.trace( "{} buffer(s) exist", buffers.size() );
+                               if ( !buffers.isEmpty() )
+                               {
+                                       return buffers.removeFirst();
+                               }
+
+                               final long startTime = System.currentTimeMillis();
+                               final int totalSize = nCreation * bufferSize;
+
+                               final ByteBuffer totalBuffer = ByteBuffer.allocateDirect( totalSize );
+
+                               for ( int limit = bufferSize ; limit <= totalSize ; limit += bufferSize )
+                               {
+                                       totalBuffer.limit( limit );
+                                       buffers.add( totalBuffer.slice() );
+                                       totalBuffer.position( limit );
+                               }
+
+                               final long endTime = System.currentTimeMillis();
+                               logger.info( "Buffer creation time :{} ms", ( endTime - startTime ) );
+
+                               return buffers.removeFirst();
+                       }
+
+
+                       /* (non-Javadoc)
+                        * @see org.apache.commons.pool.BasePoolableObjectFactory#activateObject(java.lang.Object)
+                        */
+                       public
+                       void
+                       activateObject(
+                               final ByteBuffer buffer
+                       )
+                       throws Exception
+                       {
+                               super.activateObject( buffer );
+
+                               buffer.clear();
+                       }
+                       
+               }, -1 ).createPool();
+
+       /**
+        * Pick-up and return {@link ByteBuffer} from pool
+        * 
+        * @return {@link ByteBuffer}
+        * 
+        * @throws IOException When {@link ByteBuffer} can't be created or available
+        */
+       public
+       ByteBuffer
+       borrow()
+       throws IOException
+       {
+               try
+               {
+                       return bufferPool.borrowObject();
+               }
+               catch (
+                       final Exception e
+               )
+               {
+                       throw new IOException( e );
+               }
+       }
+
+       /**
+        * Release buffer to pool
+        * 
+        * @param buffer {@link ByteBuffer} to release
+        * 
+        * @throws IOException When {@link ByteBuffer} can't be release
+        */
+       public
+       void
+       release(
+               final ByteBuffer buffer
+       ) throws IOException
+       {
+               try
+               {
+                       bufferPool.returnObject( buffer );
+               }
+               catch
+               (
+                       final Exception e
+               )
+               {
+                       throw new IOException( e );
+               }
+       }
+
+       /* (non-Javadoc)
+        * @see java.io.Closeable#close()
+        */
+       @Override
+       public
+       void
+       close()
+       throws IOException
+       {
+
+               try {
+                       bufferPool.close();
+               } catch (
+                       final Exception e
+               )
+               {
+                       throw new IOException( e );
+               }
+
+       }
+
+       /* (non-Javadoc)
+        * @see java.lang.Object#toString()
+        */
+       @Override
+       public
+       String
+       toString()
+       {
+               return ObjectUtils.toString( this );
+       }
+
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/log/Logger.java b/org.tizen.common/src/org/tizen/common/util/log/Logger.java
new file mode 100755 (executable)
index 0000000..83f368e
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Kangho Kim <kh5325.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util.log;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.tizen.common.CommonPlugin;
+import org.tizen.common.ui.view.console.ConsoleManager;
+
+
+/**
+ * Logger.
+ * @author Changhyun Lee {@literal <changhyun1.lee@samsung.com>} (S-Core)
+ */
+public class Logger {
+    private static String loggerName = Logger.class.getName();
+
+    public static void log(IStatus status) {
+        CommonPlugin plugin = CommonPlugin.getDefault();
+        if (plugin != null) {
+            plugin.getLog().log(status);
+        } else {
+            ConsoleManager conManager = new ConsoleManager("Error Log", false);
+            conManager.println(status.getPlugin() + " : " + status.getMessage());
+        }
+    }
+
+    private static String getCallerName() {
+        // Get the stack trace.
+        StackTraceElement stack[] = (new IllegalArgumentException()).getStackTrace();
+        int ix = 0;
+        // Now search for the first frame before the "Logger" class.
+        while (ix < stack.length) {
+            StackTraceElement frame = stack[ix];
+            String cname = frame.getClassName();
+            if (!cname.equals(loggerName)) {
+                return cname;
+            }
+            ix++;
+        }
+        return "noname";
+    }
+
+    public static void log(Throwable e) {
+        if (e instanceof CoreException) {
+            log(new Status(IStatus.ERROR, getCallerName(), ((CoreException) e).getStatus().getSeverity(), e.getMessage(), e.getCause()));
+        } else {
+            log(new Status(IStatus.ERROR, getCallerName(), e.toString(), e));
+        }
+    }
+    
+    public static void debug( String message, Object... arguments )
+    {
+       
+    }
+
+    public static void info(String message, Object... arguments) {
+        log(new Status(Status.INFO, getCallerName(), getPossiblyFormattedString(message, arguments)));
+    }
+
+    public static void error(Object message, Throwable t) {
+        log(new Status(Status.ERROR, getCallerName(), message.toString(), t));
+    }
+
+    public static void error(String message, Object... arguments) {
+        log(new Status(Status.ERROR, getCallerName(), getPossiblyFormattedString(message, arguments)));
+    }
+
+    public static void warning(String message, Object... arguments) {
+        log(new Status(Status.WARNING, getCallerName(), getPossiblyFormattedString(message, arguments)));
+    }
+
+    private static String getPossiblyFormattedString(String message, Object... arguments) {
+        return arguments.length > 0 ? MessageFormat.format(message, arguments)
+                                                  : message;
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/log/TizenLog4Configurator.java b/org.tizen.common/src/org/tizen/common/util/log/TizenLog4Configurator.java
new file mode 100644 (file)
index 0000000..93ff866
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Ho Namkoong <ho.namkoong@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.util.log;
+
+import java.io.InputStream;
+import java.net.URL;
+
+import org.apache.log4j.Appender;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.apache.log4j.spi.Configurator;
+import org.apache.log4j.spi.LoggerRepository;
+
+public class TizenLog4Configurator implements Configurator  {
+
+    @Override
+    public void doConfigure(InputStream arg0, LoggerRepository arg1) {
+        // TODO Auto-generated method stub
+    }
+
+    @Override
+    public void doConfigure(URL arg0, LoggerRepository arg1) {
+        arg1.resetConfiguration();
+        Logger rootLogger = arg1.getRootLogger();
+        rootLogger.setLevel(Level.WARN);
+        rootLogger.removeAllAppenders();
+        Appender tizenAppender = new TizenLog4jAppender();
+        rootLogger.addAppender(tizenAppender);
+    }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/log/TizenLog4jAppender.java b/org.tizen.common/src/org/tizen/common/util/log/TizenLog4jAppender.java
new file mode 100644 (file)
index 0000000..c492d9a
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Ho Namkoong <ho.namkoong@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.util.log;
+
+import org.apache.log4j.AppenderSkeleton;
+import org.apache.log4j.Level;
+import org.apache.log4j.spi.LoggingEvent;
+import org.apache.log4j.spi.ThrowableInformation;
+
+public class TizenLog4jAppender extends AppenderSkeleton{
+    
+    @Override
+    public void close() {
+        // TODO Auto-generated method stub
+        
+    }
+
+    @Override
+    public boolean requiresLayout() {
+        // TODO Auto-generated method stub
+        return false;
+    }
+
+    @Override
+    protected void append(LoggingEvent arg0) {
+        int level = arg0.getLevel().toInt();
+        ThrowableInformation tI = arg0.getThrowableInformation();
+        Throwable t = null;
+        if(tI != null) {
+            t = tI.getThrowable();
+        }
+        Object msg = arg0.getMessage();
+        String message = msg.toString();
+        
+        switch (level) {
+        case Level.ERROR_INT:
+            Logger.error(message, t);
+            break;
+        case Level.WARN_INT:
+            Logger.warning(message, t);
+            break;
+        case Level.DEBUG_INT:
+            Logger.debug(message, t);
+            break;
+        case Level.FATAL_INT:
+            Logger.error(message, t);
+            break;
+        case Level.INFO_INT:
+            Logger.info(message, t);
+            break;
+        default:
+            break;
+        }
+    }
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/url/classpath/Connection.java b/org.tizen.common/src/org/tizen/common/util/url/classpath/Connection.java
new file mode 100755 (executable)
index 0000000..f391e45
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util.url.classpath;
+
+import static org.tizen.common.util.StringUtil.removeLastSegment;
+import static org.tizen.common.util.StringUtil.trimLeadingCharacter;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.util.Assert;
+
+/**
+ * Connection.
+ * 
+ * {@link URLConnection} for classpath url
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+Connection
+extends URLConnection 
+{
+       
+       protected final Logger logger = LoggerFactory.getLogger( getClass() );
+       
+       protected String fqcn;
+       
+       protected URL internalUrl = null;
+
+       /**
+        * <p>
+        * Constructor with classpath url
+        * </p>
+        * 
+        * @param url url for resouce in classpath
+        */
+       protected Connection( final URL url, final String fqcn )
+       {
+               super( url );
+               
+               this.fqcn = fqcn;
+               logger.debug( "Fully qualified class name :{}", fqcn );
+       }
+       
+       /* (non-Javadoc)
+        * @see java.net.URLConnection#connect()
+        */
+       @Override
+       public
+       void
+       connect()
+       throws IOException
+       {
+               Assert.isNull( this.internalUrl );
+               
+               final String path = trimLeadingCharacter( getURL().getPath(), '/' );
+               
+               final Collection<ClassLoader> classLoaders = getClassLoaders();
+               logger.debug( "Classloaders :{}", classLoaders );
+               
+               for ( final ClassLoader cl : classLoaders )
+               {
+                       URL url = cl.getResource( path );
+                       logger.trace( "Check url for {} :{}", path, url );
+                       if ( null == url )
+                       {
+                               continue;
+                       }
+                       
+                       this.internalUrl = url;
+                       connected = true;
+                       return ;
+               }
+               
+               if ( null == fqcn )
+               {
+                       connected = true;
+                       return ;
+               }
+               
+               final String packageName = removeLastSegment( fqcn, "." );
+               final String fullPath = trimLeadingCharacter( packageName.replace( '.', '/' ), '/' ) + "/" + path;
+               logger.trace( "Package name :{}, Full path :{}", packageName, fullPath );
+               
+               for ( final ClassLoader cl : classLoaders )
+               {
+                       URL url = cl.getResource( fullPath );
+                       logger.trace( "Check url for {} :{}", fullPath, url );
+                       if ( null == url )
+                       {
+                               continue;
+                       }
+                       
+                       this.internalUrl = url;
+                       connected = true;
+                       return ;
+               }
+               
+       }
+       
+       /**
+        * <p>
+        * Return classloaders to provide resource<br>
+        * 
+        * ClassLoader is following
+        * <ul>
+        *      <li>Context ClassLoader</li>
+        *      <li>ClassLoader for this class</li>
+        *      <li>SystemClassLoader</li>
+        * </ul>
+        * </p>
+        * 
+        * @return {@link ClassLoader} candidate
+        */
+       protected Collection<ClassLoader> getClassLoaders()
+       {
+               final LinkedHashSet<ClassLoader> classLoaders = new LinkedHashSet<ClassLoader>();
+               
+               if ( null != Thread.currentThread().getContextClassLoader() )
+               {
+                       classLoaders.add( Thread.currentThread().getContextClassLoader() );
+               }
+               
+               classLoaders.add( Connection.class.getClassLoader() );
+               classLoaders.add( ClassLoader.getSystemClassLoader() );
+               
+               return classLoaders;
+       }
+
+       /* (non-Javadoc)
+        * @see java.net.URLConnection#getInputStream()
+        */
+       @Override
+       public
+       InputStream
+       getInputStream()
+       throws IOException
+       {
+               if ( !connected )
+               {
+                       connect();
+               }
+               if ( null == this.internalUrl )
+               {
+                       throw new IOException( "resource not found" );
+               }
+               logger.trace( "Open stream :{}", internalUrl );
+               
+               return internalUrl.openStream();
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/url/classpath/Handler.java b/org.tizen.common/src/org/tizen/common/util/url/classpath/Handler.java
new file mode 100644 (file)
index 0000000..b87d5ae
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util.url.classpath;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.util.ObjectUtil;
+
+/**
+ * Handler.
+ * 
+ * {@link URLStreamHandler} for classpath url
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+Handler
+extends URLStreamHandler
+{
+
+       
+       /**
+        * Logger of object
+        */
+       protected final Logger logger = LoggerFactory.getLogger( getClass() );
+
+       /**
+        * Full qualified class name of caller( exactly caller that call new URL() )
+        */
+       protected final String fqcnOfCaller;
+       
+       public Handler()
+       {
+               fqcnOfCaller = pickupCaller();
+       }
+       
+       protected String pickupCaller()
+       {
+               final StackTraceElement[] callStacks = new Exception().getStackTrace();
+               
+               boolean bUrl = false;
+               
+               for ( final StackTraceElement element : callStacks )
+               {
+                       logger.trace( "Check stack :{}", element );
+                       final String className = element.getClassName();
+                       logger.trace( "Class :{}", className );
+                       
+                       if ( ObjectUtil.equals( className, URL.class.getName() ) )
+                       {
+                               bUrl = true;
+                       }
+                       else if ( bUrl )
+                       {
+                               return className;
+                       }
+               }
+               
+               return null;
+       }
+
+
+       /* (non-Javadoc)
+        * @see java.net.URLStreamHandler#openConnection(java.net.URL)
+        */
+       @Override
+       protected
+       URLConnection
+       openConnection(
+               final URL u
+       )
+       throws IOException
+       {
+               return new Connection( u, fqcnOfCaller );
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/url/cp/Connection.java b/org.tizen.common/src/org/tizen/common/util/url/cp/Connection.java
new file mode 100644 (file)
index 0000000..7c13ac2
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util.url.cp;
+
+import java.net.URL;
+import java.net.URLConnection;
+
+/**
+ * Connection.
+ * 
+ * {@link URLConnection} for classpath url
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see org.tizen.common.util.url.classpath.Connection
+ */
+public class
+Connection
+extends org.tizen.common.util.url.classpath.Connection 
+{
+
+       /**
+        * Constructor with url
+        * 
+        * @param url {@link URL}
+        */
+       protected Connection( final URL url, final String fqcn )
+       {
+               super( url, fqcn );
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/url/cp/Handler.java b/org.tizen.common/src/org/tizen/common/util/url/cp/Handler.java
new file mode 100644 (file)
index 0000000..d2f9686
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util.url.cp;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+
+/**
+ * Handler.
+ * 
+ * {@link URLStreamHandler} for classpath url
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see org.tizen.common.util.url.classpath.Handler
+ */
+public class
+Handler
+extends org.tizen.common.util.url.classpath.Handler
+{
+
+       /* (non-Javadoc)
+        * @see java.net.URLStreamHandler#openConnection(java.net.URL)
+        */
+       @Override
+       protected
+       URLConnection
+       openConnection(
+               final URL u
+       )
+       throws IOException
+       {
+               return new Connection( u, fqcnOfCaller );
+       }
+
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/url/vf/Connection.java b/org.tizen.common/src/org/tizen/common/util/url/vf/Connection.java
new file mode 100755 (executable)
index 0000000..3630070
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util.url.vf;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLDecoder;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.file.VirtualFileHandler;
+
+/**
+ * Connection.
+ * 
+ * {@link URLConnection} for {@link VirtualFileHandler}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+Connection
+extends URLConnection 
+{
+
+       /**
+        * Virutal file handler to search
+        */
+       protected static VirtualFileHandler vfHandler = new VirtualFileHandler();
+       
+       /**
+        * Logger for this instance
+        */
+       protected final Logger logger = LoggerFactory.getLogger( getClass() );
+       
+       /**
+        * Return {@link VirtualFileHandler} to search
+        * 
+        * @return {@link #vfHandler}
+        */
+       public static
+       VirtualFileHandler
+       getVirtualFileHandler()
+       {
+               return vfHandler;
+       }
+       
+       /**
+        * Set {@link VirtualFileHandler} to search
+        * 
+        * @param vfHandler new {@link VirtualFileHandler}
+        */
+       public static
+       void
+       setVirtualFileHandler(
+               final VirtualFileHandler vfHandler
+       )
+       {
+               Connection.vfHandler = vfHandler;
+       }
+       
+       
+       
+       
+       /**
+        * Constructor with url
+        * 
+        * @param url {@link URL}
+        */
+       protected
+       Connection(
+               final URL url
+       )
+       {
+               super( url );
+               logger.trace( "URL :{}", url );
+       }
+
+       /* (non-Javadoc)
+        * @see java.net.URLConnection#connect()
+        */
+       @Override
+       public
+       void
+       connect()
+       throws IOException
+       {
+               logger.trace( "connect" );
+       }
+       
+       /* (non-Javadoc)
+        * @see java.net.URLConnection#getInputStream()
+        */
+       @SuppressWarnings("deprecation")
+    public
+       InputStream
+       getInputStream()
+       throws IOException
+       {
+               final String path = url.getPath();
+               logger.trace( "Path :{}", path );
+               return vfHandler.read( URLDecoder.decode( path ) );
+       }
+}
diff --git a/org.tizen.common/src/org/tizen/common/util/url/vf/Handler.java b/org.tizen.common/src/org/tizen/common/util/url/vf/Handler.java
new file mode 100644 (file)
index 0000000..95089ff
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util.url.vf;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.net.URLStreamHandler;
+
+/**
+ * Handler.
+ * 
+ * {@link URLStreamHandler} for classpath url
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see org.tizen.common.util.url.classpath.Handler
+ */
+public class
+Handler
+extends URLStreamHandler
+{
+       /* (non-Javadoc)
+        * @see java.net.URLStreamHandler#openConnection(java.net.URL)
+        */
+       @Override
+       protected
+       URLConnection
+       openConnection(
+               final URL u
+       )
+       throws IOException
+       {
+               return new Connection( u );
+       }
+
+}
diff --git a/org.tizen.common/test/lib/asm-4.0.jar b/org.tizen.common/test/lib/asm-4.0.jar
new file mode 100644 (file)
index 0000000..6d63075
Binary files /dev/null and b/org.tizen.common/test/lib/asm-4.0.jar differ
diff --git a/org.tizen.common/test/lib/asm-tree-4.0.jar b/org.tizen.common/test/lib/asm-tree-4.0.jar
new file mode 100644 (file)
index 0000000..aa99d3a
Binary files /dev/null and b/org.tizen.common/test/lib/asm-tree-4.0.jar differ
diff --git a/org.tizen.common/test/lib/javassist-3.16.1-GA.jar b/org.tizen.common/test/lib/javassist-3.16.1-GA.jar
new file mode 100755 (executable)
index 0000000..c29da0f
Binary files /dev/null and b/org.tizen.common/test/lib/javassist-3.16.1-GA.jar differ
diff --git a/org.tizen.common/test/lib/junit-4.10-src.jar b/org.tizen.common/test/lib/junit-4.10-src.jar
new file mode 100644 (file)
index 0000000..1449d28
Binary files /dev/null and b/org.tizen.common/test/lib/junit-4.10-src.jar differ
diff --git a/org.tizen.common/test/lib/junit-4.10.jar b/org.tizen.common/test/lib/junit-4.10.jar
new file mode 100644 (file)
index 0000000..bf5c0b9
Binary files /dev/null and b/org.tizen.common/test/lib/junit-4.10.jar differ
diff --git a/org.tizen.common/test/lib/mockito-all-1.9.0.jar b/org.tizen.common/test/lib/mockito-all-1.9.0.jar
new file mode 100644 (file)
index 0000000..273fd50
Binary files /dev/null and b/org.tizen.common/test/lib/mockito-all-1.9.0.jar differ
diff --git a/org.tizen.common/test/lib/powermock-mockito-1.4.12-full.jar b/org.tizen.common/test/lib/powermock-mockito-1.4.12-full.jar
new file mode 100755 (executable)
index 0000000..b70358d
Binary files /dev/null and b/org.tizen.common/test/lib/powermock-mockito-1.4.12-full.jar differ
diff --git a/org.tizen.common/test/src/log4j.xml b/org.tizen.common/test/src/log4j.xml
new file mode 100755 (executable)
index 0000000..1a2fc8f
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration PUBLIC "-//APACHE//DTD LOG4J 1.2//EN" "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+       <appender name="console" class="org.apache.log4j.ConsoleAppender">
+               <param name="Target" value="System.out" />
+               <layout class="org.apache.log4j.PatternLayout">
+                       <param name="ConversionPattern" value="[%p] %F(%L) - %m%n" />
+               </layout>
+       </appender>
+       
+    <logger name="org.tizen.common.util">
+        <level value="info" />
+    </logger>
+       
+    <logger name="org.tizen.common.verrari.util">
+        <level value="info" />
+    </logger>
+       
+       <root>
+               <level value="trace" />
+               <appender-ref ref="console" />
+       </root>
+</log4j:configuration>
\ No newline at end of file
diff --git a/org.tizen.common/test/src/org/tizen/common/AppIdGeneratorTest.java b/org.tizen.common/test/src/org/tizen/common/AppIdGeneratorTest.java
new file mode 100755 (executable)
index 0000000..63199df
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact:
+* ChangHyun Lee <changhyun1.lee@samsung.com>
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * AppIdGeneratorTest.
+ *
+ * Test case for {@link AppIdGenerator}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see AppIdGenerator
+ *
+ */
+public class AppIdGeneratorTest {
+
+    /**
+     * Test {@link AppIdGenerator#generate()}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link AppIdGenerator#create()}
+     */
+    @Test
+    public void test_create() throws Exception {
+        String id = AppIdGenerator.getInstance().create();
+        String id2 = AppIdGenerator.getInstance().create();
+        assertTrue(id.length() == 10);
+        assertTrue(id2.length() == 10);
+    }
+
+    /**
+     * Test {@link AppIdGenerator#generate(int size)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link AppIdGenerator#generate(int size)}
+     */
+    @Test
+    public void test_generate() throws Exception {
+        String id = AppIdGenerator.getInstance().generate(10);
+        String id2 = AppIdGenerator.getInstance().generate(11);
+        assertTrue(id.length() == 10);
+        assertTrue(id2.length() == 11);
+    }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/CommonPluginTest.java b/org.tizen.common/test/src/org/tizen/common/CommonPluginTest.java
new file mode 100755 (executable)
index 0000000..89f8410
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common;
+
+import static org.mockito.Matchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.tizen.common.FrequentlyUsedMatcher.doNotCare;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.junit.Test;
+import org.tizen.common.core.application.InstallPathConfig;
+import org.tizen.common.rds.ui.preference.RdsPreferencePage;
+import org.tizen.common.ui.page.preference.TizenBasePreferencePage;
+
+
+
+/**
+ * CommonPluginTest
+ *
+ * Test case for {@link CommonPlugin}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see CommonPlugin
+ */
+public class
+CommonPluginTest
+{
+       /**
+        * Test {@link CommonPlugin#initializeDefaultPreferences(IPreferenceStore)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see CommonPlugin#initializeDefaultPreferences(IPreferenceStore)
+        */
+       @Test
+       public void test_initializeDefaultPreferences() throws Exception
+       {
+               final CommonPlugin plugin = new CommonPlugin();
+               final IPreferenceStore preferenceStore = mock( IPreferenceStore.class );
+
+               plugin.initializeDefaultPreferences( preferenceStore );
+               
+               /*
+                * LookAtMe : Test with No argument specification
+                */
+               if ( null != InstallPathConfig.getSDKPath() )
+               {
+                       // in case of non-installed env.
+                       verify( preferenceStore ).setDefault(
+                               eq( TizenBasePreferencePage.KEY_SDKLOCATION ),
+                               (String) doNotCare()
+                       );
+               }
+               
+               verify( preferenceStore ).setDefault( TizenBasePreferencePage.KEY_SDKUPDATE, false );
+               verify( preferenceStore ).setDefault( RdsPreferencePage.RDS_OPTION_ID, RdsPreferencePage.RDS_MODE_DEFAULT );
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/FrequentlyUsedMatcher.java b/org.tizen.common/test/src/org/tizen/common/FrequentlyUsedMatcher.java
new file mode 100644 (file)
index 0000000..8a6a6c3
--- /dev/null
@@ -0,0 +1,94 @@
+package org.tizen.common;
+
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
+import org.mockito.Matchers;
+
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+public class FrequentlyUsedMatcher
+{
+       public static <T> T doNotCare()
+       {
+               return Matchers.argThat( new BaseMatcher<T>()
+               {
+                       public boolean matches( final Object arg )
+                       {
+                               return true;
+                       }
+                       
+                       public void describeTo( final Description desc )
+                       {
+                       }
+               } );
+       }
+       
+       public static <T> T eq( T type )
+       {
+               return Matchers.eq( type );
+       }
+
+       
+       public static boolean eq( boolean type )
+       {
+               return Matchers.eq( type );
+       }
+
+       public static byte eq( byte type )
+       {
+               return Matchers.eq( type );
+       }
+
+       public static char eq( char type )
+       {
+               return Matchers.eq( type );
+       }
+
+       public static double eq( double type )
+       {
+               return Matchers.eq( type );
+       }
+
+       public static float eq( float type )
+       {
+               return Matchers.eq( type );
+       }
+
+       public static int eq( int type )
+       {
+               return Matchers.eq( type );
+       }
+
+       public static long eq( long type )
+       {
+               return Matchers.eq( type );
+       }
+
+       public static short eq( short type )
+       {
+               return Matchers.eq( type );
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/Location.java b/org.tizen.common/test/src/org/tizen/common/Location.java
new file mode 100644 (file)
index 0000000..3a08e95
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common;
+
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * <p>
+ * Location.
+ * 
+ * Annotation for class path
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+@Retention( RetentionPolicy.RUNTIME )
+@Target({java.lang.annotation.ElementType.TYPE})
+@Inherited
+public @interface Location
+{
+       /**
+        * reeturn classpath
+        * 
+        * @return classpath
+        */
+       String[] value();
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/TestAgent.java b/org.tizen.common/test/src/org/tizen/common/TestAgent.java
new file mode 100644 (file)
index 0000000..dec11ba
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common;
+
+import java.lang.instrument.Instrumentation;
+
+public class
+TestAgent
+{
+       public static void premain(
+               final String name,
+               final Instrumentation inst
+       )
+       {
+               inst.addTransformer( new Transformer() );
+       }
+
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/Transformer.java b/org.tizen.common/test/src/org/tizen/common/Transformer.java
new file mode 100644 (file)
index 0000000..f99551e
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common;
+
+import java.lang.instrument.ClassFileTransformer;
+import java.lang.instrument.IllegalClassFormatException;
+import java.security.ProtectionDomain;
+
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.tree.ClassNode;
+
+public class
+Transformer
+implements ClassFileTransformer
+{
+       @Override
+       public
+       byte[] transform(
+               final ClassLoader loader,
+               final String className,
+               final Class<?> classBeingRedefined,
+               final ProtectionDomain protectionDomain,
+               final byte[] bytes
+       )
+       throws IllegalClassFormatException
+       {
+               ClassReader      reader = new ClassReader( bytes );
+               ClassNode classNode = new ClassNode();
+               reader.accept( classNode, 0 );
+               classNode.access &= (~Opcodes.ACC_FINAL);
+
+               final ClassWriter cw =
+                       new ClassWriter( ClassWriter.COMPUTE_MAXS|ClassWriter.COMPUTE_FRAMES );
+               classNode.accept( cw );
+               return cw.toByteArray();
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/UnsafeClassLoader.java b/org.tizen.common/test/src/org/tizen/common/UnsafeClassLoader.java
new file mode 100755 (executable)
index 0000000..93c5bf9
--- /dev/null
@@ -0,0 +1,256 @@
+/*
+ * 
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common;
+
+import static org.tizen.common.util.IOUtil.getBytes;
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.instrument.ClassFileTransformer;
+import java.lang.instrument.IllegalClassFormatException;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.classloader.ClassSource;
+import org.tizen.common.util.IOUtil;
+
+
+/**
+ * <p>
+ * UnsafeClassLoader.
+ * 
+ * Classloader for untestable class
+ * 
+ * FIXME add {@link Package} info and {@link #getResource(String)}, {@link #getResourceAsStream(String)}, {@link #getResources(String)}
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+UnsafeClassLoader
+extends ClassLoader
+{
+       /**
+        * Logger for this instance
+        */
+       protected final Logger logger = LoggerFactory.getLogger( getClass() );
+       
+       /**
+        * Parent classloader
+        */
+       protected final ClassLoader parent;
+       
+       protected ClassFileTransformer transformer = new Transformer();
+
+       /**
+        * {@link ClassSource}s providing class contents
+        */
+       protected final ArrayList<ClassSource> sources = new ArrayList<ClassSource>();
+
+       /**
+        * Constructor with {@link ClassSource}s
+        * @param source
+        */
+       public
+       UnsafeClassLoader(
+               final ClassSource... source
+       )
+       {
+               this( null, source );
+       }
+
+       /**
+        * Constructor with parent class loader and class source
+        * 
+        * @param parent {@link ClassLoader}
+        * @param sources {@link ClassSource}s
+        */
+       public
+       UnsafeClassLoader(
+               final ClassLoader parent,
+               final ClassSource... sources
+       )
+       {
+               this.parent = parent;
+               this.sources.addAll( Arrays.asList( sources ) );
+       }
+
+       /* (non-Javadoc)
+        * @see java.lang.ClassLoader#loadClass(java.lang.String, boolean)
+        */
+       @Override
+       synchronized protected
+       Class<?>
+       loadClass(
+               final String name,
+               final boolean resolve
+       )
+       throws ClassNotFoundException
+       {
+               // First, check if the class has already been loaded
+               Class<?> c = findLoadedClass( name );
+               if ( c == null )
+               {
+                       if ( name.startsWith( "java." ) )
+                       {
+                               return ClassLoader.getSystemClassLoader().loadClass( name );
+                       }
+                       try
+                       {
+                               c = findClass( name );
+                       } catch (ClassNotFoundException e) {
+                               if ( null != parent )
+                               {
+                                       c = parent.loadClass( name );
+                               }
+                               else
+                               {
+                                       throw new ClassNotFoundException();
+                               }
+                       }
+               }
+               if ( resolve )
+               {
+                       resolveClass( c );
+               }
+               return c;
+       }
+
+       /* (non-Javadoc)
+        * @see java.lang.ClassLoader#findClass(java.lang.String)
+        */
+       @Override
+       protected
+       Class<?>
+       findClass(
+               final String name
+       )
+       throws ClassNotFoundException
+       {
+               logger.trace( "Class name :{}", name );
+               final String path = name.replace( '.', '/' ) + ".class";
+               for ( final ClassSource source : sources )
+               {
+                       logger.trace( "Source :{}", source );
+                       InputStream in = null;;
+                       try
+                       {
+                               in = source.getResourceAsStream( path );
+                               final Class<?> clazz = define( name, in );
+                               if ( null != clazz )
+                               {
+                                       return clazz;
+                               }
+                       }
+                       catch ( final IOException e )
+                       {
+                       }
+                       finally
+                       {
+                               tryClose( in );
+                       }
+               }
+               
+//             final ClassLoader loader = getClass().getClassLoader();
+//             
+//             final InputStream in = loader.getResourceAsStream( path );
+//             try
+//             {
+//                     final Class<?> clazz = define( name, in );
+//                     if ( null != clazz )
+//                     {
+//                             return clazz;
+//                     }
+//             }
+//             finally
+//             {
+//                     tryClose( in );
+//             }
+//
+               throw new ClassNotFoundException();
+
+       }
+       
+       protected Class<?> define(
+               final String name,
+               final InputStream in
+       )
+       {
+               try {
+                       if ( null == in )
+                       {
+                               return null;
+                       }
+                       byte[] bytes = getBytes( in );
+                       final String qn = name.replace( '.', '/' );
+                       bytes = transformer.transform( this, qn, null, null, bytes );
+                       logger.trace( "{} bytes read", bytes.length );
+                       return defineClass( name, bytes, 0, bytes.length );
+               } catch ( final IOException e )
+               {
+               } catch ( final IllegalClassFormatException e )
+               {
+               }
+               
+               return null;
+       }
+
+       /**
+        * Write log file about converted class
+        * 
+        * @param path file path to write
+        * @param bytes class contents
+        * 
+        * @throws IOException If file can't be write
+        */
+       protected
+       void
+       writeLog(
+               final String path,
+               byte[] bytes
+       )
+       throws IOException
+       {
+               FileOutputStream fileOut = null;
+               try
+               {
+                       File logFile = new File( "test/log/" + path );
+                       logFile.getParentFile().mkdirs();
+                       fileOut = new FileOutputStream( logFile );
+                       IOUtil.redirect( new ByteArrayInputStream( bytes ), fileOut );
+               }
+               finally
+               {
+                       tryClose( fileOut);
+               }
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/UnsafeRunner.java b/org.tizen.common/test/src/org/tizen/common/UnsafeRunner.java
new file mode 100755 (executable)
index 0000000..85961d3
--- /dev/null
@@ -0,0 +1,183 @@
+/*
+ * 
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.internal.builders.JUnit4Builder;
+import org.junit.runner.Description;
+import org.junit.runner.Runner;
+import org.junit.runner.notification.RunNotifier;
+import org.junit.runners.ParentRunner;
+import org.junit.runners.model.InitializationError;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.classloader.ClassSource;
+import org.tizen.common.classloader.DirectoryClassSource;
+import org.tizen.common.classloader.JarClassSource;
+
+/**
+ * <p>
+ * UnsafeRunner.
+ * 
+ * JUnit extensible {@link Runner}
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+UnsafeRunner
+extends ParentRunner<Runner>
+{
+       /**
+        * Logger for this instance
+        */
+       protected final Logger logger = LoggerFactory.getLogger( getClass() );
+
+       /**
+        * Classloader to convert test case
+        */
+       protected ClassLoader loader;
+
+       /**
+        * Test case name
+        */
+       protected final String className;
+
+       /**
+        * Constructor with test case {@link Class}
+        * 
+        * @param testClass test case {@link Class}
+        * 
+        * @throws InitializationError If <code>testClass</code> is invalid test case
+        */
+       public
+       UnsafeRunner(
+               final Class<?> testClass
+       )
+       throws InitializationError
+       {
+               super( testClass );
+               logger.trace( "Class :{}", testClass );
+
+               this.className = testClass.getName();
+
+               ClassSource[] sources = getSources( testClass );
+
+               loader = new UnsafeClassLoader( getClass().getClassLoader(), sources );
+       }
+
+       /**
+        * Extrace {@link ClassSource} from test case's annotation
+        * 
+        * @param testClass test case
+        * 
+        * @return {@link ClassSource}s
+        */
+       protected
+       ClassSource[] getSources(
+               final Class<?> testClass
+       )
+       {
+               final Location annotation =
+                       testClass.getAnnotation( Location.class );
+               if ( null == annotation )
+               {
+                       return new ClassSource[0];
+               }
+
+               final String[] locations = annotation.value();
+
+               final ArrayList<ClassSource> sources = new ArrayList<ClassSource>();
+
+               for ( final String location : locations )
+               {
+                       if ( location.endsWith( ".jar" ) )
+                       {
+                               sources.add( new JarClassSource( location ) );
+                       }
+                       else if ( location.endsWith( "/" ) )
+                       {
+                               sources.add( new DirectoryClassSource( location ) );
+                       }
+               }
+
+               return sources.toArray( new ClassSource[0] );
+       }
+
+       /* (non-Javadoc)
+        * @see org.junit.runners.ParentRunner#getChildren()
+        */
+       @Override
+       protected
+       List<Runner>
+       getChildren()
+       {
+               final ArrayList<Runner> runners = new ArrayList<Runner>();
+               try {
+                       final Class<?> clazz = loader.loadClass( className );
+                       logger.trace( "Class :{}, Loader :{}", clazz, clazz.getClassLoader() );
+                       final JUnit4Builder builder = new JUnit4Builder();
+                       runners.add( builder.runnerForClass( clazz ) );
+               } catch (ClassNotFoundException e) {
+                       e.printStackTrace();
+               } catch (Throwable e) {
+                       e.printStackTrace();
+               }
+
+               logger.debug( "Runners :{}", runners );
+
+               return runners;
+       }
+
+       /* (non-Javadoc)
+        * @see org.junit.runners.ParentRunner#describeChild(java.lang.Object)
+        */
+       @Override
+       protected
+       Description
+       describeChild(
+               final Runner runner
+       )
+       {
+               return runner.getDescription();
+       }
+
+       /* (non-Javadoc)
+        * @see org.junit.runners.ParentRunner#runChild(java.lang.Object, org.junit.runner.notification.RunNotifier)
+        */
+       @Override
+       protected
+       void
+       runChild(
+               final Runner runner,
+               final RunNotifier notifier
+       )
+       {
+               logger.trace( "Runner :{}", runner );
+               runner.run( notifier );
+       }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/config/ExpressionParserTest.java b/org.tizen.common/test/src/org/tizen/common/config/ExpressionParserTest.java
new file mode 100755 (executable)
index 0000000..6037eab
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.config;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.tizen.common.config.provider.PropertiesProvider;
+
+/**
+ * ExpressionParserTest
+ *
+ * Test case for {@link ExpressionParser}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see ExpressionParser
+ */
+public class
+ExpressionParserTest
+{
+    /**
+     * Prepare test
+     * 
+     * @throws Exception in case of failure in preparation
+     */
+    @Before
+       public
+       void
+       setUp()
+       throws Exception {
+               final String[][] CONFIGS = new String[][] {
+                       new String[] { "msg1", "hello" },
+                       new String[] { "msg2", "${msg3}, ${msg4}!!" },
+                       new String[] { "msg5", "${msg6}, ${msg7}!!" },
+                       new String[] { "msg6", "hello" },
+                       new String[] { "msg7", "world" },
+                       new String[] { "msg8", "${msg9" },
+                       new String[] { "msg9", "$abcd" },
+                       new String[] { "msg10", "^${abc}" }
+               };
+
+               PropertiesProvider provider = new PropertiesProvider();
+               for ( final String[] CONFIG : CONFIGS )
+               {
+                       final String key = CONFIG[0];
+                       final String exp = CONFIG[1];
+
+                       provider.set( key, exp );
+               }
+               
+               
+               Preference.register( "default", provider );
+       }
+
+       /**
+        * clean up test case
+        * 
+        * @throws Exception in case of failure in clean-up
+        */
+       @After
+       public
+       void
+       tearDown()
+       throws Exception {
+               Preference.clear();
+       }
+
+    /**
+     * Test {@link ExpressionParser#parse(String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see {@link ExpressionParser#parse(String)}
+     */
+       @Test
+       public
+       void
+       test_parse()
+       throws Exception {
+               final String[][] TEST_CASES = new String[][] {
+                       new String[] { "msg1", "hello" },
+                       new String[] { "msg2", "${msg3}, ${msg4}!!" },
+                       new String[] { "msg5", "hello, world!!" },
+                       new String[] { "msg8", "${msg9" },
+                       new String[] { "msg9", "$abcd" },
+                       new String[] { "msg10", "${abc}" }
+               };
+
+
+               for ( final String[] TEST_CASE : TEST_CASES )
+               {
+                       final String key = TEST_CASE[0];
+                       final String value = TEST_CASE[1];
+
+                       assertEquals( "Key :" + key  + ", Value :" + value, value, Preference.getValue( key, null ) );
+               }
+       }
+
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/config/PreferenceTest.java b/org.tizen.common/test/src/org/tizen/common/config/PreferenceTest.java
new file mode 100755 (executable)
index 0000000..da2b703
--- /dev/null
@@ -0,0 +1,109 @@
+/*\r
+ *  Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.config;\r
+\r
+import static org.junit.Assert.assertEquals;\r
+import static org.junit.Assert.assertFalse;\r
+import static org.junit.Assert.assertTrue;\r
+import static org.tizen.common.util.IOUtil.tryClose;\r
+\r
+import java.io.InputStream;\r
+import java.util.Properties;\r
+\r
+import org.junit.Test;\r
+import org.tizen.common.config.provider.PropertiesProvider;\r
+\r
+\r
+/**\r
+ * PreferenceTest\r
+ *\r
+ * Test case for {@link Preference}\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see Preference\r
+ */\r
+public class\r
+PreferenceTest\r
+{\r
+    /**\r
+     * Test {@link Preference#checkName(String)}\r
+     * \r
+     * @throws Exception in case of failure in test\r
+     * \r
+     * @see {@link Preference#checkName(String)}\r
+     */\r
+       public void \r
+       test_checkName()\r
+       throws Exception {\r
+               assertTrue( Preference.checkName( "ajfdkfj" ) );\r
+               assertTrue( Preference.checkName( "344223" ) );\r
+               assertTrue( Preference.checkName( "한글" ) );\r
+\r
+               assertFalse( Preference.checkName( "344 223" ) );\r
+       }\r
+\r
+    /**\r
+     * Test {@link Preference#getValue(String, String)}\r
+     * \r
+     * @throws Exception in case of failure in test\r
+     * \r
+     * @see {@link Preference#getValue(String, String)}\r
+     */\r
+       @Test\r
+       public\r
+       void\r
+       test_getValue()\r
+       throws Exception\r
+       {\r
+               final ClassLoader cl = getClass().getClassLoader();\r
+\r
+               final String path =\r
+               PreferenceTest.class.getPackage().getName().replace( '.', '/') + "/test.properties";\r
+               final InputStream in =\r
+                       cl.getResourceAsStream( path );\r
+\r
+               try\r
+               {\r
+                       final Properties props = new Properties();\r
+                       props.load( in ); \r
+\r
+                       assertEquals( null, Preference.getValue( "hello", null ) );\r
+                       \r
+                       final PropertiesProvider provider = new PropertiesProvider( props );\r
+                       Preference.register( "test", provider );\r
+\r
+                       assertEquals( "world", Preference.getValue( "hello", null ) );\r
+                       assertEquals( "c", Preference.getValue( "a", null ) );\r
+                       assertEquals( null, Preference.getValue( "hello1", null ) );\r
+                       assertEquals( "e", Preference.getValue( "hello1", "${d}" ) );\r
+               }\r
+               finally\r
+               {\r
+                       tryClose( in );\r
+               }\r
+       }\r
+\r
+}\r
diff --git a/org.tizen.common/test/src/org/tizen/common/config/test.properties b/org.tizen.common/test/src/org/tizen/common/config/test.properties
new file mode 100755 (executable)
index 0000000..81c81ed
--- /dev/null
@@ -0,0 +1,3 @@
+hello=world\r
+a=c\r
+d=e
\ No newline at end of file
diff --git a/org.tizen.common/test/src/org/tizen/common/core/application/MessagesTest.java b/org.tizen.common/test/src/org/tizen/common/core/application/MessagesTest.java
new file mode 100644 (file)
index 0000000..85ea2c5
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.application;
+
+import static org.junit.Assert.assertFalse;
+
+import org.junit.Test;
+import org.tizen.common.util.StringUtil;
+
+
+/**
+ * MessagesTest
+ *
+ * Test case for {@link MessagesTest}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see MessagesTest
+ */
+public class MessagesTest
+{
+
+       /**
+        * Test {@link Messages}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Messages}
+        * @see Messages#DIALOG_TITLE
+        */
+       @Test
+       public void test_Messages() throws Exception
+       {
+               assertFalse( StringUtil.isEmpty( Messages.DIALOG_TITLE ) );
+       }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/application/StatusLineMessageManagerTest.java b/org.tizen.common/test/src/org/tizen/common/core/application/StatusLineMessageManagerTest.java
new file mode 100644 (file)
index 0000000..24e3374
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.application;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import org.eclipse.jface.action.IStatusLineManager;
+import org.junit.Test;
+
+
+/**
+ * StatusLineMessageManagerTest
+ *
+ * Test case for {@link StatusLineMessageManager}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see StatusLineMessageManager
+ */
+public class StatusLineMessageManagerTest
+{
+       /**
+        * Test {@link StatusLineMessageManager#setMessage(String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link StatusLineMessageManager#setMessage(String)}
+        */
+       @Test
+       public void test_setMessage() throws Exception
+       {
+               final String[] TEST_CASES = new String[] {
+                       null, "Hello", "Test"
+               };
+               
+               for ( final String TEST_CASE : TEST_CASES )
+               {
+                       final IStatusLineManager statusLineManager = mock( IStatusLineManager.class );
+                       final StatusLineMessageManager manager =
+                               new StatusLineMessageManager( statusLineManager );
+                       
+                       manager.setMessage( TEST_CASE );
+                       verify( statusLineManager ).setMessage( TEST_CASE );
+               }
+       }
+
+       /**
+        * Test {@link StatusLineMessageManager#setErrorMessage(String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link StatusLineMessageManager#setErrorMessage(String)}
+        */
+       @Test
+       public void test_setErrorMessage() throws Exception
+       {
+               final String[] TEST_CASES = new String[] {
+                       null, "Hello", "Test"
+               };
+               
+               for ( final String TEST_CASE : TEST_CASES )
+               {
+                       final IStatusLineManager statusLineManager = mock( IStatusLineManager.class );
+                       final StatusLineMessageManager manager =
+                               new StatusLineMessageManager( statusLineManager );
+                       
+                       manager.setErrorMessage( TEST_CASE );
+                       verify( statusLineManager ).setErrorMessage( TEST_CASE );
+               }
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/CommandTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/CommandTest.java
new file mode 100755 (executable)
index 0000000..14d1864
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command;
+
+import org.junit.After;
+import org.junit.Before;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.tizen.common.core.command.policy.PolicyRegistry;
+import org.tizen.common.core.command.prompter.NopPrompter;
+import org.tizen.common.file.VirtualFileHandler;
+
+/**
+ * CommandTest
+ *
+ * Test case for {@link Command}'s sub class
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+CommandTest
+{
+    
+    /**
+     * Logger for testcase
+     */
+    protected final Logger logger = LoggerFactory.getLogger( getClass() );
+       /**
+        * {@link ExecutionContext} for test
+        */
+       protected ExecutionContext context;
+       
+       /**
+        * {@link Executor} for test
+        */
+       protected Executor executor;
+       
+       /**
+        * Return {@link Prompter} for test
+        * 
+        * @return {@link Prompter}
+        */
+       protected
+       Prompter
+       getPrompter()
+       {
+               return context.getPrompter();
+       }
+
+       /**
+        * Return {@link PolicyRegistry} for test
+        *  
+        * @return {@link PolicyRegistry}
+        */
+       protected
+       PolicyRegistry
+       getPolicies() {
+               return context.getPolicyRegistry();
+       }
+       
+       /**
+        * Return {@link VirtualFileHandler} for test
+        * 
+        * @return {@link VirtualFileHandler}
+        */
+       protected
+       VirtualFileHandler
+       getFileHandler()
+       {
+               return (VirtualFileHandler) context.getFileHandler();
+       }
+       
+       /**
+        * Return {@link Executor} for test
+        * 
+        * @return {@link Executor}
+        */
+       protected
+       Executor
+       getExecutor()
+       {
+               return this.executor;
+       }
+       
+       /**
+        * Return {@link ExecutionContext} for test
+        * 
+        * @return {@link ExecutionContext}
+        */
+       protected
+       ExecutionContext
+       getExecutionContext()
+       {
+               return this.context;
+       }
+       
+       /**
+        * Create prompter for test
+        * 
+        * @return {@link Prompter}
+        * 
+        * @see NopPrompter
+        */
+       protected
+       Prompter
+       createPrompter()
+       {
+               return new NopPrompter();
+       }
+       
+       /**
+        * Set up test
+        */
+       @Before
+       public void setUp()
+       {
+               context = new ExecutionContext( new PolicyRegistry(), createPrompter(), new VirtualFileHandler() );
+       }
+       
+       /**
+        * Tear down test
+        */
+       @After
+       public void tearDown()
+       {
+               context = null;
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/CompositeCommandTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/CompositeCommandTest.java
new file mode 100644 (file)
index 0000000..735763a
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.junit.Test;
+
+
+/**
+ * CompositeCommandTest
+ *
+ * Test case for {@link CompositeCommand}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see CompositeCommandTest
+ */
+public class
+CompositeCommandTest
+extends CommandTest
+{
+       /**
+        * Test {@link CompositeCommand#execute(Executor, ExecutionContext)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see CompositeCommand#execute(Executor, ExecutionContext)
+        */
+       @Test
+       public
+       void
+       test_execute()
+       throws Exception
+       {
+               final AtomicInteger value = new AtomicInteger( 1 );
+               final AbstractCommand<Object> command1 = new AbstractCommand<Object>()
+               {
+                       
+                       /* (non-Javadoc)
+                        * @see org.tizen.common.core.command.AbstractCommand#run(org.tizen.common.core.command.Executor, org.tizen.common.core.command.ExecutionContext)
+                        */
+                       @Override
+                       public
+                       void
+                       run(
+                               final Executor executor,
+                               final ExecutionContext context
+                       )
+                       throws Exception
+                       {
+                               value.set( value.get() + 1 );
+                       }
+               };
+               final AbstractCommand<Object> command2 = new AbstractCommand<Object>()
+               {
+                       
+                       /* (non-Javadoc)
+                        * @see org.tizen.common.core.command.AbstractCommand#run(org.tizen.common.core.command.Executor, org.tizen.common.core.command.ExecutionContext)
+                        */
+                       @Override
+                       public
+                       void
+                       run(
+                               final Executor executor,
+                               final ExecutionContext context
+                       )
+                       throws Exception
+                       {
+                               value.set( value.get() * 3 );
+                       }
+               };
+               
+               final CompositeCommand commands = new CompositeCommand( command1, command2 );
+               commands.run( getExecutor(), getExecutionContext() );
+               
+               assertEquals( 6, value.get() );
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/ExecutionContextTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/ExecutionContextTest.java
new file mode 100644 (file)
index 0000000..5be95d5
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.tizen.common.core.command.policy.PolicyRegistry;
+import org.tizen.common.core.command.prompter.NopPrompter;
+import org.tizen.common.file.VirtualFileHandler;
+
+
+/**
+ * ExecutionContextTest
+ *
+ * Test case for {@link ExecutionContext}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see ExecutionContext
+ */
+public class
+ExecutionContextTest
+{
+       /**
+        * Test {@link ExecutionContext#getPolicyRegistry()}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see ExecutionContext#getPolicyRegistry()
+        */
+       @Test
+       public void test_getPolicyRegistry() throws Exception {
+               // Given
+               final PolicyRegistry registry = new PolicyRegistry();
+               final ExecutionContext context = new ExecutionContext( registry, null, null );
+               
+               // When & Then
+               assertEquals( registry, context.getPolicyRegistry() );
+       }
+       
+       /**
+        * Test {@link ExecutionContext#getPrompter()}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see ExecutionContext#getPrompter()
+        */
+       @Test
+       public void test_getPrompter() throws Exception {
+               // Given
+               final NopPrompter prompter = new NopPrompter();
+               final ExecutionContext context = new ExecutionContext( null, prompter, null );
+               
+               // When & Then
+               assertEquals( prompter, context.getPrompter() );
+               
+       }
+       
+       /**
+        * Test {@link ExecutionContext#getFileHandler()}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see ExecutionContext#getFileHandler()
+        */
+       @Test
+       public void test_getFileHandler() throws Exception {
+               // Given
+               final VirtualFileHandler handler = new VirtualFileHandler();
+               final ExecutionContext context = new ExecutionContext( null, null, handler );
+               
+               // When & Then
+               assertEquals( handler, context.getFileHandler() );
+       }
+       
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/file/FileHandlingCommandTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/file/FileHandlingCommandTest.java
new file mode 100644 (file)
index 0000000..b1bcb6e
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.file;
+
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import org.junit.Test;
+import org.mockito.Matchers;
+import org.tizen.common.file.Filter;
+import org.tizen.common.file.SimpleFileFilter;
+
+
+/**
+ * FileHandlingCommandTest.
+ *
+ * Test case for {@link FileHandlingCommand}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see FileHandlingCommand
+ */
+public class
+FileHandlingCommandTest
+{
+       
+       /**
+        * Test {@link FileHandlingCommand#setFilter(SimpleFileFilter)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see FileHandlingCommand#setFilter(SimpleFileFilter)
+        */
+       @Test
+       public
+       void
+       test_setFilter() throws Exception
+       {
+               // Given
+               final FileHandlingCommand<Object> command = new FileHandlingCommand<Object>();
+               
+               // When & Then
+               command.setFilter( new SimpleFileFilter() );
+               
+               try
+               {
+                       // When
+                       command.setFilter( null );
+                       fail();
+               }
+               catch ( NullPointerException e )
+               {
+                       // Then
+               }
+       }
+       
+       /**
+        * Test {@link FileHandlingCommand#setIncludes(String[])}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see FileHandlingCommand#setIncludes(String[])
+        */
+       @Test
+       public void test_setIncludes() throws Exception {
+               // Given
+               final FileHandlingCommand<Object> command = new FileHandlingCommand<Object>();
+               SimpleFileFilter mockFilter = mock( SimpleFileFilter.class );
+               command.setFilter( mockFilter );
+               
+               // When
+               command.setIncludes( new String[] { "*" } );
+               
+               // Then
+               verify( mockFilter ).clearIncludes();
+               verify( mockFilter ).addIncludes( Matchers.<Filter>any() );
+               
+       }
+       
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/policy/PolicyRegistryTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/policy/PolicyRegistryTest.java
new file mode 100644 (file)
index 0000000..b6f88ea
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.policy;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+
+/**
+ * PolicyRegistryTest
+ *
+ * Test case for {@link PolicyRegistry}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see PolicyRegistry
+ */
+public class PolicyRegistryTest
+{
+
+       /**
+        * Test {@link PolicyRegistry#getPolicy(String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see PolicyRegistry#getPolicy(String)
+        */
+       @Test
+       public void test_getPolicy() throws Exception {
+               final PolicyRegistry register = new PolicyRegistry();
+               
+               final AbstractPolicy expected = new AbstractPolicy( "exist.output.file" ) {
+                       public <T> T adapt(Class<T> clazz) {
+                               return null;
+                       }
+               };
+               
+               register.register( expected );
+               
+               assertNotNull( register.getPolicy( null ) );
+               assertNotNull( register.getPolicy( "" ) );
+               assertEquals( null, register.getPolicy( "exist" ) );
+               assertEquals( null, register.getPolicy( "exist.output" ) );
+               assertEquals( expected, register.getPolicy( "exist.output.file.xml" ) );
+               assertEquals( expected, register.getPolicy( "exist.output.file" ) );
+       }
+       
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/prompter/GenericOptionTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/prompter/GenericOptionTest.java
new file mode 100644 (file)
index 0000000..4094c3e
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.prompter;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+
+/**
+ * <p>
+ * GenericOptionTest.
+ * 
+ * Test case for {@link GenericOption}
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see GenericOption
+ */
+public class
+GenericOptionTest
+{
+       /**
+        * Test {@link GenericOption#isMatch(String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see GenericOption#isMatch(String)
+        */
+       @Test
+       public
+       void
+       test_isMatch()
+       throws Exception
+       {
+
+               final GenericOption option = new GenericOption();
+
+               assertTrue( option.isMatch( "Hello" ) );
+               assertTrue( option.isMatch( "World" ) );
+
+
+       }
+
+       /**
+        * Test {@link GenericOption#getAnswer()}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see GenericOption#getAnswer()
+        */
+       @Test
+       public
+       void
+       test_getAnswer()
+       throws Exception
+       {
+               final String userAnser = "Dummy answer";
+               NopPrompter prompter = new NopPrompter() {
+                       @Override
+                       public Option interact(String question, Option... options) {
+                               options[0].isMatch( userAnser );
+                               return options[0];
+                       }
+               };
+               GenericOption option = new GenericOption();
+               final Option answer = prompter.interact( "Answer ?", option );
+               
+               assertEquals( userAnser, ((GenericOption) answer).getAnswer() );
+               assertEquals( userAnser, answer.toString() );
+               
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/prompter/OptionTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/prompter/OptionTest.java
new file mode 100644 (file)
index 0000000..beb2027
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.prompter;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+
+/**
+ * OptionTest
+ * 
+ * Test case for {@link ChoiceOption}
+ * 
+ * @author bylee
+ *
+ * @see ChoiceOption
+ */
+public class
+OptionTest
+{
+       /**
+        * Test {@link ChoiceOption#isMatch(String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see ChoiceOption#isMatch(String)
+        */
+       @Test
+       public
+       void
+       test_isMatch()
+       throws Exception
+       {
+               // Test cases
+               final Object[][] TEST_CASES = new Object[][] {
+                       new Object[] {
+                               new ChoiceOption( "test" ),
+                               new Object[][] {
+                                       new Object[] { "t", true },
+                                       new Object[] { "TEST", true },
+                                       new Object[] { "TEst", true },
+                                       new Object[] { "No", false },
+                                       new Object[] { null, false }
+                               }
+                       }
+               };
+               // Given
+               
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       
+                       final ChoiceOption option = (ChoiceOption) TEST_CASE[0];
+                       final Object[][] TEST_CASE2 = (Object[][]) TEST_CASE[1];
+                       for ( final Object[] TEST_CASE3 : TEST_CASE2 )
+                       {
+                               // When
+                               String input = (String) TEST_CASE3[0];
+                               boolean expected = (Boolean) TEST_CASE3[1];
+
+                               boolean result = option.isMatch( input );
+                               
+                               // Then
+                               assertEquals( expected, result );
+                       }
+               }
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/prompter/SWTPrompterTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/prompter/SWTPrompterTest.java
new file mode 100644 (file)
index 0000000..f222f83
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.prompter;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.junit.Test;
+
+
+/**
+ * SWTPrompterTest
+ *
+ * Test case for {@link SWTPrompter}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see SWTPrompter
+ */
+public class
+SWTPrompterTest
+{
+       /**
+        * Test {@link SWTPrompter#interact(String, ChoiceOption...)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see SWTPrompter#interact(String, ChoiceOption...)
+        */
+       @Test
+       public void test_interact() throws Exception {
+               {
+                       // Given
+                       final MessageDialog mockDialog = mock( MessageDialog.class );
+                       when( mockDialog.getReturnCode() ).thenReturn( 0 );
+                       final SWTPrompter prompter = new SWTPrompter() {
+                               @Override
+                               protected Dialog createDialog(
+                                       final String question,
+                                       final String[] optionNames,
+                                       final int defaultOptionIndex
+                               )
+                               {
+                                       return mockDialog;
+                               }
+                       };
+                       
+                       // When
+                       ChoiceOption opt1 = new ChoiceOption( "Yes" );
+                       ChoiceOption opt2 = new ChoiceOption( "No", true );
+                       
+                       // Then
+                       Option result = prompter.interact( "Yes or No", opt1, opt2 );
+                       assertEquals( opt1, result );
+               }
+               
+               {
+                       // Given
+                       final MessageDialog mockDialog = mock( MessageDialog.class );
+                       when( mockDialog.getReturnCode() ).thenReturn( 1 );
+                       final SWTPrompter prompter = new SWTPrompter() {
+                               @Override
+                               protected Dialog createDialog(
+                                       final String question,
+                                       final String[] optionNames,
+                                       final int defaultOptionIndex
+                               )
+                               {
+                                       return mockDialog;
+                               }
+                       };
+                       
+                       // When
+                       ChoiceOption opt1 = new ChoiceOption( "Yes" );
+                       ChoiceOption opt2 = new ChoiceOption( "No", true );
+                       
+                       // Then
+                       Option result = prompter.interact( "Yes or No", opt1, opt2 );
+                       assertEquals( opt2, result );
+
+               }
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/sdb/DevicesSdbCommandTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/sdb/DevicesSdbCommandTest.java
new file mode 100644 (file)
index 0000000..205e8b0
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import org.junit.Test;
+import org.tizen.common.core.command.CommandTest;
+import org.tizen.sdblib.IDevice;
+
+/**
+ * DevicesSdbCommandTest
+ * 
+ * Test case for {@link DevicesSdbCommand}
+ * 
+ * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ *
+ * @see DevicesSdbCommand
+ */
+public class
+DevicesSdbCommandTest
+extends CommandTest
+{
+    @Test
+    public void test_execute() throws Exception {
+        DevicesSdbCommand testCommand = new DevicesSdbCommand() {
+            @Override
+            protected SmartDevelopmentBridgeManager createBridge() {
+                SmartDevelopmentBridgeManager mockBridge = mock( SmartDevelopmentBridgeManager.class );
+                IDevice mockDevice1 = mock( IDevice.class );
+                IDevice mockDevice2 = mock( IDevice.class );
+                when( mockDevice1.toString() ).thenReturn( "TizenDevice1" );
+                when( mockDevice2.toString() ).thenReturn( "TizenDevice2" );
+                when( mockBridge.getDevices() ).thenReturn( new IDevice[] { mockDevice1, mockDevice2 } );
+                return mockBridge;
+            }
+            
+        };
+        testCommand.run( null, context );
+        String result = "TizenDevice1" + System.getProperty("line.separator") + "TizenDevice2" + System.getProperty("line.separator");
+        assertEquals( result, testCommand.getResult() );
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/sdb/DlogSdbCommandTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/sdb/DlogSdbCommandTest.java
new file mode 100644 (file)
index 0000000..401c0f5
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import org.junit.Test;
+import org.tizen.common.core.command.CommandTest;
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.MultiLineReceiver;
+
+/**
+ * DlogSdbCommandTest
+ *
+ * Test case for {@link DlogSdbCommand}
+ * 
+ * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ * 
+ * @see DlogSdbCommand
+ */
+public class
+DlogSdbCommandTest
+extends CommandTest
+{
+    @Test
+    public void test_execute() throws Exception {
+        final MultiLineReceiver mockMultiLineReceiver = mock( MultiLineReceiver.class );
+        String cmd = "dlogutil";
+        DlogSdbCommand testCommand = new DlogSdbCommand() {
+            @Override
+            public MultiLineReceiver createMultiLineReceiver() {
+                return mockMultiLineReceiver;
+            }
+        };
+
+        try {
+            testCommand.run( null, context );
+            fail( "when device is null then must throw exception" );
+        } catch ( Exception e) {
+        }
+
+        IDevice mockDevice = mock( IDevice.class );
+        testCommand.setDevice( mockDevice );
+        try {
+            testCommand.run( null, context );
+            assertEquals( testCommand.getCommand(), cmd );
+            verify( mockDevice ).executeShellCommand( cmd, mockMultiLineReceiver, testCommand.getTime()*1000 );
+
+            testCommand.setFilter( "filter" );
+            testCommand.run( null, context );
+            assertEquals( testCommand.getCommand(), cmd + " filter" );
+            verify( mockDevice ).executeShellCommand( cmd + " filter", mockMultiLineReceiver, testCommand.getTime()*1000 );
+        } catch (Exception e) {
+            fail( "should't throw exception" );
+        }
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/sdb/ForwardSdbCommandTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/sdb/ForwardSdbCommandTest.java
new file mode 100644 (file)
index 0000000..30ba8d2
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import org.junit.Test;
+import org.tizen.common.core.command.CommandTest;
+import org.tizen.sdblib.IDevice;
+
+/**
+ * ForwardSdbCommandTest
+ *
+ * Test case for {@link ForwardSdbCommand}
+ * 
+ * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ * 
+ * @see ForwardSdbCommand
+ */
+public class
+ForwardSdbCommandTest
+extends CommandTest
+{
+    @Test
+    public void test_execute() throws Exception {
+        int localPort = 5000;
+        int remotePort = 4000;
+        ForwardSdbCommand testCommand = new ForwardSdbCommand(localPort, remotePort);
+
+        // device null test
+        try {
+            testCommand.run( null, context );
+            fail( "when device is null then must throw exception" );
+        } catch (Exception e) {
+        }
+
+        try {
+            IDevice mockDevice = mock( IDevice.class );
+            testCommand.setDevice( mockDevice );
+            testCommand.run( null, context );
+            verify( mockDevice ).createForward( localPort, remotePort );
+        } catch (Exception e) {
+            fail( "should't throw exception" );
+        }
+    }
+
+    @Test
+    public void test_undo() throws Exception {
+        int localPort = 5000;
+        int remotePort = 4000;
+        ForwardSdbCommand testCommand = new ForwardSdbCommand(localPort, remotePort);
+
+        // device null test
+        try {
+            testCommand.undo( null, context );
+            fail( "when device is null then must throw exception" );
+        } catch (Exception e) {
+        }
+
+        try {
+            IDevice mockDevice = mock( IDevice.class );
+            testCommand.setDevice( mockDevice );
+            testCommand.undo( null, context );
+            verify( mockDevice ).removeForward( localPort, remotePort );
+        } catch (Exception e) {
+            fail( "should't throw exception" );
+        }
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/sdb/PullSdbCommandTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/sdb/PullSdbCommandTest.java
new file mode 100755 (executable)
index 0000000..c434fcb
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import static org.powermock.api.mockito.PowerMockito.mock;
+import static org.powermock.api.mockito.PowerMockito.when;
+
+import java.io.IOException;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.tizen.common.core.command.CommandTest;
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.SdbCommandRejectedException;
+import org.tizen.sdblib.SyncService;
+import org.tizen.sdblib.SyncService.SyncResult;
+import org.tizen.sdblib.TimeoutException;
+
+/**
+ * PullSdbCommandTest
+ *
+ * Test case for {@link PullSdbCommand}
+ * 
+ * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ * 
+ * @see PullSdbCommand
+ */
+@RunWith( PowerMockRunner.class )
+public class
+PullSdbCommandTest
+extends CommandTest
+{
+    @Test
+    @PrepareForTest( { SyncService.class } )
+    public void test_execute() throws Exception {
+        final IDevice mockDevice = mock( IDevice.class );
+        final SyncService mockService = mock( SyncService.class );
+        SyncResult r = mock( SyncResult.class );
+        when( mockService.pullFile( "remotePath", "localPath", SyncService.getNullProgressMonitor() ) )
+        .thenReturn( r );
+
+        PullSdbCommand testCommand = new PullSdbCommand( "remotePath", "localPath" )
+        {
+            @Override
+            protected SyncService getSyncService() throws TimeoutException,
+                    SdbCommandRejectedException, IOException {
+                return mockService;
+            }
+        };
+        testCommand.setDevice( mockDevice );
+        testCommand.run( null, context );
+    }
+
+    @Override
+    public String toString() {
+       return getClass().getSimpleName() + ":" + getClass().getClassLoader();
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/sdb/PushSdbCommandTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/sdb/PushSdbCommandTest.java
new file mode 100644 (file)
index 0000000..f37820f
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import static org.mockito.Mockito.mock;
+
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+
+import org.junit.Test;
+import org.tizen.common.core.command.CommandTest;
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.SdbCommandRejectedException;
+import org.tizen.sdblib.SyncService;
+import org.tizen.sdblib.TimeoutException;
+
+/**
+ * PushSdbCommandTest
+ *
+ * Test case for {@link PushSdbCommand}
+ * 
+ * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ * 
+ * @see PushSdbCommand
+ */
+public class
+PushSdbCommandTest
+extends CommandTest
+{
+    @Test
+    public void test_execute() throws Exception {
+        IDevice mockDevice = mock( IDevice.class );
+        Class<?> serviceClass = SyncService.class;
+        Constructor<?>[] con = serviceClass.getDeclaredConstructors();
+        con[0].setAccessible( true );
+        final SyncService mockService = (SyncService) con[0].newInstance( null, null );
+
+        PushSdbCommand testCommand = new PushSdbCommand( "sourcePath", "targetPath" ) {
+            @Override
+            protected SyncService getSyncService() throws TimeoutException,
+                    SdbCommandRejectedException, IOException {
+                return mockService;
+            }
+        };
+        testCommand.setDevice( mockDevice );
+        testCommand.run( null, context );
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/sdb/ShellSdbCommandTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/sdb/ShellSdbCommandTest.java
new file mode 100644 (file)
index 0000000..db72653
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.core.command.sdb;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import org.junit.Test;
+import org.tizen.common.core.command.CommandTest;
+import org.tizen.sdblib.IDevice;
+import org.tizen.sdblib.MultiLineReceiver;
+
+/**
+ * ShellSdbCommandTest
+ *
+ * Test case for {@link ShellSdbCommand}
+ * 
+ * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ * 
+ * @see ShellSdbCommand
+ */
+
+public class
+ShellSdbCommandTest
+extends CommandTest
+{
+    @Test
+    public void test_execute() throws Exception {
+        String cmd = "ls";
+        final MultiLineReceiver mockMultiLineReceiver = mock( MultiLineReceiver.class );
+        ShellSdbCommand testCommand1 = new ShellSdbCommand();
+        ShellSdbCommand testCommand2 = new ShellSdbCommand( cmd ) {
+            @Override
+            public MultiLineReceiver createMultiLineReceiver() {
+                return mockMultiLineReceiver;
+            }
+            
+        };
+
+        // construction test
+        assertEquals( testCommand1.getCommand(), null );
+        assertEquals( testCommand2.getCommand(), cmd);
+
+        // time value test
+        assertEquals( testCommand1.getTime(), 90 );
+        testCommand1.setTime( 30 );
+        assertEquals( testCommand1.getTime(), 30 );
+        testCommand1.setTime( 1 );
+        assertEquals( testCommand1.getTime(), 1 );
+        testCommand1.setTime( 0 );
+        assertEquals( testCommand1.getTime(), 90 );
+        testCommand1.setTime( -1 );
+        assertEquals( testCommand1.getTime(), 90 );
+
+        try {
+            // device null test
+            testCommand1.run( null, context );
+            fail( "when device is null then must throw exception" );
+        } catch (Exception e) {
+        }
+
+        IDevice mockDevice = mock( IDevice.class );
+        testCommand1.setDevice( mockDevice );
+        testCommand2.setDevice( mockDevice );
+        try {
+            // command null test
+            testCommand1.run( null, context );
+            fail( "when command is null then must throw exception" );
+        } catch (Exception e) {
+        }
+
+        try {
+            // normal operation test
+            String clearResult =  "Test clearResult call";
+            testCommand2.setResult( clearResult );
+            testCommand2.run( null, context );
+
+            // clearResult call test
+            assertNotSame( clearResult, testCommand2.getResult() );
+            // executeShellCommand call test
+            verify( mockDevice ).executeShellCommand( cmd, mockMultiLineReceiver, 90000 );
+        } catch (Exception e) {
+            fail( "should't throw exception" );
+        }
+    }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/zip/JarCommandTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/zip/JarCommandTest.java
new file mode 100755 (executable)
index 0000000..6e20b47
--- /dev/null
@@ -0,0 +1,93 @@
+/*\r
+ *  Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.core.command.zip;\r
+\r
+import static org.junit.Assert.assertEquals;\r
+import static org.junit.Assert.assertTrue;\r
+import static org.tizen.common.util.IOUtil.tryClose;\r
+\r
+import java.io.InputStream;\r
+import java.util.jar.JarEntry;\r
+import java.util.jar.JarInputStream;\r
+\r
+import org.junit.Test;\r
+import org.tizen.common.core.command.CommandTest;\r
+import org.tizen.common.core.command.ExecutionContext;\r
+import org.tizen.common.core.command.Executor;\r
+import org.tizen.common.file.FileHandler.Attribute;\r
+import org.tizen.common.file.VirtualFileHandler;\r
+\r
+/**\r
+ * JarCommandTest\r
+ *\r
+ * Test case for {@link JarCommand}\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * \r
+ * @see JarCommand\r
+ */\r
+public class JarCommandTest\r
+extends CommandTest\r
+{\r
+\r
+    /**\r
+     * Test {@link JarCommand#execute(Executor, ExecutionContext)}\r
+     * \r
+     * @throws Exception in case of failure in test\r
+     * \r
+     * @see JarCommand#execute(Executor, ExecutionContext)\r
+     */\r
+    @Test\r
+    public\r
+    void\r
+    test_execute()\r
+    throws Exception\r
+    {\r
+        // Given\r
+        final VirtualFileHandler vfs = (VirtualFileHandler) context.getFileHandler();\r
+        vfs.makeDirectory( "/test" );\r
+        vfs.write( "/test/a.txt", "Hello, World" );\r
+        \r
+        // When\r
+        final JarCommand command = new JarCommand( "/test", "/test.jar" );\r
+        command.run( getExecutor(), getExecutionContext() );\r
+        \r
+        // Then\r
+        assertTrue( (Boolean) vfs.get( "/test.jar", Attribute.EXISTS ) );\r
+        final InputStream in = vfs.read( "/test.jar" );\r
+\r
+        final JarInputStream zipIn = new JarInputStream( in );\r
+        try\r
+        {\r
+            final JarEntry en = zipIn.getNextJarEntry();\r
+            assertEquals( "a.txt", en.getName() );\r
+        }\r
+        finally\r
+        {\r
+            tryClose( in );\r
+        }\r
+        \r
+    }\r
+}\r
diff --git a/org.tizen.common/test/src/org/tizen/common/core/command/zip/ZipCommandTest.java b/org.tizen.common/test/src/org/tizen/common/core/command/zip/ZipCommandTest.java
new file mode 100755 (executable)
index 0000000..4cede86
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.core.command.zip;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import java.io.InputStream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import org.junit.Test;
+import org.tizen.common.core.command.CommandTest;
+import org.tizen.common.core.command.ExecutionContext;
+import org.tizen.common.core.command.Executor;
+import org.tizen.common.file.FileHandler.Attribute;
+import org.tizen.common.file.VirtualFileHandler;
+
+
+/**
+ * ZipCommandTest
+ *
+ * Test case for {@link ZipCommand}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see ZipCommand
+ */
+public class
+ZipCommandTest
+extends CommandTest
+{
+       /**
+        * Test {@link ZipCommand#execute(Executor, ExecutionContext)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see ZipCommand#execute(Executor, ExecutionContext)
+        */
+       @Test
+       public
+       void
+       test_execute()
+       throws Exception
+       {
+               // Given
+               final VirtualFileHandler vfs = (VirtualFileHandler) context.getFileHandler();
+               vfs.makeDirectory( "/test" );
+               vfs.write( "/test/a.txt", "Hello, World" );
+               
+               // When
+               final ZipCommand command = new ZipCommand( "/test", "/test.zip" );
+               command.run( getExecutor(), getExecutionContext() );
+               
+               // Then
+               assertTrue( (Boolean) vfs.get( "/test.zip", Attribute.EXISTS ) );
+               final InputStream in = vfs.read( "/test.zip" );
+
+               final ZipInputStream zipIn = new ZipInputStream( in );
+               try
+               {
+                   final ZipEntry en = zipIn.getNextEntry();
+                   assertEquals( "a.txt", en.getName() );
+               }
+               finally
+               {
+                   tryClose( in );
+               }
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/daemon/AbstractServerTest.java b/org.tizen.common/test/src/org/tizen/common/daemon/AbstractServerTest.java
new file mode 100755 (executable)
index 0000000..2d88985
--- /dev/null
@@ -0,0 +1,97 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.daemon;\r
+\r
+import static org.junit.Assert.assertEquals;\r
+import static org.junit.Assert.fail;\r
+\r
+import java.util.concurrent.atomic.AtomicInteger;\r
+\r
+import org.junit.Test;\r
+import org.tizen.common.util.ThreadUtil;\r
+\r
+public class AbstractServerTest\r
+{\r
+\r
+    @Test\r
+    public void test_boot() throws Exception\r
+    {\r
+        final AtomicInteger status = new AtomicInteger();\r
+        \r
+        AbstractServer server = new AbstractServer()\r
+        {\r
+            \r
+            @Override\r
+            protected void terminate()\r
+            {\r
+                ThreadUtil.trySleep( 200 );\r
+                status.incrementAndGet();\r
+            }\r
+            \r
+            @Override\r
+            protected void process() throws Exception\r
+            {\r
+                ThreadUtil.trySleep( 200 );\r
+            }\r
+            \r
+            @Override\r
+            protected void initialize() throws Exception\r
+            {\r
+                ThreadUtil.trySleep( 200 );\r
+                status.incrementAndGet();\r
+            }\r
+            \r
+            @Override\r
+            public String getName()\r
+            {\r
+                return null;\r
+            }\r
+        };\r
+        \r
+        server.boot();\r
+        try\r
+        {\r
+            server.boot();\r
+            fail();\r
+        } catch ( IllegalStateException e )\r
+        {\r
+        }\r
+        server.waitState( ServerState.Running );\r
+        assertEquals( 1, status.intValue() );\r
+        \r
+        server.down();\r
+        try\r
+        {\r
+            server.down();\r
+            fail();\r
+        } catch ( IllegalStateException e )\r
+        {\r
+        }\r
+        server.waitState( ServerState.Terminated );\r
+        assertEquals( 2, status.intValue() );\r
+        \r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common/test/src/org/tizen/common/file/SimpleFileFilterTest.java b/org.tizen.common/test/src/org/tizen/common/file/SimpleFileFilterTest.java
new file mode 100755 (executable)
index 0000000..294d315
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.file;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.tizen.common.file.filter.WildCardFilter;
+
+
+/**
+ * <p>
+ * SimpleFileFilterTest.
+ *
+ * Test case for {@link SimpleFileFilter}
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see SimpleFileFilter
+ */
+public class
+SimpleFileFilterTest
+{
+       /**
+        * Test {@link SimpleFileFilter#accept(String, String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see SimpleFileFilter#accept(String, String)
+        */
+       @Test
+       public
+       void
+       test_accept()
+       throws Exception
+       {
+               SimpleFileFilter filter = new SimpleFileFilter();
+               filter.addIncludes( new WildCardFilter( "/Test*" ) );
+               assertTrue( filter.accept( null, "/Test/Test.txt" ) );
+               assertFalse( filter.accept( null, "/test/Test.txt" ) );
+               
+               filter.addExcludes( new WildCardFilter( "/te*" ) );
+               assertFalse( filter.accept( null, "/test/Test.txt" ) );
+               
+               assertFalse( filter.accept( null, "xxx.txt" ) );
+               
+               filter.clearIncludes();
+               filter.setExcludes( new WildCardFilter( ".*" ), new WildCardFilter( "*~" ) );
+               assertTrue( filter.accept( null, "a.a.a." ) );
+               assertFalse( filter.accept( null, ".aaa." ) );
+               assertTrue( filter.accept( null, "~a~a~a~." ) );
+               assertFalse( filter.accept( null, "~a~a~a~" ) );
+               assertFalse( filter.accept( null, ".project" ) );
+               assertFalse( filter.accept( null, ".classpath" ) );
+               assertFalse( filter.accept( null, "viclone.txt~" ) );
+               
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/file/StandardFileHandlerTest.java b/org.tizen.common/test/src/org/tizen/common/file/StandardFileHandlerTest.java
new file mode 100755 (executable)
index 0000000..c217a17
--- /dev/null
@@ -0,0 +1,41 @@
+/*\r
+ * Common\r
+ *\r
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.file;\r
+\r
+import org.junit.Test;\r
+import org.tizen.common.file.FileHandler.Attribute;\r
+\r
+public class StandardFileHandlerTest\r
+{\r
+\r
+    @Test\r
+    public void test_get() throws Exception\r
+    {\r
+        StandardFileHandler sfs = new StandardFileHandler();\r
+        \r
+        System.out.println( sfs.get( ".", Attribute.PATH ) );\r
+    }\r
+\r
+}\r
diff --git a/org.tizen.common/test/src/org/tizen/common/file/VirtualFileHandlerTest.java b/org.tizen.common/test/src/org/tizen/common/file/VirtualFileHandlerTest.java
new file mode 100755 (executable)
index 0000000..2ddffe1
--- /dev/null
@@ -0,0 +1,113 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.file;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.tizen.common.util.ArrayUtil.size;
+import static org.tizen.common.util.IOUtil.getBytes;
+
+import java.io.File;
+
+import org.junit.Test;
+import org.tizen.common.file.VirtualFileHandler.Directory;
+
+
+/**
+ * <p>
+ * VirtualFileHandlerTest.
+ * 
+ * Test case for {@link VirtualFileHandler}
+ *
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see VirtualFileHandler
+ */
+public class
+VirtualFileHandlerTest
+{
+       /**
+        * Test {@link VirtualFileHandler#write(String, String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see VirtualFileHandler#write(String, String)
+        */
+       @Test
+       public
+       void
+       test_write()
+       throws Exception
+       {
+               final VirtualFileHandler vfs = new VirtualFileHandler();
+
+               vfs.makeDirectory( "/test" );
+
+               vfs.write( "/test/a.txt", "Hello, World" );
+
+               assertTrue( 0 < size( getBytes( vfs.read( "/test/a.txt" ) ) ) );
+       }
+       
+       @Test
+       public void test_getParent() throws Exception {
+           final String dir = "testDir";
+           final String childFilename = "a.txt";
+           final String rootFilename = "b.txt";
+           
+           String childPath = new File( dir, childFilename ).getPath();
+           
+           VirtualFileHandler fileHandler = new VirtualFileHandler();
+           
+           fileHandler.makeDirectory( dir );
+           
+           fileHandler.write( childPath, "Test child contents ");
+           fileHandler.write( rootFilename, "Test contents" );
+           
+           Directory testDir = fileHandler.getParent( childPath );
+           assertTrue( testDir != null );
+           assertEquals( testDir.getName(), dir );
+           
+           Directory rootDir = fileHandler.getParent( rootFilename );
+           assertTrue( rootDir != null );
+           assertEquals( rootDir.getName(), null );
+           
+           fileHandler.makeDirectory( "res" );
+           fileHandler.makeDirectory( "res/wgt" );
+           fileHandler.makeDirectory( "res/wgt/css" );
+           
+           final String complexPath = "res/wgt/css/fw.txt";
+           fileHandler.write( complexPath, "Oh hoho");
+           
+           fileHandler.makeDirectory( "res/zip" );
+           fileHandler.makeDirectory( "res/zip/css" );
+           final String complexPath2 = "res/zip/css/z.txt";
+        fileHandler.write( complexPath2, "Oh hoho2");
+        
+        fileHandler.write( complexPath, "update" );
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/file/filter/WildCardFilterFactoryTest.java b/org.tizen.common/test/src/org/tizen/common/file/filter/WildCardFilterFactoryTest.java
new file mode 100644 (file)
index 0000000..0bb5f3b
--- /dev/null
@@ -0,0 +1,81 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.file.filter;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import org.junit.Test;
+
+
+/**
+ * <p>
+ * WildCardFilterFactoryTest.
+ * 
+ * Test case for {@link WildCardFilterFactory}
+ *
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see WildCardFilterFactory
+ */
+public class
+WildCardFilterFactoryTest
+{
+
+       /**
+        * Test {@link WildCardFilterFactory#create(String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see WildCardFilterFactory#create(String)
+        */
+       @Test
+       public
+       void
+       test_create()
+       throws Exception
+       {
+               final WildCardFilterFactory factory = new WildCardFilterFactory();
+               
+               assertNotNull( factory.create( "*" ) );
+               assertNotNull( factory.create( "**" ) );
+               assertNotNull( factory.create( "?" ) );
+               assertNotNull( factory.create( "Test" ) );
+               assertNotNull( factory.create( "" ) );
+               try
+               {
+                       factory.create( null );
+                       fail();
+               }
+               catch ( NullPointerException e )
+               {
+               }
+               
+               
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/file/filter/WildCardFilterTest.java b/org.tizen.common/test/src/org/tizen/common/file/filter/WildCardFilterTest.java
new file mode 100755 (executable)
index 0000000..1c949b5
--- /dev/null
@@ -0,0 +1,103 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.file.filter;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+
+/**
+ * <p>
+ * WildCardFilterTest.
+ * 
+ * Test case for {@link WildCardFilter}
+ *
+ * </p>
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see WildCardFilter
+ */
+public class
+WildCardFilterTest
+{
+       /**
+        * Test {@link WildCardFilter#accept(String, String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see WildCardFilter#accept(String, String)
+        */
+       @Test
+       public void
+       test_accept()
+       throws Exception
+       {
+               final Object[][] TEST_CASES = new Object[][] {
+                   new Object[] { "*/abc.text", "aaaa/abc.text", true },
+                   new Object[] { "*.template", "abc.template", true },
+                       new Object[] { "aaa*", "aaaa/abc.text", true },
+                       new Object[] { "aaa*", "aaaa/aaa.text", true },
+                       new Object[] { "aaa*", "bbb/aaa.text", false },
+                       new Object[] { "aaa*", "aaaa/aaa33.text", true },
+                       new Object[] { "aaa*", "aaaa/aa", true },
+                       new Object[] { ".*", ".text", true },
+                       new Object[] { "*Test*", "A_Test", true },
+                       new Object[] { "META-INF/*.*", "META-INF/MANIFEST.MF", true },
+                       new Object[] { "tizen-web-ui-fw/*", "tizen-web-ui-fw/aaaa.js", true },
+                       new Object[] { "tizen-web-ui-fw/*", "tizen-web-ui-fw/tizen-web-ui-fw.js", true },
+                       new Object[] { "tizen-web-ui-fw/*.*", "tizen-web-ui-fw/latest/js/tizen-web-ui-fw.js", true },
+                       
+               };
+
+               System.out.println( (char)42);
+               System.out.println( (char)63);
+
+               int iCase = 0;
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       ++iCase;
+
+                       final String pattern = (String) TEST_CASE[0];
+                       final String path = (String) TEST_CASE[1];
+                       final boolean expected = (Boolean) TEST_CASE[2];
+
+                       // Given
+                       
+                       // When
+                       final WildCardFilter filter = new WildCardFilter();
+                       filter.setPattern( pattern );
+                       
+                       // Then
+                       assertEquals(
+                           iCase + " th test case :" + path + "<" + pattern + ">",
+                           expected, filter.accept( "/", path )
+                       );
+
+               }
+       }
+       
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/ui/page/preference/MessagesTest.java b/org.tizen.common/test/src/org/tizen/common/ui/page/preference/MessagesTest.java
new file mode 100644 (file)
index 0000000..7b56ab2
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.page.preference;
+
+import static org.junit.Assert.assertFalse;
+
+import org.junit.Test;
+import org.tizen.common.util.StringUtil;
+
+
+/**
+ * MessagesTest
+ *
+ * Test case for {@link MessagesTest}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see MessagesTest
+ */
+public class MessagesTest
+{
+       /**
+        * Test {@link Messages}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Messages}
+        * @see Messages#DESCRIPTION
+        * @see Messages#GROUP1
+        * @see Messages#GROUP2
+        * @see Messages#LABEL_LOCATION
+        * @see Messages#LABEL_UPDATE
+        */
+       @Test
+       public void test_Messages() throws Exception
+       {
+               assertFalse( StringUtil.isEmpty( Messages.DESCRIPTION ) );
+               assertFalse( StringUtil.isEmpty( Messages.GROUP1 ) );
+               assertFalse( StringUtil.isEmpty( Messages.GROUP2 ) );
+               assertFalse( StringUtil.isEmpty( Messages.LABEL_LOCATION ) );
+               assertFalse( StringUtil.isEmpty( Messages.LABEL_UPDATE ) );
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/ui/page/wizard/TrayWizardPageTest.java b/org.tizen.common/test/src/org/tizen/common/ui/page/wizard/TrayWizardPageTest.java
new file mode 100644 (file)
index 0000000..15a5609
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.ui.page.wizard;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Composite;
+import org.junit.Test;
+import org.tizen.common.ui.dialog.ClosableTray;
+
+
+/**
+ * TrayWizardPageTest
+ *
+ * Test case for {@link TrayWizardPage}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see TrayWizardPage
+ */
+public class
+TrayWizardPageTest
+{
+       public void test_TrayWizardPage() throws Exception
+       {
+               assertEquals( "Test Page", (new TrayWizardPage( "Test Page" ) {
+                       public void createControl(Composite parent)
+                       {
+                       }
+               }).getName() );
+               
+               assertEquals( "Title", (new TrayWizardPage( "Test Page", "Title", null ) {
+                       public void createControl(Composite parent)
+                       {
+                       }
+               }).getTitle() );
+       }
+       @Test
+       public
+       void
+       test_openClosableTray()
+       throws Exception
+       {
+               final TrayWizardPage page = new TrayWizardPage( "Test Page" )
+               {
+                       public void createControl(Composite parent)
+                       {
+                       }
+               };
+
+               /*
+                * This means that functional is successful If run on WizardDialog
+                */
+               final IWizard wizard = mock( IWizard.class );
+               final WizardDialog dialog = mock( WizardDialog.class );
+               when( wizard.getContainer() ).thenReturn( dialog );
+               final ClosableTray tray = mock( ClosableTray.class );
+               
+               page.setWizard( wizard );
+               page.openClosableTray( tray );
+               
+               verify( dialog ).openTray( tray );
+       }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/ArrayUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/ArrayUtilTest.java
new file mode 100755 (executable)
index 0000000..f19e942
--- /dev/null
@@ -0,0 +1,767 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* Gun Kim <gune.kim@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.tizen.common.util.ArrayUtil.safe;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.ConcurrentModificationException;
+import java.util.Iterator;
+
+import org.junit.Test;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * ArrayUtilsTest
+ *
+ * Test case for {@link ArrayUtil}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see ArrayUtil
+ */
+public class ArrayUtilTest
+{
+    public static int arrayIndex = 0;
+    public static boolean successTest = true;
+
+    /**
+     * Test {@link ArrayUtil#pickupFirst(Collection)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ArrayUtil#pickupFirst(Collection)
+     */
+    @Test
+    public void
+    test_pickupFirst()
+            throws Exception
+            {
+        final Object[][] TEST_CASES = new Object[][] {
+                new Object[] { null, null },
+                new Object[] { new Object[] { null }, null },
+                new Object[] { new Object[] { "hello", null }, "hello" },
+                new Object[] { new Object[] { null, "hello" }, null },
+                new Object[] { new Object[] { "A", "B" }, "A" },
+        };
+
+        int iTestCase = 0;
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            ++iTestCase;
+            final Object[] input = (Object[]) TEST_CASE[0];
+            final Object expected = (Object) TEST_CASE[1];
+
+            assertEquals( iTestCase + " th test case", expected, ArrayUtil.pickupFirst( input ) );
+        }
+            }
+
+    /**
+     * Test {@link ArrayUtil#pickupLast(Collection)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ArrayUtil#pickupLast(Collection)
+     */
+    @Test
+    public void
+    test_pickupLast()
+            throws Exception
+            {
+        final Object[][] TEST_CASES = new Object[][] {
+                new Object[] { null, null },
+                new Object[] { new Object[] { null }, null },
+                new Object[] { new Object[] { "hello", null }, null },
+                new Object[] { new Object[] { null, "hello" }, "hello" },
+                new Object[] { new Object[] { "A", "B" }, "B" },
+        };
+
+        int iTestCase = 0;
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            ++iTestCase;
+            final Object[] input = (Object[]) TEST_CASE[0];
+            final Object expected = (Object) TEST_CASE[1];
+
+            assertEquals( iTestCase + " th test case", expected, ArrayUtil.pickupLast( input ) );
+        }
+            }
+
+
+    /**
+     * Test {@link ArrayUtil#iterator(Object[])}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ArrayUtil#iterator(Object[])
+     */
+    @Test
+    public void test_iterator() throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+                new Object[] { null },
+                new Object[] { "hello" },
+                new Object[] { null, "hello" },
+                new Object[] { "A", "B" },
+        };
+
+        int iTestCase = 0;
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            ++iTestCase;
+            final Object[] array = TEST_CASE;
+            final ArrayList<Object> list = new ArrayList<Object>( Arrays.asList( array ) );
+            final Iterator<Object> iter = list.iterator();
+            final Iterator<Object> testTarget = ArrayUtil.iterator( array );
+
+            int iElement = 0;
+            while ( iter.hasNext() && testTarget.hasNext() )
+            {
+                assertEquals( iTestCase + " th test case :" + (++iElement) + " th element", iter.next(), testTarget.next() );
+            }
+            assertEquals( iTestCase + "th test case's last assert :", iter.hasNext(), testTarget.hasNext() );
+        }
+
+        try
+        {
+            final Object[] array = new Object[] { "a", "b", "c" };
+            final Iterator<Object> iter = ArrayUtil.iterator( array );
+            assertTrue( iter.hasNext() );
+            assertEquals( array[0], iter.next() );
+
+            array[1] = "d";
+
+            assertTrue( iter.hasNext() );
+            iter.next();
+            fail( "ConcurrentModificatoinException Test fail" );
+
+        } catch ( ConcurrentModificationException e )
+        {
+            // Test Success
+            LoggerFactory.getLogger( getClass() ).info( "Test case successfult" );
+        }
+    }
+
+    /**
+     * Test {@link ArrayUtil#iterate(Object[], IteratingRunner, boolean)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see {@link ArrayUtil#iterate(Object[], IteratingRunner, boolean)}
+     */
+    @Test
+    public void test_iterator_with_iteratingRunner() {
+        final Object[][] TEST_CASES = new Object[][] {
+                null,
+                new Object[] { null },
+                new Object[] { "hello" },
+                new Object[] { null, "hello" },
+                new Object[] { "A", "B" },
+        };
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final Object[] array = TEST_CASE;
+
+            try {
+                ArrayUtil.iterate(array, null, false);
+            } catch (InvocationTargetException e1) {
+                fail("Failed iterate(Collection, null, false) test");
+            }
+
+            arrayIndex = 0;
+            successTest = true;
+            try {
+                ArrayUtil.iterate(array,
+                        new IteratingRunner<Object>() {
+                    @Override
+                    public void run(Object arg) {
+                        if ( successTest && arg != array[arrayIndex++] ) {
+                            successTest = false;
+                        }
+                    }
+                },
+                true);
+                if ( !successTest ) {
+                    fail("Failed iterate(Collection, IteratingRunner, true) test");
+                }
+            } catch (InvocationTargetException e) {
+                fail("Failed iterate(Collection, IteratingRunner, true) test");
+            }
+
+            arrayIndex = 0;
+            successTest = true;
+            try {
+                ArrayUtil.iterate(array,
+                        new IteratingRunner<Object>() {
+                    @Override
+                    public void run(Object arg) {
+                        if ( arg == null ) {
+                            successTest = false;
+                            return;
+                        }
+                        if ( successTest ) {
+                            for ( int i = arrayIndex ; i < array.length ; i++ ) {
+                                if( array[i] == null ) {
+                                    continue;
+                                }
+                                if ( arg != array[i] ) {
+                                    successTest = false;
+                                    return;
+                                }
+                                else {
+                                    arrayIndex = ++i;
+                                }
+                            }
+                        }
+                    }
+                },
+                false);
+                if ( !successTest ) {
+                    fail("Failed iterate(Collection, IteratingRunner, false) test");
+                }
+            } catch (InvocationTargetException e) {
+                fail("Failed iterate(Collection, IteratingRunner, false) test");
+            }
+        }
+    }
+
+
+    /**
+     * Test {@link ArrayUtil#convertToWrapper(char[])}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ArrayUtil#convertToWrapper(char[])
+     */
+    @Test
+    public void test_convertToWrapper() throws Exception
+    {
+        final char[] input = "hello".toCharArray();
+        final Character[] ret = ArrayUtil.convertToWrapper( input );
+
+        assertEquals( input.length, ret.length );
+    }
+
+    /**
+     * Test {@link ArrayUtil#filter(Object[], IteratingAcceptor, boolean)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ArrayUtil#filter(Object[], IteratingAcceptor, boolean)
+     */
+    @Test
+    public void test_filter() throws Exception
+    {
+        final Character[] input = ArrayUtil.convertToWrapper( "hello".toCharArray() );
+
+        assertTrue( Arrays.equals(
+                new Character[] { 'l', 'l' },
+                ArrayUtil.filter( input, new IteratingAcceptor<Character>() {
+                        public boolean accept( Character arg)
+                        {
+                            return ( 'l' == arg );
+                        }
+                }, true )
+        ) );
+    }
+
+    @Test
+    public void test_toObjectArray() {
+        final Object[][] inputArray = new Object[][]{
+                null,
+                new String[]{"hello", "test", "java"},
+                new Integer[]{10, 20, 30},
+                {10,20,30},
+                {true, false, true},
+                {true, 10, false},
+                new Object[]{"hello", 10, 5},
+                new Object[]{5, "java", 5},
+                new Object[]{null, "hello", 10},
+                new Object[]{null, null, null},
+                new Object[]{ }
+        };
+
+        final int inputInt[] = {10,20,30};
+        final boolean inputBool[] = {true, false, false};
+
+        Object[] actualData = null;
+
+        for ( Object[] input : inputArray ) {
+            actualData = ArrayUtil.toObjectArray(input);
+            if ( (input == null || input.length == 0) ) {
+                if ( actualData.length != 0 ) {
+                    fail("Failed toObjectArray(object) test");
+                }
+            }
+            else {
+                if ( input != actualData) {
+                    fail("Failed toObjectArray(object) test");
+                }
+            }
+        }
+
+        actualData = ArrayUtil.toObjectArray(inputInt);
+        if ( !(actualData instanceof Integer[]) ) {
+            fail("Failed toObjectArray(int[]) test");
+        }
+        actualData = ArrayUtil.toObjectArray(inputBool);
+        if ( !(actualData instanceof Boolean[]) ) {
+            fail("Failed toObjectArray(boolean[]) test");
+        }
+    }
+
+    @Test
+    public void test_size_primitive(){
+        final boolean[][] inputBool = {
+                null,
+                {false},
+                {true, true},
+        };
+        final byte[][] inputByte = {
+                null,
+                {0x00},
+                {0x1a, 0x10},
+        };
+        final char[][] inputChar = {
+                null,
+                {'a'},
+                {'a', 'b'}
+        };
+        final short[][] inputShort = {
+                null,
+                {1},
+                {10, 20}
+        };
+        final int[][] inputInt = {
+                null,
+                {100},
+                {200, 300}
+        };
+        final long[][] inputLong = {
+                null,
+                {100l},
+                {200l, 300l}
+        };
+        final float[][] inputFloat = {
+                null,
+                {100f},
+                {200f, 300f}
+        };
+        final double[][] inputDouble = {
+                null,
+                {100d},
+                {200d, 300d}
+        };
+        int size = 0;
+
+        for ( boolean[] input : inputBool ) {
+            size = ArrayUtil.size(input);
+            if ( input == null ) {
+                if ( size != 0 ) {
+                    fail("Failed size(boolean[]) test");
+                }
+            }
+            else {
+                assertEquals(input.length, ArrayUtil.size(input));
+            }
+        }
+
+        for ( byte[] input : inputByte ) {
+            size = ArrayUtil.size(input);
+            if ( input == null ) {
+                if ( size != 0 ) {
+                    fail("Failed size(byte[]) test");
+                }
+            }
+            else {
+                assertEquals(input.length, ArrayUtil.size(input));
+            }
+        }
+
+        for ( char[] input : inputChar ) {
+            size = ArrayUtil.size(input);
+            if ( input == null ) {
+                if ( size != 0 ) {
+                    fail("Failed size(char[]) test");
+                }
+            }
+            else {
+                assertEquals(input.length, ArrayUtil.size(input));
+            }
+        }
+
+        for ( short[] input : inputShort ) {
+            size = ArrayUtil.size(input);
+            if ( input == null ) {
+                if ( size != 0 ) {
+                    fail("Failed size(short[]) test");
+                }
+            }
+            else {
+                assertEquals(input.length, ArrayUtil.size(input));
+            }
+        }
+
+        for ( int[] input : inputInt ) {
+            size = ArrayUtil.size(input);
+            if ( input == null ) {
+                if ( size != 0 ) {
+                    fail("Failed size(int[]) test");
+                }
+            }
+            else {
+                assertEquals(input.length, ArrayUtil.size(input));
+            }
+        }
+
+        for ( long[] input : inputLong ) {
+            size = ArrayUtil.size(input);
+            if ( input == null ) {
+                if ( size != 0 ) {
+                    fail("Failed size(long[]) test");
+                }
+            }
+            else {
+                assertEquals(input.length, ArrayUtil.size(input));
+            }
+        }
+
+        for ( float[] input : inputFloat ) {
+            size = ArrayUtil.size(input);
+            if ( input == null ) {
+                if ( size != 0 ) {
+                    fail("Failed size(float[]) test");
+                }
+            }
+            else {
+                assertEquals(input.length, ArrayUtil.size(input));
+            }
+        }
+
+        for ( double[] input : inputDouble ) {
+            size = ArrayUtil.size(input);
+            if ( input == null ) {
+                if ( size != 0 ) {
+                    fail("Failed size(double[]) test");
+                }
+            }
+            else {
+                assertEquals(input.length, ArrayUtil.size(input));
+            }
+        }
+    }
+
+    @Test
+    public void test_size() {
+        final Object[][] inputArray = new Object[][]{
+                null,
+                new String[]{"hello", "test", "java"},
+                new Integer[]{10, 20, 30},
+                {10,20,30},
+                {true, false, true},
+                {true, 10, false},
+                new Object[]{"hello", 10, 5},
+                new Object[]{5, "java", 5},
+                new Object[]{null, "hello", 10},
+                new Object[]{null, null, null},
+                new Object[]{ }
+        };
+        final int inputInt[] = {10,20,30};
+        final boolean inputBool[] = {true, false, false};
+
+        int size = 0;
+        int size2 = 0;
+        for ( Object[] input : inputArray ) {
+            size = ArrayUtil.size(input);
+            if ( input == null || input.length == 0 ) {
+                if (size != 0) {
+                    fail("Failed size(T[]) test");
+                }
+            }
+            else {
+                assertEquals(input.length, size);
+            }
+
+            size2 = ArrayUtil.size((Object)input);
+            if ( input == null || input.length == 0 ) {
+                if (size2 != 0) {
+                    fail("Failed size(T[]) test");
+                }
+            }
+            else {
+                assertEquals(input.length, size2);
+            }
+        }
+
+        assertEquals("Failed size(Object) test", inputInt.length, ArrayUtil.size((Object)inputInt));
+        assertEquals("Failed size(Object) test", inputInt.length, ArrayUtil.size((Object)inputBool));
+    }
+
+    @Test
+    public void test_add() {
+        final Object[][] inputArray = new Object[][]{
+                null,
+                new String[]{"hello", "test", "java"},
+                new Integer[]{10, 20, 30},
+                {10,20,30},
+                {true, false, true},
+                {true, 10, false},
+                new Object[]{"hello", 10, 5},
+                new Object[]{5, "java", 5},
+                new Object[]{null, "hello", 10},
+                new Object[]{null, null, null},
+                new Object[]{ }
+        };
+        final Object[] inputAddArg = new Object[]{
+                null,
+                "hello",
+                10,
+                true
+        };
+
+
+        for ( Object[] input : inputArray ) {
+            for ( Object arg : inputAddArg ) {
+                Object[] actualData = null;
+                try {
+                    actualData = ArrayUtil.add(input, arg);
+                } catch (ArrayStoreException e) {
+                    if ( input == null ) {
+                        fail("Failed add(T[], Object) test");
+                    }
+                    if ( arg.getClass().getName().equals(input[0].getClass().getName()) ) {
+                        fail("Failed add(T[], Object) test");
+                    }
+                    continue;
+                }
+                if ( input == null || input.length == 0 ) {
+                    assertEquals(1, actualData.length);
+                    assertEquals(arg, actualData[0]);
+                }
+                else {
+                    assertEquals(input.length + 1 , actualData.length);
+                    assertEquals(arg, actualData[input.length]);
+                }
+            }
+        }
+    }
+
+    @Test
+    public void test_remove() {
+
+        assertArrayEquals( new String[] { "a", "b", "c" }, ArrayUtil.remove( new String[] { "a", "b", "c" }, -1 ) );
+        assertArrayEquals( new String[] { "b", "c" }, ArrayUtil.remove( new String[] { "a", "b", "c" }, 0 ) );
+        assertArrayEquals( new String[] { "a", "c" }, ArrayUtil.remove( new String[] { "a", "b", "c" }, 1 ) );
+        assertArrayEquals( new String[] { "a", "b" }, ArrayUtil.remove( new String[] { "a", "b", "c" }, 2 ) );
+        assertArrayEquals( new String[] { "a", "b", "c" }, ArrayUtil.remove( new String[] { "a", "b", "c" }, 3 ) );
+
+        assertArrayEquals( new String[] { "a", "b", "c" }, ArrayUtil.remove( new String[] { "a", "b", "c" }, -1, 0 ) );
+        assertArrayEquals( new String[] { "b", "c" }, ArrayUtil.remove( new String[] { "a", "b", "c" }, 0, 1 ) );
+        assertArrayEquals( new String[] { "a", "c" }, ArrayUtil.remove( new String[] { "a", "b", "c" }, 1, 2 ) );
+        assertArrayEquals( new String[] { "a", "b" }, ArrayUtil.remove( new String[] { "a", "b", "c" }, 2, 3 ) );
+        assertArrayEquals( new String[] { "a", "b", "c" }, ArrayUtil.remove( new String[] { "a", "b", "c" }, 3, 4 ) );
+
+        assertArrayEquals( new String[] { "c" }, ArrayUtil.remove( new String[] { "a", "b", "c" }, -1, 2 ) );
+
+        final Object[][] inputArray = new Object[][]{
+                new String[]{"hello", "test", "java", "c", "c++", "junit", "time"},
+                new Integer[]{10, 20, 30, 40, 50, 60, 70, 80, 90},
+                {10, 20, 30, 40, 50, 60, 70, 80, 90, 100},
+                {true, false, true, true, false, true, false},
+                {true, 10, false, 20, "test", "java", 30},
+                new Object[]{"hello", 10, 5, 20, 30, true},
+                new Object[]{5, "java", 5},
+                new Object[]{null, "hello", 10},
+                new Object[]{null, null, null},
+                new Object[]{ }
+        };
+        
+        try
+        {
+            ArrayUtil.remove( null, 0, 1 );
+            fail();
+        }
+        catch( final IllegalArgumentException e )
+        {
+            LoggerFactory.getLogger( getClass() ).info( "Test case successfult" );
+        }
+        
+        for ( Object[] input : inputArray ) {
+            for ( int i = -1 ; i < 10 ; i++ ) {
+                for( int j = i ; j < 10 ; j++ ) {
+                    int deleteCount = 0;
+                    try {
+                        Object[] actualData = ArrayUtil.remove( input, i, j);
+                        i = Math.max( 0, i );
+                        if( j <= i) {
+                            assertArrayEquals(input , actualData);
+                        }
+                        else {
+                            deleteCount = j - i;
+                            for ( int k = 0 ; k < actualData.length ; k++ ) {
+                                if ( k >= i ) {
+                                    assertEquals(
+                                            "K:" + k + ", J:" + j + ", I:" +i + ", Input :" + input[k + deleteCount] + ", Actual :" + actualData[k],
+                                            input[k+deleteCount], actualData[k]);
+                                }
+                                else {
+                                    assertEquals(
+                                            "K:" + k + ", J:" + j + ", I:" +i + ", Input :" + input[k] + ", Actual :" + actualData[k],
+                                            input[k], actualData[k]);
+                                }
+
+                            }
+                        }
+                    }
+                    catch ( ArrayIndexOutOfBoundsException e ) {
+                        if ( j >= input.length || i >= input.length ) {
+                            continue;
+                        }
+                        else {
+                            fail("Failed remove(Object[], i : " + i + " , j : " + j + ") test");
+                        }
+                    }
+                    catch ( IllegalArgumentException e ) {
+                        if ( i >= j ) {
+                            continue;
+                        }
+                        else {
+                            fail("Failed remove(Object[], int, int) test");
+                        }
+                    }
+                    catch (NegativeArraySizeException e) {
+                        if ( input.length < j - i ) {
+                            continue;
+                        }
+                        else {
+                            fail("Failed remove(Object[], int, int) test");
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    @Test
+    public void test_contains() {
+        final Object[][] inputArray = new Object[][]{
+                null,
+                new String[]{"hello", "test", "java"},
+                new Integer[]{10, 20, 30},
+                {10,20,30},
+                {true, false, true},
+                {true, 10, false},
+                new Object[]{"hello", 10, 5},
+                new Object[]{5, "java", 5},
+                new Object[]{null, "hello", 10},
+                new Object[]{null, null, null},
+                new Object[]{ }
+        };
+        final Object[] inputElement = new Object[]{
+                10583,
+                "zxcvb",
+        };
+
+        boolean actualData = true;
+
+        for ( Object[] input : inputArray ) {
+            if ( input == null ) {
+                actualData = ArrayUtil.contains(input, "blah");
+                assertEquals( false, actualData );
+            }
+            else {
+                for ( Object element : input) {
+                    actualData = ArrayUtil.contains(input, element);
+                    assertEquals( true, actualData );
+                }
+            }
+            for ( Object element : inputElement ) {
+                actualData = ArrayUtil.contains(input, element);
+                assertEquals( false, actualData );
+            }
+        }
+    }
+
+    @Test
+    public void test_get() {
+        final Object[][] inputArray = new Object[][]{
+                null,
+                new String[]{"hello", "test", "java"},
+                new Integer[]{10, 20, 30},
+                {10,20,30},
+                {true, false, true},
+                {true, 10, false},
+                new Object[]{"hello", 10, 5},
+                new Object[]{5, "java", 5},
+                new Object[]{null, "hello", 10},
+                new Object[]{null, null, null},
+                new Object[]{ }
+        };
+
+        for( Object[] input : inputArray) {
+            if ( input == null || input.length == 0 ) {
+                assertEquals( null, ArrayUtil.get(input, -1) );
+                assertEquals( null, ArrayUtil.get(input, 0) );
+            }
+            else {
+                assertEquals(null, ArrayUtil.get(input, -1) );
+                assertEquals( input[0], ArrayUtil.get(input, 0) );
+                assertEquals(null, ArrayUtil.get(input, input.length + 1) );
+            }
+        }
+    }
+    
+    public
+    void
+    test_safe()
+    throws Exception
+    {
+        final String[][] TEST_CASES = new String[][] {
+            null,
+            new String[] { null, "aaa" },
+            new String[] { "hello", "world" },
+        };
+        
+        for ( final String[] TEST_CASE : TEST_CASES )
+        {
+            assertNotNull( safe( TEST_CASE ) );
+            for ( final String value : safe( TEST_CASE ) )
+            {
+                assertTrue( "value :" + value, true );
+            }
+        }
+        
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/AssertTest.java b/org.tizen.common/test/src/org/tizen/common/util/AssertTest.java
new file mode 100644 (file)
index 0000000..22ed64d
--- /dev/null
@@ -0,0 +1,158 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import org.junit.Test;
+
+/**
+ * AssertTest
+ *
+ * Test case for {@link Assert}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see Assert
+ */
+public class
+AssertTest
+{
+       /**
+        * Test {@link Assert#fail(String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Assert#fail(String)}
+        */
+       @Test
+       public
+       void
+       test_fail()
+       throws Exception
+       {
+               try
+               {
+                       Assert.fail( "Hello" );
+                       fail();
+               }
+               catch ( final IllegalArgumentException e )
+               {
+                       assertEquals( "Hello", e.getMessage() );
+               }
+       }
+
+       /**
+        * Test {@link Assert#isTrue(boolean)} and
+        * {@link Assert#isTrue(boolean, String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Assert#isTrue(boolean)}
+        * @see {@link Assert#isTrue(boolean, String)}
+        */
+       @Test
+       public
+       void 
+       test_assertTrue()
+       throws Exception
+       {
+               int a = 5;
+               int b = 2;
+               Assert.isTrue( 3 == a-b, "Good case" );
+               
+               Assert.isTrue( 3 == a-b );
+               Assert.isTrue( "abc".equals( "abc" ) );
+               try
+               {
+                       Assert.isTrue( 3==4 );
+                       fail();
+               }
+               catch ( final IllegalArgumentException e )
+               {
+               }
+               
+       }
+
+       /**
+        * Test {@link Assert#assertFalse(boolean)} and
+        * {@link Assert#assertFalse(boolean, String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Assert#assertFalse(boolean)}
+        * @see {@link Assert#assertFalse(boolean, String)}
+        */
+       @Test
+       public void
+       test_assertFalse()
+       throws Exception
+       {
+               Assert.isFalse( 3 == 4, "Assertion passed" );
+               Assert.isFalse( 3 == 4 );
+       }
+       
+       /**
+        * Test {@link Assert#isNull(Object)} and
+        * {@link Assert#isNull(Object, String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Assert#isNull(Object)}
+        * @see {@link Assert#isNull(Object, String)}
+        */
+       @Test
+       public
+       void
+       test_assertNull()
+       throws Exception
+       {
+               Assert.isNull( null );
+               Assert.isNull( null, "Assertion passed" );
+       }
+       
+       /**
+        * Test {@link Assert#notNull(boolean)} and
+        * {@link Assert#notNull(boolean, String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Assert#notNull(boolean)}
+        * @see {@link Assert#notNull(boolean, String)}
+        */
+       @Test
+       public
+       void
+       test_notNull()
+       throws Exception
+       {
+               
+               Assert.notNull( new Object() );
+               Assert.notNull( "Hello", "Assertion passed" );
+               
+       }
+       
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/CipherUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/CipherUtilTest.java
new file mode 100644 (file)
index 0000000..f518d37
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Ho Namkoong <ho.namkoong@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * CipherUtilTest
+ *
+ * Test case for {@link CipherUtil}
+ * 
+ * @author Ho Namkoong{@literal <ho.namkoong@samsung.com>} (S-Core)
+ * 
+ * @see CipherUtil
+ */
+public class CipherUtilTest {
+
+    /**
+     * Original password list which should be encrypted
+     */
+    private static final String[] passList = {"1234", "wiehj2j3hxcgf", "0932hsdhgfasdf", "kj2h3ejaswdas"};
+    
+    /**
+     * Encrypted password
+     */
+    private String[] encryptedPassList = new String[passList.length];
+    
+    /**
+     * Decrypted password
+     */
+    private String[] decryptedPassList = new String[passList.length];
+    
+    /**
+     * Test {@link CipherUtil#getEncryptedString(String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see CipherUtil#getEncryptedString(String)
+     */
+    private void test_getEncryptedBase64String() throws Exception {
+        for (int i = 0; i < passList.length; i++) {
+            encryptedPassList[i] = CipherUtil.getEncryptedString(passList[i]);
+            Assert.assertNotNull(encryptedPassList[i]);
+        }
+    }
+    
+    /**
+     * Test {@link CipherUtil#getDecryptedString(String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see CipherUtil#getDecryptedString(String)
+     */
+    private void test_getDecryptedString() throws Exception {
+        for(int i=0; i<encryptedPassList.length;i++) {
+            decryptedPassList[i] = CipherUtil.getDecryptedString(encryptedPassList[i]);
+            Assert.assertNotNull(decryptedPassList[i]);
+        }
+    }
+    
+    @Test
+    public void test_cipher() throws Exception {
+        this.test_getEncryptedBase64String();
+        this.test_getDecryptedString();
+        
+        for (int i = 0; i < passList.length; i++) {
+            Assert.assertTrue(passList[i].equals(decryptedPassList[i]));
+        }
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/CollectionMapTest.java b/org.tizen.common/test/src/org/tizen/common/util/CollectionMapTest.java
new file mode 100644 (file)
index 0000000..95c6140
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Arrays;
+
+import org.junit.Test;
+
+
+/**
+ * CollectionMapTest
+ *
+ * Test case for {@link CollectionMap}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see CollectionMap
+ */
+public class
+CollectionMapTest
+{
+       /**
+        * Test {@link CollectionMap#put(Object, Object)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see CollectionMap#put(Object, Object)
+        */
+       public
+       void
+       test_put()
+       throws Exception {
+               final CollectionMap<String, String> map = new CollectionMap<String, String>();
+               
+               map.put( "hello", "world1" );
+               
+               assertEquals( Arrays.asList( "world1" ), map.get( "hello" ) );
+               map.put( "hello", "world2" );
+               assertEquals( Arrays.asList( "world1", "world2" ), map.get( "hello" ) );
+       }
+       
+       
+       /**
+        * Test {@link CollectionMap#get(Object)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see CollectionMap#get(Object)
+        */
+       @Test
+       public
+       void
+       test_get()
+       throws Exception
+       {
+               final CollectionMap<String, String> map = new CollectionMap<String, String>();
+               
+               map.put( "hello", "world1" );
+               
+               assertEquals( Arrays.asList( "world1" ), map.get( "hello" ) );
+               map.put( "hello", "world2" );
+               assertEquals( Arrays.asList( "world1", "world2" ), map.get( "hello" ) );
+       }
+       
+       /**
+        * Test {@link CollectionMap#remove(Object)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see CollectionMap#remove(Object)
+        */
+       @Test
+       public
+       void
+       test_remove()
+       throws Exception
+       {
+               final CollectionMap<String, String> map = new CollectionMap<String, String>();
+               
+               map.put( "hello", "world1" );
+               map.put( "hello", "world2" );
+               assertEquals( Arrays.asList( "world1", "world2" ), map.get( "hello" ) );
+
+               map.remove( "hello", "world1" );
+               assertEquals( Arrays.asList( "world2" ), map.get( "hello" ) );
+               map.remove( "hello", "world1" );
+               assertEquals( Arrays.asList( "world2" ), map.get( "hello" ) );
+               map.remove( "hello", "world2" );
+               assertEquals( null, map.get( "hello" ) );
+       }
+       
+
+       /**
+        * Test {@link CollectionMap#toString()}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see CollectionMap#toString()
+        */
+       @Test
+       public
+       void
+       test_toString()
+       throws Exception
+       {
+               final CollectionMap<String, String> map = new CollectionMap<String, String>();
+               map.put( "a", "b" );
+               map.put( "a", "c" );
+               
+               assertEquals( "CollectionMap[a=[b, c]]", map.toString() );
+               
+               map.put( "c", "d" );
+               assertEquals( "CollectionMap[a=[b, c], c=[d]]", map.toString() );
+       }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/CollectionUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/CollectionUtilTest.java
new file mode 100755 (executable)
index 0000000..fc38008
--- /dev/null
@@ -0,0 +1,1027 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedMap;
+import java.util.SortedSet;
+import java.util.TreeMap;
+import java.util.TreeSet;
+import java.util.Vector;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.junit.Test;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * CollectionUtilsTest
+ *
+ * Test case for {@link CollectionUtil}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ * 
+ * @see CollectionUtil
+ */
+public class
+CollectionUtilTest
+{
+    /**
+     * Test {@link CollectionUtil#isEmpty(java.util.Collection)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see CollectionUtil#isEmpty(java.util.Collection)
+     */
+    @Test
+    @SuppressWarnings("serial")
+    public void test_isEmpty() throws Exception
+    {
+        assertTrue( CollectionUtil.isEmpty( null ) );
+        assertTrue( CollectionUtil.isEmpty( new HashSet<Object>() ) );
+        assertTrue( CollectionUtil.isEmpty( new HashMap<String, Object>().keySet() ) );
+        assertFalse( CollectionUtil.isEmpty( new ArrayList<Object>() {{ add("Hello"); }} ) );
+        assertFalse( CollectionUtil.isEmpty( new ArrayList<Object>( Arrays.asList( "Hello" ) ) ) );
+    }
+
+    /**
+     *  Test {@link CollectionUtil#size(java.util.Collection)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see CollectionUtil#size(java.util.Collection)
+     */
+    @SuppressWarnings("unchecked")
+       @Test
+    public void test_size() throws Exception
+    {
+        assertEquals( 0, CollectionUtil.size( null ) );
+
+        /* Mock Object using Mockito */
+        final ArrayList<Object> list = mock( ArrayList.class );
+
+        when( list.size() ).thenReturn( 3 );
+        assertEquals( 3, CollectionUtil.size(list) );
+        verify( list ).size();
+
+        final HashMap<String, Object> map = new HashMap<String, Object>();
+        assertEquals( 0, CollectionUtil.size( map.keySet() ) );
+
+        map.put("Hello", 1);
+        map.put("Tizen", 2);
+        assertEquals( 2, CollectionUtil.size( map.keySet() ) );
+    }
+
+    /**
+     * Test {@link CollectionUtil#iterate(java.util.Collection, IteratingRunner)}
+     * and {@link CollectionUtil#iterate(java.util.Collection, IteratingRunner, boolean)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see {@link CollectionUtil#iterate(java.util.Collection, IteratingRunner)}
+     * @see {@link CollectionUtil#iterate(java.util.Collection, IteratingRunner, boolean)}
+     */
+    @Test
+    public void test_iterate() throws Exception
+    {
+        final AtomicInteger count = new AtomicInteger();
+
+        CollectionUtil.iterate(
+                new ArrayList<String>( Arrays.asList(
+                        "hello", "Hello", "World", null, "Test"
+                ) ),
+                new IteratingRunner<String>()
+                {
+                    public void run(String arg)
+                    {
+                        if ( Character.isUpperCase( arg.charAt( 0 ) ) )
+                        {
+                            count.incrementAndGet();
+                        }
+                    }
+                }
+        );
+
+        assertEquals( 3, count.get() );
+
+        count.set( 0 );
+        CollectionUtil.iterate(
+                new ArrayList<String>( Arrays.asList(
+                        "hello", "Hello", "World", null, "Test"
+                ) ),
+                new IteratingRunner<String>()
+                {
+                    public void run( final String arg)
+                    {
+                        throw new IllegalStateException();
+                    }
+                },
+                true
+        );
+        assertEquals( 0, count.get() );
+    }
+
+    /**
+     * Test {@link CollectionUtil#filter(java.util.Collection, java.util.Collection, IteratingAcceptor, boolean)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see {@link CollectionUtil#filter(java.util.Collection, java.util.Collection, IteratingAcceptor, boolean)}
+     */
+    @Test
+    public void test_filter() throws Exception
+    {
+        final ArrayList<String> results = new ArrayList<String>();
+
+        CollectionUtil.filter(
+                null,
+                results,
+                new IteratingAcceptor<String>()
+                {
+                    @Override
+                    public boolean accept(String arg) {
+                        return true;
+                    }
+                },
+                true
+        );
+        assertEquals( 0, CollectionUtil.size(results) );
+
+        results.clear();
+        CollectionUtil.filter(
+                new ArrayList<String>( Arrays.asList(
+                        "hello", "Hello", "World", null, "Test"
+                ) ),
+                results,
+                new IteratingAcceptor<String>()
+                {
+                    @Override
+                    public boolean accept(String arg) {
+                        if ( arg != null && Character.isUpperCase( arg.charAt( 0 ) ) )
+                        {
+                            return true;
+                        }
+                        return false;
+                    }
+                },
+                true
+        );
+        assertEquals( 3, CollectionUtil.size(results) );
+
+        results.clear();
+        CollectionUtil.filter(
+                new ArrayList<String>( Arrays.asList(
+                        "hello", "Hello", "World", null, "Test"
+                ) ),
+                results,
+                new IteratingAcceptor<String>()
+                {
+                    @Override
+                    public boolean accept(String arg) {
+                        if ( arg != null && Character.isUpperCase( arg.charAt( 0 ) ) )
+                        {
+                            return true;
+                        }
+                        throw new IllegalStateException();
+                    }
+                },
+                true
+        );
+        assertEquals( 3, CollectionUtil.size(results) );
+    }
+
+    /**
+     * Test {@link CollectionUtil#pickupFirst(Collection)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see {@link CollectionUtil#pickupFirst(Collection)}
+     */
+    @Test
+    public void
+    test_pickupFirst()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+                new Object[] { null, null },
+                new Object[] { new Object[] { null }, null },
+                new Object[] { new Object[] { "hello", null }, "hello" },
+                new Object[] { new Object[] { null, "hello" }, null },
+                new Object[] { new Object[] { "A", "B" }, "A" },
+        };
+
+        int iTestCase = 0;
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+                       ++iTestCase;
+            final Object[] closeables = (Object[]) TEST_CASE[0];
+            final Object expected = (Object) TEST_CASE[1];
+
+            Collection<Object> collection = null;
+            if ( null != closeables )
+            {
+                collection = Arrays.asList( closeables );
+            }
+
+            assertEquals( iTestCase + " th test case", expected, CollectionUtil.pickupFirst( collection ) );
+        }
+    }
+
+    /**
+     * Test {@link CollectionUtil#pickupLast(Collection)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see {@link CollectionUtil#pickupLast(Collection)}
+     */
+    @Test
+    public void
+    test_pickupLast()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+                new Object[] { null, null },
+                new Object[] { new Object[] { null }, null },
+                new Object[] { new Object[] { "hello", null }, null },
+                new Object[] { new Object[] { null, "hello" }, "hello" },
+                new Object[] { new Object[] { "A", "B" }, "B" },
+        };
+
+        int iTestCase = 0;
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+                       ++iTestCase;
+            final Object[] closeables = (Object[]) TEST_CASE[0];
+            final Object expected = (Object) TEST_CASE[1];
+
+            Collection<Object> collection = null;
+            if ( null != closeables )
+            {
+                collection = Arrays.asList( closeables );
+            }
+
+            assertEquals( iTestCase + " th test case", expected, CollectionUtil.pickupLast( collection ) );
+        }
+    }
+
+    /**
+     * Test {@link CollectionUtil#iterator(Enumeration)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see {@link CollectionUtil#iterator(Enumeration)}
+     */
+    @Test
+    public
+    void
+    test_iterator()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+                new Object[] { null },
+                new Object[] { "hello" },
+                new Object[] { null, "hello" },
+                new Object[] { "A", "B" },
+        };
+
+        int iTestCase = 0;
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+                       ++iTestCase;
+            final Object[] array = TEST_CASE;
+            final Vector<Object> list = new Vector<Object>( Arrays.asList( array ) );
+            final Iterator<Object> iter = list.iterator();
+            final Enumeration<Object> enumeration = list.elements();
+
+            final Iterator<Object> testTarget = CollectionUtil.iterator( enumeration );
+            int iElement = 0;
+            while ( iter.hasNext() && testTarget.hasNext() )
+            {
+                assertEquals( iTestCase + " th test case :" + (++iElement) + " th element", iter.next(), testTarget.next() );
+            }
+            assertEquals( iter.hasNext(), testTarget.hasNext() );
+        }
+    }
+
+    /**
+     * Test {@link CollectionUtil#asList(Object)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see {@link CollectionUtil#asList(Object)}
+     */
+    @Test
+    public
+    void
+    test_asList()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+                new Object[] { null, null },
+                new Object[] { new Object[] { null }, null },
+                new Object[] { new Object[] { "hello", null }, null },
+                new Object[] { new Object[] { null, "hello" }, "hello" },
+                new Object[] { new Object[] { "A", "B" }, "B" },
+        };
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            assertTrue( CollectionUtil.asList(TEST_CASE) instanceof List );
+        }
+    }
+
+    /**
+     * Test {@link CollectionUtil#mergeArrayIntoCollection(Object, Collection)}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#mergeArrayIntoCollection(Object, Collection)}
+     */
+    @Test
+    public
+    void
+    test_mergeArrayIntoCollection()
+    throws Exception
+    {
+        final ArrayList<Object> list = new ArrayList<Object>();
+        list.add( "Tizen" );
+        list.add( "Test" );
+
+        final Object[][] TEST_CASES = new Object[][] {
+                new Object[] { null, null },
+                new Object[] { new Object[] { null }, null },
+                new Object[] { new Object[] { "hello", null }, null },
+                new Object[] { new Object[] { null, "hello" }, "hello" },
+                new Object[] { new Object[] { "A", "B" }, "B" },
+        };
+
+        try {
+            CollectionUtil.mergeArrayIntoCollection( TEST_CASES[0], null );
+            fail( "mergeArrayIntoCollection must throw exception" );
+        } catch ( IllegalArgumentException e) {
+            LoggerFactory.getLogger( getClass() ).info( "Test case successful" );
+        }
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final int count = TEST_CASE.length + CollectionUtil.size( list );
+            CollectionUtil.mergeArrayIntoCollection( TEST_CASE, list );
+            assertEquals( count, CollectionUtil.size( list ) );
+        }
+    }
+
+    /**
+     * Test {@link CollectionUtil#contains(Collection, Object)}
+     * and {@link CollectionUtil#contains(Enumeration, Object)}
+     * and {@link CollectionUtil#contains(Iterator, Object)}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#contains(Collection, Object)}
+     * @see {@link CollectionUtil#contains(Enumeration, Object)}
+     * @see {@link CollectionUtil#contains(Iterator, Object)}
+     */
+    @Test
+    public
+    void
+    test_contains()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+                new Object[] { null },
+                new Object[] { "hello" },
+                new Object[] { null, "hello" },
+                new Object[] { "Tizen", "Test" },
+        };
+
+        assertFalse( CollectionUtil.contains( (Collection<Object>)null , null) );
+        assertFalse( CollectionUtil.contains( (Enumeration<Object>)null , null) );
+        assertFalse( CollectionUtil.contains( (Iterator<Object>)null , null) );
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final Object[] array = TEST_CASE;
+            final Vector<Object> list = new Vector<Object>( CollectionUtil.asList( array ) );
+            final Enumeration<Object> enumeration = list.elements();
+            final Iterator<Object> iter = CollectionUtil.iterator( list.elements() );
+            final Object element = list.get(0);
+            final Object element2 = "False";
+
+            assertTrue( CollectionUtil.contains( list, element ) );
+            assertTrue( CollectionUtil.contains( enumeration, element ) );
+            assertTrue( CollectionUtil.contains( iter, element ) );
+
+            assertFalse( CollectionUtil.contains( list, element2 ) );
+            assertFalse( CollectionUtil.contains( enumeration, element2 ) );
+            assertFalse( CollectionUtil.contains( iter, element2 ) );
+        }
+    }
+
+    /**
+     * Test {@link CollectionUtil#containsAny(Collection, Collection)}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#containsAny(Collection, Collection)}
+     */
+    @Test
+    public
+    void
+    test_containsAny()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+                new Object[] { null },
+                new Object[] { "hello" },
+                new Object[] { null, "hello" },
+                new Object[] { "Tizen", "Test" },
+        };
+
+        final ArrayList<String> candidates = new ArrayList<String>();
+        candidates.add(null);
+        candidates.add("hello");
+        candidates.add("Test");
+
+        final ArrayList<String> candidates2 = new ArrayList<String>();
+        candidates2.add("False");
+
+        final ArrayList<String> source = new ArrayList<String>();
+        source.add("Tizen");
+        source.add("Test");
+        source.add(null);
+
+        assertFalse( CollectionUtil.containsAny( (Collection<Object>)null , candidates) );
+        assertFalse( CollectionUtil.containsAny( source, (Collection<Object>)null ) );
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final Object[] array = TEST_CASE;
+            final Vector<Object> source2 = new Vector<Object>( CollectionUtil.asList( array ) );
+
+            assertTrue( CollectionUtil.containsAny( source2, candidates ) );
+            assertFalse( CollectionUtil.containsAny( source2, candidates2 ) );
+        }
+    }
+
+    /**
+     * Test {@link CollectionUtil#isApproximableCollectionType(Class)}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#isApproximableCollectionType(Class)}
+     */
+    @Test
+    public
+    void
+    test_isApproximableCollectionType()
+    throws Exception
+    {
+        final List<Class<?>> collectionTypeList = Arrays.asList( new Class<?>[] {
+                Collection.class,
+                Set.class, HashSet.class, SortedSet.class, LinkedHashSet.class, TreeSet.class,
+                List.class, LinkedList.class, ArrayList.class
+            } );
+
+        final List<Class<?>> mapTypeList = Arrays.asList( new Class<?>[] {
+                Map.class, SortedMap.class, HashMap.class, LinkedHashMap.class, TreeMap.class
+            } );
+
+        final List<Class<?>> generalTypeList = Arrays.asList( new Class<?>[] {
+                String.class, Integer.class, Exception.class, File.class
+            } );
+
+        assertFalse( CollectionUtil.isApproximableCollectionType( (Class<?>)null ) );
+
+        final Iterator<Class<?>> iter = collectionTypeList.iterator();
+        while( iter.hasNext() ) {
+            assertTrue( CollectionUtil.isApproximableCollectionType( iter.next() ) );
+        }
+
+        final Iterator<Class<?>> iter2 = mapTypeList.iterator();
+        while( iter2.hasNext() ) {
+            assertFalse( CollectionUtil.isApproximableCollectionType( iter2.next() ) );
+        }
+
+        final Iterator<Class<?>> iter3 = generalTypeList.iterator();
+        while( iter3.hasNext() ) {
+            assertFalse( CollectionUtil.isApproximableCollectionType( iter3.next() ) );
+        }
+    }
+
+    /**
+     * Test {@link CollectionUtil#isApproximableMapType(Class)}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#isApproximableMapType(Class)}
+     */
+    @Test
+    public
+    void
+    test_isApproximableMapType()
+    throws Exception
+    {
+        final List<Class<?>> collectionTypeList = Arrays.asList( new Class<?>[] {
+                Collection.class,
+                Set.class, HashSet.class, SortedSet.class, LinkedHashSet.class, TreeSet.class,
+                List.class, LinkedList.class, ArrayList.class
+            } );
+
+        final List<Class<?>> mapTypeList = Arrays.asList( new Class<?>[] {
+                Map.class, SortedMap.class, HashMap.class, LinkedHashMap.class, TreeMap.class
+            } );
+
+        final List<Class<?>> generalTypeList = Arrays.asList( new Class<?>[] {
+                String.class, Integer.class, Exception.class, File.class
+            } );
+
+        assertFalse( CollectionUtil.isApproximableMapType( (Class<?>)null ) );
+
+        final Iterator<Class<?>> iter = collectionTypeList.iterator();
+        while( iter.hasNext() ) {
+            assertFalse( CollectionUtil.isApproximableMapType( iter.next() ) );
+        }
+
+        final Iterator<Class<?>> iter2 = mapTypeList.iterator();
+        while( iter2.hasNext() ) {
+            assertTrue( CollectionUtil.isApproximableMapType( iter2.next() ) );
+        }
+
+        final Iterator<Class<?>> iter3 = generalTypeList.iterator();
+        while( iter3.hasNext() ) {
+            assertFalse( CollectionUtil.isApproximableMapType( iter3.next() ) );
+        }
+    }
+
+    /**
+     * Test {@link CollectionUtil#createApproximableCollection(Collection, int)}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#createApproximableCollection(Collection, int)}
+     */
+    @Test
+    public
+    void
+    test_createApproximableCollection()
+    throws Exception
+    {
+        final ArrayList<String> list = new ArrayList<String>( Arrays.asList(
+                "hello", "Hello", "World", null, "Test"
+                ) );
+
+        final HashMap<String, Object> map = new HashMap<String, Object>();
+        map.put("Hello", 1);
+        map.put("Tizen", 2);
+
+        Collection<?> result = CollectionUtil.createApproximableCollection( null, 5 );
+        assertTrue( CollectionUtil.isApproximableCollectionType( result.getClass() ) );
+        result.clear();
+
+        result = CollectionUtil.createApproximableCollection( list, 3 );
+        assertTrue( CollectionUtil.isApproximableCollectionType( result.getClass() ) );
+        result.clear();
+
+        result = CollectionUtil.createApproximableCollection( map.keySet(), 2 );
+        assertTrue( CollectionUtil.isApproximableCollectionType( result.getClass() ) );
+    }
+
+    /**
+     * Test {@link CollectionUtil#createApproximableMap(Map, int)}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#createApproximableMap(Map, int)}
+     */
+    @Test
+    public
+    void
+    test_createApproximableMap()
+    throws Exception
+    {
+        final HashMap<String, Object> map = new HashMap<String, Object>();
+        map.put("Hello", 1);
+        map.put("Tizen", 2);
+
+        Map<?,?> result = CollectionUtil.createApproximableMap( null, 5 );
+        assertTrue( CollectionUtil.isApproximableMapType( result.getClass() ) );
+        result.clear();
+
+        result = CollectionUtil.createApproximableMap( map, 1 );
+        assertTrue( CollectionUtil.isApproximableMapType( result.getClass() ) );
+    }
+
+    /**
+     * Test {@link CollectionUtil#toString(Object)}
+     * and {@link CollectionUtil#toString(boolean[])}
+     * and {@link CollectionUtil#toString(char[])}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#toString(Object)}
+     * @see {@link CollectionUtil#toString(boolean[])}
+     * @see {@link CollectionUtil#toString(char[])}
+     */
+    @Test
+    public
+    void
+    test_toString()
+    throws Exception
+    {
+        Object obj = (Object)new ArrayList<String>( Arrays.asList(
+                "hello", "Hello", "World", null, "Test"
+                ) );
+        boolean [] booleanArray = { true, false };
+        boolean [] booleanArray2 = {};
+        char [] charArray = { 'T', 'i', 'Z', 'e', 'N' };
+        char [] charArray2 = {};
+
+        // toString(Object)
+        String result = CollectionUtil.toString( (Object)null );
+        assertEquals( StringUtil.NULL_STRING, result);
+        result = CollectionUtil.toString( (Object)booleanArray );
+        assertEquals( "{true, false}", result );
+        result = CollectionUtil.toString( (Object)charArray );
+        assertEquals( "{T, i, Z, e, N}", result );
+        result = CollectionUtil.toString(obj);
+        assertEquals( "[hello, Hello, World, null, Test]", result);
+
+        // toString(boolean[])
+        result = CollectionUtil.toString( (boolean[])null );
+        assertEquals( StringUtil.NULL_STRING, result);
+        result = CollectionUtil.toString( booleanArray );
+        assertEquals( "{true, false}", result );
+        result = CollectionUtil.toString( booleanArray2 );
+        assertEquals( "{}", result );
+
+        // toString(char[])
+        result = CollectionUtil.toString( (char[])null );
+        assertEquals( StringUtil.NULL_STRING, result);
+        result = CollectionUtil.toString( charArray );
+        assertEquals( "{T, i, Z, e, N}", result );
+        result = CollectionUtil.toString( charArray2 );
+        assertEquals( "{}", result );
+        
+        assertEquals( "{true, false}", CollectionUtil.toString( new boolean[] { true, false } ) );
+        assertEquals( "{a, b}", CollectionUtil.toString( new Object[] { "a", "b" } ) );
+    }
+
+    /**
+     * Test {@link CollectionUtil#concatenate(Collection, String)}
+     * and {@link CollectionUtil#concatenate(Object[], String)}
+     * and {@link CollectionUtil#concatenate(Iterator, String)}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#concatenate(Collection, String)}
+     * @see {@link CollectionUtil#concatenate(Object[], String)}
+     * @see {@link CollectionUtil#concatenate(Iterator, String)}
+     */
+    @Test
+    public
+    void
+    test_concatenate()
+    throws Exception
+    {
+        final String separator = "$";
+
+        final Object[][] TEST_CASES = new Object[][] {
+                new Object[] {},
+                new Object[] { null },
+                new Object[] { "hello" },
+                new Object[] { null, "hello" },
+                new Object[] { "Tizen", "Test" },
+        };
+
+        assertEquals( StringUtil.NULL_STRING,
+                CollectionUtil.concatenate( (Object[])null, separator ) );
+        assertEquals( StringUtil.NULL_STRING,
+                CollectionUtil.concatenate( (Collection<Object>)null, separator) );
+        assertEquals( StringUtil.NULL_STRING,
+                CollectionUtil.concatenate( (Iterator<Object>)null, separator) );
+
+        int count = 0;
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            count++;
+            final Object[] array = TEST_CASE;
+            final Vector<Object> list = new Vector<Object>( CollectionUtil.asList( array ) );
+            Iterator<Object> iter = CollectionUtil.iterator( list.elements() );
+
+            switch (count) {
+                case 1:
+                    assertEquals( "{}",
+                            CollectionUtil.concatenate( array, separator ) );
+                    assertEquals( "{}",
+                            CollectionUtil.concatenate( list, separator ) );
+                    assertEquals( "{}",
+                            CollectionUtil.concatenate( iter, separator ) );
+                    break;
+                case 2:
+                    assertEquals( StringUtil.NULL_STRING,
+                            CollectionUtil.concatenate( array, separator ) );
+                    assertEquals( StringUtil.NULL_STRING,
+                            CollectionUtil.concatenate( list, separator ) );
+                    assertEquals( StringUtil.NULL_STRING,
+                            CollectionUtil.concatenate( iter, separator ) );
+                    break;
+                case 3:
+                    assertEquals( "hello",
+                            CollectionUtil.concatenate( array, separator ) );
+                    assertEquals( "hello",
+                            CollectionUtil.concatenate( list, separator ) );
+                    assertEquals( "hello",
+                            CollectionUtil.concatenate( iter, separator ) );
+                    break;
+                case 4:
+                    assertEquals( StringUtil.NULL_STRING+separator+"hello",
+                            CollectionUtil.concatenate( array, separator ) );
+                    assertEquals( StringUtil.NULL_STRING+separator+"hello",
+                            CollectionUtil.concatenate( list, separator ) );
+                    assertEquals( StringUtil.NULL_STRING+separator+"hello",
+                            CollectionUtil.concatenate( iter, separator ) );
+                    break;
+                case 5:
+                    assertEquals( "Tizen"+separator+"Test",
+                            CollectionUtil.concatenate( array, separator ) );
+                    assertEquals( "Tizen"+separator+"Test",
+                            CollectionUtil.concatenate( list, separator ) );
+                    assertEquals( "Tizen"+separator+"Test",
+                            CollectionUtil.concatenate( iter, separator ) );
+
+                    iter = CollectionUtil.iterator( list.elements() );
+                    assertEquals( "Tizen"+null+"Test",
+                            CollectionUtil.concatenate( array, null ) );
+                    assertEquals( "Tizen"+null+"Test",
+                            CollectionUtil.concatenate( list, null ) );
+                    assertEquals( "Tizen"+null+"Test",
+                            CollectionUtil.concatenate( iter, null ) );
+
+                    iter = CollectionUtil.iterator( list.elements() );
+                    assertEquals( "Tizen"+StringUtil.EMPTY_STRING+"Test",
+                            CollectionUtil.concatenate( array, StringUtil.EMPTY_STRING ) );
+                    assertEquals( "Tizen"+StringUtil.EMPTY_STRING+"Test",
+                            CollectionUtil.concatenate( list, StringUtil.EMPTY_STRING ) );
+                    assertEquals( "Tizen"+StringUtil.EMPTY_STRING+"Test",
+                            CollectionUtil.concatenate( iter, StringUtil.EMPTY_STRING ) );
+                    break;
+                default:
+                    break;
+            }
+
+        }
+    }
+
+    /**
+     * Test {@link CollectionUtil#hashCode(Object)}
+     * and {@link CollectionUtil#hashCode(boolean[])}
+     * and {@link CollectionUtil#hashCode(int[])}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#hashCode(Object)}
+     * @see {@link CollectionUtil#hashCode(boolean[])}
+     * @see {@link CollectionUtil#hashCode(int[])}
+     */
+    @Test
+    public
+    void
+    test_hashCode()
+    throws Exception
+    {
+        Object obj = (Object)new ArrayList<String>( Arrays.asList(
+                "hello", "Hello", "World", null, "Test"
+                ) );
+        boolean [] booleanArray = { true, false };
+        boolean [] booleanArray2 = {};
+        int [] intArray = { 1, 2, 3, 4, 5 };
+        int [] intArray2 = {};
+
+        // hashCode(Object)
+        assertEquals( 0, CollectionUtil.hashCode( (Object)null ) );
+        assertTrue( 0 != CollectionUtil.hashCode(obj) );
+        assertTrue( 0 != CollectionUtil.hashCode( (Object)booleanArray ) );
+        assertTrue( 0 != CollectionUtil.hashCode( (Object)booleanArray2) );
+        assertTrue( 0 != CollectionUtil.hashCode( (Object)intArray) );
+        assertTrue( 0 != CollectionUtil.hashCode( (Object)intArray2) );
+        assertEquals( CollectionUtil.hashCode(obj), CollectionUtil.hashCode(obj) );
+
+        // hashCode(boolean[])
+        assertEquals( 0, CollectionUtil.hashCode( (boolean[])null ) );
+        assertTrue( 0 != CollectionUtil.hashCode( booleanArray ) );
+        assertTrue( 0 != CollectionUtil.hashCode( booleanArray2) );
+        assertTrue( CollectionUtil.hashCode(booleanArray) != CollectionUtil.hashCode(booleanArray2) );
+        assertEquals( CollectionUtil.hashCode(booleanArray), CollectionUtil.hashCode(booleanArray) );
+
+        // hashCode(int[])
+        assertEquals( 0, CollectionUtil.hashCode( (int[])null ) );
+        assertTrue( 0 != CollectionUtil.hashCode( intArray ) );
+        assertTrue( 0 != CollectionUtil.hashCode( intArray2) );
+        assertTrue( CollectionUtil.hashCode(intArray) != CollectionUtil.hashCode(intArray2) );
+        assertEquals( CollectionUtil.hashCode(intArray),  CollectionUtil.hashCode(intArray));
+    }
+
+    /**
+     * Test {@link CollectionUtil#equals(Collection...)}
+     * and {@link CollectionUtil#equals(Object[]...)}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#equals(Collection...)}
+     * @see {@link CollectionUtil#equals(Object[]...)}
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public
+    void
+    test_equals()
+    throws Exception
+    {
+        final Object obj = (Object)new ArrayList<String>( Arrays.asList(
+                "hello", "Hello", "World", null, "Test"
+                ) );
+        final Object obj2 = (Object)Arrays.asList(
+                "hello", "Hello", "World", null, "Test"
+                );
+        final Boolean [] booleanArray = { true, false };
+        final Integer [] intArray = { 1, 2, 3, 4, 5 };
+        final Integer [] intArray2 = {};
+        final Object [] objectArray = { 1, 2, 3, 4, 5 };
+        final Object [] objectArray2 = { 1, 2, 3, 4, 5 };
+        final Vector<Object> list = new Vector<Object>( CollectionUtil.asList(objectArray) );
+
+        assertTrue( CollectionUtil.equals( (Object[])null, null) );
+        assertTrue( CollectionUtil.equals( (Collection<Object>)null, null) );
+
+        // equals(Object[]...)
+        assertTrue( CollectionUtil.equals( objectArray, objectArray2 ) );
+        assertTrue( CollectionUtil.equals( objectArray, (Object[])intArray ) );
+        assertFalse( CollectionUtil.equals( objectArray, (Object[])intArray2 ) );
+        assertFalse( CollectionUtil.equals( objectArray, (Object[])booleanArray ) );
+
+        // equals(COllection...)
+        assertTrue( CollectionUtil.equals( (Collection<?>)obj, (Collection<?>)obj2 ) );
+        assertFalse( CollectionUtil.equals( (Collection<?>)obj, (Collection<?>)list ) );
+    }
+
+    /**
+     * Test {@link CollectionUtil#swap(Object[], int, int)}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#swap(Object[], int, int)}
+     */
+    @Test
+    public
+    void
+    test_swap()
+    throws Exception
+    {
+        final Object [] objectArray = { 1, 2, 3, 4, 5 };
+
+        CollectionUtil.swap( objectArray, 0, 1 );
+        assertEquals( 2, objectArray[0] );
+        assertEquals( 1, objectArray[1] );
+
+        CollectionUtil.swap( objectArray, 1, 0 );
+        assertEquals( 1, objectArray[0] );
+        assertEquals( 2, objectArray[1] );
+
+        CollectionUtil.swap( objectArray, 0, 0 );
+        assertEquals( 1, objectArray[0] );
+        assertEquals( 2, objectArray[1] );
+
+        try {
+            CollectionUtil.swap( objectArray, 0, 5 );
+            fail( "swap must throw exception" );
+        } catch (Exception e) {
+            LoggerFactory.getLogger( getClass() ).info( "Test case successful" );
+        }
+
+        try {
+            CollectionUtil.swap( objectArray, -1, 0 );
+            fail( "swap must throw exception" );
+        } catch (Exception e) {
+            LoggerFactory.getLogger( getClass() ).info( "Test case successful" );
+        }
+
+        try {
+            CollectionUtil.swap( null, 0, 1 );
+            fail( "swap must throw exception" );
+        } catch (Exception e) {
+            LoggerFactory.getLogger( getClass() ).info( "Test case successful" );
+        }
+    }
+    
+    /**
+     * Test {@link CollectionUtil#isAvailableGenericTypeForCollection(Collection, Class)}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#resolveSetAsList(Set)}
+     */
+    @Test
+    public
+    void
+    test_isAvailableGenericTypeForCollection() {
+        ArrayList<Object> testList = new ArrayList<Object>();
+        
+        int result = CollectionUtil.isAvailableGenericTypeForCollection(testList, Object.class);
+        assertTrue(result == 0);
+        
+        testList.add(null);
+        result = CollectionUtil.isAvailableGenericTypeForCollection(testList, Object.class);
+        assertTrue(result == 0);
+        
+        testList.add("empty");
+        result = CollectionUtil.isAvailableGenericTypeForCollection(testList, File.class);
+        assertTrue(result == -1);
+        
+        result = CollectionUtil.isAvailableGenericTypeForCollection(testList, Object.class);
+        assertTrue(result == -1);
+        
+        result = CollectionUtil.isAvailableGenericTypeForCollection(testList, String.class);
+        assertTrue(result == 1);
+        
+        testList.add(new Object());
+        result = CollectionUtil.isAvailableGenericTypeForCollection(testList, Object.class);
+        assertTrue(result == 1);
+        
+        testList.remove(0);
+        result = CollectionUtil.isAvailableGenericTypeForCollection(testList, String.class);
+        assertTrue(result == 1);
+    }
+    
+    
+    
+    /**
+     * Test {@link CollectionUtil#resolveSetAsList(Set)}
+     * 
+     * @throws Exception is case of failure in test
+     * 
+     * @see {@link CollectionUtil#resolveSetAsList(Set)}
+     */
+    @Test
+    public
+    void
+    test_resolveSetAsList() {
+        LinkedHashSet<String> set = new LinkedHashSet<String>();
+        String[] stringArray= {"one", "two", "three", "four", "five"};
+        
+        for(String string: stringArray) {
+            set.add(string);
+        }
+        
+        List<String> result = CollectionUtil.resolveSetAsList(set);
+        
+        for(int i=0; i<stringArray.length; i++) {
+            System.out.println(i);
+            assertTrue(result.get(i).equals(stringArray[i]));
+        }
+    }
+}
+
diff --git a/org.tizen.common/test/src/org/tizen/common/util/EFSUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/EFSUtilTest.java
new file mode 100755 (executable)
index 0000000..7ca9108
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* Jihoon Song <jihoon80.song@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util;
+
+import java.net.URI;
+import java.net.URL;
+
+import org.junit.*;
+import org.tizen.common.Surrogate;
+import org.tizen.common.util.EFSUtil.DialogChoicer;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileInfo;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.filesystem.IFileSystem;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.swt.widgets.Shell;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.verify;
+
+/**
+ * EFSUtilTest.
+ * 
+ * Helper related to {@link EFSUtil}
+ * 
+ * @author Jihoon Song{@literal <jihoon80.song@samsung.com>} (S-Core)
+ * 
+ * @see EFSUtil
+ * 
+ */
+public class EFSUtilTest {
+    
+    /**
+     * Property key for URL handler
+     */
+    protected static final String PROP_PKG = "java.protocol.handler.pkgs";
+    
+    protected static final String TEST_PATH = "test";
+    protected static final String TEST_URL = "cp:///" + TEST_PATH;
+    
+    /**
+     * Old property value for URL handler
+     */
+    protected String oldConfig;
+    
+    
+    /**
+     * Set up URL handler and FileSystem before test
+     */
+    @Before
+    public void setUp() {
+        oldConfig = System.getProperty( PROP_PKG );
+        System.setProperty( PROP_PKG, "org.tizen.common.util.url" );
+        
+        // prevent recreation mock-up when called
+        final IFileSystem mockFileSystem = mock(IFileSystem.class);
+        
+        EFSUtil.setFileSystemSurrogate(new Surrogate<IFileSystem>() {
+            @Override
+            public IFileSystem getAdapter() {
+                return mockFileSystem;
+            }
+        });
+    }
+    
+    /**
+     * Restore URL handler after test
+     */
+    @After
+    public void tearDown() {
+        if ( null == oldConfig )
+        {
+            System.clearProperty( "java.protocol.handler.pkgs" );
+        }
+        else
+        {
+            System.setProperty( "java.protocol.handler.pkgs", oldConfig );
+        }
+    }
+    
+    /**
+     * Test {@link EFSUtil#isExistResource(IFileStore)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see EFSUtil#isExistResource(IFileStore)
+     */
+    @Test
+    public void test_isExistResource_IFileStore() throws Exception {
+        // null check
+        IFileStore nullFileStore = null;
+        assertFalse( EFSUtil.isExistResource(nullFileStore) );
+        
+        
+        IFileInfo mockFileInfo = mock( IFileInfo.class );
+        IFileStore mockFileStore = mock( IFileStore.class );
+        when( mockFileStore.fetchInfo() ).thenReturn( mockFileInfo );
+        
+        // true check
+        when( mockFileInfo.exists() ).thenReturn( true );
+        assertTrue( EFSUtil.isExistResource(mockFileStore) );
+        
+        // false check
+        when( mockFileInfo.exists() ).thenReturn( false );
+        assertFalse( EFSUtil.isExistResource(mockFileStore) );
+    }
+    
+    /**
+     * Test {@link EFSUtil#isExistResource(URI)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see EFSUtil#isExistResource(URI)
+     */
+    @Test
+    public void test_isExistResource_URI() throws Exception {
+        // null check
+        final URI nullURI = null;
+        when( EFSUtil.getFileSystem().getStore(nullURI) ).thenReturn( null );
+        assertFalse( EFSUtil.isExistResource(nullURI) );
+        
+        
+        IFileInfo mockFileInfo = mock( IFileInfo.class );
+        IFileStore mockFileStore = mock( IFileStore.class );
+        when( mockFileStore.fetchInfo() ).thenReturn( mockFileInfo );
+        
+        final URI virtualURI = new URL(TEST_URL).toURI();
+        when( EFSUtil.getFileSystem().getStore(virtualURI) ).thenReturn( mockFileStore );
+        
+        // true check
+        when( mockFileInfo.exists() ).thenReturn( true );
+        assertTrue( EFSUtil.isExistResource(virtualURI) );
+        
+        // false check
+        when( mockFileInfo.exists() ).thenReturn( false );
+        assertFalse( EFSUtil.isExistResource(virtualURI) );
+    }
+    
+    /**
+     * Test {@link EFSUtil#isExistResourceWithDialog(Shell, String, String, DialogChoicer, IFileStore)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see EFSUtil#isExistResourceWithDialog(Shell, String, String, DialogChoicer, IFileStore)
+     */
+    @Test
+    public void test_isExistResourceWithDialog() throws Exception {
+        Shell mockShell = mock( Shell.class );
+        IFileStore mockFileStore = mock( IFileStore.class );
+        IFileInfo mockFileInfo = mock (IFileInfo.class );
+        when(mockFileStore.fetchInfo()).thenReturn(mockFileInfo);
+        
+        final Object[][] TEST_CASES = new Object[][] { // [TestCase] [Arguments..., ExpectResult]
+                new Object[] { mockShell, "Title", "Msg", DialogChoicer.Cancel, mockFileStore, true, DialogChoicer.Cancel },
+                new Object[] { mockShell, "Title", "Msg", DialogChoicer.Cancel, mockFileStore, false, DialogChoicer.Cancel },
+                new Object[] { mockShell, "Title", "Msg", DialogChoicer.NoToAll, mockFileStore, true, DialogChoicer.NoToAll },
+                new Object[] { mockShell, "Title", "Msg", DialogChoicer.NoToAll, mockFileStore, false, DialogChoicer.NoToAll },
+                new Object[] { mockShell, "Title", "Msg", DialogChoicer.YesToAll, mockFileStore, true, DialogChoicer.YesToAll },
+                new Object[] { mockShell, "Title", "Msg", DialogChoicer.YesToAll, mockFileStore, false, DialogChoicer.YesToAll },
+                new Object[] { mockShell, "Title", "Msg", DialogChoicer.Yes, mockFileStore, false, DialogChoicer.Yes },
+                new Object[] { mockShell, "Title", "Msg", DialogChoicer.No, mockFileStore, false, DialogChoicer.Yes }
+                // except dialog open scenarios
+        };
+        
+        DialogChoicer existResourceWithDialog = null;
+        
+        for (final Object[] TEST_CASE : TEST_CASES) {
+            final Shell shell = (Shell) TEST_CASE[0];
+            final String title = (String) TEST_CASE[1];
+            final String msg = (String) TEST_CASE[2];
+            final DialogChoicer choicer = (DialogChoicer) TEST_CASE[3];
+            final IFileStore fileStore = (IFileStore) TEST_CASE[4];
+            final boolean exist = (Boolean) TEST_CASE[5];
+            final DialogChoicer expected = (DialogChoicer) TEST_CASE[6];
+            
+            when( mockFileInfo.exists() ).thenReturn(exist);
+            existResourceWithDialog = EFSUtil.isExistResourceWithDialog(
+                    shell, title, msg, choicer, fileStore);
+            assertEquals( shell + ", " + title + ", " + msg + ", " + choicer + ", " +
+                    fileStore.fetchInfo().exists() + " : " + expected, existResourceWithDialog, expected );
+        }
+    }
+    
+    
+    /**
+     * Test {@link EFSUtil#copy(URI, URI, int, IProgressMonitor)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see EFSUtil#copy(URI, URI, int, IProgressMonitor)
+     */
+    @Test
+    public void test_copy() throws Exception {
+        final URI virtualURI = new URL(TEST_URL).toURI();
+        final IProgressMonitor mockMonitor = mock(IProgressMonitor.class);
+        
+        IFileStore mockFileStore = mock( IFileStore.class );
+        when( EFSUtil.getFileSystem().getStore(virtualURI) ).thenReturn( mockFileStore );
+        
+        final Object[][] TEST_CASES = new Object[][] { // [TestCase] [Arguments..., ExpectResult]
+                new Object[] { virtualURI, virtualURI, EFS.OVERWRITE, mockMonitor },
+                new Object[] { virtualURI, virtualURI, EFS.SHALLOW, mockMonitor },
+                new Object[] { virtualURI, virtualURI, EFS.OVERWRITE | EFS.SHALLOW, mockMonitor }
+        };
+        
+        for (final Object[] TEST_CASE : TEST_CASES) {
+            final URI source = (URI) TEST_CASE[0];
+            final URI destination = (URI) TEST_CASE[1];
+            final int options = (Integer) TEST_CASE[2];
+            final IProgressMonitor monitor = (IProgressMonitor) TEST_CASE[3];
+            
+            EFSUtil.copy(source, destination, options, monitor);
+            
+            verify( mockFileStore ).copy(mockFileStore, options, mockMonitor);
+        }
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/FileUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/FileUtilTest.java
new file mode 100644 (file)
index 0000000..7d559a4
--- /dev/null
@@ -0,0 +1,392 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.junit.Assert.*;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Stack;
+
+import org.junit.Test;
+
+/**
+ * FileUtilTest
+ * 
+ * Test case for {@link FileUtil}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see FileUtil
+ */
+public class FileUtilTest {
+
+    public static final String TEST_RESOURCE_DEST = "test/_test_files";
+    public static final String TEST_RESOURCE_SRC = "test/test_files";
+    
+       /**
+        * Test {@link FileUtil#getFileExtension(String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link FileUtil#getFileExtension(String)}
+        */
+       @Test
+       public void test_getFileExtension() throws Exception {
+               final Object[][] TEST_CASES = new Object[][] {
+                               new Object[] { "aaaa.exe", "exe" },
+                               new Object[] { "index.html", "html" },
+                               new Object[] { "index.test.html", "html" },
+                               new Object[] { "index..html", "html" },
+                               new Object[] { ".profile", "profile" },
+                               new Object[] { "ReadMe ", null },
+                               new Object[] { "ReadMe", null },
+                               new Object[] { "ReadMe. ", " " },
+                               new Object[] { "ReadMe. test", " test" }
+               };
+               
+               int i = 0;
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       final String fileName = (String) TEST_CASE[0];
+                       final String expected = (String) TEST_CASE[1];
+                       final String result = FileUtil.getFileExtension( fileName );
+                       
+                       assertEquals( ++i + "th Test case :<" + fileName + ", " + expected + ">", expected, result );
+               }
+       }
+
+    /**
+     * Test {@link FileUtil#readTextStream(InputStream input, String encoding)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link FileUtil#readTextStream(InputStream input, String encoding)}
+     */
+    @Test
+    public void test_readTextStream() throws Exception {
+        String text = "Test Text 123";
+        String unicodeText = "\uD55C\uAE00\uD14C\uC2A4\uD2B8";
+
+        try {
+            FileUtil.readTextStream(null, null);
+            fail( "readTextStream must throw exception" );
+        } catch (Exception e) {
+        }
+
+        InputStream input = new ByteArrayInputStream(text.getBytes());
+        String content = FileUtil.readTextStream(input, null);
+        assertEquals(text, content);
+
+        InputStream unicodeInput = new ByteArrayInputStream(unicodeText.getBytes("UTF-8"));
+        String unicodeContent = FileUtil.readTextStream(unicodeInput, "UTF-8");
+        assertEquals(unicodeText, unicodeContent);
+        String isoContent = FileUtil.readTextStream(unicodeInput, "ISO-8859-1");
+        assertNotSame(unicodeText, isoContent);
+
+        if (input != null) {
+            input.close();
+        }
+        if (unicodeInput != null) {
+            unicodeInput.close();
+        }
+    }
+    
+    @Test
+    public void test_findFiles() throws Exception{
+        final Object [][] TEST_CASE = new Object[][] {
+          new Object[] {"",""},      
+        };
+    }
+    
+    /**
+     * Test {@link FileUtil#copyRecursively(String, String)}
+     *  
+     * @throws Exception in case of failure in test
+     * 
+     * @see {@link FileUtil#copyRecursively(String, String)}
+     */
+    @Test
+    public void test_copyRecursively1() throws Exception {
+        
+        try {
+            if(!checkTestSrcExist()) {
+                return;
+            }
+            
+            FileUtil.copyRecursively(TEST_RESOURCE_SRC, TEST_RESOURCE_DEST);
+            
+            List<File> result = compareFiles(TEST_RESOURCE_SRC, TEST_RESOURCE_DEST);
+            assertTrue(result.size() == 0);
+        }
+        finally {
+            File destDir = new File(TEST_RESOURCE_DEST);
+            if(destDir.exists()) {
+                FileUtil.recursiveDelete(destDir);
+            }
+        }
+    }
+    
+    /**
+     * Test {@link FileUtil#copyRecursively(String, String, boolean)}}
+     *  
+     * @throws Exception in case of failure in test
+     * 
+     * @see {@link FileUtil#copyRecursively(String, String, boolean)}
+     */
+    @Test
+    public void test_copyRecursively2() throws Exception {
+        
+        try {
+            if(!checkTestSrcExist()) {
+                return;
+            }
+            
+            String overwriteFileName = "about_files/LICENSE-2.0.htm";
+            String originalFileName = "about_files/freemarker-LICENSE.txt";
+            String copiedFileName = FileUtil.appendPath(TEST_RESOURCE_DEST, originalFileName);
+            
+            long overwriteSize = new File(overwriteFileName).getTotalSpace();
+            long originalSize = new File(originalFileName).getTotalSpace();
+            
+            FileUtil.copyTo(FileUtil.appendPath(TEST_RESOURCE_SRC, overwriteFileName), copiedFileName);
+            FileUtil.copyRecursively(TEST_RESOURCE_SRC, TEST_RESOURCE_DEST, false);
+            
+            long copiedSize = new File(copiedFileName).getTotalSpace();
+            assertTrue(overwriteSize == copiedSize);
+            
+            File destDir = new File(TEST_RESOURCE_DEST);
+            if(destDir.exists()) {
+                FileUtil.recursiveDelete(destDir);
+            }
+            
+            List<File> result = compareFiles(TEST_RESOURCE_SRC, TEST_RESOURCE_DEST);
+            assertTrue(result.size() == 0);
+            
+            FileUtil.copyRecursively(TEST_RESOURCE_SRC, TEST_RESOURCE_DEST, true);
+            
+            copiedSize = new File(copiedFileName).getTotalSpace();
+            assertTrue(originalSize == copiedSize);
+            
+            result = compareFiles(TEST_RESOURCE_SRC, TEST_RESOURCE_DEST);
+            assertTrue(result.size() == 0);
+        }
+        finally {
+            File destDir = new File(TEST_RESOURCE_DEST);
+            if(destDir.exists()) {
+                FileUtil.recursiveDelete(destDir);
+            }
+        }
+    }
+    
+    /**
+     * Test {@link FileUtil#copyRecursively(String, String, boolean, File...)}
+     *  
+     * @throws Exception in case of failure in test
+     * 
+     * @see {@link FileUtil#copyRecursively(String, String, boolean, File...)}
+     */
+    @Test
+    public void test_copyRecursively3() throws Exception {
+        
+        try {
+            if(!checkTestSrcExist()) {
+                return;
+            }
+            
+            HashSet<File> filter = new HashSet<File>();
+            File filter1 = new File(TEST_RESOURCE_SRC + "/about_files/LICENSE-2.0.htm");
+            File filter2 = new File(TEST_RESOURCE_SRC + "/resource/text.txt");
+            File filter3 = new File(TEST_RESOURCE_SRC + "/resource/resource/text.txt");
+            
+            filter.add(filter1);
+            filter.add(filter2);
+            filter.add(filter3);
+            
+            FileUtil.copyRecursively(TEST_RESOURCE_SRC, TEST_RESOURCE_DEST, false, filter1, filter2, filter3);
+            
+            List<File> result = compareFiles(TEST_RESOURCE_SRC, TEST_RESOURCE_DEST);
+            
+            for(File resultFile: result) {
+                assertTrue(filter.contains(resultFile));
+            }
+        }
+        finally {
+            File destDir = new File(TEST_RESOURCE_DEST);
+            if(destDir.exists()) {
+                FileUtil.recursiveDelete(destDir);
+            }
+        }
+    }
+    
+    private boolean checkTestSrcExist() {
+        File src = new File(TEST_RESOURCE_SRC);
+        return src.exists();
+    }
+    
+    /**
+     * This method is used for checking whether copyRecursively works fine.
+     * If destDir does not contain some files in srcDir, they are contained in result List.
+     * @param srcDir source directory
+     * @param destDir destination direcoty to be compared with source directory.
+     * @return Files in source directory destination directory does not contain.
+     */
+    private static List<File> compareFiles(String srcDir, String destDir) {
+        
+        List<File> result = new ArrayList<File>();
+        File srcFiles = new File(srcDir);
+        
+        if(!srcFiles.exists()) {
+            return result;
+        }
+        
+        Stack<File> srcStack = new Stack<File>();
+        Stack<File> destStack = new Stack<File>();
+        
+        while(!srcStack.isEmpty()) {
+            File _srcFile = srcStack.pop();
+            File _destFile = destStack.pop();
+            
+            if(!_destFile.exists()) {
+                result.add(_srcFile);
+            }
+            
+            if(_srcFile.isDirectory()) {
+                for(File __srcFile:_srcFile.listFiles()) {
+                    srcStack.add(__srcFile);
+                    destStack.add(new File(_destFile, __srcFile.getName()));
+                }
+            }
+        }
+        
+        return result;
+    }
+    
+    /**
+     * Test {@link FileUtil#readFromFile(URL)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see {@link FileUtil#readFromFile(URL)}
+     * @throws Exception
+     */
+    @Test
+    public void test_readFromFile() throws Exception {
+        
+        String result = "HOHOHO\nHAHAHA\nNAMKOONGHO";
+        
+        File file = new File("test/test_files/resource/text.txt");
+        
+        if(file.exists()) {
+            URL url = file.toURI().toURL();
+            assertTrue(result.equals(FileUtil.readFromFile(url)));
+        }
+    }
+
+    /**
+     * Test {@link FileUtil#appendPath(String, String)}
+     * Test {@link FileUtil#appendPath(String, String, boolean)}
+     * 
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link FileUtil#appendPath(String, String)}
+     * @see {@link FileUtil#appendPath(String, String, boolean))}
+     */
+    @Test
+    public void test_appendPath() throws Exception {
+        String windowFirst = "\\a\\b\\c\\d\\";
+        String windowLast = "\\e\\f\\g\\h\\";
+        
+        String linuxFirst = "/a/b/c/d/";
+        String linuxLast = "/e/f/g/h/";
+        
+        String result = File.separatorChar + "a" + File.separatorChar + "b" + File.separatorChar + "c" + 
+                File.separatorChar + "d" + File.separatorChar + "e" + File.separatorChar + "f" + File.separatorChar + 
+                "g" + File.separatorChar + "h" + File.separatorChar;
+        
+        assertEquals(result, FileUtil.appendPath(windowFirst, linuxLast));
+        assertEquals(result, FileUtil.appendPath(windowFirst, windowLast));
+        assertEquals(result, FileUtil.appendPath(linuxFirst, linuxLast));
+        assertEquals(result, FileUtil.appendPath(linuxFirst, windowLast));
+        
+        result = result.replace('\\', '/');
+        assertEquals(result, FileUtil.appendPath(windowFirst, linuxLast, false));
+        assertEquals(result, FileUtil.appendPath(windowFirst, windowLast, false));
+        assertEquals(result, FileUtil.appendPath(linuxFirst, linuxLast, false));
+        assertEquals(result, FileUtil.appendPath(linuxFirst, windowLast, false));
+        
+        result = result.replace('/', '\\');
+        assertEquals(result, FileUtil.appendPath(windowFirst, linuxLast, true));
+        assertEquals(result, FileUtil.appendPath(windowFirst, windowLast, true));
+        assertEquals(result, FileUtil.appendPath(linuxFirst, linuxLast, true));
+        assertEquals(result, FileUtil.appendPath(linuxFirst, windowLast, true));
+    }
+    
+    /**
+     * Test {@link FileUtil#convertToOSPath(String, boolean)}
+     * Test {@link FileUtil#convertToOSPath(String)}
+     * 
+     * @throws Exception
+     */
+    public void test_convertToOSPath() throws Exception {
+        String windowPath = "\\a\\b\\c\\d\\";
+        String linuxPath = "/a/b/c/d/";
+        
+        assertEquals(linuxPath, FileUtil.convertToOSPath(windowPath, false));
+        assertEquals(linuxPath, FileUtil.convertToOSPath(linuxPath, false));
+        assertEquals(windowPath, FileUtil.convertToOSPath(windowPath, true));
+        assertEquals(windowPath, FileUtil.convertToOSPath(linuxPath, true));
+        
+        String result = File.separatorChar + "a" + File.separatorChar + "b" + File.separatorChar + "c" + File.separatorChar + "d";
+        
+        assertEquals(result, FileUtil.convertToOSPath(windowPath));
+        assertEquals(result, FileUtil.convertToOSPath(linuxPath));
+    }
+
+    /**
+     * Test {@link FileUtil#isExist(String)}
+     * 
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link FileUtil#isExist(String)}
+     */
+    @Test
+    public void
+    test_isExist()
+    throws Exception
+    {
+        assertFalse( FileUtil.isExist( null ) );
+        assertFalse( FileUtil.isExist( "" ) );
+        assertFalse( FileUtil.isExist( "test/test_files/resource/text.abc" ) );
+        assertTrue( FileUtil.isExist( "test/test_files/resource" ) );
+        assertTrue( FileUtil.isExist( "test/test_files/resource/" ) );
+        assertTrue( FileUtil.isExist( "test/test_files/resource/text.txt" ) );
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/FilenameUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/FilenameUtilTest.java
new file mode 100755 (executable)
index 0000000..87fde7b
--- /dev/null
@@ -0,0 +1,290 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+import java.io.File;
+
+import org.junit.Test;
+
+
+/**
+ * FilenameUtilTest
+ *
+ * Test case for {@link FilenameUtil}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see FilenameUtil
+ */
+public class
+FilenameUtilTest
+{
+       /**
+        * Test {@link FilenameUtil#getCanonicalFragments(String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see FilenameUtil#getCanonicalFragments(String)
+        */
+       @Test
+       public
+       void
+       test_getCanonicalFragments()
+       throws Exception
+       {
+               final Object[][] TEST_CASES = new Object[][] {
+                       new Object[] { "/aaa/bbb/ccc", new String[] { "aaa", "bbb", "ccc" } },
+                       new Object[] { File.separator + "aaa" + File.separator + "bbb" +  File.separator + "ccc", new String[] { "aaa", "bbb", "ccc" } },
+               };
+               
+               int iTest = 0;
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       ++iTest;
+                       final String input = (String) TEST_CASE[0];
+                       final String[] expected = (String[]) TEST_CASE[1];
+                       
+                       assertArrayEquals(
+                               iTest + " th test failed. input :<" + input + ">",
+                               expected,
+                               FilenameUtil.getCanonicalFragments( input )
+                       );
+               }
+       }
+       
+    /**
+     * Test {@link FilenameUtil#getCanonicalForm(String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see FilenameUtil#getCanonicalForm(String)
+     */
+       @Test
+       public void test_getCanonicalForm() throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+            new Object[] { "/aaa/bbb/.", "/aaa/bbb" },
+            new Object[] { "/aaa/bbb/ccc/..", "/aaa/bbb" },
+            new Object[] { File.separator + "aaa" + File.separator + "bbb" +  File.separator + "ccc", "/aaa/bbb/ccc" },
+        };
+        
+        int iTest = 0;
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            ++iTest;
+            final String input = (String) TEST_CASE[0];
+            final String expected = (String) TEST_CASE[1];
+            
+            assertEquals(
+                iTest + " th test failed. input :<" + input + ">",
+                expected,
+                FilenameUtil.getCanonicalForm( input )
+            );
+        }
+    }
+       
+       /**
+        * Test {@link FilenameUtil#addTailingPath(String, String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see FilenameUtil#addTailingPath(String, String)
+        */
+       @Test
+       public
+       void
+       test_addTailingPath()
+       throws Exception
+       {
+               final Object[][] TEST_CASES = new Object[][] {
+                       new Object[] { "/aaa/bbb/ccc", "aaa", "/aaa/bbb/ccc/aaa" },
+                       new Object[] { "/aaa/bbb/ccc/", "aaa", "/aaa/bbb/ccc/aaa" },
+                       new Object[] { "/aaa/bbb/ccc/", "/aaa", "/aaa/bbb/ccc/aaa" },
+                       new Object[] { "/home/bylee/tizen_sdk/tools/ide", "conf/profiles.xml", "/home/bylee/tizen_sdk/tools/ide/conf/profiles.xml" },
+                       new Object[] { "/home/bylee/tizen_sdk/tools/ide/", "conf/profiles.xml", "/home/bylee/tizen_sdk/tools/ide/conf/profiles.xml" },
+                       new Object[] { "/home/bylee/tizen_sdk/tools/ide/", "/conf/profiles.xml", "/home/bylee/tizen_sdk/tools/ide/conf/profiles.xml" },
+                       new Object[] { "C:\test", "profiles.xml", "C:\test/profiles.xml" }
+               };
+               
+               int iTest = 0;
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       ++iTest;
+                       final String path1 = (String) TEST_CASE[0];
+                       final String path2 = (String) TEST_CASE[1];
+                       final String expected = (String) TEST_CASE[2];
+                       
+                       assertEquals(
+                               iTest + " th test failed. input :<" + path1 + "," + path2 + ">",
+                               expected,
+                               FilenameUtil.addTailingPath( path1, path2 )
+                       );
+               }
+       }
+       
+       /**
+        * Test {@link FilenameUtil#removeTailingPath(String, int)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see FilenameUtil#removeTailingPath(String, int)
+        */
+       @Test
+       public
+       void
+       test_removeTailingPath()
+       throws Exception
+       {
+               final Object[][] TEST_CASES = new Object[][] {
+                       new Object[] { "/aaa/bbb/ccc", 1, "/aaa/bbb" },
+                       new Object[] { File.separator + "aaa" + File.separator + "bbb" +  File.separator + "ccc", 1, "/aaa/bbb" },
+               };
+               
+               int iTest = 0;
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       ++iTest;
+                       final String input = (String) TEST_CASE[0];
+                       final int nRemove = (Integer) TEST_CASE[1];
+                       final String expected = (String) TEST_CASE[2];
+                       
+                       assertEquals(
+                               iTest + " th test failed. input :<" + input + ">",
+                               expected,
+                               FilenameUtil.removeTailingPath( input, nRemove )
+                       );
+               }
+       }
+
+       /**
+        * Test {@link FilenameUtil#getTailingPath(String, int)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see FilenameUtil#getTailingPath(String, int)
+        */
+       @Test
+       public
+       void
+       test_getTailingPath()
+       throws Exception
+       {
+               final Object[][] TEST_CASES = new Object[][] {
+                       new Object[] { "/aaa/bbb/ccc", 1, "ccc" },
+                       new Object[] { "/aaa/bbb/ccc/", 1, "ccc" },
+                       new Object[] { "/aaa/bbb/ccc", 2, "bbb/ccc" },
+                       new Object[] { File.separator + "aaa" + File.separator + "bbb" +  File.separator + "ccc", 1, "ccc" },
+               };
+               
+               int iTest = 0;
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       ++iTest;
+                       final String input = (String) TEST_CASE[0];
+                       final int nRemove = (Integer) TEST_CASE[1];
+                       final String expected = (String) TEST_CASE[2];
+                       
+                       assertEquals(
+                               iTest + " th test failed. input :<" + input + ">",
+                               expected,
+                               FilenameUtil.getTailingPath( input, nRemove )
+                       );
+               }
+       }
+       
+       /**
+        * Test {@link FilenameUtil#getFilename(String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see FilenameUtil#getFilename(String)
+        */
+       @Test
+       public
+       void
+       test_getFilename()
+       throws Exception
+       {
+               final Object[][] TEST_CASES = new Object[][] {
+                       new Object[] { "/aaa/bbb/ccc", "ccc" },
+                       new Object[] { "/aaa/bbb/ccc.jar", "ccc.jar" },
+                       new Object[] { File.separator + "aaa" + File.separator + "bbb" +  File.separator + "ccc", "ccc" },
+               };
+               
+               int iTest = 0;
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       ++iTest;
+                       final String input = (String) TEST_CASE[0];
+                       final String expected = (String) TEST_CASE[1];
+                       
+                       assertEquals(
+                               iTest + " th test failed. input :<" + input + ">",
+                               expected,
+                               FilenameUtil.getFilename( input )
+                       );
+               }
+       }
+       
+       /**
+        * Test {@link FilenameUtil#getExtension(String)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see FilenameUtil#getExtension(String)
+        */
+       @Test
+       public
+       void
+       test_getExtension()
+       throws Exception
+       {
+               final Object[][] TEST_CASES = new Object[][] {
+                       new Object[] { "test.txt", "txt" },
+                       new Object[] { "ccc.jar", "jar" },
+                       new Object[] { ".aaa", "aaa" },
+                       new Object[] { "aaa", "" },
+               };
+               
+               int iTest = 0;
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       ++iTest;
+                       final String input = (String) TEST_CASE[0];
+                       final String expected = (String) TEST_CASE[1];
+                       
+                       assertEquals(
+                               iTest + " th test failed. input :<" + input + ">",
+                               expected,
+                               FilenameUtil.getExtension( input )
+                       );
+               }
+       }
+       
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/FilterIteratorTest.java b/org.tizen.common/test/src/org/tizen/common/util/FilterIteratorTest.java
new file mode 100644 (file)
index 0000000..931e4d6
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.junit.Test;
+
+
+/**
+ * FilterIteratorTest
+ *
+ * Test case for {@link FilterIterator}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see FilterIterator
+ */
+public class FilterIteratorTest
+{
+       /**
+        * Test {@link FilterIterator#isAcceptable(Object)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link FilterIterator#isAcceptable(Object)}
+        */
+       @Test
+       public void test_isAcceptable() throws Exception
+       {
+               final ArrayList<String> collection = new ArrayList<String>(
+                       Arrays.asList( "Hello", "World", null )
+               );
+               final FilterIterator<String> iterator = new FilterIterator<String>( collection );
+               
+               assertTrue( iterator.hasNext() );
+               assertEquals( "Hello", iterator.next() );
+               assertTrue( iterator.hasNext() );
+               assertEquals( "World", iterator.next() );
+               assertFalse( iterator.hasNext() );
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/FreeMarkerUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/FreeMarkerUtilTest.java
new file mode 100644 (file)
index 0000000..ecd9ec2
--- /dev/null
@@ -0,0 +1,86 @@
+package org.tizen.common.util;
+
+import static org.junit.Assert.*;
+
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import org.junit.Test;
+
+import freemarker.template.Configuration;
+import freemarker.template.DefaultObjectWrapper;
+import freemarker.template.Template;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.mockito.Mockito.verify;
+
+
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+public class FreeMarkerUtilTest {
+    
+    /**
+     * Test {@link FreeMarkerUtil#getDefaultConfiguration()}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see FreeMarkerUtil#getDefaultConfiguration()
+     */
+    @Test
+    public void test_getDefaultConfiguration() throws Exception {
+        Configuration defaultConfiguration = FreeMarkerUtil.getDefaultConfiguration();
+        
+        String encoding = defaultConfiguration.getEncoding(Locale.getDefault());
+        assertTrue(encoding.equals("8859_1"));
+        
+        assertTrue(defaultConfiguration.getObjectWrapper() instanceof DefaultObjectWrapper);
+    }
+    
+    /**
+     * Test {@link FreeMarkerUtil#generateDocument(Map, Configuration, String, Writer)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see FreeMarkerUtil#generateDocument(Map, Configuration, String, Writer)
+     */
+    @Test
+    public void test_generateDocument() throws Exception {
+        final String templateFile = "zz";
+        final Map<String, Object> root = new HashMap<String, Object>();
+        final Writer mockWriter = mock( Writer.class );
+        
+        final Configuration mockCfg = mock (Configuration.class);
+        final Template mockTemplate = mock( Template.class );
+        when(mockCfg.getTemplate(templateFile)).thenReturn(mockTemplate);
+        
+        FreeMarkerUtil.generateDocument(root, mockCfg, templateFile, mockWriter);
+        verify(mockCfg).getTemplate(templateFile);
+        verify(mockTemplate).process(root, mockWriter);
+        verify(mockWriter).close();
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/HostUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/HostUtilTest.java
new file mode 100644 (file)
index 0000000..9939dff
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class HostUtilTest {
+
+    private String packageName = HostUtilTest.class.getPackage().getName().replace('.', '/');
+    private String fileName = "test";
+    private String filePath = ClassLoader.getSystemResource(packageName + '/').getPath();
+    private String fullPath = filePath + fileName;
+
+    @Before
+    public void setUp() {
+
+    }
+
+    @After
+    public void tearDown() {
+
+    }
+    
+    /**
+     * Test {@link HostUtil#getContents( String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see HostUtil#getContents( String)
+     */
+    @Test
+    public void test_getContents() throws Exception {
+        Assert.notNull(HostUtil.getContents(fullPath));        
+        Assert.isNull(HostUtil.getContents(null));
+        Assert.isNull(HostUtil.getContents("nullPath"));
+    }
+    
+    /**
+     * Test {@link HostUtil#exists( String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see HostUtil#exists( String)
+     */
+    @Test
+    public void test_exists() throws Exception {
+        Assert.isTrue(HostUtil.exists(fullPath));
+        Assert.isFalse(HostUtil.exists(null));
+        Assert.isFalse(HostUtil.exists("nullPath"));
+    }
+    
+    /**
+     * Test {@link HostUtil#execute( String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see HostUtil#execute( String)
+     */
+    @Test
+    public void test_execute() throws Exception {
+        Assert.isTrue(HostUtil.execute("cd"));
+        Assert.isFalse(HostUtil.execute(null));
+        Assert.isFalse(HostUtil.execute("notcommand"));
+    }
+    
+    /**
+     * Test {@link HostUtil#batchExecute( String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see HostUtil#batchExecute( String)
+     */
+    @Test
+    public void test_batchExecute() throws Exception {
+        Assert.isFalse(HostUtil.batchExecute(null));
+        Assert.isTrue(HostUtil.batchExecute("cd"));
+        Assert.isFalse(HostUtil.batchExecute("notcommand"));
+    }
+    
+    /**
+     * Test {@link HostUtil#returnExecute( String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see HostUtil#returnExecute( String)
+     */
+    @Test
+    public void test_returnExecute1() throws Exception {
+        Assert.isNull(HostUtil.returnExecute(null));
+        Assert.notNull(HostUtil.returnExecute("cd"));
+    }
+    
+    /**
+     * Test {@link HostUtil#returnExecute( String, String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see HostUtil#returnExecute( String, String)
+     */
+    @Test
+    public void test_returnExecute2() throws Exception {
+        Assert.isNull(HostUtil.returnExecute(null, filePath));
+        Assert.notNull(HostUtil.returnExecute("cd", filePath));
+    }
+    
+    /**
+     * Test {@link HostUtil#executeWithConsole( String, String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see HostUtil#executeWithConsole( String, String)
+     */
+    @Test(expected = Exception.class)
+    public void test_executeWithConsole() throws Exception {
+        HostUtil.executeWithConsole("notcommand", "viewname");        
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/IOUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/IOUtilTest.java
new file mode 100644 (file)
index 0000000..4254e7f
--- /dev/null
@@ -0,0 +1,242 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/package org.tizen.common.util;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.Closeable;
+import java.io.Flushable;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.StringWriter;
+
+import org.junit.Test;
+
+
+/**
+ * IOUtilTest.
+ * 
+ * Test case for {@link IOUtil}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see IOUtil
+ * 
+ */
+public class IOUtilTest
+{
+       /**
+        * Test {@link IOUtil#tryClose(Object...)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link IOUtil#tryClose(Object...)}
+        */
+       @Test
+       public
+       void
+       test_tryClose()
+       throws Exception
+       {
+               final Object[][] TEST_CASES = new Object[][] {
+                       new Object[] { null },
+                       new Object[] { new Closeable[] { new ByteArrayOutputStream(), new ByteArrayOutputStream() } },
+                       new Object[] { new Closeable[] { null } },
+                       new Object[] { new Closeable[] { null, null, null } },
+                       new Object[] { new Closeable[] { null, new ByteArrayOutputStream() } },
+                       new Object[] { new Closeable[] { new ByteArrayOutputStream(), null } },
+                       new Object[] { new Closeable[] { new ByteArrayOutputStream(), null } },
+                       new Object[] { new Closeable[] { new ByteArrayOutputStream(), null, new ByteArrayOutputStream() } },
+               };
+               
+               int iTestCase = 0;
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       ++iTestCase;
+
+                       try
+                       {
+                               IOUtil.tryClose( TEST_CASE[0] );
+                       }
+                       catch ( final Throwable e )
+                       {
+                               fail( iTestCase + " th test case failed" );
+                       }
+               }
+
+               /* Mock Object using Mockito */
+               InputStream in = mock( InputStream.class );
+               IOUtil.tryClose( in );
+               verify( in ).close();
+       }
+
+       /**
+        * Test {@link IOUtil#tryFlush(Flushable...)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link IOUtil#tryFlush(Flushable...)}
+        */
+       @Test
+       public
+       void
+       test_tryFlush()
+       throws Exception
+       {
+               final Object[][] TEST_CASES = new Object[][] {
+                       new Object[] { null },
+                       new Object[] { new Flushable[] { new ByteArrayOutputStream(), new ByteArrayOutputStream() } },
+                       new Object[] { new Flushable[] { null } },
+                       new Object[] { new Flushable[] { null, null, null } },
+                       new Object[] { new Flushable[] { null, new ByteArrayOutputStream() } },
+                       new Object[] { new Flushable[] { new ByteArrayOutputStream(), null } },
+                       new Object[] { new Flushable[] { new ByteArrayOutputStream(), null } },
+                       new Object[] { new Flushable[] { new ByteArrayOutputStream(), null, new ByteArrayOutputStream() } },
+               };
+               
+               int iTestCase = 0;
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       ++iTestCase;
+                       final Flushable[] flushables = (Flushable[]) TEST_CASE[0];
+
+                       try
+                       {
+                               IOUtil.tryFlush( flushables );
+                       }
+                       catch ( final Throwable e )
+                       {
+                               fail( iTestCase + " th test case failed" );
+                       }
+               }
+               
+               /* Mock Object using Mockito */
+               OutputStream out = mock( OutputStream.class );
+               IOUtil.tryFlush( out );
+               verify( out ).flush();
+       }
+       
+
+       /**
+        * Test {@link IOUtil#redirect(InputStream, OutputStream)},
+        * {@link IOUtil#redirect(java.io.Reader, StringBuffer)},
+        * {@link IOUtil#redirect(java.io.Reader, StringBuilder)} 
+        * and {@link IOUtil#redirect(java.io.Reader, java.io.Writer)}
+        * 
+        * @throws Exception in case of failure in test
+        *
+        * @see IOUtil#redirect(InputStream, OutputStream)
+        * @see IOUtil#redirect(java.io.Reader, StringBuffer)
+        * @see IOUtil#redirect(java.io.Reader, StringBuilder)
+        * @see IOUtil#redirect(java.io.Reader, java.io.Writer)
+        */
+       @Test
+       public
+       void
+       test_redirect()
+       throws Exception
+       {
+               final String[] TEST_CASES = new String[] {
+                       "Hello, World",
+               };
+               
+               int iTestCase = 0;
+               for ( final String TEST_CASE : TEST_CASES )
+               {
+                       ++iTestCase;
+
+                       final ByteArrayInputStream in = new ByteArrayInputStream( TEST_CASE.getBytes() );
+                       final ByteArrayOutputStream out = new ByteArrayOutputStream();
+                       IOUtil.redirect( in, out );
+                       assertArrayEquals( iTestCase + " th test case failed :" + TEST_CASE, TEST_CASE.getBytes(), out.toByteArray() );
+
+                       final StringReader reader = new StringReader( TEST_CASE );
+                       final StringWriter writer = new StringWriter();
+                       IOUtil.redirect( reader, writer );
+                       assertEquals( iTestCase + " th test case failed :" + TEST_CASE, TEST_CASE, writer.toString() );
+
+                       final StringReader reader2 = new StringReader( TEST_CASE );
+                       final StringBuilder builder = new StringBuilder();
+                       IOUtil.redirect( reader2, builder );
+                       assertEquals( iTestCase + " th test case failed :" + TEST_CASE, TEST_CASE, builder.toString() );
+
+                       final StringReader reader3 = new StringReader( TEST_CASE );
+                       final StringBuffer buffer = new StringBuffer();
+                       IOUtil.redirect( reader3, buffer );
+                       assertEquals( iTestCase + " th test case failed :" + TEST_CASE, TEST_CASE, buffer.toString() );
+
+               }
+       }
+       
+       /**
+        * Test {@link IOUtil#getBytes(InputStream)}
+        * 
+        * @throws Exception in case of failure in test
+        *
+        * @see IOUtil#getBytes(InputStream)
+        */
+       @Test
+       public
+       void
+       test_getBytes()
+       throws Exception
+       {
+               assertNotNull( IOUtil.getBytes( new ByteArrayInputStream( "Hello".getBytes() ) ) );
+               assertTrue( 0 < IOUtil.getBytes( new ByteArrayInputStream( "Hello".getBytes() ) ).length );
+       }
+       
+       
+       /**
+        * Test {@link IOUtil#getString(java.io.Reader)},
+        * {@link IOUtil#getString(java.io.Reader, boolean)}
+        * 
+        * @throws Exception in case of failure in test
+        *
+        * @see IOUtil#getString(java.io.Reader)
+        * @see IOUtil#getString(java.io.Reader, boolean)
+        */
+       @Test
+       public
+       void
+       test_getString()
+       throws Exception
+       {
+               assertEquals( "", IOUtil.getString( (Reader) null ) );
+               assertEquals( "Hello", IOUtil.getString( new StringReader("Hello" ) ) );
+               
+               assertEquals( "", IOUtil.getString( (StringReader) null, true ) );
+               assertEquals( "Hello", IOUtil.getString( new StringReader("Hello" ), true ) );
+       }
+       
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/ImageUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/ImageUtilTest.java
new file mode 100755 (executable)
index 0000000..ceb5eff
--- /dev/null
@@ -0,0 +1,278 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.net.URL;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.ImageData;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.osgi.framework.Bundle;
+import org.tizen.common.SurrogateWithArgument;
+
+
+/**
+ * ImageUtilTest
+ *
+ * Test case for {@link ImageUtil}
+ * 
+ * LookAtMe : "SetUp" & "TearDown" pattern for test
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see ImageUtil
+ */
+public class ImageUtilTest
+{
+    /**
+     * Property key for URL handler
+     */
+    protected static final String PROP_PKG = "java.protocol.handler.pkgs";
+    
+    protected static final String TEST_PATH = ImageUtilTest.class.getSimpleName() + ".png";
+    protected static final String TEST_URL = "cp:///" + TEST_PATH;
+    
+    /**
+     * Old property value for URL handler
+     */
+    protected String oldConfig;
+    
+    /**
+     * Set up URL handler before test
+     */
+    @SuppressWarnings("unchecked")
+       @Before
+    public void setUp()
+    {
+        oldConfig = System.getProperty( PROP_PKG );
+        System.setProperty( PROP_PKG, "org.tizen.common.util.url" );
+        
+        ImageUtil.platformSurrogate = mock(SurrogateWithArgument.class);
+        ImageUtil.pluginSurrogate = mock(SurrogateWithArgument.class);
+
+    }
+    
+    /**
+     * Restore URL handler after test
+     */
+    @After
+    public void tearDown()
+    {
+        ImageUtil.pluginSurrogate = null;
+        ImageUtil.platformSurrogate = null;
+
+        if ( null == oldConfig )
+        {
+            System.clearProperty( PROP_PKG );
+        }
+        else
+        {
+            System.setProperty( PROP_PKG, oldConfig );
+        }
+    }
+
+    /**
+     * Test {@link ImageUtil#getImageDescriptor(Bundle, String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ImageUtil#getImageDescriptor(Bundle, String)
+     */
+    @Test
+    public
+    void
+    test_getImageDescriptor1()
+    throws Exception
+    {
+        final Bundle bundleMockup = mock( Bundle.class );
+        final URL virtualPathUrl = new URL( TEST_URL );
+        
+        when( bundleMockup.getEntry( TEST_PATH ) ).thenReturn( virtualPathUrl );
+        final ImageDescriptor imgDes =
+            ImageUtil.getImageDescriptor( bundleMockup, TEST_PATH );
+        
+        Assert.assertNotNull(imgDes.createImage(false));
+    }
+
+    /**
+     * Test {@link ImageUtil#getImageDescriptor(String, String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ImageUtil#getImageDescriptor(String, String)
+     */
+    @Test
+    public void test_getImageDescriptor2() throws Exception {
+        final Bundle bundleMockup = mock( Bundle.class );
+        final URL virtualPathUrl = new URL( TEST_URL );
+        when( bundleMockup.getEntry( TEST_PATH ) ).thenReturn( virtualPathUrl );
+        final String pluginID = "testID";
+        when(ImageUtil.platformSurrogate.getAdapter(pluginID)).thenReturn(bundleMockup);
+        final ImageDescriptor imgDes = ImageUtil.getImageDescriptor(pluginID, TEST_PATH);
+        
+        final Image img = imgDes.createImage(false);
+        
+        Assert.assertNotNull(img);
+    }
+    
+    /**
+     * Test {@link ImageUtil#getImageDescriptor(Plugin, String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ImageUtil#getImageDescriptor(Plugin, String)
+     */
+    @Test
+    public void test_getImageDescriptor3() throws Exception {
+        final Bundle bundleMockup = mock( Bundle.class );
+        final URL virtualPathUrl = new URL( TEST_URL );
+        when( bundleMockup.getEntry( TEST_PATH ) ).thenReturn( virtualPathUrl );
+        final Plugin pluginMockup = mock(Plugin.class);
+        when(ImageUtil.pluginSurrogate.getAdapter(pluginMockup)).thenReturn(bundleMockup);
+        final ImageDescriptor imgDes = ImageUtil.getImageDescriptor(pluginMockup, TEST_PATH);
+        final Image img = imgDes.createImage(false);
+        
+        Assert.assertNotNull(img);
+    }
+    
+    /**
+     * Test {@link ImageUtil#getImage(ImageDescriptor)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ImageUtil#getImage(ImageDescriptor)
+     */
+    @Test
+    public void test_getImage1() throws Exception {
+        final ImageDescriptor imgMock = mock(ImageDescriptor.class);
+        
+        ImageUtil.getImage(imgMock);
+        Mockito.verify(imgMock).createImage();
+    }
+    
+    /**
+     * Test {@link ImageUtil#getImageData(ImageDescriptor)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ImageUtil#getImageData(ImageDescriptor)
+     */
+    @Test
+    public void test_getImageData1() throws Exception {
+        final ImageDescriptor imgMock = mock(ImageDescriptor.class);
+        
+        ImageUtil.getImageData(imgMock);
+        Mockito.verify(imgMock).getImageData();
+    }
+    
+    /**
+     * Test {@link ImageUtil#getImage(Plugin, String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ImageUtil#getImage(Plugin, String)
+     */
+    @Test
+    public void test_getImage2() throws Exception {
+        final Bundle bundleMockup = mock( Bundle.class );
+        final URL virtualPathUrl = new URL( TEST_URL );
+        when( bundleMockup.getEntry( TEST_PATH ) ).thenReturn( virtualPathUrl );
+        final Plugin pluginMockup = mock(Plugin.class);
+        when(ImageUtil.pluginSurrogate.getAdapter(pluginMockup)).thenReturn(bundleMockup);
+        
+        Image img = ImageUtil.getImage(pluginMockup, TEST_PATH);
+        
+        Assert.assertNotNull(img);
+    }
+    
+    /**
+     * Test {@link ImageUtil#getImageData(Plugin, String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ImageUtil#getImageData(Plugin, String)
+     */
+    @Test
+    public void test_getImageData2() throws Exception {
+        final Bundle bundleMockup = mock( Bundle.class );
+        final URL virtualPathUrl = new URL( TEST_URL );
+        when( bundleMockup.getEntry( TEST_PATH ) ).thenReturn( virtualPathUrl );
+        final Plugin pluginMockup = mock(Plugin.class);
+        when(ImageUtil.pluginSurrogate.getAdapter(pluginMockup)).thenReturn(bundleMockup);
+        
+        ImageData imgData = ImageUtil.getImageData(pluginMockup, TEST_PATH);
+
+        Assert.assertNotNull( imgData );
+    }
+    
+    /**
+     * Test {@link ImageUtil#getImage(String, String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ImageUtil#getImage(String, String)
+     */
+    @Test
+    public void test_getImage3() throws Exception {
+        final String pluginID = "testID";
+        final Bundle bundleMockup = mock( Bundle.class );
+        final URL virtualPathUrl = new URL( TEST_URL );
+        when( bundleMockup.getEntry( TEST_PATH ) ).thenReturn( virtualPathUrl );
+        when(ImageUtil.platformSurrogate.getAdapter(pluginID)).thenReturn(bundleMockup);
+        
+        Image img = ImageUtil.getImage(pluginID, TEST_PATH);
+        
+        Assert.assertNotNull(img);
+    }
+    
+    /**
+     * Test {@link ImageUtil#getImageData(String, String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ImageUtil#getImageData(String, String)
+     */
+    @Test
+    public void test_getImageData3() throws Exception {
+        final String pluginID = "testID";
+        final Bundle bundleMockup = mock( Bundle.class );
+        final URL virtualPathUrl = new URL( TEST_URL );
+        when( bundleMockup.getEntry( TEST_PATH ) ).thenReturn( virtualPathUrl );
+        when(ImageUtil.platformSurrogate.getAdapter(pluginID)).thenReturn(bundleMockup);
+        
+        ImageData imgData = ImageUtil.getImageData(pluginID, TEST_PATH);
+        Assert.assertNotNull( imgData );
+    }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/ImageUtilTest.png b/org.tizen.common/test/src/org/tizen/common/util/ImageUtilTest.png
new file mode 100644 (file)
index 0000000..d703284
Binary files /dev/null and b/org.tizen.common/test/src/org/tizen/common/util/ImageUtilTest.png differ
diff --git a/org.tizen.common/test/src/org/tizen/common/util/LocalPortCheckerTest.java b/org.tizen.common/test/src/org/tizen/common/util/LocalPortCheckerTest.java
new file mode 100644 (file)
index 0000000..549e8e7
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Random;
+
+import org.junit.Test;
+
+
+/**
+ * LocalPortCheckerTest
+ *
+ * Test case for {@link LocalPortChecker}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see LocalPortChecker
+ */
+public class LocalPortCheckerTest
+{
+       
+       /**
+        * Test {@link LocalPortChecker#isPortInRange(int)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see LocalPortChecker#isPortInRange(int)
+        */
+       @Test
+       public void test_isPortInRange() throws Exception
+       {
+               for ( int i = 0 ; i < 65536 ; ++i )
+               {
+                       assertTrue( LocalPortChecker.isPortInRange( i ) );
+               }
+               assertFalse( LocalPortChecker.isPortInRange( -1 ) );
+               assertFalse( LocalPortChecker.isPortInRange( 65536 ) );
+       }
+       
+       /**
+        * Test {@link LocalPortChecker#isPortAvailable(int)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see LocalPortChecker#isPortAvailable(int)
+        */
+       @Test
+       public void test_isPortAvailable() throws Exception
+       {
+               assertFalse( LocalPortChecker.isPortAvailable( -1 ) );
+               assertTrue( LocalPortChecker.isPortAvailable( 0 ) );
+               assertFalse( LocalPortChecker.isPortAvailable( 65538 ) );
+       }
+       
+       /**
+        * Test {@link LocalPortChecker#getAvailableLocalPort(int, int)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see LocalPortChecker#getAvailableLocalPort(int, int)
+        */
+       @Test
+       public void test_getAvailableLocalPort() throws Exception
+       {
+               final Random r = new Random( System.currentTimeMillis() );
+               final int MIN = 10000;
+               final int MAX = 65535;
+               
+               for ( int i = 0 ; i < 1000 ; ++i )
+               {
+                       final int basePort = r.nextInt( MAX - MIN ) + MIN;
+                       final int inc = r.nextInt( 5 ) - 2;
+
+                       int port = LocalPortChecker.getAvailableLocalPort( inc, basePort );
+                       assertEquals( "base port :" + basePort + ", inc :" + inc + ", real port :" + port, ( basePort == port ), LocalPortChecker.isPortAvailable( basePort ) );
+               }
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/MapUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/MapUtilTest.java
new file mode 100644 (file)
index 0000000..58feb4b
--- /dev/null
@@ -0,0 +1,205 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact:
+* ChangHyun Lee <changhyun1.lee@samsung.com>
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.junit.Test;
+
+
+/**
+ * MapUtilTest.
+ *
+ * Test case for {@link MapUtil}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see MapUtil
+ *
+ */
+public class MapUtilTest {
+    /**
+     * Test {@link MapUtil#length(Map)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see MapUtil#length(Map)
+     */
+    @Test
+    public void test_length() throws Exception {
+        assertEquals(0, MapUtil.length(null));
+        Map<String, String> map = new HashMap<String, String>();
+        map.put("aaa", "111");
+        map.put("bbb", "222");
+        assertEquals(map.size(), MapUtil.length(map));
+    }
+
+    /**
+     * Test {@link MapUtil#isEmpty(Map)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see MapUtil#isEmpty(Map)
+     */
+    @Test
+    public void test_isEmpty() throws Exception {
+        assertTrue(MapUtil.isEmpty(null));
+
+        Map<String, String> map = new HashMap<String, String>();
+        assertTrue(MapUtil.isEmpty(map));
+
+        map.put("aaa", "111");
+        map.put("bbb", "222");
+        assertFalse(MapUtil.isEmpty(map));
+    }
+
+    /**
+     * Test {@link MapUtil#asMap(Object[], Object[])
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see MapUtil#asMap(Object[], Object[])
+     */
+    @Test
+    public void test_asMap1() throws Exception {
+        String[] keys = {"aaa", "bbb", "ccc"};
+        String[] values = {"111", "222", "333"};
+        String[] values2 = {"111", "222"};
+
+        assertTrue(MapUtil.asMap(null, null) != null);
+        assertTrue(MapUtil.asMap(keys, null) != null);
+        assertTrue(MapUtil.asMap(null, values) != null);
+
+        Map<String, String> map1 = MapUtil.asMap(keys, values);
+        assertEquals(map1.size(), 3);
+        Map<String, String> map2 = MapUtil.asMap(keys, values2);
+        assertEquals(map2.size(), 2);
+        Map<String, String> map3 = MapUtil.asMap(null, null);
+        assertEquals(map3.size(), 0);
+    }
+
+    /**
+     * Test {@link MapUtil#asMap(Object[][] objs)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link MapUtil#asMap(Object[][] objs)}
+     */
+    @Test
+    public void test_asMap2() throws Exception {
+        final Object[][] TEST_CASES = new Object[][] {
+            new Object[] { "aaa", "111" },
+            new Object[] { "bbb", "222" },
+        };
+
+        final Object[][] TEST_CASES2 = new Object[][] {
+            new Object[] {"aaa"},
+            new Object[] {null},
+            new Object[] { "aaa", "111" },
+            new Object[] { "bbb", "222" },
+        };
+
+        assertTrue(MapUtil.asMap(null) != null);
+
+        Map<Object, Object> map1 = MapUtil.asMap(TEST_CASES);
+        assertTrue(map1 != null);
+        assertEquals(map1.size(), 2);
+        int iTestCase = 0;
+        for ( final Object[] TEST_CASE : TEST_CASES ) {
+            ++iTestCase;
+            final Object[] object = TEST_CASE;
+            assertEquals(iTestCase + " th test case", object[1], map1.get(object[0]));
+        }
+
+        Map<Object, Object> map2 = MapUtil.asMap(TEST_CASES2);
+        assertTrue(map2 != null);
+        assertEquals(map2.size(), 2);
+    }
+
+    /**
+     * Test {@link MapUtil#mergePropertiesIntoMap(Properties, Map)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see MapUtil#mergePropertiesIntoMap(Properties, Map)
+     */
+    @Test
+    public void test_mergePropertiesIntoMap() throws Exception {
+        Properties properties = new Properties();
+        properties.setProperty("aaa", "111");
+        properties.setProperty("bbb", "222");
+
+        HashMap<Object, Object> map = new HashMap<Object, Object>();
+
+        try {
+            MapUtil.mergePropertiesIntoMap(null, null);
+            fail( "mergePropertiesIntoMap must throw exception" );
+        } catch (Exception e) {
+        }
+
+        try {
+            MapUtil.mergePropertiesIntoMap(properties, null);
+            fail( "mergePropertiesIntoMap must throw exception" );
+        } catch (Exception e) {
+        }
+
+        MapUtil.mergePropertiesIntoMap(null, map);
+
+        assertEquals(map.size(), 0);
+        MapUtil.mergePropertiesIntoMap(properties, map);
+        assertEquals(map.size(), 2);
+        assertEquals(properties.getProperty("aaa"), map.get("aaa"));
+        assertEquals(properties.getProperty("bbb"), map.get("bbb"));
+    }
+
+    /**
+     * Test {@link MapUtil#toString(Map)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see MapUtil#toString(Map)
+     */
+    @Test
+    public void test_toString() throws Exception {
+               final Map<String, String> testTarget = new HashMap<String, String>();
+               testTarget.put( "testKey", "testValue" );
+               
+               final String string = MapUtil.toString( testTarget );
+               
+               assertTrue( string.contains( "testKey" ) );
+               assertTrue( string.contains( "testValue" ) );
+               
+               assertNotNull( MapUtil.toString( null ) );
+       }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/MockRunner.java b/org.tizen.common/test/src/org/tizen/common/util/MockRunner.java
new file mode 100644 (file)
index 0000000..a4d73ad
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+/**
+ * MockRunner
+ * 
+ * Mock object for {@link Runnable}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ */
+public class
+MockRunner
+implements Runnable
+{
+       
+       boolean bExecute = false;
+
+       public void run() {
+               ThreadUtil.trySleep( 50 );
+               bExecute = true;
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/ObjectUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/ObjectUtilTest.java
new file mode 100644 (file)
index 0000000..23c40ec
--- /dev/null
@@ -0,0 +1,140 @@
+/*\r
+ *  Common\r
+ *\r
+ * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * BonYong Lee <bonyong.lee@samsung.com>\r
+ * TaeYoung son <taeyoung2.son@samsung.com>\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ * Contributors:\r
+ * - S-Core Co., Ltd\r
+ *\r
+ */\r
+package org.tizen.common.util;\r
+\r
+import static org.junit.Assert.assertEquals;\r
+\r
+import org.junit.Test;\r
+\r
+/**\r
+ * ObjectUtilTest.\r
+ * \r
+ * Helper related to {@link ObjectUtil}\r
+ * \r
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)\r
+ * @author TaeYoung Son{@literal <taeyoung2.son@samsung.com>} (S-Core)\r
+ * \r
+ * @see ObjectUtil\r
+ * \r
+ */\r
+public class ObjectUtilTest {\r
+    @Test\r
+    public void test_nvl() throws Exception {\r
+        final Object[][] TEST_CASES = new Object[][] {\r
+                new Object[] { null, null },\r
+                new Object[] { new Object[] { null }, null },\r
+                new Object[] { new Object[] { "hello" }, "hello" },\r
+                new Object[] { new Object[] { null, null, "b" }, "b" },\r
+                new Object[] { new Object[] { null, "a", "b" }, "a" } };\r
+\r
+        int nTestCase = 0;\r
+        for (final Object[] TEST_CASE : TEST_CASES) {\r
+            nTestCase++;\r
+            final Object[] input = (Object[]) TEST_CASE[0];\r
+            final Object expected = TEST_CASE[1];\r
+\r
+            assertEquals(nTestCase + "th test case failed." + "\n input : "\r
+                    + input + "\n", expected, ObjectUtil.nvl(input));\r
+        }\r
+    }\r
+\r
+    @Test\r
+    public void test_equals() {\r
+        final Object[][] TEST_CASES = new Object[][] {\r
+                new Object[] { null, null, true },\r
+                new Object[] { null, "a", false },\r
+                new Object[] { "a", null, false },\r
+                new Object[] { "a", "a", true },\r
+                new Object[] { "a", new String("a"), true },\r
+                new Object[] { "a", "b", false },\r
+                new Object[] { new char[] { 'a', 'a', 'b' },\r
+                        new char[] { 'a', 'a', 'b' }, true },\r
+                new Object[] { new int[] { 1, 2, 3 }, new int[] { 1, 3, 2 },\r
+                        false } };\r
+\r
+        int nTestCase = 0;\r
+        for (final Object[] TEST_CASE : TEST_CASES) {\r
+            nTestCase++;\r
+            final Object input1 = (Object) TEST_CASE[0];\r
+            final Object input2 = (Object) TEST_CASE[1];\r
+            final Object expected = TEST_CASE[2];\r
+            assertEquals(nTestCase + "th test case failed."\r
+                    + "\n first input : " + input1 + "\n" + "second input : "\r
+                    + input2 + "\n", expected,\r
+                    ObjectUtil.equals(input1, input2));\r
+        }\r
+    }\r
+\r
+    @Test\r
+    public void test_hexFormat() {\r
+        final Object[][] TEST_CASES = new Object[][] {\r
+                new Object[] { 0, 0, "0" },\r
+                new Object[] { 0, 2, "00" },\r
+                new Object[] { 15, 1, "f" },\r
+                new Object[] { 15, 3, "00f" },\r
+                new Object[] { 2147483647, 10, "007fffffff" },\r
+                new Object[] { -2147483647, 10, "0080000001" },\r
+                new Object[] { -1, 1, "ffffffff" }\r
+        };\r
+\r
+        int nTestCase = 0;\r
+        for (final Object[] TEST_CASE : TEST_CASES) {\r
+            nTestCase++;\r
+            final Object input1 = TEST_CASE[0];\r
+            final Object input2 = TEST_CASE[1];\r
+            final Object expected = TEST_CASE[2];\r
+\r
+            assertEquals(nTestCase + "th test case failed."\r
+                    + "\n first input : " + input1.toString() + "\n" + "second input : "\r
+                    + input2.toString() + "\n", (String)expected,\r
+                    ObjectUtil.hexFormat((Integer)input1, ((Integer)input2).intValue()));\r
+        }\r
+\r
+    }\r
+\r
+    @Test\r
+    public void test_toString() {\r
+        final Object[][] TEST_CASES = new Object[][] {\r
+                new Object[] { null, "<<null>>" },\r
+                new Object[] { "null", "String@C587" },\r
+                new Object[] { "a", "String@0061" },\r
+                new Object[] { "A", "String@0041" },\r
+                new Object[] { 1, "Integer@0001" },\r
+                new Object[] { 10, "Integer@000A" },\r
+                new Object[] { -1, "Integer@FFFF" },\r
+                };\r
+\r
+        int nTestCase = 0;\r
+        for (final Object[] TEST_CASE : TEST_CASES) {\r
+            nTestCase++;\r
+            final Object input = TEST_CASE[0];\r
+            final Object expected = TEST_CASE[1];\r
+\r
+            assertEquals(nTestCase + "th test case failed." + "\n input : "\r
+                    + input + "\n", expected, ObjectUtil.toString(input));\r
+        }\r
+    }\r
+}\r
diff --git a/org.tizen.common/test/src/org/tizen/common/util/ParsingUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/ParsingUtilTest.java
new file mode 100644 (file)
index 0000000..f456715
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+
+/**
+ * ParsingUtilTest
+ *
+ * Test case for {@link ParsingUtil}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see ParsingUtil
+ */
+public class ParsingUtilTest
+{
+    /**
+     * Test {@link ParsingUtil#parseBoolean(String, boolean)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ParsingUtil#parseBoolean(String, boolean)
+     */
+       @Test
+       public void test_parseBoolean() throws Exception
+       {
+               assertEquals( true, ParsingUtil.parseBoolean( "true", false ) );
+               assertEquals( false, ParsingUtil.parseBoolean( null, false ) );
+               assertEquals( true, ParsingUtil.parseBoolean( null, true ) );
+               assertEquals( false, ParsingUtil.parseBoolean( "xxxx", false ) );
+               assertEquals( true, ParsingUtil.parseBoolean( "xxxx", true ) );
+               assertEquals( true, ParsingUtil.parseBoolean( "Y", false ) );
+               assertEquals( true, ParsingUtil.parseBoolean( "1", false ) );
+       }
+       
+    /**
+     * Test {@link ParsingUtil#parseInt(String, int)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ParsingUtil#parseInt(String, int)
+     */
+       @Test
+       public void test_parseInt() throws Exception
+       {
+               assertEquals( 3, ParsingUtil.parseInt( "3", 0 ) );
+               assertEquals( 2, ParsingUtil.parseInt( "2", 0 ) );
+               assertEquals( 16, ParsingUtil.parseInt( "0x10", 0 ) );
+               assertEquals( 8, ParsingUtil.parseInt( "010", 0 ) );
+       }
+
+    /**
+     * Test {@link ParsingUtil#parseLong(String, long)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ParsingUtil#parseLong(String, long)
+     */
+       @Test
+       public void test_parseLong() throws Exception
+       {
+               assertEquals( 3, ParsingUtil.parseLong( "3", 0 ) );
+               assertEquals( 2, ParsingUtil.parseLong( "2", 0 ) );
+               assertEquals( 16, ParsingUtil.parseLong( "0x10", 0 ) );
+               assertEquals( 8, ParsingUtil.parseLong( "010", 0 ) );
+       }
+
+    /**
+     * Test {@link ParsingUtil#parseDouble(String, double)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see ParsingUtil#parseDouble(String, double)
+     */
+       @Test
+       public void test_parseDouble() throws Exception
+       {
+               assertEquals( 3.0, ParsingUtil.parseDouble( "3", 0 ), 0 );
+               assertEquals( 2.0, ParsingUtil.parseDouble( "2", 0 ), 0 );
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/PluginUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/PluginUtilTest.java
new file mode 100644 (file)
index 0000000..7760c43
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ *  Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * Ho Namkoong <ho.namkoong@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.common.util;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.tizen.common.Surrogate;
+
+/**
+ * PluginUtilTest.
+ *
+ * Test case for {@link PluginUtil}
+ * 
+ * @author Ho Namkoong{@literal <ho.namkoong@samsung.com>} (S-Core)
+ * 
+ * @see PluginUtil
+ */
+@SuppressWarnings("unchecked")
+public class PluginUtilTest {
+
+    /**
+     * mock up test extension point id
+     */
+    public static String TEST_EXT_ID = "test-ep";
+    
+    /**
+     * mock up test class id
+     */
+    public static String TEST_CLS_ID = "test-class";
+    
+    /**
+     * mock up IConfigurationElement
+     */
+    public static IConfigurationElement config;
+    
+    @Before
+    public void setUp() {
+        PluginUtil.platformSurrogate = mock(Surrogate.class);
+        
+        final IExtensionRegistry registry = mock(IExtensionRegistry.class);
+        when(PluginUtil.platformSurrogate.getAdapter()).thenReturn(registry);
+        
+        final IExtensionPoint ep = mock(IExtensionPoint.class);
+        when(registry.getExtensionPoint(TEST_EXT_ID)).thenReturn(ep);
+        
+        IExtension[] exts = new IExtension[1];
+        when(ep.getExtensions()).thenReturn(exts);
+        
+        final IExtension ext = mock(IExtension.class);
+        exts[0] = ext;
+        
+        final IConfigurationElement[] configs = new IConfigurationElement[1];
+        when(ext.getConfigurationElements()).thenReturn(configs);
+        
+        config = mock(IConfigurationElement.class);
+        configs[0] = config;
+    }
+    
+    @After
+    public void tearDown() {
+        PluginUtil.platformSurrogate = null;
+    }
+
+    /**
+     * Test {@link PluginUtil#loadClasses(String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see PluginUtil#loadClasses(String)
+     */
+    @Test
+    public void testLoadClasses() throws Exception {
+        PluginUtil.loadClasses(TEST_EXT_ID);
+        Mockito.verify(config).createExecutableExtension("class");
+    }
+
+    /**
+     * Test {@link PluginUtil#loadClass(String, String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see PluginUtil#loadClass(String, String)
+     */
+    @Test
+    public void testLoadClass() throws Exception {
+        when(config.getAttribute("id")).thenReturn(TEST_CLS_ID);
+        
+        PluginUtil.loadClass(TEST_EXT_ID, TEST_CLS_ID);
+        Mockito.verify(config).createExecutableExtension("class");
+    }
+
+    /**
+     * Test {@link PluginUtil#getExtensionAttribute(String, String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see PluginUtil#getExtensionAttribute(String, String)
+     */
+    @Test
+    public void testGetExtensionAttribute() throws Exception {
+        when(config.getAttribute("extension")).thenReturn("css");
+        PluginUtil.getExtensionAttribute(TEST_EXT_ID, "extension");
+        Mockito.verify(config).getAttribute("extension");
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/SWTUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/SWTUtilTest.java
new file mode 100644 (file)
index 0000000..bf3cce3
--- /dev/null
@@ -0,0 +1,123 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.swt.widgets.Display;
+import org.junit.Test;
+
+
+
+/**
+ * SWTUtilTest.
+ * 
+ * Test case for {@link SWTUtil}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see SWTUtil
+ */
+public class SWTUtilTest
+{
+       /**
+        * Test {@link SWTUtil#getDisplay()}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link SWTUtil#getDisplay()}
+        */
+       @Test
+       public void test_getDisplay() throws Exception {
+               Display dp = SWTUtil.getDisplay();
+               assertNotNull( dp );
+               dp.dispose();
+       }
+       
+       /**
+        * Test {@link SWTUtil#asynExec()}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link SWTUtil#asynExec()}
+        */
+       @Test
+       public void test_asynExec() throws Exception {
+               MockRunner runnable = new MockRunner();
+               assertFalse( runnable.bExecute );
+               Display dp = SWTUtil.getDisplay();
+               SWTUtil.asyncExec( dp, runnable );
+               assertFalse( runnable.bExecute );
+               
+               long start = System.currentTimeMillis();
+               while ( !runnable.bExecute && (System.currentTimeMillis() - start) < 100 )
+               {
+                       if ( !dp.readAndDispatch() )
+                       {
+                               dp.sleep();
+                       }
+               }
+               assertTrue( runnable.bExecute );
+       }
+       
+       /**
+        * Test {@link SWTUtil#isHtmlFile()}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link SWTUtil#isHtmlFile()}
+        */
+       @Test
+       public void test_isHtmlFile() throws Exception {
+               final Object[][] TEST_CASES = new Object[][] {
+                               new Object[] { "aaaa.exe", false },
+                               new Object[] { "index.html", true },
+                               new Object[] { "index.test.html", true },
+                               new Object[] { "index..html", true },
+                               new Object[] { ".profile", false },
+                               new Object[] { "ReadMe ", false },
+                               new Object[] { "ReadMe", false },
+                               new Object[] { "ReadMe. ", false },
+                               new Object[] { "ReadMe. test", false }
+               };
+
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       final String fileName = (String) TEST_CASE[0];
+                       final boolean expected = (Boolean) TEST_CASE[1];
+                       
+                       
+                       /*
+                        * LookAtMe : Attach title when looping test case
+                        */
+                       assertEquals( "input :" + fileName, expected, SWTUtil.isHtmlFile( fileName ) );
+               }
+               
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/StringUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/StringUtilTest.java
new file mode 100644 (file)
index 0000000..e95191c
--- /dev/null
@@ -0,0 +1,459 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * StringUtilTest
+ * 
+ * Test case for {@link StringUtil}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see StringUtil
+ */
+public class
+StringUtilTest
+{
+    /**
+     * @throws Exception in case of failure in test
+     *
+     * @see StringUtil#nvl(String...)
+     */
+    @Test
+    public
+    void
+    test_nvl()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+            new Object[] { "", new String[] { null, null } },
+            new Object[] { "Hello", new String[] { "Hello", "World" } },
+            new Object[] { "World", new String[] { null, "World" } },
+            new Object[] { "hello", new String[] { null, "hello" } },
+            new Object[] { "hello", new String[] { "hello", "world" } },
+            new Object[] { "hello", new String[] { null, null, "hello", "world" } },
+        };
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final String expected = (String) TEST_CASE[0];
+            final String[] input = (String[]) TEST_CASE[1];
+            assertEquals( expected, StringUtil.nvl( input ) );
+        }
+    }
+
+    /**
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link StringUtil#trimLeadingWhitespace(String)}
+     */
+    @Test
+    public void
+    test_trimLeadingWhitespace()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+            new Object[] { "", "" },
+            new Object[] { "", "   " },
+            new Object[] { null, null },
+            new Object[] { "Hello", "  Hello" },
+            new Object[] { "H ", " H " },
+        };
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final String expected = (String) TEST_CASE[0];
+            final String input = (String) TEST_CASE[1];
+            assertEquals( expected, StringUtil.trimLeading( input ) );
+        }
+    }
+
+    /**
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link StringUtil#trimLeadingWhitespace(String)}
+     */
+    @Test
+    public void
+    test_trimTrailingWhitespace()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+            new Object[] { "", "" },
+            new Object[] { "", "   " },
+            new Object[] { null, null },
+            new Object[] { "Hello", "Hello  " },
+            new Object[] { " H", " H " },
+        };
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final String expected = (String) TEST_CASE[0];
+            final String input = (String) TEST_CASE[1];
+            assertEquals( expected, StringUtil.trimTrailing( input ) );
+        }
+    }
+
+    /**
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link StringUtil#trimLeadingCharacter(String, char)}
+     */
+    @Test
+    public void
+    test_trimLeadingCharacter()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+            new Object[] { "", "", '-' },
+            new Object[] { "   ", "   ", '-' },
+            new Object[] { null, null, '-' },
+            new Object[] { "Hello  ", "---Hello  ", '-' },
+            new Object[] { " H ", " H ", '-' },
+        };
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final String expected = (String) TEST_CASE[0];
+            final String input = (String) TEST_CASE[1];
+            final char trimChar = (Character) TEST_CASE[2];
+            assertEquals(
+                expected,
+                StringUtil.trimLeadingCharacter( input, trimChar )
+            );
+        }
+    }
+
+    /**
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link StringUtil#trimTrailingCharacter(String, char)
+     */
+    @Test
+    public void
+    test_trimTrailingCharacter()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+            new Object[] { "", "", '-' },
+            new Object[] { "   ", "   ", '-' },
+            new Object[] { null, null, '-' },
+            new Object[] { "Hello", "Hello---", '-' },
+            new Object[] { " H-- ", " H-- ", '-' },
+            new Object[] { " H", " H--", '-' },
+        };
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final String expected = (String) TEST_CASE[0];
+            final String input = (String) TEST_CASE[1];
+            final char trimChar = (Character) TEST_CASE[2];
+            assertEquals(
+                expected,
+                StringUtil.trimTrailingCharacter( input, trimChar )
+            );
+        }
+    }
+
+    /**
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link StringUtil#trimCharacter(String, char)}
+     */
+    @Test
+    public
+    void
+    test_trimCharacter()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+            new Object[] { "", "", '-' },
+            new Object[] { "   ", "   ", '-' },
+            new Object[] { null, null, '-' },
+            new Object[] { "Hello", "Hello---", '-' },
+            new Object[] { " H-- ", " H-- ", '-' },
+            new Object[] { " H", " H--", '-' },
+            new Object[] { " H", "-- H--", '-' },
+            new Object[] { "H", "--H--", '-' },
+            new Object[] { " - H", "-- - H--", '-' },
+        };
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final String expected = (String) TEST_CASE[0];
+            final String input = (String) TEST_CASE[1];
+            final char trimChar = (Character) TEST_CASE[2];
+            assertEquals(
+                expected,
+                StringUtil.trimCharacter( input, trimChar )
+            );
+        }
+
+    }
+
+    /**
+     * @throws Exception in case of failure in test
+     *
+     * @see StringUtil#getWord(String, int)
+     */
+    @Test
+    public void
+    test_getWord()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+            new Object[] { "I am a boy", 0, "I" },
+            new Object[] { "I am a boy", 1, "I" },
+            new Object[] { "I am a boy", 2, "am" },
+            new Object[] { "I am a boy", 3, "am" },
+            new Object[] { "I am a boy", 4, "am" },
+            new Object[] { "I am a boy", 5, "a" },
+            new Object[] { "I am a boy", 6, "a" },
+            new Object[] { "I am a boy", 7, "boy" },
+            new Object[] { "I am a boy", 8, "boy" },
+            new Object[] { "I am a boy", 9, "boy" },
+            new Object[] { "I am a boy", 10, "boy" },
+            new Object[] { "I am a boy", 11, "" },
+        };
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final String doc = (String) TEST_CASE[0];
+            final int index = (Integer) TEST_CASE[1];
+            final String expected = (String) TEST_CASE[2];
+            assertEquals(
+                expected,
+                StringUtil.getWord( doc, index )
+            );
+        }
+    }
+
+    /**
+     * @throws Exception in case of failure in test
+     *
+     * @see StringUtil#getPreviousWord(String, int)
+     */
+    @Test
+    public void
+    test_getPreviousWord()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+            new Object[] { "I am a boy ", 0, "" },
+            new Object[] { "I am a boy ", 1, "I" },
+            new Object[] { "I am a boy ", 2, "" },
+            new Object[] { "I am a boy ", 3, "a" },
+            new Object[] { "I am a boy ", 4, "am" },
+            new Object[] { "I am a boy ", 5, "" },
+            new Object[] { "I am a boy ", 6, "a" },
+            new Object[] { "I am a boy ", 7, "" },
+            new Object[] { "I am a boy ", 8, "b" },
+            new Object[] { "I am a boy ", 9, "bo" },
+            new Object[] { "I am a boy ", 10, "boy" },
+            new Object[] { "I am a boy ", 11, "" },
+            new Object[] { "I am a boy ", 12, "" },
+            new Object[] { "#{\ntest", 2, "#{" },
+        };
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final String doc = (String) TEST_CASE[0];
+            final int index = (Integer) TEST_CASE[1];
+            final String expected = (String) TEST_CASE[2];
+            assertEquals(
+                expected,
+                StringUtil.getPreviousWord( doc, index )
+            );
+        }
+    }
+
+    /**
+     * Test {@link StringUtil#getLastSegment(String, String)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link StringUtil#getLastSegment(String, String)}
+     */
+    @Test
+    public
+    void
+    test_getLastSegement()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+            new Object[] { null, " ", "" },
+            new Object[] { "I am a boy", " ", "boy" },
+            new Object[] { "I am a  boy", " ", "boy" },
+            new Object[] { "I am a boy ", " ", "" },
+            new Object[] { "a,b,c,d", ",", "d" },
+        };
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final String doc = (String) TEST_CASE[0];
+            final String separator = (String) TEST_CASE[1];
+            final String expected = (String) TEST_CASE[2];
+            assertEquals(
+                expected,
+                StringUtil.getLastSegment( doc, separator )
+            );
+        }
+    }
+
+    /**
+     * Test {@link StringUtil#getLastSegment(String, String)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link StringUtil#getLastSegment(String, String)}
+     */
+    @Test
+    public
+    void
+    test_removeLastSegement()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+            new Object[] { null, " ", "" },
+            new Object[] { "I am a boy", " ", "I am a" },
+            new Object[] { "I am a  boy", " ", "I am a " },        // FIXME ?
+            new Object[] { "I am a boy ", " ", "I am a boy" },
+            new Object[] { "a,b,c,d", ",", "a,b,c" },
+        };
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final String doc = (String) TEST_CASE[0];
+            final String separator = (String) TEST_CASE[1];
+            final String expected = (String) TEST_CASE[2];
+            assertEquals(
+                expected,
+                StringUtil.removeLastSegment( doc, separator )
+            );
+        }
+    }
+
+    /**
+     * Test {@link StringUtil#split(String, String)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link StringUtil#split(String, String)}
+     */
+    @Test
+    public
+    void
+    test_split()
+    throws Exception
+    {
+        final Object[][] TEST_CASES = new Object[][] {
+            new Object[] { "aa.bbb.ccc", ".", new String[] { "aa", "bbb", "ccc" } }
+        };
+
+        for ( final Object[] TEST_CASE : TEST_CASES )
+        {
+            final String input = (String) TEST_CASE[0];
+            final String delimiters = (String) TEST_CASE[1];
+            final String[] expected = (String[]) TEST_CASE[2];
+
+            assertArrayEquals( expected, StringUtil.split( input, delimiters ) );
+        }
+    }
+
+    /**
+     * Test {@link StringUtil#enumNameToStringArray(T[] values)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link StringUtil#enumNameToStringArray(T[] values)}
+     */
+    @Test
+    public void test_enumNameToStringArray() throws Exception {
+        TestEnumCase [] enums = TestEnumCase.values();
+        String [] values = StringUtil.enumNameToStringArray(enums);
+        assertTrue(enums.length == values.length);
+
+        StringBuilder enumBuilder = new StringBuilder();
+        for (TestEnumCase testEnumCase : enums) {
+            enumBuilder.append(testEnumCase.name());
+        }
+
+        StringBuilder utilBuilder = new StringBuilder();
+        for (String string : values) {
+            utilBuilder.append(string);
+        }
+        assertEquals(enumBuilder.toString(), utilBuilder.toString());
+    }
+
+    /**
+     * Test {@link StringUtil#removeStart(String, String)}
+     * 
+     * @throws Exception in case of failure in test
+     * 
+     * @see {@link StringUtil#removeStart(String, String)}
+     */
+    @Test
+    public void
+    test_removeStart()
+    throws Exception
+    {
+        String str = "abcdefg";
+        String remove1 = "a";
+        String remove2 = "abc";
+        String remove3 = "def";
+
+        // null test
+        assertEquals( str, StringUtil.removeStart( str, null ) );
+        assertEquals( null, StringUtil.removeStart( null, remove1 ) );
+        assertEquals( null, StringUtil.removeStart( null, null ) );
+
+        // start with
+        assertEquals( "bcdefg", StringUtil.removeStart(str, remove1 ) );
+        assertEquals( "defg", StringUtil.removeStart(str, remove2 ) );
+
+        // not start with
+        assertEquals( str, StringUtil.removeStart(str, remove3 ) );
+    }
+
+    public enum TestEnumCase {
+        ABC("ABC"),
+        DEF("DEF"),
+        GHI("GHI"),
+        JKL("JKL");
+        private String value;
+        TestEnumCase(String v) {
+            value = v;
+        }
+        public String value() {
+            return value;
+        }
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/ThreadUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/ThreadUtilTest.java
new file mode 100644 (file)
index 0000000..62f8916
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+
+/**
+ * ThreadUtilTest
+ * 
+ * Test case for {@link ThreadUtil}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see ThreadUtil
+ */
+public class ThreadUtilTest {
+       
+       /**
+        * Test {@link ThreadUtil#trySleep(long)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link ThreadUtil#trySleep(long)}
+        */
+       @Test
+       public void test_trySleep() throws Exception {
+               final Object[][] TEST_CASES = new Object[][] {
+                               new Object[] { 100, 100 },
+                               new Object[] { 0, 0 },
+                               new Object[] { -100, 0 }
+               };
+               
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       final int milliseconds = (Integer) TEST_CASE[0];
+                       final int expected = (Integer) TEST_CASE[1];
+                       
+                       long start = System.currentTimeMillis();
+                       ThreadUtil.trySleep( milliseconds );
+                       long end = System.currentTimeMillis();
+                       
+                       assertTrue( "input :" + milliseconds + ", expected :" + expected, expected <= ( end - start ) );
+               }
+       }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/ValidationUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/ValidationUtilTest.java
new file mode 100644 (file)
index 0000000..2dc395e
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact:
+* ChangHyun Lee <changhyun1.lee@samsung.com>
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+
+package org.tizen.common.util;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * ValidationUtilTest.
+ *
+ * Test case for {@link ValidationUtil}
+ *
+ * @author Changhyun Lee{@literal <changhyun1.lee@samsung.com>} (S-Core)
+ *
+ * @see ValidationUtil
+ *
+ */
+public class ValidationUtilTest {
+
+    /**
+     * Test {@link ValidationUtil#checkForEmail(String value)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link ValidationUtil#checkForEmail(String value)}
+     */
+    @Test
+    public void test_checkForEmail() throws Exception {
+        final String[] validedEmail = {
+                "changhyun1.lee@samsung.com",
+                "12345@exmaple.com",
+                "abcde@exmaple.com",
+                "!a!b#c%d@example.com",
+                "_abcd@example.com",
+                "niceandsimple@example.com",
+                "simplewithsymbol@example.com",
+                "less.common@example.com",
+                "a.little.more.unusual@dept.example.com"
+            };
+        for (String email : validedEmail) {
+            assertTrue(ValidationUtil.checkForEmail(email));
+        }
+
+        final String[] InvalidedEmail = {
+                "changhyun1.lee@samsung",
+                "changhyun1.leesamsung.com",
+                "changhyun1.lee@samsung.com/",
+                "changhyun1.lee@samsung.com!",
+                "@samsung.com",
+                "12345!exmaple.com",
+                "!a!b#c%d@example.co!m",
+                "_abcd@example_com",
+                "user@[IPv6:2001:db8:1ff::a0b:dbd0]",
+                "\"much.more unusual\"@example.com",
+                "\"very.unusual.@.unusual.com\"@example.com",
+                "\"very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual\"@strange.example.com",
+                "0@a",
+                "\"!#$%&'*+-/=?^_`{}|~@example.org",
+                "\"()<>[]:,;@\\\"!#$%&'*+-/=?^_`{}| ~  ? ^_`{}|~.a\"@example.org",
+                "\"\"@example.org",
+                "postbox@com", // top-level domains are invalid hostnames
+                "Abc.example.com", // an @ character must separate the local and domain parts
+                "Abc.@example.com", // character dot(.) is last in local part
+                "Abc..123@example.com", // character dot(.) is double
+                "A@b@c@example.com ", // only one @ is allowed outside quotation marks
+                "a\"b(c)d,e:f;g<h>i[j\\k]l@example.com", // none of the special characters in this local part is allowed outside quotation marks
+                "just\"not\"right@example.com", // quoted strings must be dot separated, or the only element making up the local-part
+                "this is\"not\\allowed@example.com", // spaces, quotes, and backslashes may only exist when within quoted strings and preceded by a slash
+                "this\\ still\"not\\allowed@example.com" // even if escaped (preceded by a backslash), spaces, quotes, and backslashes must still be contained by quotes
+            };
+        for (String email : InvalidedEmail) {
+            assertFalse(ValidationUtil.checkForEmail(email));
+        }
+    }
+
+    /**
+     * Test {@link ValidationUtil#checkForURL(String value)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link ValidationUtil#checkForURL(String value)}
+     */
+    @Test
+    public void test_checkForURL() throws Exception {
+        final String[] validedURL = {"http://tizen.org", "http://www.tizen.org", "http://tizen.org/", "http://tizen.org/id", "http://myapp"};
+        for (String url : validedURL) {
+            assertTrue(ValidationUtil.checkForURL(url));
+        }
+
+        final String[] invalidedURL = {"http:/tizen.org", "tizen.org", "www.tizen.org", "http://tizen.org/!", "http://tizen.org/id^", "http://tizen.org/id*"};
+        for (String url : invalidedURL) {
+            assertFalse(ValidationUtil.checkForURL(url));
+        }
+    }
+
+    /**
+     * Test {@link ValidationUtil#checkForFileExtension(String value, String[] extensions)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link ValidationUtil#checkForFileExtension(String value, String[] extensions)}
+     */
+    @Test
+    public void test_checkForFileExtension() throws Exception {
+        final String[] extensions = {".html", ".js", ".css"};
+        assertTrue(ValidationUtil.checkForFileExtension("file.html", extensions));
+        assertTrue(ValidationUtil.checkForFileExtension("123.html", extensions));
+        assertTrue(ValidationUtil.checkForFileExtension("file.js", extensions));
+        assertTrue(ValidationUtil.checkForFileExtension("123.js", extensions));
+        assertTrue(ValidationUtil.checkForFileExtension("file.css", extensions));
+        assertTrue(ValidationUtil.checkForFileExtension("123.css", extensions));
+
+        assertFalse(ValidationUtil.checkForFileExtension("file.html1", extensions));
+        assertFalse(ValidationUtil.checkForFileExtension("123.html!", extensions));
+        assertFalse(ValidationUtil.checkForFileExtension("file.jshtml", extensions));
+        assertFalse(ValidationUtil.checkForFileExtension("123.js2", extensions));
+        assertFalse(ValidationUtil.checkForFileExtension("file.aaacss", extensions));
+        assertFalse(ValidationUtil.checkForFileExtension("123.111css", extensions));
+    }
+
+    /**
+     * Test {@link ValidationUtil#checkForVersion(String value)}
+     *
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link ValidationUtil#checkForVersion(String value)}
+     */
+    @Test
+    public void test_checkForVersion() throws Exception {
+        final String[] validedVersions = {"1.0.1", "1.0.111", "1.10.111", "35.35.123", "0.0.1"};
+        for (String version : validedVersions) {
+            assertTrue(ValidationUtil.checkForVersion(version));
+        }
+
+        final String[] invalidedVersions = {"", "0.0.0", "36.1.1", "0.36.1", "111.111.111", "1.0", ".1", "0.1"};
+        for (String version : invalidedVersions) {
+            assertFalse(ValidationUtil.checkForVersion(version));
+        }
+    }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/ZipUtilTest.java b/org.tizen.common/test/src/org/tizen/common/util/ZipUtilTest.java
new file mode 100644 (file)
index 0000000..bba2a7b
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* GyeongSeok Seo <gyeongseok.seo@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+
+import org.junit.Test;
+
+/**
+ * ZipUtilTest
+ * 
+ * Test case for {@link ZipUtil}
+ * 
+ * @author GyeongSeok Seo{@literal <gyeongseok.seo@samsung.com>} (S-Core)
+ * 
+ * @see ZipUtil
+ */
+public class ZipUtilTest {
+
+    /**
+     * Test {@link ZipUtil#getContent(String, String)}
+     * 
+     * @throws Exception in case of failure in test
+     *
+     * @see {@link ZipUtil#getContent(String, String)}
+     */
+    @Test
+    public void
+    test_getContent()
+    throws Exception
+    {
+        assertNull( ZipUtil.getContent( null, null ) );
+        assertNull( ZipUtil.getContent( null, "text.text" ) );
+        assertNull( ZipUtil.getContent( "test/test_files/resource/test.zip", null ) );
+        assertNull( ZipUtil.getContent( "test/test_files/resource/test", "config.text" ) );
+        assertNull( ZipUtil.getContent( "test/test_files/resource/test.zip", "config.t" ) );
+        assertNull( ZipUtil.getContent( "test/test_files/resource/test.zip", "config.text" ) );
+        assertNotNull( ZipUtil.getContent( "test/test_files/resource/test.zip", "config.xml" ) );
+
+        File file = new File("test/test_files/resource/test.zip");
+        String path = file.getCanonicalFile().getCanonicalPath();
+        assertNotNull( ZipUtil.getContent( path, "config.xml" ) );
+    }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/io/BufferPoolTest.java b/org.tizen.common/test/src/org/tizen/common/util/io/BufferPoolTest.java
new file mode 100644 (file)
index 0000000..ea93b06
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util.io;
+
+import static org.junit.Assert.assertEquals;
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+
+import org.junit.Test;
+
+
+/**
+ * BufferPoolTest
+ *
+ * Test case for {@link BufferPool}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see BufferPool
+ */
+public class
+BufferPoolTest
+{
+       /**
+        * Test {@link BufferPool#setSizeOfFragment(int)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link BufferPool#setSizeOfFragment(int)}
+        */
+       @Test
+       public
+       void
+       test_setSizeOfFragment()
+       throws Exception
+       {
+               final ArrayList<ByteBuffer> tempPool = new ArrayList<ByteBuffer>();
+
+               final BufferPool pool = new BufferPool();
+
+               pool.setSizeOfFragment( 10 );
+               pool.setNumberOfFragments( 10 );
+
+               try {
+                       for ( int i = 0 ; i < 9 ; ++i )
+                       {
+                               tempPool.add( pool.borrow() );
+                       }
+                       pool.setSizeOfFragment( 20 );
+                       ByteBuffer buffer = pool.borrow();
+                       assertEquals( 10, buffer.limit() );
+                       tempPool.add( buffer );
+               }
+               finally
+               {
+                       for ( ByteBuffer buffer : tempPool )
+                       {
+                               pool.release( buffer );
+                       }
+                       
+                       tryClose( pool );
+                       
+               }
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/io/BufferTest.java b/org.tizen.common/test/src/org/tizen/common/util/io/BufferTest.java
new file mode 100644 (file)
index 0000000..c5c2c31
--- /dev/null
@@ -0,0 +1,274 @@
+/*
+ * Common
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: 
+ * BonYong Lee <bonyong.lee@samsung.com>
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+package org.tizen.common.util.io;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * BufferTest
+ *
+ * Test case for {@link Buffer}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see Buffer
+ */
+public class BufferTest
+{
+
+       /**
+        * {@link BufferPool} to use
+        */
+       protected BufferPool bufferPool;
+
+       /**
+        * Set up test unit
+        * 
+        * @throws Exception If test unit can't  be set up
+        */
+       @Before
+       public
+       void
+       setUp()
+       throws Exception
+       {
+               bufferPool = new BufferPool();
+
+               bufferPool.setSizeOfFragment( 10 );
+       }
+
+       /**
+        * Tear down test unit
+        * 
+        * @throws Exception If test unit can't  be tear down
+        */
+       @After
+       public
+       void
+       tearDown()
+       throws Exception
+       {
+               bufferPool.close();
+       }
+
+       /**
+        * Test {@link Buffer#readInt()}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Buffer#readInt()}
+        */
+       @Test
+       public
+       void
+       test_readInt()
+       throws Exception
+       {
+               final Object[][] TEST_CASES = new Object[][] {
+                       new Object[] { 135, new byte[] { 0, 0, 0, -121 } }
+               };
+
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       final int expected = (Integer) TEST_CASE[0];
+                       final byte[] input = (byte[]) TEST_CASE[1];
+                       final Buffer buffer = new Buffer( bufferPool );
+                       try
+                       {
+                               for ( int i = 0, n = input.length ; i < n ; ++i )
+                               {
+                                       buffer.write( input[i] );
+                               }
+
+                               assertEquals( expected, buffer.readInt() );
+                       }
+                       finally
+                       {
+                               tryClose( buffer );
+                       }
+               }
+       }
+
+
+       /**
+        * Test {@link Buffer#writeInt(int)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Buffer#writeInt(int)}
+        */
+       @Test
+       public
+       void
+       test_writeInt()
+       throws Exception
+       {
+               final Object[][] TEST_CASES = new Object[][] {
+                       new Object[] { 135, new int[] { 0, 0, 0, 135 } }
+               };
+
+               for ( final Object[] TEST_CASE : TEST_CASES )
+               {
+                       final int input = (Integer) TEST_CASE[0];
+                       final int[] expected = (int[]) TEST_CASE[1]; 
+
+                       final Buffer buffer = new Buffer( bufferPool );
+                       try
+                       {
+                               buffer.writeInt( input );
+                               for ( int i = 0, n = expected.length ; i < n ; ++i )
+                               {
+                                       assertEquals( expected[i], buffer.read() );
+                               }
+                       }
+                       finally
+                       {
+                               tryClose( buffer );
+                       }
+               }
+       }
+
+       /**
+        * Test {@link Buffer#getBufferSize()}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Buffer#getBufferSize()}
+        */
+       @Test
+       public
+       void
+       test_getBufferSize()
+       throws Exception
+       {
+               final Buffer buffer = new Buffer( bufferPool );
+               try
+               {
+                       final BufferOutputStream bufferOut = new BufferOutputStream( buffer );
+                       bufferOut.write( "12345678901234567890123456789012345678901234567890".getBytes() );
+
+                       assertEquals( 5, buffer.getBufferSize() );
+
+                       buffer.read();
+
+                       assertEquals( 5, buffer.getBufferSize() );
+
+               }
+               finally
+               {
+                       tryClose( buffer );
+               }
+
+       }
+
+       /**
+        * Test {@link Buffer#reset()}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Buffer#reset()}
+        */
+       @Test
+       public
+       void
+       test_reset()
+       throws Exception
+       {
+               final byte[] TEST = "12345678901234567890123456789012345678901234567890".getBytes();
+               final Buffer buffer = new Buffer( bufferPool );
+
+               try
+               {
+                       final BufferOutputStream bufferOut = new BufferOutputStream( buffer );
+                       bufferOut.write( TEST );
+
+                       final BufferInputStream bufferIn = new BufferInputStream( buffer );
+                       final byte[] result = new byte[TEST.length];
+
+                       assertEquals( TEST.length, bufferIn.read( result ) );
+                       assertArrayEquals( TEST, result );
+
+                       buffer.reset();
+
+                       assertEquals( TEST.length, bufferIn.read( result ) );
+                       assertArrayEquals( TEST, result );
+               }
+               finally
+               {
+                       tryClose( buffer );
+               }
+
+       }
+
+       /**
+        * Test {@link Buffer#concatenate(Buffer...)}
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Buffer#concatenate(Buffer...)}
+        */
+       @Test
+       public
+       void
+       test_concatenate()
+       throws Exception
+       {
+               final Buffer buffer1 = new Buffer( bufferPool );
+               final Buffer buffer2 = new Buffer( bufferPool );
+
+               final byte[] EXPECTED = "123456789012123456789012".getBytes();
+               final byte[] TEST = "123456789012".getBytes();
+
+               try
+               {
+                       final BufferOutputStream bufferOut1 = new BufferOutputStream( buffer1 );
+                       bufferOut1.write( TEST );
+
+                       final BufferOutputStream bufferOut2 = new BufferOutputStream( buffer1 );
+                       bufferOut2.write( TEST );
+
+                       Buffer ret = Buffer.concatenate( buffer1, buffer2 );
+                       BufferInputStream bufferIn = new BufferInputStream( ret );
+
+                       final byte[] result = new byte[2 * TEST.length];
+
+                       assertEquals( result.length, ret.size() );
+                       assertEquals( result.length, bufferIn.read( result ) );
+                       assertArrayEquals( EXPECTED, result );
+
+               }
+               finally
+               {
+                       tryClose( buffer1 );
+               }
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/test b/org.tizen.common/test/src/org/tizen/common/util/test
new file mode 100644 (file)
index 0000000..9daeafb
--- /dev/null
@@ -0,0 +1 @@
+test
diff --git a/org.tizen.common/test/src/org/tizen/common/util/url/classpath/ConnectionTest.java b/org.tizen.common/test/src/org/tizen/common/util/url/classpath/ConnectionTest.java
new file mode 100755 (executable)
index 0000000..1b06636
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util.url.classpath;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import org.junit.Test;
+
+/**
+ * ConnectionTest
+ *
+ * Test case for {@link Connection}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see Connection
+ */
+public class ConnectionTest
+{
+       /**
+        * Test {@link Connection#getClassLoaders()
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Connection#getClassLoaders()
+        */
+       @Test
+       public
+       void
+       test_getClassLoaders()
+       throws Exception
+       {
+           Connection connection = new Connection( new URL( "file:///virtualurl" ), getClass().getName() );
+               final Object[] classLoaders = connection.getClassLoaders().toArray();
+               assertEquals( 1, classLoaders.length );
+               
+               URLClassLoader classLoader = new URLClassLoader( new URL[] {} );
+               Thread.currentThread().setContextClassLoader( classLoader );
+               
+               final Object[] classLoaders2 = connection.getClassLoaders().toArray();
+               assertEquals( classLoader, classLoaders2[0] );
+               assertEquals( ClassLoader.getSystemClassLoader(), classLoaders2[1] );
+       }
+       
+       /**
+        * Test {@link Connection#getInputStream()
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see Connection#getInputStream()
+        */
+       @Test
+       public void test_getInputStream() throws Exception
+       {
+               final Connection con = new Connection( new URL( "file:///virtualurl" ), null );
+               try
+               {
+                       con.getInputStream();
+                       fail( "Connection must throw IOException" );
+               }
+               catch ( final IOException e )
+               {
+               }
+       }
+
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/url/classpath/HandlerTest.java b/org.tizen.common/test/src/org/tizen/common/util/url/classpath/HandlerTest.java
new file mode 100755 (executable)
index 0000000..5b652e9
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util.url.classpath;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.tizen.common.util.IOUtil.getBytes;
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ * HandlerTest
+ *
+ * Test case for {@link Handler}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see Handler
+ */
+public class
+HandlerTest
+{
+       protected String oldConfig;
+       
+       /**
+        * install url handler for classpath
+        */
+       @Before
+       public void setUp()
+       {
+               oldConfig = System.getProperty( "java.protocol.handler.pkgs" );
+               System.setProperty( "java.protocol.handler.pkgs", "org.tizen.common.util.url" );
+       }
+       
+       /**
+        * uninstall url handler for classpath
+        */
+       @After
+       public void tearDown()
+       {
+           if ( null == oldConfig )
+           {
+               System.clearProperty( "java.protocol.handler.pkgs" );
+           }
+           else
+           {
+               System.setProperty( "java.protocol.handler.pkgs", oldConfig );
+           }
+       }
+       
+       /**
+        * Test {@link Handler#openConnection(URL)
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Handler#openConnection(URL)
+        */
+       @Test
+       public void test_openConnection() throws Exception
+       {
+               
+               final Handler handler = new Handler();
+               final URL url = new URL( "classpath:///" + getClass().getName().replace( '.', '/' ) + ".class" );
+               
+               final URLConnection connection = handler.openConnection( url );
+               
+               connection.connect();
+               InputStream in = connection.getInputStream();
+               try
+               {
+                       assertTrue( 0 < in.read() );
+               }
+               finally
+               {
+                       tryClose( in );
+               }
+               
+               
+       }
+
+       /**
+        * Test {@link Handler#pickupCaller()
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Handler#pickupCaller()
+        */
+       @Test
+       public void test_pickupCaller() throws Exception {
+               final Handler handler = new Handler();
+               assertNull( handler.pickupCaller() );
+               
+               final URL u = new URL( "classpath:///a.txt" );
+               final InputStream in = u.openStream();
+               assertArrayEquals( "Hello, World".getBytes(), getBytes( in, true ) );
+               
+       }
+}
diff --git a/org.tizen.common/test/src/org/tizen/common/util/url/classpath/a.txt b/org.tizen.common/test/src/org/tizen/common/util/url/classpath/a.txt
new file mode 100644 (file)
index 0000000..1856e9b
--- /dev/null
@@ -0,0 +1 @@
+Hello, World
\ No newline at end of file
diff --git a/org.tizen.common/test/src/org/tizen/common/util/url/cp/HandlerTest.java b/org.tizen.common/test/src/org/tizen/common/util/url/cp/HandlerTest.java
new file mode 100755 (executable)
index 0000000..d92218f
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+*  Common
+*
+* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+*
+* Contact: 
+* BonYong Lee <bonyong.lee@samsung.com>
+* 
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+* Contributors:
+* - S-Core Co., Ltd
+*
+*/
+package org.tizen.common.util.url.cp;
+
+import static org.junit.Assert.assertTrue;
+import static org.tizen.common.util.IOUtil.tryClose;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ * HandlerTest
+ *
+ * Test case for {@link Handler}
+ * 
+ * @author BonYong Lee{@literal <bonyong.lee@samsung.com>} (S-Core)
+ * 
+ * @see Handler
+ */
+public class
+HandlerTest
+{
+       /**
+        * Property key for URL handler
+        */
+       protected static final String PROP_PKG = "java.protocol.handler.pkgs";
+       
+       /**
+        * Old property value for URL handler
+        */
+       protected String oldConfig;
+       
+       /**
+        * Set up URL handler before test
+        */
+       @Before
+       public void setUp()
+       {
+               oldConfig = System.getProperty( PROP_PKG );
+               System.setProperty( PROP_PKG, "org.tizen.common.util.url" );
+       }
+       
+       /**
+        * Restore URL handler after test
+        */
+       @After
+       public void tearDown()
+       {
+        if ( null == oldConfig )
+        {
+            System.clearProperty( "java.protocol.handler.pkgs" );
+        }
+        else
+        {
+            System.setProperty( "java.protocol.handler.pkgs", oldConfig );
+        }
+       }
+       
+       /**
+        * Test {@link Handler#openConnection(URL)
+        * 
+        * @throws Exception in case of failure in test
+        * 
+        * @see {@link Handler#openConnection(URL)
+        */
+       @Test
+       public void test_openConnection() throws Exception
+       {
+               
+               final Handler handler = new Handler();
+               final URL url = new URL( "cp:///" + getClass().getName().replace( '.', '/' ) + ".class" );
+               
+               final URLConnection connection = handler.openConnection( url );
+               
+               connection.connect();
+               InputStream in = connection.getInputStream();
+               try
+               {
+                       assertTrue( 0 < in.read() );
+               }
+               finally
+               {
+                       tryClose( in );
+               }
+               
+               
+       }
+
+}
diff --git a/org.tizen.common/test/test_files/about_files/LICENSE-2.0.htm b/org.tizen.common/test/test_files/about_files/LICENSE-2.0.htm
new file mode 100644 (file)
index 0000000..f7ca656
--- /dev/null
@@ -0,0 +1,191 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache License, Version 2.0</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+    <link rel="stylesheet" type="text/css" media="screen" href="/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="/css/code.css">
+
+    <script type="text/javascript" src="/js/jquery.js"></script>
+    <script type="text/javascript" src="/js/apache_boot.js"></script>
+
+    
+
+    
+    <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License.  You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License. -->
+  </head>
+
+  <body>
+    <div id="page" class="container_16">
+      <div id="header" class="grid_8">
+        <h1>The Apache Software Foundation</h1>
+        <h2>Apache License, Version 2.0</h2>
+      </div>
+
+      <div class="clear"></div>
+      <div id="content" class="grid_16"><div class="section-content"><p>Apache License<br></br>Version 2.0, January 2004<br></br>
+<a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a> </p>
+<p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p>
+<p><strong><a name="definitions">1. Definitions</a></strong>.</p>
+<p>"License" shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.</p>
+<p>"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.</p>
+<p>"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control with
+that entity. For the purposes of this definition, "control" means (i) the
+power, direct or indirect, to cause the direction or management of such
+entity, whether by contract or otherwise, or (ii) ownership of fifty
+percent (50%) or more of the outstanding shares, or (iii) beneficial
+ownership of such entity.</p>
+<p>"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.</p>
+<p>"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.</p>
+<p>"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media types.</p>
+<p>"Work" shall mean the work of authorship, whether in Source or Object form,
+made available under the License, as indicated by a copyright notice that
+is included in or attached to the work (an example is provided in the
+Appendix below).</p>
+<p>"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent, as
+a whole, an original work of authorship. For the purposes of this License,
+Derivative Works shall not include works that remain separable from, or
+merely link (or bind by name) to the interfaces of, the Work and Derivative
+Works thereof.</p>
+<p>"Contribution" shall mean any work of authorship, including the original
+version of the Work and any modifications or additions to that Work or
+Derivative Works thereof, that is intentionally submitted to Licensor for
+inclusion in the Work by the copyright owner or by an individual or Legal
+Entity authorized to submit on behalf of the copyright owner. For the
+purposes of this definition, "submitted" means any form of electronic,
+verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems that
+are managed by, or on behalf of, the Licensor for the purpose of discussing
+and improving the Work, but excluding communication that is conspicuously
+marked or otherwise designated in writing by the copyright owner as "Not a
+Contribution."</p>
+<p>"Contributor" shall mean Licensor and any individual or Legal Entity on
+behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.</p>
+<p><strong><a name="copyright">2. Grant of Copyright License</a></strong>. Subject to the
+terms and conditions of this License, each Contributor hereby grants to You
+a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of, publicly
+display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.</p>
+<p><strong><a name="patent">3. Grant of Patent License</a></strong>. Subject to the terms
+and conditions of this License, each Contributor hereby grants to You a
+perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made, use,
+offer to sell, sell, import, and otherwise transfer the Work, where such
+license applies only to those patent claims licensable by such Contributor
+that are necessarily infringed by their Contribution(s) alone or by
+combination of their Contribution(s) with the Work to which such
+Contribution(s) was submitted. If You institute patent litigation against
+any entity (including a cross-claim or counterclaim in a lawsuit) alleging
+that the Work or a Contribution incorporated within the Work constitutes
+direct or contributory patent infringement, then any patent licenses
+granted to You under this License for that Work shall terminate as of the
+date such litigation is filed.</p>
+<p><strong><a name="redistribution">4. Redistribution</a></strong>. You may reproduce and
+distribute copies of the Work or Derivative Works thereof in any medium,
+with or without modifications, and in Source or Object form, provided that
+You meet the following conditions:</p>
+<ol>
+<li>
+<p>You must give any other recipients of the Work or Derivative Works a
+copy of this License; and</p>
+</li>
+<li>
+<p>You must cause any modified files to carry prominent notices stating
+that You changed the files; and</p>
+</li>
+<li>
+<p>You must retain, in the Source form of any Derivative Works that You
+distribute, all copyright, patent, trademark, and attribution notices from
+the Source form of the Work, excluding those notices that do not pertain to
+any part of the Derivative Works; and</p>
+</li>
+<li>
+<p>If the Work includes a "NOTICE" text file as part of its distribution,
+then any Derivative Works that You distribute must include a readable copy
+of the attribution notices contained within such NOTICE file, excluding
+those notices that do not pertain to any part of the Derivative Works, in
+at least one of the following places: within a NOTICE text file distributed
+as part of the Derivative Works; within the Source form or documentation,
+if provided along with the Derivative Works; or, within a display generated
+by the Derivative Works, if and wherever such third-party notices normally
+appear. The contents of the NOTICE file are for informational purposes only
+and do not modify the License. You may add Your own attribution notices
+within Derivative Works that You distribute, alongside or as an addendum to
+the NOTICE text from the Work, provided that such additional attribution
+notices cannot be construed as modifying the License.
+You may add Your own copyright statement to Your modifications and may
+provide additional or different license terms and conditions for use,
+reproduction, or distribution of Your modifications, or for any such
+Derivative Works as a whole, provided Your use, reproduction, and
+distribution of the Work otherwise complies with the conditions stated in
+this License.</p>
+</li>
+</ol>
+<p><strong><a name="contributions">5. Submission of Contributions</a></strong>. Unless You
+explicitly state otherwise, any Contribution intentionally submitted for
+inclusion in the Work by You to the Licensor shall be under the terms and
+conditions of this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify the
+terms of any separate license agreement you may have executed with Licensor
+regarding such Contributions.</p>
+<p><strong><a name="trademarks">6. Trademarks</a></strong>. This License does not grant
+permission to use the trade names, trademarks, service marks, or product
+names of the Licensor, except as required for reasonable and customary use
+in describing the origin of the Work and reproducing the content of the
+NOTICE file.</p>
+<p><strong><a name="no-warranty">7. Disclaimer of Warranty</a></strong>. Unless required by
+applicable law or agreed to in writing, Licensor provides the Work (and
+each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
+without limitation, any warranties or conditions of TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You
+are solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your exercise
+of permissions under this License.</p>
+<p><strong><a name="no-liability">8. Limitation of Liability</a></strong>. In no event and
+under no legal theory, whether in tort (including negligence), contract, or
+otherwise, unless required by applicable law (such as deliberate and
+grossly negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a result
+of this License or out of the use or inability to use the Work (including
+but not limited to damages for loss of goodwill, work stoppage, computer
+failure or malfunction, or any and all other commercial damages or losses),
+even if such Contributor has been advised of the possibility of such
+damages.</p>
+<p><strong><a name="additional">9. Accepting Warranty or Additional Liability</a></strong>.
+While redistributing the Work or Derivative Works thereof, You may choose
+to offer, and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this License.
+However, in accepting such obligations, You may act only on Your own behalf
+and on Your sole responsibility, not on behalf of any other Contributor,
+and only if You agree to indemnify, defend, and hold each Contributor
+harmless for any liability incurred by, or claims asserted against, such
+Contributor by reason of your accepting any such warranty or additional
+liability.</p>
+<p>END OF TERMS AND CONDITIONS</p>
+
+    <div class="clear"></div>
+    
+    </div>
+    <div id="copyright" class="container_16">
+      <p>Copyright &#169; 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+    </div>
+  </body>
+</html>
diff --git a/org.tizen.common/test/test_files/about_files/freemarker-LICENSE.txt b/org.tizen.common/test/test_files/about_files/freemarker-LICENSE.txt
new file mode 100644 (file)
index 0000000..4c5f086
--- /dev/null
@@ -0,0 +1,69 @@
+FreeMarker 1.x was released under the LGPL license. Later, by community\r
+consensus, we have switched over to a BSD-style license. As of FreeMarker\r
+2.2pre1, the original author, Benjamin Geer, has relinquished the copyright in\r
+behalf of Visigoth Software Society. The current copyright holder is the\r
+Visigoth Software Society.\r
+\r
+------------------------------------------------------------------------------\r
+Copyright (c) 2003 The Visigoth Software Society. All rights reserved.\r
+\r
+Redistribution and use in source and binary forms, with or without\r
+modification, are permitted provided that the following conditions are met:\r
+\r
+1.  Redistributions of source code must retain the above copyright notice,\r
+    this list of conditions and the following disclaimer.\r
+\r
+2.  The end-user documentation included with the redistribution, if any, must\r
+    include the following acknowlegement:\r
+      "This product includes software developed by the \r
+      Visigoth Software Society (http://www.visigoths.org/)."\r
+    Alternately, this acknowlegement may appear in the software itself, if and\r
+    wherever such third-party acknowlegements normally appear.\r
+\r
+3.  Neither the name "FreeMarker", "Visigoth", nor any of the names of the\r
+    project contributors may be used to endorse or promote products derived\r
+    from this software without prior written permission. For written\r
+    permission, please contact visigoths@visigoths.org.\r
+\r
+4.  Products derived from this software may not be called "FreeMarker" or\r
+    "Visigoth" nor may "FreeMarker" or "Visigoth" appear in their names\r
+    without prior written permission of the Visigoth Software Society.\r
+\r
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\r
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\r
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\r
+VISIGOTH SOFTWARE SOCIETY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+------------------------------------------------------------------------------\r
+\r
+This software consists of voluntary contributions made by many individuals on\r
+behalf of the Visigoth Software Society. For more information on the Visigoth\r
+Software Society, please see http://www.visigoths.org/\r
+\r
+------------------------------------------------------------------------------\r
+\r
+FREEMARKER SUBCOMPONENTS UNDER DIFFERENT LICENSE:\r
+\r
+FreeMarker includes a number of subcomponents that are licensed by the Apache\r
+Software Foundation under the Apache License, Version 2.0. Your use of these\r
+subcomponents is subject to the terms and conditions of the Apache License,\r
+Version 2.0. You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+    \r
+The subcomponents under this licence are the following files, which are\r
+included both in freemarker.jar and in the source code:\r
+  \r
+    freemarker/ext/jsp/web-app_2_2.dtd\r
+    freemarker/ext/jsp/web-app_2_3.dtd\r
+    freemarker/ext/jsp/web-app_2_4.xsd\r
+    freemarker/ext/jsp/web-app_2_5.xsd\r
+    freemarker/ext/jsp/web-jsptaglibrary_1_1.dtd\r
+    freemarker/ext/jsp/web-jsptaglibrary_1_2.dtd\r
+    freemarker/ext/jsp/web-jsptaglibrary_2_0.xsd\r
+    freemarker/ext/jsp/web-jsptaglibrary_2_1.xsd\r
diff --git a/org.tizen.common/test/test_files/resource/about_files/LICENSE-2.0.htm b/org.tizen.common/test/test_files/resource/about_files/LICENSE-2.0.htm
new file mode 100644 (file)
index 0000000..f7ca656
--- /dev/null
@@ -0,0 +1,191 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache License, Version 2.0</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+
+    <link rel="stylesheet" type="text/css" media="screen" href="/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="/css/code.css">
+
+    <script type="text/javascript" src="/js/jquery.js"></script>
+    <script type="text/javascript" src="/js/apache_boot.js"></script>
+
+    
+
+    
+    <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file to you under the Apache License, Version 2.0 (the &quot;License&quot;); you may not use this file except in compliance with the License.  You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the specific language governing permissions and limitations under the License. -->
+  </head>
+
+  <body>
+    <div id="page" class="container_16">
+      <div id="header" class="grid_8">
+        <h1>The Apache Software Foundation</h1>
+        <h2>Apache License, Version 2.0</h2>
+      </div>
+
+      <div class="clear"></div>
+      <div id="content" class="grid_16"><div class="section-content"><p>Apache License<br></br>Version 2.0, January 2004<br></br>
+<a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a> </p>
+<p>TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION</p>
+<p><strong><a name="definitions">1. Definitions</a></strong>.</p>
+<p>"License" shall mean the terms and conditions for use, reproduction, and
+distribution as defined by Sections 1 through 9 of this document.</p>
+<p>"Licensor" shall mean the copyright owner or entity authorized by the
+copyright owner that is granting the License.</p>
+<p>"Legal Entity" shall mean the union of the acting entity and all other
+entities that control, are controlled by, or are under common control with
+that entity. For the purposes of this definition, "control" means (i) the
+power, direct or indirect, to cause the direction or management of such
+entity, whether by contract or otherwise, or (ii) ownership of fifty
+percent (50%) or more of the outstanding shares, or (iii) beneficial
+ownership of such entity.</p>
+<p>"You" (or "Your") shall mean an individual or Legal Entity exercising
+permissions granted by this License.</p>
+<p>"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.</p>
+<p>"Object" form shall mean any form resulting from mechanical transformation
+or translation of a Source form, including but not limited to compiled
+object code, generated documentation, and conversions to other media types.</p>
+<p>"Work" shall mean the work of authorship, whether in Source or Object form,
+made available under the License, as indicated by a copyright notice that
+is included in or attached to the work (an example is provided in the
+Appendix below).</p>
+<p>"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent, as
+a whole, an original work of authorship. For the purposes of this License,
+Derivative Works shall not include works that remain separable from, or
+merely link (or bind by name) to the interfaces of, the Work and Derivative
+Works thereof.</p>
+<p>"Contribution" shall mean any work of authorship, including the original
+version of the Work and any modifications or additions to that Work or
+Derivative Works thereof, that is intentionally submitted to Licensor for
+inclusion in the Work by the copyright owner or by an individual or Legal
+Entity authorized to submit on behalf of the copyright owner. For the
+purposes of this definition, "submitted" means any form of electronic,
+verbal, or written communication sent to the Licensor or its
+representatives, including but not limited to communication on electronic
+mailing lists, source code control systems, and issue tracking systems that
+are managed by, or on behalf of, the Licensor for the purpose of discussing
+and improving the Work, but excluding communication that is conspicuously
+marked or otherwise designated in writing by the copyright owner as "Not a
+Contribution."</p>
+<p>"Contributor" shall mean Licensor and any individual or Legal Entity on
+behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.</p>
+<p><strong><a name="copyright">2. Grant of Copyright License</a></strong>. Subject to the
+terms and conditions of this License, each Contributor hereby grants to You
+a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of, publicly
+display, publicly perform, sublicense, and distribute the Work and such
+Derivative Works in Source or Object form.</p>
+<p><strong><a name="patent">3. Grant of Patent License</a></strong>. Subject to the terms
+and conditions of this License, each Contributor hereby grants to You a
+perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made, use,
+offer to sell, sell, import, and otherwise transfer the Work, where such
+license applies only to those patent claims licensable by such Contributor
+that are necessarily infringed by their Contribution(s) alone or by
+combination of their Contribution(s) with the Work to which such
+Contribution(s) was submitted. If You institute patent litigation against
+any entity (including a cross-claim or counterclaim in a lawsuit) alleging
+that the Work or a Contribution incorporated within the Work constitutes
+direct or contributory patent infringement, then any patent licenses
+granted to You under this License for that Work shall terminate as of the
+date such litigation is filed.</p>
+<p><strong><a name="redistribution">4. Redistribution</a></strong>. You may reproduce and
+distribute copies of the Work or Derivative Works thereof in any medium,
+with or without modifications, and in Source or Object form, provided that
+You meet the following conditions:</p>
+<ol>
+<li>
+<p>You must give any other recipients of the Work or Derivative Works a
+copy of this License; and</p>
+</li>
+<li>
+<p>You must cause any modified files to carry prominent notices stating
+that You changed the files; and</p>
+</li>
+<li>
+<p>You must retain, in the Source form of any Derivative Works that You
+distribute, all copyright, patent, trademark, and attribution notices from
+the Source form of the Work, excluding those notices that do not pertain to
+any part of the Derivative Works; and</p>
+</li>
+<li>
+<p>If the Work includes a "NOTICE" text file as part of its distribution,
+then any Derivative Works that You distribute must include a readable copy
+of the attribution notices contained within such NOTICE file, excluding
+those notices that do not pertain to any part of the Derivative Works, in
+at least one of the following places: within a NOTICE text file distributed
+as part of the Derivative Works; within the Source form or documentation,
+if provided along with the Derivative Works; or, within a display generated
+by the Derivative Works, if and wherever such third-party notices normally
+appear. The contents of the NOTICE file are for informational purposes only
+and do not modify the License. You may add Your own attribution notices
+within Derivative Works that You distribute, alongside or as an addendum to
+the NOTICE text from the Work, provided that such additional attribution
+notices cannot be construed as modifying the License.
+You may add Your own copyright statement to Your modifications and may
+provide additional or different license terms and conditions for use,
+reproduction, or distribution of Your modifications, or for any such
+Derivative Works as a whole, provided Your use, reproduction, and
+distribution of the Work otherwise complies with the conditions stated in
+this License.</p>
+</li>
+</ol>
+<p><strong><a name="contributions">5. Submission of Contributions</a></strong>. Unless You
+explicitly state otherwise, any Contribution intentionally submitted for
+inclusion in the Work by You to the Licensor shall be under the terms and
+conditions of this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify the
+terms of any separate license agreement you may have executed with Licensor
+regarding such Contributions.</p>
+<p><strong><a name="trademarks">6. Trademarks</a></strong>. This License does not grant
+permission to use the trade names, trademarks, service marks, or product
+names of the Licensor, except as required for reasonable and customary use
+in describing the origin of the Work and reproducing the content of the
+NOTICE file.</p>
+<p><strong><a name="no-warranty">7. Disclaimer of Warranty</a></strong>. Unless required by
+applicable law or agreed to in writing, Licensor provides the Work (and
+each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
+without limitation, any warranties or conditions of TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You
+are solely responsible for determining the appropriateness of using or
+redistributing the Work and assume any risks associated with Your exercise
+of permissions under this License.</p>
+<p><strong><a name="no-liability">8. Limitation of Liability</a></strong>. In no event and
+under no legal theory, whether in tort (including negligence), contract, or
+otherwise, unless required by applicable law (such as deliberate and
+grossly negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a result
+of this License or out of the use or inability to use the Work (including
+but not limited to damages for loss of goodwill, work stoppage, computer
+failure or malfunction, or any and all other commercial damages or losses),
+even if such Contributor has been advised of the possibility of such
+damages.</p>
+<p><strong><a name="additional">9. Accepting Warranty or Additional Liability</a></strong>.
+While redistributing the Work or Derivative Works thereof, You may choose
+to offer, and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this License.
+However, in accepting such obligations, You may act only on Your own behalf
+and on Your sole responsibility, not on behalf of any other Contributor,
+and only if You agree to indemnify, defend, and hold each Contributor
+harmless for any liability incurred by, or claims asserted against, such
+Contributor by reason of your accepting any such warranty or additional
+liability.</p>
+<p>END OF TERMS AND CONDITIONS</p>
+
+    <div class="clear"></div>
+    
+    </div>
+    <div id="copyright" class="container_16">
+      <p>Copyright &#169; 2011 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/>Apache and the Apache feather logo are trademarks of The Apache Software Foundation.</p>
+    </div>
+  </body>
+</html>
diff --git a/org.tizen.common/test/test_files/resource/about_files/freemarker-LICENSE.txt b/org.tizen.common/test/test_files/resource/about_files/freemarker-LICENSE.txt
new file mode 100644 (file)
index 0000000..4c5f086
--- /dev/null
@@ -0,0 +1,69 @@
+FreeMarker 1.x was released under the LGPL license. Later, by community\r
+consensus, we have switched over to a BSD-style license. As of FreeMarker\r
+2.2pre1, the original author, Benjamin Geer, has relinquished the copyright in\r
+behalf of Visigoth Software Society. The current copyright holder is the\r
+Visigoth Software Society.\r
+\r
+------------------------------------------------------------------------------\r
+Copyright (c) 2003 The Visigoth Software Society. All rights reserved.\r
+\r
+Redistribution and use in source and binary forms, with or without\r
+modification, are permitted provided that the following conditions are met:\r
+\r
+1.  Redistributions of source code must retain the above copyright notice,\r
+    this list of conditions and the following disclaimer.\r
+\r
+2.  The end-user documentation included with the redistribution, if any, must\r
+    include the following acknowlegement:\r
+      "This product includes software developed by the \r
+      Visigoth Software Society (http://www.visigoths.org/)."\r
+    Alternately, this acknowlegement may appear in the software itself, if and\r
+    wherever such third-party acknowlegements normally appear.\r
+\r
+3.  Neither the name "FreeMarker", "Visigoth", nor any of the names of the\r
+    project contributors may be used to endorse or promote products derived\r
+    from this software without prior written permission. For written\r
+    permission, please contact visigoths@visigoths.org.\r
+\r
+4.  Products derived from this software may not be called "FreeMarker" or\r
+    "Visigoth" nor may "FreeMarker" or "Visigoth" appear in their names\r
+    without prior written permission of the Visigoth Software Society.\r
+\r
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,\r
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND\r
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\r
+VISIGOTH SOFTWARE SOCIETY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\r
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\r
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\r
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+------------------------------------------------------------------------------\r
+\r
+This software consists of voluntary contributions made by many individuals on\r
+behalf of the Visigoth Software Society. For more information on the Visigoth\r
+Software Society, please see http://www.visigoths.org/\r
+\r
+------------------------------------------------------------------------------\r
+\r
+FREEMARKER SUBCOMPONENTS UNDER DIFFERENT LICENSE:\r
+\r
+FreeMarker includes a number of subcomponents that are licensed by the Apache\r
+Software Foundation under the Apache License, Version 2.0. Your use of these\r
+subcomponents is subject to the terms and conditions of the Apache License,\r
+Version 2.0. You may obtain a copy of the License at\r
+\r
+    http://www.apache.org/licenses/LICENSE-2.0\r
+    \r
+The subcomponents under this licence are the following files, which are\r
+included both in freemarker.jar and in the source code:\r
+  \r
+    freemarker/ext/jsp/web-app_2_2.dtd\r
+    freemarker/ext/jsp/web-app_2_3.dtd\r
+    freemarker/ext/jsp/web-app_2_4.xsd\r
+    freemarker/ext/jsp/web-app_2_5.xsd\r
+    freemarker/ext/jsp/web-jsptaglibrary_1_1.dtd\r
+    freemarker/ext/jsp/web-jsptaglibrary_1_2.dtd\r
+    freemarker/ext/jsp/web-jsptaglibrary_2_0.xsd\r
+    freemarker/ext/jsp/web-jsptaglibrary_2_1.xsd\r
diff --git a/org.tizen.common/test/test_files/resource/resource/text.txt b/org.tizen.common/test/test_files/resource/resource/text.txt
new file mode 100644 (file)
index 0000000..70b287d
--- /dev/null
@@ -0,0 +1,3 @@
+HOHOHO
+HAHAHA
+NAMKOONGHO
\ No newline at end of file
diff --git a/org.tizen.common/test/test_files/resource/test.zip b/org.tizen.common/test/test_files/resource/test.zip
new file mode 100644 (file)
index 0000000..fff7bff
Binary files /dev/null and b/org.tizen.common/test/test_files/resource/test.zip differ
diff --git a/org.tizen.common/test/test_files/resource/text.txt b/org.tizen.common/test/test_files/resource/text.txt
new file mode 100644 (file)
index 0000000..70b287d
--- /dev/null
@@ -0,0 +1,3 @@
+HOHOHO
+HAHAHA
+NAMKOONGHO
\ No newline at end of file
diff --git a/package/addingFiles/tools/ide/lib/org.apache.commons.logging_1.1.1.v201101211721.jar b/package/addingFiles/tools/ide/lib/org.apache.commons.logging_1.1.1.v201101211721.jar
new file mode 100644 (file)
index 0000000..2007db7
Binary files /dev/null and b/package/addingFiles/tools/ide/lib/org.apache.commons.logging_1.1.1.v201101211721.jar differ
index 07c4de4..2bb765a 100755 (executable)
-#!/bin/bash -x
+#!/bin/bash -xe
 
-build_path=${SRCDIR}/build_result
-
-__set_parameter()
-{
-       build_id=${package_name}
-       build_type=N
-       build_result_directory=${build_type}.${build_id}
-       build_result_path="$build_path/$build_result_directory"
-       architecture=x86
-       ide_root_path_name=IDE
-
-       case ${platform} in
-               linux)
-                       archive_platform_name=linux
-                       windowing=gtk
-                       ;;
-               windows)
-                       archive_platform_name=win32
-                       windowing=win32
-                       ;;
-               *)
-                       echo "${platform} is not support yet."
-                       ;;
-       esac
-
-       result_archive_file=${build_id}-${archive_platform_name}.${windowing}.${architecture}.zip
-}
-
-__set_build_parameter()
-{
-       case ${platform} in
-               linux)
-                       reference_ide_path=${ROOTDIR}/indigo-pde/eclipse
-                       ;;
-               windows)
-                       reference_ide_path=${ROOTDIR}/indigo-winpde/eclipse
-                       ;;
-               *)
-                       echo "${platform} is not support yet."
-                       ;;
-       esac
-}
-
-__set_install_parameter()
-{
-       INSTALL_DIR=${SRCDIR}/package/${package_name}.package.${platform}/data
-}
-
-__clean_build_environment()
-{
-       if [ -d $build_path ]
-       then
-               echo "Build result directory : [$build_path]"
-       else
-               echo "Make build result directory [$build_path]"
-               mkdir -p $build_path
-       fi
-
-       echo "Remove legacy build files..."
-       if [ -d ${build_result_path}/${archive_platform_name}.${windowing}.${architecture} ]
-       then
-               rm -rf ${build_result_path}/${archive_platform_name}.${windowing}.${architecture}
-       fi
-       if [ -e ${build_result_path}/${result_archive_file} ]
-       then
-               rm -rf ${build_result_path}/${result_archive_file}
-       fi
-       if [ -d ${build_path}/tmp ]
-       then
-               rm -rf ${build_path}/tmp
-       fi
-
-       if [ -d ${build_path}/buildRepo ]
-       then
-               rm -rf ${build_path}/buildRepo
-       fi
-
-       rm -r ${build_path}/*.xml
-       rm -r ${build_path}/*.properties
-       rm -r ${build_path}/*.clean
-
-
-       if [ -d $build_path/plugins ]
-       then
-               echo "plugins directory recreate..."
-               rm -rf $build_path/plugins
-               mkdir $build_path/plugins
-       else
-               echo "Make plugins directory..."
-               mkdir $build_path/plugins
-       fi
-       if [ -d $build_path/features/ ]
-       then
-               echo "features directory recreate..."
-               rm -rf $build_path/features
-               mkdir $build_path/features
-       else
-               echo "Make features directory..."
-               mkdir $build_path/features
-       fi
-
-}
-
-__copy_build_sources()
-{
-       echo "Copy features from $SRCDIR to $build_path/features"
-       cp -r $SRCDIR/* $build_path/features
-
-       echo "Copy plugins from $SRCDIR to $build_path/plugins"
-       cp -r $SRCDIR/* $build_path/plugins
-}
-
-__copy_dependency_plugins()
-{
-       dependency_plugin_path=${ROOTDIR}/${ide_root_path_name}
-       if [ -d ${dependency_plugin_path} ]
-       then
-               cp -rf ${dependency_plugin_path}/features/* ${build_path}/features/
-               cp -rf ${dependency_plugin_path}/plugins/* ${build_path}/plugins/
-       fi
-}
-
-__make_ant_build_properties_file()
-{
-       builder_path="${SRCDIR}/builder"
-       parent_path_of_based_eclipse=${reference_ide_path}/..
-
-       echo "Make build.properties file..."
-       if [ ! -e $builder_path/build.properties.clean ] ; then
-               echo "ERROR : \"build.properties.clean\" file does not exist..."
-               exit 1
-       fi
-       cp $builder_path/build.properties.clean $build_path
-       cp $builder_path/customTargets.xml $build_path
-
-       if [ -d $reference_ide_path ] 
-       then
-               sed -e "s;\(^buildDirectory=\).*;\1${build_path};g" \
-               -e "s;\(^base=\).*;\1${parent_path_of_based_eclipse};g" \
-               -e "s;\(^baseLocation=\).*;\1${reference_ide_path};g" \
-               -e "s;\(^configs=\).*;\1${archive_platform_name},${windowing},${architecture};g" \
-               -e "s;\(^buildType=\).*;\1${build_type};g" \
-               -e "s;\(^buildId=\).*;\1${build_id};g" \
-               -e "s;\(^archivePrefix=\).*;\1${build_id};g" \
-               < $build_path/build.properties.clean > $build_path/build.properties
-
-       else
-               echo "ERROR : target eclipse is not exist."
-               exit 1
-       fi
-}
-
-__execute_pde_build()
-{
-       echo "Execute Product Ant Builder..."
-       equinox_launcher=`echo org.eclipse.equinox.launcher_*.jar`
-       pde_build=`echo org.eclipse.pde.build_*`
-
-       java -jar ${reference_ide_path}/plugins/$equinox_launcher -application org.eclipse.ant.core.antRunner -buildfile ${reference_ide_path}/plugins/$pde_build/scripts/productBuild/productBuild.xml -Dbuilder=$build_path -Dosgi.locking=none 2>&1
-
-       if [ $? != 0 ];
-       then
-               echo "Build failed..."
-               exit 1
-       fi
-}
-
-__unzip_plugin_pack()
-{
-       echo "unzip to $build_result_path"
-       unzip -a $build_result_path/${result_archive_file} -d $build_result_path/${archive_platform_name}.${windowing}.${architecture}
-}
-
-build_plugins()
-{
-       case ${platform} in
-               linux)
-                       echo "build plugin for ${platform}"
-                       ;;
-               windows)
-                       echo "build plugin for ${platform}"
-                       ;;
-               *)
-                       echo "${platform} is not support yet."
-                       exit 1
-                       ;;
-       esac
-
-       __set_parameter
-       __set_build_parameter
-       __clean_build_environment
-       __copy_build_sources
-       __copy_dependency_plugins
-       __make_ant_build_properties_file
-       __execute_pde_build
-       __unzip_plugin_pack
-
-       echo "Build SUCCESS. You will find SDK IDE in \"${build_result_path}\"."
-}
-
-__clean_packaging_environment()
+__copy_necessary_binaries()
 {
+    echo "add necessary files."
+    ## ex)
+    ##     ide_root_path_name=IDE
+    ##     cp -rf ~~~~/file.file ${INSTALL_DIR}/${ide_root_path_name}/
+    ##     cp -rf ${SRCDIR}/packager/common/data/* ${INSTALL_DIR}/
+    cp -rf ${SRCDIR}/package/addingFiles/* ${INSTALL_DIR}/
 
-       if [ -d ${INSTALL_DIR} ]
-       then
-               rm -rf ${INSTALL_DIR}
-       else
-               mkdir -p ${INSTALL_DIR}
-       fi
-}
+    sign_lib_path=${INSTALL_DIR}/tools/ide/lib
+    mkdir -p ${sign_lib_path}
+    cp -rf ${SRCDIR}/org.tizen.common.sign/lib/* ${sign_lib_path}
 
-__copy_necessary_binaries()
-{
-       echo "add necessary files."
-       ## ex) cp -rf ~~~~/file.file ${INSTALL_DIR}/${ide_root_path_name}/
+    plugin_path=${SRCDIR}/package/${package_name}.package.${TARGET_OS}/data/ide/plugins
+    sign_plugin=`ls ${plugin_path}/ | grep org.tizen.common.sign_`
+    cp -rf ${plugin_path}/${sign_plugin} ${sign_lib_path}
 }
 
-packaging_plugins()
+__set_parameter()
 {
-       __set_parameter
-       __set_install_parameter
-
-       __clean_packaging_environment
-       __copy_necessary_binaries
-
-       install_ide_path=${INSTALL_DIR}/${ide_root_path_name}
-       
-       if [ ! -d ${install_ide_path} ]
-       then
-               mkdir -p ${install_ide_path}
-       fi
-
-       cp -rf ${build_result_path}/${archive_platform_name}.${windowing}.${architecture}/${package_name}/* ${install_ide_path}/
+    echo "TARGET_OS : ${TARGET_OS}"
+    build_script_path=${ROOTDIR}/pde-build
 }
 
 # clean
 clean()
 {
-       echo "=========================================CLEAN============================================"
-       make clean
-       rm -rf ${SRCDIR}/*.zip
-       rm -rf ${SRCDIR}/*.tar.gz
-       rm -rf ${build_path}
+    echo "=========================================CLEAN============================================"
+    __set_parameter
+    ${build_script_path}/clean.sh ${package_name}
 }
 
 # build
 build() 
 {
-       echo "=========================================BUILD============================================"
-       pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
-       for pkgname_and_platform in ${pkgname_and_platform_list}
-       do
-               pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
-               package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
-               platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
-       
-               if [ "x${BUILD_TARGET_OS}" = "x${platform}" ]
-               then
-                       build_plugins
-               else
-                       echo ""
-               fi
-       done
+    echo "=========================================BUILD============================================"
+    pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
+    for pkgname_and_platform in ${pkgname_and_platform_list}
+    do
+        pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
+        package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
+        platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
+    
+        if [ "x${TARGET_OS}" = "x${platform}" ]
+        then
+            __set_parameter
+            ${build_script_path}/build.sh ${package_name}
+       else
+            echo ""
+        fi
+    done
 }
 
 # install
 install() 
 {
-       pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
-       for pkgname_and_platform in ${pkgname_and_platform_list}
-       do
-               echo "=========================================INSTALL============================================"
-               pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
-               package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
-               platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
-
-               if [ "x${BUILD_TARGET_OS}" = "x${platform}" ]
-               then
-                       packaging_plugins
-               else
-                       echo ""
-               fi
-       done    
+    pkgname_and_platform_list=`awk 'BEGIN{RS="\n\n"; FS="\n"} /Package:/{for(i=1;i<NF;i++){if($i ~ /^OS:/){print $1,$i}}}' ${SRCDIR}/package/pkginfo.manifest | tr ' ' '@'`
+    for pkgname_and_platform in ${pkgname_and_platform_list}
+    do
+        echo "=========================================INSTALL============================================"
+        pkgname_and_platform=`echo $pkgname_and_platform | tr '@' ' '`
+        package_name=`echo ${pkgname_and_platform} | cut -f1 -d " " | cut -f2 -d ":"`
+        platform=`echo ${pkgname_and_platform} | cut -f2 -d " " | cut -f2 -d ":"`
+
+        if [ "x${TARGET_OS}" = "x${platform}" ]
+        then
+
+            if [ "x${package_name}" = "xcommon-eplugin" ]
+            then
+                INSTALL_DIR=${SRCDIR}/package/${package_name}.package.${TARGET_OS}/data
+                mkdir -p ${INSTALL_DIR} 
+                __set_parameter
+                ${build_script_path}/install.sh ${package_name}
+                __copy_necessary_binaries
+                sdblib_path="${INSTALL_DIR}/ide/plugins"
+                echo "sdblib path : ${sdblib_path}"
+                sdblib_name=`basename $(ls ${sdblib_path}/org.tizen.common.sdblib*.jar)`
+                echo "sdblib name : ${sdblib_name}"
+            elif [ "x${package_name}"  = "xsdblib" ]
+            then
+               if [ -e ${sdblib_path}/${sdblib_name} ]
+                then
+                    INSTALL_DIR=${SRCDIR}/package/${package_name}.package.${TARGET_OS}/data/tools/ide/lib
+                    mkdir -p ${INSTALL_DIR} 
+                    cp ${sdblib_path}/${sdblib_name} ${INSTALL_DIR}/sdblib.jar
+                fi
+            fi
+        else
+            echo ""
+        fi
+    done    
 }
 
 [ "$1" = "clean" ] && clean
 [ "$1" = "build" ] && build
 [ "$1" = "install" ] && install
-exit 0
diff --git a/package/changelog b/package/changelog
new file mode 100644 (file)
index 0000000..1f327e5
--- /dev/null
@@ -0,0 +1,193 @@
+* 1.0.141
+- Added filter for hide RDS Properties page
+== kh5325.kim <kh5325.kim@samsung.com> 2013-02-14
+* 1.0.140
+- Modified Provider
+== kh5325.kim <kh5325.kim@samsung.com> 2013-02-14
+* 1.0.139
+- In the case of RDS, the partial directories's permision was changed to "app:app". 
+== gune.kim <gune.kim@samsung.com> 2013-02-06 15:18
+* 1.0.138
+- Updated Tizen Web UI FW to 0.2.15
+== kh5325.kim <kh5325.kim@samsung.com> 2013-01-29
+* 1.0.137
+- updated dialogutil
+== jihoon80.song <jihoon80.song@samsung.com> 2013-01-28 18:22
+* 1.0.136
+- Update tizen-web-ui-fw 0.2.14
+== changhyun1.lee <changhyun1.lee@samsung.com> 2013-01-26 22:57
+* 1.0.135
+- Fixed RDS directory installation
+== kh5325.kim <kh5325.kim@samsung.com> 2013-01-26
+* 1.0.134
+- updated Tizen Web UI FW to 0.2.13
+- add to check exit return value when installing a package in rds mode
+== kh5325.kim <kh5325.kim@samsung.com> 2013-01-25
+* 1.0.133
+- revert previous fix
+== hyunsik.noh <hyunsik.noh@samsung.com> 2013-01-24 17:39
+* 1.0.132
+- [sdblib] Fix condition for monitor loop to against blocking
+== hyunsik.noh <hyunsik.noh@samsung.com> 2013-01-24 16:32
+* 1.0.131
+- remove invalid character for log file name on windows
+== hyunsik.noh <hyunsik.noh@samsung.com> 2013-01-23 20:13
+* 1.0.130
+- updated tizen web ui fw to 0.2.11
+== jihoon80.song <jihoon80.song@samsung.com> 2013-01-23 16:42
+* 1.0.129
+- .
+== hyunsik.noh <hyunsik.noh@samsung.com> 2013-01-21 21:01
+* 1.0.128
+- fix. save file load
+== j0.kim <j0.kim@samsung.com> 2013-01-21 17:57
+* 1.0.127
+- Fixed an issue that the progress bar is shown at the top while in Emulator.
+== kh5325.kim <kh5325.kim@samsung.com> 2013-01-18
+* 1.0.126
+- updated Tizen Web UI FW to 0.2.9
+== jihoon80.song <jihoon80.song@samsung.com> 2013-01-18 10:46
+* 1.0.125
+- Update templateFix bug: signing cannot be done with plain text
+== ho.namkoong <ho.namkoong@samsung.com> 2013-01-16
+* 1.0.124
+- Update templateFix bug: signing cannot be done with plain text
+== ho.namkoong <ho.namkoong@samsung.com> 2013-01-16
+* 1.0.123
+- Update template
+== changhyun1.lee <changhyun1.lee@samsung.com> 2013-01-14 12:13
+* 2.0.0
+- Tizen 2.0 release
+== kh5325.kim <kh5325.kim@samsung.com> 2013-01-11
+* 1.0.122
+- modified SDB's start demon
+== gyeongseok.seo <gyeongseok.seo@samsung.com> 2013-01-09
+* 1.0.121
+- Changed on-demand install path to developer
+== mariah <kh5325.kim@samsung.com> 2013-01-09
+* 1.0.120
+- modified local port checker 
+== gyeongseok.seo <gyeongseok.seo@samsung.com> 2013-01-08
+* 1.0.119
+- Merged the latest changes
+== mariah <kh5325.kim@samsung.com> 2013-01-04
+* 1.0.118
+- Remove RDS's "web not support note" in preference page and project properties page
+== gyeongseok.seo <gyeongseok.seo@samsung.com> 2013-01-04
+* 1.0.117
+- Change on-demand installation path.
+== gune.kim <gune.kim@samsung.com> 2013-01-03
+* 1.0.116
+- Merged the latest changes
+== changhyun1.lee <changhyun1.lee@samsung.com> 2013-01-02
+* 1.0.115
+- Add ziputil class
+== gyeongseok.seo <gyeongseok.seo@samsung.com> 2012-12-28
+* 1.0.114
+- updated sign module for applying UNICODE patch
+== jihoon.song <jihoon80.song@samsung.com> 2012-12-28
+* 1.0.113
+- modified RDS mode check logic RdsPreferencePage#isWebRdsMode() added
+== gyeongseok.seo <gyeongseok.seo@samsung.com> 2012-12-27
+* 1.0.112
+- Remove eclipse dependency from TizenSigner
+== ho.namkoong <ho.namkoong@samsung.com> 2012-12-22
+* 1.0.111
+- update tizenwebuifw template
+== changhyun1.lee <changhyun1.lee@samsung.com> 2012-12-21 20:07
+* 1.0.110
+- Add Fatal log level for log view
+- modified parse the "rpm" file
+== gune.kim <gune.kim@samsung.com> 2012-12-21 17:22
+* 1.0.109
+- fixed sonar error
+== changhyun1.lee <changhyun1.lee@samsung.com> 2012-12-19 14:09
+* 1.0.107
+- Modified OnDemandInstall#copyPackage() using sdblib.
+== gune.kim <gune.kim@samsung.com> 2012-12-18 12:58
+* 1.0.106
+- sync from staging
+== changhyun1.lee <changhyun1.lee@samsung.com> 2012-12-12 15:15
+* 1.0.105
+- Modified config.xml version attribute
+- Fix invalid copy in web-template using cli
+== changhyun1.lee <changhyun1.lee@samsung.com> 2012-12-12 11:46
+* 1.0.104
+- Added template engine resource file
+== gyeongseok.seo <gyeongseok.seo@samsung.com> 2012-12-10
+* 1.0.103
+- Template samples added
+== bylee <bonyong.lee@samsung.com> 2012-11-25 15:37
+* 1.0.98
+- Modification - project's RDS preference page support (select project, file, folder)
+== gyeongseok.seo <gyeongseok.seo@samsung.com> 2012-12-06
+* 1.0.97
+- Remove WPE Preview Tab
+== changhyun1.lee <changhyun1.lee@samsung.com> 2012-12-06 13:39
+* 1.0.96
+- Add preference link dialog
+- Remove CLI's eclipse dependency 
+== gyeongseok.seo <gyeongseok.seo@samsung.com> 2012-12-06
+* 1.0.95
+- Supprot to get already connected device notification when add listener on SmartDevelopmentBridge additionally.
+- Add to check device type
+- removed on-demand control file & some fefactoring to improve debug trace readability
+- add crash report server class
+- Insert sys err in TizenSigner for throw error when signing fails
+- TID support for log view
+== changhyun1.lee <changhyun1.lee@samsung.com> 2012-12-05 11:24
+* 1.0.94
+- CLI's notify logic fix.
+== gyeongseok.seo <gyeongseok.seo@samsung.com> 2012-11-29
+* 1.0.92
+- sdblib merged into common-eplugin
+== hyunsik.noh <hyunsik.noh@samsung.com> 2012-11-28 16:35
+* 1.0.91
+- Template With CLI
+== bylee <bonyong.lee@samsung.com> 2012-11-25 15:37
+* 1.0.86
+- fixed bug : use "mkdir" command, if delta is directory.
+- sdblib.jar updated : Fix to change permission from 644 to 755 when pushing the file
+== mariah <kh5325.kim@samsung.com> 2012-11-22
+* 1.0.85
+- RDS bundle move from nativecommon-eplugin to common-eplugin
+- Added templates
+- Hidden unnecessary context run/debug menu on nativeplatform perspective
+- Added platform constant of debug path on host side
+== donghyuk.yang <donghyuk.yang@samsung.com> 2012-11-20
+* 1.0.84
+- unknown
+== hyunsik.noh <hyunsik.noh@samsung.com> 2012-11-16 10:24
+* 1.0.83
+- unknown
+== hyunsik.noh <hyunsik.noh@samsung.com> 2012-11-15 20:37
+* 1.0.82
+- Support for ARM emulator
+== mariah <kh5325.kim@samsung.com> 2012-11-15
+* 1.0.81
+- Changed prompter interface
+== jihoon.song <jihoon80.song@samsung.com> 2012-11-07
+* 1.0.80
+- Updated sign module & added new methods in FileUtil
+== jihoon.song <jihoon80.song@samsung.com> 2012-11-07
+* 1.0.79
+- Rapid Development Support for Native App
+== mariah <kh5325.kim@samsung.com> 2012-11-06
+* 1.0.78
+- Added fade effect option of NotifierDialog
+== gyeongseok.seo <gyeongseok.seo@samsung.com> 2012-11-05 19:40
+* 1.0.77
+- changed a sign module & fixed a missing plugin in feature
+== jihoon80.song <jihoon80.song@samsung.com> 2012-11-02 17:04
+* 1.0.76
+- [Title] Added WTP 3.3.2 Patch 
+== changhyun1.lee <changhyun1.lee@samsung.com> 2012-10-22 23:49
+* 1.0.75
+- unknown
+== hyunsik.noh <hyunsik.noh@samsung.com> 2012-10-17 21:40
+* 1.0.74
+- Connection Explorer and Log view enhancement
+== mariah <kh5325.kim@samsung.com> 2012-10-17
+* 1.0.73
+- changelog test
+==  <@samsung.com> 2012-10-17 13:40
index 2bae7c8..8f84c89 100644 (file)
@@ -1,19 +1,69 @@
-Package:common-eplugin
-Version:0.20.12
-OS:linux
-Build-host-os:linux
-Build-dependency:indigo-pde [linux], base-ide-product [linux]
-Install-dependency:base-ide-product [linux]
+Version:1.0.141
 Source:common-eplugin
-Maintainer:Kangho Kim <kh5325.kim@samsung.com>, Jihoon Song, Ho Namkoong, Taeyoung Son
+Maintainer:kangho kim <kh5325.kim@samsung.com>, yoonki park <yoonki.park@samsung.com>, hyunsik non <hyunsik.noh@samsung.com>, taeyoung son <taeyoung2.son@samsung.com>, gune Kim <gune.kim@samsung.com>, ho namkoong <ho.namkoong@samsung.com>, hyeongseok heo <hyeong-seok.heo@samsung.com>, gyeongseok seo <gyeongseok.seo@samsung.com>, jihoon song <jihoon80.song@samsung.com>, changhyun lee <changhyun1.lee@samsung.com>, bonyong lee <bonyong.lee@samsung.com>
+
+Package:common-eplugin
+OS:ubuntu-32
+Build-host-os:ubuntu-32
+Build-dependency:base-ide-product [ubuntu-32], pde-build [ubuntu-32]
+Install-dependency:base-ide-product [ubuntu-32]
 Description:Common plugin
 
 Package:common-eplugin
-Version:0.20.12
-OS:windows
-Build-host-os:linux
-Build-dependency:indigo-winpde [windows], base-ide-product [windows]
-Install-dependency:base-ide-product [windows]
-Source:common-eplugin
-Maintainer:Kangho Kim <kh5325.kim@samsung.com>, Jihoon Song, Ho Namkoong, Taeyoung Son
+OS:windows-32
+Build-host-os:ubuntu-32
+Build-dependency:base-ide-product [windows-32], pde-build [windows-32]
+Install-dependency:base-ide-product [windows-32]
+Description:Common plugin
+
+Package:common-eplugin
+OS:ubuntu-64
+Build-host-os:ubuntu-64
+Build-dependency:base-ide-product [ubuntu-64], pde-build [ubuntu-64]
+Install-dependency:base-ide-product [ubuntu-64]
+Description:Common plugin
+
+Package:common-eplugin
+OS:windows-64
+Build-host-os:ubuntu-64
+Build-dependency:base-ide-product [windows-64], pde-build [windows-64]
+Install-dependency:base-ide-product [windows-64]
 Description:Common plugin
+
+Package:common-eplugin
+OS:macos-64
+Build-host-os:ubuntu-64
+Build-dependency:base-ide-product [macos-64], pde-build [macos-64]
+Install-dependency:base-ide-product [macos-64]
+Description:Common plugin
+
+Package:sdblib
+OS:ubuntu-32
+Build-host-os:ubuntu-32, ubuntu-64
+Install-dependency:sdb [ubuntu-32]
+Description:sdblib
+
+Package:sdblib
+OS:ubuntu-64
+Build-host-os:ubuntu-32, ubuntu-64
+Install-dependency:sdb [ubuntu-64]
+Description:sdblib
+
+Package:sdblib
+OS:windows-32
+Build-host-os:ubuntu-32, ubuntu-64
+Install-dependency:sdb [windows-32]
+Description:sdblib
+
+Package:sdblib
+OS:windows-64
+Build-host-os:ubuntu-32, ubuntu-64
+Install-dependency:sdb [windows-64]
+Description:sdblib
+
+Package:sdblib
+OS:macos-64
+Build-host-os:ubuntu-32, ubuntu-64
+Install-dependency:sdb [macos-64]
+Description:sdblib
+